summaryrefslogtreecommitdiff
path: root/widget.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2005-09-18 20:56:44 +0000
committerDarkvater <darkvater@openttd.org>2005-09-18 20:56:44 +0000
commit8e6a911700de2875db95d254e5a5771e73ceedd7 (patch)
tree2e474d7261d3d1f3a5a381895f572bd5b78fe606 /widget.c
parent3097ee24292dc0c9fc19e98078a0403b96654787 (diff)
downloadopenttd-8e6a911700de2875db95d254e5a5771e73ceedd7.tar.xz
(svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
- change a lot of byte player types to PlayerID - beautify header files, same "#endif /* filename */" ending
Diffstat (limited to 'widget.c')
-rw-r--r--widget.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/widget.c b/widget.c
index 3f8fc7dc2..d0b331905 100644
--- a/widget.c
+++ b/widget.c
@@ -10,7 +10,7 @@
#include "gfx.h"
#include "viewport.h"
-static Point HandleScrollbarHittest(Scrollbar *sb, int top, int bottom)
+static Point HandleScrollbarHittest(const Scrollbar *sb, int top, int bottom)
{
Point pt;
int height, count, pos, cap;
@@ -135,7 +135,7 @@ void ScrollbarClickHandler(Window *w, const Widget *wi, int x, int y)
* @param x,y Window client coordinates
* @return A widget index, or -1 if no widget was found.
*/
-int GetWidgetFromPos(Window *w, int x, int y)
+int GetWidgetFromPos(const Window *w, int x, int y)
{
const Widget *wi;
int index, found_index = -1;
@@ -156,7 +156,7 @@ int GetWidgetFromPos(Window *w, int x, int y)
}
-void DrawWindowWidgets(Window *w)
+void DrawWindowWidgets(const Window *w)
{
const Widget *wi;
DrawPixelInfo *dpi = _cur_dpi;
@@ -457,7 +457,7 @@ static const Widget _dropdown_menu_widgets[] = {
{ WIDGETS_END},
};
-static int GetDropdownItem(Window *w)
+static int GetDropdownItem(const Window *w)
{
uint item;
int y;