Migrate certificates, icons, logs to XDG dirs
[pidgin-git.git] / pidgin / gtkblist-theme.h
blobf932883f52f4536b51bdcbda74e8a98b728a9393
1 /* pidgin
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
5 * source distribution.
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
24 /**
25 * SECTION:gtkblist-theme
26 * @section_id: pidgin-gtkblist-theme
27 * @short_description: <filename>gtkblist-theme.h</filename>
28 * @title: Buddy List Theme API
31 #include <glib.h>
32 #include <glib-object.h>
33 #include <gtk/gtk.h>
35 #include "theme.h"
37 typedef struct _PidginBlistTheme PidginBlistTheme;
38 typedef struct _PidginBlistThemeClass PidginBlistThemeClass;
40 #define PIDGIN_TYPE_BLIST_THEME (pidgin_blist_theme_get_type ())
41 #define PIDGIN_BLIST_THEME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PIDGIN_TYPE_BLIST_THEME, PidginBlistTheme))
42 #define PIDGIN_BLIST_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PIDGIN_TYPE_BLIST_THEME, PidginBlistThemeClass))
43 #define PIDGIN_IS_BLIST_THEME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PIDGIN_TYPE_BLIST_THEME))
44 #define PIDGIN_IS_BLIST_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PIDGIN_TYPE_BLIST_THEME))
45 #define PIDGIN_BLIST_THEME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PIDGIN_TYPE_BLIST_THEME, PidginBlistThemeClass))
47 #define PIDGIN_TYPE_THEME_FONT (pidgin_theme_font_get_type())
49 #define PIDGIN_TYPE_BLIST_LAYOUT (pidgin_blist_layout_get_type())
51 /**
52 * PidginBlistTheme:
54 * A pidgin buddy list theme.
55 * This is an object for Purple to represent a buddy list theme.
57 * PidginBlistTheme is a PurpleTheme Object.
59 struct _PidginBlistTheme
61 PurpleTheme parent;
64 struct _PidginBlistThemeClass
66 PurpleThemeClass parent_class;
69 typedef struct _PidginThemeFont PidginThemeFont;
71 typedef struct _PidginBlistLayout PidginBlistLayout;
73 struct _PidginBlistLayout
75 gint status_icon;
76 gint text;
77 gint emblem;
78 gint protocol_icon;
79 gint buddy_icon;
80 gboolean show_status;
84 G_BEGIN_DECLS
86 /**************************************************************************/
87 /* PidginThemeFont API */
88 /**************************************************************************/
90 /**
91 * pidgin_theme_font_get_type:
93 * Returns: The #GType for the #PidginThemeFont boxed structure.
95 GType pidgin_theme_font_get_type(void);
97 /**
98 * pidgin_theme_font_new:
99 * @face: The font face
100 * @color: The color of the font
102 * Create a new PidginThemeFont.
104 * Returns: A newly created PidginThemeFont
106 PidginThemeFont *pidgin_theme_font_new(const gchar *face, GdkRGBA *color);
109 * pidgin_theme_font_free:
110 * @font: The theme font
112 * Frees a font and color pair
114 void pidgin_theme_font_free(PidginThemeFont *font);
117 * pidgin_theme_font_set_font_face:
118 * @font: The PidginThemeFont
119 * @face: The font-face
121 * Set the font-face of a PidginThemeFont.
123 void pidgin_theme_font_set_font_face(PidginThemeFont *font, const gchar *face);
126 * pidgin_theme_font_set_color:
127 * @font: The PidginThemeFont
128 * @color: The color
130 * Set the color of a PidginThemeFont.
132 void pidgin_theme_font_set_color(PidginThemeFont *font, const GdkRGBA *color);
135 * pidgin_theme_font_get_font_face:
136 * @font: The PidginThemeFont
138 * Get the font-face of a PidginThemeFont.
140 * Returns: The font-face, or NULL if none is set.
142 const gchar * pidgin_theme_font_get_font_face(PidginThemeFont *font);
145 * pidgin_theme_font_get_color:
146 * @font: The PidginThemeFont
148 * Get the color of a PidginThemeFont as a GdkRGBA object.
150 * Returns: The color, or NULL if none is set.
152 const GdkRGBA *pidgin_theme_font_get_color(PidginThemeFont *font);
155 * pidgin_theme_font_get_color_describe:
156 * @font: The PidginThemeFont
158 * Get the color of a PidginThemeFont.
160 * Returns: The color, or NULL if none is set.
162 const gchar * pidgin_theme_font_get_color_describe(PidginThemeFont *font);
164 /**************************************************************************/
165 /* Purple Buddy List Theme API */
166 /**************************************************************************/
169 * pidgin_blist_theme_get_type:
171 * Returns: The #GType for a blist theme.
173 GType pidgin_blist_theme_get_type(void);
176 * pidgin_blist_layout_get_type:
178 * Returns: The #GType for the #PidginBlistLayout boxed structure.
180 GType pidgin_blist_layout_get_type(void);
182 /* get methods */
185 * pidgin_blist_theme_get_background_color:
186 * @theme: The PidginBlist theme.
188 * Returns the background color of the buddy list.
190 * Returns: A gdk color.
192 GdkRGBA *pidgin_blist_theme_get_background_color(PidginBlistTheme *theme);
195 * pidgin_blist_theme_get_opacity:
196 * @theme: The PidginBlist theme.
198 * Returns the opacity of the buddy list window
199 * (0.0 or clear to 1.0 fully opaque).
201 * Returns: The opacity
203 gdouble pidgin_blist_theme_get_opacity(PidginBlistTheme *theme);
206 * pidgin_blist_theme_get_layout:
207 * @theme: The PidginBlist theme.
209 * Returns the layout to be used with the buddy list.
211 * Returns: The buddy list layout.
213 PidginBlistLayout *pidgin_blist_theme_get_layout(PidginBlistTheme *theme);
216 * pidgin_blist_theme_get_expanded_background_color:
217 * @theme: The PidginBlist theme.
219 * Returns the background color to be used with expanded groups.
221 * Returns: A gdk color.
223 GdkRGBA *pidgin_blist_theme_get_expanded_background_color(PidginBlistTheme *theme);
226 * pidgin_blist_theme_get_expanded_text_info:
227 * @theme: The PidginBlist theme.
229 * Returns the text font and color to be used with expanded groups.
231 * Returns: A font and color pair.
233 PidginThemeFont *pidgin_blist_theme_get_expanded_text_info(PidginBlistTheme *theme);
236 * pidgin_blist_theme_get_collapsed_background_color:
237 * @theme: The PidginBlist theme.
239 * Returns the background color to be used with collapsed groups.
241 * Returns: A gdk color.
243 GdkRGBA *pidgin_blist_theme_get_collapsed_background_color(PidginBlistTheme *theme);
246 * pidgin_blist_theme_get_collapsed_text_info:
247 * @theme: The PidginBlist theme.
249 * Returns the text font and color to be used with collapsed groups.
251 * Returns: A font and color pair.
253 PidginThemeFont *pidgin_blist_theme_get_collapsed_text_info(PidginBlistTheme *theme);
256 * pidgin_blist_theme_get_contact_color:
257 * @theme: The PidginBlist theme.
259 * Returns the colors to be used for contacts and chats.
261 * Returns: A gdkcolor for contacts and chats.
263 GdkRGBA *pidgin_blist_theme_get_contact_color(PidginBlistTheme *theme);
266 * pidgin_blist_theme_get_contact_text_info:
267 * @theme: The PidginBlist theme.
269 * Returns the text font and color to be used for expanded contacts.
271 * Returns: A font and color pair.
273 PidginThemeFont *pidgin_blist_theme_get_contact_text_info(PidginBlistTheme *theme);
276 * pidgin_blist_theme_get_online_text_info:
277 * @theme: The PidginBlist theme.
279 * Returns the text font and color to be used for online buddies.
281 * Returns: A font and color pair.
283 PidginThemeFont *pidgin_blist_theme_get_online_text_info(PidginBlistTheme *theme);
286 * pidgin_blist_theme_get_away_text_info:
287 * @theme: The PidginBlist theme.
289 * Returns the text font and color to be used for away and idle buddies.
291 * Returns: A font and color pair.
293 PidginThemeFont *pidgin_blist_theme_get_away_text_info(PidginBlistTheme *theme);
296 * pidgin_blist_theme_get_offline_text_info:
297 * @theme: The PidginBlist theme.
299 * Returns the text font and color to be used for offline buddies.
301 * Returns: A font and color pair.
303 PidginThemeFont *pidgin_blist_theme_get_offline_text_info(PidginBlistTheme *theme);
306 * pidgin_blist_theme_get_idle_text_info:
307 * @theme: The PidginBlist theme.
309 * Returns the text font and color to be used for idle buddies.
311 * Returns: A font and color pair.
313 PidginThemeFont *pidgin_blist_theme_get_idle_text_info(PidginBlistTheme *theme);
316 * pidgin_blist_theme_get_unread_message_text_info:
317 * @theme: The PidginBlist theme.
319 * Returns the text font and color to be used for buddies with unread messages.
321 * Returns: A font and color pair.
323 PidginThemeFont *pidgin_blist_theme_get_unread_message_text_info(PidginBlistTheme *theme);
326 * pidgin_blist_theme_get_unread_message_nick_said_text_info:
327 * @theme: The PidginBlist theme.
329 * Returns the text font and color to be used for chats with unread messages
330 * that mention your nick.
332 * Returns: A font and color pair.
334 PidginThemeFont *pidgin_blist_theme_get_unread_message_nick_said_text_info(PidginBlistTheme *theme);
337 * pidgin_blist_theme_get_status_text_info:
338 * @theme: The PidginBlist theme.
340 * Returns the text font and color to be used for a buddy's status message.
342 * Returns: A font and color pair.
344 PidginThemeFont *pidgin_blist_theme_get_status_text_info(PidginBlistTheme *theme);
346 /* Set Methods */
349 * pidgin_blist_theme_set_background_color:
350 * @theme: The PidginBlist theme.
351 * @color: The new background color.
353 * Sets the background color to be used for this buddy list theme.
355 void pidgin_blist_theme_set_background_color(PidginBlistTheme *theme, const GdkRGBA *color);
358 * pidgin_blist_theme_set_opacity:
359 * @theme: The PidginBlist theme.
360 * @opacity: The new opacity setting.
362 * Sets the opacity to be used for this buddy list theme.
364 void pidgin_blist_theme_set_opacity(PidginBlistTheme *theme, gdouble opacity);
367 * pidgin_blist_theme_set_layout:
368 * @theme: The PidginBlist theme.
369 * @layout: The new layout.
371 * Sets the buddy list layout to be used for this buddy list theme.
373 void pidgin_blist_theme_set_layout(PidginBlistTheme *theme, const PidginBlistLayout *layout);
376 * pidgin_blist_theme_set_expanded_background_color:
377 * @theme: The PidginBlist theme.
378 * @color: The new background color.
380 * Sets the background color to be used for expanded groups.
382 void pidgin_blist_theme_set_expanded_background_color(PidginBlistTheme *theme, const GdkRGBA *color);
385 * pidgin_blist_theme_set_expanded_text_info:
386 * @theme: The PidginBlist theme.
387 * @pair: The new text font and color pair.
389 * Sets the text color and font to be used for expanded groups.
391 void pidgin_blist_theme_set_expanded_text_info(PidginBlistTheme *theme, const PidginThemeFont *pair);
394 * pidgin_blist_theme_set_collapsed_background_color:
395 * @theme: The PidginBlist theme.
396 * @color: The new background color.
398 * Sets the background color to be used for collapsed groups.
400 void pidgin_blist_theme_set_collapsed_background_color(PidginBlistTheme *theme, const GdkRGBA *color);
403 * pidgin_blist_theme_set_collapsed_text_info:
404 * @theme: The PidginBlist theme.
405 * @pair: The new text font and color pair.
407 * Sets the text color and font to be used for expanded groups.
409 void pidgin_blist_theme_set_collapsed_text_info(PidginBlistTheme *theme, const PidginThemeFont *pair);
412 * pidgin_blist_theme_set_contact_color:
413 * @theme: The PidginBlist theme.
414 * @color: The color to use for contacts and chats.
416 * Sets the background color to be used for contacts and chats.
418 void pidgin_blist_theme_set_contact_color(PidginBlistTheme *theme, const GdkRGBA *color);
421 * pidgin_blist_theme_set_contact_text_info:
422 * @theme: The PidginBlist theme.
423 * @pair: The new text font and color pair.
425 * Sets the text color and font to be used for expanded contacts.
427 void pidgin_blist_theme_set_contact_text_info(PidginBlistTheme *theme, const PidginThemeFont *pair);
430 * pidgin_blist_theme_set_online_text_info:
431 * @theme: The PidginBlist theme.
432 * @pair: The new text font and color pair.
434 * Sets the text color and font to be used for online buddies.
436 void pidgin_blist_theme_set_online_text_info(PidginBlistTheme *theme, const PidginThemeFont *pair);
439 * pidgin_blist_theme_set_away_text_info:
440 * @theme: The PidginBlist theme.
441 * @pair: The new text font and color pair.
443 * Sets the text color and font to be used for away and idle buddies.
445 void pidgin_blist_theme_set_away_text_info(PidginBlistTheme *theme, const PidginThemeFont *pair);
448 * pidgin_blist_theme_set_offline_text_info:
449 * @theme: The PidginBlist theme.
450 * @pair: The new text font and color pair.
452 * Sets the text color and font to be used for offline buddies.
454 void pidgin_blist_theme_set_offline_text_info(PidginBlistTheme *theme, const PidginThemeFont *pair);
457 * pidgin_blist_theme_set_idle_text_info:
458 * @theme: The PidginBlist theme.
459 * @pair: The new text font and color pair.
461 * Sets the text color and font to be used for idle buddies.
463 void pidgin_blist_theme_set_idle_text_info(PidginBlistTheme *theme, const PidginThemeFont *pair);
466 * pidgin_blist_theme_set_unread_message_text_info:
467 * @theme: The PidginBlist theme.
468 * @pair: The new text font and color pair.
470 * Sets the text color and font to be used for buddies with unread messages.
472 void pidgin_blist_theme_set_unread_message_text_info(PidginBlistTheme *theme, const PidginThemeFont *pair);
475 * pidgin_blist_theme_set_unread_message_nick_said_text_info:
476 * @theme: The PidginBlist theme.
477 * @pair: The new text font and color pair.
479 * Sets the text color and font to be used for a chat with unread messages
480 * that mention your nick.
482 void pidgin_blist_theme_set_unread_message_nick_said_text_info(PidginBlistTheme *theme, const PidginThemeFont *pair);
485 * pidgin_blist_theme_set_status_text_info:
486 * @theme: The PidginBlist theme.
487 * @pair: The new text font and color pair.
489 * Sets the text color and font to be used for buddy status messages.
491 void pidgin_blist_theme_set_status_text_info(PidginBlistTheme *theme, const PidginThemeFont *pair);
493 G_END_DECLS
495 #endif /* PIDGIN_BLIST_THEME_H */