| OLD | NEW |
| 1 /* Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. |
| 2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
| 4 */ | 4 */ |
| 5 | 5 |
| 6 #ifndef _NP_EXTENSIONS_H_ | 6 #ifndef _NP_EXTENSIONS_H_ |
| 7 #define _NP_EXTENSIONS_H_ | 7 #define _NP_EXTENSIONS_H_ |
| 8 | 8 |
| 9 // Use the shorter include path here so that this file can be used in non- | 9 // Use the shorter include path here so that this file can be used in non- |
| 10 // Chromium projects, such as the Native Client SDK. | 10 // Chromium projects, such as the Native Client SDK. |
| (...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 975 int32_t pageNumber, | 975 int32_t pageNumber, |
| 976 int32_t* widthInPixels, | 976 int32_t* widthInPixels, |
| 977 int32_t* heightInPixels); | 977 int32_t* heightInPixels); |
| 978 /* Prints the specified page This allows the plugin to print a raster output. */ | 978 /* Prints the specified page This allows the plugin to print a raster output. */ |
| 979 typedef NPError (*NPPPrintPageRasterPtr) ( | 979 typedef NPError (*NPPPrintPageRasterPtr) ( |
| 980 NPP instance, | 980 NPP instance, |
| 981 int32_t pageNumber, | 981 int32_t pageNumber, |
| 982 NPDeviceContext2D* printSurface); | 982 NPDeviceContext2D* printSurface); |
| 983 /* Ends the print operation */ | 983 /* Ends the print operation */ |
| 984 typedef NPError (*NPPPrintEndPtr) (NPP instance); | 984 typedef NPError (*NPPPrintEndPtr) (NPP instance); |
| 985 /* Prints the specified page as PDF. The plugin allocates the output buffer |
| 986 * pointed to by pdf_output using the browser-supplied NPN_MemAlloc function. |
| 987 * The caller is expected to free the output buffer upon success.*/ |
| 988 typedef NPError (*NPPrintPageAsPDFPtr)(NPP instance, int32_t page_number, |
| 989 unsigned char** pdf_output, |
| 990 int32_t* output_size); |
| 991 |
| 985 | 992 |
| 986 /* TODO(sanjeevr) : Provide a vector interface for printing. We need to decide | 993 /* TODO(sanjeevr) : Provide a vector interface for printing. We need to decide |
| 987 * on a vector format that can support embedded fonts. A vector format will | 994 * on a vector format that can support embedded fonts. A vector format will |
| 988 * greatly reduce the size of the required output buffer. */ | 995 * greatly reduce the size of the required output buffer. */ |
| 989 | 996 |
| 990 typedef struct _NPPPrintExtensions { | 997 typedef struct _NPPPrintExtensions { |
| 991 NPPPrintBeginPtr printBegin; | 998 NPPPrintBeginPtr printBegin; |
| 992 NPPGetRasterDimensionsPtr getRasterDimensions; | 999 NPPGetRasterDimensionsPtr getRasterDimensions; |
| 993 NPPPrintPageRasterPtr printPageRaster; | 1000 NPPPrintPageRasterPtr printPageRaster; |
| 994 NPPPrintEndPtr printEnd; | 1001 NPPPrintEndPtr printEnd; |
| 1002 NPPrintPageAsPDFPtr printPageAsPDF; |
| 995 } NPPPrintExtensions; | 1003 } NPPPrintExtensions; |
| 996 | 1004 |
| 997 /* Returns NULL if the plugin does not support print extensions */ | 1005 /* Returns NULL if the plugin does not support print extensions */ |
| 998 typedef NPPPrintExtensions* (*NPPGetPrintExtensionsPtr)(NPP instance); | 1006 typedef NPPPrintExtensions* (*NPPGetPrintExtensionsPtr)(NPP instance); |
| 999 | 1007 |
| 1000 /* Find ---------------------------------------------------------------------*/ | 1008 /* Find ---------------------------------------------------------------------*/ |
| 1001 | 1009 |
| 1002 /* Finds the given UTF-8 text starting at the current selection. The number of | 1010 /* Finds the given UTF-8 text starting at the current selection. The number of |
| 1003 * results will be updated asynchronously via numberOfFindResultsChanged. Note | 1011 * results will be updated asynchronously via numberOfFindResultsChanged. Note |
| 1004 * that multiple StartFind calls can happen before StopFind is called in the | 1012 * that multiple StartFind calls can happen before StopFind is called in the |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1043 | 1051 |
| 1044 typedef struct _NPPExtensions { | 1052 typedef struct _NPPExtensions { |
| 1045 NPPGetPrintExtensionsPtr getPrintExtensions; | 1053 NPPGetPrintExtensionsPtr getPrintExtensions; |
| 1046 NPPGetFindExtensionsPtr getFindExtensions; | 1054 NPPGetFindExtensionsPtr getFindExtensions; |
| 1047 NPPZoomPtr zoom; | 1055 NPPZoomPtr zoom; |
| 1048 NPPWidgetPropertyChangedPtr widgetPropertyChanged; | 1056 NPPWidgetPropertyChangedPtr widgetPropertyChanged; |
| 1049 NPPCopyPtr copy; | 1057 NPPCopyPtr copy; |
| 1050 } NPPExtensions; | 1058 } NPPExtensions; |
| 1051 | 1059 |
| 1052 #endif /* _NP_EXTENSIONS_H_ */ | 1060 #endif /* _NP_EXTENSIONS_H_ */ |
| OLD | NEW |