1
0
Fork 0
Commit graph

2219 commits

Author SHA1 Message Date
Emmanuele Bassi
4d52245637 [json] Update the internal copy of JSON-GLib
JSON-GLib switch to 64 bit integers upstream, to avoid the undefined
integer size of the JSON RFC. All integers are automatically promoted
to gint64.
2009-08-12 16:00:13 +01:00
Emmanuele Bassi
2b70b0d4ed Include clutter-json.h, not json-types.h
The json-types.h header is found by the mere fact of it being
in the project; if we are compiling against the system JSON-GLib
this could be horribly out of date.

We need to use clutter-json.h, which will include the right
header for us.
2009-08-12 15:57:25 +01:00
Emmanuele Bassi
cc6aa6e4d5 Clutter GIR depends on ClutterJson GIR conditionally
If we're building Clutter with a system JSON-GLib we need to skip
the typelib compilation of ClutterJson since we depend on Json-1.0.gir
directly.
2009-08-12 15:32:18 +01:00
Emmanuele Bassi
6fcf5c1820 [json] Include only json-glib.h
JSON-GLib moved to a single include scheme, so we should only include
json-glib.h. If we use the internal copy it doesn't matter, since the
header does the right thing.
2009-08-12 15:31:16 +01:00
Emmanuele Bassi
8c49e22753 Add copyright and license notice
The clutter-script-parser.c does not have a copyright and license
notices; even though the LGPL is a per-project license and not a
per-file license, having those notices in every source file is a
good idea.
2009-08-12 10:30:11 +01:00
zhou jiangwei
13e055a351 [eglx] Update the EGLX backend
The EGLX backend needs to be updated to the new ClutterBackendX11
code.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2009-08-11 14:19:24 +01:00
zhou jiangwei
2ab9bef587 [cogl] Fix the GLES 2.0 backend
Update the GLES 2.0 backend to the new COGL API after the breakage
introduced by the journal.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2009-08-11 14:19:24 +01:00
Robert Bragg
dbfd3f0f44 [cogl_clear] Also pass the alpha component of the CoglColor to glClearColor
Previously we were passing a constant of 0.0 for the alpha component which
wasn't as flexible.
2009-08-11 14:15:44 +01:00
Emmanuele Bassi
f0cb337d92 [build] Fix LDADD -> LIBADD usage 2009-08-11 13:27:25 +01:00
Emmanuele Bassi
dfc32b60c4 [osx] Clean up Makefile.am
The OS X backend Makefile.am was missing a line concatenation, and
so the -xobjective-c directive was always ignored.

Instead of dumping everything into INCLUDES and LDADD we should follow
what the rest of the backends do, and use per-target CFLAGS and LDADD,
and reserve the INCLUDES to -D and -I directives.

Thanks to: Christian Hergert <chris@dronelabs.com>
2009-08-11 13:11:34 +01:00
Emmanuele Bassi
d0748b3b9b Merge branch 'system-json-glib'
* system-json-glib:
  [script] Simplify the parser code
  Update JSON-GLib dependency
2009-08-10 17:21:20 +01:00
Emmanuele Bassi
d263e7a78b [build] Install JSON headers inside the right directory
Don't install inside the clutter-MAJOR_MINOR/ directory, but use
the API_VERSION (1.0).

Otherwise we'd have the Clutter headers for 1.x inside:

        $includedir/clutter-1.0/clutter

And the JSON-related headers inside:

        $includedir/clutter-1.<minor>/clutter
2009-08-10 17:19:04 +01:00
Emmanuele Bassi
420ed353b5 [x11] Do not ask to destroy an empty Window
The fix for bug 1750 inside commit b190448e made Clutter-GTK spew
BadWindow errors. The reason for that is that we call XDestroyWindow()
without checking if the old Window is None; this happens if we call
clutter_x11_set_stage_foreign() on a new ClutterStage before it has
been realized.

