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/. */
7 // We can use Carbon in this header but not Cocoa. Cocoa pointers must be void.
10 #import <Carbon/Carbon.h>
13 #include "nsIWidget.h"
18 // We use void pointers to avoid exporting native event types to cross-platform code.
21 // Get the rect for an entire top-level Carbon window in screen coords.
22 void NS_NPAPI_CarbonWindowFrame(WindowRef aWindow
, nsRect
& outRect
);
25 // Get the rect for an entire top-level Cocoa window in screen coords.
26 void NS_NPAPI_CocoaWindowFrame(void* aWindow
, nsRect
& outRect
);
28 // Returns whether or not a Cocoa NSWindow has main status.
29 bool NS_NPAPI_CocoaWindowIsMain(void* aWindow
);
31 // Puts up a Cocoa context menu (NSMenu) for a particular NPCocoaEvent.
32 NPError
NS_NPAPI_ShowCocoaContextMenu(void* menu
, nsIWidget
* widget
, NPCocoaEvent
* event
);
34 NPBool
NS_NPAPI_ConvertPointCocoa(void* inView
,
35 double sourceX
, double sourceY
, NPCoordinateSpace sourceSpace
,
36 double *destX
, double *destY
, NPCoordinateSpace destSpace
);