[18285] | 1 | /* Metal 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 "metal_style.h" |
---|
| 23 | #include "metal_rc_style.h" |
---|
| 24 | |
---|
| 25 | static void metal_rc_style_init (MetalRcStyle *style); |
---|
| 26 | static void metal_rc_style_class_init (MetalRcStyleClass *klass); |
---|
| 27 | static GtkStyle *metal_rc_style_create_style (GtkRcStyle *rc_style); |
---|
| 28 | |
---|
| 29 | static GtkRcStyleClass *parent_class; |
---|
| 30 | |
---|
| 31 | GType metal_type_rc_style = 0; |
---|
| 32 | |
---|
| 33 | void |
---|
| 34 | metal_rc_style_register_type (GTypeModule *module) |
---|
| 35 | { |
---|
| 36 | static const GTypeInfo object_info = |
---|
| 37 | { |
---|
| 38 | sizeof (MetalRcStyleClass), |
---|
| 39 | (GBaseInitFunc) NULL, |
---|
| 40 | (GBaseFinalizeFunc) NULL, |
---|
| 41 | (GClassInitFunc) metal_rc_style_class_init, |
---|
| 42 | NULL, /* class_finalize */ |
---|
| 43 | NULL, /* class_data */ |
---|
| 44 | sizeof (MetalRcStyle), |
---|
| 45 | 0, /* n_preallocs */ |
---|
| 46 | (GInstanceInitFunc) metal_rc_style_init, |
---|
| 47 | }; |
---|
| 48 | |
---|
| 49 | metal_type_rc_style = g_type_module_register_type (module, |
---|
| 50 | GTK_TYPE_RC_STYLE, |
---|
| 51 | "MetalRcStyle", |
---|
| 52 | &object_info, 0); |
---|
| 53 | } |
---|
| 54 | |
---|
| 55 | static void |
---|
| 56 | metal_rc_style_init (MetalRcStyle *style) |
---|
| 57 | { |
---|
| 58 | } |
---|
| 59 | |
---|
| 60 | static void |
---|
| 61 | metal_rc_style_class_init (MetalRcStyleClass *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 = metal_rc_style_create_style; |
---|
| 68 | } |
---|
| 69 | |
---|
| 70 | /* Create an empty style suitable to this RC style |
---|
| 71 | */ |
---|
| 72 | static GtkStyle * |
---|
| 73 | metal_rc_style_create_style (GtkRcStyle *rc_style) |
---|
| 74 | { |
---|
| 75 | return GTK_STYLE (g_object_new (METAL_TYPE_STYLE, NULL)); |
---|
| 76 | } |
---|
| 77 | |
---|
| 78 | #define SCROLLBAR_WIDTH 17 |
---|
| 79 | |
---|
| 80 | /* rangeclass->min_slider_size = SCROLLBAR_WIDTH; */ |
---|
| 81 | |
---|