summaryrefslogtreecommitdiff
path: root/libnsbmp.h
diff options
context:
space:
mode:
authorSean Fox <dyntryx@gmail.com>2008-06-27 08:36:30 +0000
committerSean Fox <dyntryx@gmail.com>2008-06-27 08:36:30 +0000
commita6f4c9f7cc7e767bc18827d2b64baa000140a435 (patch)
treea7d7689887e4e1eabaa61d2a55d68d502318bac8 /libnsbmp.h
parent9fd4bfa74de9b617949768ab62511f943010d80e (diff)
downloadlibnsbmp-a6f4c9f7cc7e767bc18827d2b64baa000140a435.tar.gz
libnsbmp-a6f4c9f7cc7e767bc18827d2b64baa000140a435.tar.bz2
Correct ico support and added documentation; corrected handling of rgb16 encoding; bmp_data/buffer_size are now passed to bmp_analyse; several bmp functions are now defined as static
svn path=/branches/dynis/libnsbmp/; revision=4465
Diffstat (limited to 'libnsbmp.h')
-rw-r--r--libnsbmp.h34
1 files changed, 18 insertions, 16 deletions
diff --git a/libnsbmp.h b/libnsbmp.h
index fc3dc39..ac5f77b 100644
--- a/libnsbmp.h
+++ b/libnsbmp.h
@@ -87,28 +87,30 @@ typedef struct bmp_image {
int shift[4]; /** four bitwise shifts */
} bmp_image;
-struct ico_image {
- struct bmp_image bmp;
+typedef struct ico_image {
+ bmp_image bmp;
struct ico_image *next;
-};
+} ico_image;
-struct ico_collection {
- unsigned int width; /** width of largest BMP */
- unsigned int height; /** heigth of largest BMP */
+typedef struct ico_collection {
+ bmp_bitmap_callback_vt bitmap_callbacks; /**< callbacks for bitmap functions */
+ unsigned int width; /** width of largest BMP */
+ unsigned int height; /** heigth of largest BMP */
/** Internal members are listed below
*/
- unsigned char *ico_data; /** pointer to ICO data */
- unsigned int buffer_size; /** total number of bytes of ICO data available */
- struct ico_image *first;
-};
+ unsigned char *ico_data; /** pointer to ICO data */
+ unsigned int buffer_size; /** total number of bytes of ICO data available */
+ ico_image *first;
+} ico_collection;
void bmp_create(bmp_image *gif, bmp_bitmap_callback_vt *bitmap_callbacks);
-bmp_result bmp_analyse(struct bmp_image *bmp);
-bmp_result bmp_decode(struct bmp_image *bmp);
-void bmp_finalise(struct bmp_image *bmp);
+void ico_collection_create(ico_collection *ico, bmp_bitmap_callback_vt *bitmap_callbacks);
+bmp_result bmp_analyse(bmp_image *bmp, size_t size, unsigned char *data);
+bmp_result bmp_decode(bmp_image *bmp);
+void bmp_finalise(bmp_image *bmp);
-bmp_result ico_analyse(struct ico_collection *ico);
-struct bmp_image *ico_find(struct ico_collection *ico, int width, int height);
-void ico_finalise(struct ico_collection *ico);
+bmp_result ico_analyse(ico_collection *ico, size_t size, unsigned char *data);
+bmp_image *ico_find(ico_collection *ico, int width, int height);
+void ico_finalise(ico_collection *ico);
#endif