From a1958da910e6901ad0c962e852833382ceb6fb77 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 14 Jun 2007 15:29:52 +0000 Subject: [PATCH] 2007-06-14 Emmanuele Bassi * clutter/clutter-box.[ch]: Base class for layout containers. * clutter/clutter-hbox.[ch]: Horizontal box actor. * clutter/clutter-vbox.[ch]: Vertical box actor. * clutter/clutter.h: * clutter/Makefile.am: Build glue * tests/Makefile.am: * tests/test-boxes.c: Test suite for ClutterBox API and implementations. --- ChangeLog | 15 ++++ clutter/Makefile.am | 10 ++- clutter/clutter-actor.c | 22 +++--- clutter/clutter-actor.h | 3 +- clutter/clutter.h | 44 ++++++------ doc/reference/ChangeLog | 8 +++ doc/reference/clutter-docs.sgml | 110 ++++++++++++++++++++--------- doc/reference/clutter-sections.txt | 77 ++++++++++++++++++++ doc/reference/clutter.types | 4 +- tests/Makefile.am | 6 +- 10 files changed, 229 insertions(+), 70 deletions(-) diff --git a/ChangeLog b/ChangeLog index fea341cfc..7d451f32b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2007-06-14 Emmanuele Bassi + + * clutter/clutter-box.[ch]: Base class for layout containers. + + * clutter/clutter-hbox.[ch]: Horizontal box actor. + + * clutter/clutter-vbox.[ch]: Vertical box actor. + + * clutter/clutter.h: + * clutter/Makefile.am: Build glue + + * tests/Makefile.am: + * tests/test-boxes.c: Test suite for ClutterBox API and + implementations. + 2007-06-14 Matthew Allum * clutter/cogl/gl/cogl.c: (cogl_check_extension): diff --git a/clutter/Makefile.am b/clutter/Makefile.am index 1ef22e6be..bba83e5e6 100644 --- a/clutter/Makefile.am +++ b/clutter/Makefile.am @@ -46,6 +46,7 @@ source_h = \ $(srcdir)/clutter-behaviour-path.h \ $(srcdir)/clutter-behaviour-rotate.h \ $(srcdir)/clutter-behaviour-scale.h \ + $(srcdir)/clutter-box.h \ $(srcdir)/clutter-clone-texture.h \ $(srcdir)/clutter-color.h \ $(srcdir)/clutter-container.h \ @@ -54,6 +55,7 @@ source_h = \ $(srcdir)/clutter-feature.h \ $(srcdir)/clutter-fixed.h \ $(srcdir)/clutter-group.h \ + $(srcdir)/clutter-hbox.h \ $(srcdir)/clutter-keysyms.h \ $(srcdir)/clutter-label.h \ $(srcdir)/clutter-layout.h \ @@ -67,6 +69,7 @@ source_h = \ $(srcdir)/clutter-effect.h \ $(srcdir)/clutter-units.h \ $(srcdir)/clutter-util.h \ + $(srcdir)/clutter-vbox.h \ $(srcdir)/clutter-version.h \ $(NULL) @@ -139,15 +142,18 @@ source_c = \ clutter-behaviour-path.c \ clutter-behaviour-rotate.c \ clutter-behaviour-scale.c \ + clutter-box.c \ clutter-color.c \ clutter-container.c \ clutter-clone-texture.c \ + clutter-effect.c \ + clutter-entry.c \ clutter-enum-types.c \ clutter-event.c \ - clutter-entry.c \ clutter-feature.c \ clutter-fixed.c \ clutter-group.c \ + clutter-hbox.c \ clutter-label.c \ clutter-layout.c \ clutter-main.c \ @@ -158,8 +164,8 @@ source_c = \ clutter-texture.c \ clutter-timeline.c \ clutter-timeout-pool.c \ - clutter-effect.c \ clutter-util.c \ + clutter-vbox.c \ $(NULL) source_h_priv = \ diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index 492f8a521..328aaa107 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -942,9 +942,9 @@ clutter_actor_query_coords (ClutterActor *self, static void clutter_actor_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec) + guint prop_id, + const GValue *value, + GParamSpec *pspec) { ClutterActor *actor; @@ -957,23 +957,23 @@ clutter_actor_set_property (GObject *object, { case PROP_X: clutter_actor_set_position (actor, - g_value_get_int (value), - clutter_actor_get_y (actor)); + g_value_get_int (value), + clutter_actor_get_y (actor)); break; case PROP_Y: clutter_actor_set_position (actor, - clutter_actor_get_x (actor), - g_value_get_int (value)); + clutter_actor_get_x (actor), + g_value_get_int (value)); break; case PROP_WIDTH: clutter_actor_set_size (actor, - g_value_get_int (value), - clutter_actor_get_height (actor)); + g_value_get_int (value), + clutter_actor_get_height (actor)); break; case PROP_HEIGHT: clutter_actor_set_size (actor, - clutter_actor_get_width (actor), - g_value_get_int (value)); + clutter_actor_get_width (actor), + g_value_get_int (value)); break; case PROP_OPACITY: clutter_actor_set_opacity (actor, g_value_get_uchar (value)); diff --git a/clutter/clutter-actor.h b/clutter/clutter-actor.h index 555a24c52..7c2705855 100644 --- a/clutter/clutter-actor.h +++ b/clutter/clutter-actor.h @@ -151,7 +151,8 @@ struct _ClutterActorClass ClutterActor *old_parent); void (* destroy) (ClutterActor *actor); - void (* pick) (ClutterActor *actor, const ClutterColor *color); + void (* pick) (ClutterActor *actor, + const ClutterColor *color); /* padding for future expansion */ void (*_clutter_actor_1) (void); diff --git a/clutter/clutter.h b/clutter/clutter.h index 9d3e2c8f4..859adf9c8 100644 --- a/clutter/clutter.h +++ b/clutter/clutter.h @@ -26,14 +26,10 @@ #ifndef _HAVE_CLUTTER_H #define _HAVE_CLUTTER_H -#include "clutter-keysyms.h" -#include "clutter-main.h" +#include "clutter-actor.h" +#include "clutter-alpha.h" #include "clutter-color.h" -#include "clutter-util.h" -#include "clutter-event.h" -#include "clutter-entry.h" -#include "clutter-timeout-pool.h" -#include "clutter-timeline.h" +#include "clutter-container.h" #include "clutter-behaviour.h" #include "clutter-behaviour-bspline.h" #include "clutter-behaviour-ellipse.h" @@ -41,21 +37,29 @@ #include "clutter-behaviour-path.h" #include "clutter-behaviour-rotate.h" #include "clutter-behaviour-scale.h" -#include "clutter-effect.h" -#include "clutter-stage.h" -#include "clutter-actor.h" -#include "clutter-rectangle.h" -#include "clutter-container.h" -#include "clutter-layout.h" -#include "clutter-group.h" -#include "clutter-texture.h" +#include "clutter-box.h" #include "clutter-clone-texture.h" -#include "clutter-label.h" -#include "clutter-alpha.h" -#include "clutter-media.h" +#include "clutter-effect.h" +#include "clutter-entry.h" +#include "clutter-event.h" #include "clutter-feature.h" -#include "clutter-version.h" -#include "clutter-enum-types.h" +#include "clutter-rectangle.h" +#include "clutter-group.h" +#include "clutter-hbox.h" +#include "clutter-keysyms.h" +#include "clutter-label.h" +#include "clutter-layout.h" +#include "clutter-main.h" +#include "clutter-media.h" +#include "clutter-stage.h" +#include "clutter-texture.h" +#include "clutter-timeout-pool.h" +#include "clutter-timeline.h" #include "clutter-units.h" +#include "clutter-util.h" +#include "clutter-vbox.h" +#include "clutter-version.h" + +#include "clutter-enum-types.h" #endif diff --git a/doc/reference/ChangeLog b/doc/reference/ChangeLog index 7bdecd902..1ec9e69d5 100644 --- a/doc/reference/ChangeLog +++ b/doc/reference/ChangeLog @@ -1,3 +1,11 @@ +2007-06-14 Emmanuele Bassi + + * clutter-sections.txt: + * clutter.types: + * clutter-docs.sgml: Add ClutterBox and subclasses. Rework + the layout of the API reference, now that we have fairly more + classes. + 2007-06-09 Emmanuele Bassi * clutter-sections.txt: Add ClutterTimeoutPool API. diff --git a/doc/reference/clutter-docs.sgml b/doc/reference/clutter-docs.sgml index ab1c6e706..f21870aea 100644 --- a/doc/reference/clutter-docs.sgml +++ b/doc/reference/clutter-docs.sgml @@ -37,8 +37,11 @@ - + Clutter Overview + + + Clutter is a GObject based library for creating fast, visually @@ -62,35 +65,71 @@ modify a property as a function of time. - - - Clutter Actors And Objects - - - - - - - - - - - - - - - Clutter Behaviours - - - - - - - - - - + + + + + + Clutter Core Reference + + + Abstract Classes and Interfaces + + + + + + + + + Base Actors + + + + + + + + + + Container Actors + + + + + + + + + Clutter Animation Support + + + Base Classes + + + + + + + Clutter Behaviours + + + + + + + + + + Simple Effects + + + + + + Clutter Tools + @@ -98,14 +137,19 @@ - - + + + Clutter Backends + - - + + + + Index + License diff --git a/doc/reference/clutter-sections.txt b/doc/reference/clutter-sections.txt index e16804ffa..5e5812c4b 100644 --- a/doc/reference/clutter-sections.txt +++ b/doc/reference/clutter-sections.txt @@ -856,3 +856,80 @@ CLUTTER_ENTRY_GET_CLASS ClutterEntryPrivate clutter_entry_get_type + +
+clutter-box +ClutterBox +ClutterBox +ClutterBoxClass +clutter_box_set_spacing +clutter_box_get_spacing +clutter_box_pack_start +clutter_box_pack_end +clutter_box_query_child +clutter_box_query_nth_child + +CLUTTER_TYPE_BOX +CLUTTER_BOX +CLUTTER_IS_BOX +CLUTTER_BOX_CLASS +CLUTTER_IS_BOX_CLASS +CLUTTER_BOX_GET_CLASS + +clutter_box_get_type +
+ +
+clutter-effects +Clutter Effects +ClutterEffectTemplate +ClutterEffectTemplaceClass +clutter_effect_template_new +ClutterEffectCompleteFunc +clutter_effect_fade +clutter_effect_move +clutter_effect_scale + +CLUTTER_TYPE_EFFECT_TEMPLATE +CLUTTER_EFFECT_TEMPLATE +CLUTTER_IS_EFFECT_TEMPLATE +CLUTTER_EFFECT_TEMPLATE_CLASS +CLUTTER_IS_EFFECT_TEMPLATE_CLASS +CLUTTER_EFFECT_TEMPLATE_GET_CLASS + +clutter_effect_template_get_type +
+ +
+clutter-hbox +ClutterHBox +ClutterHBox +ClutterHBoxClass +clutter_hbox_new + +CLUTTER_TYPE_HBOX +CLUTTER_HBOX +CLUTTER_IS_HBOX +CLUTTER_HBOX_CLASS +CLUTTER_IS_HBOX_CLASS +CLUTTER_HBOX_GET_CLASS + +clutter_hbox_get_type +
+ +
+clutter-vbox +ClutterVBox +ClutterVBox +ClutterVBoxClass +clutter_vbox_new + +CLUTTER_TYPE_VBOX +CLUTTER_VBOX +CLUTTER_IS_VBOX +CLUTTER_VBOX_CLASS +CLUTTER_IS_VBOX_CLASS +CLUTTER_VBOX_GET_CLASS + +clutter_vbox_get_type +
diff --git a/doc/reference/clutter.types b/doc/reference/clutter.types index 74df12883..8bafd3041 100644 --- a/doc/reference/clutter.types +++ b/doc/reference/clutter.types @@ -19,5 +19,7 @@ clutter_behaviour_path_get_type clutter_behaviour_rotate_get_type clutter_behaviour_scale_get_type clutter_backend_get_type -clutter_vertices_get_type clutter_entry_get_type +clutter_box_get_type +clutter_hbox_get_type +clutter_vbox_get_type diff --git a/tests/Makefile.am b/tests/Makefile.am index 3d55f039c..18ed66974 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,5 +1,6 @@ noinst_PROGRAMS = test-textures test-events test-offscreen test-scale \ - test-actors test-behave test-text test-entry test-project + test-actors test-behave test-text test-entry test-project \ + test-boxes INCLUDES = -I$(top_srcdir)/ LDADD = $(top_builddir)/clutter/libclutter-@CLUTTER_FLAVOUR@-@CLUTTER_MAJORMINOR@.la @@ -14,4 +15,5 @@ test_actor_SOURCES = test-actors.c test_behave_SOURCES = test-behave.c test_text_SOURCES = test-text.c test_entry_SOURCES = test-entry.c -test_project_SOURCES = test-project.c \ No newline at end of file +test_project_SOURCES = test-project.c +test_boxes_SOURCES = test-boxes.c