plusui-native-core 0.1.105 → 0.1.106
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Core/.claude/settings.local.json +7 -0
- package/Core/CMakeLists.txt +1 -1
- package/Core/Features/API/app-api.ts +28 -28
- package/Core/Features/API/browser-api.ts +38 -38
- package/Core/Features/API/clipboard-api.ts +21 -21
- package/Core/Features/API/display-api.ts +33 -33
- package/Core/Features/API/keyboard-api.ts +33 -33
- package/Core/Features/API/menu-api.ts +39 -39
- package/Core/Features/API/router-api.ts +23 -23
- package/Core/Features/API/tray-api.ts +22 -22
- package/Core/Features/API/webgpu-api.ts +55 -55
- package/Core/Features/App/app.cpp +128 -102
- package/Core/Features/Browser/browser.cpp +227 -227
- package/Core/Features/Browser/browser.ts +161 -161
- package/Core/Features/Clipboard/clipboard.cpp +235 -235
- package/Core/Features/Display/display.cpp +212 -212
- package/Core/Features/FileDrop/filedrop.cpp +448 -324
- package/Core/Features/FileDrop/filedrop.css +421 -421
- package/Core/Features/FileDrop/filedrop.ts +0 -7
- package/Core/Features/Keyboard/keyboard_linux.cpp +4 -0
- package/Core/Features/Router/router.cpp +62 -62
- package/Core/Features/Router/router.ts +113 -113
- package/Core/Features/Tray/tray.cpp +328 -324
- package/Core/Features/WebGPU/webgpu.cpp +948 -948
- package/Core/Features/Window/webview.cpp +1009 -1009
- package/Core/Features/Window/webview.ts +516 -516
- package/Core/Features/Window/window.cpp +2240 -1986
- package/Core/include/plusui/api.hpp +237 -237
- package/Core/include/plusui/app.hpp +33 -33
- package/Core/include/plusui/browser.hpp +67 -67
- package/Core/include/plusui/clipboard.hpp +41 -41
- package/Core/include/plusui/connect.hpp +340 -340
- package/Core/include/plusui/connection.hpp +3 -3
- package/Core/include/plusui/display.hpp +90 -90
- package/Core/include/plusui/filedrop.hpp +92 -77
- package/Core/include/plusui/keyboard.hpp +112 -112
- package/Core/include/plusui/menu.hpp +153 -153
- package/Core/include/plusui/plusui +18 -18
- package/Core/include/plusui/router.hpp +42 -42
- package/Core/include/plusui/tray.hpp +94 -94
- package/Core/include/plusui/webgpu.hpp +434 -434
- package/Core/include/plusui/window.hpp +180 -177
- package/Core/scripts/generate-umbrella-header.mjs +77 -77
- package/Core/vendor/WebView2EnvironmentOptions.h +406 -406
- package/Core/vendor/webview.h +487 -487
- package/Core/vendor/webview2.h +52079 -52079
- package/README.md +19 -19
- package/package.json +1 -1
package/Core/CMakeLists.txt
CHANGED
|
@@ -231,7 +231,7 @@ else()
|
|
|
231
231
|
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
|
|
232
232
|
pkg_check_modules(WEBKIT2 REQUIRED webkit2gtk-4.0)
|
|
233
233
|
target_include_directories(plusui PRIVATE ${GTK3_INCLUDE_DIRS} ${WEBKIT2_INCLUDE_DIRS})
|
|
234
|
-
target_link_libraries(plusui PRIVATE ${GTK3_LIBRARIES} ${WEBKIT2_LIBRARIES})
|
|
234
|
+
target_link_libraries(plusui PRIVATE ${GTK3_LIBRARIES} ${WEBKIT2_LIBRARIES} X11)
|
|
235
235
|
endif()
|
|
236
236
|
|
|
237
237
|
install(TARGETS plusui ARCHIVE DESTINATION lib)
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* App API
|
|
3
|
-
*
|
|
4
|
-
* Application lifecycle management: version, paths, badge, and lifecycle events.
|
|
5
|
-
*
|
|
6
|
-
* Actions:
|
|
7
|
-
* app.invoke(name, args) - Call a named native method directly
|
|
8
|
-
* app.quit() - Quit the application
|
|
9
|
-
* app.getVersion() - Get the application version string
|
|
10
|
-
* app.getName() - Get the application name
|
|
11
|
-
* app.getPath(name) - Get a well-known path (home, appData, temp, etc.)
|
|
12
|
-
* app.setBadge(count) - Set the taskbar/dock badge count
|
|
13
|
-
* app.getBadge() - Get the current badge count
|
|
14
|
-
* app.emit(event, payload) - Dispatch a custom application event
|
|
15
|
-
*
|
|
16
|
-
* Events:
|
|
17
|
-
* app.onReady(cb) - Fires when the app is fully initialized
|
|
18
|
-
* app.onQuit(cb) - Fires when the app is about to quit
|
|
19
|
-
* app.onActivate(cb) - Fires when the app is re-activated (macOS dock click)
|
|
20
|
-
* app.onWindowAllClosed(cb) - Fires when all windows are closed
|
|
21
|
-
* app.onSecondInstance(cb) - Fires when a second instance is launched
|
|
22
|
-
* app.on(event, cb) - Listen for any custom app event
|
|
23
|
-
* app.once(event, cb) - Listen for a custom app event only once
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
export type { AppConfig } from '../App/app';
|
|
27
|
-
|
|
28
|
-
export { app } from '../App/app';
|
|
1
|
+
/**
|
|
2
|
+
* App API
|
|
3
|
+
*
|
|
4
|
+
* Application lifecycle management: version, paths, badge, and lifecycle events.
|
|
5
|
+
*
|
|
6
|
+
* Actions:
|
|
7
|
+
* app.invoke(name, args) - Call a named native method directly
|
|
8
|
+
* app.quit() - Quit the application
|
|
9
|
+
* app.getVersion() - Get the application version string
|
|
10
|
+
* app.getName() - Get the application name
|
|
11
|
+
* app.getPath(name) - Get a well-known path (home, appData, temp, etc.)
|
|
12
|
+
* app.setBadge(count) - Set the taskbar/dock badge count
|
|
13
|
+
* app.getBadge() - Get the current badge count
|
|
14
|
+
* app.emit(event, payload) - Dispatch a custom application event
|
|
15
|
+
*
|
|
16
|
+
* Events:
|
|
17
|
+
* app.onReady(cb) - Fires when the app is fully initialized
|
|
18
|
+
* app.onQuit(cb) - Fires when the app is about to quit
|
|
19
|
+
* app.onActivate(cb) - Fires when the app is re-activated (macOS dock click)
|
|
20
|
+
* app.onWindowAllClosed(cb) - Fires when all windows are closed
|
|
21
|
+
* app.onSecondInstance(cb) - Fires when a second instance is launched
|
|
22
|
+
* app.on(event, cb) - Listen for any custom app event
|
|
23
|
+
* app.once(event, cb) - Listen for a custom app event only once
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
export type { AppConfig } from '../App/app';
|
|
27
|
+
|
|
28
|
+
export { app } from '../App/app';
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Browser API
|
|
3
|
-
*
|
|
4
|
-
* Control in-app browser navigation and receive page lifecycle events.
|
|
5
|
-
*
|
|
6
|
-
* Actions:
|
|
7
|
-
* browser.navigate(url) - Navigate to a URL
|
|
8
|
-
* browser.open(url) - Alias for navigate()
|
|
9
|
-
* browser.openExternal(url) - Open a URL in the system default browser
|
|
10
|
-
* browser.openNewWindow(url) - Open a URL in a new application window
|
|
11
|
-
* browser.goBack() - Go back in navigation history
|
|
12
|
-
* browser.goForward() - Go forward in navigation history
|
|
13
|
-
* browser.reload() - Reload the current page
|
|
14
|
-
* browser.stop() - Stop the current page load
|
|
15
|
-
* browser.getUrl() - Get the current URL
|
|
16
|
-
* browser.getTitle() - Get the current page title
|
|
17
|
-
* browser.getState() - Get the full current browser state snapshot
|
|
18
|
-
* browser.canGoBack() - Check if back navigation is possible
|
|
19
|
-
* browser.canGoForward() - Check if forward navigation is possible
|
|
20
|
-
* browser.isLoading() - Check if a page is currently loading
|
|
21
|
-
*
|
|
22
|
-
* Events:
|
|
23
|
-
* browser.onNavigate(cb) - Fires when navigation occurs (URL change)
|
|
24
|
-
* browser.onStateChange(cb) - Fires when any browser state changes
|
|
25
|
-
* browser.onLoadStart(cb) - Fires when a page begins loading
|
|
26
|
-
* browser.onLoadEnd(cb) - Fires when a page finishes loading
|
|
27
|
-
* browser.onLoadError(cb) - Fires when a page load fails
|
|
28
|
-
*/
|
|
29
|
-
|
|
30
|
-
export type {
|
|
31
|
-
BrowserState,
|
|
32
|
-
NavigateCallback,
|
|
33
|
-
StateCallback,
|
|
34
|
-
LoadCallback,
|
|
35
|
-
ErrorCallback,
|
|
36
|
-
} from '../Browser/browser';
|
|
37
|
-
|
|
38
|
-
export { browser } from '../Browser/browser';
|
|
1
|
+
/**
|
|
2
|
+
* Browser API
|
|
3
|
+
*
|
|
4
|
+
* Control in-app browser navigation and receive page lifecycle events.
|
|
5
|
+
*
|
|
6
|
+
* Actions:
|
|
7
|
+
* browser.navigate(url) - Navigate to a URL
|
|
8
|
+
* browser.open(url) - Alias for navigate()
|
|
9
|
+
* browser.openExternal(url) - Open a URL in the system default browser
|
|
10
|
+
* browser.openNewWindow(url) - Open a URL in a new application window
|
|
11
|
+
* browser.goBack() - Go back in navigation history
|
|
12
|
+
* browser.goForward() - Go forward in navigation history
|
|
13
|
+
* browser.reload() - Reload the current page
|
|
14
|
+
* browser.stop() - Stop the current page load
|
|
15
|
+
* browser.getUrl() - Get the current URL
|
|
16
|
+
* browser.getTitle() - Get the current page title
|
|
17
|
+
* browser.getState() - Get the full current browser state snapshot
|
|
18
|
+
* browser.canGoBack() - Check if back navigation is possible
|
|
19
|
+
* browser.canGoForward() - Check if forward navigation is possible
|
|
20
|
+
* browser.isLoading() - Check if a page is currently loading
|
|
21
|
+
*
|
|
22
|
+
* Events:
|
|
23
|
+
* browser.onNavigate(cb) - Fires when navigation occurs (URL change)
|
|
24
|
+
* browser.onStateChange(cb) - Fires when any browser state changes
|
|
25
|
+
* browser.onLoadStart(cb) - Fires when a page begins loading
|
|
26
|
+
* browser.onLoadEnd(cb) - Fires when a page finishes loading
|
|
27
|
+
* browser.onLoadError(cb) - Fires when a page load fails
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
export type {
|
|
31
|
+
BrowserState,
|
|
32
|
+
NavigateCallback,
|
|
33
|
+
StateCallback,
|
|
34
|
+
LoadCallback,
|
|
35
|
+
ErrorCallback,
|
|
36
|
+
} from '../Browser/browser';
|
|
37
|
+
|
|
38
|
+
export { browser } from '../Browser/browser';
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Clipboard API
|
|
3
|
-
*
|
|
4
|
-
* Read from and write to the system clipboard. Supports text and images.
|
|
5
|
-
*
|
|
6
|
-
* Actions:
|
|
7
|
-
* clipboard.getText() - Read text from clipboard
|
|
8
|
-
* clipboard.setText(text) - Write text to clipboard
|
|
9
|
-
* clipboard.hasText() - Check if clipboard has text
|
|
10
|
-
* clipboard.getImage() - Read image as base64 data URL
|
|
11
|
-
* clipboard.setImage(b64) - Write image from base64 data URL
|
|
12
|
-
* clipboard.hasImage() - Check if clipboard has an image
|
|
13
|
-
* clipboard.clear() - Clear the clipboard
|
|
14
|
-
*
|
|
15
|
-
* Events:
|
|
16
|
-
* clipboard.onChange(cb) - Fires when clipboard content changes
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
export type { ClipboardAPI } from '../Clipboard/clipboard';
|
|
20
|
-
|
|
21
|
-
export { clipboard } from '../Clipboard/clipboard';
|
|
1
|
+
/**
|
|
2
|
+
* Clipboard API
|
|
3
|
+
*
|
|
4
|
+
* Read from and write to the system clipboard. Supports text and images.
|
|
5
|
+
*
|
|
6
|
+
* Actions:
|
|
7
|
+
* clipboard.getText() - Read text from clipboard
|
|
8
|
+
* clipboard.setText(text) - Write text to clipboard
|
|
9
|
+
* clipboard.hasText() - Check if clipboard has text
|
|
10
|
+
* clipboard.getImage() - Read image as base64 data URL
|
|
11
|
+
* clipboard.setImage(b64) - Write image from base64 data URL
|
|
12
|
+
* clipboard.hasImage() - Check if clipboard has an image
|
|
13
|
+
* clipboard.clear() - Clear the clipboard
|
|
14
|
+
*
|
|
15
|
+
* Events:
|
|
16
|
+
* clipboard.onChange(cb) - Fires when clipboard content changes
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
export type { ClipboardAPI } from '../Clipboard/clipboard';
|
|
20
|
+
|
|
21
|
+
export { clipboard } from '../Clipboard/clipboard';
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Display API
|
|
3
|
-
*
|
|
4
|
-
* Query and control connected monitors/screens.
|
|
5
|
-
*
|
|
6
|
-
* Actions:
|
|
7
|
-
* display.getAllDisplays() - Get all connected displays
|
|
8
|
-
* display.getPrimaryDisplay() - Get the primary display
|
|
9
|
-
* display.getDisplayAt(x, y) - Get the display at a screen coordinate
|
|
10
|
-
* display.getDisplayAtCursor() - Get the display under the cursor
|
|
11
|
-
* display.getDisplayById(id) - Get a display by its ID
|
|
12
|
-
* display.setDisplayMode(id, mode) - Change resolution/refresh rate
|
|
13
|
-
* display.setPosition(id, x, y) - Reposition a display
|
|
14
|
-
* display.turnOff(id) - Turn off a display
|
|
15
|
-
* display.getScreenWidth() - Get primary screen width in pixels
|
|
16
|
-
* display.getScreenHeight() - Get primary screen height in pixels
|
|
17
|
-
* display.getScaleFactor() - Get DPI scale factor
|
|
18
|
-
* display.getRefreshRate() - Get refresh rate in Hz
|
|
19
|
-
*
|
|
20
|
-
* Events:
|
|
21
|
-
* display.onConnected(cb) - Fires when a display is connected
|
|
22
|
-
* display.onDisconnected(cb) - Fires when a display is disconnected
|
|
23
|
-
* display.onChanged(cb) - Fires when a display configuration changes
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
export type {
|
|
27
|
-
Display,
|
|
28
|
-
DisplayMode,
|
|
29
|
-
DisplayBounds,
|
|
30
|
-
DisplayResolution,
|
|
31
|
-
} from '../Display/display';
|
|
32
|
-
|
|
33
|
-
export { display } from '../Display/display';
|
|
1
|
+
/**
|
|
2
|
+
* Display API
|
|
3
|
+
*
|
|
4
|
+
* Query and control connected monitors/screens.
|
|
5
|
+
*
|
|
6
|
+
* Actions:
|
|
7
|
+
* display.getAllDisplays() - Get all connected displays
|
|
8
|
+
* display.getPrimaryDisplay() - Get the primary display
|
|
9
|
+
* display.getDisplayAt(x, y) - Get the display at a screen coordinate
|
|
10
|
+
* display.getDisplayAtCursor() - Get the display under the cursor
|
|
11
|
+
* display.getDisplayById(id) - Get a display by its ID
|
|
12
|
+
* display.setDisplayMode(id, mode) - Change resolution/refresh rate
|
|
13
|
+
* display.setPosition(id, x, y) - Reposition a display
|
|
14
|
+
* display.turnOff(id) - Turn off a display
|
|
15
|
+
* display.getScreenWidth() - Get primary screen width in pixels
|
|
16
|
+
* display.getScreenHeight() - Get primary screen height in pixels
|
|
17
|
+
* display.getScaleFactor() - Get DPI scale factor
|
|
18
|
+
* display.getRefreshRate() - Get refresh rate in Hz
|
|
19
|
+
*
|
|
20
|
+
* Events:
|
|
21
|
+
* display.onConnected(cb) - Fires when a display is connected
|
|
22
|
+
* display.onDisconnected(cb) - Fires when a display is disconnected
|
|
23
|
+
* display.onChanged(cb) - Fires when a display configuration changes
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
export type {
|
|
27
|
+
Display,
|
|
28
|
+
DisplayMode,
|
|
29
|
+
DisplayBounds,
|
|
30
|
+
DisplayResolution,
|
|
31
|
+
} from '../Display/display';
|
|
32
|
+
|
|
33
|
+
export { display } from '../Display/display';
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Keyboard API
|
|
3
|
-
*
|
|
4
|
-
* Listen for key events and register global shortcuts.
|
|
5
|
-
*
|
|
6
|
-
* Actions:
|
|
7
|
-
* keyboard.isKeyPressed(key) - Check if a key is currently held down
|
|
8
|
-
* keyboard.setAutoRepeat(enabled) - Enable/disable key auto-repeat
|
|
9
|
-
* keyboard.getAutoRepeat() - Get auto-repeat state
|
|
10
|
-
* keyboard.registerShortcut(id, shortcut, cb) - Register a global keyboard shortcut
|
|
11
|
-
* keyboard.unregisterShortcut(id) - Remove a registered shortcut
|
|
12
|
-
* keyboard.clearShortcuts() - Remove all registered shortcuts
|
|
13
|
-
* keyboard.parseShortcut('Ctrl+S') - Parse a shortcut string into a Shortcut object
|
|
14
|
-
* keyboard.keyNameToCode('enter') - Convert a key name string to a KeyCode
|
|
15
|
-
*
|
|
16
|
-
* Events:
|
|
17
|
-
* keyboard.onKeyDown(cb) - Fires when any key is pressed
|
|
18
|
-
* keyboard.onKeyUp(cb) - Fires when any key is released
|
|
19
|
-
* keyboard.onShortcut(cb) - Fires when a registered shortcut is triggered
|
|
20
|
-
*
|
|
21
|
-
* Enums:
|
|
22
|
-
* KeyCode - Key codes (e.g. KeyCode.Enter, KeyCode.F5)
|
|
23
|
-
* KeyMod - Modifier flags (e.g. KeyMod.Control, KeyMod.Shift)
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
export type {
|
|
27
|
-
KeyEvent,
|
|
28
|
-
Shortcut,
|
|
29
|
-
KeyEventCallback,
|
|
30
|
-
ShortcutCallback,
|
|
31
|
-
} from '../Keyboard/keyboard';
|
|
32
|
-
|
|
33
|
-
export { KeyCode, KeyMod, keyboard } from '../Keyboard/keyboard';
|
|
1
|
+
/**
|
|
2
|
+
* Keyboard API
|
|
3
|
+
*
|
|
4
|
+
* Listen for key events and register global shortcuts.
|
|
5
|
+
*
|
|
6
|
+
* Actions:
|
|
7
|
+
* keyboard.isKeyPressed(key) - Check if a key is currently held down
|
|
8
|
+
* keyboard.setAutoRepeat(enabled) - Enable/disable key auto-repeat
|
|
9
|
+
* keyboard.getAutoRepeat() - Get auto-repeat state
|
|
10
|
+
* keyboard.registerShortcut(id, shortcut, cb) - Register a global keyboard shortcut
|
|
11
|
+
* keyboard.unregisterShortcut(id) - Remove a registered shortcut
|
|
12
|
+
* keyboard.clearShortcuts() - Remove all registered shortcuts
|
|
13
|
+
* keyboard.parseShortcut('Ctrl+S') - Parse a shortcut string into a Shortcut object
|
|
14
|
+
* keyboard.keyNameToCode('enter') - Convert a key name string to a KeyCode
|
|
15
|
+
*
|
|
16
|
+
* Events:
|
|
17
|
+
* keyboard.onKeyDown(cb) - Fires when any key is pressed
|
|
18
|
+
* keyboard.onKeyUp(cb) - Fires when any key is released
|
|
19
|
+
* keyboard.onShortcut(cb) - Fires when a registered shortcut is triggered
|
|
20
|
+
*
|
|
21
|
+
* Enums:
|
|
22
|
+
* KeyCode - Key codes (e.g. KeyCode.Enter, KeyCode.F5)
|
|
23
|
+
* KeyMod - Modifier flags (e.g. KeyMod.Control, KeyMod.Shift)
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
export type {
|
|
27
|
+
KeyEvent,
|
|
28
|
+
Shortcut,
|
|
29
|
+
KeyEventCallback,
|
|
30
|
+
ShortcutCallback,
|
|
31
|
+
} from '../Keyboard/keyboard';
|
|
32
|
+
|
|
33
|
+
export { KeyCode, KeyMod, keyboard } from '../Keyboard/keyboard';
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Menu API
|
|
3
|
-
*
|
|
4
|
-
* Build and control native context menus and application menu bars.
|
|
5
|
-
*
|
|
6
|
-
* Actions:
|
|
7
|
-
* menu.create(items) - Create a menu and return its ID
|
|
8
|
-
* menu.popup(id, x, y) - Show a menu at a screen position
|
|
9
|
-
* menu.popupAtCursor(id) - Show a menu at the current cursor position
|
|
10
|
-
* menu.close(id) - Close an open menu
|
|
11
|
-
* menu.destroy(id) - Destroy a menu and free resources
|
|
12
|
-
* menu.setApplicationMenu(items) - Set the application-level menu bar
|
|
13
|
-
* menu.getApplicationMenu() - Get the current application menu items
|
|
14
|
-
* menu.appendToMenuBar(item) - Append an item to the menu bar
|
|
15
|
-
* menu.showContextMenu(items, options) - Create and show a context menu in one call
|
|
16
|
-
* menu.dispose() - Clear all internal click handlers
|
|
17
|
-
*
|
|
18
|
-
* Builder helpers (return pre-built MenuItem trees):
|
|
19
|
-
* menu.createFileMenu(handlers) - Standard File menu (New, Open, Save, Exit)
|
|
20
|
-
* menu.createEditMenu(handlers) - Standard Edit menu (Undo, Cut, Copy, Paste)
|
|
21
|
-
* menu.createViewMenu(handlers) - Standard View menu (Zoom, Fullscreen, DevTools)
|
|
22
|
-
* menu.createTextContextMenu() - Right-click menu for text fields
|
|
23
|
-
* menu.createImageContextMenu() - Right-click menu for images
|
|
24
|
-
* menu.createLinkContextMenu() - Right-click menu for links
|
|
25
|
-
*
|
|
26
|
-
* Events:
|
|
27
|
-
* menu.onItemClick(cb) - Fires when any menu item is clicked
|
|
28
|
-
* menu.onContextOpen(cb) - Fires when a context menu is about to open
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
export type {
|
|
32
|
-
MenuItem,
|
|
33
|
-
MenuItemType,
|
|
34
|
-
MenuBarData,
|
|
35
|
-
ContextMenuOptions,
|
|
36
|
-
ContextInfo,
|
|
37
|
-
} from '../Menu/menu';
|
|
38
|
-
|
|
39
|
-
export { menu } from '../Menu/menu';
|
|
1
|
+
/**
|
|
2
|
+
* Menu API
|
|
3
|
+
*
|
|
4
|
+
* Build and control native context menus and application menu bars.
|
|
5
|
+
*
|
|
6
|
+
* Actions:
|
|
7
|
+
* menu.create(items) - Create a menu and return its ID
|
|
8
|
+
* menu.popup(id, x, y) - Show a menu at a screen position
|
|
9
|
+
* menu.popupAtCursor(id) - Show a menu at the current cursor position
|
|
10
|
+
* menu.close(id) - Close an open menu
|
|
11
|
+
* menu.destroy(id) - Destroy a menu and free resources
|
|
12
|
+
* menu.setApplicationMenu(items) - Set the application-level menu bar
|
|
13
|
+
* menu.getApplicationMenu() - Get the current application menu items
|
|
14
|
+
* menu.appendToMenuBar(item) - Append an item to the menu bar
|
|
15
|
+
* menu.showContextMenu(items, options) - Create and show a context menu in one call
|
|
16
|
+
* menu.dispose() - Clear all internal click handlers
|
|
17
|
+
*
|
|
18
|
+
* Builder helpers (return pre-built MenuItem trees):
|
|
19
|
+
* menu.createFileMenu(handlers) - Standard File menu (New, Open, Save, Exit)
|
|
20
|
+
* menu.createEditMenu(handlers) - Standard Edit menu (Undo, Cut, Copy, Paste)
|
|
21
|
+
* menu.createViewMenu(handlers) - Standard View menu (Zoom, Fullscreen, DevTools)
|
|
22
|
+
* menu.createTextContextMenu() - Right-click menu for text fields
|
|
23
|
+
* menu.createImageContextMenu() - Right-click menu for images
|
|
24
|
+
* menu.createLinkContextMenu() - Right-click menu for links
|
|
25
|
+
*
|
|
26
|
+
* Events:
|
|
27
|
+
* menu.onItemClick(cb) - Fires when any menu item is clicked
|
|
28
|
+
* menu.onContextOpen(cb) - Fires when a context menu is about to open
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
export type {
|
|
32
|
+
MenuItem,
|
|
33
|
+
MenuItemType,
|
|
34
|
+
MenuBarData,
|
|
35
|
+
ContextMenuOptions,
|
|
36
|
+
ContextInfo,
|
|
37
|
+
} from '../Menu/menu';
|
|
38
|
+
|
|
39
|
+
export { menu } from '../Menu/menu';
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Router API
|
|
3
|
-
*
|
|
4
|
-
* Map route paths to frontend URLs and navigate between them across windows.
|
|
5
|
-
* Works with any frontend router (React Router, TanStack Router, Solid Router, etc.).
|
|
6
|
-
*
|
|
7
|
-
* Actions:
|
|
8
|
-
* router.setRoutes(routes) - Define the route map ({ '/settings': 'http://...' })
|
|
9
|
-
* router.getRoutes() - Get the current route map
|
|
10
|
-
* router.push(route, windowId?) - Navigate to a route (adds to history)
|
|
11
|
-
* router.replace(route, windowId?) - Navigate to a route (replaces history entry)
|
|
12
|
-
* router.getCurrentRoute(windowId?) - Get the current route for a window
|
|
13
|
-
* router.setInitialRoute(route) - Set the route loaded on app startup
|
|
14
|
-
* router.emit(name, payload) - Send a message on a router feature channel
|
|
15
|
-
* router.on(name, cb) - Listen on a router feature channel
|
|
16
|
-
*
|
|
17
|
-
* Events:
|
|
18
|
-
* router.onRouteChange(cb) - Fires when the route changes (from backend or other windows)
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
export type { RouteMap, RouteChangeCallback, RouteConfig } from '../Router/router';
|
|
22
|
-
|
|
23
|
-
export { router } from '../Router/router';
|
|
1
|
+
/**
|
|
2
|
+
* Router API
|
|
3
|
+
*
|
|
4
|
+
* Map route paths to frontend URLs and navigate between them across windows.
|
|
5
|
+
* Works with any frontend router (React Router, TanStack Router, Solid Router, etc.).
|
|
6
|
+
*
|
|
7
|
+
* Actions:
|
|
8
|
+
* router.setRoutes(routes) - Define the route map ({ '/settings': 'http://...' })
|
|
9
|
+
* router.getRoutes() - Get the current route map
|
|
10
|
+
* router.push(route, windowId?) - Navigate to a route (adds to history)
|
|
11
|
+
* router.replace(route, windowId?) - Navigate to a route (replaces history entry)
|
|
12
|
+
* router.getCurrentRoute(windowId?) - Get the current route for a window
|
|
13
|
+
* router.setInitialRoute(route) - Set the route loaded on app startup
|
|
14
|
+
* router.emit(name, payload) - Send a message on a router feature channel
|
|
15
|
+
* router.on(name, cb) - Listen on a router feature channel
|
|
16
|
+
*
|
|
17
|
+
* Events:
|
|
18
|
+
* router.onRouteChange(cb) - Fires when the route changes (from backend or other windows)
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
export type { RouteMap, RouteChangeCallback, RouteConfig } from '../Router/router';
|
|
22
|
+
|
|
23
|
+
export { router } from '../Router/router';
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tray API
|
|
3
|
-
*
|
|
4
|
-
* Manage the system tray icon: icon, tooltip, visibility, and context menu.
|
|
5
|
-
*
|
|
6
|
-
* Actions:
|
|
7
|
-
* tray.setIcon(path) - Set the tray icon image
|
|
8
|
-
* tray.setTooltip(text) - Set the hover tooltip text
|
|
9
|
-
* tray.setVisible(visible) - Show or hide the tray icon
|
|
10
|
-
* tray.setMenu(items) - Set the full tray menu
|
|
11
|
-
* tray.setContextMenu(items) - Set the right-click context menu
|
|
12
|
-
*
|
|
13
|
-
* Events:
|
|
14
|
-
* tray.onClick(cb) - Fires on left click
|
|
15
|
-
* tray.onDoubleClick(cb) - Fires on double click
|
|
16
|
-
* tray.onRightClick(cb) - Fires on right click
|
|
17
|
-
* tray.onMenuItemClick(cb) - Fires when a menu item is selected
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
export type { TrayMenuItem, TrayIconData } from '../Tray/tray';
|
|
21
|
-
|
|
22
|
-
export { tray } from '../Tray/tray';
|
|
1
|
+
/**
|
|
2
|
+
* Tray API
|
|
3
|
+
*
|
|
4
|
+
* Manage the system tray icon: icon, tooltip, visibility, and context menu.
|
|
5
|
+
*
|
|
6
|
+
* Actions:
|
|
7
|
+
* tray.setIcon(path) - Set the tray icon image
|
|
8
|
+
* tray.setTooltip(text) - Set the hover tooltip text
|
|
9
|
+
* tray.setVisible(visible) - Show or hide the tray icon
|
|
10
|
+
* tray.setMenu(items) - Set the full tray menu
|
|
11
|
+
* tray.setContextMenu(items) - Set the right-click context menu
|
|
12
|
+
*
|
|
13
|
+
* Events:
|
|
14
|
+
* tray.onClick(cb) - Fires on left click
|
|
15
|
+
* tray.onDoubleClick(cb) - Fires on double click
|
|
16
|
+
* tray.onRightClick(cb) - Fires on right click
|
|
17
|
+
* tray.onMenuItemClick(cb) - Fires when a menu item is selected
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
export type { TrayMenuItem, TrayIconData } from '../Tray/tray';
|
|
21
|
+
|
|
22
|
+
export { tray } from '../Tray/tray';
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WebGPU API
|
|
3
|
-
*
|
|
4
|
-
* GPU-accelerated rendering and compute via the WebGPU standard.
|
|
5
|
-
*
|
|
6
|
-
* Actions:
|
|
7
|
-
* gpu.requestAdapter(options?) - Request a GPU adapter (entry point for WebGPU)
|
|
8
|
-
* gpu.getPreferredCanvasFormat() - Get the preferred swap-chain texture format
|
|
9
|
-
*
|
|
10
|
-
* Events:
|
|
11
|
-
* gpu.onAdapterLost(cb) - Fires when the GPU adapter is lost
|
|
12
|
-
* gpu.onDeviceLost(cb) - Fires when the GPU device is lost
|
|
13
|
-
* gpu.onError(cb) - Fires on GPU errors
|
|
14
|
-
*
|
|
15
|
-
* Core types (mirrors the WebGPU spec):
|
|
16
|
-
* GPUAdapter, GPUDevice, GPUBuffer, GPUTexture, GPUTextureView
|
|
17
|
-
* GPUSampler, GPUShaderModule, GPURenderPipeline, GPUComputePipeline
|
|
18
|
-
* GPUBindGroup, GPUBindGroupLayout, GPUCommandEncoder
|
|
19
|
-
* GPURenderPassEncoder, GPUComputePassEncoder, GPUQueue, GPUCommandBuffer
|
|
20
|
-
*
|
|
21
|
-
* Usage flags / constants:
|
|
22
|
-
* GPUBufferUsage, GPUTextureUsage, GPUMapMode, GPUShaderStage, GPUColorWrite
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
export type {
|
|
26
|
-
GPUAdapter,
|
|
27
|
-
GPUAdapterInfo,
|
|
28
|
-
GPUDevice,
|
|
29
|
-
GPUDeviceLostInfo,
|
|
30
|
-
GPUBuffer,
|
|
31
|
-
GPUTexture,
|
|
32
|
-
GPUTextureView,
|
|
33
|
-
GPUSampler,
|
|
34
|
-
GPUShaderModule,
|
|
35
|
-
GPURenderPipeline,
|
|
36
|
-
GPUComputePipeline,
|
|
37
|
-
GPUBindGroupLayout,
|
|
38
|
-
GPUBindGroup,
|
|
39
|
-
GPUCommandEncoder,
|
|
40
|
-
GPURenderPassEncoder,
|
|
41
|
-
GPUComputePassEncoder,
|
|
42
|
-
GPUQueue,
|
|
43
|
-
GPUCommandBuffer,
|
|
44
|
-
GPURequestAdapterOptions,
|
|
45
|
-
GPUDeviceDescriptor,
|
|
46
|
-
} from '../WebGPU/webgpu';
|
|
47
|
-
|
|
48
|
-
export {
|
|
49
|
-
gpu,
|
|
50
|
-
GPUBufferUsage,
|
|
51
|
-
GPUTextureUsage,
|
|
52
|
-
GPUMapMode,
|
|
53
|
-
GPUShaderStage,
|
|
54
|
-
GPUColorWrite,
|
|
55
|
-
} from '../WebGPU/webgpu';
|
|
1
|
+
/**
|
|
2
|
+
* WebGPU API
|
|
3
|
+
*
|
|
4
|
+
* GPU-accelerated rendering and compute via the WebGPU standard.
|
|
5
|
+
*
|
|
6
|
+
* Actions:
|
|
7
|
+
* gpu.requestAdapter(options?) - Request a GPU adapter (entry point for WebGPU)
|
|
8
|
+
* gpu.getPreferredCanvasFormat() - Get the preferred swap-chain texture format
|
|
9
|
+
*
|
|
10
|
+
* Events:
|
|
11
|
+
* gpu.onAdapterLost(cb) - Fires when the GPU adapter is lost
|
|
12
|
+
* gpu.onDeviceLost(cb) - Fires when the GPU device is lost
|
|
13
|
+
* gpu.onError(cb) - Fires on GPU errors
|
|
14
|
+
*
|
|
15
|
+
* Core types (mirrors the WebGPU spec):
|
|
16
|
+
* GPUAdapter, GPUDevice, GPUBuffer, GPUTexture, GPUTextureView
|
|
17
|
+
* GPUSampler, GPUShaderModule, GPURenderPipeline, GPUComputePipeline
|
|
18
|
+
* GPUBindGroup, GPUBindGroupLayout, GPUCommandEncoder
|
|
19
|
+
* GPURenderPassEncoder, GPUComputePassEncoder, GPUQueue, GPUCommandBuffer
|
|
20
|
+
*
|
|
21
|
+
* Usage flags / constants:
|
|
22
|
+
* GPUBufferUsage, GPUTextureUsage, GPUMapMode, GPUShaderStage, GPUColorWrite
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
export type {
|
|
26
|
+
GPUAdapter,
|
|
27
|
+
GPUAdapterInfo,
|
|
28
|
+
GPUDevice,
|
|
29
|
+
GPUDeviceLostInfo,
|
|
30
|
+
GPUBuffer,
|
|
31
|
+
GPUTexture,
|
|
32
|
+
GPUTextureView,
|
|
33
|
+
GPUSampler,
|
|
34
|
+
GPUShaderModule,
|
|
35
|
+
GPURenderPipeline,
|
|
36
|
+
GPUComputePipeline,
|
|
37
|
+
GPUBindGroupLayout,
|
|
38
|
+
GPUBindGroup,
|
|
39
|
+
GPUCommandEncoder,
|
|
40
|
+
GPURenderPassEncoder,
|
|
41
|
+
GPUComputePassEncoder,
|
|
42
|
+
GPUQueue,
|
|
43
|
+
GPUCommandBuffer,
|
|
44
|
+
GPURequestAdapterOptions,
|
|
45
|
+
GPUDeviceDescriptor,
|
|
46
|
+
} from '../WebGPU/webgpu';
|
|
47
|
+
|
|
48
|
+
export {
|
|
49
|
+
gpu,
|
|
50
|
+
GPUBufferUsage,
|
|
51
|
+
GPUTextureUsage,
|
|
52
|
+
GPUMapMode,
|
|
53
|
+
GPUShaderStage,
|
|
54
|
+
GPUColorWrite,
|
|
55
|
+
} from '../WebGPU/webgpu';
|