1
0
Fork 0
Commit graph

112 commits

Author SHA1 Message Date
Emmanuele Bassi
f20cfeadb4 2008-05-28 Emmanuele Bassi <ebassi@openedhand.com>
Bug #919 - Replacement pango renderer (Neil Roberts)

	* clutter/clutter-backend.h:
	* clutter/clutter-backend.c:
	(clutter_backend_set_font_options),
	(clutter_backend_get_font_options): Add the ability to set
	the cairo_font_options_t* for the backend at construction
	time, so that backend implementations can have their own
	options.

	* clutter/clutter-color.c: Include pango/pango-attributes.h
	for the pango_color_parse() function.

	* clutter/clutter-label.c:
	(clutter_label_ensure_layout),
	(clutter_label_init), (clutter_label_set_text),
	(clutter_label_set_font_name), (clutter_label_set_ellipsize),
	(clutter_label_set_use_markup): Ensure that the cache is
	always primed when the Label changes; this makes sure that
	the cache is rebuilt outside the paint run, which should
	make the painting perform better especially on embedded
	devices.

	* clutter/clutter-entry.c:
	(clutter_entry_ensure_layout),
	(clutter_entry_init), (clutter_entry_set_text),
	(clutter_entry_set_font_name): Ditto as above.

	* clutter/clutter-private.h:
	* clutter/clutter-main.[ch]: Create the font-map inside the
	main context; add two new functions:

	  clutter_clear_glyph_cache()
	  clutter_set_use_mipmapped_text()

	that control the glyphs cache.

	* clutter/pango/Makefile.am:
	* clutter/pango/pangoclutter-fontmap.c:
	* clutter/pango/pangoclutter-private.h:
	* clutter/pango/pangoclutter-render.c:
	* clutter/pango/pangoclutter.h: Rewrite the Pango renderer
	using a PangoCairo context and saving the glyphs inside a
	more efficient cache.

	* configure.ac: Depend on pangocairo instead of pangoft2.
2008-05-28 14:03:28 +00:00
Matthew Allum
092fdf1d79 2008-05-14 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-actor.c:
        * clutter/clutter-main.c:
        * clutter/clutter-private.h:
        Rejid Øyvind's previous commit a little moving more into
        clutter-main.c and using ClutterContext.
        Also Refactor clutter_init & clutter_init_with_args to share
        same core init code.
2008-05-13 23:02:45 +00:00
Øyvind Kolås
a1b240d31b Made it possible to do picking when the colors stored in the
framebuffer are only approximately the correct value.
* clutter/clutter-actor.c: 
(init_bits): initialize constants about how many bits are
available/will be used for r,g,b components.
(_clutter_pix_to_id): now own function, compute an id from a
pixel into its own function (used from _clutter_do_pick). 
(_clutter_id_to_col): now own function, computes the color to use for
a given id.
(clutter_actor_paint): use clutter_id_to_col.
* clutter/clutter-main.c:
(_clutter_do_pick): use _clutter_pix_to_id
(clutter_main): re-enable invocation of fruity app shell.
2008-05-13 18:40:14 +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
Neil Roberts
9144b3902e * clutter/clutter-frame-source.c (clutter_frame_source_add)
(clutter_frame_source_add_full): Add gtk-doc and rename the
	'function' parameter to 'func'.

	* clutter/clutter-frame-source.h: Rename the 'function' parameters
	to 'func'.

	* clutter/Makefile.am (source_h): Make clutter-frame-source.h a
	public header.

	* clutter/clutter-main.c (clutter_threads_add_frame_source_full):
	Improve gtk-doc

	* doc/reference/clutter/clutter-sections.txt: Added
	clutter_threads_add_frame_source,
	clutter_threads_add_frame_source_full,
	clutter_frame_source_add and clutter_frame_source_add_full.
2008-05-09 16:27:06 +00:00
Neil Roberts
6409b1adeb Merged clutter-ivan branch into trunk.
svn merge \
 https://svn.o-hand.com/repos/clutter/trunk/clutter@2509 \
 https://svn.o-hand.com/repos/clutter/branches/clutter-ivan@HEAD
2008-04-25 13:37:36 +00:00
Neil Roberts
827c26757e Applied patch from bug #881
* clutter/clutter-frame-source.h: 
	* clutter/clutter-frame-source.c:
	New files that contain a replacement for g_timeout that try to
	cope with system delays.

	* clutter/Makefile.am: Added clutter-frame-source.{c,h}

	* clutter/clutter-timeline.c (timeout_add): Use a frame source
	instead of a g_timeout.

	* clutter/clutter-main.c (clutter_threads_add_frame_source_full)
	(clutter_threads_add_frame_source): New public functions to wrap a
	frame source and grab the Clutter mutex.

	* clutter/clutter-timeout-pool.c: Now calculates the timeout
	expiration times in the same way as a frame source does so that it
	counts time in frame intervals instead of setting the next
	expiration time as an offset from the current time.
