Home | History | Annotate | Download | only in dev
      1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
      2  * Use of this source code is governed by a BSD-style license that can be
      3  * found in the LICENSE file.
      4  */
      5 
      6 /* From dev/ppb_printing_dev.idl modified Fri Apr 19 10:45:09 2013. */
      7 
      8 #ifndef PPAPI_C_DEV_PPB_PRINTING_DEV_H_
      9 #define PPAPI_C_DEV_PPB_PRINTING_DEV_H_
     10 
     11 #include "ppapi/c/dev/pp_print_settings_dev.h"
     12 #include "ppapi/c/pp_bool.h"
     13 #include "ppapi/c/pp_completion_callback.h"
     14 #include "ppapi/c/pp_instance.h"
     15 #include "ppapi/c/pp_macros.h"
     16 #include "ppapi/c/pp_point.h"
     17 #include "ppapi/c/pp_rect.h"
     18 #include "ppapi/c/pp_resource.h"
     19 #include "ppapi/c/pp_size.h"
     20 #include "ppapi/c/pp_stdint.h"
     21 
     22 #define PPB_PRINTING_DEV_INTERFACE_0_7 "PPB_Printing(Dev);0.7"
     23 #define PPB_PRINTING_DEV_INTERFACE PPB_PRINTING_DEV_INTERFACE_0_7
     24 
     25 /**
     26  * @file
     27  * Definition of the PPB_Printing interface.
     28  */
     29 
     30 
     31 /**
     32  * @addtogroup Interfaces
     33  * @{
     34  */
     35 struct PPB_Printing_Dev_0_7 {
     36   /** Create a resource for accessing printing functionality.
     37    *
     38    * @param[in] instance A <code>PP_Instance</code> identifying one instance
     39    * of a module.
     40    *
     41    * @return A <code>PP_Resource</code> containing the printing resource if
     42    * successful or 0 if it could not be created.
     43    */
     44   PP_Resource (*Create)(PP_Instance instance);
     45   /**
     46    * Outputs the default print settings for the default printer into
     47    * <code>print_settings</code>. The callback is called with
     48    * <code>PP_OK</code> when the settings have been retrieved successfully.
     49    *
     50    * @param[in] resource The printing resource.
     51    *
     52    * @param[in] callback A <code>CompletionCallback</code> to be called when
     53    * <code>print_settings</code> have been retrieved.
     54    *
     55    * @return PP_OK_COMPLETIONPENDING if request for the default print settings
     56    * was successful, another error code from pp_errors.h on failure.
     57    */
     58   int32_t (*GetDefaultPrintSettings)(
     59       PP_Resource resource,
     60       struct PP_PrintSettings_Dev* print_settings,
     61       struct PP_CompletionCallback callback);
     62 };
     63 
     64 typedef struct PPB_Printing_Dev_0_7 PPB_Printing_Dev;
     65 /**
     66  * @}
     67  */
     68 
     69 #endif  /* PPAPI_C_DEV_PPB_PRINTING_DEV_H_ */
     70 
     71