GFXprim
2D bitmap graphics library with emphasis on speed and correctness
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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
26#ifndef GP_WIDGET_STOCK_H
27#define GP_WIDGET_STOCK_H
28
30
146
152#define GP_WIDGET_STOCK_TYPE(type) ((type) & GP_WIDGET_STOCK_TYPE_MASK)
153
167 gp_coord x, gp_coord y, gp_size w, gp_size h,
168 gp_pixel bg_col, const gp_widget_render_ctx *ctx);
169
179
187
195
204
213
214#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_OFF
Switch OFF stock.
@ GP_WIDGET_STOCK_REPEAT_OFF
Repeat off icon.
@ GP_WIDGET_STOCK_ZOOM
A zoom icon.
@ GP_WIDGET_STOCK_SETTINGS
A settings icon.
@ GP_WIDGET_STOCK_TYPE_INVALID
Invalid stock type, used by a gp_widget_stock_by_name().
@ 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_EMPTY
Empty stock.
@ GP_WIDGET_STOCK_NIGHT
A night icon, a moon.
@ GP_WIDGET_STOCK_NONE
No stock image.
@ GP_WIDGET_STOCK_REFRESH
A refresh icon.
@ GP_WIDGET_STOCK_ZOOM_OUT
A zoom out icon.
@ GP_WIDGET_STOCK_REPEAT_ON
Repeat on icon.
@ GP_WIDGET_STOCK_ARROW_DOWN
Arrow down.
@ GP_WIDGET_STOCK_ON
First unused stock type.
@ 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.
@ GP_WIDGET_STOCK_FILTER
A filter stock icon.
bool gp_widget_stock_type_valid(gp_widget_stock_type type)
Checks for stock type validity.
enum gp_widget_stock_type gp_widget_stock_type_get(gp_widget *self)
Gets stock image type.
gp_widget_stock_type gp_widget_stock_type_by_name(const char *name)
Parses stock type from a name.
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