Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
f46bf09
build: Build c and cpp
smspillaz Feb 18, 2019
7482384
meson: Bump meson version to 0.42.0
smspillaz Jul 9, 2019
b8d2317
glib: Save Animation GirTarget in variable
smspillaz Feb 18, 2019
7aff42f
geometry: Add operator== for point types
Aug 22, 2018
cf74b66
animation: Add necessary includes to animation/geometry.h
smspillaz Jul 8, 2019
c6bf328
animation: Add box type
Aug 5, 2018
521d8fa
animation: Add animation::BoxQuery interface
smspillaz Jul 8, 2019
62c5477
tests: Add ostream operator for Vector4D
Aug 22, 2018
0cac281
build: Add header-dependency on glm
Aug 4, 2018
d0494ef
tests: Add JS tests and common JS tests utils
smspillaz Jul 9, 2019
026ad96
animation-glib: Use files() in meson.build
smspillaz Jul 9, 2019
8bf7b22
animation: Add concept of a "stepper"
smspillaz Jul 9, 2019
5503c9b
tests: Add meson build file for JS tests, with testStepper.js as the …
smspillaz Jul 9, 2019
a28fbfa
animation: Add 4D vector type
Aug 21, 2018
ccbeaa7
animation-glib/vector: Fix headerblock description
smspillaz Jul 8, 2019
f475e07
animation: Put animation toplevel headers in variable
Sep 2, 2018
256e479
animation: Use files([]) for list-of-files specification in meson.build
smspillaz Jul 9, 2019
e92da81
animation: Add a TransformAnimation base class
Aug 5, 2018
0b6f279
animation: Add box_calculation inline functions
Aug 13, 2018
aeaf0fb
animation: Add math inline helper functions
Aug 13, 2018
9a5fe91
animation: Add property.h header
Sep 1, 2018
bbf583f
animation-glib: Add constructor helpers
Aug 13, 2018
70714bd
tests: Add glm_ostream_operators.h
Aug 13, 2018
7c596ca
matchers: Add AlmostEqMatcher
Aug 21, 2018
2d21a71
animation: Add zoom animation
Aug 5, 2018
6a039f4
animation: Add bounce animation
Aug 12, 2018
24eb312
animation: Add glide animation
Sep 1, 2018
3696507
grid: Add GridAnimation interface
Aug 21, 2018
7ef6458
animation: Add magic lamp animation
Aug 22, 2018
abc0141
animation-clutter: Add animation-clutter library and common helpers
smspillaz Jul 9, 2019
ce2fbb5
animation-clutter: Add AnimationClutterActorBoxQuery
smspillaz Jul 9, 2019
065c81f
animation-clutter: Add AnimationClutterAffineEffect
smspillaz Jul 9, 2019
ad7d0ce
animation-clutter: Add AnimationClutterGridEffect
smspillaz Jul 9, 2019
48a98f4
animation-clutter: Add AnimationClutterWobblyEffect
smspillaz Jul 9, 2019
45c9ae2
debian: Add build-dependency on libmutter-4-dev
smspillaz Jul 9, 2019
719897c
debian: Move gir1.2-animation-glib to libs from non-free/libs
smspillaz Jul 9, 2019
66b231c
debian: Add debian packages for libanimation-clutter0
smspillaz Jul 9, 2019
97148a4
compositor-plugins/gs: Add GNOME-Shell extension for libanimation
smspillaz Jul 9, 2019
c8d5c4b
debian: Add debian packaging for gnome-shell-extension-animation
smspillaz Jul 9, 2019
72ac20c
travis: Add libmutter-4-dev to .travis.yml
smspillaz Jul 9, 2019
134e6a7
travis: Upgrade docker image to cosmic
smspillaz Jul 9, 2019
547bb57
travis: Add repository for jasmine-gjs and install it
smspillaz Jul 9, 2019
a1f11c9
travis: Disable sanitizers
smspillaz Jul 10, 2019
f45bed2
travis: Use meson test as opposed to test binary directly
smspillaz Jul 10, 2019
c175314
tests: Fix headerblock file path comment
smspillaz Jul 10, 2019
aeac19c
travis: Just build jasmine-gjs instead of using Ubuntu package
smspillaz Jul 10, 2019
d4ad04e
build: Use Clutter-7, now
Nov 1, 2020
c2572cf
animation-clutter: get_paint_volume -> modify_paint_volume
smspillaz Nov 1, 2020
1c44576
affine-effect: clutter_actor_continue_paint needs a ClutterPaintContext
smspillaz Nov 1, 2020
e8014b4
animation-clutter: ClutterVertex -> graphene_point3d_t
smspillaz Nov 1, 2020
c83817a
tests: Add missing stepper test
smspillaz Nov 1, 2020
2c393d0
shell: Drop use of Tweener
smspillaz Nov 1, 2020
a6b7087
shell: Don't disconnect signal on string
smspillaz Nov 1, 2020
c63285d
animtion-clutter: Upgrade to Clutter-8
smspillaz Nov 2, 2020
85018b1
animation-clutter: Use graphene_matrix_t
smspillaz Nov 2, 2020
8a4092d
wobbly_internal: No need for long double
smspillaz Nov 2, 2020
9d79638
wobbly_internal: Save some computation
smspillaz Nov 2, 2020
b9c433e
compositor-plugins/gnome-shell: Connect to position-changed
smspillaz Nov 2, 2020
b67559c
animation-clutter: No need to apply box offsets on wobbly effect anymore
smspillaz Nov 2, 2020
e7bd21f
wobbly: some attempts to optimize things
smspillaz Nov 2, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "animation/third_party/glm"]
path = animation/third_party/glm
url = git://github.com/g-truc/glm
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ language: cpp
services:
- docker
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker pull ubuntu:bionic; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker pull ubuntu:disco; fi
script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo FROM ubuntu:bionic > Dockerfile; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo FROM ubuntu:disco > Dockerfile; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo ADD . /root >> Dockerfile; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo RUN apt-get update >> Dockerfile; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo RUN apt-get install -y meson ninja-build build-essential git pkg-config libglib2.0-dev gir1.2-glib-2.0 gobject-introspection libgirepository1.0-dev >> Dockerfile; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo RUN apt-get install --allow-unauthenticated -y meson ninja-build build-essential git pkg-config libglib2.0-dev gir1.2-glib-2.0 gobject-introspection libgirepository1.0-dev libmutter-4-dev git-core autoconf automake gjs >> Dockerfile; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo "RUN git clone git://github.com/ptomato/jasmine-gjs && cd jasmine-gjs && ./autogen.sh --prefix=/usr && make && make install && rm -rf jasmine-gjs" >> Dockerfile; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker build -t withgit .; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run withgit /bin/sh -c "cd /root && TRAVIS=true CC=$CC CXX=$CXX meson -Db_sanitize=address,undefined -Dwerror=true builddir && ninja -C builddir && G_SLICE=always-malloc ./builddir/tests/animation_test --gtest_color=yes"; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run withgit /bin/sh -c "cd /root && TRAVIS=true CC=$CC CXX=$CXX meson -Dwerror=true builddir && meson test -C builddir -v --num-processes=1"; fi

