diff options
author | tron <tron@openttd.org> | 2005-11-04 14:01:44 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-11-04 14:01:44 +0000 |
commit | 62d7732273ea4995daa0995bb3ca4d603ab246e9 (patch) | |
tree | 94036419d0b866ef6fe6d7149db3843948569f88 /window.c | |
parent | 081bae03d92ca9598a61fa801d51c9a67e0442b6 (diff) | |
download | openttd-62d7732273ea4995daa0995bb3ca4d603ab246e9.tar.xz |
(svn r3133) - static, const
- remove long unused stuff and bogus comments
- complement struct typedefs
- remove read-only (_demo_mode) and unused (_fix_mouse_at) global variables
Diffstat (limited to 'window.c')
-rw-r--r-- | window.c | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -23,7 +23,8 @@ void HandleButtonClick(Window *w, byte widget) InvalidateWidget(w, widget); } -void DispatchLeftClickEvent(Window *w, int x, int y) { +static void DispatchLeftClickEvent(Window* w, int x, int y) +{ WindowEvent e; const Widget *wi; @@ -83,7 +84,8 @@ void DispatchLeftClickEvent(Window *w, int x, int y) { w->wndproc(w, &e); } -void DispatchRightClickEvent(Window *w, int x, int y) { +static void DispatchRightClickEvent(Window* w, int x, int y) +{ WindowEvent e; /* default tooltips handler? */ @@ -110,7 +112,7 @@ void DispatchRightClickEvent(Window *w, int x, int y) { * @param widget the widget where the scrollwheel was used * @param wheel scroll up or down */ -void DispatchMouseWheelEvent(Window *w, int widget, int wheel) +static void DispatchMouseWheelEvent(Window* w, int widget, int wheel) { const Widget *wi1, *wi2; Scrollbar *sb; @@ -373,7 +375,7 @@ static Window *ForceFindDeletableWindow(void) } } -bool IsWindowOfPrototype(Window *w, const Widget *widget) +bool IsWindowOfPrototype(const Window* w, const Widget* widget) { return (w->original_widget == widget); } @@ -872,6 +874,9 @@ static bool HandleMouseOver(void) return true; } + +static bool _dragging_window; + static bool HandleWindowDragging(void) { Window *w; @@ -1291,7 +1296,7 @@ static Window *MaybeBringWindowToFront(Window *w) * @param wparam Specifies additional message-specific information * @param lparam Specifies additional message-specific information */ -void SendWindowMessageW(Window *w, uint msg, uint wparam, uint lparam) +static void SendWindowMessageW(Window* w, uint msg, uint wparam, uint lparam) { WindowEvent e; @@ -1557,7 +1562,7 @@ void InvalidateWindow(byte cls, WindowNumber number) } } -void InvalidateWidget(Window *w, byte widget_index) +void InvalidateWidget(const Window* w, byte widget_index) { const Widget *wi = &w->widget[widget_index]; |