michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: // vim:set ts=2 sts=2 sw=2 et cin: michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: // We can use Carbon in this header but not Cocoa. Cocoa pointers must be void. michael@0: michael@0: #ifndef __LP64__ michael@0: #import michael@0: #endif michael@0: michael@0: #include "nsIWidget.h" michael@0: #include "npapi.h" michael@0: michael@0: struct nsRect; michael@0: michael@0: // We use void pointers to avoid exporting native event types to cross-platform code. michael@0: michael@0: #ifndef __LP64__ michael@0: // Get the rect for an entire top-level Carbon window in screen coords. michael@0: void NS_NPAPI_CarbonWindowFrame(WindowRef aWindow, nsRect& outRect); michael@0: #endif michael@0: michael@0: // Get the rect for an entire top-level Cocoa window in screen coords. michael@0: void NS_NPAPI_CocoaWindowFrame(void* aWindow, nsRect& outRect); michael@0: michael@0: // Returns whether or not a Cocoa NSWindow has main status. michael@0: bool NS_NPAPI_CocoaWindowIsMain(void* aWindow); michael@0: michael@0: // Puts up a Cocoa context menu (NSMenu) for a particular NPCocoaEvent. michael@0: NPError NS_NPAPI_ShowCocoaContextMenu(void* menu, nsIWidget* widget, NPCocoaEvent* event); michael@0: michael@0: NPBool NS_NPAPI_ConvertPointCocoa(void* inView, michael@0: double sourceX, double sourceY, NPCoordinateSpace sourceSpace, michael@0: double *destX, double *destY, NPCoordinateSpace destSpace); michael@0: