|
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
2 // vim:set ts=2 sts=2 sw=2 et cin: |
|
3 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
4 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
6 |
|
7 // We can use Carbon in this header but not Cocoa. Cocoa pointers must be void. |
|
8 |
|
9 #ifndef __LP64__ |
|
10 #import <Carbon/Carbon.h> |
|
11 #endif |
|
12 |
|
13 #include "nsIWidget.h" |
|
14 #include "npapi.h" |
|
15 |
|
16 struct nsRect; |
|
17 |
|
18 // We use void pointers to avoid exporting native event types to cross-platform code. |
|
19 |
|
20 #ifndef __LP64__ |
|
21 // Get the rect for an entire top-level Carbon window in screen coords. |
|
22 void NS_NPAPI_CarbonWindowFrame(WindowRef aWindow, nsRect& outRect); |
|
23 #endif |
|
24 |
|
25 // Get the rect for an entire top-level Cocoa window in screen coords. |
|
26 void NS_NPAPI_CocoaWindowFrame(void* aWindow, nsRect& outRect); |
|
27 |
|
28 // Returns whether or not a Cocoa NSWindow has main status. |
|
29 bool NS_NPAPI_CocoaWindowIsMain(void* aWindow); |
|
30 |
|
31 // Puts up a Cocoa context menu (NSMenu) for a particular NPCocoaEvent. |
|
32 NPError NS_NPAPI_ShowCocoaContextMenu(void* menu, nsIWidget* widget, NPCocoaEvent* event); |
|
33 |
|
34 NPBool NS_NPAPI_ConvertPointCocoa(void* inView, |
|
35 double sourceX, double sourceY, NPCoordinateSpace sourceSpace, |
|
36 double *destX, double *destY, NPCoordinateSpace destSpace); |
|
37 |