Rename OG_W32 to OG_WIN32.

This commit is contained in:
Jonathan Schleifer 2012-01-05 15:50:28 +01:00
parent 3c7d8d51ac
commit 50c5df7fa2
4 changed files with 10 additions and 13 deletions

View file

@ -23,7 +23,7 @@
#import "OGWidget.h" #import "OGWidget.h"
#ifdef OG_W32 #ifdef OG_WIN32
typedef struct s_OGBoxChild typedef struct s_OGBoxChild
{ {
HWND hwnd; HWND hwnd;
@ -37,7 +37,7 @@ typedef struct s_OGBoxChild
#endif #endif
@interface OGBox: OGWidget @interface OGBox: OGWidget
#ifdef OG_W32 #ifdef OG_WIN32
{ OGBoxChild *firstBorn; } { OGBoxChild *firstBorn; }
- (void)resizeChildren; - (void)resizeChildren;
#endif #endif

View file

@ -43,7 +43,7 @@
id <OGComboBoxDataSource> dataSource; id <OGComboBoxDataSource> 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(). //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... //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; - initWithParent : (OGWidget *)parent;

View file

@ -21,10 +21,9 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifdef OG_GTK #if defined(OG_GTK)
# include <gtk/gtk.h> # include <gtk/gtk.h>
#endif #elif defined(OG_WIN32)
#ifdef OG_W32
# include <windows.h> # include <windows.h>
#endif #endif
@ -33,10 +32,9 @@
@interface OGWidget: OFObject @interface OGWidget: OFObject
{ {
@public @public
#ifdef OG_GTK #if defined(OG_GTK)
GtkWidget *widget; GtkWidget *widget;
#endif #elif defined(OG_WIN32)
#ifdef OG_W32
HWND widget; HWND widget;
#endif #endif
} }
@ -45,9 +43,8 @@
- (void)hide; - (void)hide;
@end @end
#ifdef OG_GTK #if defined(OG_GTK)
extern void og_destroy(GtkWidget*, OGWidget*); extern void og_destroy(GtkWidget*, OGWidget*);
#endif #elif defined(OG_WIN32)
#ifdef OG_W32
extern void og_destroy(HWND widget, OGWidget *object); extern void og_destroy(HWND widget, OGWidget *object);
#endif #endif

View file

@ -3,7 +3,7 @@ PREFIX ?= /usr/local
all : test.exe all : test.exe
%.o : %.m %.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 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` gcc -mwindows -o test.exe *.o `objfw-config --libs`