Mercurial > pidgin.yaz
comparison libpurple/imgstore.h @ 22606:76af23621e19
Better documentation.
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 03 Apr 2008 23:51:19 +0000 |
parents | 5a85bded9ae8 |
children | 2f4b10ee752b |
comparison
equal
deleted
inserted
replaced
22605:93c40e412b54 | 22606:76af23621e19 |
---|---|
49 * | 49 * |
50 * @param data Pointer to the image data, which the imgstore will take | 50 * @param data Pointer to the image data, which the imgstore will take |
51 * ownership of and free as appropriate. If you want a | 51 * ownership of and free as appropriate. If you want a |
52 * copy of the data, make it before calling this function. | 52 * copy of the data, make it before calling this function. |
53 * @param size Image data's size. | 53 * @param size Image data's size. |
54 * @param filename Filename associated with image. | 54 * @param filename Filename associated with image. This is for your |
55 * convenience. It could be the full path to the | |
56 * image or, more commonly, the filename of the image | |
57 * without any directory information. It can also be | |
58 * NULL, if you don't need to keep track of a filename. | |
55 * | 59 * |
56 * @return The stored image. | 60 * @return The stored image. |
57 */ | 61 */ |
58 PurpleStoredImage * | 62 PurpleStoredImage * |
59 purple_imgstore_add(gpointer data, size_t size, const char *filename); | 63 purple_imgstore_add(gpointer data, size_t size, const char *filename); |
67 * | 71 * |
68 * @param data Pointer to the image data, which the imgstore will take | 72 * @param data Pointer to the image data, which the imgstore will take |
69 * ownership of and free as appropriate. If you want a | 73 * ownership of and free as appropriate. If you want a |
70 * copy of the data, make it before calling this function. | 74 * copy of the data, make it before calling this function. |
71 * @param size Image data's size. | 75 * @param size Image data's size. |
72 * @param filename Filename associated with image. | 76 * @param filename Filename associated with image. This is for your |
73 | 77 * convenience. It could be the full path to the |
74 * @return ID for the image. | 78 * image or, more commonly, the filename of the image |
79 * without any directory information. It can also be | |
80 * NULL, if you don't need to keep track of a filename. | |
81 | |
82 * @return ID for the image. This is a unique number that can be used | |
83 * within libpurple to reference the image. | |
75 */ | 84 */ |
76 int purple_imgstore_add_with_id(gpointer data, size_t size, const char *filename); | 85 int purple_imgstore_add_with_id(gpointer data, size_t size, const char *filename); |
77 | 86 |
78 /** | 87 /** |
79 * Retrieve an image from the store. The caller does not own a | 88 * Retrieve an image from the store. The caller does not own a |
114 * be freed or modified. | 123 * be freed or modified. |
115 */ | 124 */ |
116 const char *purple_imgstore_get_filename(const PurpleStoredImage *img); | 125 const char *purple_imgstore_get_filename(const PurpleStoredImage *img); |
117 | 126 |
118 /** | 127 /** |
119 * Returns an extension corresponding to the image's file type. | 128 * Looks at the magic numbers of the image data (the first few bytes) |
129 * and returns an extension corresponding to the image's file type. | |
120 * | 130 * |
121 * @param img The image. | 131 * @param img The image. |
122 * | 132 * |
123 * @return The icon's extension or "icon" if unknown. | 133 * @return The image's extension (for example "png") or "icon" |
134 * if unknown. | |
124 */ | 135 */ |
125 const char *purple_imgstore_get_extension(PurpleStoredImage *img); | 136 const char *purple_imgstore_get_extension(PurpleStoredImage *img); |
126 | 137 |
127 /** | 138 /** |
128 * Increment the reference count. | 139 * Increment the reference count. |