| 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 */ |