summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrhlabs <rhlabs>1998-03-10 23:54:34 +0000
committerrhlabs <rhlabs>1998-03-10 23:54:34 +0000
commit7e9987889878cd46520e60ef9e77318d77638b0f (patch)
treedee640ee073beea7b41b2cfc00b25e5dbc510d1d
parentcf31df990ba209cd2396d9a5cd4139640d70902e (diff)
downloadgtk+-7e9987889878cd46520e60ef9e77318d77638b0f.tar.gz
commiting all the things necessary for the themes proposal
commiting all the things necessary for the themes proposal
-rwxr-xr-xgtk/COMPILE_THEME11
-rwxr-xr-xgtk/COMPILE_THEME213
-rw-r--r--gtk/Makefile.am4
-rw-r--r--gtk/THEMES.README32
-rw-r--r--gtk/gtkbutton.c301
-rw-r--r--gtk/gtkcontainer.h4
-rw-r--r--gtk/gtkmain.c6
-rw-r--r--gtk/gtkprivate.h3
-rw-r--r--gtk/gtkthemes.c121
-rw-r--r--gtk/gtkthemes.h70
-rw-r--r--gtk/theme2_button.c176
-rw-r--r--gtk/theme2_main.c85
-rw-r--r--gtk/theme_btn1.xpm106
-rw-r--r--gtk/theme_btn2.xpm157
-rw-r--r--gtk/theme_btn3.xpm106
-rw-r--r--gtk/theme_button.c167
-rw-r--r--gtk/theme_button.xpm106
-rw-r--r--gtk/theme_button2.xpm110
-rw-r--r--gtk/theme_led_off1.xpm86
-rw-r--r--gtk/theme_led_off2.xpm80
-rw-r--r--gtk/theme_led_on1.xpm96
-rw-r--r--gtk/theme_led_on2.xpm96
-rw-r--r--gtk/theme_main.c47
23 files changed, 1782 insertions, 201 deletions
diff --git a/gtk/COMPILE_THEME b/gtk/COMPILE_THEME
new file mode 100755
index 0000000000..5dd07ed199
--- /dev/null
+++ b/gtk/COMPILE_THEME
@@ -0,0 +1,11 @@
+gcc -c theme_button.c -o theme_button.lo \
+ -I. -I.. -I../glib -I/usr/X11R6/include \
+ -g -O2 -DGTK_NO_CHECK_CASTS -Wall -DUSE_XIM -c -fPIC -DPIC
+gcc -c theme_main.c -o theme_main.lo \
+ -I. -I.. -I../glib -I/usr/X11R6/include \
+ -g -O2 -DGTK_NO_CHECK_CASTS -Wall -DUSE_XIM -c -fPIC -DPIC
+
+/bin/sh ../libtool --mode=link gcc -g -O2 -DGTK_NO_CHECK_CASTS -Wall \
+-DUSE_XIM -o libtheme.la -rpath /usr/local/lib -version-info 1:0:0 \
+theme_button.lo \
+theme_main.lo
diff --git a/gtk/COMPILE_THEME2 b/gtk/COMPILE_THEME2
new file mode 100755
index 0000000000..aff199f4c3
--- /dev/null
+++ b/gtk/COMPILE_THEME2
@@ -0,0 +1,13 @@
+gcc -c theme2_button.c -o theme2_button.lo \
+ -I. -I.. -I../glib -I/usr/X11R6/include \
+ -g -O2 -DGTK_NO_CHECK_CASTS -Wall -DUSE_XIM -c -fPIC -DPIC
+gcc -c theme2_main.c -o theme2_main.lo \
+ -I. -I.. -I../glib -I/usr/X11R6/include \
+ -g -O2 -DGTK_NO_CHECK_CASTS -Wall -DUSE_XIM -c -fPIC -DPIC
+
+/bin/sh ../libtool --mode=link gcc -g -O2 -DGTK_NO_CHECK_CASTS -Wall \
+-lgdk_imlib -ljpeg -lpng -ltiff -lm -lz -lgif -lgdk -lX11 -lXext \
+-L/usr/X11/lib \
+-DUSE_XIM -o libtheme2.la -rpath /usr/local/lib -version-info 1:0:0 \
+theme2_button.lo \
+theme2_main.lo
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 77160d1e52..108b2e5f8b 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -76,6 +76,7 @@ libgtk_la_SOURCES = \
gtkstatusbar.c \
gtktable.c \
gtktext.c \
+ gtkthemes.c \
gtktipsquery.c \
gtktogglebutton.c \
gtktoolbar.c \
@@ -172,6 +173,7 @@ gtkinclude_HEADERS = \
gtkstatusbar.h \
gtktable.h \
gtktext.h \
+ gtkthemes.h \
gtktipsquery.h \
gtktogglebutton.h \
gtktoolbar.h \
@@ -197,7 +199,7 @@ gtkinclude_HEADERS = \
gtktypebuiltins.c: gtk.defs gentypeinfo.el
$(SHELL) $(srcdir)/runelisp $(srcdir)/gentypeinfo.el id $< $@
-libgtk_la_LDFLAGS = -version-info 1:0:0
+libgtk_la_LDFLAGS = -ldl -version-info 1:0:0
EXTRA_DIST = \
line-arrow.xbm \
diff --git a/gtk/THEMES.README b/gtk/THEMES.README
new file mode 100644
index 0000000000..2ad75e6fe2
--- /dev/null
+++ b/gtk/THEMES.README
@@ -0,0 +1,32 @@
+<raster@redhat.com>
+
+This is a proposal - or at least a start at one for themes.
+
+compile and install this as your gtk - cxurrently --theme theme_name is
+broken for some reason on some apps.
+
+to use a specific theme do:
+
+app --theme theme_name
+
+i have 2 themes provided here - theme and theme2
+
+theme is the default GTK look
+theme2 is an alternative look for testing purposes only.
+
+this gtk theme lib looks for the themes in ~/themes
+the themes are compile dinti .libs here called:
+libtheme.so
+libtheme2.so
+
+by defautl gtk loosk for ~/themes/libtheme2.so
+
+just for the hell of it (yes it SHOULD do libtheme.so - but this is just for
+now soo I KNOW the theme is working)
+
+you will need to compile these themes beofre runing anythng but running
+
+COMPILE_THEME
+and
+COMPILE_THEME2
+
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index ea303e0962..141028fe9d 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -16,12 +16,13 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <string.h>
+#include "gtkthemes.h"
+#include "gtkprivate.h"
#include "gtkbutton.h"
#include "gtklabel.h"
#include "gtkmain.h"
#include "gtksignal.h"
-
#define CHILD_SPACING 1
#define DEFAULT_LEFT_POS 4
#define DEFAULT_TOP_POS 4
@@ -55,8 +56,6 @@ static void gtk_button_size_request (GtkWidget *widget,
GtkRequisition *requisition);
static void gtk_button_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
-static void gtk_button_paint (GtkWidget *widget,
- GdkRectangle *area);
static void gtk_button_draw (GtkWidget *widget,
GdkRectangle *area);
static void gtk_button_draw_focus (GtkWidget *widget);
@@ -88,6 +87,11 @@ static void gtk_real_button_enter (GtkButton *button);
static void gtk_real_button_leave (GtkButton *button);
+/***--- Added */
+static void gtk_button_unrealize (GtkWidget *widget);
+/***--- End Add */
+
+
static GtkContainerClass *parent_class;
static guint button_signals[LAST_SIGNAL] = { 0 };
@@ -186,6 +190,10 @@ gtk_button_class_init (GtkButtonClass *klass)
widget_class->focus_in_event = gtk_button_focus_in;
widget_class->focus_out_event = gtk_button_focus_out;
+/***--- Added */
+ widget_class->unrealize = gtk_button_unrealize;
+/***--- End Add */
+
container_class->add = gtk_button_add;
container_class->remove = gtk_button_remove;
container_class->foreach = gtk_button_foreach;
@@ -195,6 +203,7 @@ gtk_button_class_init (GtkButtonClass *klass)
klass->clicked = NULL;
klass->enter = gtk_real_button_enter;
klass->leave = gtk_real_button_leave;
+
}
static void
@@ -240,7 +249,7 @@ gtk_button_set_arg (GtkButton *button,
GtkWidget*
gtk_button_new ()
{
- return GTK_WIDGET (gtk_type_new (gtk_button_get_type ()));
+ return GTK_WIDGET (gtk_type_new (gtk_button_get_type ()));
}
GtkWidget*
@@ -353,6 +362,9 @@ gtk_button_realize (GtkWidget *widget)
widget->style = gtk_style_attach (widget->style, widget->window);
gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
+
+ th_dat.functions.button.init(widget);
+
}
static void
@@ -365,20 +377,16 @@ gtk_button_size_request (GtkWidget *widget,
g_return_if_fail (GTK_IS_BUTTON (widget));
g_return_if_fail (requisition != NULL);
- button = GTK_BUTTON (widget);
+ th_dat.functions.button.border(GTK_WIDGET(widget));
- requisition->width = (GTK_CONTAINER (widget)->border_width + CHILD_SPACING +
- GTK_WIDGET (widget)->style->klass->xthickness) * 2;
- requisition->height = (GTK_CONTAINER (widget)->border_width + CHILD_SPACING +
- GTK_WIDGET (widget)->style->klass->ythickness) * 2;
+ button = GTK_BUTTON (widget);
- if (GTK_WIDGET_CAN_DEFAULT (widget))
- {
- requisition->width += (GTK_WIDGET (widget)->style->klass->xthickness * 2 +
- DEFAULT_SPACING);
- requisition->height += (GTK_WIDGET (widget)->style->klass->ythickness * 2 +
- DEFAULT_SPACING);
- }
+ requisition->width = (GTK_CONTAINER (widget)->border_width * 2) +
+ GTK_CONTAINER(widget)->internal_border_left +
+ GTK_CONTAINER(widget)->internal_border_right;
+ requisition->height = (GTK_CONTAINER (widget)->border_width * 2) +
+ GTK_CONTAINER(widget)->internal_border_top +
+ GTK_CONTAINER(widget)->internal_border_bottom;
if (button->child && GTK_WIDGET_VISIBLE (button->child))
{
@@ -404,7 +412,9 @@ gtk_button_size_allocate (GtkWidget *widget,
widget->allocation = *allocation;
border_width = GTK_CONTAINER (widget)->border_width;
- if (GTK_WIDGET_REALIZED (widget))
+ th_dat.functions.button.border(GTK_WIDGET(widget));
+
+ if (GTK_WIDGET_REALIZED (widget))
gdk_window_move_resize (widget->window,
widget->allocation.x + border_width,
widget->allocation.y + border_width,
@@ -413,67 +423,20 @@ gtk_button_size_allocate (GtkWidget *widget,
button = GTK_BUTTON (widget);
- if (button->child && GTK_WIDGET_VISIBLE (button->child))
- {
- child_allocation.x = (CHILD_SPACING + GTK_WIDGET (widget)->style->klass->xthickness);
- child_allocation.y = (CHILD_SPACING + GTK_WIDGET (widget)->style->klass->ythickness);
-
- child_allocation.width = widget->allocation.width - child_allocation.x * 2 -
- border_width * 2;
- child_allocation.height = widget->allocation.height - child_allocation.y * 2 -
- border_width * 2;
-
- if (GTK_WIDGET_CAN_DEFAULT (button))
- {
- child_allocation.x += (GTK_WIDGET (widget)->style->klass->xthickness +
- DEFAULT_LEFT_POS);
- child_allocation.y += (GTK_WIDGET (widget)->style->klass->ythickness +
- DEFAULT_TOP_POS);
- child_allocation.width -= (GTK_WIDGET (widget)->style->klass->xthickness * 2 +
- DEFAULT_SPACING);
- child_allocation.height -= (GTK_WIDGET (widget)->style->klass->xthickness * 2 +
- DEFAULT_SPACING);
- }
-
- gtk_widget_size_allocate (button->child, &child_allocation);
- }
-}
-
-static void
-gtk_button_paint (GtkWidget *widget,
- GdkRectangle *area)
-{
- GdkRectangle restrict_area;
- GdkRectangle new_area;
-
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GTK_IS_BUTTON (widget));
-
- if (GTK_WIDGET_DRAWABLE (widget))
- {
- restrict_area.x = GTK_WIDGET (widget)->style->klass->xthickness;
- restrict_area.y = GTK_WIDGET (widget)->style->klass->ythickness;
- restrict_area.width = (GTK_WIDGET (widget)->allocation.width - restrict_area.x * 2 -
- GTK_CONTAINER (widget)->border_width * 2);
- restrict_area.height = (GTK_WIDGET (widget)->allocation.height - restrict_area.y * 2 -
- GTK_CONTAINER (widget)->border_width * 2);
-
- if (GTK_WIDGET_CAN_DEFAULT (widget))
- {
- restrict_area.x += DEFAULT_LEFT_POS;
- restrict_area.y += DEFAULT_TOP_POS;
- restrict_area.width -= DEFAULT_SPACING;
- restrict_area.height -= DEFAULT_SPACING;
- }
-
- if (gdk_rectangle_intersect (area, &restrict_area, &new_area))
- {
- gtk_style_set_background (widget->style, widget->window, GTK_WIDGET_STATE (widget));
- gdk_window_clear_area (widget->window,
- new_area.x, new_area.y,
- new_area.width, new_area.height);
- }
- }
+ if (button->child && GTK_WIDGET_VISIBLE (button->child))
+ {
+ child_allocation.x = GTK_CONTAINER(widget)->internal_border_left;
+ child_allocation.y = GTK_CONTAINER(widget)->internal_border_top;
+
+ child_allocation.width = widget->allocation.width -
+ child_allocation.x - GTK_CONTAINER(widget)->internal_border_right -
+ border_width * 2;
+ child_allocation.height = widget->allocation.height -
+ child_allocation.y - GTK_CONTAINER(widget)->internal_border_bottom -
+ border_width * 2;
+
+ gtk_widget_size_allocate (button->child, &child_allocation);
+ }
}
static void
@@ -481,155 +444,60 @@ gtk_button_draw (GtkWidget *widget,
GdkRectangle *area)
{
GtkButton *button;
+ GdkRectangle new_area;
GdkRectangle child_area;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_BUTTON (widget));
- g_return_if_fail (area != NULL);
- if (GTK_WIDGET_DRAWABLE (widget))
+
+ if (GTK_WIDGET_DRAWABLE (widget))
{
- button = GTK_BUTTON (widget);
-
- gtk_button_paint (widget, area);
-
- if (button->child && gtk_widget_intersect (button->child, area, &child_area))
- gtk_widget_draw (button->child, &child_area);
-
- gtk_widget_draw_default (widget);
- gtk_widget_draw_focus (widget);
+ if (!area)
+ {
+ new_area.x=0;new_area.y=0;
+ new_area.width=widget->allocation.width;
+ new_area.height=widget->allocation.height;
+ }
+ if (area) th_dat.functions.button.draw(widget,area);
+ else th_dat.functions.button.draw(widget,&new_area);
+
+ button = GTK_BUTTON (widget);
+
+ if (area)
+ {
+ if (button->child && gtk_widget_intersect (button->child, area, &child_area))
+ gtk_widget_draw (button->child, &child_area);
+ }
+ else
+ {
+ if (button->child && gtk_widget_intersect (button->child, &new_area, &child_area))
+ gtk_widget_draw (button->child, &child_area);
+ }
}
}
static void
gtk_button_draw_focus (GtkWidget *widget)
{
- GtkButton *button;
- GtkShadowType shadow_type;
- gint width, height;
- gint x, y;
-
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GTK_IS_BUTTON (widget));
-
- if (GTK_WIDGET_DRAWABLE (widget))
- {
- button = GTK_BUTTON (widget);
-
- x = 0;
- y = 0;
- width = widget->allocation.width - GTK_CONTAINER (widget)->border_width * 2;
- height = widget->allocation.height - GTK_CONTAINER (widget)->border_width * 2;
-
- if (GTK_WIDGET_CAN_DEFAULT (widget))
- {
- x += widget->style->klass->xthickness;
- y += widget->style->klass->ythickness;
- width -= 2 * x + DEFAULT_SPACING;
- height -= 2 * y + DEFAULT_SPACING;
- x += DEFAULT_LEFT_POS;
- y += DEFAULT_TOP_POS;
- }
-
- if (GTK_WIDGET_HAS_FOCUS (widget))
- {
- x += 1;
- y += 1;
- width -= 2;
- height -= 2;
- }
- else
- {
- if (GTK_WIDGET_STATE (widget) == GTK_STATE_ACTIVE)
- gdk_draw_rectangle (widget->window,
- widget->style->bg_gc[GTK_WIDGET_STATE (widget)], FALSE,
- x + 1, y + 1, width - 4, height - 4);
- else
- gdk_draw_rectangle (widget->window,
- widget->style->bg_gc[GTK_WIDGET_STATE (widget)], FALSE,
- x + 2, y + 2, width - 5, height - 5);
- }
-
- if (GTK_WIDGET_STATE (widget) == GTK_STATE_ACTIVE)
- shadow_type = GTK_SHADOW_IN;
- else
- shadow_type = GTK_SHADOW_OUT;
-
- gtk_draw_shadow (widget->style, widget->window,
- GTK_WIDGET_STATE (widget), shadow_type,
- x, y, width, height);
-
- if (GTK_WIDGET_HAS_FOCUS (widget))
- {
- x -= 1;
- y -= 1;
- width += 2;
- height += 2;
-
- gdk_draw_rectangle (widget->window,
- widget->style->black_gc, FALSE,
- x, y, width - 1, height - 1);
- }
- }
+ gtk_button_draw(widget,NULL);
}
static void
gtk_button_draw_default (GtkWidget *widget)
{
- gint width, height;
- gint x, y;
-
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GTK_IS_BUTTON (widget));
-
- if (GTK_WIDGET_DRAWABLE (widget))
- {
- x = 0;
- y = 0;
- width = widget->allocation.width - GTK_CONTAINER (widget)->border_width * 2;
- height = widget->allocation.height - GTK_CONTAINER (widget)->border_width * 2;
-
- if (GTK_WIDGET_HAS_DEFAULT (widget))
- {
- gtk_draw_shadow (widget->style, widget->window,
- GTK_STATE_NORMAL, GTK_SHADOW_IN,
- x, y, width, height);
- }
- else
- {
- gdk_draw_rectangle (widget->window, widget->style->bg_gc[GTK_STATE_NORMAL],
- FALSE, x, y, width - 1, height - 1);
- gdk_draw_rectangle (widget->window, widget->style->bg_gc[GTK_STATE_NORMAL],
- FALSE, x + 1, y + 1, width - 3, height - 3);
- }
- }
+ gtk_button_draw(widget,NULL);
}
static gint
gtk_button_expose (GtkWidget *widget,
GdkEventExpose *event)
{
- GtkButton *button;
- GdkEventExpose child_event;
-
g_return_val_if_fail (widget != NULL, FALSE);
g_return_val_if_fail (GTK_IS_BUTTON (widget), FALSE);
g_return_val_if_fail (event != NULL, FALSE);
- if (GTK_WIDGET_DRAWABLE (widget))
- {
- button = GTK_BUTTON (widget);
-
- gtk_button_paint (widget, &event->area);
-
- child_event = *event;
- if (button->child && GTK_WIDGET_NO_WINDOW (button->child) &&
- gtk_widget_intersect (button->child, &event->area, &child_event.area))
- gtk_widget_event (button->child, (GdkEvent*) &child_event);
-
- gtk_widget_draw_default (widget);
- gtk_widget_draw_focus (widget);
- }
+ gtk_button_draw(widget,&event->area);
return FALSE;
}
@@ -907,3 +775,36 @@ gtk_real_button_leave (GtkButton *button)
gtk_widget_queue_draw (GTK_WIDGET (button));
}
}
+
+static void
+gtk_button_unrealize (GtkWidget *widget)
+{
+ g_return_if_fail (widget != NULL);
+ g_return_if_fail (GTK_IS_WIDGET (widget));
+
+ if (GTK_WIDGET_NO_WINDOW (widget) && GTK_WIDGET_MAPPED (widget))
+ gtk_button_unmap (widget);
+
+ GTK_WIDGET_UNSET_FLAGS (widget, GTK_REALIZED | GTK_MAPPED);
+
+
+ gtk_style_detach (widget->style);
+ if (!GTK_WIDGET_NO_WINDOW (widget))
+ {
+ gdk_window_set_user_data (widget->window, NULL);
+ gdk_window_destroy (widget->window);
+ }
+ else
+ {
+ gdk_window_unref (widget->window);
+ }
+
+ if (GTK_IS_CONTAINER (widget))
+ gtk_container_foreach (GTK_CONTAINER (widget),
+ (GtkCallback)gtk_widget_unrealize,
+ NULL);
+ th_dat.functions.button.exit(widget);
+
+ widget->window = NULL;
+}
+
diff --git a/gtk/gtkcontainer.h b/gtk/gtkcontainer.h
index 3585d20e4b..078a773796 100644
--- a/gtk/gtkcontainer.h
+++ b/gtk/gtkcontainer.h
@@ -45,6 +45,10 @@ struct _GtkContainer
GtkWidget *focus_child;
gint16 border_width;
+ gint16 internal_border_left;
+ gint16 internal_border_right;
+ gint16 internal_border_top;
+ gint16 internal_border_bottom;
guint auto_resize : 1;
guint need_resize : 1;
guint block_resize : 1;
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index cf695a5740..00044148c4 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -264,6 +264,9 @@ gtk_init (int *argc,
/* Set the 'initialized' flag.
*/
initialized = TRUE;
+
+ gtk_themes_init (argc,argv);
+
}
void
@@ -274,6 +277,8 @@ gtk_exit (int errorcode)
/* de-initialisation is done by the gtk_exit_funct(),
* no need to do this here (Alex J.)
*/
+ gtk_themes_exit(errorcode);
+
gdk_exit(errorcode);
}
@@ -1183,6 +1188,7 @@ gtk_exit_func ()
initialized = FALSE;
gtk_preview_uninit ();
}
+ gtk_themes_exit(0);
}
diff --git a/gtk/gtkprivate.h b/gtk/gtkprivate.h
index ec4bd4d0c0..7fe2c0b76c 100644
--- a/gtk/gtkprivate.h
+++ b/gtk/gtkprivate.h
@@ -21,6 +21,9 @@
#include <gtk/gtkobject.h>
#include <gtk/gtkwidget.h>
+#include <gtk/gtkthemes.h>
+
+extern GtkThemesData th_dat;
#ifdef __cplusplus
diff --git a/gtk/gtkthemes.c b/gtk/gtkthemes.c
new file mode 100644
index 0000000000..3977872492
--- /dev/null
+++ b/gtk/gtkthemes.c
@@ -0,0 +1,121 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
+ *
+ * Themes added by The Rasterman <raster@redhat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include "gtkthemes.h"
+#include "gtkbutton.h"
+#include "gtkhscrollbar.h"
+#include "gtkhseparator.h"
+#include "gtkmain.h"
+#include "gtkpreview.h"
+#include "gtkrc.h"
+#include "gtkselection.h"
+#include "gtksignal.h"
+#include "gtktable.h"
+#include "gtktext.h"
+#include "gtkvbox.h"
+#include "gtkvscrollbar.h"
+#include "gtkwidget.h"
+#include "gtkwindow.h"
+#include "gtkprivate.h"
+
+
+GtkThemesData th_dat;
+
+void
+gtk_themes_init (int *argc,
+ char ***argv)
+{
+ int i;
+ char *s,ss[1024];
+/* Reset info */
+ th_dat.theme_lib=NULL;
+ th_dat.theme_name=NULL;
+ th_dat.data=NULL;
+
+ printf("init theme\n");
+/* get the library name for the theme */
+ if ((argc)&&(argv))
+ {
+ for(i=1;i<*argc;i++)
+ {
+ if ((*argv)[i]==NULL)
+ {
+ i+=1;continue;
+ }
+/* If the program is run wiht a --theme THEME_NAME parameter it loads that */
+/* theme currently hard-coded as ".lib/libTHEME_NAME.so" jsut so it will */
+/* work for me for the moment */
+ if (strcmp("--theme",(*argv)[i])==0)
+ {
+ (*argv)[i]=NULL;
+ if (((i+1)<*argc)&&((*argv)[i+1]))
+ {
+ s=(*argv)[i+1];
+ if (s)
+ {
+ snprintf(ss,1024,"%s/themes/lib%s.so",getenv("HOME"),s);
+ th_dat.theme_name=strdup(ss);
+ }
+ (*argv)[i+1]=NULL;
+ i+=1;
+ }
+ }
+
+ }
+ }
+/* default theme name */
+ if (!th_dat.theme_name)
+ {
+ snprintf(ss,1024,"%s/themes/libtheme2.so",getenv("HOME"),s);
+ th_dat.theme_name=strdup(ss);
+ }
+ printf("%s\n",th_dat.theme_name);
+/* load the lib */
+ th_dat.theme_lib=dlopen(th_dat.theme_name,RTLD_NOW);
+ if (!th_dat.theme_lib)
+ {
+ fputs(dlerror(),stderr);
+ exit(1);
+ }
+/* extract symbols from the lib */
+ th_dat.init=dlsym(th_dat.theme_lib,"theme_init");
+ th_dat.exit=dlsym(th_dat.theme_lib,"theme_exit");
+ th_dat.functions.button.border=dlsym(th_dat.theme_lib,"button_border");
+ th_dat.functions.button.init=dlsym(th_dat.theme_lib,"button_init");
+ th_dat.functions.button.draw=dlsym(th_dat.theme_lib,"button_draw");
+ th_dat.functions.button.exit=dlsym(th_dat.theme_lib,"button_exit");
+
+/* call the theme's init (theme_init) function to let it setup anything */
+ th_dat.init(argc,argv);
+}
+
+void
+gtk_themes_exit (int errorcode)
+{
+ th_dat.exit();
+/* free the theme library name and unload the lib */
+ if (th_dat.theme_name) free(th_dat.theme_name);
+ if (th_dat.theme_lib) dlclose(th_dat.theme_lib);
+/* reset pointers to NULL */
+ th_dat.theme_name=NULL;
+ th_dat.theme_lib=NULL;
+ th_dat.data=NULL;
+}
diff --git a/gtk/gtkthemes.h b/gtk/gtkthemes.h
new file mode 100644
index 0000000000..bba698154e
--- /dev/null
+++ b/gtk/gtkthemes.h
@@ -0,0 +1,70 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
+ *
+ * Themes added by The Rasterman <raster@redhat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#ifndef __GTK_THEMES_H__
+#define __GTK_THEMES_H__
+
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <dlfcn.h>
+#include <gdk/gdk.h>
+#include <gtk/gtkwidget.h>
+
+struct _GtkWidgetThemeFunction
+{
+ void (*border)(GtkWidget *widget);
+ void (*init)(GtkWidget *widget);
+ void (*draw)(GtkWidget *widget, GdkRectangle *area);
+ void (*exit)(GtkWidget *widget);
+};
+
+struct _GtkThemesData
+{
+ gchar *theme_name;
+ void *theme_lib;
+ void (*init)(int *argc, char ***argv);
+ void (*exit)(void);
+ struct
+ {
+ struct _GtkWidgetThemeFunction button;
+ } functions;
+ void *data;
+};
+
+typedef struct _GtkThemesData GtkThemesData;
+typedef struct _GtkWidgetThemeFunction GtkWidgetThemeFunction;
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/* Initialization, exit, mainloop and miscellaneous routines
+ */
+void gtk_themes_init (int *argc,
+ char ***argv);
+void gtk_themes_exit (gint error_code);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+
+#endif /* __GTK_THEMES_H__ */
diff --git a/gtk/theme2_button.c b/gtk/theme2_button.c
new file mode 100644
index 0000000000..c9c16b1979
--- /dev/null
+++ b/gtk/theme2_button.c
@@ -0,0 +1,176 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "gtkthemes.h"
+#include "gtkprivate.h"
+#include "gtkbutton.h"
+#include "gtklabel.h"
+#include "gtkmain.h"
+#include "gtksignal.h"
+#include <gdk_imlib.h>
+
+#define CHILD_SPACING 1
+#define DEFAULT_LEFT_POS 4
+#define DEFAULT_TOP_POS 4
+#define DEFAULT_SPACING 7
+
+struct _imgs
+{
+ GdkImlibImage *im1;
+ GdkImlibImage *im2;
+ GdkImlibImage *im3;
+ GdkImlibImage *im4;
+ GdkImlibImage *im5;
+ GdkImlibImage *im6;
+ GdkImlibImage *im7;
+};
+
+struct _butinfo
+{
+ int state;
+ char has_focus;
+ char has_default;
+ int w,h;
+};
+
+/* Theme functions to export */
+void button_border (GtkWidget *widget);
+void button_init (GtkWidget *widget);
+void button_draw (GtkWidget *widget,
+ GdkRectangle *area);
+void button_exit (GtkWidget *widget);
+
+/* internals */
+
+void
+button_border (GtkWidget *widget)
+{
+ if (GTK_WIDGET_CAN_DEFAULT (widget))
+ {
+ GTK_CONTAINER(widget)->internal_border_left=26;
+ GTK_CONTAINER(widget)->internal_border_right=6;
+ GTK_CONTAINER(widget)->internal_border_top=6;
+ GTK_CONTAINER(widget)->internal_border_bottom=6;
+ }
+ else
+ {
+ GTK_CONTAINER(widget)->internal_border_left=4;
+ GTK_CONTAINER(widget)->internal_border_right=4;
+ GTK_CONTAINER(widget)->internal_border_top=4;
+ GTK_CONTAINER(widget)->internal_border_bottom=4;
+ }
+}
+
+void
+button_init (GtkWidget *widget)
+{
+ struct _butinfo *bi;
+
+ bi=malloc(sizeof(struct _butinfo));
+ GTK_CONTAINER(widget)->border_width=0;
+ gtk_object_set_data(GTK_OBJECT(widget),"gtk-widget-theme-data",bi);
+ bi->w=-1;bi->h=-1;bi->state=-1;bi->has_focus=-1;bi->has_default=1;
+}
+
+void
+button_draw (GtkWidget *widget,
+ GdkRectangle *area)
+{
+ GdkRectangle restrict_area;
+ GdkRectangle new_area;
+ GtkShadowType shadow_type;
+ gint width, height;
+ gint x, y;
+ struct _imgs *imgs;
+ struct _butinfo *bi;
+
+ /*
+ * State
+ *
+ * GTK_STATE_NORMAL,
+ * GTK_STATE_ACTIVE,
+ * GTK_STATE_PRELIGHT,
+ * GTK_STATE_SELECTED,
+ * GTK_STATE_INSENSITIVE
+ */
+
+ bi=gtk_object_get_data(GTK_OBJECT(widget),"gtk-widget-theme-data");
+ imgs=th_dat.data;
+ if ((bi->w!=widget->allocation.width)||(bi->h!=widget->allocation.height)||
+ (bi->state!=GTK_WIDGET_STATE(widget))||
+ (bi->has_focus!=GTK_WIDGET_HAS_FOCUS(widget))||
+ (bi->has_default!=GTK_WIDGET_CAN_DEFAULT(widget)))
+ {
+ if (GTK_WIDGET_STATE(widget)==GTK_STATE_ACTIVE)
+ gdk_imlib_apply_image(imgs->im3,widget->window);
+ else if (GTK_WIDGET_STATE(widget)==GTK_STATE_PRELIGHT)
+ gdk_imlib_apply_image(imgs->im1,widget->window);
+ else
+ gdk_imlib_apply_image(imgs->im2,widget->window);
+ bi->w=widget->allocation.width;
+ bi->h=widget->allocation.height;
+ bi->state=GTK_WIDGET_STATE(widget);
+ bi->has_focus=GTK_WIDGET_HAS_FOCUS(widget);
+ bi->has_default=GTK_WIDGET_CAN_DEFAULT(widget);
+ }
+ if (GTK_WIDGET_HAS_DEFAULT(widget))
+ {
+ if (GTK_WIDGET_STATE(widget)==GTK_STATE_ACTIVE)
+ gdk_imlib_paste_image(imgs->im6,widget->window,6,
+ (widget->allocation.height>>1)-6,
+ 12,12);
+ else if (GTK_WIDGET_STATE(widget)==GTK_STATE_PRELIGHT)
+ gdk_imlib_paste_image(imgs->im6,widget->window,6,
+ (widget->allocation.height>>1)-6,
+ 12,12);
+ else
+ gdk_imlib_paste_image(imgs->im7,widget->window,6,
+ (widget->allocation.height>>1)-6,
+ 12,12);
+ }
+ else if (GTK_WIDGET_CAN_DEFAULT(widget))
+ {
+ if (GTK_WIDGET_STATE(widget)==GTK_STATE_ACTIVE)
+ gdk_imlib_paste_image(imgs->im4,widget->window,6,
+ (widget->allocation.height>>1)-6,
+ 12,12);
+ else if (GTK_WIDGET_STATE(widget)==GTK_STATE_PRELIGHT)
+ gdk_imlib_paste_image(imgs->im4,widget->window,6,
+ (widget->allocation.height>>1)-6,
+ 12,12);
+ else
+ gdk_imlib_paste_image(imgs->im5,widget->window,6,
+ (widget->allocation.height>>1)-6,
+ 12,12);
+ }
+ return;
+
+}
+
+void
+button_exit (GtkWidget *widget)
+{
+ struct _butinfo *bi;
+
+ bi=gtk_object_get_data(GTK_OBJECT(widget),"gtk-widget-theme-data");
+ free(bi);
+ gtk_object_remove_data(GTK_OBJECT(widget),"gtk-widget-theme-data");
+}
+
diff --git a/gtk/theme2_main.c b/gtk/theme2_main.c
new file mode 100644
index 0000000000..4e82b0a3f6
--- /dev/null
+++ b/gtk/theme2_main.c
@@ -0,0 +1,85 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "gtkthemes.h"
+#include "gtkprivate.h"
+#include "gtkbutton.h"
+#include "gtklabel.h"
+#include "gtkmain.h"
+#include "gtksignal.h"
+#include <gdk_imlib.h>
+#include "theme_btn1.xpm"
+#include "theme_btn2.xpm"
+#include "theme_btn3.xpm"
+#include "theme_led_off1.xpm"
+#include "theme_led_off2.xpm"
+#include "theme_led_on1.xpm"
+#include "theme_led_on2.xpm"
+
+struct _imgs
+{
+ GdkImlibImage *im1;
+ GdkImlibImage *im2;
+ GdkImlibImage *im3;
+ GdkImlibImage *im4;
+ GdkImlibImage *im5;
+ GdkImlibImage *im6;
+ GdkImlibImage *im7;
+};
+
+/* Theme functions to export */
+void theme_init (int *argc,
+ char ***argv);
+void theme_exit (void);
+
+/* internals */
+
+void
+theme_init (int *argc,
+ char ***argv)
+{
+ struct _imgs *imgs;
+ GdkImlibBorder bd;
+
+ printf("Theme2 Init\n");
+ imgs=th_dat.data=malloc(sizeof(struct _imgs));
+ gdk_imlib_init();
+ bd.left=4;
+ bd.right=4;
+ bd.top=4;
+ bd.bottom=4;
+ imgs->im1=gdk_imlib_create_image_from_xpm_data(theme_btn1_xpm);
+ gdk_imlib_set_image_border(imgs->im1,&bd);
+ imgs->im2=gdk_imlib_create_image_from_xpm_data(theme_btn2_xpm);
+ gdk_imlib_set_image_border(imgs->im2,&bd);
+ imgs->im3=gdk_imlib_create_image_from_xpm_data(theme_btn3_xpm);
+ gdk_imlib_set_image_border(imgs->im3,&bd);
+ imgs->im4=gdk_imlib_create_image_from_xpm_data(theme_led_off1_xpm);
+ imgs->im5=gdk_imlib_create_image_from_xpm_data(theme_led_off2_xpm);
+ imgs->im6=gdk_imlib_create_image_from_xpm_data(theme_led_on1_xpm);
+ imgs->im7=gdk_imlib_create_image_from_xpm_data(theme_led_on2_xpm);
+}
+
+void
+theme_exit (void)
+{
+ printf("Theme2 Exit\n");
+}
+
diff --git a/gtk/theme_btn1.xpm b/gtk/theme_btn1.xpm
new file mode 100644
index 0000000000..0cfa39b919
--- /dev/null
+++ b/gtk/theme_btn1.xpm
@@ -0,0 +1,106 @@
+/* XPM */
+static char * theme_btn1_xpm[] = {
+"64 64 39 1",
+" c None",
+". c #000000000000",
+"X c #FFFFFBFBFFFF",
+"o c #F7F7F7F7F7F7",
+"O c #F7F7F3F3F7F7",
+"+ c #EFEFEFEFEFEF",
+"@ c #EFEFEBEBEFEF",
+"# c #E7E7E7E7E7E7",
+"$ c #E7E7E3E3E7E7",
+"% c #DEDEDFDFDEDE",
+"& c #DEDEDBDBDEDE",
+"* c #D6D6D3D3D6D6",
+"= c #D6D6D7D7D6D6",
+"- c #C6C6C3C3C6C6",
+"; c #ADADAEAEADAD",
+": c #CECECFCFCECE",
+"> c #CECECBCBCECE",
+", c #ADADAAAAADAD",
+"< c #848486868484",
+"1 c #C6C6C7C7C6C6",
+"2 c #9C9C9E9E9C9C",
+"3 c #7B7B79797B7B",
+"4 c #9C9C9A9A9C9C",
+"5 c #737375757373",
+"6 c #949496969494",
+"7 c #BDBDBEBEBDBD",
+"8 c #949492929494",
+"9 c #737371717373",
+"0 c #BDBDBABABDBD",
+"q c #8C8C8E8E8C8C",
+"w c #6B6B6D6D6B6B",
+"e c #B5B5B6B6B5B5",
+"r c #7B7B7D7D7B7B",
+"t c #5A5A59595A5A",
+"y c #B5B5B2B2B5B5",
+"u c #A5A5A6A6A5A5",
+"i c #636361616363",
+"p c #4A4A49494A4A",
+"a c #525251515252",
+" ............................................................ ",
+" .XXooOOOO++++++@@@@@@@@@@@@###########$$$$$$$$$$$$$$$$$$$%%&*. ",
+".XXoOOO+++@@@@@@@@########$#$$$$$$$$$$%%%%$%%%%%%%%%%%&&&&&=*-;.",
+".Xo++@@@####$$$$$%%%%%%%&&&&&&&&&&==========**********::::::>,<.",
+".oO+@@@####$$$$$%%%%%%&&&&&&&&=========***********::::::::::123.",
+".oO+@@####$$$$$%%%%%%&&&&&&&&=========***********:::::::::::143.",
+".OO@@####$$$$$%%%%%%&&&&&&&&=========***********::::::::::::143.",
+".O+@####$$$$$%%%%%%&&&&&&&&=========***********::::::::::::>123.",
+".O+####$$$$$%%%%%%&&&&&&&&=========***********::::::::::::>>143.",
+".O+###$$$$$%%%%%%&&&&&&&&=========***********::::::::::::>>>143.",
+".+@##$$$$$%%%%%%&&&&&&&&=========***********::::::::::::>>>>145.",
+".+@#$$$$$%%%%%%&&&&&&&&=========***********::::::::::::>>>>>-43.",
+".+@$$$$$%%%%%%&&&&&&&&=========***********::::::::::::>>>>>>-43.",
+".+@$$$$%%%%%%&&&&&&&&=========***********::::::::::::>>>>>>>143.",
+".+@$$$%%%%%%&&&&&&&&=========***********::::::::::::>>>>>>>>-43.",
+".+@$$%%%%%%&&&&&&&&=========***********::::::::::::>>>>>>>>>-45.",
+".@@$%%%%%%&&&&&&&&=========***********::::::::::::>>>>>>>>>>-65.",
+".@@%%%%%%&&&&&&&&=========***********::::::::::::>>>>>>>>>>>-43.",
+".@#%%%%%&&&&&&&&=========***********::::::::::::>>>>>>>>>>>>-43.",
+".@#%%%%&&&&&&&&=========***********::::::::::::>>>>>>>>>>>>>-43.",
+".@#%%%&&&&&&&&=========***********::::::::::::>>>>>>>>>>>>>>-65.",
+".@#%%&&&&&&&&=========***********::::::::::::>>>>>>>>>>>>>>>-65.",
+".@#%&&&&&&&&=========***********::::::::::::>>>>>>>>>>>>>>>1-43.",
+".@#%&&&&&&&=========***********::::::::::::>>>>>>>>>>>>>>>11-43.",
+".@#%&&&&&&=========***********::::::::::::>>>>>>>>>>>>>>>111-45.",
+".@#&&&&&&=========***********::::::::::::>>>>>>>>>>>>>>>1111-65.",
+".#$&&&&&=========***********::::::::::::>>>>>>>>>>>>>>>11111765.",
+".#$&&&&=========***********::::::::::::>>>>>>>>>>>>>>>111111765.",
+".#$&&&=========***********::::::::::::>>>>>>>>>>>>>>>1111111745.",
+".#$&&=========***********::::::::::::>>>>>>>>>>>>>>>11111111765.",
+".#$&=========***********::::::::::::>>>>>>>>>>>>>>>111111111765.",
+".#$&========***********::::::::::::>>>>>>>>>>>>>>>1111111111765.",
+".#$========***********::::::::::::>>>>>>>>>>>>>>>11111111111765.",
+".#$&======***********::::::::::::>>>>>>>>>>>>>>>111111111111765.",
+".#$&=====***********::::::::::::>>>>>>>>>>>>>>>1111111111111765.",
+".#$=====***********::::::::::::>>>>>>>>>>>>>>>11111111111111765.",
+".#$====***********::::::::::::>>>>>>>>>>>>>>>111111111111111765.",
+".#%===***********::::::::::::>>>>>>>>>>>>>>>111111111111111-765.",
+".#%==***********::::::::::::>>>>>>>>>>>>>>>111111111111111--765.",
+".#$=***********::::::::::::>>>>>>>>>>>>>>>111111111111111---765.",
+".$%=**********::::::::::::>>>>>>>>>>>>>>>111111111111111----789.",
+".$%=*********::::::::::::>>>>>>>>>>>>>>>111111111111111-----765.",
+".$%*********::::::::::::>>>>>>>>>>>>>>>111111111111111------765.",
+".$%=*******::::::::::::>>>>>>>>>>>>>>>111111111111111-------765.",
+".$%=******::::::::::::>>>>>>>>>>>>>>>111111111111111--------765.",
+".$%=*****::::::::::::>>>>>>>>>>>>>>>111111111111111---------089.",
+".$%*****::::::::::::>>>>>>>>>>>>>>>111111111111111----------089.",
+".$%****::::::::::::>>>>>>>>>>>>>>>111111111111111-----------065.",
+".$%***::::::::::::>>>>>>>>>>>>>>>111111111111111------------065.",
+".$%**::::::::::::>>>>>>>>>>>>>>>111111111111111-------------065.",
+".$%*::::::::::::>>>>>>>>>>>>>>>111111111111111--------------089.",
+".$%*:::::::::::>>>>>>>>>>>>>>>111111111111111---------------089.",
+".$&*::::::::::>>>>>>>>>>>>>>>111111111111111----------------065.",
+".$%*:::::::::>>>>>>>>>>>>>>>111111111111111-----------------065.",
+".$%*::::::::>>>>>>>>>>>>>>>111111111111111-----------------7089.",
+".$&*:::::::>>>>>>>>>>>>>>>111111111111111-----------------77089.",
+".%&:::::::>>>>>>>>>>>>>>>111111111111111-----------------777089.",
+".%&::::::>>>>>>>>>>>>>>>111111111111111-----------------7777089.",
+".%&:::::>>>>>>>>>>>>>>>111111111111111-----------------77777089.",
+".%&*:::>>>>>>>>>>>>>>>111111111111111-----------------7777770qw.",
+".&&=*:>11-11------7---777--77777707770007700000000000ee00eee;rt.",
+".**17eyu444446444666666666668666686668888888888888888q8888qq<ip.",
+" .1u246<53333553355533555555955559555595555995559955999999wwia. ",
+" ............................................................ "};
diff --git a/gtk/theme_btn2.xpm b/gtk/theme_btn2.xpm
new file mode 100644
index 0000000000..9f678b9719
--- /dev/null
+++ b/gtk/theme_btn2.xpm
@@ -0,0 +1,157 @@
+/* XPM */
+static char * theme_btn2_xpm[] = {
+"64 64 90 1",
+" c None",
+". c #000000000000",
+"X c #FFFFF7F7FFFF",
+"o c #EFEFEBEBEFEF",
+"O c #EFEFDBDBEFEF",
+"+ c #CECECBCBCECE",
+"@ c #CECEBEBECECE",
+"# c #B5B5B2B2B5B5",
+"$ c #B5B5A2A2B5B5",
+"% c #949496969494",
+"& c #94948A8A9494",
+"* c #7B7B75757B7B",
+"= c #C6C6BEBEC6C6",
+"- c #C6C6BABAC6C6",
+"; c #BDBDBABABDBD",
+": c #BDBDB6B6BDBD",
+"> c #BDBDB2B2BDBD",
+", c #BDBDAEAEBDBD",
+"< c #B5B5AEAEB5B5",
+"1 c #B5B5AAAAB5B5",
+"2 c #ADADAAAAADAD",
+"3 c #ADADA2A2ADAD",
+"4 c #A5A59E9EA5A5",
+"5 c #9C9C9E9E9C9C",
+"6 c #9C9C9A9A9C9C",
+"7 c #9C9C96969C9C",
+"8 c #9C9C92929C9C",
+"9 c #949492929494",
+"0 c #94948E8E9494",
+"q c #8C8C8A8A8C8C",
+"w c #8C8C86868C8C",
+"e c #84847D7D8484",
+"r c #73736D6D7373",
+"t c #5A5A55555A5A",
+"y c #313134343131",
+"u c #EFEFE7E7EFEF",
+"i c #E7E7DBDBE7E7",
+"p c #DEDED3D3DEDE",
+"a c #D6D6CBCBD6D6",
+"s c #CECEC7C7CECE",
+"d c #C6C6C3C3C6C6",
+"f c #ADADA6A6ADAD",
+"g c #A5A5A2A2A5A5",
+"h c #8C8C8E8E8C8C",
+"j c #8C8C82828C8C",
+"k c #848482828484",
+"l c #7B7B79797B7B",
+"z c #737375757373",
+"x c #5A5A59595A5A",
+"c c #18181C1C1818",
+"v c #D6D6CFCFD6D6",
+"b c #848486868484",
+"n c #737371717373",
+"m c #6B6B6D6D6B6B",
+"M c #6B6B69696B6B",
+"N c #636365656363",
+"B c #525251515252",
+"V c #292928282929",
+"C c #181818181818",
+"Z c #DEDED7D7DEDE",
+"A c #7B7B7D7D7B7B",
+"S c #7B7B71717B7B",
+"D c #5A5A5D5D5A5A",
+"F c #4A4A49494A4A",
+"G c #CECEC3C3CECE",
+"H c #4A4A4D4D4A4A",
+"J c #636361616363",
+"K c #313130303131",
+"L c #6B6B65656B6B",
+"P c #63635D5D6363",
+"I c #4A4A45454A4A",
+"U c #6B6B61616B6B",
+"Y c #424241414242",
+"T c #31312C2C3131",
+"R c #636359596363",
+"E c #52524D4D5252",
+"W c #29292C2C2929",
+"Q c #39393C3C3939",
+"! c #525255555252",
+"~ c #525259595252",
+"^ c #393938383939",
+"/ c #393934343939",
+"( c #212124242121",
+") c #292924242929",
+"_ c #42423C3C4242",
+"` c #424245454242",
+"' c #212120202121",
+"] c #101014141010",
+"[ c #101010101010",
+"{ c #08080C0C0808",
+" ............................................................ ",
+" .XXooOOOO++++++@@@@@@@@@@@@###########$$$$$$$$$$$$$$$$$$$%%&*. ",
+".XXoOOO+++@@=-;:>,<<<<12##$#$$$34444566777888888889000000qwerty.",
+".Xuipasd=;:>><12f3gg4444466677789900hqqwwwwwjjkkkkeeeeeellzrxyc.",
+".oivsd-:><<1ff3446677%999000&qqqwwbkkkeeeeellll***zznnnnrmMNBVC.",
+".oZ+=;:#<2f3g4467%99000&qqqwwbkkkAAAllll*****SnnnrrmmMMMMNNDFyC.",
+".OpG->#<1ffg4466799900qqqwwbkkkkAAAllll*****SnnnrmmmMMMMMNNDHyC.",
+".Ov=:<<1ff344667%9900qqqwwbkkkeAAAllll*****SnnnrmmmMMMMMNNJxFKC.",
+".Oa-><1ff344667%9900&qqwwbkkkAAAAlll******SnnnrmmmMMMMMMNNJJFKC.",
+".Os;<2ff344667%9900&qqwwbkkkAAAAlll*****SSnnnrmmmMMMMMMLNJJPFKC.",
+".+d:<ff344667%9900&qqwwbkkkAAAAlll*****SSnnnrmmmMMMMMMLLNJJPFKC.",
+".+=#23g44667%9900&qqwwbkkkAAAAlll*****SSnnnrmmmMMMMMMLLLJJPPFKC.",
+".+;<fg44667%9900&qqwwbkkkAAAAlll*****SSnnnrmmmMMMMMMLLLLJJPPIKC.",
+".+;<f44667%9900&qqwwbkkkAAAAlll*****SSnnnrmmmMMMMMMLLLLUJJPPIKC.",
+".+;1g4667%9900&qqwwbkkkAAAAlll*****SSnnnrmmmMMMMMMLLLLUUJPPPIKC.",
+".+:24677%9900&qqwwbkkkAAAAlll*****SSnnnrmmmMMMMMMLLLLUUUJPPxIKC.",
+".@>f477%9900&qqwwbkkkAAAAlll*****SSnnnrmmmMMMMMMLLLLUUUJJPPtYTC.",
+".@>f6%99900&qqwwbkkkAAAAlll*****SSnnnrmmmMMMMMMLLLLUUUUJJPPBYTC.",
+".@,3699900&qqwwbkkkAAAAlll*****SSnnnrmmmMMMMMMLLLLUUUUUJJPPBYKC.",
+".@<g79900&qqwwbkkkAAAAlll*****SSnnnrmmmMMMMMMLLLLUUUUUJJPPPBYTC.",
+".@<47900&qqwwbkkkAAAAlll*****SSnnnrmmmMMMMMMLLLLUUUUUUJJPPPBYTC.",
+".@<4%00qqqwwbkkkAAAAlll*****SSnnnrmmmMMMMMMLLLLUUUUUUJJJPPRBYTC.",
+".@1490qqqwwbkkkAAAAlll*****SSnnnrmmmMMMMMMLLLLUUUUUUJJJPPPxEYTC.",
+".@149qqqwwbkkkAAAAlll*****SSnnnrmmmMMMMMMLLLLUUUUUUJJJPPPPxEYTC.",
+".@169qqwwbkkkAAAAlll*****SSnnnrmmmMMMMMMLLLLUUUUUUJJJPPPPxxEYWC.",
+".@f60qwwbkkkAAAAlll*****SSnnnrmmmMMMMMMLLLLUUUUUUJJJJPPPDxxHYWC.",
+".#f70wwbkkkAAAAlll*****SSnnnrmmmMMMMMMLLLLUUUUUUJJJJPPPDxxtHQWC.",
+".#g70wbkkkAAAAlll*****SSnnnrmmmMMMMMMLLLLUUUUUUJJJJPPPDxxx!HQWC.",
+".#g9qbkkkAAAAlll*****SSnnnrmmmMMMMMMLLLLUUUUUUJJJJPPPDDxx~!FQWC.",
+".#49qkkkAAAAlll*****SSnnnrmmmMMMMMMLLLLUUUUUUJJJJPPPDDxxx!!FQWC.",
+".#49qkkAAAAlll*****SSnnnrmmmMMMMMMLLLLUUUUUUJJJJPPPDDxxx~!!FQWC.",
+".#49wkkAAAlll*****SSnnnrmmmMMMMMMLLLLUUUUUUJJJJPPPDDxxxx~!!FQWC.",
+".#49wkAAAlll*****SSnnnrmmmMMMMMMLLLLUUUUUUJJJJPPPDDxxxx~~!!FQWC.",
+".#40bAAAlll*****SSnnnrmmmMMMMMMLLLLUUUUUUJJJJPPPDDxxxxx~~!!FQWC.",
+".#40bAAlll*****SSnnnrmmmMMMMMMLLLLUUUUUUJJJJPPPDDxxxxx~~!!!FQWC.",
+".#50kAlll*****SSnnnrmmmMMMMMMLLLLUUUUUUJJJJPPPDDxxxxxx~~!!!FQWC.",
+".#5hkllll****SSnnnrmmmMMMMMMLLLLUUUUUUJJJJPPPDDxxxxxxx~~!!!FQWC.",
+".#5qklll****SSnnnrmmmMMMMMMLLLLUUUUUUJJJJPPPDDxxxxxxx~~!!!BFQWC.",
+".#6qell****SSnnnrmmmMMMMMMLLLLUUUUUUJJJJPPPDDxxxxxxxx~!!!!BFQVC.",
+".#6qel****SSnnnrmmmMMMMMMLLLLUUUUUUJJJJPPPDDxxxxxxxx~~!!!BBFQVC.",
+".$7we****SSnnnrmmmMMMMMMLLLLUUUUUUJJJJPPPDDxxxxxxxxx~!!!!BBFQVC.",
+".$8we****SnnnrmmmMMMMMMLLLLUUUUUUJJJJPPPDDxxxxxxxxxx!!!!!BBI^VC.",
+".$8wl***SnnnrmmmMMMMMMLLLLUUUUUUJJJJPPPDDxxxxxxxxxxt!!!!BBBI^VC.",
+".$8wl**SnnnrmmmMMMMMMLLLLUUUUUUJJJJPPPDDxxxxxxxxxxtt!!!BBBBI^VC.",
+".$8wl**nnnrmmmMMMMMMLLLLUUUUUUJJJJPPPDDxxxxxxxxxxttt!!!BBBEI^VC.",
+".$8jl*nnnrmmmMMMMMMLLLLUUUUUUJJJJPPPDDxxxxxxxxxxtttt!!BBBBEI^VC.",
+".$8klnnnrmmmMMMMMMLLLLUUUUUUJJJJPPPDDxxxxxxxxxxttttt!BBBBBEI^VC.",
+".$8klnnrmmmMMMMMMLLLLUUUUUUJJJJPPPDDxxxxxxxxxxttttt!BBBBBBEI^VC.",
+".$8k*nrmmmMMMMMMLLLLUUUUUUJJJJPPPDDxxxxxxxxxxttttttBBBBBBEEY^VC.",
+".$8k*rmmmMMMMMMLLLLUUUUUUJJJJPPPDDxxxxxxxxxxttttttBBBBBBBEEY/VC.",
+".$9kzrmmMMMMMMLLLLUUUUUUJJJJPPPDDxxxxxxxxxxttttttBBBBBBBBEFY/(C.",
+".$0ezmmMMMMMMLLLLUUUUUUJJJJPPPDDxxxxxxxxxxttttt!BBBBBBBBBEFY/VC.",
+".$0enmmMMMMMLLLLUUUJJJJJJJPPPDDxxxxx~~~~~!!!!!!BBBBBBBBBBEFY/VC.",
+".$0enmMMMMMLLLLUUUJJJJJJPPPPDDxxxxx~~~~!!!!!!!BBBBBBBBBBEEEY^VC.",
+".$0AnmMMMMLLLLUUJJJJJJJPPPPDDxxxx~~~~~!!!!!!BBBBBBBBBBBBEEHY/VC.",
+".$qlnmMMMLLLUUJJJJJJJPPPPPDxxxxx~~~~~!!!!!!BBBBBBBBBBBBEEEFY/VC.",
+".%wlmMMMLNNJJJJJJPPPPPPPDxxxxx~~!!!!!!!!!BBBBBBBBBBBBEEEHFFY/)C.",
+".%blmMMLNNJJJJPPPPPPPPPxxxxx~!!!!!!!!!!BBBBBBBBBEEEEEEEHFFI_y)C.",
+".%b*mMMNNJJPPPPPPPPRRxxxxt!!!!!!!!!BBBBBBEEEEEEEEEEEEHFFFII^K(C.",
+".%kzmNPxxtt!BBBBBBBBEEEEHHHFFFFFFFFFFFIIIIIIIIIIIIFFFFF`Y_QyW'].",
+".&lrJxBHFIII`YYYYYYYYYYY_QQQQQQQQQQQQ^^^^^^^^^^^^^^^^^^^yKKW(c[.",
+".**xFYQ^yKKKKKTKTTTTTWWWWWWVVVWWWWWVVVVVVVVVVVVVVVVVVVVV)(((']{.",
+" .xKVV(cCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC]]][. ",
+" ............................................................ "};
diff --git a/gtk/theme_btn3.xpm b/gtk/theme_btn3.xpm
new file mode 100644
index 0000000000..5c9a52ec0c
--- /dev/null
+++ b/gtk/theme_btn3.xpm
@@ -0,0 +1,106 @@
+/* XPM */
+static char * theme_btn3_xpm[] = {
+"64 64 39 1",
+" c None",
+". c #000000000000",
+"X c #525251515252",
+"o c #636361616363",
+"O c #6B6B6D6D6B6B",
+"+ c #737371717373",
+"@ c #737375757373",
+"# c #7B7B79797B7B",
+"$ c #848486868484",
+"% c #949496969494",
+"& c #9C9C9A9A9C9C",
+"* c #9C9C9E9E9C9C",
+"= c #A5A5A6A6A5A5",
+"- c #C6C6C7C7C6C6",
+"; c #4A4A49494A4A",
+": c #8C8C8E8E8C8C",
+"> c #949492929494",
+", c #B5B5B2B2B5B5",
+"< c #B5B5B6B6B5B5",
+"1 c #BDBDBEBEBDBD",
+"2 c #D6D6D3D3D6D6",
+"3 c #5A5A59595A5A",
+"4 c #7B7B7D7D7B7B",
+"5 c #ADADAEAEADAD",
+"6 c #BDBDBABABDBD",
+"7 c #C6C6C3C3C6C6",
+"8 c #CECECBCBCECE",
+"9 c #CECECFCFCECE",
+"0 c #D6D6D7D7D6D6",
+"q c #DEDEDBDBDEDE",
+"w c #DEDEDFDFDEDE",
+"e c #E7E7E3E3E7E7",
+"r c #E7E7E7E7E7E7",
+"t c #EFEFEBEBEFEF",
+"y c #EFEFEFEFEFEF",
+"u c #F7F7F3F3F7F7",
+"i c #F7F7F7F7F7F7",
+"p c #ADADAAAAADAD",
+"a c #FFFFFBFBFFFF",
+" ............................................................ ",
+" .XoOO++++++@@++@@@++@@@@+@@@@+@@@@+@@@@@@##@@@##@@####@$%&*=-. ",
+".;o$::>>>>:>>>>>>>>>>>>>>>>%%%>%%%%>%%%%%%%%%%%&&&%&&&&&=,<1-22.",
+".345<<<66<<66666666666116661116111111771117771777777--7--8920qq.",
+".O:611111177777777777777777---------------8888888888888889992qw.",
+".+>61111177777777777777777---------------88888888888888899999qw.",
+".+>6111177777777777777777---------------888888888888888999999qw.",
+".+>611177777777777777777---------------8888888888888889999999qw.",
+".+>61177777777777777777---------------88888888888888899999992qe.",
+".+>6177777777777777777---------------888888888888888999999992we.",
+".@%677777777777777777---------------8888888888888889999999992we.",
+".@%67777777777777777---------------88888888888888899999999992qe.",
+".+>6777777777777777---------------888888888888888999999999992we.",
+".+>677777777777777---------------8888888888888889999999999992we.",
+".@%67777777777777---------------88888888888888899999999999922we.",
+".@%6777777777777---------------888888888888888999999999999222we.",
+".@%677777777777---------------8888888888888889999999999992222we.",
+".+>67777777777---------------88888888888888899999999999922222we.",
+".+>6777777777---------------888888888888888999999999999222220we.",
+".@%177777777---------------8888888888888889999999999992222220we.",
+".@%17777777---------------88888888888888899999999999922222220we.",
+".@%1777777---------------888888888888888999999999999222222222we.",
+".@%177777---------------8888888888888889999999999992222222220we.",
+".+>17777---------------88888888888888899999999999922222222220we.",
+".@%1777---------------888888888888888999999999999222222222220er.",
+".@%177---------------8888888888888889999999999992222222222200wr.",
+".@%17---------------88888888888888899999999999922222222222000wr.",
+".@%1---------------888888888888888999999999999222222222220000er.",
+".@%1--------------8888888888888889999999999992222222222200000er.",
+".@%1-------------8888888888888889999999999992222222222200000qer.",
+".@%1------------88888888888888899999999999922222222222000000qer.",
+".@%1-----------8888888888888889999999999992222222222200000000er.",
+".@%1----------8888888888888889999999999992222222222200000000qer.",
+".@%1---------88888888888888899999999999922222222222000000000qer.",
+".@%1--------88888888888888899999999999922222222222000000000qqer.",
+".@&1-------88888888888888899999999999922222222222000000000qqqer.",
+".@%1------88888888888888899999999999922222222222000000000qqqqer.",
+".@%1-----88888888888888899999999999922222222222000000000qqqqqer.",
+".@%7----88888888888888899999999999922222222222000000000qqqqqqrt.",
+".@&7---88888888888888899999999999922222222222000000000qqqqqqwrt.",
+".#&7--88888888888888899999999999922222222222000000000qqqqqqqwrt.",
+".#&7-88888888888888899999999999922222222222000000000qqqqqqqqwrt.",
+".@%788888888888888899999999999922222222222000000000qqqqqqqqwwrt.",
+".@%78888888888888899999999999922222222222000000000qqqqqqqqwwwrt.",
+".#&7888888888888899999999999922222222222000000000qqqqqqqqwwwwrt.",
+".#&788888888888899999999999922222222222000000000qqqqqqqqwwwwwrt.",
+".#&78888888888899999999999922222222222000000000qqqqqqqqwwwwwwtt.",
+".@%7888888888899999999999922222222222000000000qqqqqqqqwwwwwwett.",
+".@&788888888899999999999922222222222000000000qqqqqqqqwwwwwweety.",
+".#&78888888899999999999922222222222000000000qqqqqqqqwwwwwweeety.",
+".#&-888888899999999999922222222222000000000qqqqqqqqwwwwwweeeety.",
+".#&788888899999999999922222222222000000000qqqqqqqqwwwwwweeeeety.",
+".#&78888899999999999922222222222000000000qqqqqqqqwwwwwweeeeerty.",
+".@&-888899999999999922222222222000000000qqqqqqqqwwwwwweeeeerrty.",
+".#&-88899999999999922222222222000000000qqqqqqqqwwwwwweeeeerrryu.",
+".#&-8899999999999922222222222000000000qqqqqqqqwwwwwweeeeerrrryu.",
+".#*-899999999999922222222222000000000qqqqqqqqwwwwwweeeeerrrrtyu.",
+".#&-99999999999922222222222000000000qqqqqqqqwwwwwweeeeerrrrttuu.",
+".#&-9999999999922222222222000000000qqqqqqqqwwwwwweeeeerrrrttyui.",
+".#*-999999999922222222222000000000qqqqqqqqwwwwwweeeeerrrrtttyui.",
+".$p899999922222222220000000000qqqqqqqqqqwwwwwwweeeeerrrrtttyyia.",
+".5720qqqqqwwwwwwwwwwwewwwweeeeeeeeeererrrrrrrrttttttttyyyuuuiaa.",
+" .2qwweeeeeeeeeeeeeeeeeeerrrrrrrrrrrttttttttttttyyyyyyuuuuiiaa. ",
+" ............................................................ "};
diff --git a/gtk/theme_button.c b/gtk/theme_button.c
new file mode 100644
index 0000000000..04c645137d
--- /dev/null
+++ b/gtk/theme_button.c
@@ -0,0 +1,167 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "gtkthemes.h"
+#include "gtkprivate.h"
+#include "gtkbutton.h"
+#include "gtklabel.h"
+#include "gtkmain.h"
+#include "gtksignal.h"
+
+#define CHILD_SPACING 1
+#define DEFAULT_LEFT_POS 4
+#define DEFAULT_TOP_POS 4
+#define DEFAULT_SPACING 7
+
+/* Theme functions to export */
+void button_border (GtkWidget *widget);
+void button_init (GtkWidget *widget);
+void button_draw (GtkWidget *widget,
+ GdkRectangle *area);
+void button_exit (GtkWidget *widget);
+
+/* internals */
+
+void
+button_border (GtkWidget *widget)
+{
+ if (GTK_WIDGET_CAN_DEFAULT (widget))
+ {
+ GTK_CONTAINER(widget)->internal_border_left=10;
+ GTK_CONTAINER(widget)->internal_border_right=10;
+ GTK_CONTAINER(widget)->internal_border_top=10;
+ GTK_CONTAINER(widget)->internal_border_bottom=10;
+ }
+ else
+ {
+ GTK_CONTAINER(widget)->internal_border_left=2;
+ GTK_CONTAINER(widget)->internal_border_right=2;
+ GTK_CONTAINER(widget)->internal_border_top=2;
+ GTK_CONTAINER(widget)->internal_border_bottom=2;
+ }
+}
+
+void
+button_init (GtkWidget *widget)
+{
+}
+
+void
+button_draw (GtkWidget *widget,
+ GdkRectangle *area)
+{
+ GdkRectangle restrict_area;
+ GdkRectangle new_area;
+ GtkShadowType shadow_type;
+ gint width, height;
+ gint x, y;
+
+ /*
+ * State
+ *
+ * GTK_STATE_NORMAL,
+ * GTK_STATE_ACTIVE,
+ * GTK_STATE_PRELIGHT,
+ * GTK_STATE_SELECTED,
+ * GTK_STATE_INSENSITIVE
+ */
+
+ restrict_area.x = GTK_WIDGET (widget)->style->klass->xthickness;
+ restrict_area.y = GTK_WIDGET (widget)->style->klass->ythickness;
+ restrict_area.width = (GTK_WIDGET (widget)->allocation.width - restrict_area.x * 2 -
+ GTK_CONTAINER (widget)->border_width * 2);
+ restrict_area.height = (GTK_WIDGET (widget)->allocation.height - restrict_area.y * 2 -
+ GTK_CONTAINER (widget)->border_width * 2);
+ if (GTK_WIDGET_CAN_DEFAULT (widget))
+ {
+ restrict_area.x += DEFAULT_LEFT_POS;
+ restrict_area.y += DEFAULT_TOP_POS;
+ restrict_area.width -= DEFAULT_SPACING;
+ restrict_area.height -= DEFAULT_SPACING;
+ }
+ if (gdk_rectangle_intersect (area, &restrict_area, &new_area))
+ {
+ gtk_style_set_background (widget->style, widget->window, GTK_WIDGET_STATE (widget));
+ gdk_window_clear_area (widget->window,new_area.x, new_area.y,
+ new_area.width, new_area.height);
+ }
+ x = 0;
+ y = 0;
+ width = widget->allocation.width - GTK_CONTAINER (widget)->border_width * 2;
+ height = widget->allocation.height - GTK_CONTAINER (widget)->border_width * 2;
+ if (GTK_WIDGET_HAS_DEFAULT (widget))
+ {
+ gtk_draw_shadow (widget->style, widget->window,
+ GTK_STATE_NORMAL, GTK_SHADOW_IN,
+ x, y, width, height);
+ }
+ else
+ {
+ gdk_draw_rectangle (widget->window, widget->style->bg_gc[GTK_STATE_NORMAL],
+ FALSE, x, y, width - 1, height - 1);
+ gdk_draw_rectangle (widget->window, widget->style->bg_gc[GTK_STATE_NORMAL],
+ FALSE, x + 1, y + 1, width - 3, height - 3);
+ }
+ x = 0;y = 0;
+ width = widget->allocation.width - GTK_CONTAINER (widget)->border_width * 2;
+ height = widget->allocation.height - GTK_CONTAINER (widget)->border_width * 2;
+ if (GTK_WIDGET_CAN_DEFAULT (widget))
+ {
+ x += widget->style->klass->xthickness;
+ y += widget->style->klass->ythickness;
+ width -= 2 * x + DEFAULT_SPACING;
+ height -= 2 * y + DEFAULT_SPACING;
+ x += DEFAULT_LEFT_POS;
+ y += DEFAULT_TOP_POS;
+ }
+ if (GTK_WIDGET_HAS_FOCUS (widget))
+ {
+ x += 1;y += 1;width -= 2;height -= 2;
+ }
+ else
+ {
+ if (GTK_WIDGET_STATE (widget) == GTK_STATE_ACTIVE)
+ gdk_draw_rectangle (widget->window,
+ widget->style->bg_gc[GTK_WIDGET_STATE (widget)],
+ FALSE, x + 1, y + 1, width - 4, height - 4);
+ else
+ gdk_draw_rectangle (widget->window,
+ widget->style->bg_gc[GTK_WIDGET_STATE (widget)],
+ FALSE, x + 2, y + 2, width - 5, height - 5);
+ }
+ if (GTK_WIDGET_STATE (widget) == GTK_STATE_ACTIVE)
+ shadow_type = GTK_SHADOW_IN;
+ else
+ shadow_type = GTK_SHADOW_OUT;
+ gtk_draw_shadow (widget->style, widget->window,GTK_WIDGET_STATE (widget),
+ shadow_type,x, y, width, height);
+ if (GTK_WIDGET_HAS_FOCUS (widget))
+ {
+ x -= 1;y -= 1;width += 2;height += 2;
+ gdk_draw_rectangle (widget->window,widget->style->black_gc, FALSE,
+ x, y, width - 1, height - 1);
+ }
+}
+
+void
+button_exit (GtkWidget *widget)
+{
+}
+
diff --git a/gtk/theme_button.xpm b/gtk/theme_button.xpm
new file mode 100644
index 0000000000..a8f01a311b
--- /dev/null
+++ b/gtk/theme_button.xpm
@@ -0,0 +1,106 @@
+/* XPM */
+static char * theme_button_xpm[] = {
+"64 64 39 1",
+" c None",
+". c #000000000000",
+"X c #FFFFFBFBFFFF",
+"o c #F7F7F7F7F7F7",
+"O c #F7F7F3F3F7F7",
+"+ c #EFEFEFEFEFEF",
+"@ c #EFEFEBEBEFEF",
+"# c #E7E7E7E7E7E7",
+"$ c #E7E7E3E3E7E7",
+"% c #DEDEDFDFDEDE",
+"& c #DEDEDBDBDEDE",
+"* c #D6D6D3D3D6D6",
+"= c #D6D6D7D7D6D6",
+"- c #C6C6C3C3C6C6",
+"; c #ADADAEAEADAD",
+": c #CECECFCFCECE",
+"> c #CECECBCBCECE",
+", c #ADADAAAAADAD",
+"< c #848486868484",
+"1 c #C6C6C7C7C6C6",
+"2 c #9C9C9E9E9C9C",
+"3 c #7B7B79797B7B",
+"4 c #9C9C9A9A9C9C",
+"5 c #737375757373",
+"6 c #949496969494",
+"7 c #BDBDBEBEBDBD",
+"8 c #949492929494",
+"9 c #737371717373",
+"0 c #BDBDBABABDBD",
+"q c #8C8C8E8E8C8C",
+"w c #6B6B6D6D6B6B",
+"e c #B5B5B6B6B5B5",
+"r c #7B7B7D7D7B7B",
+"t c #5A5A59595A5A",
+"y c #B5B5B2B2B5B5",
+"u c #A5A5A6A6A5A5",
+"i c #636361616363",
+"p c #4A4A49494A4A",
+"a c #525251515252",
+" ............................................................ ",
+" .XXooOOOO++++++@@@@@@@@@@@@###########$$$$$$$$$$$$$$$$$$$%%&*. ",
+".XXoOOO+++@@@@@@@@########$#$$$$$$$$$$%%%%$%%%%%%%%%%%&&&&&=*-;.",
+".Xo++@@@####$$$$$%%%%%%%&&&&&&&&&&==========**********::::::>,<.",
+".oO+@@@####$$$$$%%%%%%&&&&&&&&=========***********::::::::::123.",
+".oO+@@####$$$$$%%%%%%&&&&&&&&=========***********:::::::::::143.",
+".OO@@####$$$$$%%%%%%&&&&&&&&=========***********::::::::::::143.",
+".O+@####$$$$$%%%%%%&&&&&&&&=========***********::::::::::::>123.",
+".O+####$$$$$%%%%%%&&&&&&&&=========***********::::::::::::>>143.",
+".O+###$$$$$%%%%%%&&&&&&&&=========***********::::::::::::>>>143.",
+".+@##$$$$$%%%%%%&&&&&&&&=========***********::::::::::::>>>>145.",
+".+@#$$$$$%%%%%%&&&&&&&&=========***********::::::::::::>>>>>-43.",
+".+@$$$$$%%%%%%&&&&&&&&=========***********::::::::::::>>>>>>-43.",
+".+@$$$$%%%%%%&&&&&&&&=========***********::::::::::::>>>>>>>143.",
+".+@$$$%%%%%%&&&&&&&&=========***********::::::::::::>>>>>>>>-43.",
+".+@$$%%%%%%&&&&&&&&=========***********::::::::::::>>>>>>>>>-45.",
+".@@$%%%%%%&&&&&&&&=========***********::::::::::::>>>>>>>>>>-65.",
+".@@%%%%%%&&&&&&&&=========***********::::::::::::>>>>>>>>>>>-43.",
+".@#%%%%%&&&&&&&&=========***********::::::::::::>>>>>>>>>>>>-43.",
+".@#%%%%&&&&&&&&=========***********::::::::::::>>>>>>>>>>>>>-43.",
+".@#%%%&&&&&&&&=========***********::::::::::::>>>>>>>>>>>>>>-65.",
+".@#%%&&&&&&&&=========***********::::::::::::>>>>>>>>>>>>>>>-65.",
+".@#%&&&&&&&&=========***********::::::::::::>>>>>>>>>>>>>>>1-43.",
+".@#%&&&&&&&=========***********::::::::::::>>>>>>>>>>>>>>>11-43.",
+".@#%&&&&&&=========***********::::::::::::>>>>>>>>>>>>>>>111-45.",
+".@#&&&&&&=========***********::::::::::::>>>>>>>>>>>>>>>1111-65.",
+".#$&&&&&=========***********::::::::::::>>>>>>>>>>>>>>>11111765.",
+".#$&&&&=========***********::::::::::::>>>>>>>>>>>>>>>111111765.",
+".#$&&&=========***********::::::::::::>>>>>>>>>>>>>>>1111111745.",
+".#$&&=========***********::::::::::::>>>>>>>>>>>>>>>11111111765.",
+".#$&=========***********::::::::::::>>>>>>>>>>>>>>>111111111765.",
+".#$&========***********::::::::::::>>>>>>>>>>>>>>>1111111111765.",
+".#$========***********::::::::::::>>>>>>>>>>>>>>>11111111111765.",
+".#$&======***********::::::::::::>>>>>>>>>>>>>>>111111111111765.",
+".#$&=====***********::::::::::::>>>>>>>>>>>>>>>1111111111111765.",
+".#$=====***********::::::::::::>>>>>>>>>>>>>>>11111111111111765.",
+".#$====***********::::::::::::>>>>>>>>>>>>>>>111111111111111765.",
+".#%===***********::::::::::::>>>>>>>>>>>>>>>111111111111111-765.",
+".#%==***********::::::::::::>>>>>>>>>>>>>>>111111111111111--765.",
+".#$=***********::::::::::::>>>>>>>>>>>>>>>111111111111111---765.",
+".$%=**********::::::::::::>>>>>>>>>>>>>>>111111111111111----789.",
+".$%=*********::::::::::::>>>>>>>>>>>>>>>111111111111111-----765.",
+".$%*********::::::::::::>>>>>>>>>>>>>>>111111111111111------765.",
+".$%=*******::::::::::::>>>>>>>>>>>>>>>111111111111111-------765.",
+".$%=******::::::::::::>>>>>>>>>>>>>>>111111111111111--------765.",
+".$%=*****::::::::::::>>>>>>>>>>>>>>>111111111111111---------089.",
+".$%*****::::::::::::>>>>>>>>>>>>>>>111111111111111----------089.",
+".$%****::::::::::::>>>>>>>>>>>>>>>111111111111111-----------065.",
+".$%***::::::::::::>>>>>>>>>>>>>>>111111111111111------------065.",
+".$%**::::::::::::>>>>>>>>>>>>>>>111111111111111-------------065.",
+".$%*::::::::::::>>>>>>>>>>>>>>>111111111111111--------------089.",
+".$%*:::::::::::>>>>>>>>>>>>>>>111111111111111---------------089.",
+".$&*::::::::::>>>>>>>>>>>>>>>111111111111111----------------065.",
+".$%*:::::::::>>>>>>>>>>>>>>>111111111111111-----------------065.",
+".$%*::::::::>>>>>>>>>>>>>>>111111111111111-----------------7089.",
+".$&*:::::::>>>>>>>>>>>>>>>111111111111111-----------------77089.",
+".%&:::::::>>>>>>>>>>>>>>>111111111111111-----------------777089.",
+".%&::::::>>>>>>>>>>>>>>>111111111111111-----------------7777089.",
+".%&:::::>>>>>>>>>>>>>>>111111111111111-----------------77777089.",
+".%&*:::>>>>>>>>>>>>>>>111111111111111-----------------7777770qw.",
+".&&=*:>11-11------7---777--77777707770007700000000000ee00eee;rt.",
+".**17eyu444446444666666666668666686668888888888888888q8888qq<ip.",
+" .1u246<53333553355533555555955559555595555995559955999999wwia. ",
+" ............................................................ "};
diff --git a/gtk/theme_button2.xpm b/gtk/theme_button2.xpm
new file mode 100644
index 0000000000..8c8d46f523
--- /dev/null
+++ b/gtk/theme_button2.xpm
@@ -0,0 +1,110 @@
+/* XPM */
+static char *theme_button2_xpm[] = {
+/* width height num_colors chars_per_pixel */
+" 64 64 39 1",
+/* colors */
+". c None",
+"# c #000000",
+"a c #fffbff",
+"b c #f7f7f7",
+"c c #f7f3f7",
+"d c #efefef",
+"e c #efebef",
+"f c #e7e7e7",
+"g c #e7e3e7",
+"h c #dedfde",
+"i c #dedbde",
+"j c #d6d3d6",
+"k c #d6d7d6",
+"l c #c6c3c6",
+"m c #adaead",
+"n c #cecfce",
+"o c #cecbce",
+"p c #adaaad",
+"q c #848684",
+"r c #c6c7c6",
+"s c #9c9e9c",
+"t c #7b797b",
+"u c #9c9a9c",
+"v c #737573",
+"w c #949694",
+"x c #bdbebd",
+"y c #949294",
+"z c #737173",
+"A c #bdbabd",
+"B c #8c8e8c",
+"C c #6b6d6b",
+"D c #b5b6b5",
+"E c #7b7d7b",
+"F c #5a595a",
+"G c #b5b2b5",
+"H c #a5a6a5",
+"I c #636163",
+"J c #4a494a",
+"K c #525152",
+/* pixels */
+"..############################################################..",
+".#KICCzzzzzzvvzzvvvzzvvvvzvvvvzvvvvzvvvvvvttvvvttvvttttvqwusHr#.",
+"#JIqBByyyyByyyyyyyyyyyyyyyywwwywwwwywwwwwwwwwwwuuuwuuuuuHGDxrjj#",
+"#FEmDDDAADDAAAAAAAAAAAxxAAAxxxAxxxxxxllxxxlllxllllllrrlrronjkii#",
+"#CBAxxxxxxlllllllllllllllllrrrrrrrrrrrrrrrooooooooooooooonnnjih#",
+"#zyAxxxxxlllllllllllllllllrrrrrrrrrrrrrrrooooooooooooooonnnnnih#",
+"#zyAxxxxlllllllllllllllllrrrrrrrrrrrrrrrooooooooooooooonnnnnnih#",
+"#zyAxxxlllllllllllllllllrrrrrrrrrrrrrrrooooooooooooooonnnnnnnih#",
+"#zyAxxlllllllllllllllllrrrrrrrrrrrrrrrooooooooooooooonnnnnnnjig#",
+"#zyAxlllllllllllllllllrrrrrrrrrrrrrrrooooooooooooooonnnnnnnnjhg#",
+"#vwAlllllllllllllllllrrrrrrrrrrrrrrrooooooooooooooonnnnnnnnnjhg#",
+"#vwAllllllllllllllllrrrrrrrrrrrrrrrooooooooooooooonnnnnnnnnnjig#",
+"#zyAlllllllllllllllrrrrrrrrrrrrrrrooooooooooooooonnnnnnnnnnnjhg#",
+"#zyAllllllllllllllrrrrrrrrrrrrrrrooooooooooooooonnnnnnnnnnnnjhg#",
+"#vwAlllllllllllllrrrrrrrrrrrrrrrooooooooooooooonnnnnnnnnnnnjjhg#",
+"#vwAllllllllllllrrrrrrrrrrrrrrrooooooooooooooonnnnnnnnnnnnjjjhg#",
+"#vwAlllllllllllrrrrrrrrrrrrrrrooooooooooooooonnnnnnnnnnnnjjjjhg#",
+"#zyAllllllllllrrrrrrrrrrrrrrrooooooooooooooonnnnnnnnnnnnjjjjjhg#",
+"#zyAlllllllllrrrrrrrrrrrrrrrooooooooooooooonnnnnnnnnnnnjjjjjkhg#",
+"#vwxllllllllrrrrrrrrrrrrrrrooooooooooooooonnnnnnnnnnnnjjjjjjkhg#",
+"#vwxlllllllrrrrrrrrrrrrrrrooooooooooooooonnnnnnnnnnnnjjjjjjjkhg#",
+"#vwxllllllrrrrrrrrrrrrrrrooooooooooooooonnnnnnnnnnnnjjjjjjjjjhg#",
+"#vwxlllllrrrrrrrrrrrrrrrooooooooooooooonnnnnnnnnnnnjjjjjjjjjkhg#",
+"#zyxllllrrrrrrrrrrrrrrrooooooooooooooonnnnnnnnnnnnjjjjjjjjjjkhg#",
+"#vwxlllrrrrrrrrrrrrrrrooooooooooooooonnnnnnnnnnnnjjjjjjjjjjjkgf#",
+"#vwxllrrrrrrrrrrrrrrrooooooooooooooonnnnnnnnnnnnjjjjjjjjjjjkkhf#",
+"#vwxlrrrrrrrrrrrrrrrooooooooooooooonnnnnnnnnnnnjjjjjjjjjjjkkkhf#",
+"#vwxrrrrrrrrrrrrrrrooooooooooooooonnnnnnnnnnnnjjjjjjjjjjjkkkkgf#",
+"#vwxrrrrrrrrrrrrrrooooooooooooooonnnnnnnnnnnnjjjjjjjjjjjkkkkkgf#",
+"#vwxrrrrrrrrrrrrrooooooooooooooonnnnnnnnnnnnjjjjjjjjjjjkkkkkigf#",
+"#vwxrrrrrrrrrrrrooooooooooooooonnnnnnnnnnnnjjjjjjjjjjjkkkkkkigf#",
+"#vwxrrrrrrrrrrrooooooooooooooonnnnnnnnnnnnjjjjjjjjjjjkkkkkkkkgf#",
+"#vwxrrrrrrrrrrooooooooooooooonnnnnnnnnnnnjjjjjjjjjjjkkkkkkkkigf#",
+"#vwxrrrrrrrrrooooooooooooooonnnnnnnnnnnnjjjjjjjjjjjkkkkkkkkkigf#",
+"#vwxrrrrrrrrooooooooooooooonnnnnnnnnnnnjjjjjjjjjjjkkkkkkkkkiigf#",
+"#vuxrrrrrrrooooooooooooooonnnnnnnnnnnnjjjjjjjjjjjkkkkkkkkkiiigf#",
+"#vwxrrrrrrooooooooooooooonnnnnnnnnnnnjjjjjjjjjjjkkkkkkkkkiiiigf#",
+"#vwxrrrrrooooooooooooooonnnnnnnnnnnnjjjjjjjjjjjkkkkkkkkkiiiiigf#",
+"#vwlrrrrooooooooooooooonnnnnnnnnnnnjjjjjjjjjjjkkkkkkkkkiiiiiife#",
+"#vulrrrooooooooooooooonnnnnnnnnnnnjjjjjjjjjjjkkkkkkkkkiiiiiihfe#",
+"#tulrrooooooooooooooonnnnnnnnnnnnjjjjjjjjjjjkkkkkkkkkiiiiiiihfe#",
+"#tulrooooooooooooooonnnnnnnnnnnnjjjjjjjjjjjkkkkkkkkkiiiiiiiihfe#",
+"#vwlooooooooooooooonnnnnnnnnnnnjjjjjjjjjjjkkkkkkkkkiiiiiiiihhfe#",
+"#vwloooooooooooooonnnnnnnnnnnnjjjjjjjjjjjkkkkkkkkkiiiiiiiihhhfe#",
+"#tulooooooooooooonnnnnnnnnnnnjjjjjjjjjjjkkkkkkkkkiiiiiiiihhhhfe#",
+"#tuloooooooooooonnnnnnnnnnnnjjjjjjjjjjjkkkkkkkkkiiiiiiiihhhhhfe#",
+"#tulooooooooooonnnnnnnnnnnnjjjjjjjjjjjkkkkkkkkkiiiiiiiihhhhhhee#",
+"#vwloooooooooonnnnnnnnnnnnjjjjjjjjjjjkkkkkkkkkiiiiiiiihhhhhhgee#",
+"#vulooooooooonnnnnnnnnnnnjjjjjjjjjjjkkkkkkkkkiiiiiiiihhhhhhgged#",
+"#tuloooooooonnnnnnnnnnnnjjjjjjjjjjjkkkkkkkkkiiiiiiiihhhhhhggged#",
+"#turooooooonnnnnnnnnnnnjjjjjjjjjjjkkkkkkkkkiiiiiiiihhhhhhgggged#",
+"#tuloooooonnnnnnnnnnnnjjjjjjjjjjjkkkkkkkkkiiiiiiiihhhhhhggggged#",
+"#tulooooonnnnnnnnnnnnjjjjjjjjjjjkkkkkkkkkiiiiiiiihhhhhhgggggfed#",
+"#vuroooonnnnnnnnnnnnjjjjjjjjjjjkkkkkkkkkiiiiiiiihhhhhhgggggffed#",
+"#turooonnnnnnnnnnnnjjjjjjjjjjjkkkkkkkkkiiiiiiiihhhhhhgggggfffdc#",
+"#turoonnnnnnnnnnnnjjjjjjjjjjjkkkkkkkkkiiiiiiiihhhhhhgggggffffdc#",
+"#tsronnnnnnnnnnnnjjjjjjjjjjjkkkkkkkkkiiiiiiiihhhhhhgggggffffedc#",
+"#turnnnnnnnnnnnnjjjjjjjjjjjkkkkkkkkkiiiiiiiihhhhhhgggggffffeecc#",
+"#turnnnnnnnnnnnjjjjjjjjjjjkkkkkkkkkiiiiiiiihhhhhhgggggffffeedcb#",
+"#tsrnnnnnnnnnnjjjjjjjjjjjkkkkkkkkkiiiiiiiihhhhhhgggggffffeeedcb#",
+"#qponnnnnnjjjjjjjjjjkkkkkkkkkkiiiiiiiiiihhhhhhhgggggffffeeeddba#",
+"#mljkiiiiihhhhhhhhhhhghhhhggggggggggfgffffffffeeeeeeeedddcccbaa#",
+".#jihhgggggggggggggggggggfffffffffffeeeeeeeeeeeeddddddccccbbaa#.",
+"..############################################################.."
+};
diff --git a/gtk/theme_led_off1.xpm b/gtk/theme_led_off1.xpm
new file mode 100644
index 0000000000..27d7e3e00f
--- /dev/null
+++ b/gtk/theme_led_off1.xpm
@@ -0,0 +1,86 @@
+/* XPM */
+static char * theme_led_off1_xpm[] = {
+"12 12 71 1",
+" c None",
+". c #A7A7A7",
+"+ c #9F9F9F",
+"@ c #ACACAC",
+"# c #C7C7C7",
+"$ c #919191",
+"% c #7B7B7B",
+"& c #888888",
+"* c #969696",
+"= c #A5A5A5",
+"- c #B4B4B4",
+"; c #C4C4C4",
+"> c #DBDBDB",
+", c #666666",
+"' c #9B3A3A",
+") c #A20303",
+"! c #830000",
+"~ c #BB5A5A",
+"{ c #D2D2D2",
+"] c #E7E7E7",
+"^ c #880000",
+"/ c #7F0000",
+"( c #810000",
+"_ c #C16060",
+": c #E2E2E2",
+"< c #840000",
+"[ c #FAF1F1",
+"} c #D96767",
+"| c #940000",
+"1 c #7D0000",
+"2 c #710000",
+"3 c #910202",
+"4 c #E5E5E5",
+"5 c #F6F6F6",
+"6 c #910000",
+"7 c #E61A1A",
+"8 c #D61A1A",
+"9 c #B00000",
+"0 c #790000",
+"a c #5F0000",
+"b c #590000",
+"c c #EAEAEA",
+"d c #F8F8F8",
+"e c #820000",
+"f c #A70000",
+"g c #B90000",
+"h c #6D0000",
+"i c #4D0000",
+"j c #3F0000",
+"k c #F0F0F0",
+"l c #FEFEFE",
+"m c #A00202",
+"n c #7E0000",
+"o c #6C0000",
+"p c #4F0000",
+"q c #330000",
+"r c #540000",
+"s c #F7F7F7",
+"t c #FFFFFF",
+"u c #B85858",
+"v c #6E0000",
+"w c #670000",
+"x c #550000",
+"y c #3C0000",
+"z c #2F0000",
+"A c #B76060",
+"B c #BD5E5E",
+"C c #440000",
+"D c #2E0000",
+"E c #530000",
+"F c #B85F5F",
+" .+@# ",
+" $%&*=-;> ",
+" $,')!!)~{] ",
+" %'!!^//(_: ",
+".&)<[}|12345",
+"+*!67890abcd",
+"@=!efg|hijkl",
+"#-m0neopqrst",
+" ;uvwxyzzAt ",
+" >{B(CDEFtt ",
+" ]:4ckstt ",
+" 5dlt "};
diff --git a/gtk/theme_led_off2.xpm b/gtk/theme_led_off2.xpm
new file mode 100644
index 0000000000..c57e6966ec
--- /dev/null
+++ b/gtk/theme_led_off2.xpm
@@ -0,0 +1,80 @@
+/* XPM */
+static char * theme_led_off2_xpm[] = {
+"12 12 65 1",
+" c None",
+". c #404040",
+"+ c #393939",
+"@ c #464646",
+"# c #727272",
+"$ c #2F2F2F",
+"% c #242424",
+"& c #2A2A2A",
+"* c #323232",
+"= c #3E3E3E",
+"- c #515151",
+"; c #6C6C6C",
+"> c #9F9F9F",
+", c #1B1B1B",
+"' c #360F0F",
+") c #3C0101",
+"! c #270000",
+"~ c #5C1717",
+"{ c #898989",
+"] c #BFBFBF",
+"^ c #2A0000",
+"/ c #250000",
+"( c #260000",
+"_ c #661919",
+": c #B2B2B2",
+"< c #280000",
+"[ c #F4DBDB",
+"} c #9A1C1C",
+"| c #310000",
+"1 c #240000",
+"2 c #1F0000",
+"3 c #2F0101",
+"4 c #BABABA",
+"5 c #E9E9E9",
+"6 c #2F0000",
+"7 c #BD0707",
+"8 c #930707",
+"9 c #4B0000",
+"0 c #230000",
+"a c #190000",
+"b c #170000",
+"c c #C8C8C8",
+"d c #EFEFEF",
+"e c #400000",
+"f c #580000",
+"g c #1E0000",
+"h c #140000",
+"i c #100000",
+"j c #D9D9D9",
+"k c #FEFEFE",
+"l c #3A0101",
+"m c #1D0000",
+"n c #0D0000",
+"o c #150000",
+"p c #ECECEC",
+"q c #FFFFFF",
+"r c #571717",
+"s c #1C0000",
+"t c #160000",
+"u c #0F0000",
+"v c #0C0000",
+"w c #551919",
+"x c #5F1919",
+"y c #110000",
+"z c #571919",
+" .+@# ",
+" $%&*=-;> ",
+" $,')!!)~{] ",
+" %'!!^//(_: ",
+".&)<[}|12345",
+"+*!67890abcd",
+"@=!!ef|ghijk",
+"#-l0/!mhnopq",
+" ;rgstuvvwq ",
+" >{x(yvozqq ",
+" ]:4cjpqq ",
+" 5dkq "};
diff --git a/gtk/theme_led_on1.xpm b/gtk/theme_led_on1.xpm
new file mode 100644
index 0000000000..9d7c3fa20f
--- /dev/null
+++ b/gtk/theme_led_on1.xpm
@@ -0,0 +1,96 @@
+/* XPM */
+static char * theme_led_on1_xpm[] = {
+"12 12 81 1",
+" c None",
+". c #A7A7A7",
+"+ c #9F9F9F",
+"@ c #ACACAC",
+"# c #C7C7C7",
+"$ c #909090",
+"% c #7B7B7B",
+"& c #888888",
+"* c #969696",
+"= c #A5A5A5",
+"- c #B4B4B4",
+"; c #C4C4C4",
+"> c #DBDBDB",
+", c #666666",
+"' c #A65353",
+") c #B94343",
+"! c #CD0000",
+"~ c #CA0000",
+"{ c #C53838",
+"] c #CA6565",
+"^ c #D2D2D2",
+"/ c #E7E7E7",
+"( c #A94D4D",
+"_ c #CF0101",
+": c #E68080",
+"< c #DE5656",
+"[ c #D90101",
+"} c #D50000",
+"| c #C20000",
+"1 c #CC7171",
+"2 c #E2E2E2",
+"3 c #BC3D3D",
+"4 c #F9F1F1",
+"5 c #F9DBDB",
+"6 c #F94545",
+"7 c #EF0000",
+"8 c #B60000",
+"9 c #B84747",
+"0 c #E5E5E5",
+"a c #F6F6F6",
+"b c #E04949",
+"c c #FAD1D1",
+"d c #FEADAD",
+"e c #FE1717",
+"f c #F00000",
+"g c #A20000",
+"h c #720000",
+"i c #EAEAEA",
+"j c #F8F8F8",
+"k c #CB0000",
+"l c #DB0000",
+"m c #F72E2E",
+"n c #FE1212",
+"o c #FE0000",
+"p c #E70000",
+"q c #8F0000",
+"r c #670000",
+"s c #F0F0F0",
+"t c #FEFEFE",
+"u c #C43D3D",
+"v c #CE0000",
+"w c #E60000",
+"x c #DD0000",
+"y c #B10000",
+"z c #7D0000",
+"A c #9C3D3D",
+"B c #F7F7F7",
+"C c #FFFFFF",
+"D c #C76A6A",
+"E c #AE0000",
+"F c #A70000",
+"G c #950000",
+"H c #790000",
+"I c #640000",
+"J c #BF7979",
+"K c #C96B6B",
+"L c #B14747",
+"M c #690000",
+"N c #560000",
+"O c #8F3F3F",
+"P c #BC8282",
+" .+@# ",
+" $%&*=-;> ",
+" $,')!~{]^/ ",
+" %(_:<[}|12 ",
+".&3:4567890a",
+"+*!bcdefghij",
+"@=klmnopqrst",
+"#-uvw7xyzABC",
+" ;DEFGHIrJC ",
+" >^KLMNOPCC ",
+" /20isBCC ",
+" ajtC "};
diff --git a/gtk/theme_led_on2.xpm b/gtk/theme_led_on2.xpm
new file mode 100644
index 0000000000..ed4d3d6364
--- /dev/null
+++ b/gtk/theme_led_on2.xpm
@@ -0,0 +1,96 @@
+/* XPM */
+static char * theme_led_on2_xpm[] = {
+"12 12 81 1",
+" c None",
+". c #3D3D3D",
+"+ c #383838",
+"@ c #424242",
+"# c #666666",
+"$ c #2F2F2F",
+"% c #252525",
+"& c #2B2B2B",
+"* c #323232",
+"= c #3C3C3C",
+"- c #4A4A4A",
+"; c #616161",
+"> c #939393",
+", c #1D1D1D",
+"' c #3C1616",
+") c #5A1414",
+"! c #AF0000",
+"~ c #AB0000",
+"{ c #6D1111",
+"] c #6B1C1C",
+"^ c #7D7D7D",
+"/ c #B5B5B5",
+"( c #3E1414",
+"_ c #B20000",
+": c #E68080",
+"< c #DE5656",
+"[ c #D90101",
+"} c #D50000",
+"| c #9F0000",
+"1 c #6F2020",
+"2 c #A6A6A6",
+"3 c #5F1313",
+"4 c #F9F1F1",
+"5 c #F9DBDB",
+"6 c #F94545",
+"7 c #EF0000",
+"8 c #B60000",
+"9 c #591515",
+"0 c #AFAFAF",
+"a c #E6E6E6",
+"b c #E04949",
+"c c #FAD1D1",
+"d c #FEADAD",
+"e c #FE1717",
+"f c #F00000",
+"g c #A20000",
+"h c #520000",
+"i c #BFBFBF",
+"j c #ECECEC",
+"k c #AC0000",
+"l c #DB0000",
+"m c #F72E2E",
+"n c #FE1212",
+"o c #FE0000",
+"p c #E70000",
+"q c #8F0000",
+"r c #4B0000",
+"s c #D2D2D2",
+"t c #FEFEFE",
+"u c #6C1313",
+"v c #CE0000",
+"w c #E60000",
+"x c #DD0000",
+"y c #B10000",
+"z c #7D0000",
+"A c #3E1313",
+"B c #E9E9E9",
+"C c #FFFFFF",
+"D c #651D1D",
+"E c #880000",
+"F c #A70000",
+"G c #950000",
+"H c #790000",
+"I c #640000",
+"J c #572323",
+"K c #691E1E",
+"L c #501515",
+"M c #4C0000",
+"N c #3D0000",
+"O c #351313",
+"P c #532727",
+" .+@# ",
+" $%&*=-;> ",
+" $,')!~{]^/ ",
+" %(_:<[}|12 ",
+".&3:4567890a",
+"+*!bcdefghij",
+"@=klmnopqrst",
+"#-uvw7xyzABC",
+" ;DEFGHIrJC ",
+" >^KLMNOPCC ",
+" /20isBCC ",
+" ajtC "};
diff --git a/gtk/theme_main.c b/gtk/theme_main.c
new file mode 100644
index 0000000000..004c5521e0
--- /dev/null
+++ b/gtk/theme_main.c
@@ -0,0 +1,47 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "gtkthemes.h"
+#include "gtkprivate.h"
+#include "gtkbutton.h"
+#include "gtklabel.h"
+#include "gtkmain.h"
+#include "gtksignal.h"
+
+/* Theme functions to export */
+void theme_init (int *argc,
+ char ***argv);
+void theme_exit (void);
+
+/* internals */
+
+void
+theme_init (int *argc,
+ char ***argv)
+{
+ printf("Theme Init\n");
+}
+
+void
+theme_exit (void)
+{
+ printf("Theme Exit\n");
+}
+