summaryrefslogtreecommitdiff
path: root/window.h
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-12-29 13:59:48 +0000
committerDarkvater <darkvater@openttd.org>2006-12-29 13:59:48 +0000
commit649b25bd11434a9631d6f3a29f2d9fb36b2880de (patch)
treefe64ccf24044b6f9be0f7d19f02e41bbde9dac4a /window.h
parent5bb559a978712b872873b78b2c5e75ded06f3913 (diff)
downloadopenttd-649b25bd11434a9631d6f3a29f2d9fb36b2880de.tar.xz
(svn r7616) -Cleanup:
-(re)set _rename_[id/what] to -1 to catch invalid calls (main_gui.c) -Only invalidate widget of pause/ff instead of whole window (main_gui.c) -Remove numbering from WE_ and WC_ as it's not needed, also remove non-existing windowclasses (window.h, openttd.h) -Give names to some of the enums (window.h) -In UninitWindowSystem not only free malloc'd widgets, but also reset the z-array (window.c) -Some coding style, comments, etc.
Diffstat (limited to 'window.h')
-rw-r--r--window.h58
1 files changed, 29 insertions, 29 deletions
diff --git a/window.h b/window.h
index ce1114e7d..a4756d6cc 100644
--- a/window.h
+++ b/window.h
@@ -86,33 +86,33 @@ typedef enum FrameFlags {
void DrawFrameRect(int left, int top, int right, int bottom, int color, FrameFlags flags);
enum WindowEventCodes {
- WE_CLICK = 0,
- WE_PAINT = 1,
- WE_MOUSELOOP = 2,
- WE_TICK = 3,
- WE_4 = 4,
- WE_TIMEOUT = 5,
- WE_PLACE_OBJ = 6,
- WE_ABORT_PLACE_OBJ = 7,
- WE_DESTROY = 8,
- WE_ON_EDIT_TEXT = 9,
- WE_POPUPMENU_SELECT = 10,
- WE_POPUPMENU_OVER = 11,
- WE_DRAGDROP = 12,
- WE_PLACE_DRAG = 13,
- WE_PLACE_MOUSEUP = 14,
- WE_PLACE_PRESIZE = 15,
- WE_DROPDOWN_SELECT = 16,
- WE_RCLICK = 17,
- WE_KEYPRESS = 18,
- WE_CREATE = 19,
- WE_MOUSEOVER = 20,
- WE_ON_EDIT_TEXT_CANCEL = 21,
- WE_RESIZE = 22,
- WE_MESSAGE = 23,
- WE_SCROLL = 24,
- WE_MOUSEWHEEL = 25,
- WE_INVALIDATE_DATA = 26,
+ WE_CREATE,
+ WE_DESTROY,
+ WE_PAINT,
+ WE_KEYPRESS,
+ WE_CLICK,
+ WE_RCLICK,
+ WE_MOUSEOVER,
+ WE_MOUSELOOP,
+ WE_MOUSEWHEEL,
+ WE_TICK,
+ WE_4,
+ WE_TIMEOUT,
+ WE_PLACE_OBJ,
+ WE_ABORT_PLACE_OBJ,
+ WE_ON_EDIT_TEXT,
+ WE_ON_EDIT_TEXT_CANCEL,
+ WE_POPUPMENU_SELECT,
+ WE_POPUPMENU_OVER,
+ WE_DRAGDROP,
+ WE_PLACE_DRAG,
+ WE_PLACE_MOUSEUP,
+ WE_PLACE_PRESIZE,
+ WE_DROPDOWN_SELECT,
+ WE_RESIZE,
+ WE_MESSAGE,
+ WE_SCROLL,
+ WE_INVALIDATE_DATA,
};
struct WindowEvent {
@@ -263,7 +263,7 @@ typedef struct WindowDesc {
WindowProc *proc;
} WindowDesc;
-enum {
+enum WindowDefaultFlag {
WDF_STD_TOOLTIPS = 1, /* use standard routine when displaying tooltips */
WDF_DEF_WIDGET = 2, /* default widget control for some widgets in the on click event */
WDF_STD_BTN = 4, /* default handling for close and drag widgets (widget no 0 and 1) */
@@ -274,7 +274,7 @@ enum {
};
/* can be used as x or y coordinates to cause a specific placement */
-enum {
+enum WindowDefaultPosition {
WDP_AUTO = -1, ///< Find a place automatically
WDP_CENTER = -2, ///< Center the window (left/right or top/bottom)
WDP_ALIGN_TBR = -3, ///< Align the right side of the window with the right side of the main toolbar