aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJooperGH <alexandredmfs@gmail.com>2022-12-19 11:43:16 +0000
committerJooperGH <alexandredmfs@gmail.com>2022-12-19 11:43:16 +0000
commitde0d86088020df8185a9b1900273d86c7c60596d (patch)
treea3f4de57f035485aa01fed556a4f22a01df1290a
parent521ed286321a30e5742a432effefb2c98b9484a7 (diff)
Added more DWMAPI bindings
-rw-r--r--core/sys/windows/dwmapi.odin41
-rw-r--r--core/sys/windows/user32.odin2
-rw-r--r--vendor/cgltf/lib/cgltf.libbin0 -> 347066 bytes
3 files changed, 43 insertions, 0 deletions
diff --git a/core/sys/windows/dwmapi.odin b/core/sys/windows/dwmapi.odin
index 468b5bb87..0cf6efd83 100644
--- a/core/sys/windows/dwmapi.odin
+++ b/core/sys/windows/dwmapi.odin
@@ -3,7 +3,48 @@ package sys_windows
foreign import dwmapi "system:Dwmapi.lib"
+MARGINS :: distinct [4]int
+PMARGINS :: ^MARGINS
+
+DWMWINDOWATTRIBUTE :: enum {
+ DWMWA_NCRENDERING_ENABLED,
+ DWMWA_NCRENDERING_POLICY,
+ DWMWA_TRANSITIONS_FORCEDISABLED,
+ DWMWA_ALLOW_NCPAINT,
+ DWMWA_CAPTION_BUTTON_BOUNDS,
+ DWMWA_NONCLIENT_RTL_LAYOUT,
+ DWMWA_FORCE_ICONIC_REPRESENTATION,
+ DWMWA_FLIP3D_POLICY,
+ DWMWA_EXTENDED_FRAME_BOUNDS,
+ DWMWA_HAS_ICONIC_BITMAP,
+ DWMWA_DISALLOW_PEEK,
+ DWMWA_EXCLUDED_FROM_PEEK,
+ DWMWA_CLOAK,
+ DWMWA_CLOAKED,
+ DWMWA_FREEZE_REPRESENTATION,
+ DWMWA_PASSIVE_UPDATE_MODE,
+ DWMWA_USE_HOSTBACKDROPBRUSH,
+ DWMWA_USE_IMMERSIVE_DARK_MODE = 20,
+ DWMWA_WINDOW_CORNER_PREFERENCE = 33,
+ DWMWA_BORDER_COLOR,
+ DWMWA_CAPTION_COLOR,
+ DWMWA_TEXT_COLOR,
+ DWMWA_VISIBLE_FRAME_BORDER_THICKNESS,
+ DWMWA_SYSTEMBACKDROP_TYPE,
+ DWMWA_LAST,
+}
+
+DWMNCRENDERINGPOLICY :: enum {
+ DWMNCRP_USEWINDOWSTYLE,
+ DWMNCRP_DISABLED,
+ DWMNCRP_ENABLED,
+ DWMNCRP_LAST,
+};
+
@(default_calling_convention="stdcall")
foreign dwmapi {
DwmFlush :: proc() -> HRESULT ---
+ DwmIsCompositionEnabled :: proc(pfEnabled: ^BOOL) -> HRESULT ---
+ DwmExtendFrameIntoClientArea :: proc(hWnd: HWND, pMarInset: PMARGINS) -> HRESULT ---
+ DwmSetWindowAttribute :: proc(hWnd: HWND, dwAttribute: DWORD, pvAttribute: LPCVOID, cbAttribute: DWORD) -> HRESULT ---
}
diff --git a/core/sys/windows/user32.odin b/core/sys/windows/user32.odin
index 9a30e6454..2434de13f 100644
--- a/core/sys/windows/user32.odin
+++ b/core/sys/windows/user32.odin
@@ -202,6 +202,8 @@ foreign user32 {
GetRawInputDeviceList :: proc(pRawInputDeviceList: PRAWINPUTDEVICELIST, puiNumDevices: PUINT, cbSize: UINT) -> UINT ---
GetRegisteredRawInputDevices :: proc(pRawInputDevices: PRAWINPUTDEVICE, puiNumDevices: PUINT, cbSize: UINT) -> UINT ---
RegisterRawInputDevices :: proc(pRawInputDevices: PCRAWINPUTDEVICE, uiNumDevices: UINT, cbSize: UINT) -> BOOL ---
+
+ SetLayeredWindowAttributes :: proc(hWnd: HWND, crKey: COLORREF, bAlpha: BYTE, dwFlags: DWORD) -> BOOL ---
}
CreateWindowW :: #force_inline proc "stdcall" (
diff --git a/vendor/cgltf/lib/cgltf.lib b/vendor/cgltf/lib/cgltf.lib
new file mode 100644
index 000000000..0d7ea6f9b
--- /dev/null
+++ b/vendor/cgltf/lib/cgltf.lib
Binary files differ