[gtk/wip/baedert/for-master: 1/3] eventcontrollermotion: Use proper getter names
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master: 1/3] eventcontrollermotion: Use proper getter names
- Date: Mon, 30 Nov 2020 08:45:16 +0000 (UTC)
commit 9986e9ec133d55afdc32013c6b1bf97dca32b0d4
Author: Timm Bäder <mail baedert org>
Date: Sun Nov 29 09:35:28 2020 +0100
eventcontrollermotion: Use proper getter names
Both people and tools expect us to use a _get_ in getter names.
docs/reference/gtk/gtk4-sections.txt | 4 ++--
gtk/gtkeventcontrollermotion.c | 8 ++++----
gtk/gtkeventcontrollermotion.h | 4 ++--
gtk/gtkmodelbutton.c | 2 +-
gtk/gtkpopovermenu.c | 2 +-
tests/testhover.c | 16 ++++++++--------
6 files changed, 18 insertions(+), 18 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index c6e8f87a58..4cc7c1e5fd 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -6350,8 +6350,8 @@ gtk_event_controller_scroll_get_type
<TITLE>GtkEventControllerMotion</TITLE>
GtkEventControllerMotion
gtk_event_controller_motion_new
-gtk_event_controller_motion_contains_pointer
-gtk_event_controller_motion_is_pointer
+gtk_event_controller_motion_get_contains_pointer
+gtk_event_controller_motion_get_is_pointer
<SUBSECTION Standard>
GTK_TYPE_EVENT_CONTROLLER_MOTION
diff --git a/gtk/gtkeventcontrollermotion.c b/gtk/gtkeventcontrollermotion.c
index 86c38c1048..8c4c107dfb 100644
--- a/gtk/gtkeventcontrollermotion.c
+++ b/gtk/gtkeventcontrollermotion.c
@@ -299,7 +299,7 @@ gtk_event_controller_motion_new (void)
}
/**
- * gtk_event_controller_motion_contains_pointer:
+ * gtk_event_controller_motion_get_contains_pointer:
* @self: a #GtkEventControllerMotion
*
* Returns the value of the GtkEventControllerMotion:contains-pointer property.
@@ -307,7 +307,7 @@ gtk_event_controller_motion_new (void)
* Returns: %TRUE if a pointer is within @self or one of its children
*/
gboolean
-gtk_event_controller_motion_contains_pointer (GtkEventControllerMotion *self)
+gtk_event_controller_motion_get_contains_pointer (GtkEventControllerMotion *self)
{
g_return_val_if_fail (GTK_IS_EVENT_CONTROLLER_MOTION (self), FALSE);
@@ -315,7 +315,7 @@ gtk_event_controller_motion_contains_pointer (GtkEventControllerMotion *self)
}
/**
- * gtk_event_controller_motion_is_pointer:
+ * gtk_event_controller_motion_get_is_pointer:
* @self: a #GtkEventControllerMotion
*
* Returns the value of the GtkEventControllerMotion:is-pointer property.
@@ -323,7 +323,7 @@ gtk_event_controller_motion_contains_pointer (GtkEventControllerMotion *self)
* Returns: %TRUE if a pointer is within @self but not one of its children
*/
gboolean
-gtk_event_controller_motion_is_pointer (GtkEventControllerMotion *self)
+gtk_event_controller_motion_get_is_pointer (GtkEventControllerMotion *self)
{
g_return_val_if_fail (GTK_IS_EVENT_CONTROLLER_MOTION (self), FALSE);
diff --git a/gtk/gtkeventcontrollermotion.h b/gtk/gtkeventcontrollermotion.h
index 5fbcffe3b6..22f4774476 100644
--- a/gtk/gtkeventcontrollermotion.h
+++ b/gtk/gtkeventcontrollermotion.h
@@ -46,9 +46,9 @@ GDK_AVAILABLE_IN_ALL
GtkEventController *gtk_event_controller_motion_new (void);
GDK_AVAILABLE_IN_ALL
-gboolean gtk_event_controller_motion_contains_pointer (GtkEventControllerMotion *self);
+gboolean gtk_event_controller_motion_get_contains_pointer (GtkEventControllerMotion *self);
GDK_AVAILABLE_IN_ALL
-gboolean gtk_event_controller_motion_is_pointer (GtkEventControllerMotion *self);
+gboolean gtk_event_controller_motion_get_is_pointer (GtkEventControllerMotion *self);
G_END_DECLS
diff --git a/gtk/gtkmodelbutton.c b/gtk/gtkmodelbutton.c
index 3d2e2519c4..6c4f2185f5 100644
--- a/gtk/gtkmodelbutton.c
+++ b/gtk/gtkmodelbutton.c
@@ -1389,7 +1389,7 @@ pointer_cb (GObject *object,
{
gboolean contains;
- contains = gtk_event_controller_motion_contains_pointer (GTK_EVENT_CONTROLLER_MOTION (object));
+ contains = gtk_event_controller_motion_get_contains_pointer (GTK_EVENT_CONTROLLER_MOTION (object));
if (contains)
{
diff --git a/gtk/gtkpopovermenu.c b/gtk/gtkpopovermenu.c
index e0dd9a286c..830a11f1cb 100644
--- a/gtk/gtkpopovermenu.c
+++ b/gtk/gtkpopovermenu.c
@@ -278,7 +278,7 @@ static void
leave_cb (GtkEventController *controller,
gpointer data)
{
- if (!gtk_event_controller_motion_contains_pointer (GTK_EVENT_CONTROLLER_MOTION (controller)))
+ if (!gtk_event_controller_motion_get_contains_pointer (GTK_EVENT_CONTROLLER_MOTION (controller)))
{
GtkWidget *target = gtk_event_controller_get_widget (controller);
diff --git a/tests/testhover.c b/tests/testhover.c
index e493155eef..5aac5e99c8 100644
--- a/tests/testhover.c
+++ b/tests/testhover.c
@@ -2,8 +2,8 @@
#if 0
#define gtk_event_controller_motion_new gtk_drop_controller_motion_new
-#define gtk_event_controller_motion_contains_pointer gtk_drop_controller_motion_contains_pointer
-#define gtk_event_controller_motion_is_pointer gtk_drop_controller_motion_is_pointer
+#define gtk_event_controller_motion_get_contains_pointer gtk_drop_controller_motion_get_contains_pointer
+#define gtk_event_controller_motion_get_is_pointer gtk_drop_controller_motion_get_is_pointer
#undef GTK_EVENT_CONTROLLER_MOTION
#define GTK_EVENT_CONTROLLER_MOTION GTK_DROP_CONTROLLER_MOTION
#endif
@@ -25,8 +25,8 @@ enter_annoy_cb (GtkEventController *controller,
g_print ("%15s ENTER %s %g, %g\n",
gtk_window_get_title (window),
- gtk_event_controller_motion_contains_pointer (GTK_EVENT_CONTROLLER_MOTION (controller))
- ? gtk_event_controller_motion_is_pointer (GTK_EVENT_CONTROLLER_MOTION (controller))
+ gtk_event_controller_motion_get_contains_pointer (GTK_EVENT_CONTROLLER_MOTION (controller))
+ ? gtk_event_controller_motion_get_is_pointer (GTK_EVENT_CONTROLLER_MOTION (controller))
? "IS "
: "CONTAIN"
: " ",
@@ -43,8 +43,8 @@ motion_annoy_cb (GtkEventController *controller,
g_print ("%15s MOVE %s %g, %g\n",
gtk_window_get_title (window),
- gtk_event_controller_motion_contains_pointer (GTK_EVENT_CONTROLLER_MOTION (controller))
- ? gtk_event_controller_motion_is_pointer (GTK_EVENT_CONTROLLER_MOTION (controller))
+ gtk_event_controller_motion_get_contains_pointer (GTK_EVENT_CONTROLLER_MOTION (controller))
+ ? gtk_event_controller_motion_get_is_pointer (GTK_EVENT_CONTROLLER_MOTION (controller))
? "IS "
: "CONTAIN"
: " ",
@@ -59,8 +59,8 @@ leave_annoy_cb (GtkEventController *controller)
g_print ("%15s LEAVE %s\n",
gtk_window_get_title (window),
- gtk_event_controller_motion_contains_pointer (GTK_EVENT_CONTROLLER_MOTION (controller))
- ? gtk_event_controller_motion_is_pointer (GTK_EVENT_CONTROLLER_MOTION (controller))
+ gtk_event_controller_motion_get_contains_pointer (GTK_EVENT_CONTROLLER_MOTION (controller))
+ ? gtk_event_controller_motion_get_is_pointer (GTK_EVENT_CONTROLLER_MOTION (controller))
? "IS "
: "CONTAIN"
: " ");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]