comparison pidgin/gtkblist-theme.h @ 26817:3912f55a1633

propagate from branch 'im.pidgin.pidgin' (head fbb4fe5da444943eecc76bdcd6c8ba967790b6c8) to branch 'im.pidgin.cpw.darkrain42.xmpp.bosh' (head 601bc627c9430320848361f0ed81c6c4c6ee53e0)
author Paul Aurich <paul@darkrain42.org>
date Tue, 28 Apr 2009 18:43:57 +0000
parents 84ab7b2db114
children 4d92a431d0a1
comparison
equal deleted inserted replaced
26743:de9816c970fe 26817:3912f55a1633
57 struct _PidginBlistThemeClass 57 struct _PidginBlistThemeClass
58 { 58 {
59 PurpleThemeClass parent_class; 59 PurpleThemeClass parent_class;
60 }; 60 };
61 61
62 #if 0
62 typedef struct 63 typedef struct
63 { 64 {
64 const gchar *font; 65 const gchar *font;
65 const gchar *color; 66 const gchar *color;
66 67
67 } FontColorPair; 68 } PidginThemeFont;
69 #endif
70 typedef struct _PidginThemeFont PidginThemeFont;
68 71
69 typedef struct 72 typedef struct
70 { 73 {
71 gint status_icon; 74 gint status_icon;
72 gint text; 75 gint text;
76 gboolean show_status; 79 gboolean show_status;
77 80
78 } PidginBlistLayout; 81 } PidginBlistLayout;
79 82
80 /**************************************************************************/ 83 /**************************************************************************/
81 /** @name FontColorPair API */ 84 /** @name PidginThemeFont API */
82 /**************************************************************************/ 85 /**************************************************************************/
83 86
84 /** 87 /**
88 * Create a new PidginThemeFont.
89 *
90 * @param face The font face
91 * @param color The color of the font
92 *
93 * @return A newly created PidginThemeFont
94 */
95 PidginThemeFont * pidgin_theme_font_new(const gchar *face, GdkColor *color);
96
97 /**
85 * Frees a font and color pair 98 * Frees a font and color pair
86 */ 99 *
87 void free_font_and_color(FontColorPair *pair); 100 * @param font The theme font
101 */
102 void pidgin_theme_font_free(PidginThemeFont *font);
103
104 /**
105 * Set the font-face of a PidginThemeFont.
106 *
107 * @param font The PidginThemeFont
108 * @param face The font-face
109 */
110 void pidgin_theme_font_set_font_face(PidginThemeFont *font, const gchar *face);
111
112 /**
113 * Set the color of a PidginThemeFont.
114 *
115 * @param font The PidginThemeFont
116 * @param color The color
117 */
118 void pidgin_theme_font_set_color(PidginThemeFont *font, const GdkColor *color);
119
120 /**
121 * Get the font-face of a PidginThemeFont.
122 *
123 * @param font The PidginThemeFont
124 *
125 * @return The font-face, or NULL if none is set.
126 */
127 const gchar * pidgin_theme_font_get_font_face(PidginThemeFont *font);
128
129 /**
130 * Get the color of a PidginThemeFont as a GdkColor object.
131 *
132 * @param font The PidginThemeFont
133 *
134 * @return The color, or NULL if none is set.
135 */
136 const GdkColor * pidgin_theme_font_get_color(PidginThemeFont *font);
137
138 /**
139 * Get the color of a PidginThemeFont.
140 *
141 * @param font The PidginThemeFont
142 *
143 * @return The color, or NULL if none is set.
144 */
145 const gchar * pidgin_theme_font_get_color_describe(PidginThemeFont *font);
88 146
89 /**************************************************************************/ 147 /**************************************************************************/
90 /** @name Purple Buddy List Theme API */ 148 /** @name Purple Buddy List Theme API */
91 /**************************************************************************/ 149 /**************************************************************************/
92 G_BEGIN_DECLS 150 G_BEGIN_DECLS
100 /* get methods */ 158 /* get methods */
101 159
102 /** 160 /**
103 * Returns the background color of the buddy list. 161 * Returns the background color of the buddy list.
104 * 162 *
163 * @param theme The PidginBlist theme.
164 *
105 * @returns A gdk color. 165 * @returns A gdk color.
106 */ 166 */
107 GdkColor *pidgin_blist_theme_get_background_color(PidginBlistTheme *theme); 167 GdkColor *pidgin_blist_theme_get_background_color(PidginBlistTheme *theme);
108 168
109 /** 169 /**
110 * Returns the opacity of the buddy list window 170 * Returns the opacity of the buddy list window
111 * (0.0 or clear to 1.0 fully opaque). 171 * (0.0 or clear to 1.0 fully opaque).
112 * 172 *
173 * @param theme The PidginBlist theme.
174 *
113 * @returns The opacity 175 * @returns The opacity
114 */ 176 */
115 gdouble pidgin_blist_theme_get_opacity(PidginBlistTheme *theme); 177 gdouble pidgin_blist_theme_get_opacity(PidginBlistTheme *theme);
116 178
117 /** 179 /**
118 * Returns the layout to be used with the buddy list. 180 * Returns the layout to be used with the buddy list.
119 * 181 *
182 * @param theme The PidginBlist theme.
183 *
120 * @returns The buddy list layout. 184 * @returns The buddy list layout.
121 */ 185 */
122 PidginBlistLayout *pidgin_blist_theme_get_layout(PidginBlistTheme *theme); 186 PidginBlistLayout *pidgin_blist_theme_get_layout(PidginBlistTheme *theme);
123 187
124 /** 188 /**
125 * Returns the background color to be used with expanded groups. 189 * Returns the background color to be used with expanded groups.
126 * 190 *
191 * @param theme The PidginBlist theme.
192 *
127 * @returns A gdk color. 193 * @returns A gdk color.
128 */ 194 */
129 GdkColor *pidgin_blist_theme_get_expanded_background_color(PidginBlistTheme *theme); 195 GdkColor *pidgin_blist_theme_get_expanded_background_color(PidginBlistTheme *theme);
130 196
131 /** 197 /**
132 * Returns the text font and color to be used with expanded groups. 198 * Returns the text font and color to be used with expanded groups.
133 * 199 *
134 * @returns A font and color pair. 200 * @param theme The PidginBlist theme.
135 */ 201 *
136 FontColorPair *pidgin_blist_theme_get_expanded_text_info(PidginBlistTheme *theme); 202 * @returns A font and color pair.
203 */
204 PidginThemeFont *pidgin_blist_theme_get_expanded_text_info(PidginBlistTheme *theme);
137 205
138 /** 206 /**
139 * Returns the background color to be used with collapsed groups. 207 * Returns the background color to be used with collapsed groups.
140 * 208 *
209 * @param theme The PidginBlist theme.
210 *
141 * @returns A gdk color. 211 * @returns A gdk color.
142 */ 212 */
143 GdkColor *pidgin_blist_theme_get_collapsed_background_color(PidginBlistTheme *theme); 213 GdkColor *pidgin_blist_theme_get_collapsed_background_color(PidginBlistTheme *theme);
144 214
145 /** 215 /**
146 * Returns the text font and color to be used with collapsed groups. 216 * Returns the text font and color to be used with collapsed groups.
147 * 217 *
148 * @returns A font and color pair. 218 * @param theme The PidginBlist theme.
149 */ 219 *
150 FontColorPair *pidgin_blist_theme_get_collapsed_text_info(PidginBlistTheme *theme); 220 * @returns A font and color pair.
221 */
222 PidginThemeFont *pidgin_blist_theme_get_collapsed_text_info(PidginBlistTheme *theme);
151 223
152 /** 224 /**
153 * Returns the colors to be used for contacts and chats. 225 * Returns the colors to be used for contacts and chats.
154 * 226 *
227 * @param theme The PidginBlist theme.
228 *
155 * @returns A gdkcolor for contacts and chats. 229 * @returns A gdkcolor for contacts and chats.
156 */ 230 */
157 GdkColor *pidgin_blist_theme_get_contact_color(PidginBlistTheme *theme); 231 GdkColor *pidgin_blist_theme_get_contact_color(PidginBlistTheme *theme);
158 232
159 /** 233 /**
160 * Returns the text font and color to be used for expanded contacts. 234 * Returns the text font and color to be used for expanded contacts.
161 * 235 *
162 * @returns A font and color pair. 236 * @param theme The PidginBlist theme.
163 */ 237 *
164 FontColorPair *pidgin_blist_theme_get_contact_text_info(PidginBlistTheme *theme); 238 * @returns A font and color pair.
239 */
240 PidginThemeFont *pidgin_blist_theme_get_contact_text_info(PidginBlistTheme *theme);
165 241
166 /** 242 /**
167 * Returns the text font and color to be used for online buddies. 243 * Returns the text font and color to be used for online buddies.
168 * 244 *
169 * @returns A font and color pair. 245 * @param theme The PidginBlist theme.
170 */ 246 *
171 FontColorPair *pidgin_blist_theme_get_online_text_info(PidginBlistTheme *theme); 247 * @returns A font and color pair.
248 */
249 PidginThemeFont *pidgin_blist_theme_get_online_text_info(PidginBlistTheme *theme);
172 250
173 /** 251 /**
174 * Returns the text font and color to be used for away and idle buddies. 252 * Returns the text font and color to be used for away and idle buddies.
175 * 253 *
176 * @returns A font and color pair. 254 * @param theme The PidginBlist theme.
177 */ 255 *
178 FontColorPair *pidgin_blist_theme_get_away_text_info(PidginBlistTheme *theme); 256 * @returns A font and color pair.
257 */
258 PidginThemeFont *pidgin_blist_theme_get_away_text_info(PidginBlistTheme *theme);
179 259
180 /** 260 /**
181 * Returns the text font and color to be used for offline buddies. 261 * Returns the text font and color to be used for offline buddies.
182 * 262 *
183 * @returns A font and color pair. 263 * @param theme The PidginBlist theme.
184 */ 264 *
185 FontColorPair *pidgin_blist_theme_get_offline_text_info(PidginBlistTheme *theme); 265 * @returns A font and color pair.
266 */
267 PidginThemeFont *pidgin_blist_theme_get_offline_text_info(PidginBlistTheme *theme);
186 268
187 /** 269 /**
188 * Returns the text font and color to be used for idle buddies. 270 * Returns the text font and color to be used for idle buddies.
189 * 271 *
190 * @returns A font and color pair. 272 * @param theme The PidginBlist theme.
191 */ 273 *
192 FontColorPair *pidgin_blist_theme_get_idle_text_info(PidginBlistTheme *theme); 274 * @returns A font and color pair.
275 */
276 PidginThemeFont *pidgin_blist_theme_get_idle_text_info(PidginBlistTheme *theme);
193 277
194 /** 278 /**
195 * Returns the text font and color to be used for buddies with unread messages. 279 * Returns the text font and color to be used for buddies with unread messages.
196 * 280 *
197 * @returns A font and color pair. 281 * @param theme The PidginBlist theme.
198 */ 282 *
199 FontColorPair *pidgin_blist_theme_get_unread_message_text_info(PidginBlistTheme *theme); 283 * @returns A font and color pair.
284 */
285 PidginThemeFont *pidgin_blist_theme_get_unread_message_text_info(PidginBlistTheme *theme);
200 286
201 /** 287 /**
202 * Returns the text font and color to be used for chats with unread messages 288 * Returns the text font and color to be used for chats with unread messages
203 * that mention your nick. 289 * that mention your nick.
204 * 290 *
205 * @returns A font and color pair. 291 * @param theme The PidginBlist theme.
206 */ 292 *
207 FontColorPair *pidgin_blist_theme_get_unread_message_nick_said_text_info(PidginBlistTheme *theme); 293 * @returns A font and color pair.
294 */
295 PidginThemeFont *pidgin_blist_theme_get_unread_message_nick_said_text_info(PidginBlistTheme *theme);
208 296
209 /** 297 /**
210 * Returns the text font and color to be used for a buddy's status message. 298 * Returns the text font and color to be used for a buddy's status message.
211 * 299 *
212 * @returns A font and color pair. 300 * @param theme The PidginBlist theme.
213 */ 301 *
214 FontColorPair *pidgin_blist_theme_get_status_text_info(PidginBlistTheme *theme); 302 * @returns A font and color pair.
303 */
304 PidginThemeFont *pidgin_blist_theme_get_status_text_info(PidginBlistTheme *theme);
215 305
216 /* Set Methods */ 306 /* Set Methods */
217 307
218 /** 308 /**
219 * Sets the background color to be used for this buddy list theme. 309 * Sets the background color to be used for this buddy list theme.
220 * 310 *
311 * @param theme The PidginBlist theme.
221 * @param color The new background color. 312 * @param color The new background color.
222 */ 313 */
223 void pidgin_blist_theme_set_background_color(PidginBlistTheme *theme, const GdkColor *color); 314 void pidgin_blist_theme_set_background_color(PidginBlistTheme *theme, const GdkColor *color);
224 315
225 /** 316 /**
226 * Sets the opacity to be used for this buddy list theme. 317 * Sets the opacity to be used for this buddy list theme.
227 * 318 *
319 * @param theme The PidginBlist theme.
228 * @param opacity The new opacity setting. 320 * @param opacity The new opacity setting.
229 */ 321 */
230 void pidgin_blist_theme_set_opacity(PidginBlistTheme *theme, gdouble opacity); 322 void pidgin_blist_theme_set_opacity(PidginBlistTheme *theme, gdouble opacity);
231 323
232 /** 324 /**
233 * Sets the buddy list layout to be used for this buddy list theme. 325 * Sets the buddy list layout to be used for this buddy list theme.
234 * 326 *
327 * @param theme The PidginBlist theme.
235 * @param layout The new layout. 328 * @param layout The new layout.
236 */ 329 */
237 void pidgin_blist_theme_set_layout(PidginBlistTheme *theme, const PidginBlistLayout *layout); 330 void pidgin_blist_theme_set_layout(PidginBlistTheme *theme, const PidginBlistLayout *layout);
238 331
239 /** 332 /**
240 * Sets the background color to be used for expanded groups. 333 * Sets the background color to be used for expanded groups.
241 * 334 *
335 * @param theme The PidginBlist theme.
242 * @param color The new background color. 336 * @param color The new background color.
243 */ 337 */
244 void pidgin_blist_theme_set_expanded_background_color(PidginBlistTheme *theme, const GdkColor *color); 338 void pidgin_blist_theme_set_expanded_background_color(PidginBlistTheme *theme, const GdkColor *color);
245 339
246 /** 340 /**
247 * Sets the text color and font to be used for expanded groups. 341 * Sets the text color and font to be used for expanded groups.
248 * 342 *
249 * @param pair The new text font at color pair. 343 * @param theme The PidginBlist theme.
250 */ 344 * @param pair The new text font and color pair.
251 void pidgin_blist_theme_set_expanded_text_info(PidginBlistTheme *theme, const FontColorPair *pair); 345 */
346 void pidgin_blist_theme_set_expanded_text_info(PidginBlistTheme *theme, const PidginThemeFont *pair);
252 347
253 /** 348 /**
254 * Sets the background color to be used for collapsed groups. 349 * Sets the background color to be used for collapsed groups.
255 * 350 *
351 * @param theme The PidginBlist theme.
256 * @param color The new background color. 352 * @param color The new background color.
257 */ 353 */
258 void pidgin_blist_theme_set_collapsed_background_color(PidginBlistTheme *theme, const GdkColor *color); 354 void pidgin_blist_theme_set_collapsed_background_color(PidginBlistTheme *theme, const GdkColor *color);
259 355
260 /** 356 /**
261 * Sets the text color and font to be used for expanded groups. 357 * Sets the text color and font to be used for expanded groups.
262 * 358 *
263 * @param pair The new text font at color pair. 359 * @param theme The PidginBlist theme.
264 */ 360 * @param pair The new text font and color pair.
265 void pidgin_blist_theme_set_collapsed_text_info(PidginBlistTheme *theme, const FontColorPair *pair); 361 */
362 void pidgin_blist_theme_set_collapsed_text_info(PidginBlistTheme *theme, const PidginThemeFont *pair);
266 363
267 /** 364 /**
268 * Sets the background color to be used for contacts and chats. 365 * Sets the background color to be used for contacts and chats.
269 * 366 *
367 * @param theme The PidginBlist theme.
270 * @param color The color to use for contacts and chats. 368 * @param color The color to use for contacts and chats.
271 */ 369 */
272 void pidgin_blist_theme_set_contact_color(PidginBlistTheme *theme, const GdkColor *color); 370 void pidgin_blist_theme_set_contact_color(PidginBlistTheme *theme, const GdkColor *color);
273 371
274 /** 372 /**
275 * Sets the text color and font to be used for expanded contacts. 373 * Sets the text color and font to be used for expanded contacts.
276 * 374 *
277 * @param pair The new text font at color pair. 375 * @param theme The PidginBlist theme.
278 */ 376 * @param pair The new text font and color pair.
279 void pidgin_blist_theme_set_contact_text_info(PidginBlistTheme *theme, const FontColorPair *pair); 377 */
378 void pidgin_blist_theme_set_contact_text_info(PidginBlistTheme *theme, const PidginThemeFont *pair);
280 379
281 /** 380 /**
282 * Sets the text color and font to be used for online buddies. 381 * Sets the text color and font to be used for online buddies.
283 * 382 *
284 * @param pair The new text font at color pair. 383 * @param theme The PidginBlist theme.
285 */ 384 * @param pair The new text font and color pair.
286 void pidgin_blist_theme_set_online_text_info(PidginBlistTheme *theme, const FontColorPair *pair); 385 */
386 void pidgin_blist_theme_set_online_text_info(PidginBlistTheme *theme, const PidginThemeFont *pair);
287 387
288 /** 388 /**
289 * Sets the text color and font to be used for away and idle buddies. 389 * Sets the text color and font to be used for away and idle buddies.
290 * 390 *
291 * @param pair The new text font at color pair. 391 * @param theme The PidginBlist theme.
292 */ 392 * @param pair The new text font and color pair.
293 void pidgin_blist_theme_set_away_text_info(PidginBlistTheme *theme, const FontColorPair *pair); 393 */
394 void pidgin_blist_theme_set_away_text_info(PidginBlistTheme *theme, const PidginThemeFont *pair);
294 395
295 /** 396 /**
296 * Sets the text color and font to be used for offline buddies. 397 * Sets the text color and font to be used for offline buddies.
297 * 398 *
298 * @param pair The new text font at color pair. 399 * @param theme The PidginBlist theme.
299 */ 400 * @param pair The new text font and color pair.
300 void pidgin_blist_theme_set_offline_text_info(PidginBlistTheme *theme, const FontColorPair *pair); 401 */
402 void pidgin_blist_theme_set_offline_text_info(PidginBlistTheme *theme, const PidginThemeFont *pair);
301 403
302 /** 404 /**
303 * Sets the text color and font to be used for idle buddies. 405 * Sets the text color and font to be used for idle buddies.
304 * 406 *
305 * @param pair The new text font at color pair. 407 * @param theme The PidginBlist theme.
306 */ 408 * @param pair The new text font and color pair.
307 void pidgin_blist_theme_set_idle_text_info(PidginBlistTheme *theme, const FontColorPair *pair); 409 */
410 void pidgin_blist_theme_set_idle_text_info(PidginBlistTheme *theme, const PidginThemeFont *pair);
308 411
309 /** 412 /**
310 * Sets the text color and font to be used for buddies with unread messages. 413 * Sets the text color and font to be used for buddies with unread messages.
311 * 414 *
312 * @param pair The new text font at color pair. 415 * @param theme The PidginBlist theme.
313 */ 416 * @param pair The new text font and color pair.
314 void pidgin_blist_theme_set_unread_message_text_info(PidginBlistTheme *theme, const FontColorPair *pair); 417 */
418 void pidgin_blist_theme_set_unread_message_text_info(PidginBlistTheme *theme, const PidginThemeFont *pair);
315 419
316 /** 420 /**
317 * Sets the text color and font to be used for a chat with unread messages 421 * Sets the text color and font to be used for a chat with unread messages
318 * that mention your nick. 422 * that mention your nick.
319 * 423 *
320 * @param pair The new text font at color pair. 424 * @param theme The PidginBlist theme.
321 */ 425 * @param pair The new text font and color pair.
322 void pidgin_blist_theme_set_unread_message_nick_said_text_info(PidginBlistTheme *theme, const FontColorPair *pair); 426 */
427 void pidgin_blist_theme_set_unread_message_nick_said_text_info(PidginBlistTheme *theme, const PidginThemeFont *pair);
323 428
324 /** 429 /**
325 * Sets the text color and font to be used for buddy status messages. 430 * Sets the text color and font to be used for buddy status messages.
326 * 431 *
327 * @param pair The new text font at color pair. 432 * @param theme The PidginBlist theme.
328 */ 433 * @param pair The new text font and color pair.
329 void pidgin_blist_theme_set_status_text_info(PidginBlistTheme *theme, const FontColorPair *pair); 434 */
435 void pidgin_blist_theme_set_status_text_info(PidginBlistTheme *theme, const PidginThemeFont *pair);
330 436
331 G_END_DECLS 437 G_END_DECLS
332 #endif /* PIDGIN_BLIST_THEME_H */ 438 #endif /* PIDGIN_BLIST_THEME_H */