diff options
| author | Simon Tatham <anakin@pobox.com> | 2006-12-09 18:03:18 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2006-12-09 18:03:18 +0000 |
| commit | 54b3f1e9c08c91e07a87cf57282490a546b93a44 (patch) | |
| tree | 04045be5dd476156846a93cc6ea95d342bf04fd2 /winhelp.h | |
| parent | 937f5354c40e29a59bc725f101416d1f6f8f6987 (diff) | |
| download | halibut-54b3f1e9c08c91e07a87cf57282490a546b93a44.zip halibut-54b3f1e9c08c91e07a87cf57282490a546b93a44.tar.gz halibut-54b3f1e9c08c91e07a87cf57282490a546b93a44.tar.bz2 halibut-54b3f1e9c08c91e07a87cf57282490a546b93a44.tar.xz | |
Support, in the winhelp module only, for adding pictures to .HLP
files. Halibut does not make use of this feature, but I hope that
one day it might.
[originally from svn r6980]
Diffstat (limited to 'winhelp.h')
| -rw-r--r-- | winhelp.h | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -166,3 +166,33 @@ void whlp_text(WHLP h, char *text); void whlp_start_hyperlink(WHLP h, WHLP_TOPIC target); void whlp_end_hyperlink(WHLP h); void whlp_tab(WHLP h); + +/* + * Routines to add images to a help file. + * + * First call whlp_add_picture() to load some actual image data + * into a help file. This will return a numeric index which + * identifies the picture. Then you can call whlp_ref_picture() to + * indicate that that picture should be displayed inline in the + * current paragraph (i.e. it occurs between a call to + * whlp_begin_para() and whlp_end_para()). + */ + +/* + * The parameters to this function are: + * + * - wd and ht give the width and height of the image in pixels. + * - picdata is a pointer to the actual bitmap data. This _must_ + * be formatted as one byte per pixel, with each byte being an + * index into the `palette' array. Ordering is the normal one + * (top to bottom, left to right), not the Windows BMP one. + * - palettelen is an array of up to 256 unsigned longs. Each + * unsigned long represents an RGB value, in the form + * 0x00RRGGBB. Thus 0x00FF0000 is red, 0x00FF00 is green, + * 0x000000FF is blue, 0x00FFFFFF is white, zero is black, and + * so on. You may supply fewer than 256 entries if the image + * data does not refer to all possible values. + */ +int whlp_add_picture(WHLP h, int wd, int ht, const void *picdata, + const unsigned long *palette); +void whlp_ref_picture(WHLP h, int index); |