1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
|
#include <gtk/gtk.h>
#include <gmodule.h>
/* Theme functions to export */
void theme_init(GtkThemeEngine * engine);
void theme_exit(void);
/* Exported vtable from th_draw */
extern GtkStyleClass gtkbe_default_class;
/* internals */
static guint
theme_parse_rc_style(GScanner * scanner,
GtkRcStyle * rc_style)
{
guint token;
token = g_scanner_peek_next_token(scanner);
while (token != G_TOKEN_RIGHT_CURLY)
{
switch (token)
{
default:
g_scanner_get_next_token(scanner);
token = G_TOKEN_RIGHT_CURLY;
break;
}
if (token != G_TOKEN_NONE)
return token;
token = g_scanner_peek_next_token(scanner);
}
g_scanner_get_next_token(scanner);
rc_style->engine_data = NULL;
return G_TOKEN_NONE;
}
static void
theme_merge_rc_style(GtkRcStyle * dest,
GtkRcStyle * src)
{
}
static void
theme_rc_style_to_style(GtkStyle * style,
GtkRcStyle * rc_style)
{
style->klass = >kbe_default_class;
}
static void
theme_duplicate_style(GtkStyle * dest,
GtkStyle * src)
{
}
static void
theme_realize_style(GtkStyle * style)
{
}
static void
theme_unrealize_style(GtkStyle * style)
{
}
static void
theme_destroy_rc_style(GtkRcStyle * rc_style)
{
}
static void
theme_destroy_style(GtkStyle * style)
{
}
void
theme_init(GtkThemeEngine * engine)
{
engine->parse_rc_style = theme_parse_rc_style;
engine->merge_rc_style = theme_merge_rc_style;
engine->rc_style_to_style = theme_rc_style_to_style;
engine->duplicate_style = theme_duplicate_style;
engine->realize_style = theme_realize_style;
engine->unrealize_style = theme_unrealize_style;
engine->destroy_rc_style = theme_destroy_rc_style;
engine->destroy_style = theme_destroy_style;
engine->set_background = NULL;
}
void
theme_exit(void)
{
}
/* The following function will be called by GTK+ when the module
* is loaded and checks to see if we are compatible with the
* version of GTK+ that loads us.
*/
G_MODULE_EXPORT const gchar* g_module_check_init (GModule *module);
const gchar*
g_module_check_init (GModule *module)
{
return gtk_check_version (GTK_MAJOR_VERSION,
GTK_MINOR_VERSION,
GTK_MICRO_VERSION - GTK_INTERFACE_AGE);
}
|