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

An integer class for widgets. More...

Go to the source code of this file.

Macros

#define GP_WIDGET_CLASS_INT(widget)   ((gp_widget_class_int *)GP_WIDGET_PAYLOAD(widget))
 A macro to get a int class widget.
 
#define GP_WIDGET_CLASS_INT_PAYLOAD(widget)    ((void*)(((gp_widget_class_int *)GP_WIDGET_PAYLOAD(widget))->payload))
 A macro to get a int class widget payload.
 

Enumerations

enum  gp_widget_int_flags { GP_WIDGET_HORIZ = 0 , GP_WIDGET_VERT = 1 }
 A widget int direction. More...
 

Functions

int64_t gp_widget_int_val_get (gp_widget *self)
 Returns an integer class widget value.
 
void gp_widget_int_set (gp_widget *self, int64_t min, int64_t max, int64_t val)
 Sets an integer class widget value and limits.
 
void gp_widget_int_val_set (gp_widget *self, int64_t val)
 Sets an integer class widget value.
 
void gp_widget_int_max_set (gp_widget *self, int64_t max)
 Sets an integer class widget maximum.
 
int64_t gp_widget_int_max_get (gp_widget *self)
 Gets an integer class widget maximum.
 
void gp_widget_int_min_set (gp_widget *self, int64_t min)
 Sets an integer class widget minimum.
 
int64_t gp_widget_int_min_get (gp_widget *self)
 Gets an integer class widget minimum.
 
void gp_widget_int_set_range (gp_widget *self, int64_t min, int64_t max)
 Sets an integer class widget limits.
 

Detailed Description

An integer class for widgets.

Integer class implements common function to get/set value and limits for integer type widget.

Definition in file gp_widget_class_int.h.

Macro Definition Documentation

◆ GP_WIDGET_CLASS_INT

#define GP_WIDGET_CLASS_INT (   widget)    ((gp_widget_class_int *)GP_WIDGET_PAYLOAD(widget))

A macro to get a int 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 48 of file gp_widget_class_int.h.

◆ GP_WIDGET_CLASS_INT_PAYLOAD

#define GP_WIDGET_CLASS_INT_PAYLOAD (   widget)     ((void*)(((gp_widget_class_int *)GP_WIDGET_PAYLOAD(widget))->payload))

A macro to get a int 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 57 of file gp_widget_class_int.h.

Enumeration Type Documentation

◆ gp_widget_int_flags

A widget int direction.

Enumerator
GP_WIDGET_HORIZ 

Widget is horizontal.

GP_WIDGET_VERT 

Widget is vertical.

Definition at line 23 of file gp_widget_class_int.h.

Function Documentation

◆ gp_widget_int_max_get()

int64_t gp_widget_int_max_get ( gp_widget self)

Gets an integer class widget maximum.

Parameters
selfAn integer class widget.
Returns
An integer class widget maximum.

◆ gp_widget_int_max_set()

void gp_widget_int_max_set ( gp_widget self,
int64_t  max 
)

Sets an integer class widget maximum.

Parameters
selfAn integer class widget.
maxNew integer class widget maximum.

◆ gp_widget_int_min_get()

int64_t gp_widget_int_min_get ( gp_widget self)

Gets an integer class widget minimum.

Parameters
selfAn integer class widget.
Returns
An integer class widget minimun.

◆ gp_widget_int_min_set()

void gp_widget_int_min_set ( gp_widget self,
int64_t  min 
)

Sets an integer class widget minimum.

Parameters
selfAn integer class widget.
minNew integer class widget minimum.

◆ gp_widget_int_set()

void gp_widget_int_set ( gp_widget self,
int64_t  min,
int64_t  max,
int64_t  val 
)

Sets an integer class widget value and limits.

Parameters
selfAn integer class widget.
minNew integer class widget minimum.
maxNew integer class widget maximum.
valNew integer class widget value.

◆ gp_widget_int_set_range()

void gp_widget_int_set_range ( gp_widget self,
int64_t  min,
int64_t  max 
)

Sets an integer class widget limits.

Parameters
selfAn integer class widget.
minNew integer class widget minimum.
maxNew integer class widget maximum.

◆ gp_widget_int_val_get()

int64_t gp_widget_int_val_get ( gp_widget self)

Returns an integer class widget value.

Parameters
selfAn integer class widget.
Returns
An integer class widget value.

◆ gp_widget_int_val_set()

void gp_widget_int_val_set ( gp_widget self,
int64_t  val 
)

Sets an integer class widget value.

Parameters
selfAn integer class widget.
valNew integer class widget value.