plusui-native 0.2.21 → 0.2.25
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "plusui-native",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.25",
|
|
4
4
|
"description": "PlusUI CLI - Build C++ desktop apps modern UI ",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"semver": "^7.6.0",
|
|
28
28
|
"which": "^4.0.0",
|
|
29
29
|
"execa": "^8.0.1",
|
|
30
|
-
"plusui-native-builder": "^0.1.
|
|
31
|
-
"plusui-native-bindgen": "^0.1.
|
|
30
|
+
"plusui-native-builder": "^0.1.24",
|
|
31
|
+
"plusui-native-bindgen": "^0.1.24"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"plusui-native-bindgen": "^0.1.
|
|
34
|
+
"plusui-native-bindgen": "^0.1.24"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#include <plusui> // All-in-one framework header
|
|
1
|
+
#include <plusui/plusui.hpp> // All-in-one framework header
|
|
2
2
|
#include <iostream>
|
|
3
3
|
#include "generated/assets.h"
|
|
4
4
|
|
|
@@ -59,6 +59,7 @@ struct WindowConfig {
|
|
|
59
59
|
bool alwaysOnTop = false; // Keep window above all others
|
|
60
60
|
bool showInTaskbar = true; // Show in taskbar (false = hidden from taskbar)
|
|
61
61
|
bool fullscreen = false; // Start in fullscreen mode
|
|
62
|
+
bool enableFileDrop = true; // Enable native FileDrop API (disables webview drag-drop)
|
|
62
63
|
|
|
63
64
|
// --- Dev Tools ---
|
|
64
65
|
bool devTools = true; // Enable DevTools (F12, right-click inspect)
|
|
@@ -76,7 +77,6 @@ struct ServicesConfig {
|
|
|
76
77
|
bool enableDisplay = true; // Enable multi-display detection
|
|
77
78
|
bool enableKeyboard = true; // Enable keyboard shortcuts/hotkeys
|
|
78
79
|
bool enableMenu = true; // Enable custom menu bar
|
|
79
|
-
bool enableFileDrop = true; // Enable drag & drop file handling
|
|
80
80
|
} servicesConfig;
|
|
81
81
|
|
|
82
82
|
// ============================================================================
|
|
@@ -116,7 +116,8 @@ int main() {
|
|
|
116
116
|
.devtools(windowConfig.devTools)
|
|
117
117
|
.alwaysOnTop(windowConfig.alwaysOnTop)
|
|
118
118
|
.skipTaskbar(!windowConfig.showInTaskbar)
|
|
119
|
-
.scrollbars(windowConfig.scrollbars)
|
|
119
|
+
.scrollbars(windowConfig.scrollbars)
|
|
120
|
+
.enableFileDrop(windowConfig.enableFileDrop);
|
|
120
121
|
|
|
121
122
|
auto mainWindow = {{PROJECT_NAME_LOWER}}.build();
|
|
122
123
|
|
|
@@ -170,9 +171,11 @@ int main() {
|
|
|
170
171
|
// Call from JS: const version = await app.invoke('getVersion');
|
|
171
172
|
|
|
172
173
|
// ========================================
|
|
173
|
-
// FILE DROP EVENTS (Drag & Drop)
|
|
174
|
+
// FILE DROP EVENTS (Native Drag & Drop API)
|
|
174
175
|
// ========================================
|
|
175
|
-
//
|
|
176
|
+
// Native FileDrop API - handles OS-level file drag-and-drop
|
|
177
|
+
// Enabled via windowConfig.enableFileDrop which automatically disables
|
|
178
|
+
// webview drag-drop to prevent "copy" cursor at window edges
|
|
176
179
|
event::on("fileDrop.filesDropped", [](const std::string& data) {
|
|
177
180
|
std::cout << "Files dropped: " << data << std::endl;
|
|
178
181
|
// Parse the JSON data to get file info
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#include <plusui> // All-in-one framework header
|
|
1
|
+
#include <plusui/plusui.hpp> // All-in-one framework header
|
|
2
2
|
#include <iostream>
|
|
3
3
|
#include "generated/assets.h"
|
|
4
4
|
|
|
@@ -59,6 +59,7 @@ struct WindowConfig {
|
|
|
59
59
|
bool alwaysOnTop = false; // Keep window above all others
|
|
60
60
|
bool showInTaskbar = true; // Show in taskbar (false = hidden from taskbar)
|
|
61
61
|
bool fullscreen = false; // Start in fullscreen mode
|
|
62
|
+
bool enableFileDrop = true; // Enable native FileDrop API (disables webview drag-drop)
|
|
62
63
|
|
|
63
64
|
// --- Dev Tools ---
|
|
64
65
|
bool devTools = true; // Enable DevTools (F12, right-click inspect)
|
|
@@ -76,7 +77,6 @@ struct ServicesConfig {
|
|
|
76
77
|
bool enableDisplay = true; // Enable multi-display detection
|
|
77
78
|
bool enableKeyboard = true; // Enable keyboard shortcuts/hotkeys
|
|
78
79
|
bool enableMenu = true; // Enable custom menu bar
|
|
79
|
-
bool enableFileDrop = true; // Enable drag & drop file handling
|
|
80
80
|
} servicesConfig;
|
|
81
81
|
|
|
82
82
|
// ============================================================================
|
|
@@ -116,7 +116,8 @@ int main() {
|
|
|
116
116
|
.devtools(windowConfig.devTools)
|
|
117
117
|
.alwaysOnTop(windowConfig.alwaysOnTop)
|
|
118
118
|
.skipTaskbar(!windowConfig.showInTaskbar)
|
|
119
|
-
.scrollbars(windowConfig.scrollbars)
|
|
119
|
+
.scrollbars(windowConfig.scrollbars)
|
|
120
|
+
.enableFileDrop(windowConfig.enableFileDrop);
|
|
120
121
|
|
|
121
122
|
auto mainWindow = {{PROJECT_NAME_LOWER}}.build();
|
|
122
123
|
|
|
@@ -165,9 +166,11 @@ int main() {
|
|
|
165
166
|
// Call from JS: const version = await app.invoke('getVersion');
|
|
166
167
|
|
|
167
168
|
// ========================================
|
|
168
|
-
// FILE DROP EVENTS (Drag & Drop)
|
|
169
|
+
// FILE DROP EVENTS (Native Drag & Drop API)
|
|
169
170
|
// ========================================
|
|
170
|
-
//
|
|
171
|
+
// Native FileDrop API - handles OS-level file drag-and-drop
|
|
172
|
+
// Enabled via windowConfig.enableFileDrop which automatically disables
|
|
173
|
+
// webview drag-drop to prevent "copy" cursor at window edges
|
|
171
174
|
event::on("fileDrop.filesDropped", [](const std::string& data) {
|
|
172
175
|
std::cout << "Files dropped: " << data << std::endl;
|
|
173
176
|
// Parse the JSON data to get file info
|