# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1397849193 18000
# Fri Apr 18 14:26:33 2014 -0500
# Node ID 436da9915ef75995539303661dc8a84ce6885cea
# Parent 5eceb5b8043a7a763ac0c1e18fbac272477670f5
gtk: try to use quartz
diff --git a/admin/Makefile.def b/admin/Makefile.def
a
|
b
|
ifeq ($(GAG_USE_XML),yes) |
554 | 554 | else |
555 | 555 | GUI_LIBS = |
556 | 556 | GUI_SYS_LIBS = |
557 | 557 | ifeq ($(GAG_USE_GTK),yes) |
558 | 558 | ifndef GTK_CFLAGS |
559 | | GTK_CFLAGS = $(shell pkg-config --cflags gtk+-2.0 gthread-2.0) |
| 559 | GTK_CFLAGS = $(shell pkg-config --cflags gtk+-2.0 gthread-2.0 gdk-quartz-2.0) |
560 | 560 | endif |
561 | 561 | ifndef GTK_LIBS |
562 | | GTK_LIBS = $(shell pkg-config --libs gtk+-2.0 gthread-2.0) |
| 562 | GTK_LIBS = $(shell pkg-config --libs gtk+-2.0 gthread-2.0 gdk-quartz-2.0) |
563 | 563 | endif |
564 | 564 | |
565 | 565 | GUI_DIRS += ggtk |
566 | 566 | GUI_LIBS += -lggtk |
567 | 567 | GUI_SYS_LIBS += $(GTK_LIBS) |
diff --git a/kernel/lib/ggtk/Makefile b/kernel/lib/ggtk/Makefile
a
|
b
|
LIB_C_OBJECTS = gtk-dialog.o gtk-menu.o |
17 | 17 | # hsvcontrol.o |
18 | 18 | |
19 | 19 | #LIB_EXPORTS = dialog.h xm-menu.h hsvcontrol.h |
20 | 20 | |
21 | 21 | #LOCAL_CFLAGS = -I.. -DGAG_USE_CAIRO |
22 | | LOCAL_CFLAGS = -I.. $(GTK_CFLAGS) |
| 22 | LOCAL_CFLAGS = -I.. $(GTK_CFLAGS) -x objective-c |
23 | 23 | |
24 | 24 | # avoid make depend on GTK |
25 | 25 | depend: LOCAL_CFLAGS = -I.. |
26 | 26 | |
27 | 27 | LIB_DEPENDS = -lgtv -lggui -lgcore -lgsys |
diff --git a/kernel/lib/ggtk/gtk-menu.c b/kernel/lib/ggtk/gtk-menu.c
a
|
b
|
|
5 | 5 | #include "gcore/glaunch.h" |
6 | 6 | |
7 | 7 | #include <stdio.h> |
8 | 8 | #include <stdlib.h> |
9 | 9 | #include <string.h> |
| 10 | |
10 | 11 | #ifndef WIN32 |
11 | 12 | #include <unistd.h> |
12 | 13 | #endif /* WIN32 */ |
| 14 | |
13 | 15 | #include <gtk/gtk.h> |
14 | | #ifndef WIN32 |
15 | | #include <gdk/gdkx.h> |
16 | | #define GGTK_PATH_MAX PATH_MAX |
17 | | #else /* WIN32 */ |
18 | | #include <gdk/gdkwin32.h> |
19 | | #define GGTK_PATH_MAX MAX_PATH |
20 | | #define strdup _strdup |
| 16 | |
| 17 | #ifdef WIN32 |
| 18 | #include <gdk/gdkwin32.h> |
| 19 | #define GGTK_PATH_MAX MAX_PATH |
| 20 | #define strdup _strdup |
| 21 | #elif defined(GDK_WINDOWING_X11) |
| 22 | #include <gdk/gdkx.h> |
| 23 | #define GGTK_PATH_MAX PATH_MAX |
| 24 | #elif defined(GDK_WINDOWING_QUARTZ) |
| 25 | #include <gdk/gdkquartz.h> |
| 26 | #define GGTK_PATH_MAX PATH_MAX |
21 | 27 | #endif /* WIN32 */ |
22 | 28 | |
23 | 29 | static void send_command( GtkWidget *w, char *command) |
24 | 30 | { |
25 | 31 | if (sic_post_command_text( command) == -1) { |
diff --git a/kernel/lib/ggtk/gtk-toolbar.c b/kernel/lib/ggtk/gtk-toolbar.c
a
|
b
|
|
8 | 8 | #include "gtk-graph.h" |
9 | 9 | #include "gtv/event-stack.h" |
10 | 10 | #include <stdio.h> |
11 | 11 | #include <stdlib.h> |
12 | 12 | #include <string.h> |
13 | | #ifndef WIN32 |
14 | | #include <gdk/gdkx.h> |
15 | | #else /* WIN32 */ |
16 | | #include <gdk/gdkwin32.h> |
| 13 | |
| 14 | #ifdef WIN32 |
| 15 | #include <gdk/gdkwin32.h> |
| 16 | #define GGTK_PATH_MAX MAX_PATH |
| 17 | #define strdup _strdup |
| 18 | #elif defined(GDK_WINDOWING_X11) |
| 19 | #include <gdk/gdkx.h> |
| 20 | #define GGTK_PATH_MAX PATH_MAX |
| 21 | #elif defined(GDK_WINDOWING_QUARTZ) |
| 22 | #include <gdk/gdkquartz.h> |
| 23 | #define GGTK_PATH_MAX PATH_MAX |
17 | 24 | #endif /* WIN32 */ |
18 | 25 | |
19 | 26 | #undef GGTK_USE_MENU_BAR |
20 | 27 | |
21 | 28 | GdkColor ggtk_black = {0, 0, 0, 0}; |