comparison libpurple/request.h @ 29457:5391094529c6

propagate from branch 'im.pidgin.pidgin' (head a59a573e3b9b2eb42ff728ba9ff56095f5c9e0d0) to branch 'im.pidgin.cpw.rekkanoryo.icqxstatus' (head b2dd657b5f76abb4285d229516102653fd4616eb)
author Richard Laager <rlaager@wiktel.com>
date Mon, 06 Apr 2009 05:19:40 +0000
parents d25cbbea7fe5 cc1e35fa774d
children a0fb6798d87c
comparison
equal deleted inserted replaced
26445:f630747a813d 29457:5391094529c6
148 } choice; 148 } choice;
149 149
150 struct 150 struct
151 { 151 {
152 GList *items; 152 GList *items;
153 GList *icons;
153 GHashTable *item_data; 154 GHashTable *item_data;
154 GList *selected; 155 GList *selected;
155 GHashTable *selected_table; 156 GHashTable *selected_table;
156 157
157 gboolean multiple_selection; 158 gboolean multiple_selection;
945 * @return The data associated with the item. 946 * @return The data associated with the item.
946 */ 947 */
947 void *purple_request_field_list_get_data(const PurpleRequestField *field, 948 void *purple_request_field_list_get_data(const PurpleRequestField *field,
948 const char *text); 949 const char *text);
949 950
951 #if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_REQUEST_C_)
950 /** 952 /**
951 * Adds an item to a list field. 953 * Adds an item to a list field.
952 * 954 *
953 * @param field The list field. 955 * @param field The list field.
954 * @param item The list item. 956 * @param item The list item.
955 * @param data The associated data. 957 * @param data The associated data.
958 *
959 * @deprecated Use purple_request_field_list_add_icon() instead.
956 */ 960 */
957 void purple_request_field_list_add(PurpleRequestField *field, 961 void purple_request_field_list_add(PurpleRequestField *field,
958 const char *item, void *data); 962 const char *item, void *data);
963 #endif
964
965 /**
966 * Adds an item to a list field.
967 *
968 * @param field The list field.
969 * @param item The list item.
970 * @param icon_path The path to icon file, or @c NULL for no icon.
971 * @param data The associated data.
972 */
973 void purple_request_field_list_add_icon(PurpleRequestField *field,
974 const char *item, const char* icon_path, void* data);
959 975
960 /** 976 /**
961 * Adds a selected item to the list field. 977 * Adds a selected item to the list field.
962 * 978 *
963 * @param field The field. 979 * @param field The field.
1012 * @param field The field. 1028 * @param field The field.
1013 * 1029 *
1014 * @constreturn The list of items. 1030 * @constreturn The list of items.
1015 */ 1031 */
1016 GList *purple_request_field_list_get_items(const PurpleRequestField *field); 1032 GList *purple_request_field_list_get_items(const PurpleRequestField *field);
1033
1034 /**
1035 * Returns a list of icons in a list field.
1036 *
1037 * The icons will correspond with the items, in order.
1038 *
1039 * @param field The field.
1040 *
1041 * @constreturn The list of icons or @c NULL (i.e. the empty GList) if no
1042 * items have icons.
1043 */
1044 GList *purple_request_field_list_get_icons(const PurpleRequestField *field);
1017 1045
1018 /*@}*/ 1046 /*@}*/
1019 1047
1020 /**************************************************************************/ 1048 /**************************************************************************/
1021 /** @name Label Field API */ 1049 /** @name Label Field API */