mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-16 21:50:34 +00:00
css: Fix GtkCssChange enum
Previously, the (1<<31) value evaluated to the 64bit value 0xFFFFFFFF80000000 instead of 0x0000000080000000 Avoid this by explicitly casting the value to unsigned long long. Also cast all values to unsigned long long to achieve consistency and hopefully in the future get new values added the same way.
This commit is contained in:
parent
dbb1830728
commit
6c862f229f
@ -30,46 +30,46 @@ typedef struct _GtkCssStyle GtkCssStyle;
|
||||
typedef struct _GtkStyleProviderPrivate GtkStyleProviderPrivate; /* dummy typedef */
|
||||
|
||||
typedef enum { /*< skip >*/
|
||||
GTK_CSS_CHANGE_CLASS = (1 << 0),
|
||||
GTK_CSS_CHANGE_NAME = (1 << 1),
|
||||
GTK_CSS_CHANGE_CLASS = (1ULL << 0),
|
||||
GTK_CSS_CHANGE_NAME = (1ULL << 1),
|
||||
GTK_CSS_CHANGE_ID = GTK_CSS_CHANGE_NAME,
|
||||
GTK_CSS_CHANGE_REGION = GTK_CSS_CHANGE_NAME,
|
||||
GTK_CSS_CHANGE_FIRST_CHILD = (1 << 2),
|
||||
GTK_CSS_CHANGE_LAST_CHILD = (1 << 3),
|
||||
GTK_CSS_CHANGE_NTH_CHILD = (1 << 4),
|
||||
GTK_CSS_CHANGE_NTH_LAST_CHILD = (1 << 5),
|
||||
GTK_CSS_CHANGE_STATE = (1 << 6),
|
||||
GTK_CSS_CHANGE_SIBLING_CLASS = (1 << 7),
|
||||
GTK_CSS_CHANGE_SIBLING_NAME = (1 << 8),
|
||||
GTK_CSS_CHANGE_SIBLING_FIRST_CHILD = (1 << 9),
|
||||
GTK_CSS_CHANGE_SIBLING_LAST_CHILD = (1 << 10),
|
||||
GTK_CSS_CHANGE_SIBLING_NTH_CHILD = (1 << 11),
|
||||
GTK_CSS_CHANGE_SIBLING_NTH_LAST_CHILD = (1 << 12),
|
||||
GTK_CSS_CHANGE_SIBLING_STATE = (1 << 13),
|
||||
GTK_CSS_CHANGE_PARENT_CLASS = (1 << 14),
|
||||
GTK_CSS_CHANGE_PARENT_NAME = (1 << 15),
|
||||
GTK_CSS_CHANGE_FIRST_CHILD = (1ULL << 2),
|
||||
GTK_CSS_CHANGE_LAST_CHILD = (1ULL << 3),
|
||||
GTK_CSS_CHANGE_NTH_CHILD = (1ULL << 4),
|
||||
GTK_CSS_CHANGE_NTH_LAST_CHILD = (1ULL << 5),
|
||||
GTK_CSS_CHANGE_STATE = (1ULL << 6),
|
||||
GTK_CSS_CHANGE_SIBLING_CLASS = (1ULL << 7),
|
||||
GTK_CSS_CHANGE_SIBLING_NAME = (1ULL << 8),
|
||||
GTK_CSS_CHANGE_SIBLING_FIRST_CHILD = (1ULL << 9),
|
||||
GTK_CSS_CHANGE_SIBLING_LAST_CHILD = (1ULL << 10),
|
||||
GTK_CSS_CHANGE_SIBLING_NTH_CHILD = (1ULL << 11),
|
||||
GTK_CSS_CHANGE_SIBLING_NTH_LAST_CHILD = (1ULL << 12),
|
||||
GTK_CSS_CHANGE_SIBLING_STATE = (1ULL << 13),
|
||||
GTK_CSS_CHANGE_PARENT_CLASS = (1ULL << 14),
|
||||
GTK_CSS_CHANGE_PARENT_NAME = (1ULL << 15),
|
||||
GTK_CSS_CHANGE_PARENT_REGION = GTK_CSS_CHANGE_PARENT_NAME,
|
||||
GTK_CSS_CHANGE_PARENT_POSITION = (1 << 16),
|
||||
GTK_CSS_CHANGE_PARENT_FIRST_CHILD = (1 << 17),
|
||||
GTK_CSS_CHANGE_PARENT_LAST_CHILD = (1 << 18),
|
||||
GTK_CSS_CHANGE_PARENT_NTH_CHILD = (1 << 19),
|
||||
GTK_CSS_CHANGE_PARENT_NTH_LAST_CHILD = (1 << 20),
|
||||
GTK_CSS_CHANGE_PARENT_STATE = (1 << 21),
|
||||
GTK_CSS_CHANGE_PARENT_SIBLING_CLASS = (1 << 22),
|
||||
GTK_CSS_CHANGE_PARENT_SIBLING_NAME = (1 << 23),
|
||||
GTK_CSS_CHANGE_PARENT_SIBLING_FIRST_CHILD = (1 << 24),
|
||||
GTK_CSS_CHANGE_PARENT_SIBLING_LAST_CHILD = (1 << 25),
|
||||
GTK_CSS_CHANGE_PARENT_SIBLING_NTH_CHILD = (1 << 26),
|
||||
GTK_CSS_CHANGE_PARENT_SIBLING_NTH_LAST_CHILD = (1 << 27),
|
||||
GTK_CSS_CHANGE_PARENT_SIBLING_POSITION = (1 << 28),
|
||||
GTK_CSS_CHANGE_PARENT_SIBLING_STATE = (1 << 29),
|
||||
GTK_CSS_CHANGE_PARENT_POSITION = (1ULL << 16),
|
||||
GTK_CSS_CHANGE_PARENT_FIRST_CHILD = (1ULL << 17),
|
||||
GTK_CSS_CHANGE_PARENT_LAST_CHILD = (1ULL << 18),
|
||||
GTK_CSS_CHANGE_PARENT_NTH_CHILD = (1ULL << 19),
|
||||
GTK_CSS_CHANGE_PARENT_NTH_LAST_CHILD = (1ULL << 20),
|
||||
GTK_CSS_CHANGE_PARENT_STATE = (1ULL << 21),
|
||||
GTK_CSS_CHANGE_PARENT_SIBLING_CLASS = (1ULL << 22),
|
||||
GTK_CSS_CHANGE_PARENT_SIBLING_NAME = (1ULL << 23),
|
||||
GTK_CSS_CHANGE_PARENT_SIBLING_FIRST_CHILD = (1ULL << 24),
|
||||
GTK_CSS_CHANGE_PARENT_SIBLING_LAST_CHILD = (1ULL << 25),
|
||||
GTK_CSS_CHANGE_PARENT_SIBLING_NTH_CHILD = (1ULL << 26),
|
||||
GTK_CSS_CHANGE_PARENT_SIBLING_NTH_LAST_CHILD = (1ULL << 27),
|
||||
GTK_CSS_CHANGE_PARENT_SIBLING_POSITION = (1ULL << 28),
|
||||
GTK_CSS_CHANGE_PARENT_SIBLING_STATE = (1ULL << 29),
|
||||
/* add more */
|
||||
GTK_CSS_CHANGE_SOURCE = (1 << 30),
|
||||
GTK_CSS_CHANGE_PARENT_STYLE = (1 << 31),
|
||||
GTK_CSS_CHANGE_TIMESTAMP = (1LL << 32),
|
||||
GTK_CSS_CHANGE_ANIMATIONS = (1LL << 33),
|
||||
GTK_CSS_CHANGE_SOURCE = (1ULL << 30),
|
||||
GTK_CSS_CHANGE_PARENT_STYLE = (1ULL << 31),
|
||||
GTK_CSS_CHANGE_TIMESTAMP = (1ULL << 32),
|
||||
GTK_CSS_CHANGE_ANIMATIONS = (1ULL << 33),
|
||||
|
||||
GTK_CSS_CHANGE_RESERVED_BIT = (1LL << 62) /* Used internally in gtkcssselector.c */
|
||||
GTK_CSS_CHANGE_RESERVED_BIT = (1ULL << 62) /* Used internally in gtkcssselector.c */
|
||||
} GtkCssChange;
|
||||
|
||||
/* if this complains we need to use defines instead of an enum */
|
||||
|
Loading…
Reference in New Issue
Block a user