comparison pidgin/gtkblist-theme.h @ 23478:4aeef8c3cce3

restructured much of the loader and themes for the buddy list, along with a basic trial of group background color
author Justin Rodriguez <ffdragon@soc.pidgin.im>
date Tue, 15 Jul 2008 06:29:46 +0000
parents a473766abaee
children edb03a8d54bd
comparison
equal deleted inserted replaced
23477:a473766abaee 23478:4aeef8c3cce3
21 * You should have received a copy of the GNU General Public License 21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software 22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA 23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
24 */ 24 */
25 25
26 #ifndef _PIDGIN_BUDDY_LIST_THEME_H_ 26 #ifndef _PIDGIN_BLIST_THEME_H_
27 #define _PIDGIN_BUDDY_LIST_THEME_H_ 27 #define _PIDGIN_BLIST_THEME_H_
28 28
29 #include <glib.h> 29 #include <glib.h>
30 #include <glib-object.h> 30 #include <glib-object.h>
31 #include <gtk/gtk.h>
32
31 #include "theme.h" 33 #include "theme.h"
32 #include "sound.h"
33 34
34 /** 35 /**
35 * extends PurpleTheme (theme.h) 36 * extends PurpleTheme (theme.h)
36 * A pidgin buddy list theme. 37 * A pidgin buddy list theme.
37 * This is an object for Purple to represent a sound theme. 38 * This is an object for Purple to represent a sound theme.
38 * 39 *
39 * PidginBuddyListTheme is a PurpleTheme Object. 40 * PidginBlistTheme is a PurpleTheme Object.
40 */ 41 */
41 typedef struct _PidginBuddyListTheme PidginBuddyListTheme; 42 typedef struct _PidginBlistTheme PidginBlistTheme;
42 typedef struct _PidginBuddyListThemeClass PidginBuddyListThemeClass; 43 typedef struct _PidginBlistThemeClass PidginBlistThemeClass;
43 44
44 #define PIDGIN_TYPE_BUDDY_LIST_THEME (pidgin_buddy_list_theme_get_type ()) 45 #define PIDGIN_TYPE_BLIST_THEME (pidgin_blist_theme_get_type ())
45 #define PIDGIN_BUDDY_LIST_THEME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PIDGIN_TYPE_BUDDY_LIST_THEME, PidginBuddyListTheme)) 46 #define PIDGIN_BLIST_THEME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PIDGIN_TYPE_BLIST_THEME, PidginBlistTheme))
46 #define PIDGIN_BUDDY_LIST_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PIDGIN_TYPE_BUDDY_LIST_THEME, PidginBuddyListThemeClass)) 47 #define PIDGIN_BLIST_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PIDGIN_TYPE_BLIST_THEME, PidginBlistThemeClass))
47 #define PIDGIN_IS_BUDDY_LIST_THEME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PIDGIN_TYPE_BUDDY_LIST_THEME)) 48 #define PIDGIN_IS_BLIST_THEME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PIDGIN_TYPE_BLIST_THEME))
48 #define PIDGIN_IS_BUDDY_LIST_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PIDGIN_TYPE_BUDDY_LIST_THEME)) 49 #define PIDGIN_IS_BLIST_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PIDGIN_TYPE_BLIST_THEME))
49 #define PIDGIN_BUDDY_LIST_THEME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PIDGIN_TYPE_BUDDY_LIST_THEME, PidginBuddyListThemeClass)) 50 #define PIDGIN_BLIST_THEME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PIDGIN_TYPE_BLIST_THEME, PidginBlistThemeClass))
50 51
51 struct _PidginBuddyListTheme 52 struct _PidginBlistTheme
52 { 53 {
53 PurpleTheme parent; 54 PurpleTheme parent;
54 gpointer priv; 55 gpointer priv;
55 }; 56 };
56 57
57 struct _PidginBuddyListThemeClass 58 struct _PidginBlistThemeClass
58 { 59 {
59 PurpleThemeClass parent_class; 60 PurpleThemeClass parent_class;
60 }; 61 };
61 62
62 typedef struct 63 typedef struct
63 { 64 {
64 gchar *font; 65 gchar *font;
65 gchar *color; 66 GdkColor *color;
66 67
67 } font_color_pair; 68 } font_color_pair;
68 69
69 typedef struct 70 typedef struct
70 { 71 {
85 86
86 /** 87 /**
87 * GObject foo. 88 * GObject foo.
88 * @internal. 89 * @internal.
89 */ 90 */
90 GType pidgin_buddy_list_theme_get_type(void); 91 GType pidgin_blist_theme_get_type(void);
91 92
92 /** 93 /**
93 * Returns the icon theme to be used with the buddy list theme 94 * Returns the icon theme to be used with the buddy list theme
94 * 95 *
95 * @returns the icon theme 96 * @returns the icon theme
96 */ 97 */
97 const gchar *pidgin_buddy_list_theme_get_icon_theme(PidginBuddyListTheme *theme); 98 const gchar *pidgin_blist_theme_get_icon_theme(PidginBlistTheme *theme);
98 99
99 /** 100 /**
100 * Returns the opacity of the buddy list window 101 * Returns the opacity of the buddy list window
101 * (0.0 or clear to 1.0 fully Opaque) 102 * (0.0 or clear to 1.0 fully Opaque)
102 * 103 *
103 * @returns the opacity 104 * @returns the opacity
104 */ 105 */
105 gdouble pidgin_buddy_list_theme_get_opacity(PidginBuddyListTheme *theme); 106 gdouble pidgin_blist_theme_get_opacity(PidginBlistTheme *theme);
106 107
107 /** 108 /**
108 * Returns the layout to be used with the buddy list 109 * Returns the layout to be used with the buddy list
109 * 110 *
110 * @returns the buddy list layout 111 * @returns the buddy list layout
111 */ 112 */
112 const blist_layout *pidgin_buddy_list_theme_get_layout(PidginBuddyListTheme *theme); 113 const blist_layout *pidgin_blist_theme_get_layout(PidginBlistTheme *theme);
113 114
114 /** 115 /**
115 * Returns the background color to be used with expanded groups 116 * Returns the background color to be used with expanded groups
116 * 117 *
117 * @returns a color 118 * @returns a color
118 */ 119 */
119 const gchar *pidgin_buddy_list_theme_get_expanded_background_color(PidginBuddyListTheme *theme); 120 const GdkColor *pidgin_blist_theme_get_expanded_background_color(PidginBlistTheme *theme);
120 121
121 /** 122 /**
122 * Returns the text font and color to be used with expanded groups 123 * Returns the text font and color to be used with expanded groups
123 * 124 *
124 * @returns a font and color pair 125 * @returns a font and color pair
125 */ 126 */
126 const font_color_pair *pidgin_buddy_list_theme_get_expanded_text_info(PidginBuddyListTheme *theme); 127 const font_color_pair *pidgin_blist_theme_get_expanded_text_info(PidginBlistTheme *theme);
127 128
128 /** 129 /**
129 * Returns the background color to be used with minimized groups 130 * Returns the background color to be used with collapsed groups
130 * 131 *
131 * @returns a color 132 * @returns a color
132 */ 133 */
133 const gchar *pidgin_buddy_list_theme_get_minimized_background_color(PidginBuddyListTheme *theme); 134 const GdkColor *pidgin_blist_theme_get_collapsed_background_color(PidginBlistTheme *theme);
134 135
135 /** 136 /**
136 * Returns the text font and color to be used with minimized groups 137 * Returns the text font and color to be used with collapsed groups
137 * 138 *
138 * @returns a font and color pair 139 * @returns a font and color pair
139 */ 140 */
140 const font_color_pair *pidgin_buddy_list_theme_get_minimized_text_info(PidginBuddyListTheme *theme); 141 const font_color_pair *pidgin_blist_theme_get_collapsed_text_info(PidginBlistTheme *theme);
141 142
142 /** 143 /**
143 * Returns the 1st color to be used for buddys 144 * Returns the 1st color to be used for buddys
144 * 145 *
145 * @returns a color 146 * @returns a color
146 */ 147 */
147 const gchar *pidgin_buddy_list_theme_get_buddy_color_1(PidginBuddyListTheme *theme); 148 const GdkColor *pidgin_blist_theme_get_buddy_color_1(PidginBlistTheme *theme);
148 149
149 /** 150 /**
150 * Returns the 2nd color to be used for buddies 151 * Returns the 2nd color to be used for buddies
151 * 152 *
152 * @returns a color 153 * @returns a color
153 */ 154 */
154 const gchar *pidgin_buddy_list_theme_get_buddy_color_2(PidginBuddyListTheme *theme); 155 const GdkColor *pidgin_blist_theme_get_buddy_color_2(PidginBlistTheme *theme);
155 156
156 /** 157 /**
157 * Returns the text font and color to be used for online buddies 158 * Returns the text font and color to be used for online buddies
158 * 159 *
159 * @returns a font and color pair 160 * @returns a font and color pair
160 */ 161 */
161 const font_color_pair *pidgin_buddy_list_theme_get_online_text_info(PidginBuddyListTheme *theme); 162 const font_color_pair *pidgin_blist_theme_get_online_text_info(PidginBlistTheme *theme);
162 163
163 /** 164 /**
164 * Returns the text font and color to be used for away and idle buddies 165 * Returns the text font and color to be used for away and idle buddies
165 * 166 *
166 * @returns a font and color pair 167 * @returns a font and color pair
167 */ 168 */
168 const font_color_pair *pidgin_buddy_list_theme_get_away_text_info(PidginBuddyListTheme *theme); 169 const font_color_pair *pidgin_blist_theme_get_away_text_info(PidginBlistTheme *theme);
169 170
170 /** 171 /**
171 * Returns the text font and color to be used for offline buddies 172 * Returns the text font and color to be used for offline buddies
172 * 173 *
173 * @returns a font and color pair 174 * @returns a font and color pair
174 */ 175 */
175 const font_color_pair *pidgin_buddy_list_theme_get_offline_text_info(PidginBuddyListTheme *theme); 176 const font_color_pair *pidgin_blist_theme_get_offline_text_info(PidginBlistTheme *theme);
176 177
177 /** 178 /**
178 * Returns the text font and color to be used for buddies with unread messages 179 * Returns the text font and color to be used for buddies with unread messages
179 * 180 *
180 * @returns a font and color pair 181 * @returns a font and color pair
181 */ 182 */
182 const font_color_pair *pidgin_buddy_list_theme_get_unread_message_text_info(PidginBuddyListTheme *theme); 183 const font_color_pair *pidgin_blist_theme_get_unread_message_text_info(PidginBlistTheme *theme);
183 184
184 /** 185 /**
185 * Returns the text font and color to be used for a buddy's status message 186 * Returns the text font and color to be used for a buddy's status message
186 * 187 *
187 * @returns a font and color pair 188 * @returns a font and color pair
188 */ 189 */
189 const font_color_pair *pidgin_buddy_list_theme_get_status_text_info(PidginBuddyListTheme *theme); 190 const font_color_pair *pidgin_blist_theme_get_status_text_info(PidginBlistTheme *theme);
190 191
191 G_END_DECLS 192 G_END_DECLS
192 #endif /* _PIDGIN_BUDDY_LIST_THEME_H_ */ 193 #endif /* _PIDGIN_BLIST_THEME_H_ */