windowpp 0.1.6 → 0.1.8

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.
@@ -3,8 +3,12 @@
3
3
  // Handles: fs:exists, fs:stat, fs:readDir, fs:searchFiles
4
4
  // ============================================================================
5
5
 
6
+ #ifndef WIN32_LEAN_AND_MEAN
6
7
  #define WIN32_LEAN_AND_MEAN
8
+ #endif
9
+ #ifndef NOMINMAX
7
10
  #define NOMINMAX
11
+ #endif
8
12
  #include <windows.h>
9
13
 
10
14
  #include <filesystem>
@@ -3,8 +3,12 @@
3
3
  // Handles: fs:readFile, fs:readBinaryFile
4
4
  // ============================================================================
5
5
 
6
+ #ifndef WIN32_LEAN_AND_MEAN
6
7
  #define WIN32_LEAN_AND_MEAN
8
+ #endif
9
+ #ifndef NOMINMAX
7
10
  #define NOMINMAX
11
+ #endif
8
12
  #include <windows.h>
9
13
 
10
14
  #include <fstream>
@@ -5,8 +5,12 @@
5
5
  // fs:createDir, fs:removeDir
6
6
  // ============================================================================
7
7
 
8
+ #ifndef WIN32_LEAN_AND_MEAN
8
9
  #define WIN32_LEAN_AND_MEAN
10
+ #endif
11
+ #ifndef NOMINMAX
9
12
  #define NOMINMAX
13
+ #endif
10
14
  #include <windows.h>
11
15
  #include <shellapi.h>
12
16
 
@@ -9,7 +9,9 @@
9
9
  #include <iostream>
10
10
 
11
11
  #ifdef _WIN32
12
+ #ifndef WIN32_LEAN_AND_MEAN
12
13
  #define WIN32_LEAN_AND_MEAN
14
+ #endif
13
15
  #include <windows.h>
14
16
  #include <shlobj.h>
15
17
  #include <objidl.h>
@@ -2,8 +2,12 @@
2
2
  // app_win32.cpp — Win32 Application implementation
3
3
  // ============================================================================
4
4
 
5
+ #ifndef WIN32_LEAN_AND_MEAN
5
6
  #define WIN32_LEAN_AND_MEAN
7
+ #endif
8
+ #ifndef NOMINMAX
6
9
  #define NOMINMAX
10
+ #endif
7
11
  #include "app_win32.h"
8
12
  #include "window_win32.h"
9
13
  #include "win32_helpers.h"
@@ -2,8 +2,12 @@
2
2
  // tray_win32.cpp — Win32 System Tray implementation
3
3
  // ============================================================================
4
4
 
5
+ #ifndef WIN32_LEAN_AND_MEAN
5
6
  #define WIN32_LEAN_AND_MEAN
7
+ #endif
8
+ #ifndef NOMINMAX
6
9
  #define NOMINMAX
10
+ #endif
7
11
  #include "tray_win32.h"
8
12
  #include "win32_helpers.h"
9
13
 
@@ -2,8 +2,12 @@
2
2
  // window_win32.cpp — Win32 Window implementation
3
3
  // ============================================================================
4
4
 
5
+ #ifndef WIN32_LEAN_AND_MEAN
5
6
  #define WIN32_LEAN_AND_MEAN
7
+ #endif
8
+ #ifndef NOMINMAX
6
9
  #define NOMINMAX
10
+ #endif
7
11
  #include "window_win32.h"
8
12
  #include "win32_helpers.h"
9
13
  #include <algorithm>
@@ -80,11 +84,11 @@ void Win32Window::set_title(const std::string& title) {
80
84
  }
81
85
 
82
86
  void Win32Window::set_size(int w, int h) {
83
- SetWindowPos(hwnd_, nullptr, 0, 0, w, h, SWPP_NOZORDER | SWPP_NOMOVE);
87
+ SetWindowPos(hwnd_, nullptr, 0, 0, w, h, SWP_NOZORDER | SWP_NOMOVE);
84
88
  }
85
89
 
86
90
  void Win32Window::set_position(int x, int y) {
87
- SetWindowPos(hwnd_, nullptr, x, y, 0, 0, SWPP_NOZORDER | SWPP_NOSIZE);
91
+ SetWindowPos(hwnd_, nullptr, x, y, 0, 0, SWP_NOZORDER | SWP_NOSIZE);
88
92
  }
89
93
 
90
94
  void Win32Window::set_min_size(int w, int h) {
@@ -110,7 +114,7 @@ void Win32Window::set_resizable(bool v) {
110
114
 
111
115
  void Win32Window::set_always_on_top(bool v) {
112
116
  SetWindowPos(hwnd_, v ? HWND_TOPMOST : HWND_NOTOPMOST,
113
- 0, 0, 0, 0, SWPP_NOMOVE | SWPP_NOSIZE);
117
+ 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
114
118
  }
115
119
 
116
120
  void Win32Window::set_opacity(float v) {
@@ -181,7 +185,7 @@ void Win32Window::fullscreen() {
181
185
  GetMonitorInfoW(MonitorFromWindow(hwnd_, MONITOR_DEFAULTTONEAREST), &mi);
182
186
  r = mi.rcMonitor;
183
187
  SetWindowPos(hwnd_, HWND_TOP, r.left, r.top,
184
- r.right - r.left, r.bottom - r.top, SWPP_NOZORDER);
188
+ r.right - r.left, r.bottom - r.top, SWP_NOZORDER);
185
189
  }
186
190
  }
187
191
 
@@ -194,7 +198,7 @@ void Win32Window::center() {
194
198
  GetMonitorInfoW(MonitorFromWindow(hwnd_, MONITOR_DEFAULTTONEAREST), &mi);
195
199
  int x = mi.rcWork.left + (mi.rcWork.right - mi.rcWork.left - w) / 2;
196
200
  int y = mi.rcWork.top + (mi.rcWork.bottom - mi.rcWork.top - h) / 2;
197
- SetWindowPos(hwnd_, nullptr, x, y, 0, 0, SWPP_NOZORDER | SWPP_NOSIZE);
201
+ SetWindowPos(hwnd_, nullptr, x, y, 0, 0, SWP_NOZORDER | SWP_NOSIZE);
198
202
  }
199
203
 
200
204
  void Win32Window::request_repaint() {
@@ -4,8 +4,12 @@
4
4
 
5
5
  #pragma once
6
6
 
7
+ #ifndef WIN32_LEAN_AND_MEAN
7
8
  #define WIN32_LEAN_AND_MEAN
9
+ #endif
10
+ #ifndef NOMINMAX
8
11
  #define NOMINMAX
12
+ #endif
9
13
  #include <windows.h>
10
14
  #include <dwmapi.h>
11
15
  #include <map>
@@ -583,7 +583,7 @@ public:
583
583
  inset,
584
584
  host_width,
585
585
  host_height,
586
- SWPP_NOZORDER | SWPP_NOACTIVATE | SWPP_SHOWWINDOW);
586
+ SWP_NOZORDER | SWP_NOACTIVATE | SWP_SHOWWINDOW);
587
587
  }
588
588
  if (controller_) {
589
589
  RECT bounds = {0, 0, host_width, host_height};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "windowpp",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "WindowPP CLI — build, dev, and scaffold for WindowPP apps",
5
5
  "type": "commonjs",
6
6
  "bin": {