179 changes: 179 additions & 0 deletions animation-clutter/animation-clutter-actor-box-query.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
/*
* animation-clutter/animation-clutter-actor-box-query.cpp
*
* libanimation 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.
*
* libanimation 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 eos-companion-app-service. If not, see
* <http://www.gnu.org/licenses/>.
*
* AnimationClutterActorBoxQuery subclass for ClutterActor
*/

#include <animation-clutter/animation-clutter-actor-box-query.h>

struct _AnimationClutterActorBoxQuery
{
GObject parent_instance;
};

typedef struct _AnimationClutterActorBoxQueryPrivate
{
ClutterActor *actor;
} AnimationClutterActorBoxQueryPrivate;

G_DEFINE_TYPE_WITH_PRIVATE (AnimationClutterActorBoxQuery,
animation_clutter_actor_box_query,
ANIMATION_TYPE_BOX_QUERY)


enum {
PROP_0,
PROP_ACTOR,
NPROPS
};

static GParamSpec *animation_clutter_actor_box_query_props[NPROPS] = { NULL, };

static void
update_box_for_actor_geometry (AnimationClutterActorBoxQuery *box_query,
ClutterActor *actor)
{
float x, y, width, height;

clutter_actor_get_position (actor, &x, &y);
clutter_actor_get_size (actor, &width, &height);

const AnimationBox box = {
.top_left = { x, y },
.bottom_right = { x + width, y + height }
};

animation_box_query_update (ANIMATION_BOX_QUERY (box_query), &box);
}

static void
actor_geometry_changed (GObject *object,
GParamSpec *pspec,
gpointer user_data)
{
ClutterActor *actor = CLUTTER_ACTOR (object);
AnimationClutterActorBoxQuery *box_query = ANIMATION_CLUTTER_ACTOR_BOX_QUERY (user_data);

update_box_for_actor_geometry (box_query, actor);
}

