gtk/modules/engines/ms-windows/msw_rc_style.c

79 lines
2.3 KiB
C
Raw Normal View History

2004-03-20 11:42:30 +00:00
/* MS-Windows Engine (aka GTK-Wimp)
2003-03-18 20:05:10 +00:00
*
2004-03-20 11:42:30 +00:00
* Copyright (C) 2003, 2004 Raymond Penners <raymond@dotsphinx.com>
2003-03-18 20:05:10 +00:00
* Includes code adapted from redmond95 by Owen Taylor, and
* gtk-nativewin by Evan Martin
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
2004-03-20 11:42:30 +00:00
#include "msw_style.h"
#include "msw_rc_style.h"
2003-03-18 20:05:10 +00:00
2004-03-20 11:42:30 +00:00
static void msw_rc_style_init (MswRcStyle *style);
static void msw_rc_style_class_init (MswRcStyleClass *klass);
static GtkStyle *msw_rc_style_create_style (GtkRcStyle *rc_style);
2003-03-18 20:05:10 +00:00
static GtkRcStyleClass *parent_class;
2004-03-20 11:42:30 +00:00
GType msw_type_rc_style = 0;
2003-03-18 20:05:10 +00:00
void
2004-03-20 11:42:30 +00:00
msw_rc_style_register_type (GTypeModule *module)
2003-03-18 20:05:10 +00:00
{
static const GTypeInfo object_info =
{
2004-03-20 11:42:30 +00:00
sizeof (MswRcStyleClass),
2003-03-18 20:05:10 +00:00
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
2004-03-20 11:42:30 +00:00
(GClassInitFunc) msw_rc_style_class_init,
2003-03-18 20:05:10 +00:00
NULL, /* class_finalize */
NULL, /* class_data */
2004-03-20 11:42:30 +00:00
sizeof (MswRcStyle),
2003-03-18 20:05:10 +00:00
0, /* n_preallocs */
2004-03-20 11:42:30 +00:00
(GInstanceInitFunc) msw_rc_style_init,
2003-03-18 20:05:10 +00:00
};
2004-03-20 11:42:30 +00:00
msw_type_rc_style = g_type_module_register_type (module,
2003-03-18 20:05:10 +00:00
GTK_TYPE_RC_STYLE,
2004-03-20 11:42:30 +00:00
"MswRcStyle",
2003-03-18 20:05:10 +00:00
&object_info, 0);
}
static void
2004-03-20 11:42:30 +00:00
msw_rc_style_init (MswRcStyle *style)
2003-03-18 20:05:10 +00:00
{
}
static void
2004-03-20 11:42:30 +00:00
msw_rc_style_class_init (MswRcStyleClass *klass)
2003-03-18 20:05:10 +00:00
{
GtkRcStyleClass *rc_style_class = GTK_RC_STYLE_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
2004-03-20 11:42:30 +00:00
rc_style_class->create_style = msw_rc_style_create_style;
2003-03-18 20:05:10 +00:00
}
/* Create an empty style suitable to this RC style
*/
static GtkStyle *
2004-03-20 11:42:30 +00:00
msw_rc_style_create_style (GtkRcStyle *rc_style)
2003-03-18 20:05:10 +00:00
{
return g_object_new (MSW_TYPE_STYLE, NULL);
2003-03-18 20:05:10 +00:00
}