1
0
Fork 0
Commit graph

17 commits

Author SHA1 Message Date
Neil Roberts
72c9f88019 Bug 856 - Teardown sequence is borked
* clutter/clutter-main.c: Don't free the ClutterMainContext so
	that the main loop can be restarted.

	* clutter/eglx/clutter-backend-egl.c: 
	* clutter/eglnative/clutter-backend-egl.c: Register an atexit
	handler which disposes the backend object so that we are still
	guaranteed to call eglTerminate on GLES.
2008-09-22 16:36:27 +00:00
Emmanuele Bassi
87ccdacdaf 2008-05-13 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-backend.c:
	(_clutter_backend_create_stage): Call _clutter_stage_set_window()
	ourselves, thus removing yet another action that backends must
	implement and might get wrong; also cuts a backend-agnostic piece
	of code duplication.

	* clutter/eglnative/clutter-backend-egl.c:
	(clutter_backend_egl_create_stage): Update the EGL native backend.

	* clutter/eglx/clutter-backend-egl.c:
	(clutter_backend_egl_create_stage): Update the EGLX backend.

	* clutter/fruity/clutter-backend-fruity.c:
	(clutter_backend_egl_create_stage): Update the fruity backend

	* clutter/glx/clutter-backend-glx.c:
	(clutter_backend_glx_create_stage): Update the GLX backend.

	* clutter/sdl/clutter-backend-sdl.c:
	(clutter_backend_sdl_create_stage): Update the SDL backend.

	* HACKING.backends: Update the ::create_stage() description.
2008-05-13 10:37:17 +00:00
Emmanuele Bassi
101a3cac4e 2008-05-12 Emmanuele Bassi <ebassi@openedhand.com>
Rework the stage wrapper/implementation relation: remove
	duplicated code and all the bookkeeping from the backends into
	ClutterStage whenever possible, to reduce the amount of	work a
	backend must do (and possibly get wrong). Thanks to Tommi
	Komulainen.

	* clutter/clutter-main.c:
	(clutter_init_with_args), (clutter_init): Realize the default
	stage after creation. The default stage is special, because we
	use it in the initialization sequence. This removes the burden
	from the backends and reduces the things a backend can get
	wrong.

	* clutter/clutter-stage.c:
	(clutter_stage_show): Make sure to realize the implementation if
	it hasn't been realized yet.

	(clutter_stage_realize): Set the REALIZED flag and call
	clutter_stage_ensure_current() if the implementation was
	successfully realized.

	(clutter_stage_unrealized): Call clutter_stage_ensure_current()
	on unrealize.

	* clutter/glx/clutter-backend-glx.c:
	(clutter_backend_glx_create_stage): Do not realize the stage anymore
	when creating it, and let the normal realization sequence take
	place.

	(clutter_backend_glx_ensure_context): Trap for X11 errors.

	* clutter/glx/clutter-stage-glx.c:
	(clutter_stage_glx_realize): Chain up to the X11 implementation
	so that we can set up the window state (title, cursor visibility)
	when we actually have a X window. Also, do not call
	clutter_stage_ensure_current(), and rely on the wrapper to do
	it for us. This means we can drop setting the REALIZED flag on
	the wrapper.

	(clutter_stage_glx_unrealize): Do not call
	clutter_stage_ensure_current() ourselves, and rely on the wrapper
	to do it for us.

	* clutter/x11/clutter-stage-x11.c:
	(set_wm_title),	(set_cursor_visible): Move the WM title and
	cursor visibility code inside their own functions.

	(clutter_stage_x11_realize): Set the window title and whether the
	cursor is visible or not after realizing the stage.

	(clutter_stage_x11_set_cursor_visible),
	(clutter_stage_x11_set_title): Call set_wm_title() and
	set_cursor_visible().

	(clutter_stage_x11_finalize): Free the title string.

	* clutter/x11/clutter-stage-x11.h: Save more of the stage state,
	so that we can set it even when the stage hasn't been realized
	yet.

	* clutter/eglnative/clutter-backend-egl.c:
	(clutter_backend_egl_create_stage):
	* clutter/eglnative/clutter-stage-egl.c:
	(clutter_stage_egl_unrealize),
	(clutter_stage_egl_realize): Update the eglnative backend.

	* clutter/eglx/clutter-backend-egl.c:
	(clutter_backend_egl_ensure_context),
	(clutter_backend_egl_create_stage):
	* clutter/eglx/clutter-stage-egl.c:
	(clutter_stage_egl_unrealize),
	(clutter_stage_egl_realize): Update the eglx backend.

	* clutter/sdl/clutter-backend-sdl.c:
	(clutter_backend_sdl_create_stage):
	* clutter/sdl/clutter-stage-sdl.c:
	(clutter_stage_sdl_realize): Update the sdl backend.

	* clutter/fruity/clutter-backend-fruity.c:
	(clutter_backend_fruity_create_stage):
	* clutter/sdl/clutter-stage-fruity.c:
	(clutter_stage_fruity_realize): Update the fruity backend.

	* tests/test-multistage.c (on_button_press): Bail out if
	clutter_stage_new() returns NULL.

	* HACKING.backends: Update backend writing documentation.
