GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
Macros | Functions
gp_widget_class_bool.h File Reference

A bollean widget class. More...

Go to the source code of this file.

Macros

#define GP_WIDGET_CLASS_BOOL(widget)   ((gp_widget_class_bool *)GP_WIDGET_PAYLOAD(widget))
 A macro to get a bool class widget.
 
#define GP_WIDGET_CLASS_BOOL_PAYLOAD(widget)    ((void*)(((gp_widget_class_bool *)GP_WIDGET_PAYLOAD(widget))->payload))
 A macro to get a bool class widget payload.
 

Functions

bool gp_widget_bool_get (gp_widget *self)
 Returns a class bool widget value.
 
void gp_widget_bool_set (gp_widget *self, bool val)
 Sets a class bool widget value.
 
static void gp_widget_bool_toggle (gp_widget *self)
 Toggles a class bool widget value.
 

Detailed Description

A bollean widget class.

Functions to change the value of a boolean class widget.

Definition in file gp_widget_class_bool.h.

Macro Definition Documentation

◆ GP_WIDGET_CLASS_BOOL

#define GP_WIDGET_CLASS_BOOL (   widget)    ((gp_widget_class_bool *)GP_WIDGET_PAYLOAD(widget))

A macro to get a bool class widget.

Warning
This is internal API do not use in applications!
The caller must make sure that the widget is bool class!

Definition at line 33 of file gp_widget_class_bool.h.

◆ GP_WIDGET_CLASS_BOOL_PAYLOAD

#define GP_WIDGET_CLASS_BOOL_PAYLOAD (   widget)     ((void*)(((gp_widget_class_bool *)GP_WIDGET_PAYLOAD(widget))->payload))

A macro to get a bool class widget payload.

Warning
This is internal API do not use in applications!
The caller must make sure that the widget is bool class!

Definition at line 42 of file gp_widget_class_bool.h.

Function Documentation

◆ gp_widget_bool_get()

bool gp_widget_bool_get ( gp_widget self)

Returns a class bool widget value.

Parameters
selfA bool class widget.
Returns
A boolean value.

Referenced by gp_widget_bool_toggle().

◆ gp_widget_bool_set()

void gp_widget_bool_set ( gp_widget self,
bool  val 
)

Sets a class bool widget value.

Parameters
selfA bool class widget.
valA boolean value.

Referenced by gp_widget_bool_toggle().

◆ gp_widget_bool_toggle()

static void gp_widget_bool_toggle ( gp_widget self)
inlinestatic

Toggles a class bool widget value.

Parameters
selfA bool class widget.

Definition at line 66 of file gp_widget_class_bool.h.

References gp_widget_bool_get(), and gp_widget_bool_set().