diff options
author | Arisotura <thetotalworm@gmail.com> | 2020-05-30 03:19:20 +0200 |
---|---|---|
committer | Arisotura <thetotalworm@gmail.com> | 2020-05-30 03:19:20 +0200 |
commit | b62d90cbe4c5232f0fe8604bd5e11f8eccd48ba1 (patch) | |
tree | bfd0a5e6f30fc382170ec9402adea32f12ebc342 /src/libui_sdl/libui/windows/winpublic.cpp | |
parent | 82302c9bf48598f889d0942340c224852c1378c5 (diff) | |
parent | 993048dd241b59747a7b30edfc861eedd4c005c9 (diff) |
Merge remote-tracking branch 'remotes/origin/master' into melonDSi
Diffstat (limited to 'src/libui_sdl/libui/windows/winpublic.cpp')
-rw-r--r-- | src/libui_sdl/libui/windows/winpublic.cpp | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/src/libui_sdl/libui/windows/winpublic.cpp b/src/libui_sdl/libui/windows/winpublic.cpp deleted file mode 100644 index 397a3b5..0000000 --- a/src/libui_sdl/libui/windows/winpublic.cpp +++ /dev/null @@ -1,61 +0,0 @@ -// 6 april 2015 -#include "uipriv_windows.hpp" - -void uiWindowsEnsureDestroyWindow(HWND hwnd) -{ - if (DestroyWindow(hwnd) == 0) - logLastError(L"error destroying window"); -} - -void uiWindowsEnsureSetParentHWND(HWND hwnd, HWND parent) -{ - if (parent == NULL) - parent = utilWindow; - if (SetParent(hwnd, parent) == 0) - logLastError(L"error setting window parent"); -} - -void uiWindowsEnsureAssignControlIDZOrder(HWND hwnd, LONG_PTR *controlID, HWND *insertAfter) -{ - SetWindowLongPtrW(hwnd, GWLP_ID, *controlID); - (*controlID)++; - setWindowInsertAfter(hwnd, *insertAfter); - *insertAfter = hwnd; -} - -void uiWindowsEnsureMoveWindowDuringResize(HWND hwnd, int x, int y, int width, int height) -{ - RECT r; - - r.left = x; - r.top = y; - r.right = x + width; - r.bottom = y + height; - if (SetWindowPos(hwnd, NULL, r.left, r.top, r.right - r.left, r.bottom - r.top, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOZORDER) == 0) - logLastError(L"error moving window"); -} - -// do these function even error out in any case other than invalid parameters?! I thought all windows had rects -void uiWindowsEnsureGetClientRect(HWND hwnd, RECT *r) -{ - if (GetClientRect(hwnd, r) == 0) { - logLastError(L"error getting window client rect"); - // zero out the rect on error just to be safe - r->left = 0; - r->top = 0; - r->right = 0; - r->bottom = 0; - } -} - -void uiWindowsEnsureGetWindowRect(HWND hwnd, RECT *r) -{ - if (GetWindowRect(hwnd, r) == 0) { - logLastError(L"error getting window rect"); - // zero out the rect on error just to be safe - r->left = 0; - r->top = 0; - r->right = 0; - r->bottom = 0; - } -} |