[gtk/ebassi/for-master: 2/4] Remove boxed type for GtkCrossingData
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/ebassi/for-master: 2/4] Remove boxed type for GtkCrossingData
- Date: Tue, 15 Dec 2020 16:28:46 +0000 (UTC)
commit 69b181f263f1883b52609efde047be6bb706ed66
Author: Emmanuele Bassi <ebassi gnome org>
Date: Tue Dec 15 15:55:15 2020 +0000
Remove boxed type for GtkCrossingData
The GtkCrossingData type is completely private, so there's no point in
having a boxed type for it.
gtk/gtkeventcontroller.c | 39 +++++++--------------------------------
gtk/gtkeventcontroller.h | 3 ---
2 files changed, 7 insertions(+), 35 deletions(-)
---
diff --git a/gtk/gtkeventcontroller.c b/gtk/gtkeventcontroller.c
index d41f24ebe1..f58865d7cd 100644
--- a/gtk/gtkeventcontroller.c
+++ b/gtk/gtkeventcontroller.c
@@ -226,6 +226,11 @@ gtk_event_controller_class_init (GtkEventControllerClass *klass)
GTK_LIMIT_SAME_NATIVE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
+ /**
+ * GtkEventController:name:
+ *
+ * The name for this controller, typically used for debugging purposes.
+ */
properties[PROP_NAME] =
g_param_spec_string ("name",
P_("Name"),
@@ -364,7 +369,7 @@ gtk_event_controller_handle_event (GtkEventController *controller,
return retval;
}
-/**
+/*< private >
* gtk_event_controller_handle_crossing:
* @controller: a #GtkEventController
* @crossing: a #GtkCrossingData
@@ -373,7 +378,7 @@ gtk_event_controller_handle_event (GtkEventController *controller,
*
* Feeds a crossing event into @controller, so it can be interpreted
* and the controller actions triggered.
- **/
+ */
void
gtk_event_controller_handle_crossing (GtkEventController *controller,
const GtkCrossingData *crossing,
@@ -658,33 +663,3 @@ gtk_event_controller_get_current_event_state (GtkEventController *controller)
return 0;
}
-
-static GtkCrossingData *
-gtk_crossing_data_copy (GtkCrossingData *crossing)
-{
- GtkCrossingData *copy;
-
- copy = g_new (GtkCrossingData, 1);
-
- copy->type = crossing->type;
- copy->direction = crossing->direction;
-
- if (crossing->old_target)
- copy->old_target = g_object_ref (crossing->old_target);
- if (crossing->new_target)
- copy->new_target = g_object_ref (crossing->new_target);
-
- return copy;
-}
-
-static void
-gtk_crossing_data_free (GtkCrossingData *crossing)
-{
- g_clear_object (&crossing->old_target);
- g_clear_object (&crossing->new_target);
-
- g_free (crossing);
-}
-
-G_DEFINE_BOXED_TYPE (GtkCrossingData, gtk_crossing_data,
- gtk_crossing_data_copy, gtk_crossing_data_free)
diff --git a/gtk/gtkeventcontroller.h b/gtk/gtkeventcontroller.h
index 4b33432895..e564b3d9bc 100644
--- a/gtk/gtkeventcontroller.h
+++ b/gtk/gtkeventcontroller.h
@@ -40,9 +40,6 @@ G_BEGIN_DECLS
#define GTK_EVENT_CONTROLLER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GTK_TYPE_EVENT_CONTROLLER,
GtkEventControllerClass))
-GDK_AVAILABLE_IN_ALL
-GType gtk_crossing_data_get_type (void) G_GNUC_CONST;
-
GDK_AVAILABLE_IN_ALL
GType gtk_event_controller_get_type (void) G_GNUC_CONST;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]