3 * Pidgin is the legal property of its developers, whose names are too numerous
4 * to list here. Please refer to the COPYRIGHT file distributed with this
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
22 #ifndef PIDGIN_BLIST_THEME_H
23 #define PIDGIN_BLIST_THEME_H
25 * SECTION:gtkblist-theme
26 * @section_id: pidgin-gtkblist-theme
27 * @short_description: <filename>gtkblist-theme.h</filename>
28 * @title: Buddy List Theme API
32 #include <glib-object.h>
37 #define PIDGIN_TYPE_BLIST_THEME (pidgin_blist_theme_get_type ())
39 #define PIDGIN_TYPE_THEME_FONT (pidgin_theme_font_get_type())
41 #define PIDGIN_TYPE_BLIST_LAYOUT (pidgin_blist_layout_get_type())
43 typedef struct _PidginThemeFont PidginThemeFont
;
45 typedef struct _PidginBlistLayout PidginBlistLayout
;
47 struct _PidginBlistLayout
60 /**************************************************************************/
61 /* PidginThemeFont API */
62 /**************************************************************************/
65 * pidgin_theme_font_get_type:
67 * Returns: The #GType for the #PidginThemeFont boxed structure.
69 GType
pidgin_theme_font_get_type(void);
72 * pidgin_theme_font_new:
73 * @face: The font face
74 * @color: The color of the font
76 * Create a new PidginThemeFont.
78 * Returns: A newly created PidginThemeFont
80 PidginThemeFont
*pidgin_theme_font_new(const gchar
*face
, GdkRGBA
*color
);
83 * pidgin_theme_font_free:
84 * @font: The theme font
86 * Frees a font and color pair
88 void pidgin_theme_font_free(PidginThemeFont
*font
);
91 * pidgin_theme_font_set_font_face:
92 * @font: The PidginThemeFont
93 * @face: The font-face
95 * Set the font-face of a PidginThemeFont.
97 void pidgin_theme_font_set_font_face(PidginThemeFont
*font
, const gchar
*face
);
100 * pidgin_theme_font_set_color:
101 * @font: The PidginThemeFont
104 * Set the color of a PidginThemeFont.
106 void pidgin_theme_font_set_color(PidginThemeFont
*font
, const GdkRGBA
*color
);
109 * pidgin_theme_font_get_font_face:
110 * @font: The PidginThemeFont
112 * Get the font-face of a PidginThemeFont.
114 * Returns: The font-face, or NULL if none is set.
116 const gchar
* pidgin_theme_font_get_font_face(PidginThemeFont
*font
);
119 * pidgin_theme_font_get_color:
120 * @font: The PidginThemeFont
122 * Get the color of a PidginThemeFont as a GdkRGBA object.
124 * Returns: The color, or NULL if none is set.
126 const GdkRGBA
*pidgin_theme_font_get_color(PidginThemeFont
*font
);
129 * pidgin_theme_font_get_color_describe:
130 * @font: The PidginThemeFont
132 * Get the color of a PidginThemeFont.
134 * Returns: The color, or NULL if none is set.
136 const gchar
* pidgin_theme_font_get_color_describe(PidginThemeFont
*font
);
138 /**************************************************************************/
139 /* Purple Buddy List Theme API */
140 /**************************************************************************/
143 * pidgin_blist_theme_get_type:
145 * Returns: The #GType for a blist theme.
147 G_DECLARE_FINAL_TYPE(PidginBlistTheme
, pidgin_blist_theme
, PIDGIN
, BLIST_THEME
,
151 * pidgin_blist_layout_get_type:
153 * Returns: The #GType for the #PidginBlistLayout boxed structure.
155 GType
pidgin_blist_layout_get_type(void);
160 * pidgin_blist_theme_get_background_color:
161 * @theme: The PidginBlist theme.
163 * Returns the background color of the buddy list.
165 * Returns: A gdk color.
167 GdkRGBA
*pidgin_blist_theme_get_background_color(PidginBlistTheme
*theme
);
170 * pidgin_blist_theme_get_opacity:
171 * @theme: The PidginBlist theme.
173 * Returns the opacity of the buddy list window
174 * (0.0 or clear to 1.0 fully opaque).
176 * Returns: The opacity
178 gdouble
pidgin_blist_theme_get_opacity(PidginBlistTheme
*theme
);
181 * pidgin_blist_theme_get_layout:
182 * @theme: The PidginBlist theme.
184 * Returns the layout to be used with the buddy list.
186 * Returns: The buddy list layout.
188 PidginBlistLayout
*pidgin_blist_theme_get_layout(PidginBlistTheme
*theme
);
191 * pidgin_blist_theme_get_expanded_background_color:
192 * @theme: The PidginBlist theme.
194 * Returns the background color to be used with expanded groups.
196 * Returns: A gdk color.
198 GdkRGBA
*pidgin_blist_theme_get_expanded_background_color(PidginBlistTheme
*theme
);
201 * pidgin_blist_theme_get_expanded_text_info:
202 * @theme: The PidginBlist theme.
204 * Returns the text font and color to be used with expanded groups.
206 * Returns: A font and color pair.
208 PidginThemeFont
*pidgin_blist_theme_get_expanded_text_info(PidginBlistTheme
*theme
);
211 * pidgin_blist_theme_get_collapsed_background_color:
212 * @theme: The PidginBlist theme.
214 * Returns the background color to be used with collapsed groups.
216 * Returns: A gdk color.
218 GdkRGBA
*pidgin_blist_theme_get_collapsed_background_color(PidginBlistTheme
*theme
);
221 * pidgin_blist_theme_get_collapsed_text_info:
222 * @theme: The PidginBlist theme.
224 * Returns the text font and color to be used with collapsed groups.
226 * Returns: A font and color pair.
228 PidginThemeFont
*pidgin_blist_theme_get_collapsed_text_info(PidginBlistTheme
*theme
);
231 * pidgin_blist_theme_get_contact_color:
232 * @theme: The PidginBlist theme.
234 * Returns the colors to be used for contacts and chats.
236 * Returns: A gdkcolor for contacts and chats.
238 GdkRGBA
*pidgin_blist_theme_get_contact_color(PidginBlistTheme
*theme
);
241 * pidgin_blist_theme_get_contact_text_info:
242 * @theme: The PidginBlist theme.
244 * Returns the text font and color to be used for expanded contacts.
246 * Returns: A font and color pair.
248 PidginThemeFont
*pidgin_blist_theme_get_contact_text_info(PidginBlistTheme
*theme
);
251 * pidgin_blist_theme_get_online_text_info:
252 * @theme: The PidginBlist theme.
254 * Returns the text font and color to be used for online buddies.
256 * Returns: A font and color pair.
258 PidginThemeFont
*pidgin_blist_theme_get_online_text_info(PidginBlistTheme
*theme
);
261 * pidgin_blist_theme_get_away_text_info:
262 * @theme: The PidginBlist theme.
264 * Returns the text font and color to be used for away and idle buddies.
266 * Returns: A font and color pair.
268 PidginThemeFont
*pidgin_blist_theme_get_away_text_info(PidginBlistTheme
*theme
);
271 * pidgin_blist_theme_get_offline_text_info:
272 * @theme: The PidginBlist theme.
274 * Returns the text font and color to be used for offline buddies.
276 * Returns: A font and color pair.
278 PidginThemeFont
*pidgin_blist_theme_get_offline_text_info(PidginBlistTheme
*theme
);
281 * pidgin_blist_theme_get_idle_text_info:
282 * @theme: The PidginBlist theme.
284 * Returns the text font and color to be used for idle buddies.
286 * Returns: A font and color pair.
288 PidginThemeFont
*pidgin_blist_theme_get_idle_text_info(PidginBlistTheme
*theme
);
291 * pidgin_blist_theme_get_unread_message_text_info:
292 * @theme: The PidginBlist theme.
294 * Returns the text font and color to be used for buddies with unread messages.
296 * Returns: A font and color pair.
298 PidginThemeFont
*pidgin_blist_theme_get_unread_message_text_info(PidginBlistTheme
*theme
);
301 * pidgin_blist_theme_get_unread_message_nick_said_text_info:
302 * @theme: The PidginBlist theme.
304 * Returns the text font and color to be used for chats with unread messages
305 * that mention your nick.
307 * Returns: A font and color pair.
309 PidginThemeFont
*pidgin_blist_theme_get_unread_message_nick_said_text_info(PidginBlistTheme
*theme
);
312 * pidgin_blist_theme_get_status_text_info:
313 * @theme: The PidginBlist theme.
315 * Returns the text font and color to be used for a buddy's status message.
317 * Returns: A font and color pair.
319 PidginThemeFont
*pidgin_blist_theme_get_status_text_info(PidginBlistTheme
*theme
);
324 * pidgin_blist_theme_set_background_color:
325 * @theme: The PidginBlist theme.
326 * @color: The new background color.
328 * Sets the background color to be used for this buddy list theme.
330 void pidgin_blist_theme_set_background_color(PidginBlistTheme
*theme
, const GdkRGBA
*color
);
333 * pidgin_blist_theme_set_opacity:
334 * @theme: The PidginBlist theme.
335 * @opacity: The new opacity setting.
337 * Sets the opacity to be used for this buddy list theme.
339 void pidgin_blist_theme_set_opacity(PidginBlistTheme
*theme
, gdouble opacity
);
342 * pidgin_blist_theme_set_layout:
343 * @theme: The PidginBlist theme.
344 * @layout: The new layout.
346 * Sets the buddy list layout to be used for this buddy list theme.
348 void pidgin_blist_theme_set_layout(PidginBlistTheme
*theme
, const PidginBlistLayout
*layout
);
351 * pidgin_blist_theme_set_expanded_background_color:
352 * @theme: The PidginBlist theme.
353 * @color: The new background color.
355 * Sets the background color to be used for expanded groups.
357 void pidgin_blist_theme_set_expanded_background_color(PidginBlistTheme
*theme
, const GdkRGBA
*color
);
360 * pidgin_blist_theme_set_expanded_text_info:
361 * @theme: The PidginBlist theme.
362 * @pair: The new text font and color pair.
364 * Sets the text color and font to be used for expanded groups.
366 void pidgin_blist_theme_set_expanded_text_info(PidginBlistTheme
*theme
, const PidginThemeFont
*pair
);
369 * pidgin_blist_theme_set_collapsed_background_color:
370 * @theme: The PidginBlist theme.
371 * @color: The new background color.
373 * Sets the background color to be used for collapsed groups.
375 void pidgin_blist_theme_set_collapsed_background_color(PidginBlistTheme
*theme
, const GdkRGBA
*color
);
378 * pidgin_blist_theme_set_collapsed_text_info:
379 * @theme: The PidginBlist theme.
380 * @pair: The new text font and color pair.
382 * Sets the text color and font to be used for expanded groups.
384 void pidgin_blist_theme_set_collapsed_text_info(PidginBlistTheme
*theme
, const PidginThemeFont
*pair
);
387 * pidgin_blist_theme_set_contact_color:
388 * @theme: The PidginBlist theme.
389 * @color: The color to use for contacts and chats.
391 * Sets the background color to be used for contacts and chats.
393 void pidgin_blist_theme_set_contact_color(PidginBlistTheme
*theme
, const GdkRGBA
*color
);
396 * pidgin_blist_theme_set_contact_text_info:
397 * @theme: The PidginBlist theme.
398 * @pair: The new text font and color pair.
400 * Sets the text color and font to be used for expanded contacts.
402 void pidgin_blist_theme_set_contact_text_info(PidginBlistTheme
*theme
, const PidginThemeFont
*pair
);
405 * pidgin_blist_theme_set_online_text_info:
406 * @theme: The PidginBlist theme.
407 * @pair: The new text font and color pair.
409 * Sets the text color and font to be used for online buddies.
411 void pidgin_blist_theme_set_online_text_info(PidginBlistTheme
*theme
, const PidginThemeFont
*pair
);
414 * pidgin_blist_theme_set_away_text_info:
415 * @theme: The PidginBlist theme.
416 * @pair: The new text font and color pair.
418 * Sets the text color and font to be used for away and idle buddies.
420 void pidgin_blist_theme_set_away_text_info(PidginBlistTheme
*theme
, const PidginThemeFont
*pair
);
423 * pidgin_blist_theme_set_offline_text_info:
424 * @theme: The PidginBlist theme.
425 * @pair: The new text font and color pair.
427 * Sets the text color and font to be used for offline buddies.
429 void pidgin_blist_theme_set_offline_text_info(PidginBlistTheme
*theme
, const PidginThemeFont
*pair
);
432 * pidgin_blist_theme_set_idle_text_info:
433 * @theme: The PidginBlist theme.
434 * @pair: The new text font and color pair.
436 * Sets the text color and font to be used for idle buddies.
438 void pidgin_blist_theme_set_idle_text_info(PidginBlistTheme
*theme
, const PidginThemeFont
*pair
);
441 * pidgin_blist_theme_set_unread_message_text_info:
442 * @theme: The PidginBlist theme.
443 * @pair: The new text font and color pair.
445 * Sets the text color and font to be used for buddies with unread messages.
447 void pidgin_blist_theme_set_unread_message_text_info(PidginBlistTheme
*theme
, const PidginThemeFont
*pair
);
450 * pidgin_blist_theme_set_unread_message_nick_said_text_info:
451 * @theme: The PidginBlist theme.
452 * @pair: The new text font and color pair.
454 * Sets the text color and font to be used for a chat with unread messages
455 * that mention your nick.
457 void pidgin_blist_theme_set_unread_message_nick_said_text_info(PidginBlistTheme
*theme
, const PidginThemeFont
*pair
);
460 * pidgin_blist_theme_set_status_text_info:
461 * @theme: The PidginBlist theme.
462 * @pair: The new text font and color pair.
464 * Sets the text color and font to be used for buddy status messages.
466 void pidgin_blist_theme_set_status_text_info(PidginBlistTheme
*theme
, const PidginThemeFont
*pair
);
470 #endif /* PIDGIN_BLIST_THEME_H */