[gnome-builder/wip/gtk4-port] libide/gtk: export various animation symbols
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port] libide/gtk: export various animation symbols
- Date: Tue, 29 Mar 2022 18:51:20 +0000 (UTC)
commit fd647eb8561a13074d388a70f7608fe72758ca14
Author: Christian Hergert <chergert redhat com>
Date: Tue Mar 29 11:50:13 2022 -0700
libide/gtk: export various animation symbols
src/libide/gtk/ide-animation.c | 36 ++++--------------------------------
src/libide/gtk/ide-animation.h | 15 +++++++--------
2 files changed, 11 insertions(+), 40 deletions(-)
---
diff --git a/src/libide/gtk/ide-animation.c b/src/libide/gtk/ide-animation.c
index 9763f0b17..015bd7efc 100644
--- a/src/libide/gtk/ide-animation.c
+++ b/src/libide/gtk/ide-animation.c
@@ -20,17 +20,17 @@
#include "config.h"
+#include <stdlib.h>
+#include <string.h>
+
#include <glib/gi18n.h>
#include <gobject/gvaluecollector.h>
-
#include <gdk/gdk.h>
#include <gtk/gtk.h>
-#include <stdlib.h>
-#include <string.h>
-
#include "ide-animation.h"
#include "ide-frame-source-private.h"
+#include "ide-gtk-enums.h"
#define FALLBACK_FRAME_RATE 60
@@ -928,34 +928,6 @@ ide_animation_init (IdeAnimation *animation)
}
-/**
- * ide_animation_mode_get_type:
- *
- * Retrieves the GType for #IdeAnimationMode.
- *
- * Returns: A GType.
- * Side effects: GType registered on first call.
- */
-GType
-ide_animation_mode_get_type (void)
-{
- static GType type_id = 0;
- static const GEnumValue values[] = {
- { IDE_ANIMATION_LINEAR, "IDE_ANIMATION_LINEAR", "linear" },
- { IDE_ANIMATION_EASE_IN_QUAD, "IDE_ANIMATION_EASE_IN_QUAD", "ease-in-quad" },
- { IDE_ANIMATION_EASE_IN_OUT_QUAD, "IDE_ANIMATION_EASE_IN_OUT_QUAD", "ease-in-out-quad" },
- { IDE_ANIMATION_EASE_OUT_QUAD, "IDE_ANIMATION_EASE_OUT_QUAD", "ease-out-quad" },
- { IDE_ANIMATION_EASE_IN_CUBIC, "IDE_ANIMATION_EASE_IN_CUBIC", "ease-in-cubic" },
- { IDE_ANIMATION_EASE_OUT_CUBIC, "IDE_ANIMATION_EASE_OUT_CUBIC", "ease-out-cubic" },
- { IDE_ANIMATION_EASE_IN_OUT_CUBIC, "IDE_ANIMATION_EASE_IN_OUT_CUBIC", "ease-in-out-cubic" },
- { 0 }
- };
-
- if (G_UNLIKELY (!type_id))
- type_id = g_enum_register_static ("IdeAnimationMode", values);
- return type_id;
-}
-
/**
* ide_object_animatev:
* @object: A #GObject.
diff --git a/src/libide/gtk/ide-animation.h b/src/libide/gtk/ide-animation.h
index ed403d510..92a20eaa4 100644
--- a/src/libide/gtk/ide-animation.h
+++ b/src/libide/gtk/ide-animation.h
@@ -18,19 +18,22 @@
#pragma once
+#if !defined (IDE_GTK_INSIDE) && !defined (IDE_GTK_COMPILATION)
+# error "Only <libide-gtk.h> can be included directly."
+#endif
+
#include <gdk/gdk.h>
#include <libide-core.h>
G_BEGIN_DECLS
-#define IDE_TYPE_ANIMATION (ide_animation_get_type())
-#define IDE_TYPE_ANIMATION_MODE (ide_animation_mode_get_type())
+#define IDE_TYPE_ANIMATION (ide_animation_get_type())
IDE_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (IdeAnimation, ide_animation, IDE, ANIMATION, GInitiallyUnowned)
-enum _IdeAnimationMode
+typedef enum _IdeAnimationMode
{
IDE_ANIMATION_LINEAR,
IDE_ANIMATION_EASE_IN_QUAD,
@@ -41,12 +44,8 @@ enum _IdeAnimationMode
IDE_ANIMATION_EASE_IN_OUT_CUBIC,
IDE_ANIMATION_LAST
-};
-
-typedef enum _IdeAnimationMode IdeAnimationMode;
+} IdeAnimationMode;
-IDE_AVAILABLE_IN_ALL
-GType ide_animation_mode_get_type (void);
IDE_AVAILABLE_IN_ALL
void ide_animation_start (IdeAnimation *animation);
IDE_AVAILABLE_IN_ALL
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]