XenevaOS
Loading...
Searching...
No Matches
Public Attributes | List of all members
nsgif_bitmap_cb_vt Struct Reference

#include <nsgif.h>

Public Attributes

nsgif_bitmap_t *(* create )(int width, int height)
 
void(* destroy )(nsgif_bitmap_t *bitmap)
 
uint8_t *(* get_buffer )(nsgif_bitmap_t *bitmap)
 
void(* set_opaque )(nsgif_bitmap_t *bitmap, bool opaque)
 
bool(* test_opaque )(nsgif_bitmap_t *bitmap)
 
void(* modified )(nsgif_bitmap_t *bitmap)
 
uint32_t(* get_rowspan )(nsgif_bitmap_t *bitmap)
 

Detailed Description

Bitmap callbacks function table

Member Data Documentation

◆ create

nsgif_bitmap_t *(* nsgif_bitmap_cb_vt::create) (int width, int height)

Callback to create a bitmap with the given dimensions.

Parameters
[in]widthRequired bitmap width in pixels.
[in]heightRequired bitmap height in pixels.
Returns
pointer to client's bitmap structure or NULL on error.

◆ destroy

void(* nsgif_bitmap_cb_vt::destroy) (nsgif_bitmap_t *bitmap)

Callback to free a bitmap.

Parameters
[in]bitmapThe bitmap to destroy.

◆ get_buffer

uint8_t *(* nsgif_bitmap_cb_vt::get_buffer) (nsgif_bitmap_t *bitmap)

Get pointer to pixel buffer in a bitmap.

The pixel buffer must be (width + N) * height * sizeof(uint32_t). Where N is any number greater than or equal to 0. Note that the returned pointer to uint8_t must be 4-byte aligned.

Parameters
[in]bitmapThe bitmap.
Returns
pointer to bitmap's pixel buffer.

◆ get_rowspan

uint32_t(* nsgif_bitmap_cb_vt::get_rowspan) (nsgif_bitmap_t *bitmap)

Get row span in pixels.

If this callback is not provided, LibNSGIF will use the width.

If row span is greater than width, this callback must be provided.

Parameters
[in]bitmapThe bitmap.

◆ modified

void(* nsgif_bitmap_cb_vt::modified) (nsgif_bitmap_t *bitmap)

Bitmap modified notification.

Parameters
[in]bitmapThe bitmap.

◆ set_opaque

void(* nsgif_bitmap_cb_vt::set_opaque) (nsgif_bitmap_t *bitmap, bool opaque)

Set whether a bitmap can be plotted opaque.

Parameters
[in]bitmapThe bitmap.
[in]opaqueWhether the current frame is opaque.

◆ test_opaque

bool(* nsgif_bitmap_cb_vt::test_opaque) (nsgif_bitmap_t *bitmap)

Tests whether a bitmap has an opaque alpha channel.

Parameters
[in]bitmapThe bitmap.
Returns
true if the bitmap is opaque, false otherwise.

The documentation for this struct was generated from the following file: