]> Pileus Git - ~andy/gtk/blob - modules/engines/ms-windows/msw_rc_style.c
modules/engines/ms-windows/msw_rc_style.c
[~andy/gtk] / modules / engines / ms-windows / msw_rc_style.c
1 /* MS-Windows Engine (aka GTK-Wimp)\r
2  *\r
3  * Copyright (C) 2003, 2004 Raymond Penners <raymond@dotsphinx.com>\r
4  * Includes code adapted from redmond95 by Owen Taylor, and\r
5  * gtk-nativewin by Evan Martin\r
6  *\r
7  * This library is free software; you can redistribute it and/or\r
8  * modify it under the terms of the GNU Library General Public\r
9  * License as published by the Free Software Foundation; either\r
10  * version 2 of the License, or (at your option) any later version.\r
11  *\r
12  * This library is distributed in the hope that it will be useful,\r
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
15  * Library General Public License for more details.\r
16  *\r
17  * You should have received a copy of the GNU Library General Public\r
18  * License along with this library; if not, write to the\r
19  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,\r
20  * Boston, MA 02111-1307, USA.\r
21  */\r
22 \r
23 #include "msw_style.h"\r
24 #include "msw_rc_style.h"\r
25 \r
26 static void      msw_rc_style_init         (MswRcStyle      *style);\r
27 static void      msw_rc_style_class_init   (MswRcStyleClass *klass);\r
28 static GtkStyle *msw_rc_style_create_style (GtkRcStyle         *rc_style);\r
29 \r
30 static GtkRcStyleClass *parent_class;\r
31 \r
32 GType msw_type_rc_style = 0;\r
33 \r
34 void\r
35 msw_rc_style_register_type (GTypeModule *module)\r
36 {\r
37   static const GTypeInfo object_info =\r
38   {\r
39     sizeof (MswRcStyleClass),\r
40     (GBaseInitFunc) NULL,\r
41     (GBaseFinalizeFunc) NULL,\r
42     (GClassInitFunc) msw_rc_style_class_init,\r
43     NULL,           /* class_finalize */\r
44     NULL,           /* class_data */\r
45     sizeof (MswRcStyle),\r
46     0,              /* n_preallocs */\r
47     (GInstanceInitFunc) msw_rc_style_init,\r
48   };\r
49   \r
50   msw_type_rc_style = g_type_module_register_type (module,\r
51                                                       GTK_TYPE_RC_STYLE,\r
52                                                       "MswRcStyle",\r
53                                                       &object_info, 0);\r
54 }\r
55 \r
56 static void\r
57 msw_rc_style_init (MswRcStyle *style)\r
58 {\r
59 }\r
60 \r
61 static void\r
62 msw_rc_style_class_init (MswRcStyleClass *klass)\r
63 {\r
64   GtkRcStyleClass *rc_style_class = GTK_RC_STYLE_CLASS (klass);\r
65 \r
66   parent_class = g_type_class_peek_parent (klass);\r
67 \r
68   rc_style_class->create_style = msw_rc_style_create_style;\r
69 }\r
70 \r
71 /* Create an empty style suitable to this RC style\r
72  */\r
73 static GtkStyle *\r
74 msw_rc_style_create_style (GtkRcStyle *rc_style)\r
75 {\r
76   return g_object_new (MSW_TYPE_STYLE, NULL);\r
77 }\r
78 \r