GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
include
widgets
gp_widget_pixmap.h
Go to the documentation of this file.
1
//SPDX-License-Identifier: LGPL-2.0-or-later
2
3
/*
4
5
Copyright (c) 2014-2024 Cyril Hrubis <metan@ucw.cz>
6
7
*/
8
75
#ifndef GP_WIDGET_PIXMAP_H
76
#define GP_WIDGET_PIXMAP_H
77
78
#include <
widgets/gp_widget_size_units.h
>
79
102
gp_widget
*
gp_widget_pixmap_new
(
gp_widget_size
min_w,
gp_widget_size
min_h,
103
int
(*on_event)(
gp_widget_event
*ev),
104
void
*priv);
105
120
void
gp_widget_pixmap_redraw
(
gp_widget
*self,
121
gp_coord
x,
gp_coord
y,
122
gp_size
w,
gp_size
h);
123
131
static
inline
gp_size
gp_widget_pixmap_w
(
gp_widget
*self)
132
{
133
return
self->
w
;
134
}
135
143
static
inline
gp_size
gp_widget_pixmap_h
(
gp_widget
*self)
144
{
145
return
self->h;
146
}
147
153
void
gp_widget_pixmap_redraw_all
(
gp_widget
*self);
154
161
gp_pixmap
*
gp_widget_pixmap_get
(
gp_widget
*self);
162
181
gp_pixmap
*
gp_widget_pixmap_set
(
gp_widget
*self,
gp_pixmap
*pixmap);
182
183
#endif
/* GP_WIDGET_PIXMAP_H */
gp_coord
int gp_coord
Integer type for coordinates i.e. x, y, ...
Definition
gp_types.h:19
gp_size
unsigned int gp_size
Integer type for sizes i.e. w, h, ...
Definition
gp_types.h:24
gp_widget_pixmap_redraw_all
void gp_widget_pixmap_redraw_all(gp_widget *self)
Marks the whole pixmap to be repainted.
gp_widget_pixmap_w
static gp_size gp_widget_pixmap_w(gp_widget *self)
Returns pixmap width in pixels.
Definition
gp_widget_pixmap.h:131
gp_widget_pixmap_h
static gp_size gp_widget_pixmap_h(gp_widget *self)
Returns pixmap height in pixels.
Definition
gp_widget_pixmap.h:143
gp_widget_pixmap_set
gp_pixmap * gp_widget_pixmap_set(gp_widget *self, gp_pixmap *pixmap)
Sets new backing pixmap.
gp_widget_pixmap_get
gp_pixmap * gp_widget_pixmap_get(gp_widget *self)
Returns a pointer to the current backing pixmap.
gp_widget_pixmap_new
gp_widget * gp_widget_pixmap_new(gp_widget_size min_w, gp_widget_size min_h, int(*on_event)(gp_widget_event *ev), void *priv)
Create pixmap widget.
gp_widget_pixmap_redraw
void gp_widget_pixmap_redraw(gp_widget *self, gp_coord x, gp_coord y, gp_size w, gp_size h)
Requests partial update of the image.
gp_widget_size_units.h
A widget size units.
gp_pixmap
A pixmap buffer.
Definition
gp_pixmap.h:33
gp_widget_event
Event structure passed to widget event handler.
Definition
gp_widget_event.h:137
gp_widget_size
A compound size.
Definition
gp_widget_size_units.h:31
gp_widget
A widget base.
Definition
gp_widget.h:28
gp_widget::w
unsigned int w
Current widget size in pixels.
Definition
gp_widget.h:79
Generated by
1.9.8