2008-04-17 16:50:23 +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
8847bcd195 2008-03-28 Matthew Allum <mallum@openedhand.com>
* clutter/Makefile.am:
        * clutter/clutter-actor.c:
        * clutter/clutter-actor.h:
        * clutter/clutter-backend.c:
        * clutter/clutter-backend.h:
        * clutter/clutter-debug.h:
        * clutter/clutter-event.c:
        * clutter/clutter-event.h:
        * clutter/clutter-feature.h:
        * clutter/clutter-group.h:
        * clutter/clutter-main.c:
        * clutter/clutter-main.h:
        * clutter/clutter-private.h:
        * clutter/clutter-stage.c:
        * clutter/clutter-stage.h:
        * clutter/clutter-stage-manager.c
        * clutter/clutter-stage-manager.h
        * clutter/clutter-types.h:
        * clutter/glx/clutter-backend-glx.c:
        * clutter/glx/clutter-backend-glx.h:
        * clutter/glx/clutter-stage-glx.c:
        * clutter/glx/clutter-stage-glx.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-x11.h:
        * tests/Makefile.am:
        * tests/test-multistage.c:
        Initial commit of multi stage support (mostly a merge from the
        clutter-multistage branch).
        Note, this commit will break all backends except glx.
2008-03-28 22:50:55 +00:00
Matthew Allum
74c8271db6 2008-03-09 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-id-pool.c: (clutter_id_pool_free):
        Use g_slice_free not g_free.
        * clutter/clutter-main.c: (_clutter_do_pick):
        Dont 'over read' the framebuffer when picking (#839, Neil Roberts)
2008-03-09 19:07:17 +00:00
Øyvind Kolås
cdf8bb0739 Refactored the integer id->ClutterActor mapping code to be a self
contained data structure.
* clutter/clutter-id-pool.[ch]: new files.
* clutter/Makefile.am: added clutter-id-pool.[ch]
* clutter/clutter-private.h: use a ClutterIDPool instead of GArray and
GSList to keep track of the reusable ids.
* clutter/clutter-actor.c: moved id pool logic away.
* clutter/clutter-main.c: simplified id pool creation/finalization.
2008-03-07 17:34:40 +00:00
Emmanuele Bassi
57a954b1eb 2008-03-04 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-main.c (clutter_do_event): Do not throttle the
	motion events if the per-actor delivery has been disabled.
2008-03-04 16:23:13 +00:00
Øyvind Kolås
bb6f3c6a4f Reuse the numeric id's used for picking actors to avoid the potential
of overflowing the id numbers when continusly creating and destroying
actors on long running applications for 16bpp.
* clutter/clutter-private.h: replaced hashtable with GArray and a
GSList for available slots in the array.
* clutter/clutter-actor.c: (create_actor_id): function to create an
actor->id mapping, (release_actor_id): function to mark an existing id
as available for reuse.
* clutter/clutter-main.c: (clutter_context_free): added utility
function for cleaning up the context, 
(clutter_get_actor_by_gid): use the GArray for looking up actors.
2008-02-29 14:54:28 +00:00
Emmanuele Bassi
b5bcee6c6c 2008-02-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-main.c (emit_event): Fix the last commit
	which inverted a condition.
2008-02-25 16:50:50 +00:00
Emmanuele Bassi
bcd9a6dcec 2008-02-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c: Remove the usage of g_return_if_fail()
	from static functions: either assert or use g_warning() to check
	internal state, as g_return_if_fail() can be compiled out.

	* clutter/clutter-main.c: Ditto as above.
2008-02-25 12:24:56 +00:00
Tomas Frydrych
9aba9710c1 2008-02-20 Tomas Frydrych <tf@openedhand.com>
* clutter/x11/clutter-x11.h:
	* clutter/x11/clutter-backend-x11.c:
	(clutter_x11_set_display):
	Function to set X display connection prior to calling
	clutter_init(); stripped loads of trailing space.
2008-02-20 14:16:54 +00:00
Emmanuele Bassi
92954a76a7 2008-01-19 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-main.c (generate_enter_leave_events): Do not
	take the explicit reference, and let clutter_event_copy() do it
	for us. (#714, Neil Roberts)
2008-01-19 10:33:31 +00:00
Emmanuele Bassi
94fb3f0c6a 2008-01-18 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-main.c (clutter_do_event): Check the
	return value of the ::event signal for the CLUTTER_DELETE
	event type.

	* clutter/clutter-stage.c (clutter_stage_event): Emit the
	::event signal when receiving the CLUTTER_DELETE event; this
	allows to intercept the user's closing of the stage window.
2008-01-18 18:08:37 +00:00
Øyvind Kolås
bf66f7a3ec * clutter/clutter-main.c: (generate_enter_leave_events): synthesize
enter event (without related) and corresponding leave event when the
actor the cursor is over has been destroyed.
* clutter/clutter-event.c: (clutter_event_free): only unref the
related_actor when it actually is set.
2007-12-18 13:03:45 +00:00
Emmanuele Bassi
b14bdfe2bb 2007-12-18 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-main.c:
	(unset_motion_last_actor),
	(generate_enter_leave_events): Attach a callback to the destroy
	signal on the last motion actor, so if it goes away while the
	pointer is in the middle of it we can unset the pointer.

	* clutter/clutter-private.h: Store the last motion actor inside
	the global context.
2007-12-18 10:49:29 +00:00
Emmanuele Bassi
dad823f123 2007-12-06 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-main.c:
	(clutter_set_motion_events_frequency): Never allow the motion
	events devlivery frequency to exceed the default frame rate.
2007-12-06 12:38:04 +00:00
Emmanuele Bassi
4ff25a291c 2007-12-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-score.h: Rearrange declarations.

	* clutter/clutter-score.c: More documentation in the long
	description of the ClutterScore section.

	* clutter/clutter-debug.h:
	* clutter/clutter-main.c: Add the CLUTTER_DEBUG_SHADER flag,
	for debugging the shader calls.

	* clutter/clutter-feature.h: Fix the documentation of the
	feature flags.

	* clutter/Makefile.am: Remove trailing whitespace.
2007-12-05 21:15:19 +00:00
Matthew Allum
aebf79829a 2007-11-29 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-main.c: (generate_enter_leave_events):
        Minor formatting tweak.
        * configure.ac:
        Typo fix from Damien Lespiau (via mailing list)
2007-11-28 23:57:26 +00:00
Øyvind Kolås
a770e57193 * clutter/clutter-main.c: (event_click_count_generate): generalized
click_count generation code.
* tests/test-events.c: (input_cb): extended test to report click_count
for release and scroll events as well as press events.
2007-11-20 17:14:05 +00:00
Øyvind Kolås
80ef0db622 reverted accidental commit 2007-11-20 17:05:23 +00:00
Øyvind Kolås
4320c354a3 * clutter/clutter-main.c: (clutter_do_event): avoid computing source
of events if it is already set (for synthetic events.)
* clutter/clutter-event.c: Add more information to the documentation
of clutter_event_put.
2007-11-20 17:03:53 +00:00
Emmanuele Bassi
b676210545 2007-11-19 Emmanuele Bassi <ebassi@openedhand.com>
* clutter.symbols: Update

	* clutter/clutter-actor.h: Rename the angle argument for
	set_rotationx() to avoid gtk-doc complaining

	* clutter/clutter-main.h:
	* clutter/clutter-main.c:
	(clutter_set_motion_events_enabled): Rename for consistency

	(clutter_get_motion_events_frequency),
	(clutter_set_motion_events_frequency): Add accessors for the default
	motion events deliver frequency.
	
	(clutter_do_event): Throttle down motion events delivery using the
	motion events frequency setting, to avoid excessive redraws. (#608)

	(clutter_context_get_default): Enable per-actor motion events, at
	least for now.

	* tests/test-events.c (red_button_cb):
	* tests/test-grab.c (green_press_cb): Update.
2007-11-19 16:30:56 +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
Øyvind Kolås
3c0897a102 * clutter/clutter-main.c: (emit_event): renamed from deliver_event,
(emit_pointer_event): utility function to emit pointer event signals
(which takes pointer grab into account).
(emit_keyboard_event): utility function to emit keyboard event signals
(which takes keyboard grab into account).
(clutter_do_event): use the above utility functions, also reindented
the source.
2007-11-16 13:41:07 +00:00
Øyvind Kolås
3b4f603368 * clutter/clutter-main.[ch]: added clutter_grab_keyboard,
clutter_ungrab_keyboard and clutter_get_keyboard_grab, in
clutter_do_event deliver keyboard related events only to the
actor with the keyboard grab if a grab exists.
* clutter/clutter-private.h: added keyboard_grab_actor to context.
* tests/test-grab.c: added testing for testing the keyboard grab.
2007-11-15 18:00:24 +00:00
Emmanuele Bassi
75d186c3f9 2007-11-15 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.[ch]: Massive API clean-ups. Initial
	fixes for bugs #614 and #628.

	* clutter/clutter-main.c:
	* clutter/clutter-stage.c: Update internal usage of the actor
	API.

	* tests/test-events.c: Update test suite.
2007-11-15 17:35:47 +00:00
Øyvind Kolås
d060b3bdd7 fixing commited conflict due to interrupted commit 2007-11-15 17:34:49 +00:00
Øyvind Kolås
36c6189405 * clutter/clutter-main.c: (generate_enter_leave_events),
(clutter_do_event): moved the generation of enter/leave events
to a utility function.
2007-11-15 17:32:09 +00:00
Øyvind Kolås
266315c486 * clutter/clutter-main.c: (generate_enter_leave_events),
(clutter_do_event): moved the generation of enter/leave events
to a utility function.
2007-11-15 17:30:30 +00:00
Øyvind Kolås
53ec33f34c * clutter/clutter-main.[ch]: added clutter_grab_pointer,
clutter_ungrab_pointer and clutter_get_pointer_grab, in
clutter_do_event deliver pointer related events only to the
actor with the pointer grab if a grab exists.
* clutter/clutter-private.h: added pointer_grab_actor to context.
* tests/Makefile.am:
* tests/test-grab.c: added test for testing the pointer grab.
2007-11-15 17:08:48 +00:00
Øyvind Kolås
95338ba67b * clutter/clutter-event.h: made ClutterEventAny have a source field,
rearanged other structs to have source in the same position.
* clutter/clutter-event.c: (clutter_event_get_source): modified to use
the any event.
(clutter_event_free): removed unused variable.
* clutter/clutter-main.c: (deliver_event), (clutter_do_event): reduced
amount of code. As well as deliver button-release events to the stage.
2007-11-12 19:12:02 +00:00
Øyvind Kolås
60a66695c6 * clutter/clutter-main.c: (_clutter_do_pick): disable dithering
when painting in pick mode.
2007-10-31 15:38:18 +00:00
Emmanuele Bassi
7b6f602956 2007-10-26 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-main.c: Add a --clutter-default-fps run-time
	switch and CLUTTER_DEFAULT_FPS environment variable support for
	setting the default frame-rate at run-time.
2007-10-26 15:47:39 +00:00
Øyvind Kolås
a7fb3a78d2 * clutter/clutter-main.c: (clutter_do_event): allow motion events
only delivered to stage to be chaugt in the capture phase as well
as the bubbling phase.
2007-10-16 16:35:02 +00:00
Emmanuele Bassi
f6c83a224e 2007-10-16 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-timeline.[ch]: Added ClutterTimeline:duration,
	a property for setting the duration of a timeline in milliseconds.
	The property comes with accessors and a new constructor. The
	frame rate used is the default value.

	* clutter/clutter-private.h:
	* clutter/clutter-main.[ch]: Add clutter_get_default_frame_rate()
	and clutter_set_default_frame_rate(); these two functions control
	the default frame rate to be used when creating timelines. Currently
	is set to 60 frames-per-second.
2007-10-16 13:41:34 +00:00
Matthew Allum
dd99f024bf 2007-10-15 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-actor.c:
        More events documentation.

        * clutter/clutter-event.c:
        * clutter/clutter-event.h:
        Add synthetic flag and make put_event use it
        (via modded patch from pippin)

        * clutter/clutter-main.c: (clutter_do_event):
        dont use put event anymore when pushing enter/leave events.
2007-10-15 16:50:59 +00:00
Emmanuele Bassi
717a82303a 2007-10-10 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c: Remove the ::event-after signal:
	three event layers to connect to seems a bit overkill.

	(clutter_actor_event): Return FALSE, not TRUE by default,
	as g_signal_emit() will change the return value if no
	handlers are connected

	* clutter/clutter-stage.c: Emit ::notify when we change
	the fullscreen property.

	* clutter/clutter-script.c: Add more documentation for the
	definition format and keywords.

	(translate_property): Collapse the G_TYPE_ENUM and G_TYPE_FLAGS
	cases into one, to simplify the code.

	* tests/test-script.c: Test enumeration conversion by using
	a value different from the default.
2007-10-10 14:29:29 +00:00
Matthew Allum
6216ce659c 2007-10-10 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-actor.c:
        * clutter/clutter-actor.h:
        * clutter/clutter-event.c:
        * clutter/clutter-main.c:
        * tests/test-events.c:
        Add basic W3 DOM  event 'capture' like functionality.
2007-10-10 13:04:34 +00:00
Matthew Allum
8faf9b9964 2007-10-10 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-actor.c:
        * clutter/clutter-actor.h:
        Add missing enter/leave event signals

        * clutter/clutter-main.c: (clutter_do_event):
        Set time in crossing events.
        Protect against do_pick() failing.
2007-10-09 23:45:49 +00:00
Matthew Allum
34a40de3c5 2007-10-08 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-actor.c:
        * clutter/clutter-actor.h:
        * clutter/clutter-private.h:
        * clutter/clutter-main.c:
        Add a hash to global clutter context mapping all parented actor
        id's to actors.
        Add clutter_get_actor_by_id() call.
        Convert picking machinery to use above.
        (performance/simpler composite actor creation)

        * clutter/clutter-stage.c: (clutter_stage_fullscreen),
        (clutter_stage_unfullscreen), (clutter_stage_event):
        Only set the fullscreen property on stage state fullscreen event(#545)
        Experimental as could be painful to implement on non X backends.
2007-10-08 16:18:33 +00:00
Emmanuele Bassi
991562f536 2007-10-08 Emmanuele Bassi <ebassi@openedhand.com>
Initial implementation of the UI definition files. (#424)

	* clutter/json/Makefile.am:
	* clutter/json/*.[ch]: In-tree copy of JSON-GLib, a GLib-based
	JSON parser/generator library. We use it in-tree because we might
	need to change the API. Ideally, we'd depend on it.

	* clutter/clutter.h:
	* clutter/clutter-script-private.h:
	* clutter/clutter-script.[ch]: ClutterScript, the scenegraph
	generator class. It parses JSON streams in form of buffers and
	files and builds the scene.

	* clutter/clutter-debug.h:
	* clutter/clutter-main.c: Add a "script" debug flag

	* clutter/Makefile.am: Build glue.

	* tests/Makefile.am:
	* tests/test-script.c: Add a test case for the ClutterScript.

	* configure.ac: Depend on GLib 2.14, so we can use the
	g_hash_table_get_key() and g_hash_table_get_values() functions
	for the time being; we can probably reimplement those, but we
	are going to need 2.14 anyway if we are going to implement a
	list model using GSequence.
2007-10-08 15:03:22 +00:00
Matthew Allum
bc13e907cc 2007-10-03 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-actor.c:
        * clutter/clutter-event.c:
        * clutter/clutter-event.h:
        * clutter/clutter-main.c:
        * clutter/clutter-private.h:
        * clutter/eglnative/clutter-event-egl.c:
        * clutter/eglx/clutter-event-egl.c:
        * clutter/glx/clutter-event-glx.c:
        * clutter/sdl/clutter-event-sdl.c:
        Remove seperate double/triple click events and replace with
        a click_count member.
        Move calculating click counts from backend to do_event()
        Initial implementation of ENTER/LEAVE events.

        * tests/test-events.c:
        Add code to test above.

        * tests/test-behave.c:
        Sync with newer API.

        * clutter/clutter-score.c:
        Silence a warning.
2007-10-03 09:28:16 +00:00
Emmanuele Bassi
090c1d11b4 2007-10-01 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.[ch]: Remove the ::event-after signal
	class handler, as it's not meant to be overridden by sub-classes.

	(clutter_actor_class_init):
	Make every event-related signal return a boolean: return TRUE
	in a signal handler to block the emission. The value is accumulated
	automatically by the signal API.

	(clutter_actor_event): If ::event returns TRUE, skip to emitting
	::event-after. Return the value accumulated by the signal emission
	chain.

	* clutter/clutter-private.h: Rename _clutter_boolean_accumlator().

	* clutter/clutter-main.c (clutter_do_event): If clutter_actor_event()
	returns TRUE then stop the event emission chain from child to parent.

	* clutter/clutter-stage.c (clutter_stage_event): Behave like
	clutter_actor_event().

	(clutter_stage_get_key_focus),
	(clutter_stage_set_key_focus): Avoid a nasty circular reference
	issue: if the actor passed to set_key_focus is NULL then the stage
	has the key focus.

	* tests/test-events.c: Update the events test with the API
	changes.
2007-10-02 14:03:36 +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
Matthew Allum
818a667836 2007-08-29 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-main.c: (_clutter_do_pick):
        Call glFinish before reading pixels
        * clutter/eglx/clutter-stage-egl.c: (clutter_stage_egl_realize):
        Add missing read surface in making context current.
        Above fixes via Kate Alhola.

        * clutter/glx/clutter-glx.h:
        Add missing filter funcs so there actually exported
2007-08-29 19:11:18 +00:00