Changes

Jump to: navigation, search

NPAPI:Pepper

1,611 bytes added, 04:35, 30 March 2010
Themes
= Themes =
 
<pre>
typedef struct _NPPoint {
uint16 x;
uint16 y;
} NPPoint;
 
typedef enum {
NPThemeItemScrollbarDownArrow = 0,
NPThemeItemScrollbarLeftArrow = 1,
NPThemeItemScrollbarRightArrow = 2,
NPThemeItemScrollbarUpArrow = 3,
NPThemeItemScrollbarHorizontalThumb = 4,
NPThemeItemScrollbarVerticalThumb = 5,
NPThemeItemScrollbarHoriztonalTrack = 6,
NPThemeItemScrollbarVerticalTrack = 7
} NPThemeItem;
 
typedef enum {
NPThemeStateDisabled = 0,
// Mouse is over this item.
NPThemeStateHot = 1,
// Mouse is over another part of this component. This is only used on Windows
// Vista and above. The plugin should pass it in, and the host will convert
// it to NPThemeStateNormal if on other platforms or on Windows XP.
NPThemeStateHover = 2,
NPThemeStateNormal = 3,
NPThemeStatePressed = 4
} NPThemeState;
 
typedef struct _NPThemeParams {
NPThemeItem item;
NPThemeState state;
NPRect location;
// Used for scroll bar tracks, needed for classic theme in Windows which draws
// a checkered pattern.
NPPoint align;
} NPThemeParams;
 
/* Gets the size of the given theme component. For variable sized items like */
/* vertical scrollbar tracks, the width will be the required width of the */
/* track while the height will be the minimum height. */
typedef NPError (*NPDeviceThemeGetSize)(
NPP instance,
NPThemeItem item,
int* width,
int* height);
/* Draw a themed item (i.e. scrollbar arrow). */
typedef NPError (*NPDeviceThemePaint)(
NPP instance,
NPDeviceContext* context,
NPThemeParams* params);
 
</pre>
89
edits

Navigation menu