From 8f51e01b4c1aab2cb533ea6b5281ce0878a07f69 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 30 May 2015 21:30:40 -0400 Subject: [PATCH] Completed the migration of windows/window.c. --- redo/{ => migrated}/windows/window.c | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) rename redo/{ => migrated}/windows/window.c (90%) diff --git a/redo/windows/window.c b/redo/migrated/windows/window.c similarity index 90% rename from redo/windows/window.c rename to redo/migrated/windows/window.c index 3b2a84f9..808c57b8 100644 --- a/redo/windows/window.c +++ b/redo/migrated/windows/window.c @@ -240,8 +240,7 @@ uiWindow *uiNewWindow(const char *title, int width, int height, int hasMenubar) WCHAR *wtitle; BOOL hasMenubarBOOL; - w = uiNew(struct window); - uiTyped(w)->Type = uiTypeWindow(); + w = (struct window *) uiWindowsNewSingleHWNDControl(uiTypeWindow()); hasMenubarBOOL = FALSE; if (hasMenubar) @@ -277,24 +276,11 @@ uiWindow *uiNewWindow(const char *title, int width, int height, int hasMenubar) w->onClosing = defaultOnClosing; - uiControl(w)->Destroy = windowDestroy; uiControl(w)->Handle = windowHandle; - uiControl(w)->Parent = windowParent; - uiControl(w)->SetParent = windowSetParent; - uiControl(w)->PreferredSize = windowPreferredSize; - uiControl(w)->Resize = windowResize; - uiControl(w)->QueueResize = windowQueueResize; - uiControl(w)->Sizing = windowSizing; - uiControl(w)->ContainerVisible = windowContainerVisible; - uiControl(w)->Show = windowShow; - uiControl(w)->Hide = windowHide; - // TODO - uiControl(w)->ContainerEnabled = windowContainerVisible; - uiControl(w)->Enable = windowEnable; - uiControl(w)->Disable = windowDisable; - uiControl(w)->SysFunc = windowSysFunc; - uiControl(w)->StartZOrder = windowStartZOrder; - // TODO other methods + w->baseCommitDestroy = uiControl(w)->CommitDestroy; + uiControl(w)->CommitDestroy = windowCommitDestroy; + // simply overwrite this; TODO call the base one somehow? + uiControl(w)->CommitShow = windowCommitShow; uiWindow(w)->Title = windowTitle; uiWindow(w)->SetTitle = windowSetTitle;