[gtk+/wip/carlosg/event-delivery: 13/24] gtkwidget: Add private cursor setter/getter
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/carlosg/event-delivery: 13/24] gtkwidget: Add private cursor setter/getter
- Date: Fri, 31 Mar 2017 17:34:56 +0000 (UTC)
commit ddad49639b61c3cba883b5179e3166da16b771ed
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 81e2eab..e323736 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -15792,3 +15792,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 d33a5e5..e5649ba 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);
@@ -317,6 +320,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]