diff options
author | Benjamin Otte <otte@redhat.com> | 2021-08-30 04:32:22 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2021-08-30 04:36:16 +0200 |
commit | 6c87d362c5d52ad26cff03e7cab87496a4d51ae4 (patch) | |
tree | 559e02023faa91ed8b27b59afcdc91abddb345f9 /gtk/gtkenums.h | |
parent | 7cdbdb663c35b72f8934698e8823d96ebef78ce5 (diff) | |
download | gtk+-6c87d362c5d52ad26cff03e7cab87496a4d51ae4.tar.gz |
enums: Add a GtkSymbolicColor enum
That way we don't nedmagic numbres to index the colors array.
Use it in the symbolic paintable demo.
Diffstat (limited to 'gtk/gtkenums.h')
-rw-r--r-- | gtk/gtkenums.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gtk/gtkenums.h b/gtk/gtkenums.h index 31b0c8fb46..0dbae71726 100644 --- a/gtk/gtkenums.h +++ b/gtk/gtkenums.h @@ -1132,6 +1132,25 @@ typedef enum { } GtkSystemSetting; /** + * GtkSymbolicColor: + * @GTK_SYMBOLIC_COLOR_FOREGROUND: The default foreground color + * @GTK_SYMBOLIC_COLOR_ERROR: Indication color for errors + * @GTK_SYMBOLIC_COLOR_WARNING: Indication color for warnings + * @GTK_SYMBOLIC_COLOR_SUCCESS: Indication color for success + * + * The indexes of colors passed to symbolic color rendering, such as + * [vfunc.GtkSymbolicPaintable.snapshot_symbolic]. + * + * More values may be added over time. + */ +typedef enum { + GTK_SYMBOLIC_COLOR_FOREGROUND = 0, + GTK_SYMBOLIC_COLOR_ERROR = 1, + GTK_SYMBOLIC_COLOR_WARNING = 2, + GTK_SYMBOLIC_COLOR_SUCCESS = 3 +} GtkSymbolicColor; + +/** * GtkAccessibleRole: * @GTK_ACCESSIBLE_ROLE_ALERT: An element with important, and usually * time-sensitive, information |