Merge branch 'master' of https://vcs.maemo.org/git/livewp
authorVlad <vlad@gas.by>
Thu, 29 Jul 2010 13:33:47 +0000 (16:33 +0300)
committerVlad <vlad@gas.by>
Thu, 29 Jul 2010 13:33:47 +0000 (16:33 +0300)
1  2 
applet/src/livewp-scene.c

@@@ -56,6 -56,58 +56,58 @@@ reload_scene(AWallpaperPlugin *desktop_
      init_scene_theme(desktop_plugin);
  }
  
+ void 
+ init_scene_Accel(AWallpaperPlugin *desktop_plugin)
+ {
+     Actor *actor;
+     Scene *scene;
+     GPtrArray *child;
+     gint now = time(NULL);
+     gchar *str;
+     gint sizes[4] = {170, 229, 130, 150}, 
+         sizes1[4] = {57, 76, 43, 50},
+         heights[4] = {0, 100, 200, 300}, 
+         n, i, j;
+     
+     fprintf(stderr, "init scene accel\n");
+     scene = g_new0(Scene, 1);
+     scene->actors = NULL;
+     desktop_plugin->priv->scene = scene;
+     
+     actor = init_object(desktop_plugin, "background", "bg.png", 
+                       0, 0, 0, 800, 480, 
+                       TRUE, TRUE, 100, 255, 
+                       NULL, NULL, NULL);
+     scene->actors = g_slist_append(scene->actors, actor);
+     child = g_ptr_array_sized_new(16);
+     
+     for (j= 0; j<4; j++){
+     for (n=0; n<4; n++){
+         //for (i=0; i<3; i++){
+             str = g_strdup_printf("tape%i.png", n+1);
+             actor = init_object(desktop_plugin, "tape", str,
+                                 fast_rnd(800), fast_rnd(480), 2+fast_rnd(6), 800, sizes1[n],
+                                 TRUE, TRUE, 100, 255,
+                                 NULL, NULL, NULL);
+             scene->actors = g_slist_append(scene->actors, actor);
+             g_ptr_array_add(child, actor);
+             g_free(str);
+         //}
+     }
+     }
+     actor = init_object(desktop_plugin, "tape", "", 
+                       0, 800, 5, 800, 170, 
+                       FALSE, FALSE, 100, 255, 
+                       (gpointer)&change_tape, NULL, child);
+     actor->time_start_animation = now;
+     actor->duration_animation = G_MAXINT;
+     scene->actors = g_slist_append(scene->actors, actor);
+     run_long_timeout(desktop_plugin);
+ }
  void  
  parsestring(char *line, char **argv)
  {
@@@ -92,17 -144,23 +144,17 @@@ bus_call (GstBus *bus, GstMessage *msg
      switch (GST_MESSAGE_TYPE (msg))
      {
         case GST_MESSAGE_EOS: 
 -           fprintf(stderr,"GST_MESSAGE_EOS:\n");
             if (desktop_plugin->priv->rich_animation){
 -                fprintf(stderr,"GST_MESSAGE_EOS222222222222222222222222\n");
 -                GstClockTime nach   = (GstClockTime)(10 * GST_MSECOND);
 -                if (!gst_element_seek(desktop_plugin->priv->pipeline, 1.0, GST_FORMAT_TIME, (GstSeekFlags) (GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT), GST_SEEK_TYPE_SET, nach, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE))
 -                    fprintf(stderr,"ERROR in seek\n");
 -
 -
 -
  
 +                GstClockTime nach   = (GstClockTime)(0 * GST_MSECOND);
 +                if (!gst_element_seek(desktop_plugin->priv->pipeline, 1.0, GST_FORMAT_TIME,
 +                   (GstSeekFlags) (GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT), GST_SEEK_TYPE_SET, 
 +                   nach, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE))
 +                    fprintf(stderr,"ERROR in seek\n");
  
 -//                gst_element_set_state (desktop_plugin->priv->pipeline, GST_STATE_READY);
 -
 -//                gst_element_set_start_time(desktop_plugin->priv->pipeline, 0);
                  gst_element_set_state (desktop_plugin->priv->pipeline, GST_STATE_PLAYING);
 +
             }else{
 -                   fprintf(stderr,"GST_MESSAGE_EOS33333333333333333333\n");
                     if (desktop_plugin->priv->pipeline){                                                                                                                                                                                                                                             gst_element_set_state (desktop_plugin->priv->pipeline, GST_STATE_NULL);                                                                                                                                                                                                        gst_object_unref (GST_OBJECT (desktop_plugin->priv->pipeline));                                                                                                                                                                                          
                     } 
             }