From b854f5bcb097fb6bd873b41968a0f5a5b038ad17 Mon Sep 17 00:00:00 2001 From: Freddie Witherden Date: Fri, 1 Aug 2008 09:15:43 +0000 Subject: [PATCH] Remove some dodgy forward declarations from betawidget. git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5721 4a71c877-e1ca-e34f-864e-861f7616d084 --- lib/betawidget/hBox.h | 6 ++---- lib/betawidget/keycode.h | 10 ++++------ lib/betawidget/spacer.h | 6 ++---- lib/betawidget/widget.h | 11 ++++------- 4 files changed, 12 insertions(+), 21 deletions(-) diff --git a/lib/betawidget/hBox.h b/lib/betawidget/hBox.h index a15b0285b..06f2dee45 100644 --- a/lib/betawidget/hBox.h +++ b/lib/betawidget/hBox.h @@ -9,17 +9,15 @@ typedef struct _hBox hBox; typedef struct _hBoxVtbl hBoxVtbl; -typedef enum _vAlign vAlign; - /* * The possible vertical sides a child can be aligned to */ -enum _vAlign +typedef enum { TOP, MIDDLE, BOTTOM -}; +} vAlign; struct _hBoxVtbl { diff --git a/lib/betawidget/keycode.h b/lib/betawidget/keycode.h index 9522aa3bc..35b89078e 100644 --- a/lib/betawidget/keycode.h +++ b/lib/betawidget/keycode.h @@ -1,12 +1,10 @@ #ifndef KEYCODE_H_ #define KEYCODE_H_ -/* - * Forward declarations +/** + * Contains the list of known keycodes for keyboard input. */ -typedef enum _eventKeycode eventKeycode; - -enum _eventKeycode +typedef enum { // `Control' keys EVT_KEYCODE_BACKSPACE, @@ -31,6 +29,6 @@ enum _eventKeycode // Unknown EVT_KEYCODE_UNKNOWN -}; +} eventKeycode; #endif /*KEYCODE_H_*/ diff --git a/lib/betawidget/spacer.h b/lib/betawidget/spacer.h index 923125c8f..c07ad5a29 100644 --- a/lib/betawidget/spacer.h +++ b/lib/betawidget/spacer.h @@ -9,16 +9,14 @@ typedef struct _spacer spacer; typedef struct _spacerVtbl spacerVtbl; -typedef enum _spacerDirection spacerDirection; - /* * The directions a spacer can act in */ -enum _spacerDirection +typedef enum { SPACER_DIRECTION_HORIZONTAL, SPACER_DIRECTION_VERTICAL -}; +} spacerDirection; struct _spacerVtbl { diff --git a/lib/betawidget/widget.h b/lib/betawidget/widget.h index 0819196ad..e35c8034d 100644 --- a/lib/betawidget/widget.h +++ b/lib/betawidget/widget.h @@ -29,9 +29,6 @@ typedef struct _classInfo classInfo; typedef struct _widget widget; typedef struct _widgetVtbl widgetVtbl; -typedef enum _eventType eventType; -typedef enum _mouseButton mouseButton; - typedef struct _event event; typedef struct _eventMouse eventMouse; typedef struct _eventMouseBtn eventMouseBtn; @@ -57,7 +54,7 @@ struct _classInfo /* * The valid event types */ -enum _eventType +typedef enum { // Mouse events EVT_MOUSE_DOWN, @@ -83,19 +80,19 @@ enum _eventType // Misc EVT_FOCUS, EVT_BLUR -}; +} eventType; /* * The possible mouse states as understood by the events system */ -enum _mouseButton +typedef enum { BUTTON_LEFT, BUTTON_RIGHT, BUTTON_WHEEL_UP, BUTTON_WHEEL_DOWN, BUTTON_OTHER -}; +} mouseButton; /* * Event structures