Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2006-06-08 17:23:18 (GMT)
committer Dan Williams <dcbw@redhat.com>2006-06-08 17:23:18 (GMT)
commit140562703bdf7e752a172ae53bc4d3571b06def2 (patch)
treeadcfdbdef8716393fb73ae1f77a87a61c1c6a0b7
parent882faa24e430168335eaeb66294ec19358e24351 (diff)
First go at a gtk theme/engine for sugar
-rw-r--r--Makefile.am6
-rwxr-xr-xautogen.sh7
-rw-r--r--configure.in24
-rw-r--r--gtk-engine/Makefile.am1
-rw-r--r--gtk-engine/src/Makefile.am19
-rw-r--r--gtk-engine/src/olpc-rc-style.c241
-rw-r--r--gtk-engine/src/olpc-rc-style.h52
-rw-r--r--gtk-engine/src/olpc-style.c181
-rw-r--r--gtk-engine/src/olpc-style.h49
-rw-r--r--gtk-engine/src/olpc.c42
-rw-r--r--gtk-engine/src/olpc.h36
-rw-r--r--gtk-engine/theme/Makefile.am5
-rw-r--r--gtk-engine/theme/gtkrc10
-rw-r--r--po/ChangeLog0
14 files changed, 667 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am
index c980be4..baa0a28 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,5 @@
-SUBDIRS = art
+SUBDIRS = art gtk-engine po
-EXTRA_DIST = gtkrc2-default
+intltool_extra = intltool-extract.in intltool-merge.in intltool-update.in
+
+EXTRA_DIST = $(intltool_extra) gtkrc2-default
diff --git a/autogen.sh b/autogen.sh
index 476ccdd..7398399 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -57,11 +57,14 @@ $ACLOCAL $ACLOCAL_FLAGS
# optionally feature autoheader
(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader
+glib-gettextize --force --copy
+
+intltoolize --force --copy --automake
+
$AUTOMAKE -a $am_opt
autoconf || echo "autoconf failed - version 2.5x is probably required"
-
-intltoolize --force --copy --automake
+libtoolize -f
cd $ORIGDIR
diff --git a/configure.in b/configure.in
index 0bdf505..0357eca 100644
--- a/configure.in
+++ b/configure.in
@@ -2,7 +2,7 @@ AC_INIT(art)
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(olpc-artwork, 0.3)
+AM_INIT_AUTOMAKE(olpc-artwork, 0.5)
# Honor aclocal flags
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
@@ -13,7 +13,7 @@ AM_DISABLE_STATIC
AC_PROG_CC
AC_HEADER_STDC
-
+AC_PROG_LIBTOOL
AC_PROG_INTLTOOL
PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.0,,
@@ -23,6 +23,22 @@ GDK_PIXBUF2_CFLAGS=`$PKG_CONFIG --cflags gdk-pixbuf-2.0`
GDK_PIXBUF2_LIBS=`$PKG_CONFIG --libs gdk-pixbuf-2.0`
AC_SUBST(GDK_PIXBUF2_CFLAGS)
AC_SUBST(GDK_PIXBUF2_LIBS)
+
+PKG_CHECK_MODULES(ENGINE, gtk+-2.0 >= 2.0 gobject-2.0 >= 2.0 cairo >= 0.1.1)
+
+dnl ===========================================================================
+dnl Use lots of warning flags with GCC
+
+WARN_CFLAGS=""
+if test "x$GCC" = "xyes"; then
+ WARN_CFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes \
+ -Wmissing-prototypes -Wmissing-declarations \
+ -Wnested-externs -fno-strict-aliasing"
+fi
+AC_SUBST(WARN_CFLAGS)
+dnl ===========================================================================
+
+AM_GLIB_GNU_GETTEXT
AC_OUTPUT([
Makefile
@@ -34,4 +50,8 @@ art/icon-theme/Makefile
art/icon-theme/24x24/Makefile
art/icon-theme/32x32/Makefile
art/icon-theme/48x48/Makefile
+gtk-engine/Makefile
+gtk-engine/src/Makefile
+gtk-engine/theme/Makefile
+po/Makefile.in
])
diff --git a/gtk-engine/Makefile.am b/gtk-engine/Makefile.am
new file mode 100644
index 0000000..e5b32d9
--- /dev/null
+++ b/gtk-engine/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = src theme
diff --git a/gtk-engine/src/Makefile.am b/gtk-engine/src/Makefile.am
new file mode 100644
index 0000000..3541ff4
--- /dev/null
+++ b/gtk-engine/src/Makefile.am
@@ -0,0 +1,19 @@
+INCLUDES = \
+ -DGTK_DISABLE_DEPRECATED \
+ -DGDK_DISABLE_DEPRECATED \
+ -DG_DISABLE_DEPRECATED \
+ $(ENGINE_CFLAGS) $(WARN_CFLAGS)
+
+enginedir = $(libdir)/gtk-2.0/$(GTK_VERSION)/engines
+engine_LTLIBRARIES = libolpc.la
+
+libolpc_la_SOURCES = \
+ olpc.c \
+ olpc-rc-style.c \
+ olpc-rc-style.h \
+ olpc-style.c \
+ olpc-style.h
+
+libolpc_la_LDFLAGS = \
+ -avoid-version -no-undefined -module \
+ $(ENGINE_LIBS)
diff --git a/gtk-engine/src/olpc-rc-style.c b/gtk-engine/src/olpc-rc-style.c
new file mode 100644
index 0000000..a71b087
--- /dev/null
+++ b/gtk-engine/src/olpc-rc-style.c
@@ -0,0 +1,241 @@
+/* olpc - cairo based gtk+ theme
+ *
+ * Copyright © 2005 Red Hat, Inc.
+ * Based on CGE by Julien Boulnois.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program 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
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
+#include "olpc-style.h"
+#include "olpc-rc-style.h"
+
+#include <gtk/gtk.h>
+#include <string.h>
+
+static void olpc_rc_style_init (OlpcRcStyle *style);
+static void olpc_rc_style_class_init (OlpcRcStyleClass *klass);
+static void olpc_rc_style_finalize (GObject *object);
+
+enum
+{
+ TOKEN_WINDOW_TOP_COLOR = G_TOKEN_LAST + 1,
+ TOKEN_WINDOW_BOTTOM_COLOR
+};
+
+static struct
+{
+ gchar *name;
+ guint token;
+}
+theme_symbols[] =
+{
+ { "window-top-color", TOKEN_WINDOW_TOP_COLOR },
+ { "window-bottom-color", TOKEN_WINDOW_BOTTOM_COLOR }
+};
+
+static GtkRcStyleClass *parent_class;
+
+GType olpc_type_rc_style = 0;
+
+void
+olpc_rc_style_register_type (GTypeModule *module)
+{
+ static const GTypeInfo object_info = {
+ sizeof (OlpcRcStyleClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) olpc_rc_style_class_init,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof (OlpcRcStyle),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) olpc_rc_style_init,
+ };
+
+ olpc_type_rc_style = g_type_module_register_type (module,
+ GTK_TYPE_RC_STYLE,
+ "OlpcRcStyle",
+ &object_info, 0);
+}
+
+static GtkStyle *
+olpc_rc_style_create_style (GtkRcStyle *style)
+{
+ return g_object_new (OLPC_TYPE_STYLE, NULL);
+}
+
+static GTokenType
+olpc_rc_style_parse_window_top_color (OlpcRcStyle *rc_style,
+ GtkSettings *settings,
+ GScanner *scanner)
+{
+ GTokenType token;
+
+ token = g_scanner_get_next_token (scanner);
+ if (token != TOKEN_WINDOW_TOP_COLOR)
+ return TOKEN_WINDOW_TOP_COLOR;
+
+ token = g_scanner_get_next_token (scanner);
+ if (token != G_TOKEN_EQUAL_SIGN)
+ return G_TOKEN_EQUAL_SIGN;
+
+ token = gtk_rc_parse_color (scanner,
+ &rc_style->window_top_color);
+ if (token != G_TOKEN_NONE)
+ return token;
+
+ rc_style->window_top_color.pixel = TRUE;
+
+ return G_TOKEN_NONE;
+}
+
+static GTokenType
+olpc_rc_style_parse_window_bottom_color (OlpcRcStyle *rc_style,
+ GtkSettings *settings,
+ GScanner *scanner)
+{
+ GTokenType token;
+
+ token = g_scanner_get_next_token (scanner);
+ if (token != TOKEN_WINDOW_BOTTOM_COLOR)
+ return TOKEN_WINDOW_BOTTOM_COLOR;
+
+ token = g_scanner_get_next_token (scanner);
+ if (token != G_TOKEN_EQUAL_SIGN)
+ return G_TOKEN_EQUAL_SIGN;
+
+ token = gtk_rc_parse_color (scanner,
+ &rc_style->window_bottom_color);
+ if (token != G_TOKEN_NONE)
+ return token;
+
+ rc_style->window_bottom_color.pixel = TRUE;
+
+ return G_TOKEN_NONE;
+}
+
+static GTokenType
+olpc_rc_style_parse (GtkRcStyle *rc_style,
+ GtkSettings *settings,
+ GScanner *scanner)
+{
+ static GQuark scope_id = 0;
+ OlpcRcStyle *olpc_style = OLPC_RC_STYLE (rc_style);
+
+ guint old_scope;
+ GTokenType token, expected;
+ gint i;
+
+ /* Set up a new scope in this scanner. */
+ if (!scope_id)
+ scope_id = g_quark_from_string ("olpc_theme_engine");
+
+ old_scope = g_scanner_set_scope (scanner, scope_id);
+
+ /* Add symbols for this scope, (if not present already) */
+ if (!g_scanner_lookup_symbol(scanner, theme_symbols[0].name)) {
+ for (i = 0; i < G_N_ELEMENTS (theme_symbols); i++)
+ g_scanner_scope_add_symbol(scanner, scope_id,
+ theme_symbols[i].name,
+ GINT_TO_POINTER(theme_symbols[i].token));
+ }
+
+ /* Begin parsing top-level. Apparently a left curly brace has
+ * already been consumed for use, but we're expected to consume the
+ * final right closing brace. Weird. */
+ while (1) {
+ token = g_scanner_peek_next_token(scanner);
+ if (token == G_TOKEN_RIGHT_CURLY) {
+ g_scanner_get_next_token (scanner);
+ expected = G_TOKEN_NONE;
+ break;
+ }
+
+ switch (token)
+ {
+ case TOKEN_WINDOW_TOP_COLOR:
+ expected = olpc_rc_style_parse_window_top_color (olpc_style, settings, scanner);
+ break;
+ case TOKEN_WINDOW_BOTTOM_COLOR:
+ expected = olpc_rc_style_parse_window_bottom_color (olpc_style, settings, scanner);
+ break;
+ default:
+ g_scanner_get_next_token (scanner);
+ expected = G_TOKEN_RIGHT_CURLY;
+ break;
+ }
+
+ if (expected != G_TOKEN_NONE)
+ break;
+ }
+
+ /* On success, restore the previous scope. (For errors, we need the
+ * current scope to format a proper error message.) */
+ if (expected == G_TOKEN_NONE)
+ g_scanner_set_scope(scanner, old_scope);
+
+ return expected;
+}
+
+static void
+olpc_rc_style_merge (GtkRcStyle *dest,
+ GtkRcStyle *src)
+{
+ if (OLPC_IS_RC_STYLE (src)) {
+
+ OlpcRcStyle *olpc_dest = OLPC_RC_STYLE (dest);
+ OlpcRcStyle *olpc_src = OLPC_RC_STYLE (src);
+
+ if (olpc_src->window_top_color.pixel)
+ olpc_dest->window_top_color = olpc_src->window_top_color;
+
+ if (olpc_src->window_bottom_color.pixel)
+ olpc_dest->window_bottom_color = olpc_src->window_bottom_color;
+ }
+
+ parent_class->merge (dest, src);
+}
+
+static void
+olpc_rc_style_init (OlpcRcStyle *rc_style)
+{
+}
+
+static void
+olpc_rc_style_class_init (OlpcRcStyleClass *klass)
+{
+ GtkRcStyleClass *rc_style_class = GTK_RC_STYLE_CLASS (klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ parent_class = g_type_class_peek_parent (klass);
+
+ rc_style_class->parse = olpc_rc_style_parse;
+ rc_style_class->merge = olpc_rc_style_merge;
+ rc_style_class->create_style = olpc_rc_style_create_style;
+
+ object_class->finalize = olpc_rc_style_finalize;
+}
+
+static void
+olpc_rc_style_finalize (GObject *object)
+{
+ /* OlpcRcStyle *rc_style = OLPC_RC_STYLE (object);
+ We would free anything necessary in rc_style here. */
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+
diff --git a/gtk-engine/src/olpc-rc-style.h b/gtk-engine/src/olpc-rc-style.h
new file mode 100644
index 0000000..4fe7968
--- /dev/null
+++ b/gtk-engine/src/olpc-rc-style.h
@@ -0,0 +1,52 @@
+/* olpc - cairo based gtk+ theme
+ *
+ * Copyright © 2006 Red Hat, Inc.
+ * Based on CGE by Julien Boulnois.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program 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
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
+#ifndef OLPC_RC_STYLE_H
+#define OLPC_RC_STYLE_H
+
+#include "olpc.h"
+
+#include <gtk/gtkrc.h>
+
+extern GType olpc_type_rc_style;
+
+#define OLPC_TYPE_RC_STYLE olpc_type_rc_style
+#define OLPC_RC_STYLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), OLPC_TYPE_RC_STYLE, OlpcRcStyle))
+#define OLPC_RC_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), OLPC_TYPE_RC_STYLE, OlpcRcStyleClass))
+#define OLPC_IS_RC_STYLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), OLPC_TYPE_RC_STYLE))
+#define OLPC_IS_RC_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), OLPC_TYPE_RC_STYLE))
+#define OLPC_RC_STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), OLPC_TYPE_RC_STYLE, OlpcRcStyleClass))
+
+typedef struct _OlpcRcStyle {
+ GtkRcStyle parent_instance;
+
+ GdkColor window_top_color;
+ GdkColor window_bottom_color;
+} OlpcRcStyle;
+
+typedef struct _OlpcRcStyleClass {
+ GtkRcStyleClass parent_class;
+} OlpcRcStyleClass;;
+
+void
+olpc_rc_style_register_type (GTypeModule *module);
+
+#endif
diff --git a/gtk-engine/src/olpc-style.c b/gtk-engine/src/olpc-style.c
new file mode 100644
index 0000000..46410fb
--- /dev/null
+++ b/gtk-engine/src/olpc-style.c
@@ -0,0 +1,181 @@
+/* olpc - cairo based gtk+ theme
+ *
+ * Copyright © 2005 Red Hat, Inc.
+ * Based on CGE by Julien Boulnois.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program 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
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
+#include <stdlib.h>
+
+#include <cairo.h>
+#include <cairo-xlib.h>
+#include <gdk/gdkx.h>
+#include <gtk/gtkwindow.h>
+
+#include "olpc.h"
+#include "olpc-style.h"
+#include "olpc-rc-style.h"
+
+static GtkStyleClass *olpc_style_parent_class;
+
+static cairo_t *
+olpc_begin_paint (GdkDrawable *window,
+ GdkRectangle *area)
+{
+ cairo_t *cr;
+
+ cr = gdk_cairo_create (window);
+
+ if (area) {
+ cairo_rectangle (cr, area->x, area->y, area->width, area->height);
+ cairo_clip (cr);
+ cairo_new_path (cr);
+ }
+
+ return cr;
+}
+
+static void
+olpc_end_paint (cairo_t *cr)
+{
+ cairo_destroy (cr);
+}
+
+static void
+draw_window_background (GtkStyle *style,
+ GtkWidget *widget,
+ GdkWindow *window,
+ GdkRectangle *area)
+{
+ OlpcRcStyle *rc_style = OLPC_RC_STYLE (style->rc_style);
+ cairo_t *cr;
+ GdkColor top_color;
+ GdkColor bottom_color;
+
+ /* GtkWindow paints out of realize() to allow the
+ * theme to set the window background pixmap
+ */
+ if (!GTK_WIDGET_MAPPED (widget))
+ return;
+
+ if (!rc_style->window_top_color.pixel)
+ top_color = style->bg[widget->state];
+ else
+ top_color = rc_style->window_top_color;
+
+ if (!rc_style->window_bottom_color.pixel)
+ bottom_color = style->bg[widget->state];
+ else
+ bottom_color = rc_style->window_bottom_color;
+
+ cr = olpc_begin_paint (window, area);
+
+ if (top_color.red == bottom_color.red &&
+ top_color.green == bottom_color.green &&
+ top_color.blue == bottom_color.blue) {
+
+ cairo_set_source_rgb (cr,
+ top_color.red / 65535.,
+ top_color.green / 65535.,
+ top_color.blue / 65535.);
+
+ } else {
+ cairo_pattern_t *pattern;
+ int height;
+
+ gdk_drawable_get_size (window, 0, &height);
+
+ pattern = cairo_pattern_create_linear (0, 0, 0, height);
+ if (pattern) {
+ cairo_pattern_add_color_stop_rgb (pattern, 0.0,
+ top_color.red / 65535.,
+ top_color.green / 65535.,
+ top_color.blue / 65535.);
+ cairo_pattern_add_color_stop_rgb (pattern, 1.0,
+ bottom_color.red / 65535.,
+ bottom_color.green / 65535.,
+ bottom_color.blue / 65535.);
+ cairo_set_source (cr, pattern);
+ cairo_pattern_destroy (pattern);
+ }
+ }
+
+ cairo_paint (cr);
+
+ olpc_end_paint (cr);
+}
+
+static void
+olpc_draw_flat_box (GtkStyle *style,
+ GdkWindow *window,
+ GtkStateType state_type,
+ GtkShadowType shadow_type,
+ GdkRectangle *area,
+ GtkWidget *widget,
+ const gchar *detail,
+ int x,
+ int y,
+ int width,
+ int height)
+{
+ if (widget && GTK_IS_WINDOW (widget)) {
+ draw_window_background (style, widget, window, area);
+ } else {
+ olpc_style_parent_class->draw_flat_box (style, window,
+ state_type, shadow_type,
+ area, widget, detail,
+ x, y, width, height);
+ }
+}
+
+static void
+olpc_style_init (OlpcStyle *style)
+{
+}
+
+static void
+olpc_style_class_init (OlpcStyleClass *klass)
+{
+ GtkStyleClass *style_class = GTK_STYLE_CLASS (klass);
+
+ style_class->draw_flat_box = olpc_draw_flat_box;
+
+ olpc_style_parent_class = g_type_class_peek_parent (klass);
+}
+
+GType olpc_type_style = 0;
+
+void
+olpc_style_register_type (GTypeModule *module)
+{
+ static const GTypeInfo object_info = {
+ sizeof (OlpcStyleClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) olpc_style_class_init,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof (OlpcStyle),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) olpc_style_init,
+ };
+
+ olpc_type_style = g_type_module_register_type (module,
+ GTK_TYPE_STYLE,
+ "OlpcStyle",
+ &object_info, 0);
+}
diff --git a/gtk-engine/src/olpc-style.h b/gtk-engine/src/olpc-style.h
new file mode 100644
index 0000000..b393455
--- /dev/null
+++ b/gtk-engine/src/olpc-style.h
@@ -0,0 +1,49 @@
+/* olpc - cairo based gtk+ theme
+ *
+ * Copyright © 2005 Red Hat, Inc.
+ * Based on CGE by Julien Boulnois.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program 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
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
+#ifndef OLPC_STYLE_H
+#define OLPC_STYLE_H
+
+#include <gtk/gtkstyle.h>
+
+extern GType olpc_type_style;
+
+#define OLPC_TYPE_STYLE olpc_type_style
+#define OLPC_STYLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), OLPC_TYPE_STYLE, OlpcStyle))
+#define OLPC_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), OLPC_TYPE_STYLE, OlpcStyleClass))
+#define OLPC_IS_STYLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), OLPC_TYPE_STYLE))
+#define OLPC_IS_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), OLPC_TYPE_STYLE))
+#define OLPC_STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), OLPC_TYPE_STYLE, OlpcStyleClass))
+
+typedef struct _OlpcStyle
+{
+ GtkStyle parent_instance;
+} OlpcStyle;
+
+typedef struct _OlpcStyleClass
+{
+ GtkStyleClass parent_class;
+} OlpcStyleClass;
+
+void
+olpc_style_register_type (GTypeModule *module);
+
+#endif
diff --git a/gtk-engine/src/olpc.c b/gtk-engine/src/olpc.c
new file mode 100644
index 0000000..3867cea
--- /dev/null
+++ b/gtk-engine/src/olpc.c
@@ -0,0 +1,42 @@
+/* olpc - cairo based gtk+ theme
+ *
+ * Copyright © 2006 Red Hat, Inc.
+ * Based on CGE by Julien Boulnois.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program 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
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
+#include "olpc.h"
+#include "olpc-style.h"
+#include "olpc-rc-style.h"
+
+G_MODULE_EXPORT void
+theme_init (GTypeModule * module)
+{
+ olpc_rc_style_register_type (module);
+ olpc_style_register_type (module);
+}
+
+G_MODULE_EXPORT void
+theme_exit (GTypeModule * module)
+{
+}
+
+G_MODULE_EXPORT GtkRcStyle *
+theme_create_rc_style (void)
+{
+ return g_object_new (OLPC_TYPE_RC_STYLE, NULL);
+}
diff --git a/gtk-engine/src/olpc.h b/gtk-engine/src/olpc.h
new file mode 100644
index 0000000..86bd1fe
--- /dev/null
+++ b/gtk-engine/src/olpc.h
@@ -0,0 +1,36 @@
+/* caligula - cairo based gtk+ theme
+ *
+ * Copyright © 2005 Red Hat, Inc.
+ * Based on CGE by Julien Boulnois.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program 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
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
+#ifndef CALIGULA_H
+#define CALIGULA_H
+
+#include <gtk/gtk.h>
+
+G_MODULE_EXPORT void
+theme_init (GTypeModule * module);
+
+G_MODULE_EXPORT void
+theme_exit (GTypeModule * module);
+
+G_MODULE_EXPORT GtkRcStyle *
+theme_create_rc_style (void);
+
+#endif
diff --git a/gtk-engine/theme/Makefile.am b/gtk-engine/theme/Makefile.am
new file mode 100644
index 0000000..1da5d18
--- /dev/null
+++ b/gtk-engine/theme/Makefile.am
@@ -0,0 +1,5 @@
+themedir = $(datadir)/themes/olpc/gtk-2.0
+theme_DATA = gtkrc
+
+EXTRA_DIST = \
+ $(theme_DATA)
diff --git a/gtk-engine/theme/gtkrc b/gtk-engine/theme/gtkrc
new file mode 100644
index 0000000..e533936
--- /dev/null
+++ b/gtk-engine/theme/gtkrc
@@ -0,0 +1,10 @@
+style "olpc-window"
+{
+ engine "olpc"
+ {
+ window-top-color = "#a9e351"
+ window-bottom-color = "#f7fcef"
+ }
+}
+
+class "GtkWindow" style "olpc-window"
diff --git a/po/ChangeLog b/po/ChangeLog
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/po/ChangeLog