1 /* 2 * Copyright © 2009, 2010 Christian Persch <chpe@src.gnome.org> 3 * 4 * This program is free software: you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation, either version 3 of the License, or 7 * (at your option) any later version. 8 * 9 * This program 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 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 */ 17 18 #ifndef __AR_STYLE_H__ 19 #define __AR_STYLE_H__ 20 21 #include <glib-object.h> 22 #include <gdk/gdk.h> 23 24 #include "ar-card-theme.h" 25 26 G_BEGIN_DECLS 27 28 #define AR_TYPE_STYLE (ar_style_get_type()) 29 #define AR_STYLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), AR_TYPE_STYLE, ArStyle)) 30 #define AR_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), AR_TYPE_STYLE, ArStyleClass)) 31 #define AR_IS_STYLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AR_TYPE_STYLE)) 32 #define AR_IS_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), AR_TYPE_STYLE)) 33 #define AR_STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AR_TYPE_STYLE, ArStyleClass)) 34 35 typedef struct _ArStyle ArStyle; 36 typedef struct _ArStyleClass ArStyleClass; 37 typedef struct _ArStylePrivate ArStylePrivate; 38 39 struct _ArStyle 40 { 41 GObject parent; 42 43 /*< private >*/ 44 ArStylePrivate *priv; 45 }; 46 47 struct _ArStyleClass 48 { 49 GObjectClass parent_class; 50 }; 51 52 GType ar_style_get_type (void); 53 54 ArStyle* ar_style_new (void); 55 56 #define AR_STYLE_PROP_CARD_SLOT_RATIO "card-slot-prop" 57 #define AR_STYLE_PROP_CARD_THEME "card-theme" 58 #define AR_STYLE_PROP_CARD_OVERHANG "card-overhang" 59 #define AR_STYLE_PROP_CARD_STEP "card-step" 60 #define AR_STYLE_PROP_CLICK_TO_MOVE "click-to-move" 61 #define AR_STYLE_PROP_DND_DRAG_THRESHOLD "dnd-drag-threshold" 62 #define AR_STYLE_PROP_DOUBLE_CLICK_TIME "double-click-time" 63 #define AR_STYLE_PROP_ENABLE_ANIMATIONS "enable-animations" 64 #define AR_STYLE_PROP_ENABLE_SOUND "enable-sound" 65 #define AR_STYLE_PROP_FOCUS_LINE_WIDTH "focus-line-width" 66 #define AR_STYLE_PROP_FOCUS_PADDING "focus-padding" 67 #define AR_STYLE_PROP_INTERIOR_FOCUS "interior-focus" 68 #define AR_STYLE_PROP_RTL "rtl" 69 #define AR_STYLE_PROP_SELECTION_COLOR "selection-color" 70 #define AR_STYLE_PROP_SHOW_TOOLTIPS "show-tooltips" 71 #define AR_STYLE_PROP_SHOW_STATUS_MESSAGES "show-status-messages" 72 #define AR_STYLE_PROP_TOUCHSCREEN_MODE "touchscreen-mode" 73 74 gboolean ar_style_get_enable_animations (ArStyle *style); 75 void ar_style_set_enable_animations (ArStyle *style, 76 gboolean enable); 77 78 gboolean ar_style_get_enable_sound (ArStyle *style); 79 void ar_style_set_enable_sound (ArStyle *style, 80 gboolean enable); 81 82 gboolean ar_style_get_click_to_move (ArStyle *style); 83 void ar_style_set_click_to_move (ArStyle *style, 84 gboolean enable); 85 86 ArCardTheme *ar_style_get_card_theme (ArStyle *style); 87 void ar_style_set_card_theme (ArStyle *style, 88 ArCardTheme *theme); 89 90 /* Read-only properties */ 91 gboolean ar_style_get_touchscreen_mode (ArStyle *style); 92 gboolean ar_style_get_interior_focus (ArStyle *style); 93 gboolean ar_style_get_rtl (ArStyle *style); 94 gboolean ar_style_get_show_tooltips (ArStyle *style); 95 gboolean ar_style_get_show_status_messages (ArStyle *style); 96 97 int ar_style_get_double_click_time (ArStyle *style); 98 int ar_style_get_focus_line_width (ArStyle *style); 99 int ar_style_get_focus_padding (ArStyle *style); 100 101 double ar_style_get_card_slot_ratio (ArStyle *style); 102 double ar_style_get_card_overhang (ArStyle *style); 103 double ar_style_get_card_step (ArStyle *style); 104 105 void ar_style_get_selection_color (ArStyle *style, 106 GdkRGBA * const color); 107 108 gboolean ar_style_check_dnd_drag_threshold (ArStyle *style, 109 float x1, 110 float y1, 111 float x2, 112 float y2); 113 114 G_END_DECLS 115 116 #endif /* __AR_STYLE_H__ */ 117