OLD | NEW |
1 /* ***** BEGIN LICENSE BLOCK ***** | 1 /* ***** BEGIN LICENSE BLOCK ***** |
2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
3 * | 3 * |
4 * The contents of this file are subject to the Mozilla Public License Version | 4 * The contents of this file are subject to the Mozilla Public License Version |
5 * 1.1 (the "License"); you may not use this file except in compliance with | 5 * 1.1 (the "License"); you may not use this file except in compliance with |
6 * the License. You may obtain a copy of the License at | 6 * the License. You may obtain a copy of the License at |
7 * http://www.mozilla.org/MPL/ | 7 * http://www.mozilla.org/MPL/ |
8 * | 8 * |
9 * Software distributed under the License is distributed on an "AS IS" basis, | 9 * Software distributed under the License is distributed on an "AS IS" basis, |
10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | 10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 #endif | 430 #endif |
431 , NPNVsupportsCoreGraphicsBool = 2001 | 431 , NPNVsupportsCoreGraphicsBool = 2001 |
432 , NPNVsupportsOpenGLBool = 2002 /* TRUE if the browser supports the OpenGL dra
wing model (CGL on Mac) */ | 432 , NPNVsupportsOpenGLBool = 2002 /* TRUE if the browser supports the OpenGL dra
wing model (CGL on Mac) */ |
433 , NPNVsupportsCoreAnimationBool = 2003 /* TRUE if the browser supports the Cor
eAnimation drawing model */ | 433 , NPNVsupportsCoreAnimationBool = 2003 /* TRUE if the browser supports the Cor
eAnimation drawing model */ |
434 | 434 |
435 #ifndef NP_NO_CARBON | 435 #ifndef NP_NO_CARBON |
436 , NPNVsupportsCarbonBool = 3000 /* TRUE if the browser supports the Carbon eve
nt model */ | 436 , NPNVsupportsCarbonBool = 3000 /* TRUE if the browser supports the Carbon eve
nt model */ |
437 #endif | 437 #endif |
438 , NPNVsupportsCocoaBool = 3001 /* TRUE if the browser supports the Cocoa event
model */ | 438 , NPNVsupportsCocoaBool = 3001 /* TRUE if the browser supports the Cocoa event
model */ |
439 #endif | 439 #endif |
440 #ifdef PEPPER_APIS_ENABLED | |
441 /* | |
442 * Note: these APIs have not been ratified by Mozilla, et al. | |
443 * Until they are, they need to be distinct values from other enum | |
444 * elements here. | |
445 */ | |
446 , NPNVPepperExtensions = 4000 /* A pointer to an NPPepperExtensions structure
*/ | |
447 #endif | |
448 } NPNVariable; | 440 } NPNVariable; |
449 | 441 |
450 typedef enum { | 442 typedef enum { |
451 NPNURLVCookie = 501, | 443 NPNURLVCookie = 501, |
452 NPNURLVProxy | 444 NPNURLVProxy |
453 } NPNURLVariable; | 445 } NPNURLVariable; |
454 | 446 |
455 /* BEGIN GOOGLE MODIFICATIONS */ | 447 /* BEGIN GOOGLE MODIFICATIONS */ |
456 /* | 448 /* |
457 * The type of Tookkit the widgets use | 449 * The type of Tookkit the widgets use |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 #endif | 600 #endif |
609 | 601 |
610 typedef enum { | 602 typedef enum { |
611 NPCoordinateSpacePlugin = 1, | 603 NPCoordinateSpacePlugin = 1, |
612 NPCoordinateSpaceWindow, | 604 NPCoordinateSpaceWindow, |
613 NPCoordinateSpaceFlippedWindow, | 605 NPCoordinateSpaceFlippedWindow, |
614 NPCoordinateSpaceScreen, | 606 NPCoordinateSpaceScreen, |
615 NPCoordinateSpaceFlippedScreen | 607 NPCoordinateSpaceFlippedScreen |
616 } NPCoordinateSpace; | 608 } NPCoordinateSpace; |
617 | 609 |
618 #if !defined(PEPPER_APIS_ENABLED) | |
619 #if defined(XP_MAC) || defined(XP_MACOSX) | 610 #if defined(XP_MAC) || defined(XP_MACOSX) |
620 | 611 |
621 #ifndef NP_NO_CARBON | 612 #ifndef NP_NO_CARBON |
622 typedef EventRecord NPEvent; | 613 typedef EventRecord NPEvent; |
623 #endif | 614 #endif |
624 | 615 |
625 #elif defined(XP_WIN) | 616 #elif defined(XP_WIN) |
626 typedef struct _NPEvent | 617 typedef struct _NPEvent |
627 { | 618 { |
628 uint16 event; | 619 uint16 event; |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 | 730 |
740 #ifdef OBSOLETE | 731 #ifdef OBSOLETE |
741 #define getFocusEvent (osEvt + 16) | 732 #define getFocusEvent (osEvt + 16) |
742 #define loseFocusEvent (osEvt + 17) | 733 #define loseFocusEvent (osEvt + 17) |
743 #define adjustCursorEvent (osEvt + 18) | 734 #define adjustCursorEvent (osEvt + 18) |
744 #endif | 735 #endif |
745 /* END GOOGLE MODIFICATIONS */ | 736 /* END GOOGLE MODIFICATIONS */ |
746 | 737 |
747 #endif /* XP_MACOSX */ | 738 #endif /* XP_MACOSX */ |
748 | 739 |
| 740 #if !defined(PEPPER_APIS_ENABLED) |
749 /* Stub typedefs for interfaces requiring Pepper types. */ | 741 /* Stub typedefs for interfaces requiring Pepper types. */ |
750 typedef int NPRenderType; | 742 typedef int NPRenderType; |
751 typedef struct _NPRenderContext NPRenderContext; | 743 typedef struct _NPRenderContext NPRenderContext; |
752 typedef struct _NPPepperExtensions NPPepperExtensions; | 744 typedef struct _NPPepperExtensions NPPepperExtensions; |
753 | |
754 #else /* defined(PEPPER_APIS_ENABLED) */ | |
755 typedef enum { | |
756 NPMouseButton_None = -1, | |
757 NPMouseButton_Left = 0, | |
758 NPMouseButton_Middle = 1, | |
759 NPMouseButton_Right = 2, | |
760 } NPMouseButtons; | |
761 | |
762 typedef enum { | |
763 NPEventType_Undefined = -1, | |
764 NPEventType_MouseDown = 0, | |
765 NPEventType_MouseUp = 1, | |
766 NPEventType_MouseMove = 2, | |
767 NPEventType_MouseEnter = 3, | |
768 NPEventType_MouseLeave = 4, | |
769 NPEventType_MouseWheel = 5, | |
770 NPEventType_RawKeyDown = 6, | |
771 NPEventType_KeyDown = 7, | |
772 NPEventType_KeyUp = 8, | |
773 NPEventType_Char = 9, | |
774 NPEventType_Minimize = 10, | |
775 NPEventType_Focus = 11, | |
776 NPEventType_Device = 12 | |
777 } NPEventTypes; | |
778 | |
779 typedef enum { | |
780 NPEventModifier_ShiftKey = 1 << 0, | |
781 NPEventModifier_ControlKey = 1 << 1, | |
782 NPEventModifier_AltKey = 1 << 2, | |
783 NPEventModifier_MetaKey = 1 << 3, | |
784 NPEventModifier_IsKeyPad = 1 << 4, | |
785 NPEventModifier_IsAutoRepeat = 1 << 5, | |
786 NPEventModifier_LeftButtonDown = 1 << 6, | |
787 NPEventModifier_MiddleButtonDown = 1 << 7, | |
788 NPEventModifier_RightButtonDown = 1 << 8 | |
789 } NPEventModifiers; | |
790 | |
791 typedef struct _NPKeyEvent | |
792 { | |
793 uint32 modifier; | |
794 uint32 normalizedKeyCode; | |
795 } NPKeyEvent; | |
796 | |
797 typedef struct _NPCharacterEvent | |
798 { | |
799 uint32 modifier; | |
800 uint16 text[4]; | |
801 uint16 unmodifiedText[4]; | |
802 } NPCharacterEvent; | |
803 | |
804 typedef struct _NPMouseEvent | |
805 { | |
806 uint32 modifier; | |
807 int32 button; | |
808 int32 x; | |
809 int32 y; | |
810 int32 clickCount; | |
811 } NPMouseEvent; | |
812 | |
813 typedef struct _NPMouseWheelEvent | |
814 { | |
815 uint32 modifier; | |
816 float deltaX; | |
817 float deltaY; | |
818 float wheelTicksX; | |
819 float wheelTicksY; | |
820 uint32 scrollByPage; | |
821 } NPMouseWheelEvent; | |
822 | |
823 typedef struct _NPDeviceEvent { | |
824 uint32 device_uid; | |
825 uint32 subtype; | |
826 /* uint8 generic[0]; */ | |
827 } NPDeviceEvent; | |
828 | |
829 typedef struct _NPMinimizeEvent { | |
830 int32 value; | |
831 } NPMinimizeEvent; | |
832 | |
833 typedef struct _NPFocusEvent { | |
834 int32 value; | |
835 } NPFocusEvent; | |
836 | |
837 typedef struct _NPEvent | |
838 { | |
839 uint32 size; | |
840 int32 type; | |
841 double timeStampSeconds; | |
842 union { | |
843 NPKeyEvent key; | |
844 NPCharacterEvent character; | |
845 NPMouseEvent mouse; | |
846 NPMouseWheelEvent wheel; | |
847 NPMinimizeEvent minimize; | |
848 NPFocusEvent focus; | |
849 NPDeviceEvent device; | |
850 } u; | |
851 } NPEvent; | |
852 | |
853 typedef struct _NPRegion | |
854 { | |
855 int32 x; | |
856 int32 y; | |
857 int32 w; | |
858 int32 h; | |
859 } NPRegion; | |
860 | |
861 typedef enum _NPRenderType | |
862 { | |
863 NPRenderGraphicsRGBA | |
864 } NPRenderType; | |
865 | |
866 typedef struct _NPRenderContext | |
867 { | |
868 union { | |
869 struct { | |
870 void* region; | |
871 int32 stride; | |
872 } graphicsRgba; | |
873 } u; | |
874 } NPRenderContext; | |
875 | |
876 typedef void (*NPFlushRenderContextCallbackPtr)(NPRenderContext* context, | |
877
NPError err, | |
878 void* userData); | |
879 typedef NPError (*NPInitializeRenderContextPtr)(NPP instance, | |
880 NPRenderType type, | |
881 NPRenderContext* context); | |
882 typedef NPError (*NPFlushRenderContextPtr)(NPP instance, | |
883 NPRenderContext* context, | |
884 NPFlushRenderContextCallbackPtr callb
ack, | |
885 void* userData); | |
886 typedef NPError (*NPDestroyRenderContextPtr)(NPP instance, | |
887 NPRenderContext* context); | |
888 | |
889 typedef struct _NPPepperExtensions | |
890 { | |
891 /* Renderer extensions */ | |
892 NPInitializeRenderContextPtr initializeRender; | |
893 NPFlushRenderContextPtr flushRender; | |
894 NPDestroyRenderContextPtr destroyRender; | |
895 /* Shared memory extensions */ | |
896 } NPPepperExtensions; | |
897 | |
898 #endif /* defined(PEPPER_APIS_ENABLED) */ | 745 #endif /* defined(PEPPER_APIS_ENABLED) */ |
899 | 746 |
900 /* | 747 /* |
901 * Values for mode passed to NPP_New: | 748 * Values for mode passed to NPP_New: |
902 */ | 749 */ |
903 #define NP_EMBED 1 | 750 #define NP_EMBED 1 |
904 #define NP_FULL 2 | 751 #define NP_FULL 2 |
905 | 752 |
906 /* | 753 /* |
907 * Values for stream type passed to NPP_NewStream: | 754 * Values for stream type passed to NPP_NewStream: |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1077 uint32 NPN_ScheduleTimer(NPP instance, uint32 interval, NPBool repeat, void
(*timerFunc)(NPP npp, uint32 timerID)); | 924 uint32 NPN_ScheduleTimer(NPP instance, uint32 interval, NPBool repeat, void
(*timerFunc)(NPP npp, uint32 timerID)); |
1078 void NPN_UnscheduleTimer(NPP instance, uint32 timerID); | 925 void NPN_UnscheduleTimer(NPP instance, uint32 timerID); |
1079 NPError NPN_PopUpContextMenu(NPP instance, NPMenu* menu); | 926 NPError NPN_PopUpContextMenu(NPP instance, NPMenu* menu); |
1080 NPBool NPN_ConvertPoint(NPP instance, double sourceX, double sourceY, NPCoo
rdinateSpace sourceSpace, double *destX, double *destY, NPCoordinateSpace destSp
ace); | 927 NPBool NPN_ConvertPoint(NPP instance, double sourceX, double sourceY, NPCoo
rdinateSpace sourceSpace, double *destX, double *destY, NPCoordinateSpace destSp
ace); |
1081 | 928 |
1082 #ifdef __cplusplus | 929 #ifdef __cplusplus |
1083 } /* end extern "C" */ | 930 } /* end extern "C" */ |
1084 #endif | 931 #endif |
1085 | 932 |
1086 #endif /* _NPAPI_H_ */ | 933 #endif /* _NPAPI_H_ */ |
OLD | NEW |