summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* examples: Define _USE_MATH_DEFINES as neededChun-wei Fan2021-10-201-0/+7
| | | | | For builds using the Visual Studio headers, we must define _USE_MATH_DEFINES in order for _M_PI to work.
* Cast the g_object_ref() return valueEmmanuele Bassi2018-06-171-1/+1
| | | | | GObject started performing type checks on generic gpointer API to avoid hard to chase bugs.
* Rename build directory to build-auxEmmanuele Bassi2018-06-171-2/+2
| | | | | | | Having a 'build' directory makes is a bit awkward for tools packaging Clutter, and the rapidly coalescing consensus on the GNOME platform, pushed by the port to Meson, is to call the directory for ancillary build files 'build-aux'.
* Initial port to MesonEmmanuele Bassi2018-06-171-0/+41
| | | | | Even if Clutter is an old project, it does not mean it shouldn't receive some build system love.
* actor: Add bind_model_with_properties()Emmanuele Bassi2015-07-101-24/+9
| | | | | | | | | | When binding models to actors to map items to children we don't often need the full control of a function; in many cases we just need to specify the type of the child we want to construct and the properties on both the item and the child that we want to bind. We should provide a simple convenience function that does all this for us.
* examples/actor-model: Add activate transitionEmmanuele Bassi2015-07-101-1/+68
| | | | Show a simple transition when the current menu item is activated.
* examples/actor-model: Clean up and commentEmmanuele Bassi2015-07-091-141/+169
| | | | This is an example so it ought to be a bit more didactic.
* examples: Add actor-modelEmmanuele Bassi2015-07-072-0/+443
| | | | | A basic example that shows how to build a composite actor starting from a GListStore of model objects.
* Add PanAxis mode that automatically pins scroll based on initial movementGustavo Noronha Silva2015-06-111-4/+54
| | | | | | | This code is inspired by the implementation of the same feature for the Mx toolkit's MxKineticScrollView. See commit 4d08771. https://bugzilla.gnome.org/show_bug.cgi?id=707982
* examples: Add transparency to the rounded rectangleEmmanuele Bassi2015-04-301-1/+3
| | | | Makes it a bit more fancy.
* Stop using macros for accessing actor stateEmmanuele Bassi2015-04-231-4/+4
| | | | Use the newly added functions instead.
* build: Use libtool macros to find libmEmmanuele Bassi2015-03-031-7/+1
| | | | | Instead of using `-lm` everywhere, use LT_LIB_M inside configure.ac, and $(LIBM) inside Makefile.am.
* examples/rounded: Use CLUTTER_REQUEST_CONTENT_SIZEEmmanuele Bassi2015-01-121-1/+2
| | | | | Show how to use the request mode to have an actor ask for the size of its content.
* examples/layout-manager: Toggle between statesEmmanuele Bassi2015-01-111-11/+20
| | | | | Instead of using two specific keys, toggle between the circular and grid layouts using a single key.
* Fully rework the conformance test suiteEmmanuele Bassi2013-12-125-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current conformance test suite is suboptimal in many ways. All tests are built into the same binary, which makes adding new tests, builting tests, and running groups of tests much more awkward than it needs to be. The first issue, especially, raises the bar of contribution in a significant way, while the other two take their toll on the maintainer. All of these changes were introduced back when we had both Clutter and Cogl tests in tree, and because we were building the test suite for every single change; since then, Cogl moved out of tree with all its tests, and we build the conformance test suite only when running the `check` make target. This admittedly large-ish commit changes the way the conformance test suite works, taking advantage of the changes in the GTest API and test harness. First of all, all tests are now built separately, using their own test suite as defined by each separate file. All tests run under the TAP harness provided by GTest and Automake, to gather a proper report using the Test Anything Protocol without using the `gtester` harness and the `gtester-report` script. We also use the Makefile rules provided by GLib to vastly simplify the build environment for the conformance test suite. On top of the changes for the build and harness, we also provide new API for creating and running test suites for Clutter. The API is public, because the test suite has to use it, but it's minimal and mostly provides convenience wrappers around GTest that make writing test units for Clutter easier. This commit disables all tests in the conformance test suite, as well as moving the data files outside of the tests/data directory; the next few commits will re-establish the conformance test suite separately so we can check that everything works in a reliable way.
* Use paint nodes to set up the stageEmmanuele Bassi2013-08-191-17/+11
| | | | | | | This allows to set a Content on a stage, and consolidates the paint code where it belongs. https://bugzilla.gnome.org/show_bug.cgi?id=704625
* examples: Remove a stray restore_easing_state()Emmanuele Bassi2013-06-151-1/+0
| | | | | The DropAction example has an additional restore_easing_state() on the handle which will produce a warning.
* build: Remove INCLUDES directivesEmmanuele Bassi2013-05-151-7/+5
| | | | They have been deprecated for a while, replaced by AM_CPPFLAGS.
* flow-layout: Add :snap-to-grid propertyBastian Winkler2013-05-111-0/+10
| | | | | | | | Add a :snap-to-grid property to FlowLayout to prevent the layout from assigning it's children a position based on the size of the largest child. https://bugzilla.gnome.org/show_bug.cgi?id=648873
* examples/layout-manager: Remove unnecessary easing state saveEmmanuele Bassi2013-03-131-4/+0
| | | | | The actors in the layout are already set up with a non-default easing state, we can use that.
* examples/layout-manager: Improve the exampleEmmanuele Bassi2013-03-131-1/+21
| | | | Add an explicit transition, and more comments.
* examples: Remove clutter_x11_enable_xinput()Emmanuele Bassi2012-12-181-4/+0
| | | | It is unnecessary, and deprecated.
* examples/pan-action: Enable the xinput backend to test touch eventsEmanuele Aina2012-11-261-0/+7
|
* gesture-action: Add clutter_gesture_action_get_last_event()Emanuele Aina2012-10-191-2/+11
| | | | | | | | | | Export the last event received for each touch point in its entirety, instead of duplicating ClutterEvent accessors one at a time. examples/pan-action.c has been updated to show the type of the event that's causing the panning. https://bugzilla.gnome.org/show_bug.cgi?id=685737
* tap-action: Add TapAction, to handle mouse/touch tappingEmanuele Aina2012-10-191-5/+5
| | | | | | | | | | | | | | | | | | | | | | TapAction is a GestureAction-subclass that handles clicks and tap gestures. It is meant to provide a replacement for ClickAction using GestureAction: • it handles events trasparently without capturing them, so that it can coexists with other GestureActions; • the ::tap signal is not emitted if the drag threshold is exceeded; • building upon GestureAction the amount of code is greatly reduced. TapAction provides: • tap signal, notifying users when a tap has been performed. The image-content example program has been updated replacing its ClickAction usage with TapAction. https://bugzilla.gnome.org/show_bug.cgi?id=683948
* examples/pan-action: Animate the content resetEmmanuele Bassi2012-09-031-1/+6
| | | | | We can use the newly added support for implicit animations for the child transform.
* pan-action: add PanAction, to handle panning in scrollable actorsEmanuele Aina2012-08-282-0/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | PanAction is a GestureAction-subclass that implements the panning concept for scrollable actors, with the ability to emit interpolated signals to emulate the kinetic inertia of the panning. PanAction provides: • pan signal, notifying users of the panning gesture status; • pan-stopped signal, emitted at the end of the interpolated phase of the panning gesture, if enabled; • pan-axis property, to allow constraining the dragging to a specific axis; • interpolated property, to enable or disable the inertial behaviour; • deceleration property, to customize the rate at which the momentum of the panning will be slowed down; • acceleration-factor property, applied to the inertial momentum when starting the interpolated sequence. An interactive test is also provided. https://bugzilla.gnome.org/show_bug.cgi?id=681648
* examples/box: Allow toggling animationsEmmanuele Bassi2012-08-201-2/+24
| | | | | We need to set the easing duration to a positive value to let the BoxLayout animate the allocation.
* build: Fix out of tree buildsEmmanuele Bassi2012-07-301-0/+1
|
* examples/basic: Use the event type and not a flagEmmanuele Bassi2012-07-301-5/+4
| | | | | | In order to identify whether the crossing event is an enter or a leave, we should use the ClutterEventType enumeration, not attach a value to the signal handler.
* actor: Add ::transition-stoppedEmmanuele Bassi2012-07-261-13/+14
| | | | | The ::transition-stopped signal can be used to get notification of the end of a transition.
* examples/easing-modes: Use newly added modesEmmanuele Bassi2012-07-191-0/+6
| | | | Step and cubic bezier.
* Remove usage of ClutterLayoutManager easing APIEmmanuele Bassi2012-07-114-46/+2
| | | | It is going away.
* examples: Use pivot point, not anchor pointEmmanuele Bassi2012-07-114-4/+5
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=677853
* examples: Use the pivot point for scalingEmmanuele Bassi2012-07-111-4/+3
| | | | | | Instead of scaling with gravity. https://bugzilla.gnome.org/show_bug.cgi?id=677853
* examples: Use rotation angle and pivot pointEmmanuele Bassi2012-07-112-5/+4
| | | | | Instead of the full set_rotation() setter, we can use the pivot point and set the rotation angle separately.
* actor: Add :z-position and deprecate :depthEmmanuele Bassi2012-07-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | | The ClutterActor:depth property has always been a bit of a misnomer: actors are 2D flat surfaces, so they cannot have "depth"; the property defines the position on the Z axis. Another side effect of the :depth property is that it decides the default paint and allocation order on insertion, and that setting it will call the ClutterContainer.sort_depth_order() method. This has proven to be a fairly bad design decision that we strung along from the 0.x days, as it gives a false impression of being able to change the paint and allocation order simply by changing the position on the Z axis — something that, in reality, requires depth testing to be enabled during the paint sequence of an actor's parent. For 2.0 we need a clean break from the side effects, and a better defined interface. ClutterActor:z-position is essentially what ClutterActor:depth is, but doesn't call into ClutterContainer, and has a more apt name. https://bugzilla.gnome.org/show_bug.cgi?id=679465
* examples: Clean up the threads usage exampleEmmanuele Bassi2012-07-111-16/+21
| | | | | | | | • Remove the threads_enter/leave calls; they are not needed, given that the code between init() and main() is single threaded. • Ensure that the idle callbacks are inserted with the right priority, to avoid updating the UI after the data has been freed.
* examples/layout-manager: Show transformations inside layoutsEmmanuele Bassi2012-06-271-0/+28
| | | | | | Actor transformations do not affect the layout management by default; we can easily show that a scale animation does not break the layout policy inside an example.
* examples: Enable maintainer compiler flagsEmmanuele Bassi2012-06-061-1/+1
| | | | Another step in keeping the example code up to date and correct.
* examples/layout: Initialize variables to avoid warningsEmmanuele Bassi2012-06-061-4/+4
|
* examples: Build with deprecation warnings turned onEmmanuele Bassi2012-06-061-2/+1
| | | | | We want to ensure that the examples stay valid and idiomatic; thus, we should build them with deprecation warnings turned on.
* examples/constraints: Do not use deprecated APIEmmanuele Bassi2012-06-061-1/+1
|
* examples/flow: Do not use deprecated APIEmmanuele Bassi2012-06-061-1/+1
|
* examples/threads: Modernize codeEmmanuele Bassi2012-06-051-56/+69
| | | | | Drop the usage of behaviours and alphas, and use transitions and implicit animations instead.
* examples: Add a grid-layout exampleBastian Winkler2012-06-052-0/+387
| | | | | | A fairly complete example for ClutterGridLayout https://bugzilla.gnome.org/show_bug.cgi?id=677372
* examples: Updated box-layout exampleBastian Winkler2012-06-042-0/+302
| | | | | | Updated test-box-layout to use modern API and move it to examples. https://bugzilla.gnome.org/show_bug.cgi?id=677283
* timeline: Add a new "stopped" signalEmmanuele Bassi2012-05-311-4/+5
| | | | | | | | | | | | | The ::stopped signal is emitted when the timeline has been completely exhausted or when the timeline has been programmatically stopped by using clutter_timeline_stop(); the notification at the end of the timeline run allows to write handlers without having to check whether the current repeat is the last one, like we are forced to do when using the ::completed signal. Based on the patch by: Jasper St. Pierre <jstpierre@mecheye.net> https://bugzilla.gnome.org/show_bug.cgi?id=676854
* examples: Allow optional animations in flow-layoutBastian Winkler2012-05-301-0/+9
| | | | | | Allow animations to demonstrate the LayoutManager animation API https://bugzilla.gnome.org/show_bug.cgi?id=677085
* examples: Update layout-manager example to use the animations APIBastian Winkler2012-05-281-2/+20
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=676827