diff options
-rw-r--r-- | ChangeLog | 18 | ||||
-rw-r--r-- | Makefile.am | 20 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | src/poky-style.c | 108 | ||||
-rw-r--r-- | src/poky-style.h | 69 | ||||
-rw-r--r-- | src/sato-draw.c (renamed from src/poky-draw.c) | 114 | ||||
-rw-r--r-- | src/sato-draw.h (renamed from src/poky-draw.h) | 2 | ||||
-rw-r--r-- | src/sato-main.c (renamed from src/poky-main.c) | 10 | ||||
-rw-r--r-- | src/sato-style.h | 69 |
9 files changed, 162 insertions, 252 deletions
@@ -1,3 +1,21 @@ +2006-10-20 Thomas Wood <thos@gnome.org> + + * Makefile.am: + * configure.ac: + * src/poky-draw.c: + * src/poky-draw.h: + * src/poky-main.c: + * src/poky-style.c: + * src/poky-style.h: + * src/sato-draw.c: (sato_corner), (sato_gradient), (sato_draw_box), + (sato_draw_shadow), (sato_draw_check), (sato_draw_option), + (sato_draw_box_gap), (sato_draw_extension): + * src/sato-draw.h: + * src/sato-main.c: + * src/sato-style.h: + + Rename Poky to Sato + 2006-10-20 Thomas Wood <thomas@openedhand.com> * src/poky-draw.c: (poky_corner), (poky_draw_box), diff --git a/Makefile.am b/Makefile.am index ee288f2..ecb6f9a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,21 +2,21 @@ INCLUDES = $(GTK_CFLAGS) $(DEVELOPMENT_CFLAGS) enginedir = $(libdir)/gtk-2.0/$(GTK_VERSION)/engines -engine_LTLIBRARIES = libpoky-engine.la +engine_LTLIBRARIES = libsato-engine.la -libpoky_engine_la_SOURCES = \ - ./src/poky-draw.c \ - ./src/poky-draw.h \ - ./src/poky-main.c \ - ./src/poky-style.c \ - ./src/poky-style.h +libsato_engine_la_SOURCES = \ + ./src/sato-draw.c \ + ./src/sato-draw.h \ + ./src/sato-main.c \ + ./src/sato-style.c \ + ./src/sato-style.h -libpoky_engine_la_LDFLAGS = -module -avoid-version -no-undefined -libpoky_engine_la_LIBADD = $(GTK_LIBS) +libsato_engine_la_LDFLAGS = -module -avoid-version -no-undefined +libsato_engine_la_LIBADD = $(GTK_LIBS) -themedir = $(datadir)/themes/Poky/gtk-2.0 +themedir = $(datadir)/themes/Sato/gtk-2.0 theme_DATA = data/gtkrc EXTRA_DIST = $(theme_DATA) diff --git a/configure.ac b/configure.ac index f83b06b..b2c9ff8 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([poky-engine], [0]) +AC_INIT([sato-engine], [0]) AC_CONFIG_SRCDIR([README]) AM_INIT_AUTOMAKE @@ -18,7 +18,7 @@ AM_PROG_LIBTOOL PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6.0,, - AC_MSG_ERROR([GTK+-2.6 is required to compile poky-engine])) + AC_MSG_ERROR([GTK+-2.6 is required to compile sato-engine])) AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) diff --git a/src/poky-style.c b/src/poky-style.c deleted file mode 100644 index f848412..0000000 --- a/src/poky-style.c +++ /dev/null @@ -1,108 +0,0 @@ -/* - * poky-style.c - * This file is part of poky-engine - * - * Copyright (C) 2006 - OpenedHand Ltd - * - * poky-engine 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. - * - * poky-engine 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 poky-engine; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301 USA - */ - - - -#include <gtk/gtk.h> -#include <stdio.h> - -#include "poky-style.h" - -/*** Gtk Style Class **********************************************************/ - -GType poky_type_style = 0; - -static void poky_style_class_init (PokyStyleClass *klass); - -void -poky_style_register_type (GTypeModule *module) -{ - static const GTypeInfo object_info = - { - sizeof (PokyStyleClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) poky_style_class_init, - NULL, /* class_finalize */ - NULL, /* class_data */ - sizeof (PokyStyle), - 0, /* n_preallocs */ - (GInstanceInitFunc) NULL, - }; - - poky_type_style = g_type_module_register_type (module, - GTK_TYPE_STYLE, - "PokyStyle", - &object_info, 0); -} - -static void -poky_style_class_init (PokyStyleClass *klass) -{ - GtkStyleClass *style_class = GTK_STYLE_CLASS (klass); - poky_draw_style_class_init (style_class); -} - -/******************************************************************************/ - -/*** Gtk Style RC Class *******************************************************/ - -GType poky_type_rc_style = 0; - -static GtkStyle *poky_rc_style_create_style (GtkRcStyle *rc_style); - -static void -poky_rc_style_class_init (PokyRcStyleClass *klass) -{ - GtkRcStyleClass *rc_style_class = GTK_RC_STYLE_CLASS (klass); - rc_style_class->create_style = poky_rc_style_create_style; -} - -void -poky_rc_style_register_type (GTypeModule *module) -{ - static const GTypeInfo object_info = - { - sizeof (PokyRcStyleClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) poky_rc_style_class_init, - NULL, /* class_finalize */ - NULL, /* class_data */ - sizeof (PokyRcStyle), - 0, /* n_preallocs */ - (GInstanceInitFunc) NULL, - }; - - poky_type_rc_style = g_type_module_register_type (module, - GTK_TYPE_RC_STYLE, - "PokyRcStyle", - &object_info, 0); -} - -static GtkStyle * -poky_rc_style_create_style (GtkRcStyle *rc_style) -{ - return GTK_STYLE (g_object_new (POKY_TYPE_STYLE, NULL)); -} - -/******************************************************************************/ diff --git a/src/poky-style.h b/src/poky-style.h deleted file mode 100644 index 1e57d8f..0000000 --- a/src/poky-style.h +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef POKY_STYLE_H -#define POKY_STYLE_H - -#include <gtk/gtk.h> -#include <gmodule.h> - -#include "poky-draw.h" - -G_BEGIN_DECLS - -/*** Gtk Style Class **********************************************************/ - -extern GType poky_type_style; - -#define POKY_TYPE_STYLE poky_type_style -#define POKY_STYLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), POKY_TYPE_STYLE, PokyStyle)) -#define POKY_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), POKY_TYPE_STYLE, PokyStyleClass)) -#define POKY_IS_STYLE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), POKY_TYPE_STYLE)) -#define POKY_IS_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), POKY_TYPE_STYLE)) -#define POKY_STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), POKY_TYPE_STYLE, PokyStyleClass)) - -typedef struct _PokyStyle PokyStyle; -typedef struct _PokyStyleClass PokyStyleClass; - -struct _PokyStyle -{ - GtkStyle parent_instance; -}; - -struct _PokyStyleClass -{ - GtkStyleClass parent_class; -}; - -void poky_style_register_type (GTypeModule *module); - -/******************************************************************************/ - -/*** Gtk Style RC Class *******************************************************/ - -extern GType poky_type_rc_style; - -#define POKY_TYPE_RC_STYLE poky_type_rc_style -#define POKY_RC_STYLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), POKY_TYPE_RC_STYLE, PokyRcStyle)) -#define POKY_RC_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), POKY_TYPE_RC_STYLE, PokyRcStyleClass)) -#define POKY_IS_RC_STYLE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), POKY_TYPE_RC_STYLE)) -#define POKY_IS_RC_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), POKY_TYPE_RC_STYLE)) -#define POKY_RC_STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), POKY_TYPE_RC_STYLE, PokyRcStyleClass)) - -typedef struct _PokyRcStyle PokyRcStyle; -typedef struct _PokyRcStyleClass PokyRcStyleClass; - -struct _PokyRcStyle -{ - GtkRcStyle parent_instance; -}; - -struct _PokyRcStyleClass -{ - GtkRcStyleClass parent_class; -}; - -void poky_rc_style_register_type (GTypeModule *engine); - -/******************************************************************************/ - -G_END_DECLS - -#endif diff --git a/src/poky-draw.c b/src/sato-draw.c index df3d4d2..c6a3098 100644 --- a/src/poky-draw.c +++ b/src/sato-draw.c @@ -1,28 +1,28 @@ /* - * poky-draw.c - * This file is part of poky-engine + * sato-draw.c + * This file is part of sato-engine * * Copyright (C) 2006 - OpenedHand Ltd * - * poky-engine is free software; you can redistribute it and/or modify + * sato-engine 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. * - * poky-engine is distributed in the hope that it will be useful, + * sato-engine 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 poky-engine; if not, write to the Free Software + * along with sato-engine; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA */ -#include "poky-draw.h" -#include "poky-style.h" +#include "sato-draw.h" +#include "sato-style.h" #include <stdio.h> #include <math.h> @@ -35,15 +35,15 @@ GtkStyleClass *parent_style_class; typedef enum { - POKY_CORNER_TOP_LEFT, - POKY_CORNER_TOP_RIGHT, - POKY_CORNER_BOTTOM_LEFT, - POKY_CORNER_BOTTOM_RIGHT -} PokyCorner; + SATO_CORNER_TOP_LEFT, + SATO_CORNER_TOP_RIGHT, + SATO_CORNER_BOTTOM_LEFT, + SATO_CORNER_BOTTOM_RIGHT +} SatoCorner; static void -poky_corner (GdkWindow *window, GdkGC *gc, gint x, gint y, PokyCorner corner) +sato_corner (GdkWindow *window, GdkGC *gc, gint x, gint y, SatoCorner corner) { GdkColor aa; @@ -62,7 +62,7 @@ poky_corner (GdkWindow *window, GdkGC *gc, gint x, gint y, PokyCorner corner) switch (corner) { - case POKY_CORNER_TOP_LEFT: + case SATO_CORNER_TOP_LEFT: gdk_draw_point (window, gc, x + 1, y + 1); gdk_draw_point (window, gc, x + 1, y + 2); gdk_draw_point (window, gc, x + 2, y + 1); @@ -72,7 +72,7 @@ poky_corner (GdkWindow *window, GdkGC *gc, gint x, gint y, PokyCorner corner) gdk_draw_point (window, gc, x + 2, y + 2); gdk_draw_point (window, gc, x, y + 2); break; - case POKY_CORNER_BOTTOM_LEFT: + case SATO_CORNER_BOTTOM_LEFT: gdk_gc_set_rgb_fg_color (gc, &gc_values.foreground); gdk_draw_point (window, gc, x + 1, y - 3); gdk_draw_point (window, gc, x + 1, y - 2); @@ -83,7 +83,7 @@ poky_corner (GdkWindow *window, GdkGC *gc, gint x, gint y, PokyCorner corner) gdk_draw_point (window, gc, x + 2, y - 3); gdk_draw_point (window, gc, x, y - 3); break; - case POKY_CORNER_TOP_RIGHT: + case SATO_CORNER_TOP_RIGHT: gdk_gc_set_rgb_fg_color (gc, &gc_values.foreground); gdk_draw_point (window, gc, x - 3, y + 1); gdk_draw_point (window, gc, x - 2, y + 1); @@ -94,7 +94,7 @@ poky_corner (GdkWindow *window, GdkGC *gc, gint x, gint y, PokyCorner corner) gdk_draw_point (window, gc, x - 3, y + 2); gdk_draw_point (window, gc, x - 1, y + 2); break; - case POKY_CORNER_BOTTOM_RIGHT: + case SATO_CORNER_BOTTOM_RIGHT: gdk_gc_set_rgb_fg_color (gc, &gc_values.foreground); gdk_draw_point (window, gc, x - 2, y - 3); gdk_draw_point (window, gc, x - 2, y - 2); @@ -111,16 +111,16 @@ poky_corner (GdkWindow *window, GdkGC *gc, gint x, gint y, PokyCorner corner) } static void -poky_rounded_rectangle (GdkWindow * window, GdkGC * gc, gint x, gint y, +sato_rounded_rectangle (GdkWindow * window, GdkGC * gc, gint x, gint y, gint width, gint height) { /** draw corners **/ - poky_corner (window, gc, x, y, POKY_CORNER_TOP_LEFT); - poky_corner (window, gc, x, y + height, POKY_CORNER_BOTTOM_LEFT); - poky_corner (window, gc, x + width, y, POKY_CORNER_TOP_RIGHT); - poky_corner (window, gc, x+ width, y + height, POKY_CORNER_BOTTOM_RIGHT); + sato_corner (window, gc, x, y, SATO_CORNER_TOP_LEFT); + sato_corner (window, gc, x, y + height, SATO_CORNER_BOTTOM_LEFT); + sato_corner (window, gc, x + width, y, SATO_CORNER_TOP_RIGHT); + sato_corner (window, gc, x+ width, y + height, SATO_CORNER_BOTTOM_RIGHT); /** draw lines **/ @@ -143,7 +143,7 @@ poky_rounded_rectangle (GdkWindow * window, GdkGC * gc, gint x, gint y, static void -poky_gradient (GtkStyle * style, GdkWindow * window, GtkStateType state_type, +sato_gradient (GtkStyle * style, GdkWindow * window, GtkStateType state_type, gint x, gint y, gint width, gint height) { gint i, rd, gd, bd; /* rd, gd, bd - change in r g and b for gradient */ @@ -196,7 +196,7 @@ poky_gradient (GtkStyle * style, GdkWindow * window, GtkStateType state_type, } static void -poky_draw_box (DRAW_ARGS) +sato_draw_box (DRAW_ARGS) { DEBUG ("draw_box"); @@ -206,7 +206,7 @@ poky_draw_box (DRAW_ARGS) /*** draw the border ***/ if (!DETAIL ("bar")) - poky_rounded_rectangle (window, style->fg_gc[state_type], x, y, width, + sato_rounded_rectangle (window, style->fg_gc[state_type], x, y, width, height); @@ -226,12 +226,12 @@ poky_draw_box (DRAW_ARGS) height -= 8; } - poky_gradient (style, window, state_type, x, y, width, height); + sato_gradient (style, window, state_type, x, y, width, height); } static void -poky_draw_shadow (DRAW_ARGS) +sato_draw_shadow (DRAW_ARGS) { DEBUG ("draw_shadow"); @@ -239,17 +239,17 @@ poky_draw_shadow (DRAW_ARGS) if (widget && GTK_WIDGET_HAS_FOCUS (widget)) { - poky_rounded_rectangle (window, style->base_gc[GTK_STATE_SELECTED], x, + sato_rounded_rectangle (window, style->base_gc[GTK_STATE_SELECTED], x, y, width, height); } else - poky_rounded_rectangle (window, style->fg_gc[state_type], x, y, width, + sato_rounded_rectangle (window, style->fg_gc[state_type], x, y, width, height); } static void -poky_draw_check (GtkStyle * style, GdkWindow * window, +sato_draw_check (GtkStyle * style, GdkWindow * window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle * area, GtkWidget * widget, const gchar * detail, gint x, gint y, gint width, @@ -269,13 +269,13 @@ poky_draw_check (GtkStyle * style, GdkWindow * window, gdk_draw_rectangle (window, style->base_gc[GTK_STATE_SELECTED], TRUE, x + 2, y + 2, width - 4, height - 4); - poky_rounded_rectangle (window, temp_gc, x, y, width, height); + sato_rounded_rectangle (window, temp_gc, x, y, width, height); g_object_unref (temp_gc); } static void -poky_draw_option (GtkStyle * style, GdkWindow * window, +sato_draw_option (GtkStyle * style, GdkWindow * window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle * area, GtkWidget * widget, const gchar * detail, gint x, gint y, gint width, @@ -298,7 +298,7 @@ poky_draw_option (GtkStyle * style, GdkWindow * window, } static void -poky_draw_box_gap (GtkStyle * style, GdkWindow * window, +sato_draw_box_gap (GtkStyle * style, GdkWindow * window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle * area, GtkWidget * widget, const gchar * detail, gint x, gint y, gint width, gint height, @@ -319,25 +319,25 @@ poky_draw_box_gap (GtkStyle * style, GdkWindow * window, if (!((gap_side == GTK_POS_TOP || gap_side == GTK_POS_LEFT) && gap_x < 4)) { gtk_style_apply_default_background (style, window, TRUE, state_type, area, x, y, 3, 3); - poky_corner (window, gc, x, y, POKY_CORNER_TOP_LEFT); + sato_corner (window, gc, x, y, SATO_CORNER_TOP_LEFT); } if (!((gap_side == GTK_POS_TOP && gap_x > width - 4) || (gap_side == GTK_POS_RIGHT && gap_x < 4))) { gtk_style_apply_default_background (style, window, TRUE, state_type, area, x + width - 3, y, 3, 3); - poky_corner (window, gc, x + width, y, POKY_CORNER_TOP_RIGHT); + sato_corner (window, gc, x + width, y, SATO_CORNER_TOP_RIGHT); } if (!((gap_side == GTK_POS_BOTTOM && gap_x > width - 4) || (gap_side == GTK_POS_RIGHT && gap_x > height - 4))) { gtk_style_apply_default_background (style, window, TRUE, state_type, area, x + width - 3, y + height - 3, 3, 3); - poky_corner (window, gc, x + width, y + height, POKY_CORNER_BOTTOM_RIGHT); + sato_corner (window, gc, x + width, y + height, SATO_CORNER_BOTTOM_RIGHT); } if (!((gap_side == GTK_POS_BOTTOM && gap_x < 4) || (gap_side == GTK_POS_LEFT && gap_x > height - 4))) { gtk_style_apply_default_background (style, window, TRUE, state_type, area, x, y + height - 3, 3, 3); - poky_corner (window, gc, x, y + height, POKY_CORNER_BOTTOM_LEFT); + sato_corner (window, gc, x, y + height, SATO_CORNER_BOTTOM_LEFT); } @@ -379,7 +379,7 @@ poky_draw_box_gap (GtkStyle * style, GdkWindow * window, static void -poky_draw_extension (GtkStyle * style, GdkWindow * window, +sato_draw_extension (GtkStyle * style, GdkWindow * window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle * area, GtkWidget * widget,const gchar * detail, gint x, gint y, gint width, gint height, @@ -394,29 +394,29 @@ poky_draw_extension (GtkStyle * style, GdkWindow * window, switch (gap_side) { case GTK_POS_TOP: /* bottom tab */ - poky_corner (window, gc, x, y + height, POKY_CORNER_BOTTOM_LEFT); - poky_corner (window, gc, x + width, y + height, POKY_CORNER_BOTTOM_RIGHT); + sato_corner (window, gc, x, y + height, SATO_CORNER_BOTTOM_LEFT); + sato_corner (window, gc, x + width, y + height, SATO_CORNER_BOTTOM_RIGHT); y -= 5; height += 5; break; case GTK_POS_BOTTOM: /* top tab */ - poky_corner (window, gc, x, y, POKY_CORNER_TOP_LEFT); - poky_corner (window, gc, x + width, y, POKY_CORNER_TOP_RIGHT); + sato_corner (window, gc, x, y, SATO_CORNER_TOP_LEFT); + sato_corner (window, gc, x + width, y, SATO_CORNER_TOP_RIGHT); height += 5; break; case GTK_POS_LEFT: /* right tab */ - poky_corner (window, gc, x + width, y, POKY_CORNER_TOP_RIGHT); - poky_corner (window, gc, x + width, y + height, POKY_CORNER_BOTTOM_RIGHT); + sato_corner (window, gc, x + width, y, SATO_CORNER_TOP_RIGHT); + sato_corner (window, gc, x + width, y + height, SATO_CORNER_BOTTOM_RIGHT); x -= 5; width += 5; break; case GTK_POS_RIGHT: /* left tab */ - poky_corner (window, gc, x, y, POKY_CORNER_TOP_LEFT); - poky_corner (window, gc, x, y + height, POKY_CORNER_BOTTOM_LEFT); + sato_corner (window, gc, x, y, SATO_CORNER_TOP_LEFT); + sato_corner (window, gc, x, y + height, SATO_CORNER_BOTTOM_LEFT); width += 5; break; } if (state_type == GTK_STATE_NORMAL) - poky_gradient (style, window, state_type, x + 4, y + 4, width - 8, + sato_gradient (style, window, state_type, x + 4, y + 4, width - 8, height - 8); @@ -445,7 +445,7 @@ poky_draw_extension (GtkStyle * style, GdkWindow * window, } static void -poky_realise (GtkStyle * style) +sato_realise (GtkStyle * style) { gint i; parent_style_class->realize (style); @@ -465,19 +465,19 @@ poky_realise (GtkStyle * style) void -poky_draw_style_class_init (GtkStyleClass * style_class) +sato_draw_style_class_init (GtkStyleClass * style_class) { parent_style_class = g_type_class_peek_parent (style_class); - style_class->draw_shadow = poky_draw_shadow; - style_class->draw_box = poky_draw_box; - style_class->draw_check = poky_draw_check; - style_class->draw_option = poky_draw_option; - style_class->draw_box_gap = poky_draw_box_gap; - style_class->draw_shadow_gap = poky_draw_box_gap; - style_class->draw_extension = poky_draw_extension; - style_class->realize = poky_realise; + style_class->draw_shadow = sato_draw_shadow; + style_class->draw_box = sato_draw_box; + style_class->draw_check = sato_draw_check; + style_class->draw_option = sato_draw_option; + style_class->draw_box_gap = sato_draw_box_gap; + style_class->draw_shadow_gap = sato_draw_box_gap; + style_class->draw_extension = sato_draw_extension; + style_class->realize = sato_realise; /* style_class->draw_hline = draw_hline; style_class->draw_vline = draw_vline; diff --git a/src/poky-draw.h b/src/sato-draw.h index b111a72..f4e702d 100644 --- a/src/poky-draw.h +++ b/src/sato-draw.h @@ -1,6 +1,6 @@ #include <gtk/gtk.h> -void poky_draw_style_class_init (GtkStyleClass *style_class); +void sato_draw_style_class_init (GtkStyleClass *style_class); #define DRAW_ARGS GtkStyle *style, \ GdkWindow *window, \ diff --git a/src/poky-main.c b/src/sato-main.c index ac0af86..2aa6a53 100644 --- a/src/poky-main.c +++ b/src/sato-main.c @@ -2,16 +2,16 @@ #include <gmodule.h> #include <stdio.h> -#include "poky-style.h" -#include "poky-draw.h" +#include "sato-style.h" +#include "sato-draw.h" G_MODULE_EXPORT void theme_init (GTypeModule *module) { - poky_rc_style_register_type (module); - poky_style_register_type (module); + sato_rc_style_register_type (module); + sato_style_register_type (module); } G_MODULE_EXPORT void @@ -22,5 +22,5 @@ theme_exit(void) G_MODULE_EXPORT GtkRcStyle * theme_create_rc_style (void) { - return GTK_RC_STYLE (g_object_new (POKY_TYPE_RC_STYLE, NULL)); + return GTK_RC_STYLE (g_object_new (SATO_TYPE_RC_STYLE, NULL)); } diff --git a/src/sato-style.h b/src/sato-style.h new file mode 100644 index 0000000..65618ec --- /dev/null +++ b/src/sato-style.h @@ -0,0 +1,69 @@ +#ifndef SATO_STYLE_H +#define SATO_STYLE_H + +#include <gtk/gtk.h> +#include <gmodule.h> + +#include "sato-draw.h" + +G_BEGIN_DECLS + +/*** Gtk Style Class **********************************************************/ + +extern GType sato_type_style; + +#define SATO_TYPE_STYLE sato_type_style +#define SATO_STYLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), POKY_TYPE_STYLE, SatoStyle)) +#define SATO_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), POKY_TYPE_STYLE, SatoStyleClass)) +#define SATO_IS_STYLE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), POKY_TYPE_STYLE)) +#define SATO_IS_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), POKY_TYPE_STYLE)) +#define SATO_STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), POKY_TYPE_STYLE, SatoStyleClass)) + +typedef struct _SatoStyle SatoStyle; +typedef struct _SatoStyleClass SatoStyleClass; + +struct _SatoStyle +{ + GtkStyle parent_instance; +}; + +struct _SatoStyleClass +{ + GtkStyleClass parent_class; +}; + +void sato_style_register_type (GTypeModule *module); + +/******************************************************************************/ + +/*** Gtk Style RC Class *******************************************************/ + +extern GType sato_type_rc_style; + +#define SATO_TYPE_RC_STYLE sato_type_rc_style +#define SATO_RC_STYLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), POKY_TYPE_RC_STYLE, SatoRcStyle)) +#define SATO_RC_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), POKY_TYPE_RC_STYLE, SatoRcStyleClass)) +#define SATO_IS_RC_STYLE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), POKY_TYPE_RC_STYLE)) +#define SATO_IS_RC_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), POKY_TYPE_RC_STYLE)) +#define SATO_RC_STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), POKY_TYPE_RC_STYLE, SatoRcStyleClass)) + +typedef struct _SatoRcStyle SatoRcStyle; +typedef struct _SatoRcStyleClass SatoRcStyleClass; + +struct _SatoRcStyle +{ + GtkRcStyle parent_instance; +}; + +struct _SatoRcStyleClass +{ + GtkRcStyleClass parent_class; +}; + +void sato_rc_style_register_type (GTypeModule *engine); + +/******************************************************************************/ + +G_END_DECLS + +#endif |