static void
disconnect_signals_and_unref (gpointer data)
{
ClutterActor *actor = data;

g_signal_handlers_disconnect_by_data (actor, actor);
g_object_unref (actor);
}

static ClutterActor *
connect_signals_and_update (ClutterActor *actor,
AnimationClutterActorBoxQuery *box_query)
{
g_signal_connect_object (actor, "notify::x", G_CALLBACK (actor_geometry_changed), box_query, G_CONNECT_AFTER);
g_signal_connect_object (actor, "notify::y", G_CALLBACK (actor_geometry_changed), box_query, G_CONNECT_AFTER);
g_signal_connect_object (actor, "notify::width", G_CALLBACK (actor_geometry_changed), box_query, G_CONNECT_AFTER);
g_signal_connect_object (actor, "notify::height", G_CALLBACK (actor_geometry_changed), box_query, G_CONNECT_AFTER);

update_box_for_actor_geometry (box_query, actor);

return actor;
}

static void
animation_clutter_actor_box_query_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
AnimationClutterActorBoxQuery *box_query = ANIMATION_CLUTTER_ACTOR_BOX_QUERY (object);
AnimationClutterActorBoxQueryPrivate *priv = animation_clutter_actor_box_query_get_instance_private (box_query);

switch (prop_id)
{
case PROP_ACTOR:
g_clear_pointer (&priv->actor, (GDestroyNotify) disconnect_signals_and_unref);
priv->actor = connect_signals_and_update (CLUTTER_ACTOR (g_value_dup_object (value)), box_query);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
}

static void
animation_clutter_actor_box_query_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
AnimationClutterActorBoxQuery *box_query = ANIMATION_CLUTTER_ACTOR_BOX_QUERY (object);
AnimationClutterActorBoxQueryPrivate *priv = animation_clutter_actor_box_query_get_instance_private (box_query);

switch (prop_id)
{
case PROP_ACTOR:
g_value_set_object (value, priv->actor);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
}

static void
animation_clutter_actor_box_query_dispose (GObject *object)
{
AnimationClutterActorBoxQuery *box_query = ANIMATION_CLUTTER_ACTOR_BOX_QUERY (object);
AnimationClutterActorBoxQueryPrivate *priv = animation_clutter_actor_box_query_get_instance_private (box_query);

g_clear_object (&priv->actor);

G_OBJECT_CLASS (animation_clutter_actor_box_query_parent_class)->dispose (object);
}

static void
animation_clutter_actor_box_query_class_init (AnimationClutterActorBoxQueryClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);

object_class->get_property = animation_clutter_actor_box_query_get_property;
object_class->set_property = animation_clutter_actor_box_query_set_property;
object_class->dispose = animation_clutter_actor_box_query_dispose;

animation_clutter_actor_box_query_props[PROP_ACTOR] =
g_param_spec_object ("actor",
"Clutter Actor",
"The ClutterActor to observe",
CLUTTER_TYPE_ACTOR,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);

g_object_class_install_properties (object_class,
NPROPS,
animation_clutter_actor_box_query_props);
}

static void
animation_clutter_actor_box_query_init (AnimationClutterActorBoxQuery *box_query)
{
}

AnimationBoxQuery *
animation_clutter_actor_box_query_new_for_actor (ClutterActor *actor)
{
return ANIMATION_BOX_QUERY (g_object_new (ANIMATION_CLUTTER_TYPE_ACTOR_BOX_QUERY,
"actor", actor,
NULL));
}
36 changes: 36 additions & 0 deletions animation-clutter/animation-clutter-actor-box-query.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* animation-clutter/animation-clutter-actor-box-query.h
*
* libanimation 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.
*
* libanimation 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 eos-companion-app-service. If not, see
* <http://www.gnu.org/licenses/>.
*
* Geometry query subclass for ClutterActor
*/
#pragma once

#include <glib-object.h>

#include <clutter/clutter.h>

#include <animation-glib/box.h>
#include <animation-glib/query/geometry-query.h>

G_BEGIN_DECLS

#define ANIMATION_CLUTTER_TYPE_ACTOR_BOX_QUERY animation_clutter_actor_box_query_get_type ()
G_DECLARE_FINAL_TYPE (AnimationClutterActorBoxQuery, animation_clutter_actor_box_query, ANIMATION_CLUTTER, ACTOR_BOX_QUERY, GObject)

AnimationBoxQuery * animation_clutter_actor_box_query_new_for_actor (ClutterActor *actor);

G_END_DECLS
Loading