comparison libpurple/buddyicon.h @ 32819:2c6510167895 default tip

propagate from branch 'im.pidgin.pidgin.2.x.y' (head 3315c5dfbd0ad16511bdcf865e5b07c02d07df24) to branch 'im.pidgin.pidgin' (head cbd1eda6bcbf0565ae7766396bb8f6f419cb6a9a)
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sat, 02 Jun 2012 02:30:49 +0000
parents 98520ee78f12
children
comparison
equal deleted inserted replaced
32818:01ff09d4a463 32819:2c6510167895
37 #include "blist.h" 37 #include "blist.h"
38 #include "imgstore.h" 38 #include "imgstore.h"
39 #include "prpl.h" 39 #include "prpl.h"
40 #include "util.h" 40 #include "util.h"
41 41
42 #ifdef __cplusplus 42 G_BEGIN_DECLS
43 extern "C" {
44 #endif
45
46 43
47 /**************************************************************************/ 44 /**************************************************************************/
48 /** @name Buddy Icon API */ 45 /** @name Buddy Icon API */
49 /**************************************************************************/ 46 /**************************************************************************/
50 /*@{*/ 47 /*@{*/
273 * Returns a boolean indicating if a given blist node has a custom buddy icon. 270 * Returns a boolean indicating if a given blist node has a custom buddy icon.
274 * 271 *
275 * @param node The blist node. 272 * @param node The blist node.
276 * 273 *
277 * @return A boolean indicating if @a node has a custom buddy icon. 274 * @return A boolean indicating if @a node has a custom buddy icon.
278 * @since 2.5.0
279 */ 275 */
280 gboolean 276 gboolean
281 purple_buddy_icons_node_has_custom_icon(PurpleBlistNode *node); 277 purple_buddy_icons_node_has_custom_icon(PurpleBlistNode *node);
282 278
283 /** 279 /**
291 * appropriate icon. 287 * appropriate icon.
292 * 288 *
293 * @param node The node. 289 * @param node The node.
294 * 290 *
295 * @return The custom buddy icon. 291 * @return The custom buddy icon.
296 * @since 2.5.0
297 */ 292 */
298 PurpleStoredImage * 293 PurpleStoredImage *
299 purple_buddy_icons_node_find_custom_icon(PurpleBlistNode *node); 294 purple_buddy_icons_node_find_custom_icon(PurpleBlistNode *node);
300 295
301 /** 296 /**
309 * free. Use NULL to unset the icon. 304 * free. Use NULL to unset the icon.
310 * @param icon_len The length of the data in @a icon_data. 305 * @param icon_len The length of the data in @a icon_data.
311 * 306 *
312 * @return The icon that was set. The caller does NOT own a reference to this, 307 * @return The icon that was set. The caller does NOT own a reference to this,
313 * and must call purple_imgstore_ref() if it wants one. 308 * and must call purple_imgstore_ref() if it wants one.
314 * @since 2.5.0
315 */ 309 */
316 PurpleStoredImage * 310 PurpleStoredImage *
317 purple_buddy_icons_node_set_custom_icon(PurpleBlistNode *node, 311 purple_buddy_icons_node_set_custom_icon(PurpleBlistNode *node,
318 guchar *icon_data, size_t icon_len); 312 guchar *icon_data, size_t icon_len);
319 313
327 * @param filename The path to the icon to set for the blist node. Use NULL 321 * @param filename The path to the icon to set for the blist node. Use NULL
328 * to unset the custom icon. 322 * to unset the custom icon.
329 * 323 *
330 * @return The icon that was set. The caller does NOT own a reference to this, 324 * @return The icon that was set. The caller does NOT own a reference to this,
331 * and must call purple_imgstore_ref() if it wants one. 325 * and must call purple_imgstore_ref() if it wants one.
332 * @since 2.5.0
333 */ 326 */
334 PurpleStoredImage * 327 PurpleStoredImage *
335 purple_buddy_icons_node_set_custom_icon_from_file(PurpleBlistNode *node, 328 purple_buddy_icons_node_set_custom_icon_from_file(PurpleBlistNode *node,
336 const gchar *filename); 329 const gchar *filename);
337 330
338 #if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_BUDDYICON_C_)
339 /**
340 * PurpleContact version of purple_buddy_icons_node_has_custom_icon.
341 *
342 * @copydoc purple_buddy_icons_node_has_custom_icon()
343 *
344 * @deprecated Use purple_buddy_icons_node_has_custom_icon instead.
345 */
346 gboolean
347 purple_buddy_icons_has_custom_icon(PurpleContact *contact);
348
349 /**
350 * PurpleContact version of purple_buddy_icons_node_find_custom_icon.
351 *
352 * @copydoc purple_buddy_icons_node_find_custom_icon()
353 *
354 * @deprecated Use purple_buddy_icons_node_find_custom_icon instead.
355 */
356 PurpleStoredImage *
357 purple_buddy_icons_find_custom_icon(PurpleContact *contact);
358
359 /**
360 * PurpleContact version of purple_buddy_icons_node_set_custom_icon.
361 *
362 * @copydoc purple_buddy_icons_node_set_custom_icon()
363 *
364 * @deprecated Use purple_buddy_icons_node_set_custom_icon instead.
365 */
366 PurpleStoredImage *
367 purple_buddy_icons_set_custom_icon(PurpleContact *contact,
368 guchar *icon_data, size_t icon_len);
369 #endif
370
371 /** 331 /**
372 * Sets whether or not buddy icon caching is enabled. 332 * Sets whether or not buddy icon caching is enabled.
373 * 333 *
374 * @param caching TRUE of buddy icon caching should be enabled, or 334 * @param caching TRUE of buddy icon caching should be enabled, or
375 * FALSE otherwise. 335 * FALSE otherwise.
432 */ 392 */
433 void purple_buddy_icon_get_scale_size(PurpleBuddyIconSpec *spec, int *width, int *height); 393 void purple_buddy_icon_get_scale_size(PurpleBuddyIconSpec *spec, int *width, int *height);
434 394
435 /*@}*/ 395 /*@}*/
436 396
437 #ifdef __cplusplus 397 G_END_DECLS
438 }
439 #endif
440 398
441 #endif /* _PURPLE_BUDDYICON_H_ */ 399 #endif /* _PURPLE_BUDDYICON_H_ */