diff options
author | rubidium <rubidium@openttd.org> | 2007-07-29 22:57:40 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-07-29 22:57:40 +0000 |
commit | cffc67aae848a6c74be6f7c0c0caf57a889cbacc (patch) | |
tree | b063f4be9838d39de1cb48198a097e4fc2018a08 /src/window.h | |
parent | 809238e634bf1f23381fc7db127506bc0a7196f8 (diff) | |
download | openttd-cffc67aae848a6c74be6f7c0c0caf57a889cbacc.tar.xz |
(svn r10730) -Codechange: allow (some) arbitrary data to be send to the WE_CREATE event.
Diffstat (limited to 'src/window.h')
-rw-r--r-- | src/window.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/window.h b/src/window.h index 60173560c..a441dd6eb 100644 --- a/src/window.h +++ b/src/window.h @@ -127,7 +127,11 @@ enum WindowEventCodes { struct WindowEvent { byte event; union { - struct{ + struct { + void *data; + } create; + + struct { Point pt; int widget; } click; @@ -581,10 +585,11 @@ Window *AllocateWindow( int height, WindowProc *proc, WindowClass cls, - const Widget *widget); + const Widget *widget, + void *data = NULL); -Window *AllocateWindowDesc(const WindowDesc *desc); -Window *AllocateWindowDescFront(const WindowDesc *desc, int window_number); +Window *AllocateWindowDesc(const WindowDesc *desc, void *data = NULL); +Window *AllocateWindowDescFront(const WindowDesc *desc, int window_number, void *data = NULL); void DrawWindowViewport(const Window *w); void ResizeWindow(Window *w, int x, int y); |