Commit cbde3ee0 authored by Matthias Clasen's avatar Matthias Clasen

css: Add a :dnd pseudoclass

This will be used for drag highlighting.
parent 574246a3
......@@ -744,7 +744,8 @@ print_pseudoclass_state (const GtkCssSelector *selector,
"dir(rtl)",
"link",
"visited",
"checked"
"checked",
"dnd"
};
guint i;
......@@ -1188,7 +1189,8 @@ parse_selector_pseudo_class (GtkCssParser *parser,
{ "dir(rtl)", GTK_STATE_FLAG_DIR_RTL, },
{ "link", GTK_STATE_FLAG_LINK, },
{ "visited", GTK_STATE_FLAG_VISITED, },
{ "checked", GTK_STATE_FLAG_CHECKED, }
{ "checked", GTK_STATE_FLAG_CHECKED, },
{ "dnd" , GTK_STATE_FLAG_DND, }
};
guint i;
......
......@@ -857,6 +857,7 @@ typedef enum
* @GTK_STATE_FLAG_LINK: Widget is a link. Since 3.12
* @GTK_STATE_FLAG_VISITED: The location the widget points to has already been visited. Since 3.12
* @GTK_STATE_FLAG_CHECKED: Widget is checked. Since 3.14
* @GTK_STATE_FLAG_DND: Widget is highlighted as a drop target for DND. Since 3.20
*
* Describes a widget state. Widget states are used to match the widget
* against CSS pseudo-classes. Note that GTK extends the regular CSS
......@@ -876,7 +877,8 @@ typedef enum
GTK_STATE_FLAG_DIR_RTL = 1 << 8,
GTK_STATE_FLAG_LINK = 1 << 9,
GTK_STATE_FLAG_VISITED = 1 << 10,
GTK_STATE_FLAG_CHECKED = 1 << 11
GTK_STATE_FLAG_CHECKED = 1 << 11,
GTK_STATE_FLAG_DND = 1 << 12
} GtkStateFlags;
/**
......
......@@ -34,7 +34,7 @@
G_BEGIN_DECLS
#define GTK_STATE_FLAGS_BITS 12
#define GTK_STATE_FLAGS_BITS 13
struct _GtkWidgetPrivate
{
......
......@@ -53,3 +53,7 @@
:checked {
color: red;
}
:dnd {
color: red;
}
......@@ -53,3 +53,7 @@
:checked {
color: rgb(255,0,0);
}
:dnd {
color: rgb(255,0,0);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment