2007-01-16 Matthew Allum <mallum@openedhand.com>
authorMatthew Allum <mallum@openedhand.com>
Tue, 16 Jan 2007 14:19:39 +0000 (14:19 +0000)
committerMatthew Allum <mallum@openedhand.com>
Tue, 16 Jan 2007 14:19:39 +0000 (14:19 +0000)
        * NEWS:
        Minor tweaks

        * TODO:
        Sync up, mainly with 0.3 todo items

        * clutter/clutter-behaviour.c:
        * clutter/clutter-behaviour.h:
        clutter_behaviour_get_n_actors() / clutter_behaviour_get_nth_actor()
        Additions.

        * clutter/clutter-stage.c: (clutter_stage_realize):
        Experimental (disabled) visual setting code.

        * clutter/clutter-feature.c:
        Check for GL_EXT_texture_rectangle (#198  - Frederick Riss)

        * clutter/clutter-group.c: (clutter_group_allocate_coords):
        Fix for group size allocation (#199 -  Frederick Riss)

        * clutter/clutter-texture.c: (texture_upload_data):
        Fix texture unpacking row length (#197 Frederick Riss)

        * examples/Makefile.am:
        Fix LDADD in build (#196 - Frederick Riss)

ChangeLog
NEWS
TODO
clutter/clutter-behaviour.c
clutter/clutter-behaviour.h
clutter/clutter-feature.c
clutter/clutter-group.c
clutter/clutter-stage.c
clutter/clutter-texture.c
examples/Makefile.am

index f88f959..55e3102 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,31 @@
+2007-01-16  Matthew Allum  <mallum@openedhand.com>
+
+       * NEWS:
+       Minor tweaks
+
+       * TODO:
+       Sync up, mainly with 0.3 todo items
+
+       * clutter/clutter-behaviour.c:
+       * clutter/clutter-behaviour.h:
+       clutter_behaviour_get_n_actors() / clutter_behaviour_get_nth_actor()
+       Additions.
+
+       * clutter/clutter-stage.c: (clutter_stage_realize):
+       Experimental (disabled) visual setting code.
+
+       * clutter/clutter-feature.c:
+       Check for GL_EXT_texture_rectangle (#198  - Frederick Riss)
+
+       * clutter/clutter-group.c: (clutter_group_allocate_coords):
+       Fix for group size allocation (#199 -  Frederick Riss)  
+
+       * clutter/clutter-texture.c: (texture_upload_data):
+       Fix texture unpacking row length (#197 Frederick Riss)
+       
+       * examples/Makefile.am:
+       Fix LDADD in build (#196 - Frederick Riss)
+
 2007-01-16  Tomas Frydrych  <tf@openedhand.com>
        
        * clutter/clutter-fixed.h:
diff --git a/NEWS b/NEWS
index 82cead6..05cb83e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -10,7 +10,7 @@ Clutter 0.2 ()
      be destroyed.
    o Add basic run-time detection of GL features.
      + Use GL_TEXTURE_RECTANGLE_ARB if available.
-     + Attempt to set up sync to vblank
+     + Attempt to set up sync to vblank (set CLUTTER_VBLANK=none to disable)
    o Add API for behaviours. A ClutterBehaviour is an object which
      drives a set of actors using one or more properties depending
      on the value of an "alpha" function.
diff --git a/TODO b/TODO
index 0ea63c0..6493348 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,37 +1,29 @@
 TODO
 ====
 
-Posiible New Features
+New Features
 ==
 
- - Gradients
- - Some kind of glitz/cairo integration - a GlitzDrawable Actor ?
  - More portability - GL ES, DirectFB?, Windows, Mac ?
- - Overhaul co-ordinate system ( more precision ? )
- - Width-for-height allocation of the actors (esp. ClutterLabel)
- - Complete over-haul of the ClutterMedia interface
-   o remove the accessors from the vfuncs and use pure properties
-   o add a way to get a timeline from the media source, to be
-     used inside a ClutterAlpha and drive a behaviour
-   o add signals for start and stop
- - Move the events to the actors instead of the stage
-   o add an event queue to clutter so that we can push/pop the
-     events from it
-   o add support for mouse double click and scroll events
- - Add focus handling API
- - Add an entry actor
+   (See backends branch, GL ES for 0.3)
+ - Text entry actor (0.3).
+ - VBox and HBox ClutterGroup subclasses (0.3). 
+ - Figure out focus model + binding events to actors (0.3).
+ - Fragment shading ?
+ - Gradients
+ - More drawing primitives (or just cairo?)
 
 Optimisations
 ==
 
  - Display lists.
- - labels being more conservative on texture creation.
-   o blitting to textures less
  - Custom source rather than idle handler for paints ?
+ - General oprofiling.
  
 Other
 ==
  - Unit tests
  - Much improved examples / demos
- - Sort Documentation
  - Bindings to languages other than just Python and Perl.
+ - Improve documentation.
+ - Overhaul co-ordinate system ( more precision ? )
\ No newline at end of file
index 535aec9..844c916 100644 (file)
@@ -245,6 +245,45 @@ clutter_behaviour_remove (ClutterBehaviour *behave,
 }
 
 /**
+ * clutter_behaviour_get_n_actors:
+ * @behave: a #ClutterBehaviour
+ *
+ * Gets the number of actors this behaviour is applied too.
+ *
+ * Return value: The number of applied actors 
+ *
+ * Since: 0.2
+ */
+gint
+clutter_behaviour_get_n_actors (ClutterBehaviour *behave)
+{
+  g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR (behave), 0);
+
+  return g_list_length (behave->priv->actors);
+}
+
+/**
+ * clutter_behaviour_get_nth_actor:
+ * @behave: a #ClutterBehaviour
+ * @num:  the index of an actor this behaviour is applied too. 
+ *
+ * Gets an actor the behaviour was applied to referenced by index num.
+ *
+ * Return value: A Clutter actor or NULL if index is invalid.
+ *
+ * Since: 0.2
+ */
+ClutterActor*
+clutter_behaviour_get_nth_actor (ClutterBehaviour *behave,
+                                gint              num)
+{
+  g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR (behave), NULL);
+
+  return g_list_nth_data (behave->priv->actors, num);
+}
+
+
+/**
  * clutter_behaviour_actors_foreach:
  * @behave: a #ClutterBehaviour
  * @func: a function called for each actor
index f4bc3a2..ad96658 100644 (file)
@@ -105,6 +105,13 @@ void          clutter_behaviour_remove         (ClutterBehaviour            *beh
 void          clutter_behaviour_actors_foreach (ClutterBehaviour            *behave,
                                                 ClutterBehaviourForeachFunc  func,
                                                 gpointer                     data);
+gint           clutter_behaviour_get_n_actors (ClutterBehaviour *behave);
+
+ClutterActor*  clutter_behaviour_get_nth_actor (ClutterBehaviour *behave,
+                                               gint              num);
+
+
+
 GSList *      clutter_behaviour_get_actors     (ClutterBehaviour            *behave);
 ClutterAlpha *clutter_behaviour_get_alpha      (ClutterBehaviour            *behave);
 void          clutter_behaviour_set_alpha      (ClutterBehaviour            *behave,
index f11cc83..2390d15 100644 (file)
@@ -253,7 +253,8 @@ clutter_feature_init (void)
   glx_extensions = glXQueryExtensionsString (clutter_xdisplay (),
                                              clutter_xscreen ());
   
-  if (check_gl_extension ("GL_ARB_texture_rectangle", gl_extensions))
+  if (check_gl_extension ("GL_ARB_texture_rectangle", gl_extensions)
+      || check_gl_extension ("GL_EXT_texture_rectangle", gl_extensions))
     __features->flags |= CLUTTER_FEATURE_TEXTURE_RECTANGLE;
 
   /* vblank */
index 6a8ce23..9f0fcfe 100644 (file)
@@ -131,7 +131,7 @@ clutter_group_allocate_coords (ClutterActor    *self,
              if (box->x2 == 0 || cbox.x2 > box->x2)
                box->x2 = cbox.x2;
 
-             if (box->y2 == 0 || cbox.y2 < box->y2)
+             if (box->y2 == 0 || cbox.y2 > box->y2)
                box->y2 = cbox.y2;
            }
        }
@@ -265,7 +265,7 @@ clutter_group_get_children (ClutterGroup *self)
 gint
 clutter_group_get_n_children (ClutterGroup *self)
 {
-  g_return_val_if_fail (CLUTTER_IS_GROUP (self), NULL);
+  g_return_val_if_fail (CLUTTER_IS_GROUP (self), 0);
 
   return g_list_length (self->priv->children);
 }
index 28020a5..0637889 100644 (file)
@@ -405,11 +405,32 @@ clutter_stage_realize (ClutterActor *actor)
        };
 
       if (priv->xvisinfo)
-       XFree(priv->xvisinfo);
-
-      priv->xvisinfo = glXChooseVisual (clutter_xdisplay(),
-                                       clutter_xscreen(),
-                                       gl_attributes);
+       {
+         XFree(priv->xvisinfo);
+         priv->xvisinfo = None;
+       }
+#if 0
+      /* Attempted fix at GTK 'white' textures - made no difference :( */
+      if (priv->is_foreign_xwin && priv->xwin != None)
+       {
+         XWindowAttributes win_attr;
+         XVisualInfo       vis_info;
+         int               n;
+
+         XGetWindowAttributes (clutter_xdisplay(), priv->xwin, &win_attr);
+         vis_info.screen   = clutter_xscreen();
+         vis_info.visualid = XVisualIDFromVisual (win_attr.visual);
+         priv->xvisinfo = XGetVisualInfo (clutter_xdisplay(),
+                                          VisualScreenMask|VisualIDMask, 
+                                          &vis_info, &n);
+
+         printf("made %li\n", priv->xvisinfo);
+       }
+#endif
+      if (priv->xvisinfo == None)
+       priv->xvisinfo = glXChooseVisual (clutter_xdisplay(),
+                                         clutter_xscreen(),
+                                         gl_attributes);
       if (!priv->xvisinfo)
        {
          g_critical ("Unable to find suitable GL visual.");
index dd54b46..3320c3f 100644 (file)
@@ -539,12 +539,11 @@ texture_upload_data (ClutterTexture *texture,
 
        glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
 
-       glPixelStorei (GL_UNPACK_ROW_LENGTH, priv->width);
+       glPixelStorei (GL_UNPACK_ROW_LENGTH, src_w);
        glPixelStorei (GL_UNPACK_ALIGNMENT, 4);
        
        if (create_textures)
          {
-
            glTexImage2D(priv->target_type, 
                         0, 
                         (bpp == 4) ? 
index 89bb3df..5021f91 100644 (file)
@@ -1,27 +1,25 @@
 noinst_PROGRAMS = test super-oh behave
 
 INCLUDES = -I$(top_srcdir)/
+LDADD = $(top_builddir)/clutter/libclutter-@CLUTTER_MAJORMINOR@.la
 
 test_SOURCES = test.c
 test_CFLAGS = $(CLUTTER_CFLAGS) $(GCONF_CFLAGS)
 test_LDFLAGS = \
     $(CLUTTER_LIBS) \
-    $(GCONF_LIBS) \
-    $(top_builddir)/clutter/libclutter-@CLUTTER_MAJORMINOR@.la 
+    $(GCONF_LIBS) 
 
 super_oh_SOURCES = super-oh.c
 super_oh_CFLAGS = $(CLUTTER_CFLAGS) $(GCONF_CFLAGS)
 super_oh_LDFLAGS = \
     $(CLUTTER_LIBS) \
-    $(GCONF_LIBS) \
-    $(top_builddir)/clutter/libclutter-@CLUTTER_MAJORMINOR@.la 
+    $(GCONF_LIBS) 
 
 behave_SOURCES = behave.c
 behave_CFLAGS = $(CLUTTER_CFLAGS) $(GCONF_CFLAGS)
 behave_LDFLAGS = \
     $(CLUTTER_LIBS) \
-    $(GCONF_LIBS) \
-    $(top_builddir)/clutter/libclutter-@CLUTTER_MAJORMINOR@.la 
+    $(GCONF_LIBS) 
 
 
 EXTRA_DIST = redhand.png              \