1 /* High Contrast - a cairo based GTK+ engine 2 * Copyright (C) 2003 Sun Microsystems Inc. 3 * Copyright (C) 2006 Andrew Johnson <acjgenius@earthlink.net> 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Lesser General Public 7 * License as published by the Free Software Foundation; either 8 * version 2.1 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public 16 * License along with this library; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 * 19 * Project contact: <gnome-themes-list@gnome.org> 20 * 21 */ 22 23 24 #include <gmodule.h> 25 #include <gtk/gtk.h> 26 27 #include "ge-support.h" 28 29 /*****************************/ 30 /* RC Style Declaration */ 31 /*****************************/ 32 33 #define HC_TYPE_RC_STYLE (hc_rc_style_get_type ()) 34 #define HC_RC_STYLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), HC_TYPE_RC_STYLE, HcRcStyle)) 35 #define HC_RC_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), HC_TYPE_RC_STYLE, HcRcStyleClass)) 36 #define HC_IS_RC_STYLE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), HC_TYPE_RC_STYLE)) 37 #define HC_IS_RC_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), HC_TYPE_RC_STYLE)) 38 #define HC_RC_STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), HC_TYPE_RC_STYLE, HcRcStyleClass)) 39 40 typedef enum 41 { 42 HC_RC_FLAG_EDGE_THICKNESS = 1 << 0, 43 HC_RC_FLAG_CELL_INDICATOR_SIZE = 1 << 1 44 } HcRcFlags; 45 46 typedef struct 47 { 48 GtkRcStyle parent_instance; 49 50 HcRcFlags flags; 51 52 gint edge_thickness; 53 gint cell_indicator_size; 54 } HcRcStyle; 55 56 typedef struct 57 { 58 GtkRcStyleClass parent_class; 59 } HcRcStyleClass; 60 61 GE_INTERNAL GType hc_rc_style_get_type (void); 62 63 /*****************************/ 64 /* Drawing Style Declaration */ 65 /*****************************/ 66 67 #define HC_TYPE_STYLE (hc_style_get_type ()) 68 #define HC_STYLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), HC_TYPE_STYLE, HcStyle)) 69 #define HC_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), HC_TYPE_STYLE, HcStyleClass)) 70 #define HC_IS_STYLE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), HC_TYPE_STYLE)) 71 #define HC_IS_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), HC_TYPE_STYLE)) 72 #define HC_STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), HC_TYPE_STYLE, HcStyleClass)) 73 74 typedef struct 75 { 76 GtkStyle parent_instance; 77 78 CairoColorCube color_cube; 79 80 gint edge_thickness; 81 gint cell_indicator_size; 82 } HcStyle; 83 84 typedef struct 85 { 86 GtkStyleClass parent_class; 87 } HcStyleClass; 88 89 GE_INTERNAL GType hc_style_get_type (void); 90 91