GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
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
79
103 int (*on_event)(gp_widget_event *ev),
104 void *priv);
105
121 gp_coord x, gp_coord y,
122 gp_size w, gp_size h);
123
132{
133 return self->w;
134}
135
144{
145 return self->h;
146}
147
154
162
182
183#endif /* GP_WIDGET_PIXMAP_H */
int gp_coord
Integer type for coordinates i.e. x, y, ...
Definition gp_types.h:19
unsigned int gp_size
Integer type for sizes i.e. w, h, ...
Definition gp_types.h:24
void gp_widget_pixmap_redraw_all(gp_widget *self)
Marks the whole pixmap to be repainted.
static gp_size gp_widget_pixmap_w(gp_widget *self)
Returns pixmap width in pixels.
static gp_size gp_widget_pixmap_h(gp_widget *self)
Returns pixmap height in pixels.
gp_pixmap * gp_widget_pixmap_set(gp_widget *self, gp_pixmap *pixmap)
Sets new backing pixmap.
gp_pixmap * gp_widget_pixmap_get(gp_widget *self)
Returns a pointer to the current backing pixmap.
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.
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.
A widget size units.
A pixmap buffer.
Definition gp_pixmap.h:33
Event structure passed to widget event handler.
A compound size.
A widget base.
Definition gp_widget.h:28
unsigned int w
Current widget size in pixels.
Definition gp_widget.h:79