pidgin/gtkconv-theme.h

Fri, 25 Jan 2013 02:22:38 -0500

author
Elliott Sales de Andrade <qulogic@pidgin.im>
date
Fri, 25 Jan 2013 02:22:38 -0500
branch
soc.2008.masterpassword
changeset 34108
7a07b6857540
parent 33384
215f0b668ac6
child 35393
00f876b129bc
child 37017
8e2b68c79fa1
permissions
-rw-r--r--

Merge with default.

32536
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
1 /**
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
2 * @file gtkconv-theme.h Pidgin Conversation Theme Class API
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
3 */
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
4
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
5 /* pidgin
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
6 *
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
7 * Pidgin is the legal property of its developers, whose names are too numerous
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
8 * to list here. Please refer to the COPYRIGHT file distributed with this
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
9 * source distribution.
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
10 *
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
11 * This program is free software; you can redistribute it and/or modify
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
12 * it under the terms of the GNU General Public License as published by
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
13 * the Free Software Foundation; either version 2 of the License, or
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
14 * (at your option) any later version.
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
15 *
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
16 * This program is distributed in the hope that it will be useful,
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
19 * GNU General Public License for more details.
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
20 *
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
21 * You should have received a copy of the GNU General Public License
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
22 * along with this program; if not, write to the Free Software
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
24 */
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
25
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
26 #ifndef PIDGIN_CONV_THEME_H
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
27 #define PIDGIN_CONV_THEME_H
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
28
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
29 #include <glib.h>
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
30 #include <glib-object.h>
32544
4cf095ee82e3 Copy theme-to-conversation loading stuff into the GObject code.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32540
diff changeset
31 #include "conversation.h"
32536
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
32 #include "theme.h"
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
33
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
34 /**
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
35 * extends PurpleTheme (theme.h)
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
36 * A pidgin icon theme.
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
37 * This object represents a Pidgin icon theme.
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
38 *
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
39 * PidginConvTheme is a PurpleTheme Object.
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
40 */
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
41 typedef struct _PidginConvTheme PidginConvTheme;
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
42 typedef struct _PidginConvThemeClass PidginConvThemeClass;
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
43
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
44 #define PIDGIN_TYPE_CONV_THEME (pidgin_conversation_theme_get_type ())
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
45 #define PIDGIN_CONV_THEME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PIDGIN_TYPE_CONV_THEME, PidginConvTheme))
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
46 #define PIDGIN_CONV_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PIDGIN_TYPE_CONV_THEME, PidginConvThemeClass))
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
47 #define PIDGIN_IS_CONV_THEME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PIDGIN_TYPE_CONV_THEME))
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
48 #define PIDGIN_IS_CONV_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PIDGIN_TYPE_CONV_THEME))
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
49 #define PIDGIN_CONV_THEME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PIDGIN_TYPE_CONV_THEME, PidginConvThemeClass))
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
50
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
51 struct _PidginConvTheme
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
52 {
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
53 PurpleTheme parent;
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
54 };
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
55
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
56 struct _PidginConvThemeClass
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
57 {
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
58 PurpleThemeClass parent_class;
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
59 };
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
60
32571
04b564092222 Add an accessor for template data. Also, fix some fallbacks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32569
diff changeset
61 typedef enum {
04b564092222 Add an accessor for template data. Also, fix some fallbacks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32569
diff changeset
62 PIDGIN_CONVERSATION_THEME_TEMPLATE_MAIN,
04b564092222 Add an accessor for template data. Also, fix some fallbacks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32569
diff changeset
63 PIDGIN_CONVERSATION_THEME_TEMPLATE_HEADER,
04b564092222 Add an accessor for template data. Also, fix some fallbacks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32569
diff changeset
64 PIDGIN_CONVERSATION_THEME_TEMPLATE_FOOTER,
04b564092222 Add an accessor for template data. Also, fix some fallbacks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32569
diff changeset
65 PIDGIN_CONVERSATION_THEME_TEMPLATE_TOPIC,
04b564092222 Add an accessor for template data. Also, fix some fallbacks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32569
diff changeset
66 PIDGIN_CONVERSATION_THEME_TEMPLATE_STATUS,
04b564092222 Add an accessor for template data. Also, fix some fallbacks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32569
diff changeset
67 PIDGIN_CONVERSATION_THEME_TEMPLATE_CONTENT,
04b564092222 Add an accessor for template data. Also, fix some fallbacks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32569
diff changeset
68 PIDGIN_CONVERSATION_THEME_TEMPLATE_INCOMING_CONTENT,
04b564092222 Add an accessor for template data. Also, fix some fallbacks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32569
diff changeset
69 PIDGIN_CONVERSATION_THEME_TEMPLATE_INCOMING_NEXT_CONTENT,
04b564092222 Add an accessor for template data. Also, fix some fallbacks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32569
diff changeset
70 PIDGIN_CONVERSATION_THEME_TEMPLATE_INCOMING_CONTEXT,
04b564092222 Add an accessor for template data. Also, fix some fallbacks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32569
diff changeset
71 PIDGIN_CONVERSATION_THEME_TEMPLATE_INCOMING_NEXT_CONTEXT,
04b564092222 Add an accessor for template data. Also, fix some fallbacks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32569
diff changeset
72 PIDGIN_CONVERSATION_THEME_TEMPLATE_OUTGOING_CONTENT,
04b564092222 Add an accessor for template data. Also, fix some fallbacks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32569
diff changeset
73 PIDGIN_CONVERSATION_THEME_TEMPLATE_OUTGOING_NEXT_CONTENT,
04b564092222 Add an accessor for template data. Also, fix some fallbacks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32569
diff changeset
74 PIDGIN_CONVERSATION_THEME_TEMPLATE_OUTGOING_CONTEXT,
32574
56dc04a81f4b Add template lookup for 'basestyle' CSS.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32573
diff changeset
75 PIDGIN_CONVERSATION_THEME_TEMPLATE_OUTGOING_NEXT_CONTEXT,
56dc04a81f4b Add template lookup for 'basestyle' CSS.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32573
diff changeset
76 PIDGIN_CONVERSATION_THEME_TEMPLATE_BASESTYLE_CSS
32571
04b564092222 Add an accessor for template data. Also, fix some fallbacks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32569
diff changeset
77
04b564092222 Add an accessor for template data. Also, fix some fallbacks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32569
diff changeset
78 } PidginConvThemeTemplateType;
04b564092222 Add an accessor for template data. Also, fix some fallbacks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32569
diff changeset
79
32536
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
80 /**************************************************************************/
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
81 /** @name Pidgin Conversation Theme API */
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
82 /**************************************************************************/
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
83 G_BEGIN_DECLS
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
84
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
85 /**
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
86 * GObject foo.
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
87 * @internal.
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
88 */
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
89 GType pidgin_conversation_theme_get_type(void);
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
90
32569
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
91 /**
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
92 * Get the Info.plist hash table from a conversation theme.
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
93 *
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
94 * @param theme The conversation theme
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
95 *
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
96 * @return The hash table. Keys are strings as outlined for message styles,
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
97 * values are GValue*s. This is an internal structure. Take a ref if
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
98 * necessary, but don't destroy it yourself.
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
99 */
32545
1b21192ab58a Move conversation theme loading into the PidginConvThemeLoader GObject
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32544
diff changeset
100 const GHashTable *pidgin_conversation_theme_get_info(const PidginConvTheme *theme);
32569
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
101
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
102 /**
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
103 * Set the Info.plist hash table for a conversation theme.
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
104 *
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
105 * @param theme The conversation theme
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
106 * @param info The new hash table. The theme will take ownership of this hash
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
107 * table. Do not use it yourself afterwards with holding a ref.
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
108 * For key and value specifications, @see pidgin_conversation_theme_get_info.
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
109 *
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
110 */
32545
1b21192ab58a Move conversation theme loading into the PidginConvThemeLoader GObject
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32544
diff changeset
111 void pidgin_conversation_theme_set_info(PidginConvTheme *theme, GHashTable *info);
1b21192ab58a Move conversation theme loading into the PidginConvThemeLoader GObject
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32544
diff changeset
112
32572
c61acbf96b7c Document things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32571
diff changeset
113 /**
32573
83bf257530d0 Add a function for lookup of Info.plist entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32572
diff changeset
114 * Lookup a key in a theme
83bf257530d0 Add a function for lookup of Info.plist entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32572
diff changeset
115 *
83bf257530d0 Add a function for lookup of Info.plist entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32572
diff changeset
116 * @param theme The conversation theme
83bf257530d0 Add a function for lookup of Info.plist entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32572
diff changeset
117 * @param key The key to find
83bf257530d0 Add a function for lookup of Info.plist entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32572
diff changeset
118 * @param specific Whether to search variant-specific keys
83bf257530d0 Add a function for lookup of Info.plist entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32572
diff changeset
119 *
83bf257530d0 Add a function for lookup of Info.plist entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32572
diff changeset
120 * @return The key information. If @a specific is @c TRUE, then keys are first
83bf257530d0 Add a function for lookup of Info.plist entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32572
diff changeset
121 * searched by variant, then by general ones. Otherwise, only general
83bf257530d0 Add a function for lookup of Info.plist entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32572
diff changeset
122 * key values are returned.
83bf257530d0 Add a function for lookup of Info.plist entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32572
diff changeset
123 */
83bf257530d0 Add a function for lookup of Info.plist entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32572
diff changeset
124 const GValue *pidgin_conversation_theme_lookup(PidginConvTheme *theme, const char *key, gboolean specific);
83bf257530d0 Add a function for lookup of Info.plist entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32572
diff changeset
125
83bf257530d0 Add a function for lookup of Info.plist entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32572
diff changeset
126 /**
32572
c61acbf96b7c Document things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32571
diff changeset
127 * Get the template data from a conversation theme.
c61acbf96b7c Document things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32571
diff changeset
128 *
c61acbf96b7c Document things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32571
diff changeset
129 * @param theme The conversation theme
c61acbf96b7c Document things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32571
diff changeset
130 * @param type The type of template data
c61acbf96b7c Document things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32571
diff changeset
131 *
c61acbf96b7c Document things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32571
diff changeset
132 * @return The template data requested. Fallback is made as required by styles.
c61acbf96b7c Document things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32571
diff changeset
133 * Subsequent calls to this function will return cached values.
c61acbf96b7c Document things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32571
diff changeset
134 */
32571
04b564092222 Add an accessor for template data. Also, fix some fallbacks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32569
diff changeset
135 const char *pidgin_conversation_theme_get_template(PidginConvTheme *theme, PidginConvThemeTemplateType type);
04b564092222 Add an accessor for template data. Also, fix some fallbacks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32569
diff changeset
136
32569
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
137 /**
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
138 * Add an available variant name to a conversation theme.
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
139 *
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
140 * @param theme The conversation theme
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
141 * @param variant The name of the variant
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
142 *
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
143 * @Note The conversation theme will take ownership of the variant name string.
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
144 * This function should normally only be called by the theme loader.
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
145 */
32564
b711e92242da Fix a leak. pidgin_conversation_theme_add_variant should only be
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32562
diff changeset
146 void pidgin_conversation_theme_add_variant(PidginConvTheme *theme, char *variant);
32569
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
147
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
148 /**
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
149 * Get the currently set variant name for a conversation theme.
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
150 *
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
151 * @param theme The conversation theme
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
152 *
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
153 * @return The current variant name.
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
154 */
32562
9c094ffe9333 Load the list of variants when building the theme.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32545
diff changeset
155 const char *pidgin_conversation_theme_get_variant(PidginConvTheme *theme);
32569
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
156
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
157 /**
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
158 * Set the variant name for a conversation theme.
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
159 *
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
160 * @param theme The conversation theme
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
161 * @param variant The name of the variant
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
162 *
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
163 */
32562
9c094ffe9333 Load the list of variants when building the theme.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32545
diff changeset
164 void pidgin_conversation_theme_set_variant(PidginConvTheme *theme, const char *variant);
32569
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
165
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
166 /**
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
167 * Get a list of available variants for a conversation theme.
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
168 *
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
169 * @param theme The conversation theme
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
170 *
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
171 * @return The list of variants. This GList and the string data are owned by
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
172 * the theme and should not be freed by the caller.
4d13cf881984 Add documentation for conversation themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32567
diff changeset
173 */
32562
9c094ffe9333 Load the list of variants when building the theme.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32545
diff changeset
174 const GList *pidgin_conversation_theme_get_variants(PidginConvTheme *theme);
9c094ffe9333 Load the list of variants when building the theme.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32545
diff changeset
175
32575
eb4fc932fae9 Apply conversation theme when opening the GTK conversation. All the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32574
diff changeset
176 /**
eb4fc932fae9 Apply conversation theme when opening the GTK conversation. All the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32574
diff changeset
177 * Get the path to the template HTML file.
eb4fc932fae9 Apply conversation theme when opening the GTK conversation. All the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32574
diff changeset
178 *
eb4fc932fae9 Apply conversation theme when opening the GTK conversation. All the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32574
diff changeset
179 * @param theme The conversation theme
eb4fc932fae9 Apply conversation theme when opening the GTK conversation. All the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32574
diff changeset
180 *
eb4fc932fae9 Apply conversation theme when opening the GTK conversation. All the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32574
diff changeset
181 * @return The path to the HTML file.
eb4fc932fae9 Apply conversation theme when opening the GTK conversation. All the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32574
diff changeset
182 */
eb4fc932fae9 Apply conversation theme when opening the GTK conversation. All the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32574
diff changeset
183 char *pidgin_conversation_theme_get_template_path(PidginConvTheme *theme);
32540
1e50f90abb9b Attempt to move the message style object from the plugin into the new
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32536
diff changeset
184
32575
eb4fc932fae9 Apply conversation theme when opening the GTK conversation. All the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32574
diff changeset
185 /**
eb4fc932fae9 Apply conversation theme when opening the GTK conversation. All the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32574
diff changeset
186 * Get the path to the current variant CSS file.
eb4fc932fae9 Apply conversation theme when opening the GTK conversation. All the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32574
diff changeset
187 *
eb4fc932fae9 Apply conversation theme when opening the GTK conversation. All the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32574
diff changeset
188 * @param theme The conversation theme
eb4fc932fae9 Apply conversation theme when opening the GTK conversation. All the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32574
diff changeset
189 *
eb4fc932fae9 Apply conversation theme when opening the GTK conversation. All the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32574
diff changeset
190 * @return The path to the CSS file.
eb4fc932fae9 Apply conversation theme when opening the GTK conversation. All the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32574
diff changeset
191 */
eb4fc932fae9 Apply conversation theme when opening the GTK conversation. All the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32574
diff changeset
192 char *pidgin_conversation_theme_get_css_path(PidginConvTheme *theme);
32544
4cf095ee82e3 Copy theme-to-conversation loading stuff into the GObject code.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32540
diff changeset
193
33384
215f0b668ac6 now loads the SenderColors.txt file from the theme if it exists, otherwise falls back to the built-in runtime-generated list
Nathan Walp <nwalp@pidgin.im>
parents: 32575
diff changeset
194 /**
215f0b668ac6 now loads the SenderColors.txt file from the theme if it exists, otherwise falls back to the built-in runtime-generated list
Nathan Walp <nwalp@pidgin.im>
parents: 32575
diff changeset
195 * Get (and reference) the array of nick colors
215f0b668ac6 now loads the SenderColors.txt file from the theme if it exists, otherwise falls back to the built-in runtime-generated list
Nathan Walp <nwalp@pidgin.im>
parents: 32575
diff changeset
196 *
215f0b668ac6 now loads the SenderColors.txt file from the theme if it exists, otherwise falls back to the built-in runtime-generated list
Nathan Walp <nwalp@pidgin.im>
parents: 32575
diff changeset
197 * @param theme The conversation theme
215f0b668ac6 now loads the SenderColors.txt file from the theme if it exists, otherwise falls back to the built-in runtime-generated list
Nathan Walp <nwalp@pidgin.im>
parents: 32575
diff changeset
198 *
215f0b668ac6 now loads the SenderColors.txt file from the theme if it exists, otherwise falls back to the built-in runtime-generated list
Nathan Walp <nwalp@pidgin.im>
parents: 32575
diff changeset
199 * @return Pointer to GArray of nick colors, or NULL if no colors in theme
215f0b668ac6 now loads the SenderColors.txt file from the theme if it exists, otherwise falls back to the built-in runtime-generated list
Nathan Walp <nwalp@pidgin.im>
parents: 32575
diff changeset
200 */
215f0b668ac6 now loads the SenderColors.txt file from the theme if it exists, otherwise falls back to the built-in runtime-generated list
Nathan Walp <nwalp@pidgin.im>
parents: 32575
diff changeset
201 GArray *pidgin_conversation_theme_get_nick_colors(PidginConvTheme *theme);
215f0b668ac6 now loads the SenderColors.txt file from the theme if it exists, otherwise falls back to the built-in runtime-generated list
Nathan Walp <nwalp@pidgin.im>
parents: 32575
diff changeset
202
32536
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
203 G_END_DECLS
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
204 #endif /* PIDGIN_CONV_THEME_H */
91b09760ab0c Add some boilerplate Conversation theme GObjects. These don't do
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
205

mercurial