Search completed in 1.45 seconds.
10 results for "np_port":
NP_Port - Archive of obsolete content
Archive › Plugins › Reference › NP Port
<< Gecko Plugin API Reference << Plug-in Side Plug-in API Summary Used on Mac OS only Contains information required by the window field of an NPWindow structure. Syntax typedef struct NP_Port { CGrafPtr port; /* Grafport */ int32 portx; /* position inside the topmost window */ int32 porty; } NP_Port; Fields The data structure has the following fields: port Standard Mac OS port into which the plug-in should draw. portx, porty Top-left corner of the plug-in rectangle in port coordinates (taking the scroll position into account). ...
...nt32 portx; /* position inside the topmost window */ int32 porty; } NP_Port; Fields The data structure has the following fields: port Standard Mac OS port into which the plug-in should draw. portx, porty Top-left corner of the plug-in rectangle in port coordinates (taking the scroll position into account). Description On Mac OS, the window field of an NPWindow structure points to an NP_Port object, which is allocated by the browser. The NP_Port is valid for the lifetime of the NPWindow, that is, until NPP_SetWindow is called again with a different value or the instance is destroyed. Since the port is shared between the plug-in and other plug-ins and the browser, the plug-in should always do the following: Draw only within the area designated by the NPWindow. Save the current port...
Drawing and Event Handling - Plugins
Plugins › Guide › Drawing and Event Handling
ect; /* Clipping rectangle in port coordinates */ #ifdef XP_UNIX void * ws_info; /* Platform-dependent additional data */ #endif /* XP_UNIX */ NPWindowType type; /* Whether this is a window or a drawable */ } NPWindow; The window parameter is a platform-specific handle to a native window element in the browser window hierarchy on Windows and Unix. On Mac OS, window is a pointer to an NP_Port. The x and y fields specify the top-left corner of the plug-in relative to the page. The width and height fields specify the dimensions of the plug-in area. These values should not be modified by the plug-in. The clipRect field defines the clipping rectangle of the plug-in in a coordinate system where the origin is the top-left corner of the drawable or window. The browser calls NPP_SetWindow ...
...plugins, a clipRect of 0,0,0,0 signals that the plugin is not visible. The type field indicates the NPWindow type of the target area: NPWindowTypeWindow: Windowed plug-in. The window field holds a platform-specific handle to a window. NPWindowTypeDrawable: Windowless plug-in. The window field holds a platform-specific handle to a drawable, as follows: Windows: HDC Mac OS: pointer to NP_Port structure. Unix/X11: not used. (The drawable is provided in the paint message. See below.) In both cases, the drawable can be an off-screen pixmap. Drawing Plug-ins This section describes the methods and processes you use in drawing both windowed and windowless plug-ins. Processes that apply to only one of these plug-in types are described in the following sections. The plug-in uses ...
...rameter is a pointer to the drawing target for the plug-in. For windowless plug-ins, the platform-specific window information specified in window->window is a platform-specific handle to a drawable. MS Windows and Unix For windowed plug-ins on MS Windows and Unix, the window->window field is a handle to a subwindow of the Netscape window hierarchy. Mac OS The window->window field points to an NP_Port structure. Getting Information To receive information from the browser, the plug-in calls the NPN_GetValue method. NPError NPN_GetValue(NPP instance, NPNVariable variable, void *value); The instance parameter represents the current plug-in. Unix and MS Windows The queried information is returned in the variable parameter. This parameter is valid only for the Unix and MS Windows platforms. ...
...iple times with different values for the window, including null. For example, if a user removes an instance from the page, the browser should call NPP_SetWindow with a window value of null. This value prevents the instance from drawing further until it is pasted back on the page and NPP_SetWindow is called again with a new value. Mac OS Windows Unix Mac OS On Mac OS, the browser passes an NP_Port structure in the window field of the NPWindow structure. This structure contains a pointer to the graphics port (CGraphPtr) into which the plug-in instance should draw and the x - and y - coordinates of the upper-left corner of this port. The plug-in can use these coordinates to call SetOrigin(portx, porty) to place the upper-left corner of its rectangle at (0,0). The Mac OS GrafPort structure's ...
NPWindow - Archive of obsolete content
Archive › Plugins › Reference › NPWindow
*/ #ifdef XP_UNIX void * ws_info; /* Platform-dependent additional data */ #endif /* XP_UNIX */ NPWindowType type; /* Window or drawable target */ } NPWindow; Fields The data structure has the following fields: window Platform-specific handle to a native window element in the Netscape window hierarchy on Windows (HWND) and Unix (X Window ID). Mac OS: window is a pointer to an NP_Port. x, y The x and y coordinates for the top left corner of the plug-in relative to the page (and thus relative to the origin of the drawable). Should not be modified by the plug-in. height, width The height and width of the plug-in area. Should not be modified by the plug-in. clipRect Clipping rectangle of the plug-in; the origin is the top left corner of the drawable or window. Clip...
...le. Values: NPWindowTypeWindow: Indicates that the window field holds a platform-specific handle to a window (as in Navigator 2.0 and Navigator 3.0). The plug-in is considered windowed. NPWindowTypeDrawable: Indicates that the plugin is windowless. The window field holds a platform-specific handle to a drawable or an off-screen pixmap, as follows: Windows: HDC Mac OS: pointer to NP_Port structure Unix/X11: not used. (The drawable is provided in a GraphicsExpose event, when the paint is requested.) Description The NPWindow structure represents the native window or a drawable, and contains information about coordinate position, size, whether the plug-in is windowed or windowless, and some platform-specific information. The plug-in area is a native window element ...
...n with a different window or the instance is destroyed. ...
NPP_SetWindow - Archive of obsolete content
Archive › Plugins › Reference › NPP SetWindow
Window is an NPWindow object, which contains the coordinates of the instance's area and various platform-specific data. This window is valid for the life of the instance, or until NPP_SetWindow is called again with a different value. For windowed plug-ins on Windows and Unix, the window parameter contains a handle to a subwindow of the browser window hierarchy. On Mac OS, this field points to an NP_Port structure. For windowless plug-ins, it is a platform-specific handle to a drawable. Before setting the window parameter to point to a new window, it is a good idea to compare the information about the new window to the previous window (if one existed) to account for any changes. For windowless plugins, NPP_SetWindow is called with a clipRect of 0,0,0,0 to signal that the plugin is not visible. ...
...new window to the previous window (if one existed) to account for any changes. For windowless plugins, NPP_SetWindow is called with a clipRect of 0,0,0,0 to signal that the plugin is not visible. NOTE: NPP_SetWindow is useful only for embedded (NP_EMBED) or full-screen (NP_FULL) plug-ins, which are drawn into windows. It is irrelevant for hidden plug-ins. See Also NPP_HandleEvent, NPWindow, NP_Port ...
Index - Archive of obsolete content
Archive › Index
cription returns a supported MIME Type list for your plugin. It works on Unix (Linux) and MacOS. On Windows you have to define supported mimetypes in the dll resource file. 3704 NP_GetValue NPAPI, Plugins Allows the browser to query the plug-in for information. 3705 NP_Initialize NPAPI, Plugins Provides global initialization for a plug-in. 3706 NP_Port NPAPI, Plugins Contains information required by the window field of an NPWindow structure. 3707 NP_Shutdown NPAPI, Plugins Provides global deinitialization for a plug-in. 3708 Samples and Test Cases Add-ons, NeedsContent, Plugins Collections of NPAPI plugin samples can be found in the Seamonkey source code at /modules/plugin/sdk/samples. ...
Index of archived content - Archive of obsolete content
Archive › Index of archived content
NPP_WriteReady NPPrint NPPrintCallbackStruct NPRect NPRegion NPSavedData NPSetWindowCallbackStruct NPStream NPString NPUTF8 NPVariant NPVariantType NPWindow NP_GetMIMEDescription NP_GetValue NP_Initialize NP_Port NP_Shutdown Samples and Test Cases Shipping a plugin as a Toolkit bundle Supporting private browsing in plugins The First Install Problem Writing a plugin for Mac OS X XEmbed Extension for Mozilla Plugins SAX Security Digital Signatures ...
NPEmbedPrint - Archive of obsolete content
Archive › Plugins › Reference › NPEmbedPrint
intCallbackStruct. ...
NPAPI plugin reference - Archive of obsolete content
Archive › Plugins › Reference
e implemented by the browser and called by the plug-in. NP_GetMIMEDescription NP_GetMIMEDescription returns a supported MIME Type list for your plugin. It works on Unix (Linux) and MacOS. On Windows you have to define supported mimetypes in the dll resource file. NP_GetValue Allows the browser to query the plug-in for information. NP_Initialize Provides global initialization for a plug-in. NP_Port Contains information required by the window field of an NPWindow structure. NP_Shutdown Provides global deinitialization for a plug-in. NPAnyCallbackStruct Contains information required during embedded mode printing. NPAPI plug-in side API This chapter describes methods in the plug-in API that are available from the plug-in object; these allow plug-ins to interact with the browser. The nam...
Structures - Plugins
Plugins › Guide › Structures
rint Substructure of NPPrint that contains platform-specific information used during embedded mode printing. NPEvent Represents an event passed by NPP_HandleEvent to a windowless plug-in. NPFullPrint Substructure of NPPrint that contains platform-specific information used during full-page mode printing. NPP Represents a single instance of a plug-in. NP_Port Contains information required by the window field of an NPWindow structure. NPPrint Contains information the plug-in needs to print itself in full-page or embedded mode. NPPrintCallbackStruct Contains information required by the platformPrint field of the NPEmbedPrint during embedded mode printing. NPRect Represents a rectangular area of a page. NPR...
Gecko Plugin API Reference - Plugins
Plugins › Guide
ifier NPObject NPN_CreateObject NPN_RetainObject NPN_ReleaseObject NPN_Invoke NPN_InvokeDefault NPN_Evaluate NPN_GetProperty NPN_SetProperty NPN_RemoveProperty NPN_HasProperty NPN_HasMethod NPN_SetException NPClass Structures NPAnyCallbackStruct NPByteRange NPEmbedPrint NPEvent NPFullPrint NPP NP_Port NPPrint NPPrintCallbackStruct NPRect NPRegion NPSavedData NPSetWindowCallbackStruct NPStream NPWindow Constants Error Codes Result Codes Plug-in Version Constants Version Feature Constants External resources External projects and articles for plugin creation Original document information Copyright Information: Netscape Communication ...