From 50c5df7fa2db8b42b6ce35c91e8d919ddf8ffba5 Mon Sep 17 00:00:00 2001 From: Jonathan Schleifer Date: Thu, 5 Jan 2012 15:50:28 +0100 Subject: [PATCH] Rename OG_W32 to OG_WIN32. --- headers/OGBox.h | 4 ++-- headers/OGComboBox.h | 2 +- headers/OGWidget.h | 15 ++++++--------- win32/Makefile | 2 +- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/headers/OGBox.h b/headers/OGBox.h index f7025e5..5e03d5d 100644 --- a/headers/OGBox.h +++ b/headers/OGBox.h @@ -23,7 +23,7 @@ #import "OGWidget.h" -#ifdef OG_W32 +#ifdef OG_WIN32 typedef struct s_OGBoxChild { HWND hwnd; @@ -37,7 +37,7 @@ typedef struct s_OGBoxChild #endif @interface OGBox: OGWidget -#ifdef OG_W32 +#ifdef OG_WIN32 { OGBoxChild *firstBorn; } - (void)resizeChildren; #endif diff --git a/headers/OGComboBox.h b/headers/OGComboBox.h index 5c9ccc2..3a88390 100644 --- a/headers/OGComboBox.h +++ b/headers/OGComboBox.h @@ -43,7 +43,7 @@ id dataSource; } -#ifdef OG_W32 +#ifdef OG_WIN32 //unfortunately, the built-in Win32 ListBox stores a pointer to it's parent (for sending selection changed notifications) during CreateWindow(). //it does not update it after a SetParent()... unless we implement a custom ListBox control i don't see a way around this... - initWithParent : (OGWidget *)parent; diff --git a/headers/OGWidget.h b/headers/OGWidget.h index fcea469..d11607f 100644 --- a/headers/OGWidget.h +++ b/headers/OGWidget.h @@ -21,10 +21,9 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifdef OG_GTK +#if defined(OG_GTK) # include -#endif -#ifdef OG_W32 +#elif defined(OG_WIN32) # include #endif @@ -33,10 +32,9 @@ @interface OGWidget: OFObject { @public -#ifdef OG_GTK +#if defined(OG_GTK) GtkWidget *widget; -#endif -#ifdef OG_W32 +#elif defined(OG_WIN32) HWND widget; #endif } @@ -45,9 +43,8 @@ - (void)hide; @end -#ifdef OG_GTK +#if defined(OG_GTK) extern void og_destroy(GtkWidget*, OGWidget*); -#endif -#ifdef OG_W32 +#elif defined(OG_WIN32) extern void og_destroy(HWND widget, OGWidget *object); #endif diff --git a/win32/Makefile b/win32/Makefile index fa8c56e..e4b3ff9 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -3,7 +3,7 @@ PREFIX ?= /usr/local all : test.exe %.o : %.m - gcc -g -DOG_W32 -I../headers -c -o $@ $^ `objfw-config --cppflags --objcflags` + gcc -g -DOG_WIN32 -I../headers -c -o $@ $^ `objfw-config --cppflags --objcflags` test.exe : OGApplication.o OGWidget.o OGWindow.o OGBox.o OGVBox.o OGHBox.o OGButton.o OGComboBox.o OGComboBoxItem.o test.o gcc -mwindows -o test.exe *.o `objfw-config --libs`