diff --git a/gtk/gtkanimationmanager.c b/gtk/gtkanimationmanager.c new file mode 100644 index 0000000000..aaf126c62f --- /dev/null +++ b/gtk/gtkanimationmanager.c @@ -0,0 +1,37 @@ +#include "config.h" + +#include "gtkanimationmanagerprivate.h" + +struct _GtkAnimationManager +{ + GObject parent_instance; + + GdkFrameClock *frame_clock; + + gint64 last_frame_time; +}; + +G_DEFINE_TYPE (GtkAnimationManager, gtk_animation_manager, G_TYPE_OBJECT) + +static void +gtk_animation_manager_class_init (GtkAnimationManagerClass *klass) +{ +} + +static void +gtk_animation_manager_init (GtkAnimationManager *self) +{ +} + +GtkAnimationManager * +gtk_animation_manager_new (void) +{ + return g_object_new (GTK_TYPE_ANIMATION_MANAGER, NULL); +} + +void +gtk_animation_manager_set_frame_clock (GtkAnimationManager *self, + GdkFrameClock *frame_clock) +{ + +} diff --git a/gtk/gtkanimationmanagerprivate.h b/gtk/gtkanimationmanagerprivate.h new file mode 100644 index 0000000000..8067ee97b2 --- /dev/null +++ b/gtk/gtkanimationmanagerprivate.h @@ -0,0 +1,38 @@ +/* gtkanimationmanagerprivate.h: Animation manager + * + * Copyright 2019 GNOME Foundation + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#pragma once + +#include + +G_BEGIN_DECLS + +#define GTK_TYPE_ANIMATION_MANAGER (gtk_animation_manager_get_type()) + +G_DECLARE_FINAL_TYPE (GtkAnimationManager, gtk_animation_manager, GTK, ANIMATION_MANAGER, GObject) + +GtkAnimationManager * +gtk_animation_manager_new (void); + +void +gtk_animation_manager_set_frame_clock (GtkAnimationManager *self, + GdkFrameClock *frame_clock); + +G_END_DECLS diff --git a/gtk/meson.build b/gtk/meson.build index 2819341a14..07698ffbb7 100644 --- a/gtk/meson.build +++ b/gtk/meson.build @@ -23,6 +23,7 @@ gtk_private_sources = files([ 'gtkactionobservable.c', 'gtkactionobserver.c', 'gtkallocatedbitmask.c', + 'gtkanimationmanager.c', 'gtkapplicationaccels.c', 'gtkapplicationimpl.c', 'gtkbookmarksmanager.c',