layout/generic/nsPluginUtilsOSX.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/generic/nsPluginUtilsOSX.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,37 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +// vim:set ts=2 sts=2 sw=2 et cin:
     1.6 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.9 +
    1.10 +// We can use Carbon in this header but not Cocoa. Cocoa pointers must be void.
    1.11 +
    1.12 +#ifndef __LP64__
    1.13 +#import <Carbon/Carbon.h>
    1.14 +#endif
    1.15 +
    1.16 +#include "nsIWidget.h"
    1.17 +#include "npapi.h"
    1.18 +
    1.19 +struct nsRect;
    1.20 +
    1.21 +// We use void pointers to avoid exporting native event types to cross-platform code.
    1.22 +
    1.23 +#ifndef __LP64__
    1.24 +// Get the rect for an entire top-level Carbon window in screen coords.
    1.25 +void NS_NPAPI_CarbonWindowFrame(WindowRef aWindow, nsRect& outRect);
    1.26 +#endif
    1.27 +
    1.28 +// Get the rect for an entire top-level Cocoa window in screen coords.
    1.29 +void NS_NPAPI_CocoaWindowFrame(void* aWindow, nsRect& outRect);
    1.30 +
    1.31 +// Returns whether or not a Cocoa NSWindow has main status.
    1.32 +bool NS_NPAPI_CocoaWindowIsMain(void* aWindow);
    1.33 +
    1.34 +// Puts up a Cocoa context menu (NSMenu) for a particular NPCocoaEvent.
    1.35 +NPError NS_NPAPI_ShowCocoaContextMenu(void* menu, nsIWidget* widget, NPCocoaEvent* event);
    1.36 +
    1.37 +NPBool NS_NPAPI_ConvertPointCocoa(void* inView,
    1.38 +                                  double sourceX, double sourceY, NPCoordinateSpace sourceSpace,
    1.39 +                                  double *destX, double *destY, NPCoordinateSpace destSpace);
    1.40 +

mercurial