File maelstrom-3.0.6-buttonlist.h.patch of Package maelstrom

--- buttonlist.h.orig	2000-01-25 17:41:32.000000000 +0100
+++ buttonlist.h	2014-09-28 22:12:27.132970546 +0200
@@ -7,6 +7,13 @@
 class ButtonList {
 
 public:
+	typedef struct _button {
+		/* Sensitive area */
+		Uint16 x1, y1;
+		Uint16 x2, y2;
+		void (*callback)(void);
+		struct _button *next;
+	} button;
 	ButtonList() {
 		button_list.next = NULL;
 	}
@@ -16,7 +23,7 @@
 
 	void Add_Button(Uint16 x, Uint16 y, Uint16 width, Uint16 height, 
 						void (*callback)(void)) {
-		struct button *belem;
+		button *belem;
 		
 		for ( belem=&button_list; belem->next; belem=belem->next );
 		belem->next = new button;
@@ -30,7 +37,7 @@
 	}
 
 	void Activate_Button(Uint16 x, Uint16 y) {
-		struct button *belem;
+		button *belem;
 
 		for ( belem=button_list.next; belem; belem=belem->next ) {
 			if ( (x >= belem->x1) && (x <= belem->x2) &&
@@ -42,7 +49,7 @@
 	}
 
 	void Delete_Buttons(void) {
-		struct button *belem, *btemp;
+		button *belem, *btemp;
 
 		for ( belem=button_list.next; belem; ) {
 			btemp = belem;
@@ -53,12 +60,5 @@
 	}
 	
 private:
-	typedef struct button {
-		/* Sensitive area */
-		Uint16 x1, y1;
-		Uint16 x2, y2;
-		void (*callback)(void);
-		struct button *next;
-	} button;
 	button button_list;
 };
openSUSE Build Service is sponsored by