2008-05-12 15:26:37 +00:00
Emmanuele Bassi
6ac86b939b 2008-04-23 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/eglnative/clutter-backend-egl.[ch]:
	* clutter/eglnative/clutter-stage-egl.[ch]:
	* clutter/eglnative/clutter-event-egl.c: Port to the new stage
	and backend APIs. *WARNING* untested and not compiled.

	* clutter/eglx/clutter-backend-egl.c:
	(clutter_backend_egl_init): Set some defaults.
2008-04-23 17:20:59 +00:00
Matthew Allum
77a7eaeed5 2008-04-14 Matthew Allum <mallum@openedhand.com>
* clutter/cogl/gles/cogl.c: (cogl_color):
        Disable use of color4ub, issues with latest MBX SDL (#857)

        * clutter/eglx/clutter-backend-egl.c:
        * clutter/eglx/clutter-stage-egl.c:
        * configure.ac:
        Fixup for the eglx backend to work with new backend/multistage code.
        Some issues remain in destroying stages.
2008-04-14 15:10:22 +00:00
Emmanuele Bassi
0535283b77 2008-04-10 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/eglx/clutter-backend-egl.c:
	(clutter_backend_egl_ensure_context): Sync up with the GLX
	backend.

	(clutter_backend_egl_create_stage): Dumb compilation fix.

	* clutter/glx/clutter-backend-glx.c:
	(clutter_backend_glx_create_stage): Unref the stage if we are
	erroring out.
2008-04-10 19:58:47 +00:00
Emmanuele Bassi
f859135082 2008-04-04 Emmanuele Bassi <ebassi@openedhand.com>
Bug #864 - Allow instantiating and subclassing of ClutterStage

	* clutter/Makefile.am: Add clutter-stage-window.[ch]

	* clutter/clutter-stage-manager.c:
	(_clutter_stage_manager_remove_stage): Do not warn if removing
	a stage we don't manage, as we might be invoked multiple times
	during a ClutterState dispose sequence.

	* clutter/clutter-actor.c:
	* clutter/clutter-backend.[ch]:
	* clutter/clutter-main.c:
	* clutter/clutter-private.h:
	* clutter/clutter-stage.[ch]: Make ClutterStage a proxy actor,
	with a private actor implementing the ClutterStageWindow
	interface for handling the per-backend realization, painting
	and unrealization, plus all the windowing system abstraction.

	* clutter/x11/clutter-event-x11.c:
	* clutter/x11/clutter-stage-x11.[ch]: Port the X11 backend
	to the new backend and stage API and semantics.

	* clutter/glx/clutter-backend-glx.c:
	* clutter/glx/clutter-stage-glx.c: Port the GLX backend to
	the new backend and stage API and semantics.

	* clutter/eglx/clutter-backend-egl.[ch]:
	* clutter/eglx/clutter-stage-egl.[ch]: Port the EGLX backend
	to the new backend and stage API and semantics (untested).

	* tests/test-multistage.c (on_button_press): Rename
	clutter_stage_create_new() to clutter_stage_new().
2008-04-04 15:02:11 +00:00
Matthew Allum
e44ac14ef7 2008-04-04 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-actor.c:
        Remove uneeded stage private member.
        Add show-on-set-parent prop and make so by default Actors are
        now automatically shown when reparented (#791)

        * clutter/eglx/clutter-backend-egl.c:
        * clutter/cogl/gles/cogl.c:
        A couple of minor comments.

        * clutter/eglnative/Makefile.am:
        Add missing clutter-egl.h header (back port from trunk)

        * tests/test-actors.c:
        Modify to take advantage of new show-on-set-parent functionality.
2008-04-04 13:20:02 +00:00
Matthew Allum
382852f921 2007-11-18 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-actor.c:
        * clutter/clutter-actor.h:
        * clutter/clutter-group.c:
        * clutter/clutter-main.c:
        * clutter/clutter-stage.c:
        * tests/test-events.c:
        Parent Actors no longer need to be set reactive for reactive
        children to get events. Also makes groups now pickable.
        (#597, #423)

        * clutter/clutter-texture.c:
        Handle case when 1x1 tiled texture is created,
        falling 'back' to being non tiled. (#596)

        * clutter/eglx/clutter-backend-egl.c:
        Call EglTerminate on backend shutdown.
2007-11-18 23:24:55 +00:00
Matthew Allum
3607a470aa 2007-11-15 Matthew Allum <mallum@openedhand.com>
* clutter/Makefile.am:
        * clutter/eglx/Makefile.am:
        * clutter/eglx/clutter-backend-egl.c:
        * clutter/eglx/clutter-backend-egl.h:
        * clutter/eglx/clutter-eglx.h:
        * clutter/eglx/clutter-event-egl.c:
        * clutter/eglx/clutter-stage-egl.c:
        * clutter/eglx/clutter-stage-egl.h:
        * clutter/glx/Makefile.am:
        * clutter/glx/clutter-backend-glx.c:
        * clutter/glx/clutter-backend-glx.h:
        * clutter/glx/clutter-event-glx.c:
        * clutter/glx/clutter-glx.h:
        * clutter/glx/clutter-stage-glx.c:
        * clutter/glx/clutter-stage-glx.h:
        * clutter/x11/Makefile.am:
        * clutter/x11/clutter-backend-x11-private.h:
        * clutter/x11/clutter-backend-x11.c:
        * clutter/x11/clutter-backend-x11.h:
        * clutter/x11/clutter-event-x11.c:
        * clutter/x11/clutter-stage-x11.c:
        * clutter/x11/clutter-stage-x11.h:
        * clutter/x11/clutter-x11.h:
        Create a new X11 backend class of which EGL and GLX 'real' backends
        then subclass. Effectively shares all X11 code between both backends
        avoids code duplication and brings many missing features to EGL X
        backend. Requires some cleanup and testing. (#518)

        * clutter/cogl/gles/cogl.c: (cogl_color):
        Add define to use color4ub only if configure finds it.
        If not fall back to old code.

        * configure.ac:
        Drop support for vincent checks.
        Drop sdles backend.
        Specifically check for color4ub call.
2007-11-15 14:45:27 +00:00
Tomas Frydrych
abd6832dd9 2007-10-12 Tomas Frydrych <tf@o-hand.com>
* clutter/clutter-actor.c:
        * clutter/clutter-backend.c:
        * clutter/clutter-behaviour-depth.c:
        * clutter/clutter-box.c:
        * clutter/clutter-clone-texture.c:
        * clutter/clutter-container.c:
        * clutter/clutter-entry.c:
        * clutter/clutter-feature.c:
        * clutter/clutter-fixed.c:
        * clutter/clutter-group.c:
        * clutter/clutter-hbox.c:
        * clutter/clutter-label.c:
        * clutter/clutter-layout.c:
        * clutter/clutter-media.c:
        * clutter/clutter-rectangle.c:
        * clutter/clutter-score.c:
        * clutter/clutter-script.c:
        * clutter/clutter-stage.c:
        * clutter/clutter-texture.c:
        * clutter/clutter-timeline.c:
        * clutter/clutter-timeout-pool.c:
        * clutter/clutter-vbox.c:
        * clutter/cogl/gl/cogl.c:
        * clutter/cogl/gles/cogl.c:
        * clutter/eglnative/clutter-backend-egl.c:
        * clutter/eglnative/clutter-event-egl.c:
        * clutter/eglnative/clutter-stage-egl.c:
        * clutter/eglx/clutter-backend-egl.c:
        * clutter/eglx/clutter-event-egl.c:
        * clutter/eglx/clutter-stage-egl.c:
        * clutter/glx/clutter-event-glx.c:
        * clutter/json/json-array.c:
        * clutter/json/json-generator.c:
        * clutter/json/json-node.c:
        * clutter/json/json-object.c:
        * clutter/json/json-parser.c:
        * clutter/sdl/clutter-backend-sdl.c:
        * clutter/sdl/clutter-event-sdl.c:
        * clutter/sdl/clutter-stage-sdl.c:

	Fixedup config.h inclusion (must always be bracketed with #ifdef
	HAVE_CONFIG_H).
2007-10-12 08:17:00 +00:00
Matthew Allum
5ab0ed5a00 2007-09-27 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-event.c:
        * clutter/clutter-event.h:
        * clutter/clutter-main.c:
        Further event tweaks;
        - Ref the event actor source
        - Protect against off stage events (button releases)
        - Move more into ClutterEventAny
        - Add a click count to button event (as yet unused)
        - Minor cleanups

        * clutter/clutter-actor.c:
        Make scale x/y a property.

        * clutter/clutter-private.h:
        Remove _clutter_actor_apply_modelview*

        * clutter/eglx/clutter-backend-egl.c:
        Warning cleanup

        * clutter/eglx/clutter-stage-egl.c:
        * clutter/glx/clutter-stage-glx.c:
        * clutter/sdl/clutter-stage-sdl.c:
        Avoid setting viewport directly, but set sync flag.

        * clutter/pango/pangoclutter-render.c: (draw_glyph):
        Minor cleanups.

        * clutter/Makefile.am:
        * tests/Makefile.am:
        * tests/test-score.c
        * clutter/clutter.h:
        * clutter/clutter-score.h:
        * clutter/clutter-score.c:
        Add very initial (broken) ClutterScore implementation.
2007-09-27 21:38:38 +00:00
Emmanuele Bassi
4ccfc2daa2 2007-08-02 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/eglnative/clutter-backend-egl.c:
	* clutter/eglx/clutter-backend-egl.c:
	* clutter/sdl/clutter-backend-sdl.c: Set the default resolution
	as 96.0 dpi for every backend (we already were under this
	assumption anyway, and this makes it easier to change this
	setting per-backend).

	* clutter/pango/pangoclutter-fontmap.c:
	* clutter/pango/pangoclutter.h: Allow setting the resolution
	for the PangoClutterFontMap object and provide the implementation
	for the PangoFcFontMap::get_resolution() virtual function. This
	allows to set the resolution of the PangoContext when retrieving
	it.

	* clutter/clutter-label.c (clutter_label_init): Set the
	resolution of the font map with the one the backend gives us.

	* clutter/clutter-entry.c (clutter_entry_init): Ditto.
2007-08-02 09:58:18 +00:00
Matthew Allum
e0e27baf35 2007-07-26 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-feature.h:
        Add new stage feature flags and document.

        * clutter/eglnative/clutter-backend-egl.c:
        * clutter/eglx/clutter-backend-egl.c:
        * clutter/sdl/clutter-backend-sdl.c:
        Set new feature flags.

        * clutter/glx/clutter-backend-glx.c:
        * clutter/glx/clutter-stage-glx.c:
        * clutter/clutter-stage.c:
        * clutter/clutter-stage.h:
        Add a 'user_resizeable' setting to the backend and implement
        for glx backend.
2007-07-26 20:08:09 +00:00
Emmanuele Bassi
3db49c4f12 2007-07-24 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/eglx/clutter-backend-egl.c:
	* clutter/eglnative/clutter-backend-egl.c:
	* clutter/sdl/clutter-backend-sdl.c: Destroy the stage in every
	backend.
2007-07-24 19:03:04 +00:00
Matthew Allum
051a76c155 2007-07-06 Matthew Allum <mallum@openedhand.com>
* clutter/Makefile.am:
        * clutter/eglnative/Makefile.am:
        * clutter/eglnative/clutter-backend-egl.c:
        * clutter/eglnative/clutter-backend-egl.h:
        * clutter/eglnative/clutter-egl.h:
        * clutter/eglnative/clutter-event-egl.c:
        * clutter/eglnative/clutter-stage-egl.c:
        * clutter/eglnative/clutter-stage-egl.h:
        * clutter/eglx/Makefile.am:
        * clutter/eglx/clutter-backend-egl.c:
        * clutter/eglx/clutter-egl.h:
        * clutter/eglx/clutter-event-egl.c:
        * clutter/eglx/clutter-stage-egl.c:
        * configure.ac:
        Add a new 'native' EGL backend for non X based EGL's
        (i.e on framebuffer).
        Rename old backend to 'eglx' and namespace public funcs with this.

        * clutter/pango/pangoclutter-private.h:
        Add extra checks for expected defines.
2007-07-06 13:56:01 +00:00
Matthew Allum
bbdcf5542b 2007-07-06 Matthew Allum <mallum@openedhand.com>
* NEWS:
        * README:
        Updates for upcoming 0.3.1 release.
        * clutter/egl/Makefile.am:
        * clutter/egl/clutter-backend-egl.c:
        * clutter/egl/clutter-backend-egl.h:
        * clutter/egl/clutter-egl.h:
        * clutter/egl/clutter-event-egl.c:
        * clutter/egl/clutter-stage-egl.c:
        * clutter/egl/clutter-stage-egl.h:
        * configure.ac:
        Move egl -> eglx
2007-07-06 11:40:59 +00:00
Renamed from clutter/egl/clutter-backend-egl.c (Browse further)