diff libpurple/request.h @ 29418:365b90fa23cf

This patch comes from the combined work of contributors minstrel, NightFox, bob007, salieff, and nops (these are their trac usernames). I have made some minor tweaks to the patch, but these shouldn't be a problem. This patch needs some TLC before we can merge it anywhere else; it adds API so it must hit im.pidgin.pidgin.next.minor before hitting im.pidgin.pidgin. Refs #4508.
author John Bailey <rekkanoryo@rekkanoryo.org>
date Thu, 13 Nov 2008 17:04:53 +0000
parents 6cfb6e26787f
children 2d04fb25c6db
line wrap: on
line diff
--- a/libpurple/request.h	Thu Nov 13 09:00:45 2008 +0000
+++ b/libpurple/request.h	Thu Nov 13 17:04:53 2008 +0000
@@ -147,10 +147,12 @@
 		{
 			GList *items;
 			GHashTable *item_data;
+			GList *icons;
 			GList *selected;
 			GHashTable *selected_table;
 
 			gboolean multiple_selection;
+			gboolean pixbuf;
 
 		} list;
 
@@ -877,6 +879,26 @@
 PurpleRequestField *purple_request_field_list_new(const char *id, const char *text);
 
 /**
+ * Sets whether or not a list field allows icons.
+ *
+ * @param field        The list field.
+ * @param multi_select TRUE if icons are enabled,
+ *                     or FALSE otherwise.
+ */
+void purple_request_field_list_set_pixbuf(PurpleRequestField *field,
+											  gboolean pixbuf);
+
+/**
+ * Returns whether or not a list field allows icons.
+ *
+ * @param field The list field.
+ *
+ * @return TRUE if icons are enabled, or FALSE otherwise.
+ */
+gboolean purple_request_field_list_get_pixbuf(
+	const PurpleRequestField *field);
+
+/**
  * Sets whether or not a list field allows multiple selection.
  *
  * @param field        The list field.
@@ -918,6 +940,17 @@
 								 const char *item, void *data);
 
 /**
+ * Adds an item with icon to a list field.
+ *
+ * @param field The list field.
+ * @param item  The list item.
+ * @param icon_path The path to icon file.
+ * @param data  The associated data.
+ */
+void purple_request_field_list_add_icon(PurpleRequestField *field,
+								 const char *item, const char* icon_path, void* data);
+
+/**
  * Adds a selected item to the list field.
  *
  * @param field The field.
@@ -975,6 +1008,15 @@
  */
 GList *purple_request_field_list_get_items(const PurpleRequestField *field);
 
+/**
+ * Returns a list of icons in a list field.
+ *
+ * @param field The field.
+ *
+ * @constreturn The list of icons.
+ */
+GList *purple_request_field_list_get_icons(const PurpleRequestField *field);
+
 /*@}*/
 
 /**************************************************************************/