1 | /* Redmond theme engine |
---|
2 | * Copyright (C) 2001 Red Hat, Inc. |
---|
3 | * |
---|
4 | * This library is free software; you can redistribute it and/or |
---|
5 | * modify it under the terms of the GNU Library General Public |
---|
6 | * License as published by the Free Software Foundation; either |
---|
7 | * version 2 of the License, or (at your option) any later version. |
---|
8 | * |
---|
9 | * This library is distributed in the hope that it will be useful, |
---|
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
12 | * Library General Public License for more details. |
---|
13 | * |
---|
14 | * You should have received a copy of the GNU Library General Public |
---|
15 | * License along with this library; if not, write to the |
---|
16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
---|
17 | * Boston, MA 02111-1307, USA. |
---|
18 | * |
---|
19 | * Written by Owen Taylor <otaylor@redhat.com> |
---|
20 | */ |
---|
21 | |
---|
22 | #include "redmond_style.h" |
---|
23 | #include "redmond_rc_style.h" |
---|
24 | |
---|
25 | static void redmond_rc_style_init (RedmondRcStyle *style); |
---|
26 | static void redmond_rc_style_class_init (RedmondRcStyleClass *klass); |
---|
27 | static GtkStyle *redmond_rc_style_create_style (GtkRcStyle *rc_style); |
---|
28 | |
---|
29 | static GtkRcStyleClass *parent_class; |
---|
30 | |
---|
31 | GType redmond_type_rc_style = 0; |
---|
32 | |
---|
33 | void |
---|
34 | redmond_rc_style_register_type (GTypeModule *module) |
---|
35 | { |
---|
36 | static const GTypeInfo object_info = |
---|
37 | { |
---|
38 | sizeof (RedmondRcStyleClass), |
---|
39 | (GBaseInitFunc) NULL, |
---|
40 | (GBaseFinalizeFunc) NULL, |
---|
41 | (GClassInitFunc) redmond_rc_style_class_init, |
---|
42 | NULL, /* class_finalize */ |
---|
43 | NULL, /* class_data */ |
---|
44 | sizeof (RedmondRcStyle), |
---|
45 | 0, /* n_preallocs */ |
---|
46 | (GInstanceInitFunc) redmond_rc_style_init, |
---|
47 | }; |
---|
48 | |
---|
49 | redmond_type_rc_style = g_type_module_register_type (module, |
---|
50 | GTK_TYPE_RC_STYLE, |
---|
51 | "Redmond95RcStyle", |
---|
52 | &object_info, 0); |
---|
53 | } |
---|
54 | |
---|
55 | static void |
---|
56 | redmond_rc_style_init (RedmondRcStyle *style) |
---|
57 | { |
---|
58 | } |
---|
59 | |
---|
60 | static void |
---|
61 | redmond_rc_style_class_init (RedmondRcStyleClass *klass) |
---|
62 | { |
---|
63 | GtkRcStyleClass *rc_style_class = GTK_RC_STYLE_CLASS (klass); |
---|
64 | |
---|
65 | parent_class = g_type_class_peek_parent (klass); |
---|
66 | |
---|
67 | rc_style_class->create_style = redmond_rc_style_create_style; |
---|
68 | } |
---|
69 | |
---|
70 | /* Create an empty style suitable to this RC style |
---|
71 | */ |
---|
72 | static GtkStyle * |
---|
73 | redmond_rc_style_create_style (GtkRcStyle *rc_style) |
---|
74 | { |
---|
75 | return GTK_STYLE (g_object_new (REDMOND_TYPE_STYLE, NULL)); |
---|
76 | } |
---|
77 | |
---|