Skip to content

Commit 2bc0410

Browse files
committed
add back nw_tray.idl and nw_menuitem.idl
1 parent b57ca0f commit 2bc0410

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

src/api/nw_menuitem.idl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Copyright 2019 The NW.js Authors. All rights reserved.
2+
// Use of this source code is governed by a MIT-style license that can be
3+
// found in the LICENSE file.
4+
5+
namespace nw.MenuItem {
6+
interface Functions {
7+
};
8+
};

src/api/nw_tray.idl

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Copyright 2015 The NW.js Authors. All rights reserved.
2+
// Use of this source code is governed by a MIT-style license that can be
3+
// found in the LICENSE file.
4+
5+
// nw Tray API
6+
namespace nw.Tray {
7+
callback EventCallback = void();
8+
[noinline_doc] dictionary Tray {
9+
[nodoc] DOMString? title;
10+
DOMString tooltip;
11+
DOMString icon;
12+
DOMString alticon;
13+
boolean iconsAreTemplates;
14+
object menu;
15+
object click;
16+
static void remove();
17+
static void on(DOMString event,
18+
EventCallback callback);
19+
};
20+
interface Functions {
21+
[nocompile] static object create(optional object options);
22+
[nocompile] static void destroy(long id);
23+
};
24+
};

src/api/schemas.gni

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@ schema_sources = [
1515
"nw_window.idl",
1616
"nw_clipboard.idl",
1717
"nw_menu.idl",
18+
"nw_menuitem.idl",
1819
"nw_screen.idl",
1920
"nw_shell.idl",
2021
"nw_shortcut.idl",
2122
"nw_current_window_internal.idl",
2223
"nw_test.idl",
24+
"nw_tray.idl"
2325
]
2426

2527
root_namespace = "extensions::nwapi::%(namespace)s"

0 commit comments

Comments
 (0)