mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-09-30 02:57:38 +00:00
API: Add state flags for RTL and LTR
See http://www.whatwg.org/specs/web-apps/current-work/#pseudo-classes for the rationale.
This commit is contained in:
parent
94b65032a2
commit
26186c74c6
@ -860,8 +860,12 @@ typedef enum
|
||||
* @GTK_STATE_FLAG_INCONSISTENT: Widget is inconsistent.
|
||||
* @GTK_STATE_FLAG_FOCUSED: Widget has the keyboard focus.
|
||||
* @GTK_STATE_FLAG_BACKDROP: Widget is in a background toplevel window.
|
||||
* @GTK_STATE_FLAG_LTR: Widget is in left-to-right text direction
|
||||
* @GTK_STATE_FLAG_RTL: Widget is in right-to-left text direction
|
||||
*
|
||||
* Describes a widget state.
|
||||
* Describes a widget state. Widget states are used to match the widget
|
||||
* against CSS pseudo-classes. Note that GTK extends the regular CSS
|
||||
* classes and sometimes uses different names.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
@ -872,7 +876,9 @@ typedef enum
|
||||
GTK_STATE_FLAG_INSENSITIVE = 1 << 3,
|
||||
GTK_STATE_FLAG_INCONSISTENT = 1 << 4,
|
||||
GTK_STATE_FLAG_FOCUSED = 1 << 5,
|
||||
GTK_STATE_FLAG_BACKDROP = 1 << 6
|
||||
GTK_STATE_FLAG_BACKDROP = 1 << 6,
|
||||
GTK_STATE_FLAG_DIR_LTR = 1 << 7,
|
||||
GTK_STATE_FLAG_DIR_RTL = 1 << 8
|
||||
} GtkStateFlags;
|
||||
|
||||
/**
|
||||
|
@ -300,12 +300,12 @@
|
||||
* all flags will be set on children (think prelight or active), but we
|
||||
* might want to not do this for some.
|
||||
*/
|
||||
#define GTK_STATE_FLAGS_DONT_PROPAGATE (GTK_STATE_FLAG_FOCUSED)
|
||||
#define GTK_STATE_FLAGS_DONT_PROPAGATE (GTK_STATE_FLAG_FOCUSED | GTK_STATE_FLAG_DIR_LTR | GTK_STATE_FLAG_DIR_RTL)
|
||||
#define GTK_STATE_FLAGS_DO_PROPAGATE (~GTK_STATE_FLAGS_DONT_PROPAGATE)
|
||||
|
||||
#define WIDGET_CLASS(w) GTK_WIDGET_GET_CLASS (w)
|
||||
|
||||
#define GTK_STATE_FLAGS_BITS 7
|
||||
#define GTK_STATE_FLAGS_BITS 9
|
||||
|
||||
struct _GtkWidgetPrivate
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user