clutter: Set progress function on graphene_point3d_t

This was dropped by the previous commit.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
This commit is contained in:
Georges Basile Stavracas Neto 2019-02-20 10:28:17 -03:00
parent 4dd3e00609
commit cb36a7363f
No known key found for this signature in database
GPG Key ID: 886C17EE170D1385
4 changed files with 86 additions and 0 deletions

View File

@ -0,0 +1,51 @@
/*
* Clutter.
*
* An OpenGL based 'interactive canvas' library.
*
* Authored By Georges Basile Stavracas Neto <georges.stavracas@gmail.com>
*
* Copyright (C) 2019 Endless, Inc
* Copyright (C) 2009, 2010 Intel Corp
*
* 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 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 <http://www.gnu.org/licenses/>.
*/
#include "clutter-graphene.h"
#include "clutter-private.h"
#include "clutter-types.h"
static gboolean
graphene_point3d_progress (const GValue *a,
const GValue *b,
gdouble progress,
GValue *retval)
{
const graphene_point3d_t *av = g_value_get_boxed (a);
const graphene_point3d_t *bv = g_value_get_boxed (b);
graphene_point3d_t res;
graphene_point3d_interpolate (av, bv, progress, &res);
g_value_set_boxed (retval, &res);
return TRUE;
}
void
clutter_graphene_init (void)
{
clutter_interval_register_progress_func (GRAPHENE_TYPE_POINT3D,
graphene_point3d_progress);
}

View File

@ -0,0 +1,30 @@
/*
* Clutter.
*
* An OpenGL based 'interactive canvas' library.
*
* Authored By Georges Basile Stavracas Neto <georges.stavracas@gmail.com>
*
* Copyright (C) 2019 Endless, Inc
* Copyright (C) 2009, 2010 Intel Corp
*
* 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 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 <http://www.gnu.org/licenses/>.
*/
#ifndef CLUTTER_GRAPHENE_H
#define CLUTTER_GRAPHENE_H
void clutter_graphene_init (void);
#endif

View File

@ -58,6 +58,7 @@
#include "clutter-device-manager-private.h" #include "clutter-device-manager-private.h"
#include "clutter-event-private.h" #include "clutter-event-private.h"
#include "clutter-feature.h" #include "clutter-feature.h"
#include "clutter-graphene.h"
#include "clutter-main.h" #include "clutter-main.h"
#include "clutter-master-clock.h" #include "clutter-master-clock.h"
#include "clutter-mutter.h" #include "clutter-mutter.h"
@ -2574,6 +2575,8 @@ clutter_base_init (void)
/* initialise the Big Clutter Lock™ if necessary */ /* initialise the Big Clutter Lock™ if necessary */
clutter_threads_init_default (); clutter_threads_init_default ();
clutter_graphene_init ();
} }
} }

View File

@ -127,6 +127,7 @@ clutter_sources = [
'clutter-flatten-effect.c', 'clutter-flatten-effect.c',
'clutter-flow-layout.c', 'clutter-flow-layout.c',
'clutter-gesture-action.c', 'clutter-gesture-action.c',
'clutter-graphene.c',
'clutter-grid-layout.c', 'clutter-grid-layout.c',
'clutter-image.c', 'clutter-image.c',
'clutter-input-device.c', 'clutter-input-device.c',
@ -191,6 +192,7 @@ clutter_private_headers = [
'clutter-event-translator.h', 'clutter-event-translator.h',
'clutter-event-private.h', 'clutter-event-private.h',
'clutter-flatten-effect.h', 'clutter-flatten-effect.h',
'clutter-graphene.h',
'clutter-gesture-action-private.h', 'clutter-gesture-action-private.h',
'clutter-id-pool.h', 'clutter-id-pool.h',
'clutter-input-focus-private.h', 'clutter-input-focus-private.h',