widget/cocoa/nsStandaloneNativeMenu.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/widget/cocoa/nsStandaloneNativeMenu.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,32 @@
     1.4 +/* -*- Mode: c++; tab-width: 2; indent-tabs-mode: nil; -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#ifndef nsStandaloneNativeMenu_h_
    1.10 +#define nsStandaloneNativeMenu_h_
    1.11 +
    1.12 +#include "nsMenuGroupOwnerX.h"
    1.13 +#include "nsMenuX.h"
    1.14 +#include "nsIStandaloneNativeMenu.h"
    1.15 +
    1.16 +class nsStandaloneNativeMenu : public nsMenuGroupOwnerX, public nsIStandaloneNativeMenu
    1.17 +{
    1.18 +public:
    1.19 +  nsStandaloneNativeMenu();
    1.20 +  virtual ~nsStandaloneNativeMenu();
    1.21 +
    1.22 +  NS_DECL_ISUPPORTS  
    1.23 +  NS_DECL_NSISTANDALONENATIVEMENU
    1.24 +
    1.25 +  // nsMenuObjectX
    1.26 +  nsMenuObjectTypeX MenuObjectType() { return eStandaloneNativeMenuObjectType; }
    1.27 +  void * NativeData() { return mMenu != nullptr ? mMenu->NativeData() : nullptr; }
    1.28 +
    1.29 +  nsMenuX * GetMenuXObject() { return mMenu; }
    1.30 +
    1.31 +protected:
    1.32 +  nsMenuX * mMenu;
    1.33 +};
    1.34 +
    1.35 +#endif

mercurial