diff options
| author | Pietro Gagliardi <[email protected]> | 2015-04-16 20:33:28 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2015-04-16 20:33:28 -0400 |
| commit | e34c561ed5bedeb180437ec165882b98d70d38c1 (patch) | |
| tree | d095e5db16d7a23e883526c8c1d3c524639c97cf /new/windows/main.c | |
| parent | de9d72299fb89a8b6cdc8963cd6b6ae708a81e80 (diff) | |
Split the rewrite into a new repository.
Diffstat (limited to 'new/windows/main.c')
| -rw-r--r-- | new/windows/main.c | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/new/windows/main.c b/new/windows/main.c deleted file mode 100644 index bd973b7..0000000 --- a/new/windows/main.c +++ /dev/null @@ -1,56 +0,0 @@ -// 6 april 2015 -#include "uipriv_windows.h" - -// #qo LDFLAGS: -luser32 -lkernel32 -lgdi32 -luxtheme -lmsimg32 -lcomdlg32 -lole32 -loleaut32 -loleacc -luuid - -static void uimsgloop_else(MSG *msg) -{ - TranslateMessage(msg); - DispatchMessage(msg); -} - -void uiMain(void) -{ - MSG msg; - int res; - HWND active, focus; - - for (;;) { - SetLastError(0); - res = GetMessageW(&msg, NULL, 0, 0); - if (res < 0) - logLastError("error calling GetMessage() in uiMain()"); - if (res == 0) // WM_QUIT - break; - active = GetActiveWindow(); - if (active == NULL) { - uimsgloop_else(&msg); - continue; - } - - // bit of logic involved here: - // we don't want dialog messages passed into Areas, so we don't call IsDialogMessageW() there - // as for Tabs, we can't have both WS_TABSTOP and WS_EX_CONTROLPARENT set at the same time, so we hotswap the two styles to get the behavior we want - focus = GetFocus(); - if (focus != NULL) { -/*TODO switch (windowClassOf(focus, areaWindowClass, WC_TABCONTROLW, NULL)) { - case 0: // areaWindowClass - uimsgloop_area(active, focus, &msg); - continue; - case 1: // WC_TABCONTROLW - uimsgloop_tab(active, focus, &msg); - continue; - } - // else fall through -*/ } - - if (IsDialogMessage(active, &msg) != 0) - continue; - uimsgloop_else(&msg); - } -} - -void uiQuit(void) -{ - PostQuitMessage(0); -} |
