OLD | NEW |
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | 1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 /* ***** BEGIN LICENSE BLOCK ***** | 2 /* ***** BEGIN LICENSE BLOCK ***** |
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
4 * | 4 * |
5 * The contents of this file are subject to the Mozilla Public License Version | 5 * The contents of this file are subject to the Mozilla Public License Version |
6 * 1.1 (the "License"); you may not use this file except in compliance with | 6 * 1.1 (the "License"); you may not use this file except in compliance with |
7 * the License. You may obtain a copy of the License at | 7 * the License. You may obtain a copy of the License at |
8 * http://www.mozilla.org/MPL/ | 8 * http://www.mozilla.org/MPL/ |
9 * | 9 * |
10 * Software distributed under the License is distributed on an "AS IS" basis, | 10 * Software distributed under the License is distributed on an "AS IS" basis, |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 | 100 |
101 # ifndef XP_WIN | 101 # ifndef XP_WIN |
102 # define XP_WIN 1 | 102 # define XP_WIN 1 |
103 # endif /* XP_WIN */ | 103 # endif /* XP_WIN */ |
104 #endif /* _WINDOWS */ | 104 #endif /* _WINDOWS */ |
105 | 105 |
106 // BEGIN GOOGLE MODIFICATIONS | 106 // BEGIN GOOGLE MODIFICATIONS |
107 // On Linux and Mac, be sure to set Mozilla-specific macros. | 107 // On Linux and Mac, be sure to set Mozilla-specific macros. |
108 #if defined(OS_LINUX) | 108 #if defined(OS_LINUX) |
109 #define XP_UNIX 1 | 109 #define XP_UNIX 1 |
| 110 #define MOZ_X11 1 |
110 #elif defined(OS_MACOSX) | 111 #elif defined(OS_MACOSX) |
111 #ifndef XP_MACOSX | 112 #ifndef XP_MACOSX |
112 #define XP_MACOSX 1 | 113 #define XP_MACOSX 1 |
113 #endif | 114 #endif |
114 #endif | 115 #endif |
115 // END GOOGLE MODIFICATIONS | 116 // END GOOGLE MODIFICATIONS |
116 | 117 |
117 #ifdef __MWERKS__ | 118 #ifdef __MWERKS__ |
118 # define _declspec __declspec | 119 # define _declspec __declspec |
119 # ifdef __INTEL__ | 120 # ifdef __INTEL__ |
120 # undef NULL | 121 # undef NULL |
121 # ifndef XP_WIN | 122 # ifndef XP_WIN |
122 # define XP_WIN 1 | 123 # define XP_WIN 1 |
123 # endif /* XP_WIN */ | 124 # endif /* XP_WIN */ |
124 # endif /* __INTEL__ */ | 125 # endif /* __INTEL__ */ |
125 #endif /* __MWERKS__ */ | 126 #endif /* __MWERKS__ */ |
126 | 127 |
127 #ifdef XP_MACOSX | 128 #ifdef XP_MACOSX |
128 #include <Carbon/Carbon.h> | 129 #include <Carbon/Carbon.h> |
129 #ifdef __LP64__ | 130 #ifdef __LP64__ |
130 #define NP_NO_QUICKDRAW | 131 #define NP_NO_QUICKDRAW |
131 #endif | 132 #endif |
132 #endif | 133 #endif |
133 | 134 |
134 #if defined(XP_UNIX) | 135 #if defined(XP_UNIX) |
135 # include <stdio.h> | 136 # include <stdio.h> |
| 137 // BEGIN GOOGLE MODIFICATIONS |
| 138 #if 0 |
| 139 // END GOOGLE MODIFICATIONS |
136 # if defined(MOZ_X11) | 140 # if defined(MOZ_X11) |
137 # include <X11/Xlib.h> | 141 # include <X11/Xlib.h> |
138 # include <X11/Xutil.h> | 142 # include <X11/Xutil.h> |
139 # endif | 143 # endif |
| 144 // BEGIN GOOGLE MODIFICATIONS |
| 145 #endif |
| 146 // END GOOGLE MODIFICATIONS |
140 #endif | 147 #endif |
141 | 148 |
142 /*----------------------------------------------------------------------*/ | 149 /*----------------------------------------------------------------------*/ |
143 /* Plugin Version Constants */ | 150 /* Plugin Version Constants */ |
144 /*----------------------------------------------------------------------*/ | 151 /*----------------------------------------------------------------------*/ |
145 | 152 |
146 #define NP_VERSION_MAJOR 0 | 153 #define NP_VERSION_MAJOR 0 |
147 #define NP_VERSION_MINOR 19 | 154 #define NP_VERSION_MINOR 19 |
148 | 155 |
149 | 156 |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 enum { | 341 enum { |
335 NP_SETWINDOW = 1, | 342 NP_SETWINDOW = 1, |
336 NP_PRINT | 343 NP_PRINT |
337 }; | 344 }; |
338 | 345 |
339 typedef struct | 346 typedef struct |
340 { | 347 { |
341 int32 type; | 348 int32 type; |
342 } NPAnyCallbackStruct; | 349 } NPAnyCallbackStruct; |
343 | 350 |
344 typedef struct | 351 // BEGIN GOOGLE MODIFICATIONS |
345 { | 352 typedef struct _NPSetWindowCallbackStruct NPSetWindowCallbackStruct; |
346 int32 type; | 353 // END GOOGLE MODIFICATIONS |
347 #ifdef MOZ_X11 | |
348 Display* display; | |
349 Visual* visual; | |
350 Colormap colormap; | |
351 unsigned int depth; | |
352 #endif | |
353 } NPSetWindowCallbackStruct; | |
354 | 354 |
355 typedef struct | 355 typedef struct |
356 { | 356 { |
357 int32 type; | 357 int32 type; |
358 FILE* fp; | 358 FILE* fp; |
359 } NPPrintCallbackStruct; | 359 } NPPrintCallbackStruct; |
360 | 360 |
361 #endif /* XP_UNIX */ | 361 #endif /* XP_UNIX */ |
362 | 362 |
363 | 363 |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 uint32 lParam; | 557 uint32 lParam; |
558 } NPEvent; | 558 } NPEvent; |
559 #elif defined(XP_OS2) | 559 #elif defined(XP_OS2) |
560 typedef struct _NPEvent | 560 typedef struct _NPEvent |
561 { | 561 { |
562 uint32 event; | 562 uint32 event; |
563 uint32 wParam; | 563 uint32 wParam; |
564 uint32 lParam; | 564 uint32 lParam; |
565 } NPEvent; | 565 } NPEvent; |
566 #elif defined (XP_UNIX) && defined(MOZ_X11) | 566 #elif defined (XP_UNIX) && defined(MOZ_X11) |
| 567 // BEGIN GOOGLE MODIFICATIONS |
| 568 typedef union _XEvent XEvent; |
| 569 // END GOOGLE MODIFICATIONS |
567 typedef XEvent NPEvent; | 570 typedef XEvent NPEvent; |
568 #else | 571 #else |
569 typedef void* NPEvent; | 572 typedef void* NPEvent; |
570 #endif /* XP_MACOSX */ | 573 #endif /* XP_MACOSX */ |
571 | 574 |
572 #ifdef XP_MACOSX | 575 #ifdef XP_MACOSX |
573 typedef void* NPRegion; | 576 typedef void* NPRegion; |
574 #ifndef NP_NO_QUICKDRAW | 577 #ifndef NP_NO_QUICKDRAW |
575 typedef RgnHandle NPQDRegion; | 578 typedef RgnHandle NPQDRegion; |
576 #endif | 579 #endif |
577 typedef CGPathRef NPCGRegion; | 580 typedef CGPathRef NPCGRegion; |
578 #elif defined(XP_WIN) | 581 #elif defined(XP_WIN) |
579 typedef HRGN NPRegion; | 582 typedef HRGN NPRegion; |
580 #elif defined(XP_UNIX) && defined(MOZ_X11) | 583 #elif defined(XP_UNIX) && defined(MOZ_X11) |
| 584 // BEGIN GOOGLE MODIFICATIONS |
| 585 typedef struct _XRegion *Region; |
| 586 // END GOOGLE MODIFICATIONS |
581 typedef Region NPRegion; | 587 typedef Region NPRegion; |
582 #else | 588 #else |
583 typedef void *NPRegion; | 589 typedef void *NPRegion; |
584 #endif /* XP_MACOSX */ | 590 #endif /* XP_MACOSX */ |
585 | 591 |
586 #ifdef XP_MACOSX | 592 #ifdef XP_MACOSX |
587 /* | 593 /* |
588 * Mac-specific structures and definitions. | 594 * Mac-specific structures and definitions. |
589 */ | 595 */ |
590 | 596 |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
792 #ifdef __cplusplus | 798 #ifdef __cplusplus |
793 } /* end extern "C" */ | 799 } /* end extern "C" */ |
794 #endif | 800 #endif |
795 | 801 |
796 #endif /* RC_INVOKED */ | 802 #endif /* RC_INVOKED */ |
797 #ifdef __OS2__ | 803 #ifdef __OS2__ |
798 #pragma pack() | 804 #pragma pack() |
799 #endif | 805 #endif |
800 | 806 |
801 #endif /* _NPAPI_H_ */ | 807 #endif /* _NPAPI_H_ */ |
OLD | NEW |