summaryrefslogtreecommitdiff
path: root/clutter/clutter-main.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix coding style issues in MR !10Floris Van den Abeele2019-10-071-10/+10
|
* Handle 8 and 10 bits colour depth in picking code (#11)Floris Van den Abeele2019-10-071-20/+32
|
* Use Unicode in translatable stringswip/piotrdrag/unicode-typographyPiotr Drąg2018-05-301-1/+1
| | | | | | See https://developer.gnome.org/hig/stable/typography.html https://bugzilla.gnome.org/show_bug.cgi?id=772213
* Allow setting the default backend from the configuration fileEmmanuele Bassi2015-12-111-0/+11
| | | | | | | | | | We should allow a configuration file to set up the initial state of the global state, which also implies being able to set the backend. If the allowed backends have already been set programmatically via the clutter_set_windowing_backend(), though, then the application code takes precedence, as we assume that the application author knows better than us what their code supports or requires.
* Read the config file when creating the global shared stateEmmanuele Bassi2015-12-111-6/+6
| | | | | | | The configuration file should set up the global state before we initialize it; instead of relying on implicit ordering, explicitly read the configuration file once, when creating the global shared context data structure.
* Allow overriding the list of Cogl drivers via configuration fileEmmanuele Bassi2015-12-101-0/+11
| | | | | Clutter has a configuration file that can be used to override various settings, including the ones from environment variables.
* event: Add pinch/swipe gesture event types and structsCarlos Garnacho2015-07-101-0/+2
| | | | | | | | | We now have ClutterTouchpadPinchEvent and ClutterTouchpadSwipeEvent, each bringing the necessary info for the specific gesture. Each of these events is defined by begin/update/end/cancel phases. These events have been also made to propagate down/up the pointer position, just like scroll and button events do.
* docs: Remove leftover DocBook tagsEmmanuele Bassi2015-03-121-1/+1
| | | | We use markdown for the documentation.
* Drop the UProf dependencyEmmanuele Bassi2015-03-031-135/+0
| | | | | | | | | | | | | Nobody has been compiling Clutter with profiling enabled in a long time. UProf itself hasn't been updated in 5 years, and it still depends on deprecated components like dbus-glib, with no port to GDBus in sight. The profiling code was moderately useful in the past, but these days it's probably better to profile Cogl than Clutter itself; timing information can be extracted by the timestamp on each diagnostic message that is now available by default in the CLUTTER_NOTE macro, and we can add ad hoc counters where needed.
* docs: Minimal fixes for the API referenceEmmanuele Bassi2015-03-031-1/+1
|
* clutter: add Mir windowing/input backendMarco Trevisan (Treviño)2015-02-211-0/+9
| | | | | | | | | Added support for Mir, now clutter can natively draw on MirSurfaces. This depends on latest cogl git. Run your clutter apps using CLUTTER_BACKEND=mir Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
* Remove global "actor id"Emmanuele Bassi2015-01-011-34/+4
| | | | | | It's absolutely, positively pointless. Every surviving call has long since been deprecated, and should have not been public in the first place.
* Improve debugging notes for main loop start/stopEmmanuele Bassi2015-01-011-2/+6
| | | | This way, we can track when we quit the main loop.
* Improve the warning message in clutter_main_quit()Emmanuele Bassi2015-01-011-1/+9
| | | | | | | | If you call clutter_main_quit() without calling clutter_main() [ South Park ski instructor] You're going to have a bad time.
* Use new introspection annotation syntaxEmmanuele Bassi2014-12-151-6/+2
| | | | Instead of the deprecated one.
* actor: Create a PangoContext per actorJasper St. Pierre2014-10-231-80/+0
| | | | | | | | | | | | | | | | For a variety of complicated reasons, ClutterText currently sets fields on the PangoContext when creating a layout. This causes ClutterText to behave somewhat erratically in certain cases, since the PangoContext is currently shared between all actors. GTK+ creates a PangoContext for every single GtkWidget, so it seems like we should do the same here. Move the private code that was previously in clutter-main.c into clutter-actor.c and clean it up a bit. This gives every actor its own PangoContext it can mutilate whenever it wants, at its heart's content. https://bugzilla.gnome.org/show_bug.cgi?id=739050
* main: Don't update the PangoContext in clutter_set_font_flagsJasper St. Pierre2014-10-231-5/+0
| | | | | | | | clutter_set_font_flags already calls clutter_backend_set_font_options, which emits a signal which our PangoContext listens to, so this is just duplicate and unneeded code. https://bugzilla.gnome.org/show_bug.cgi?id=739050
* clutter-main: start mainloop timer on clutter_init()Gustavo Noronha Silva2014-04-181-11/+10
| | | | | | | | | | | | | | | By creating and starting the timer on clutter_main() an assumption is made that that is how the main loop will be run for all clutter applications. With more and more applications moving to GApplication, this assumption no longer holds true. Moving to clutter_init() means we are starting the timer earlier than we should, and by not stopping it when the main loop quits we are taking a measure that is later than we should. I believe it is safe to consider those are close enough to the actual beginning and quitting of the main loop in practice. https://bugzilla.gnome.org/show_bug.cgi?id=728521
* docs: Move to markdownEmmanuele Bassi2014-03-171-92/+48
| | | | We're removing docbook tags in favour of the markdown syntax.
* Avoid needless event copies when queueing from a backend to a stageRui Matos2014-03-151-1/+1
| | | | | | | | | | All backends follow the same pattern of queueing events first in ClutterMainContext, then copying them to a ClutterStage queue and immediately free them. Instead, we can just pass ownership of events directly to ClutterStage thus avoiding the allocation and copy in between. https://bugzilla.gnome.org/show_bug.cgi?id=711857
* tests: Use an internal setter for disabling vblank syncEmmanuele Bassi2013-12-121-0/+6
| | | | Instead of using g_setenv().
* Add API to install an event filterNeil Roberts2013-11-141-1/+21
| | | | | | | | | | | | This adds clutter_event_add/remove_filter which adds a callback function which will receive all Clutter events just before the event signal is emitted for them. The event filter will be invoked regardless of any grabs or captures. This will be used by Mutter which wants to access the events at a lower level then the event bubbling mechanism. It needs to see all mouse motion events even if there is a grab in place. https://bugzilla.gnome.org/show_bug.cgi?id=707560
* Add API to restrict the windowing backend to loadGiovanni Campagna2013-09-111-48/+1
| | | | | | | | | In situations when the default backend would fail (for example when compiled with X11 support but run without DISPLAY), or when the application is using backend specific code, it makes sense to let the application choose the backend explicitly. https://bugzilla.gnome.org/show_bug.cgi?id=707869
* clutter: Prefer the X11 backend to the Wayland oneBastien Nocera2013-03-141-5/+5
| | | | | | | | | | | | | | | If clutter is built with both X11 and Wayland support, prefer the (more complete for now) X11 backend. This matches GTK+'s current ordering. This allows distributions to ship a clutter version with both backends built, and using an envvar to switch to the wayland backend and test applications. In the future, applications would be able to choose which backend they prefer and in which order. https://bugzilla.gnome.org/show_bug.cgi?id=695838
* Add method clutter_disable_accessibility ()Alejandro Piñeiro2013-03-131-0/+23
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=691468
* events: Make _clutter_process_event() reentrantEmanuele Aina2012-12-181-4/+3
| | | | | | | | | | | | | | | | | | | The _clutter_process_event() function may get called while already servicing a _clutter_process_event() invocation (eg. when generating ENTER events before emitting TOUCH_BEGIN). In these cases clutter_get_current_event() would return NULL after the inner call to _clutter_process_event() has finished, thereafter making the current event inaccessible during the remaining portion of the outer event emission. By stacking the current events in ClutterMainContext instead of simply replacing them we do not lose track of the real current event. Also update clutter_get_current_event_time() to be consistent from a reentrancy perspective. https://bugzilla.gnome.org/show_bug.cgi?id=688457
* Put g_type_init() under a version checkEmmanuele Bassi2012-12-151-0/+2
| | | | | | GLib 2.36 will deprecate g_type_init() in favour of automatic initialization through a constructor function. We need to add the version check to avoid a compiler warning.
* events: Fix and improve some touch events debug notesEmanuele Aina2012-11-261-7/+11
|
* events: Use the correct union field when setting the stage on touch eventsEmanuele Aina2012-11-261-1/+1
|
* events: Deliver touch events that continue off stage (soft grab)Emanuele Aina2012-10-101-0/+21
| | | | | | | | | If a button press happen on stage and the pointer is moved outside the stage while holding the mouse button, the motion and release events are still delivered to actors. Do the same X11 soft grab emulation for touch events. https://bugzilla.gnome.org/show_bug.cgi?id=685589
* main: Do not release the lock if it hasn't been acquiredEmmanuele Bassi2012-10-051-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On various systems, trying to release a mutex that hasn't been acquired will result in a run-time error. In order to avoid this, we trylock() the Big Clutter Lock™ and immediately unlock() it, regardless of the result; if the lock was already acquired, trylock() will immediately fail, and we can release it; if the lock was not acquired, trylock() will succeed, and we can release the lock immediately. This is necessary to maintain binary compatibility and invariants for Clutter applications doing: clutter_init() clutter_threads_enter() ... clutter_main() ... clutter_threads_leave() instead of the correct: clutter_init() clutter_threads_enter() ... clutter_threads_leave() clutter_main() clutter_threads_enter() ... clutter_threads_leave() With Clutter ≥ 1.12, the idiomatic form is: clutter_init() ... clutter_main() given that the public Big Clutter Lock™ acquire/release API has been deprecated, and nobody should take the lock outside of Clutter itself. https://bugzilla.gnome.org/show_bug.cgi?id=679439
* Add debug note for text directionEmmanuele Bassi2012-09-191-0/+3
| | | | It would be nice to have the text direction inside the debug log.
* input-device: don't reset a device's stage until all touch points are goneLionel Landwerlin2012-09-031-8/+2
| | | | | | | | | | | | | | | | | | | 803b3bafb617c2df703aa8b834ff0df2f0c5c26c introduced a new issue for multi touch events. In the case where 2 touch events for 2 different touch points are processed in the same iteration, a call to _clutter_stage_remove_device() when processing the first event will remove the stage setting of the InputDevice. That means Clutter will skip the second event, because it can't find a stage to which relate the event, so no related actor and so no emission. To fix this we move the _clutter_stage_(add/remove)_device() calls into the input device. This way the input device can find out exactly when to call these functions (i.e. when no touch point were previously active or when no touch point remain active). https://bugzilla.gnome.org/show_bug.cgi?id=682362
* stage: Remove tracking input devices, it's not usedTomeu Vizoso2012-09-031-2/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=683126
* Associate the device to a stage on touch eventsEmmanuele Bassi2012-08-161-2/+8
| | | | | | | Just like we do for crossing events, we need to update the stage pointer inside ClutterInputDevice on TOUCH_BEGIN and TOUCH_END. https://bugzilla.gnome.org/show_bug.cgi?id=681074
* events: process CLUTTER_TOUCH_CANCELLionel Landwerlin2012-07-291-3/+1
| | | | | | | These events might be emitted from the window manager/compositor, they need to be transmitted to widgets. https://bugzilla.gnome.org/show_bug.cgi?id=680752
* events: honour clutter_stage_set_motion_events_enabled() for touch eventsLionel Landwerlin2012-07-291-1/+33
| | | | | | | | | | When dragging/scrolling using touch events, we want the same behaviour than for motion events. We need to honor the user's calls to clutter_stage_set_motion_events_enabled() to deactive event bubbling/captured sequences on the actor located under the pointer and just transmit events to the stage/grab actor. https://bugzilla.gnome.org/show_bug.cgi?id=680751
* input-device: add enter/leave events generation for touch eventsLionel Landwerlin2012-07-171-8/+21
| | | | | | | | This patch brings 'enter-event' and 'leave-event' generation for touch based devices. This leads to adding a new API to retrieve coordinates of a touch point. https://bugzilla.gnome.org/show_bug.cgi?id=679797
* Add rotate actionLionel Landwerlin2012-07-171-0/+14
| | | | | | | | Allow rotation of an actor using 2 points (touch or pointers) events. Also refactor the accumulators from various actions. https://bugzilla.gnome.org/show_bug.cgi?id=678587
* actor: Move event chain emission into ClutterActorEmmanuele Bassi2012-07-111-56/+29
| | | | | By moving the function that builds the event emission chain we can avoid a bunch of checks and function calls.
* Deprecate clutter_threads_enter()/leave()Emmanuele Bassi2012-07-111-8/+32
| | | | | | | | | | | | | Acquiring the Clutter lock to mark critical sections is not portable, and not recommended to implement threaded applications with Clutter. The recommended pattern is to use worker threads, and schedule UI updates inside idle or timeout handlers within the main loop. We should enforce this pattern by deprecating the threads_enter()/leave() functions. For compatibility concerns, we need internal API to acquire the main lock during frame processing dispatch. https://bugzilla.gnome.org/show_bug.cgi?id=679450
* Clean up deprecated header inclusionEmmanuele Bassi2012-06-231-1/+0
| | | | | | The build should not add deprecated/ into the default INCLUDE paths, so that deprecated headers are clearly separated; this will make it easier to get rid of them when we branch out for 2.0.
* input-device: add APIs to grab sequences of touch eventsLionel Landwerlin2012-06-221-1/+21
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=678279
* introspection: assorted annotation fixes ported from ValaEvan Nemerson2012-06-121-2/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=677778
* debug: Group debug messages by timestampsEmmanuele Bassi2012-06-071-2/+22
| | | | | | | Instead of showing the full timestamp for debugging messages that happen within a second, showing the delta from the previous full timestamp can be more useful when debugging; this allows immediately seeing the time difference, instead of doing the math in our heads.
* events: Deliver touch events to actorsTomeu Vizoso2012-06-051-0/+34
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=677390
* Move examples from tests/interactive to a new top-levelEmmanuele Bassi2012-05-011-1/+1
| | | | | | | | | The example code that is meant to be XIncluded into the API reference should not be part of the interactive test suite: it's code that it is meant to be used as a reference implementation - whereas the interactive test suite should be allowed to be lean and test behaviour even in nasty ways. In short: the test suite should not be the place where we show off idiomatic code for educational purposes.
* docs: Annotation fixesEmmanuele Bassi2012-04-301-1/+1
| | | | | | The introspection scanner has become slightly more annoying, in the hope that people start fixing their annotations. As it turns out, it was the right move.
* Be resilient in case there is no device managerEmmanuele Bassi2012-04-261-0/+8
| | | | | | | | It's possible to run Clutter with the 'null' input backend, which means that clutter_device_manager_get_default() may return NULL. In the future we may add a default dummy device manager, but right now it's safer to just add a simple NULL check in the places where we ask for the device manager.
* event: Add ClutterTouchEventEmmanuele Bassi2012-03-191-0/+9
| | | | | The ClutterTouchEvent structure contains the data relative to a touch event.