Since Clutter-GTK does not need to realize the Stage it is going to
embed anymore (the only reason for that was to obtain a proper Visual
but now there's ClutterBackendX11 API for that), the set_stage_foreign()
call is effectively setting the StageX11 Window for the first time.
2009-08-07 08:26:18 +01:00
Emmanuele Bassi
335fb07ab0 [actor] Add missing return_if_fail()
The queue_relayout() method was missing the argument check.

Thanks to: Neil Patel <njpatel@gmail.com>
2009-08-05 17:50:31 +01:00
Neil Roberts
1434d72134 Small doc fix to clutter_text_get_color
Bug reported by Rob Bradford.
2009-08-05 15:51:49 +01:00
Emmanuele Bassi
b190448ed4 [x11] Destroy the Window we own when setting a foreign one
When we replace the stage Window using a foreign one we also need to
destroy the Window we created, if needed, to avoid leaking resources
all around.

Fixes bug:

  http://bugzilla.openedhand.com/show_bug.cgi?id=1750
2009-08-04 16:59:15 +01:00
Emmanuele Bassi
79288b46ed [docs] Fix a missing parameter 2009-08-04 11:38:48 +01:00
Emmanuele Bassi
9cda8d130f [actor] Be more explicit when warning about invariants
The "catch all" warning for a the mapped invariant violation is too
generic: it doesn't tell you why the invariant was broken in case
we are trying to map an unparented actor - e.g. through a Clone.
2009-08-04 11:15:05 +01:00
Emmanuele Bassi
f8a964b422 [cogl] Expose cogl_is_vertex_buffer()
The function is public and available in the shared object, but
it's not present in the header, so this is not an API/ABI change.
2009-08-04 11:15:05 +01:00
Damien Lespiau
c9c87543e8 [debug] CLUTTER_{NOTE,MARK,DBG,GLERR,TIMESTAMP} should always be statements
In case someone tries to do:
	if (foo)
		CLUTTER_NOTE(DOMAIN, "%s", blah);

CLUTTER_NOTE () should always be a statement
2009-08-03 14:25:09 +01:00
Damien Lespiau
cd35f3b384 [debug] Fix __GNUC__ typo
The right gcc define is __GNUC__ not __GNUC_. This typo had the side
effect that we were using the non gcc specific debug macros leading to
a less optmised CLUTTER_NOTE () than one could have dreamed of.
2009-08-03 14:25:09 +01:00
Damien Lespiau
94b35a4a5e [build] GCC_FLAGS is no more, MAINTAINER_CFLAGS is the One.
CC_FLAGS was a left over from the 0.8.x age. Killed it and use the
newer MAINTAINER_CFLAGS variable instead.
2009-08-03 14:25:08 +01:00
Emmanuele Bassi
b2ab2b9535 [actor] Use the right vertex
The vertex that should be used by the apply_relative_transform
is the one passed in as const, and the result should be placed
inside the non-const ClutterVertext. Currently, we are using
the latter, and thus the function is completely useless.
2009-08-02 18:34:17 +01:00
Emmanuele Bassi
ae2a861a0b [x11] Force a redraw before mapping the stage
Does as it says on the tin: run a paint cycle before calling
XMapWindow().
2009-07-31 10:29:33 +01:00
Emmanuele Bassi
77fdd7494e Fix compiler warnings when COGL debug level=minimum 2009-07-28 13:57:46 +01:00
Emmanuele Bassi
a5d6b23308 [units] Add binding-friendly initializers
We should follow the convention for boxed types initializers of:

  <type_name>_from_<another_type> (boxed, value)

For ClutterUnits as well; so:

  clutter_units_pixels -> clutter_units_from_pixels
  clutter_units_em     -> clutter_units_from_em
  ...

We should still keep the short-hand version as a macro, though.
2009-07-28 13:46:11 +01:00
Emmanuele Bassi
57baa2f0bc [animation] Fix variable use
Instead of using the proper typed variables we were overwriting
the gpointer for the Interval's final value.
2009-07-28 13:21:57 +01:00
Neil Roberts
f4ad3761c4 [win32] Remove the call to clutter_redraw in clutter_stage_win32_show
Since commit 7b811f8b this is done in clutter_stage_show so there is
no need for it in the backends.
2009-07-28 12:13:44 +01:00
Neil Roberts
df586eb507 [win32] Move the show/hide to be implementations of the interface
This makes clutter_stage_win32_show/hide be implementations of
ClutterStageWindowIface rather than overriding the methods in
ClutterActor. This reflects the changes in e4ff24bc for the X11
backend.
2009-07-28 12:13:44 +01:00
Ole André Vadla Ravnås
a1cef026c5 Avoid near/far identifier names.
Leads to conflict with system headers on Windows, where macros named
"near" and "far" are defined.
2009-07-28 12:13:44 +01:00
Ole André Vadla Ravnås
05883af1f6 Remove unused variable to fix compiler warning. 2009-07-28 12:13:44 +01:00
Ole André Vadla Ravnås
0157851270 Call glClientActiveTexture() through COGL context.
Fixes build issues on systems with OpenGL header older than 1.3.
2009-07-28 12:13:43 +01:00
Ole André Vadla Ravnås
f61f66c6fe Avoid C99 to fix compilation with compilers like MSVC. 2009-07-28 12:13:43 +01:00
Ole André Vadla Ravnås
ab5a10768c Initialize pixel data before glReadPixels(). 2009-07-28 12:13:43 +01:00
Haakon Sporsheim
e4eed92177 Reposition variable declarations to avoid C99. 2009-07-28 12:13:42 +01:00
Emmanuele Bassi
fa3728126f [animation] Force the final state inside ::completed
In case we are skipping too many frames, we should force the animation
instance to apply the final state of the animated interval inside the
::completed signal handler.
2009-07-28 11:43:05 +01:00
Emmanuele Bassi
42ea471e33 Remove explicit size of the Vertex arrays
The Vertex arrays passed to some ClutterActor methods should not
have the size. Albeit being technically correct, it's not a good
practice.
2009-07-27 16:10:07 +01:00
Emmanuele Bassi
fe0e7f9f74 [stage] Add a warning for :offscreen usage
The Stage:offscreen property hasn't been tested for ages, and it
should really just use a FBO, not indirect rendering on a X Pixmap
only on X11. There are better ways anyway to get the current
contents of ClutterStage as a buffer anyway.

We might remove it at any later date, or actually make it work
properly.
2009-07-27 15:42:31 +01:00
Emmanuele Bassi
6e6d0a5ea6 [glx] Explicitly set the depth size for GLX visuals
When requesting a GLX visual from the X server we should explicitly
set the GL_DEPTH_SIZE and the GL_ALPHA_SIZE bits, otherwise some
functionality might just not work, or work unreliably.

Fixes bug:

  http://bugzilla.openedhand.com/show_bug.cgi?id=1723
2009-07-27 15:08:03 +01:00
Emmanuele Bassi
88e77b25df Convert gint to GLints in the Shader types wrapper
The GValue wrappers for ClutterShader types should always store
values using GL types (GLfloat, GLint) internally, but give and
take generic C types (float, int) to the Clutter side.

Fixes bug:

  http://bugzilla.openedhand.com/show_bug.cgi?id=1359
2009-07-27 15:01:52 +01:00
Emmanuele Bassi
ad7dcc9896 [color] Fix HLS to RGB colorspace conversion
The HLS to RGB conversion in case the S value is zero is:

  R = G = B = luminance

ClutterColor uses a byte (0 to 255) for the R, G and B channels
encoding, while luminance is expressed using a floating point value
in the closed interval [0, 1]; thus the case above becomes:

  R = G = B = (luminance * 255)

The clutter_color_from_hls() code is missing the final step of
de-normalizing the luminance value, and so it breaks the roundtrip
colorspace conversion between RGB and HLS.

Fixes bug:

  http://bugzilla.openedhand.com/show_bug.cgi?id=1695
2009-07-27 12:04:40 +01:00
Owen W. Taylor
894fe4ba93 Always create the Damage object for ClutterX11TexturePixmap auto updates
If clutter_x11_texture_set_window() was called after
clutter_x11_texture_pixmap_set_automatic(), then the Damage object would
not be properly created so updates to the window were ignored.

Refactor creation of the damage object to a separate function, and
call it from clutter_x11_texture_set_window() and clutter_x11_texture_set_pixmap()
as appropriate. Addition and removal of the filter function is made
conditional on priv->damage to make free_damage_resources() cleanly
idempotent.

See: http://bugzilla.gnome.org/show_bug.cgi?id=587189 for the original
bug report.

http://bugzilla.openedhand.com/show_bug.cgi?id=1710

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2009-07-27 10:49:38 +01:00
Michael Mortensen
2c2f31b1be [osx] Update events to floating point coordinates
The event translation code should be using the float type for
coordinates.

Fixes bug:

  http://bugzilla.openedhand.com/show_bug.cgi?id=1725

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2009-07-27 10:45:26 +01:00
Emmanuele Bassi
13f32cb3b9 [osx] Implement StageWindow::show/::hide
Instead of using the Actor class ::show and ::hide virtual function,
use the StageWindow interface API.

Fixes bug:

  http://bugzilla.openedhand.com/show_bug.cgi?id=1724
2009-07-26 20:10:42 +01:00
Emmanuele Bassi
e860d939f9 [text] Allow key navigation by word
When pressing Ctrl with the left and right arrow keys we should
skip to (or select until) the previous and next word, respectively.

Fixes bug:

  http://bugzilla.openedhand.com/show_bug.cgi?id=1713
2009-07-23 19:04:27 +01:00
Geoff Gustafson
6a1506bd5f [text] Queue a redraw when the selection is cleared
If you select all the text in a ClutterText, there is an invisible
cursor position either at the beginning or end. If it's at the beginning,
the bug is that left arrow won't clear the selection. If it's at the end,
the bug is that the right arrow won't.

Here are the ways to reproduce it:

a. Ctrl-A selects all and moves the hidden cursor position to the left.
b. For single line: End, Shift-Home does the same.
c. Or manually moving to the end and doing Shift-Left Arrow to the
   beginning.

These all put it in the state where right arrow will properly clear
selection and move to cursor position 1, but left arrow fails to clear
the selection.

For b and c above, the opposite will give you the end case where right
arrow doesn't work.

Anyway, it turns out clear_selection is getting called, it just doesn't
show up because it's not doing a queue_redraw. So the attached patch
seems to fix things.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2009-07-23 18:26:16 +01:00
Emmanuele Bassi
fdfd208c04 Fix copy-and-paste errors in the deprecation macros
Fixes bug:

  http://bugzilla.openedhand.com/show_bug.cgi?id=1704
2009-07-21 09:22:38 +01:00
Emmanuele Bassi
eff857bc7f [docs] Improve the Units to and from string conversion
Make sure to document the conversion to and from strings for ClutterUnits,
with negative examples and with the behaviour for fractionary bits.
2009-07-20 20:59:18 +01:00
Emmanuele Bassi
b1d98c25f4 [doc] Miscellaneous documentation fixes
Remove private symbols, and add missing public ones.
2009-07-20 12:49:35 +01:00
Emmanuele Bassi
cdb239756b [cogl] Make the blend string error domain public
The error domain and codes must present in a publicly installed header
otherwise they won't be usable to match a GError.
2009-07-20 12:47:53 +01:00