[gtk+/wip/carlosg/event-delivery: 16/75] gtkwidget: Add private cursor setter/getter
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/carlosg/event-delivery: 16/75] gtkwidget: Add private cursor setter/getter
- Date: Tue, 9 May 2017 17:38:32 +0000 (UTC)
commit d902e7e6496ce880d6a68c8baf8c195c5180156e
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Mar 31 17:19:37 2017 +0200
gtkwidget: Add private cursor setter/getter
This should be eventually replaced by CSS cursors, but at the moment
it must be handled on the gtk/ side.
gtk/gtkwidget.c | 13 +++++++++++++
gtk/gtkwidgetprivate.h | 8 ++++++++
2 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index b2d818a..ad9ec08 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -15918,3 +15918,16 @@ gtk_widget_get_focus_child (GtkWidget *widget)
return priv->focus_child;
}
+
+void
+gtk_widget_set_cursor (GtkWidget *widget,
+ GdkCursor *cursor)
+{
+ g_set_object (&widget->priv->cursor, cursor);
+}
+
+GdkCursor *
+gtk_widget_get_cursor (GtkWidget *widget)
+{
+ return widget->priv->cursor;
+}
diff --git a/gtk/gtkwidgetprivate.h b/gtk/gtkwidgetprivate.h
index ff53920..422969a 100644
--- a/gtk/gtkwidgetprivate.h
+++ b/gtk/gtkwidgetprivate.h
@@ -160,6 +160,9 @@ struct _GtkWidgetPrivate
GtkWidget *last_child;
GtkWidget *focus_child;
+
+ /* Pointer cursor */
+ GdkCursor *cursor;
};
GtkCssNode * gtk_widget_get_css_node (GtkWidget *widget);
@@ -316,6 +319,11 @@ gboolean gtk_widget_focus_move (GtkWidget *wi
GtkWidget * gtk_widget_common_ancestor (GtkWidget *widget_a,
GtkWidget *widget_b);
+void gtk_widget_set_cursor (GtkWidget *widget,
+ GdkCursor *cursor);
+GdkCursor * gtk_widget_get_cursor (GtkWidget *widget);
+
+
/* inline getters */
static inline gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]