plusui-native-core 0.1.32 → 0.1.33

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.
@@ -639,6 +639,22 @@ void Window::setIconFromMemory(const unsigned char *data, size_t size) {
639
639
 
640
640
  WindowState Window::getState() const { return pImpl->state; }
641
641
 
642
+ void Window::close() {
643
+ #ifdef _WIN32
644
+ if (pImpl->hwnd)
645
+ PostMessage(pImpl->hwnd, WM_CLOSE, 0, 0);
646
+ #elif defined(__APPLE__)
647
+ if (pImpl->nativeWindow) {
648
+ NSWindow *nswin = (__bridge NSWindow *)pImpl->nativeWindow;
649
+ [nswin close];
650
+ }
651
+ #else
652
+ if (pImpl->nativeWindow) {
653
+ gtk_widget_destroy(GTK_WIDGET(pImpl->nativeWindow));
654
+ }
655
+ #endif
656
+ }
657
+
642
658
  void Window::onMove(MoveCallback callback) {
643
659
  pImpl->moveCallbacks.push_back(callback);
644
660
  }
@@ -106,6 +106,7 @@ public:
106
106
 
107
107
  void show();
108
108
  void hide();
109
+ void close();
109
110
  bool isVisible() const;
110
111
  bool isHidden() const;
111
112
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plusui-native-core",
3
- "version": "0.1.32",
3
+ "version": "0.1.33",
4
4
  "description": "PlusUI Core framework (frontend + backend implementations)",
5
5
  "type": "module",
6
6
  "files": [