mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
Initial revision
This commit is contained in:
parent
8472ddc71e
commit
cf68a240d0
28
modules/engines/ms-windows/Theme/gtk-2.0/gtkrc
Executable file
28
modules/engines/ms-windows/Theme/gtk-2.0/gtkrc
Executable file
@ -0,0 +1,28 @@
|
||||
style "wimp-default"
|
||||
{
|
||||
GtkWidget::interior_focus = 1
|
||||
GtkButton::default_border = { 1, 1, 1, 1 }
|
||||
GtkButton::default_outside_border = { 0, 0, 0, 0 }
|
||||
GtkOptionMenu::indicator_size = { 9, 5 }
|
||||
GtkOptionMenu::indicator_spacing = { 7, 5, 2, 2 }
|
||||
GtkSpinButton::shadow-type = in
|
||||
|
||||
GtkButton::child_displacement_x = 1
|
||||
GtkButton::child_displacement_y = 1
|
||||
|
||||
engine "wimp"
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
class "GtkWidget" style "wimp-default"
|
||||
|
||||
style "wimp-scrollbar"
|
||||
{
|
||||
GtkRange::trough_border = 0
|
||||
GtkRange::slider_width = 15
|
||||
GtkRange::stepper_size = 15
|
||||
GtkRange::stepper_spacing = 0
|
||||
}
|
||||
|
||||
class "GtkScrollbar" style "wimp-scrollbar"
|
78
modules/engines/ms-windows/wimp_rc_style.c
Executable file
78
modules/engines/ms-windows/wimp_rc_style.c
Executable file
@ -0,0 +1,78 @@
|
||||
/* Wimp "Windows Impersonator" Engine
|
||||
*
|
||||
* Copyright (C) 2003 Raymond Penners <raymond@dotsphinx.com>
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "wimp_style.h"
|
||||
#include "wimp_rc_style.h"
|
||||
|
||||
static void wimp_rc_style_init (WimpRcStyle *style);
|
||||
static void wimp_rc_style_class_init (WimpRcStyleClass *klass);
|
||||
static GtkStyle *wimp_rc_style_create_style (GtkRcStyle *rc_style);
|
||||
|
||||
static GtkRcStyleClass *parent_class;
|
||||
|
||||
GType wimp_type_rc_style = 0;
|
||||
|
||||
void
|
||||
wimp_rc_style_register_type (GTypeModule *module)
|
||||
{
|
||||
static const GTypeInfo object_info =
|
||||
{
|
||||
sizeof (WimpRcStyleClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) wimp_rc_style_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (WimpRcStyle),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) wimp_rc_style_init,
|
||||
};
|
||||
|
||||
wimp_type_rc_style = g_type_module_register_type (module,
|
||||
GTK_TYPE_RC_STYLE,
|
||||
"WimpRcStyle",
|
||||
&object_info, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
wimp_rc_style_init (WimpRcStyle *style)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
wimp_rc_style_class_init (WimpRcStyleClass *klass)
|
||||
{
|
||||
GtkRcStyleClass *rc_style_class = GTK_RC_STYLE_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
rc_style_class->create_style = wimp_rc_style_create_style;
|
||||
}
|
||||
|
||||
/* Create an empty style suitable to this RC style
|
||||
*/
|
||||
static GtkStyle *
|
||||
wimp_rc_style_create_style (GtkRcStyle *rc_style)
|
||||
{
|
||||
return GTK_STYLE (g_object_new (WIMP_TYPE_STYLE, NULL));
|
||||
}
|
||||
|
54
modules/engines/ms-windows/wimp_rc_style.h
Executable file
54
modules/engines/ms-windows/wimp_rc_style.h
Executable file
@ -0,0 +1,54 @@
|
||||
/* Wimp "Windows Impersonator" Engine
|
||||
*
|
||||
* Copyright (C) 2003 Raymond Penners <raymond@dotsphinx.com>
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef WIMP_RC_STYLE_H
|
||||
#define WIMP_RC_STYLE_H
|
||||
|
||||
#include <gtk/gtkrc.h>
|
||||
|
||||
typedef struct _WimpRcStyle WimpRcStyle;
|
||||
typedef struct _WimpRcStyleClass WimpRcStyleClass;
|
||||
|
||||
extern GType wimp_type_rc_style;
|
||||
|
||||
#define WIMP_TYPE_RC_STYLE wimp_type_rc_style
|
||||
#define WIMP_RC_STYLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), WIMP_TYPE_RC_STYLE, WimpRcStyle))
|
||||
#define WIMP_RC_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIMP_TYPE_RC_STYLE, WimpRcStyleClass))
|
||||
#define WIMP_IS_RC_STYLE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), WIMP_TYPE_RC_STYLE))
|
||||
#define WIMP_IS_RC_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIMP_TYPE_RC_STYLE))
|
||||
#define WIMP_RC_STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIMP_TYPE_RC_STYLE, WimpRcStyleClass))
|
||||
|
||||
struct _WimpRcStyle
|
||||
{
|
||||
GtkRcStyle parent_instance;
|
||||
|
||||
GList *img_list;
|
||||
};
|
||||
|
||||
struct _WimpRcStyleClass
|
||||
{
|
||||
GtkRcStyleClass parent_class;
|
||||
};
|
||||
|
||||
void wimp_rc_style_register_type (GTypeModule *module);
|
||||
|
||||
#endif /* WIMP_TYPE_RC_STYLE */
|
1403
modules/engines/ms-windows/wimp_style.c
Executable file
1403
modules/engines/ms-windows/wimp_style.c
Executable file
File diff suppressed because it is too large
Load Diff
52
modules/engines/ms-windows/wimp_style.h
Executable file
52
modules/engines/ms-windows/wimp_style.h
Executable file
@ -0,0 +1,52 @@
|
||||
/* Wimp "Windows Impersonator" Engine
|
||||
*
|
||||
* Copyright (C) 2003 Raymond Penners <raymond@dotsphinx.com>
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef WIMP_STYLE_H
|
||||
#define WIMP_STYLE_H
|
||||
|
||||
#include <gtk/gtkstyle.h>
|
||||
|
||||
typedef struct _WimpStyle WimpStyle;
|
||||
typedef struct _WimpStyleClass WimpStyleClass;
|
||||
|
||||
extern GType wimp_type_style;
|
||||
|
||||
#define WIMP_TYPE_STYLE wimp_type_style
|
||||
#define WIMP_STYLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), WIMP_TYPE_STYLE, WimpStyle))
|
||||
#define WIMP_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIMP_TYPE_STYLE, WimpStyleClass))
|
||||
#define WIMP_IS_STYLE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), WIMP_TYPE_STYLE))
|
||||
#define WIMP_IS_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIMP_TYPE_STYLE))
|
||||
#define WIMP_STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIMP_TYPE_STYLE, WimpStyleClass))
|
||||
|
||||
struct _WimpStyle
|
||||
{
|
||||
GtkStyle parent_instance;
|
||||
};
|
||||
|
||||
struct _WimpStyleClass
|
||||
{
|
||||
GtkStyleClass parent_class;
|
||||
};
|
||||
|
||||
void wimp_style_register_type (GTypeModule *module);
|
||||
|
||||
#endif /* WIMP_TYPE_STYLE */
|
59
modules/engines/ms-windows/wimp_theme_main.c
Executable file
59
modules/engines/ms-windows/wimp_theme_main.c
Executable file
@ -0,0 +1,59 @@
|
||||
/* Wimp "Windows Impersonator" Engine
|
||||
*
|
||||
* Copyright (C) 2003 Raymond Penners <raymond@dotsphinx.com>
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include <gmodule.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "wimp_style.h"
|
||||
#include "wimp_rc_style.h"
|
||||
|
||||
G_MODULE_EXPORT void
|
||||
theme_init (GTypeModule *module)
|
||||
{
|
||||
wimp_rc_style_register_type (module);
|
||||
wimp_style_register_type (module);
|
||||
}
|
||||
|
||||
G_MODULE_EXPORT void
|
||||
theme_exit (void)
|
||||
{
|
||||
}
|
||||
|
||||
G_MODULE_EXPORT GtkRcStyle *
|
||||
theme_create_rc_style (void)
|
||||
{
|
||||
return GTK_RC_STYLE (g_object_new (WIMP_TYPE_RC_STYLE, NULL));
|
||||
}
|
||||
|
||||
/* 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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user