26#define NSGIF_INFINITE (0xFFFFFFFFU)
29#define NSGIF_MAX_COLOURS 256
nsgif_bitmap_fmt
NSGIF nsgif_bitmap_t pixel format.
@ NSGIF_BITMAP_FMT_A8B8G8R8
Bite-wise ABGR: Byte order: 0xAA, 0xBB, 0xGG, 0xRR.
@ NSGIF_BITMAP_FMT_R8G8B8A8
Bite-wise RGBA: Byte order: 0xRR, 0xGG, 0xBB, 0xAA.
@ NSGIF_BITMAP_FMT_ARGB8888
32-bit ARGB (0xAARRGGBB).
@ NSGIF_BITMAP_FMT_RGBA8888
32-bit RGBA (0xRRGGBBAA).
@ NSGIF_BITMAP_FMT_B8G8R8A8
Bite-wise BGRA: Byte order: 0xBB, 0xGG, 0xRR, 0xAA.
@ NSGIF_BITMAP_FMT_ABGR8888
32-bit BGRA (0xAABBGGRR).
@ NSGIF_BITMAP_FMT_BGRA8888
32-bit BGRA (0xBBGGRRAA).
@ NSGIF_BITMAP_FMT_A8R8G8B8
Bite-wise ARGB: Byte order: 0xAA, 0xRR, 0xGG, 0xBB.
void nsgif_set_frame_delay_behaviour(nsgif_t *gif, fl::u16 delay_min, fl::u16 delay_default) FL_NOEXCEPT
Configure handling of small frame delays.
nsgif_error
LibNSGIF return codes.
@ NSGIF_ERR_DATA_COMPLETE
Can't supply more data after calling nsgif_data_complete.
@ NSGIF_ERR_OOM
Out of memory error.
@ NSGIF_ERR_BAD_FRAME
Frame number is not valid.
@ NSGIF_ERR_END_OF_DATA
Unexpected end of GIF source data.
@ NSGIF_ERR_ANIMATION_END
Indicates an animation is complete, and nsgif_reset must be called to restart the animation from the ...
@ NSGIF_ERR_DATA_FRAME
GIF source data contained an error in a frame.
@ NSGIF_ERR_DATA
GIF source data is invalid, and no frames are recoverable.
@ NSGIF_ERR_FRAME_DISPLAY
The current frame cannot be displayed.
struct fl::third_party::nsgif_rect nsgif_rect_t
LibNSGIF rectangle structure.
struct fl::third_party::nsgif_frame_info nsgif_frame_info_t
Information about a GIF frame.
nsgif_error nsgif_frame_prepare(nsgif_t *gif, nsgif_rect_t *area, fl::u32 *delay_cs, fl::u32 *frame_new) FL_NOEXCEPT
Prepare to show a frame.
nsgif_error nsgif_data_scan(nsgif_t *gif, fl::size size, const fl::u8 *data) FL_NOEXCEPT
Scan the source image data.
nsgif_error nsgif_frame_decode(nsgif_t *gif, fl::u32 frame, nsgif_bitmap_t **bitmap) FL_NOEXCEPT
Decodes a GIF frame.
nsgif_disposal
Frame disposal method.
@ NSGIF_DISPOSAL_UNSPECIFIED
No disposal method specified.
@ NSGIF_DISPOSAL_NONE
Frame remains.
@ NSGIF_DISPOSAL_RESTORE_BG
Clear frame to background colour.
@ NSGIF_DISPOSAL_RESTORE_PREV
Restore previous frame.
@ NSGIF_DISPOSAL_RESTORE_QUIRK
Alias for NSGIF_DISPOSAL_RESTORE_PREV.
struct fl::third_party::nsgif_bitmap_cb_vt nsgif_bitmap_cb_vt
Bitmap callbacks function table.
nsgif_error nsgif_create(const nsgif_bitmap_cb_vt *bitmap_vt, nsgif_bitmap_fmt_t bitmap_fmt, nsgif_t **gif_out) FL_NOEXCEPT
Create the NSGIF object.
const nsgif_info_t * nsgif_get_info(const nsgif_t *gif) FL_NOEXCEPT
Get information about a GIF from an nsgif_t object.
void nsgif_data_complete(nsgif_t *gif) FL_NOEXCEPT
Tell libnsgif that all the gif data has been provided.
const char * nsgif_strerror(nsgif_error err) FL_NOEXCEPT
Convert an error code to a string.
nsgif_error nsgif_reset(nsgif_t *gif) FL_NOEXCEPT
Reset a GIF animation.
const char * nsgif_str_disposal(enum nsgif_disposal disposal) FL_NOEXCEPT
Convert a disposal method to a string.
void nsgif_bitmap_t
Client bitmap type.
void nsgif_destroy(nsgif_t *gif) FL_NOEXCEPT
Free a NSGIF object.
void nsgif_global_palette(const nsgif_t *gif, fl::u32 table[NSGIF_MAX_COLOURS], fl::size *entries) FL_NOEXCEPT
Get the global colour palette.
struct fl::third_party::nsgif_info nsgif_info_t
Information about a GIF.
const nsgif_frame_info_t * nsgif_get_frame_info(const nsgif_t *gif, fl::u32 frame) FL_NOEXCEPT
Get information about a GIF from an nsgif_t object.
struct nsgif nsgif_t
Opaque type used by LibNSGIF to represent a GIF object in memory.
bool nsgif_local_palette(const nsgif_t *gif, fl::u32 frame, fl::u32 table[NSGIF_MAX_COLOURS], fl::size *entries) FL_NOEXCEPT
Get the local colour palette for a frame.
enum fl::third_party::nsgif_bitmap_fmt nsgif_bitmap_fmt_t
NSGIF nsgif_bitmap_t pixel format.
void(* modified)(nsgif_bitmap_t *bitmap)
Bitmap modified notification.
fl::u32(* get_rowspan)(nsgif_bitmap_t *bitmap)
Get row span in pixels.
nsgif_rect_t rect
Frame's redraw rectangle.
bool transparency
whether the frame may have transparency
bool local_palette
whether the frame has a local colour table
bool(* test_opaque)(nsgif_bitmap_t *bitmap)
Tests whether a bitmap has an opaque alpha channel.
int loop_max
number of times to play animation (zero means loop forever)
bool display
whether the frame should be displayed/animated
fl::u32 background
background colour in same pixel format as nsgif_bitmap_t.
void(* destroy)(nsgif_bitmap_t *bitmap)
Callback to free a bitmap.
fl::u32 frame_count
number of frames decoded
fl::u32 y0
y co-ordinate of redraw rectangle, top
fl::u32 width
width of GIF (may increase during decoding)
fl::u32 height
height of GIF (may increase during decoding)
bool interlaced
whether the frame is interlaced
fl::u32 delay
delay (in cs) before animating the frame
bool global_palette
whether the GIF has a global colour table
void(* set_opaque)(nsgif_bitmap_t *bitmap, bool opaque)
Set whether a bitmap can be plotted opaque.
fl::u32 x1
x co-ordinate of redraw rectangle, right
fl::u32 y1
y co-ordinate of redraw rectangle, bottom
fl::u32 x0
x co-ordinate of redraw rectangle, left
fl::u8 disposal
Disposal method for previous frame; affects plotting.
LibNSGIF rectangle structure.
Information about a GIF frame.
Bitmap callbacks function table.
Base definition for an LED controller.
#define NSGIF_MAX_COLOURS
Maximum colour table size.