aboutsummaryrefslogtreecommitdiff
path: root/src/libui_sdl/libui/windows
diff options
context:
space:
mode:
authorStapleButter <thetotalworm@gmail.com>2017-09-23 03:39:09 +0200
committerStapleButter <thetotalworm@gmail.com>2017-09-23 03:39:09 +0200
commitf52322ee208de4af3ed28b1cfbf8404951eab0a2 (patch)
tree7bd98258283839fc1c00cb2b3aa797b2a6c3968d /src/libui_sdl/libui/windows
parent14b7cf1987f01b706a902d2bafdd4e72bb88889a (diff)
* support for dragdrop
* support for loading ROMs via command line (except it will try to get the BIOS/firmware from where the ROM is. derp) * re-add missing BIOS/firmware dialog. fix libui to allow dialogs without a parent window.
Diffstat (limited to 'src/libui_sdl/libui/windows')
-rw-r--r--src/libui_sdl/libui/windows/stddialogs.cpp2
-rw-r--r--src/libui_sdl/libui/windows/window.cpp6
2 files changed, 7 insertions, 1 deletions
diff --git a/src/libui_sdl/libui/windows/stddialogs.cpp b/src/libui_sdl/libui/windows/stddialogs.cpp
index dbd58fe..26d1219 100644
--- a/src/libui_sdl/libui/windows/stddialogs.cpp
+++ b/src/libui_sdl/libui/windows/stddialogs.cpp
@@ -14,7 +14,7 @@
// - when a dialog is active, tab navigation in other windows stops working
// - when adding uiOpenFolder(), use IFileDialog as well - https://msdn.microsoft.com/en-us/library/windows/desktop/bb762115%28v=vs.85%29.aspx
-#define windowHWND(w) ((HWND) uiControlHandle(uiControl(w)))
+#define windowHWND(w) (w ? (HWND) uiControlHandle(uiControl(w)) : NULL)
char *commonItemDialog(HWND parent, REFCLSID clsid, REFIID iid, char* filter, char* initpath, FILEOPENDIALOGOPTIONS optsadd)
{
diff --git a/src/libui_sdl/libui/windows/window.cpp b/src/libui_sdl/libui/windows/window.cpp
index 07496b3..e126efc 100644
--- a/src/libui_sdl/libui/windows/window.cpp
+++ b/src/libui_sdl/libui/windows/window.cpp
@@ -482,6 +482,12 @@ void uiWindowSetMargined(uiWindow *w, int margined)
windowRelayout(w);
}
+
+void uiWindowSetDropTarget(uiWindow* w, int drop)
+{
+ DragAcceptFiles(w->hwnd, drop?TRUE:FALSE);
+}
+
// see http://blogs.msdn.com/b/oldnewthing/archive/2003/09/11/54885.aspx and http://blogs.msdn.com/b/oldnewthing/archive/2003/09/13/54917.aspx
// TODO use clientSizeToWindowSize()
static void setClientSize(uiWindow *w, int width, int height, BOOL hasMenubar, DWORD style, DWORD exstyle)