GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
gp_widget_stock.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
22#ifndef GP_WIDGET_STOCK_H
23#define GP_WIDGET_STOCK_H
24
26
112
118#define GP_WIDGET_STOCK_TYPE(type) ((type) & GP_WIDGET_STOCK_TYPE_MASK)
119
120struct gp_widget_stock {
121 enum gp_widget_stock_type type;
122 gp_widget_size min_size;
123};
124
138 gp_coord x, gp_coord y, gp_size w, gp_size h,
139 gp_pixel bg_col, const gp_widget_render_ctx *ctx);
140
150
158
159#endif /* GP_WIDGET_STOCK_H */
uint32_t gp_pixel
Pixel integer value.
Definition gp_types.h:33
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
A widget size units.
void gp_widget_stock_type_set(gp_widget *self, enum gp_widget_stock_type type)
Changes stock image type.
gp_widget * gp_widget_stock_new(enum gp_widget_stock_type type, gp_widget_size min_size)
Create a stock widget.
gp_widget_stock_type
Stock image type.
@ GP_WIDGET_STOCK_SAVE
A save icon.
@ GP_WIDGET_STOCK_ZOOM
A zoom icon.
@ GP_WIDGET_STOCK_SETTINGS
A settings icon.
@ GP_WIDGET_STOCK_DAY
A day icon, a sun.
@ GP_WIDGET_STOCK_SOFTWARE
A software icon.
@ GP_WIDGET_STOCK_NEW_DIR
A new directory icon.
@ GP_WIDGET_STOCK_SHUFFLE_ON
A shuffle on icon.
@ GP_WIDGET_STOCK_DIR
A directory icon.
@ GP_WIDGET_STOCK_ROTATE_CCW
Arrow rotate counter clock wise.
@ GP_WIDGET_STOCK_CLOSE
A close icon.
@ GP_WIDGET_STOCK_SPEAKER_MUTE
Muted speaker.
@ GP_WIDGET_STOCK_FILE
A file icon.
@ GP_WIDGET_STOCK_TYPE_MASK
A type mask.
@ GP_WIDGET_STOCK_ZOOM_FIT
A zoom fit icon.
@ GP_WIDGET_STOCK_ROTATE_CW
Arrow rotate clock wise.
@ GP_WIDGET_STOCK_INFO
Info message.
@ GP_WIDGET_STOCK_SPEAKER_MIN
Speaker at minimal volume.
@ GP_WIDGET_STOCK_FOCUSED
A stock focused flag, combined bitwise with type.
@ GP_WIDGET_STOCK_SPEAKER_MID
Speaker at middle volume.
@ GP_WIDGET_STOCK_QUESTION
Warning message.
@ GP_WIDGET_STOCK_SPEAKER_MAX
Speaker at maximal volume.
@ GP_WIDGET_STOCK_ARROW_RIGHT
Arrow right.
@ GP_WIDGET_STOCK_SPEAKER_INC
Increase speaker volume.
@ GP_WIDGET_STOCK_ARROW_UP
Arrow up.
@ GP_WIDGET_STOCK_NIGHT
A night icon, a moon.
@ GP_WIDGET_STOCK_REFRESH
A refresh icon.
@ GP_WIDGET_STOCK_ZOOM_OUT
A zoom out icon.
@ GP_WIDGET_STOCK_ARROW_DOWN
Arrow down.
@ GP_WIDGET_STOCK_WARN
Warning message.
@ GP_WIDGET_STOCK_ERR
Error message.
@ GP_WIDGET_STOCK_ARROW_LEFT
Arrow left.
@ GP_WIDGET_STOCK_STAR
A star icon.
@ GP_WIDGET_STOCK_SPEAKER_DEC
Decrease speaker volume.
@ GP_WIDGET_STOCK_ZOOM_IN
A zoom in icon.
@ GP_WIDGET_STOCK_HOME
A home icon.
@ GP_WIDGET_STOCK_SHUFFLE_OFF
A shuffle off icon.
@ GP_WIDGET_STOCK_HARDWARE
A hardware icon.
void gp_widget_stock_render(gp_pixmap *pix, enum gp_widget_stock_type type, gp_coord x, gp_coord y, gp_size w, gp_size h, gp_pixel bg_col, const gp_widget_render_ctx *ctx)
Renders a stock image into a pixmap.
A pixmap buffer.
Definition gp_pixmap.h:33
Global widget (rendering) context.
A compound size.
A widget base.
Definition gp_widget.h:28