gtk: Add dummy implementation of Menu.
This commit is contained in:
Родитель
521fb7d54c
Коммит
426e7645bc
2
atom.gyp
2
atom.gyp
|
@ -51,6 +51,8 @@
|
|||
'browser/api/atom_api_event.h',
|
||||
'browser/api/atom_api_menu.cc',
|
||||
'browser/api/atom_api_menu.h',
|
||||
'browser/api/atom_api_menu_gtk.cc',
|
||||
'browser/api/atom_api_menu_gtk.h',
|
||||
'browser/api/atom_api_menu_mac.h',
|
||||
'browser/api/atom_api_menu_mac.mm',
|
||||
'browser/api/atom_api_menu_win.cc',
|
||||
|
|
|
@ -69,7 +69,7 @@ class Menu : public EventEmitter,
|
|||
|
||||
static void Popup(const v8::FunctionCallbackInfo<v8::Value>& args);
|
||||
|
||||
#if defined(OS_WIN)
|
||||
#if defined(OS_WIN) || defined(TOOLKIT_GTK)
|
||||
static void AttachToWindow(const v8::FunctionCallbackInfo<v8::Value>& args);
|
||||
#elif defined(OS_MACOSX)
|
||||
static void SetApplicationMenu(
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
// Copyright (c) 2014 GitHub, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "browser/api/atom_api_menu_gtk.h"
|
||||
|
||||
namespace atom {
|
||||
|
||||
namespace api {
|
||||
|
||||
MenuGtk::MenuGtk(v8::Handle<v8::Object> wrapper)
|
||||
: Menu(wrapper) {
|
||||
}
|
||||
|
||||
MenuGtk::~MenuGtk() {
|
||||
}
|
||||
|
||||
void MenuGtk::Popup(NativeWindow* native_window) {
|
||||
}
|
||||
|
||||
// static
|
||||
void Menu::AttachToWindow(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||
}
|
||||
|
||||
// static
|
||||
Menu* Menu::Create(v8::Handle<v8::Object> wrapper) {
|
||||
return new MenuGtk(wrapper);
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace atom
|
|
@ -0,0 +1,30 @@
|
|||
// Copyright (c) 2014 GitHub, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef ATOM_BROWSER_API_ATOM_API_MENU_GTK_H_
|
||||
#define ATOM_BROWSER_API_ATOM_API_MENU_GTK_H_
|
||||
|
||||
#include "browser/api/atom_api_menu.h"
|
||||
|
||||
namespace atom {
|
||||
|
||||
namespace api {
|
||||
|
||||
class MenuGtk : public Menu {
|
||||
public:
|
||||
explicit MenuGtk(v8::Handle<v8::Object> wrapper);
|
||||
virtual ~MenuGtk();
|
||||
|
||||
protected:
|
||||
virtual void Popup(NativeWindow* window) OVERRIDE;
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(MenuGtk);
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace atom
|
||||
|
||||
#endif // ATOM_BROWSER_API_ATOM_API_MENU_GTK_H_
|
Загрузка…
Ссылка в новой задаче