| 89 GType pidgin_conversation_theme_get_type(void); |
89 GType pidgin_conversation_theme_get_type(void); |
| 90 |
90 |
| 91 /** |
91 /** |
| 92 * Get the Info.plist hash table from a conversation theme. |
92 * Get the Info.plist hash table from a conversation theme. |
| 93 * |
93 * |
| 94 * @param theme The conversation theme |
94 * @theme: The conversation theme |
| 95 * |
95 * |
| 96 * @return The hash table. Keys are strings as outlined for message styles, |
96 * Returns: The hash table. Keys are strings as outlined for message styles, |
| 97 * values are GValue*s. This is an internal structure. Take a ref if |
97 * values are GValue*s. This is an internal structure. Take a ref if |
| 98 * necessary, but don't destroy it yourself. |
98 * necessary, but don't destroy it yourself. |
| 99 */ |
99 */ |
| 100 const GHashTable *pidgin_conversation_theme_get_info(const PidginConvTheme *theme); |
100 const GHashTable *pidgin_conversation_theme_get_info(const PidginConvTheme *theme); |
| 101 |
101 |
| 102 /** |
102 /** |
| 103 * Set the Info.plist hash table for a conversation theme. |
103 * Set the Info.plist hash table for a conversation theme. |
| 104 * |
104 * |
| 105 * @param theme The conversation theme |
105 * @theme: The conversation theme |
| 106 * @param info The new hash table. The theme will take ownership of this hash |
106 * @info: The new hash table. The theme will take ownership of this hash |
| 107 * table. Do not use it yourself afterwards with holding a ref. |
107 * table. Do not use it yourself afterwards with holding a ref. |
| 108 * For key and value specifications, @see pidgin_conversation_theme_get_info. |
108 * For key and value specifications, @see pidgin_conversation_theme_get_info. |
| 109 * |
109 * |
| 110 */ |
110 */ |
| 111 void pidgin_conversation_theme_set_info(PidginConvTheme *theme, GHashTable *info); |
111 void pidgin_conversation_theme_set_info(PidginConvTheme *theme, GHashTable *info); |
| 112 |
112 |
| 113 /** |
113 /** |
| 114 * Lookup a key in a theme |
114 * Lookup a key in a theme |
| 115 * |
115 * |
| 116 * @param theme The conversation theme |
116 * @theme: The conversation theme |
| 117 * @param key The key to find |
117 * @key: The key to find |
| 118 * @param specific Whether to search variant-specific keys |
118 * @specific: Whether to search variant-specific keys |
| 119 * |
119 * |
| 120 * @return The key information. If @a specific is @c TRUE, then keys are first |
120 * Returns: The key information. If @a specific is @c TRUE, then keys are first |
| 121 * searched by variant, then by general ones. Otherwise, only general |
121 * searched by variant, then by general ones. Otherwise, only general |
| 122 * key values are returned. |
122 * key values are returned. |
| 123 */ |
123 */ |
| 124 const GValue *pidgin_conversation_theme_lookup(PidginConvTheme *theme, const char *key, gboolean specific); |
124 const GValue *pidgin_conversation_theme_lookup(PidginConvTheme *theme, const char *key, gboolean specific); |
| 125 |
125 |
| 126 /** |
126 /** |
| 127 * Get the template data from a conversation theme. |
127 * Get the template data from a conversation theme. |
| 128 * |
128 * |
| 129 * @param theme The conversation theme |
129 * @theme: The conversation theme |
| 130 * @param type The type of template data |
130 * @type: The type of template data |
| 131 * |
131 * |
| 132 * @return The template data requested. Fallback is made as required by styles. |
132 * Returns: The template data requested. Fallback is made as required by styles. |
| 133 * Subsequent calls to this function will return cached values. |
133 * Subsequent calls to this function will return cached values. |
| 134 */ |
134 */ |
| 135 const char *pidgin_conversation_theme_get_template(PidginConvTheme *theme, PidginConvThemeTemplateType type); |
135 const char *pidgin_conversation_theme_get_template(PidginConvTheme *theme, PidginConvThemeTemplateType type); |
| 136 |
136 |
| 137 /** |
137 /** |
| 138 * Add an available variant name to a conversation theme. |
138 * Add an available variant name to a conversation theme. |
| 139 * |
139 * |
| 140 * @param theme The conversation theme |
140 * @theme: The conversation theme |
| 141 * @param variant The name of the variant |
141 * @variant: The name of the variant |
| 142 * |
142 * |
| 143 * @Note The conversation theme will take ownership of the variant name string. |
143 * @Note The conversation theme will take ownership of the variant name string. |
| 144 * This function should normally only be called by the theme loader. |
144 * This function should normally only be called by the theme loader. |
| 145 */ |
145 */ |
| 146 void pidgin_conversation_theme_add_variant(PidginConvTheme *theme, char *variant); |
146 void pidgin_conversation_theme_add_variant(PidginConvTheme *theme, char *variant); |
| 147 |
147 |
| 148 /** |
148 /** |
| 149 * Get the currently set variant name for a conversation theme. |
149 * Get the currently set variant name for a conversation theme. |
| 150 * |
150 * |
| 151 * @param theme The conversation theme |
151 * @theme: The conversation theme |
| 152 * |
152 * |
| 153 * @return The current variant name. |
153 * Returns: The current variant name. |
| 154 */ |
154 */ |
| 155 const char *pidgin_conversation_theme_get_variant(PidginConvTheme *theme); |
155 const char *pidgin_conversation_theme_get_variant(PidginConvTheme *theme); |
| 156 |
156 |
| 157 /** |
157 /** |
| 158 * Set the variant name for a conversation theme. |
158 * Set the variant name for a conversation theme. |
| 159 * |
159 * |
| 160 * @param theme The conversation theme |
160 * @theme: The conversation theme |
| 161 * @param variant The name of the variant |
161 * @variant: The name of the variant |
| 162 * |
162 * |
| 163 */ |
163 */ |
| 164 void pidgin_conversation_theme_set_variant(PidginConvTheme *theme, const char *variant); |
164 void pidgin_conversation_theme_set_variant(PidginConvTheme *theme, const char *variant); |
| 165 |
165 |
| 166 /** |
166 /** |
| 167 * Get a list of available variants for a conversation theme. |
167 * Get a list of available variants for a conversation theme. |
| 168 * |
168 * |
| 169 * @param theme The conversation theme |
169 * @theme: The conversation theme |
| 170 * |
170 * |
| 171 * @return The list of variants. This GList and the string data are owned by |
171 * Returns: The list of variants. This GList and the string data are owned by |
| 172 * the theme and should not be freed by the caller. |
172 * the theme and should not be freed by the caller. |
| 173 */ |
173 */ |
| 174 const GList *pidgin_conversation_theme_get_variants(PidginConvTheme *theme); |
174 const GList *pidgin_conversation_theme_get_variants(PidginConvTheme *theme); |
| 175 |
175 |
| 176 /** |
176 /** |
| 177 * Get the path to the template HTML file. |
177 * Get the path to the template HTML file. |
| 178 * |
178 * |
| 179 * @param theme The conversation theme |
179 * @theme: The conversation theme |
| 180 * |
180 * |
| 181 * @return The path to the HTML file. |
181 * Returns: The path to the HTML file. |
| 182 */ |
182 */ |
| 183 char *pidgin_conversation_theme_get_template_path(PidginConvTheme *theme); |
183 char *pidgin_conversation_theme_get_template_path(PidginConvTheme *theme); |
| 184 |
184 |
| 185 /** |
185 /** |
| 186 * Get the path to the current variant CSS file. |
186 * Get the path to the current variant CSS file. |
| 187 * |
187 * |
| 188 * @param theme The conversation theme |
188 * @theme: The conversation theme |
| 189 * |
189 * |
| 190 * @return The path to the CSS file. |
190 * Returns: The path to the CSS file. |
| 191 */ |
191 */ |
| 192 char *pidgin_conversation_theme_get_css_path(PidginConvTheme *theme); |
192 char *pidgin_conversation_theme_get_css_path(PidginConvTheme *theme); |
| 193 |
193 |
| 194 /** |
194 /** |
| 195 * Get (and reference) the array of nick colors |
195 * Get (and reference) the array of nick colors |
| 196 * |
196 * |
| 197 * @param theme The conversation theme |
197 * @theme: The conversation theme |
| 198 * |
198 * |
| 199 * @return Pointer to GArray of nick colors, or NULL if no colors in theme |
199 * Returns: Pointer to GArray of nick colors, or NULL if no colors in theme |
| 200 */ |
200 */ |
| 201 GArray *pidgin_conversation_theme_get_nick_colors(PidginConvTheme *theme); |
201 GArray *pidgin_conversation_theme_get_nick_colors(PidginConvTheme *theme); |
| 202 |
202 |
| 203 G_END_DECLS |
203 G_END_DECLS |
| 204 #endif /* PIDGIN_CONV_THEME_H */ |
204 #endif /* PIDGIN_CONV_THEME_H */ |