comparison src/request.h @ 11357:f0bc5f121684

[gaim-migrate @ 13579] Image field added to the request API. committer: Tailor Script <tailor@pidgin.im>
author Bartoz Oler <bartosz@pidgin.im>
date Sun, 28 Aug 2005 22:16:17 +0000
parents 07dc8c6a359f
children b858f992b566
comparison
equal deleted inserted replaced
11356:0b746a52238d 11357:f0bc5f121684
56 GAIM_REQUEST_FIELD_INTEGER, 56 GAIM_REQUEST_FIELD_INTEGER,
57 GAIM_REQUEST_FIELD_BOOLEAN, 57 GAIM_REQUEST_FIELD_BOOLEAN,
58 GAIM_REQUEST_FIELD_CHOICE, 58 GAIM_REQUEST_FIELD_CHOICE,
59 GAIM_REQUEST_FIELD_LIST, 59 GAIM_REQUEST_FIELD_LIST,
60 GAIM_REQUEST_FIELD_LABEL, 60 GAIM_REQUEST_FIELD_LABEL,
61 GAIM_REQUEST_FIELD_IMAGE,
61 GAIM_REQUEST_FIELD_ACCOUNT 62 GAIM_REQUEST_FIELD_ACCOUNT
62 63
63 } GaimRequestFieldType; 64 } GaimRequestFieldType;
64 65
65 /** 66 /**
158 gboolean show_all; 159 gboolean show_all;
159 160
160 GaimFilterAccountFunc filter_func; 161 GaimFilterAccountFunc filter_func;
161 162
162 } account; 163 } account;
164
165 struct
166 {
167 unsigned int scale_x;
168 unsigned int scale_y;
169 const char *buffer;
170 gsize size;
171 } image;
163 172
164 } u; 173 } u;
165 174
166 void *ui_data; 175 void *ui_data;
167 176
950 const char *text); 959 const char *text);
951 960
952 /*@}*/ 961 /*@}*/
953 962
954 /**************************************************************************/ 963 /**************************************************************************/
964 /** @name Image Field API */
965 /**************************************************************************/
966 /*@{*/
967
968 /**
969 * Creates an image field.
970 *
971 * @param id The field ID.
972 * @param text The label of the field.
973 * @param path Path to the image to be displayed.
974 *
975 * @return The new field.
976 */
977 GaimRequestField *gaim_request_field_image_new(const char *id, const char *text,
978 const char *buf, gsize size);
979
980 /**
981 * Returns pointer to the image.
982 *
983 * @param field The image field.
984 *
985 * @return Pointer to the image.
986 */
987 const char *gaim_request_field_image_get_buffer(GaimRequestField *field);
988
989 /**
990 * Returns size (in bytes) of the image.
991 *
992 * @param field The image field.
993 *
994 * @return Size of the image.
995 */
996 gsize gaim_request_field_image_get_size(GaimRequestField *field);
997
998 /**
999 * Returns X scale coefficient of the image.
1000 *
1001 * @param field The image field.
1002 *
1003 * @return X scale coefficient of the image.
1004 */
1005 unsigned int gaim_request_field_image_get_scale_x(GaimRequestField *field);
1006
1007 /**
1008 * Returns Y scale coefficient of the image.
1009 *
1010 * @param field The image field.
1011 *
1012 * @return Y scale coefficient of the image.
1013 */
1014 unsigned int gaim_request_field_image_get_scale_y(GaimRequestField *field);
1015
1016 /*@}*/
1017
1018 /**************************************************************************/
955 /** @name Account Field API */ 1019 /** @name Account Field API */
956 /**************************************************************************/ 1020 /**************************************************************************/
957 /*@{*/ 1021 /*@{*/
958 1022
959 /** 1023 /**