NPAPI:Pepper: Difference between revisions

1,626 bytes added ,  30 March 2010
Line 772: Line 772:


= Printing =
= Printing =
/* Being a print operation. Returns the total number of pages to print at the
* given printableArea size and DPI. printableArea is in points (a point is 1/72
* of an inch). The plugin is expected to remember the values of printableArea
* and printerDPI for use in subsequent print interface calls. These values
* should be cleared in printEnd*/
typedef NPError (*NPPPrintBeginPtr) (
    NPP instance,
    NPRect* printableArea,
    int32 printerDPI,
    int32* numPages);
/* Returns the required raster dimensions for the given page. */
typedef NPError (*NPPGetRasterDimensionsPtr) (
    NPP instance,
    int32 pageNumber,
    int32* widthInPixels,
    int32* heightInPixels);
/* Prints the specified page This allows the plugin to print a raster output. */
typedef NPError (*NPPPrintPageRasterPtr) (
    NPP instance,
    int32 pageNumber,
    NPDeviceContext2D* printSurface);
/* Ends the print operation */
typedef NPError (*NPPPrintEndPtr) (NPP instance);
/* TODO(sanjeevr) : Provide a vector interface for printing. We need to decide
* on a vector format that can support embedded fonts. A vector format will
* greatly reduce the size of the required output buffer
*/
typedef struct _NPPPrintExtensions {
  NPPPrintBeginPtr printBegin;
  NPPGetRasterDimensionsPtr getRasterDimensions;
  NPPPrintPageRasterPtr printPageRaster;
  NPPPrintEndPtr printEnd;
} NPPPrintExtensions;
/* Returns NULL if the plugin does not support print extensions */
typedef NPPPrintExtensions* (*NPPGetPrintExtensionsPtr)(NPP instance);
typedef struct _NPPExtensions {
  NPPGetPrintExtensionsPtr getPrintExtensions;
} NPPExtensions;


= Themes =
= Themes =
89

edits