summaryrefslogtreecommitdiff
path: root/gtk/gtkwidget.c
diff options
context:
space:
mode:
authorCarlos Garnacho <carlos@lanedo.com>2012-07-11 15:51:43 +0200
committerMatthias Clasen <mclasen@redhat.com>2012-09-03 00:19:03 -0400
commit1f7e375c33c77209181f6b3d3720c1f72c652153 (patch)
tree212b74934fa4f2f41c2163b57e7a25d35c5430a6 /gtk/gtkwidget.c
parent8c632417c48982ddd4054c4c054fcd39964f3fac (diff)
downloadgtk+-1f7e375c33c77209181f6b3d3720c1f72c652153.tar.gz
Add GtkTextHandle
This is a helper object to allow text widgets to implement text selection on touch devices. It allows for both cursor placement and text selection, displaying draggable handles on/around the cursor and selection bound positions. Currently, this is private to GTK+, and only available to GtkEntry and GtkTextView.
Diffstat (limited to 'gtk/gtkwidget.c')
-rw-r--r--gtk/gtkwidget.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index f624250f70..54a42ee7a8 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -3292,6 +3292,19 @@ gtk_widget_class_init (GtkWidgetClass *klass)
1, G_MAXINT, 16,
GTK_PARAM_READABLE));
+ gtk_widget_class_install_style_property (klass,
+ g_param_spec_int ("text-handle-width",
+ P_("Width of text selection handles"),
+ P_("Width of text selection handles"),
+ 1, G_MAXINT, 16,
+ GTK_PARAM_READABLE));
+ gtk_widget_class_install_style_property (klass,
+ g_param_spec_int ("text-handle-height",
+ P_("Height of text selection handles"),
+ P_("Height of text selection handles"),
+ 1, G_MAXINT, 20,
+ GTK_PARAM_READABLE));
+
g_type_class_add_private (klass, sizeof (GtkWidgetPrivate));
gtk_widget_class_set_accessible_type (klass, GTK_TYPE_WIDGET_ACCESSIBLE);