Show
Ignore:
Timestamp:
10/22/09 18:22:03 (3 years ago)
Author:
mirko
Message:

Updated clutter experiments to work with clutter-1.0.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/clutter-experiments/pdfcube.hh

    r56 r57  
    5050      the_stage_m = clutter_stage_get_default(); 
    5151      clutter_actor_set_size(the_stage_m, 1024, 768); 
    52       clutter_color_parse("Black", &stage_color); 
     52      clutter_color_from_string(&stage_color, "Black"); 
    5353      clutter_stage_set_color(CLUTTER_STAGE(the_stage_m), &stage_color); 
    5454      return true; 
     
    8383      progress_label_m =  
    8484        clutter_text_new_full("Mono 36", "0%", &label_color); 
    85       guint screen_w, screen_h; 
     85      gfloat screen_w, screen_h; 
    8686      clutter_actor_get_size(CLUTTER_ACTOR(the_stage_m),  
    8787                             &screen_w, &screen_h); 
    8888      clutter_actor_set_position(progress_label_m,  
    89                                  screen_w>>1, screen_h>>1); 
     89                                 screen_w/2.0, screen_h/2.0); 
    9090      clutter_actor_set_anchor_point_from_gravity(progress_label_m,  
    9191                                                  CLUTTER_GRAVITY_CENTER); 
    92       clutter_group_add_many(CLUTTER_GROUP(the_stage_m),  
    93                              progress_label_m, NULL); 
     92      clutter_container_add_actor(CLUTTER_CONTAINER(the_stage_m),  
     93                                  progress_label_m); 
    9494      clutter_actor_show(the_stage_m); 
    9595      g_thread_create(render_thread, this, FALSE, NULL); 
     
    116116    { 
    117117      app* me = static_cast<app*>(data); 
    118       guint screen_w, screen_h; 
     118      gfloat screen_w, screen_h; 
    119119      clutter_actor_get_size(CLUTTER_ACTOR(me->the_stage_m),  
    120120                             &screen_w, &screen_h); 
     
    124124                                                  CLUTTER_GRAVITY_CENTER); 
    125125      clutter_actor_set_position(me->progress_label_m,  
    126                                  screen_w>>1, screen_h>>1); 
     126                                 screen_w/2.0, screen_h/2.0); 
    127127      return FALSE; 
    128128    } 
     
    132132    { 
    133133      app* me = static_cast<app*>(data); 
    134       clutter_group_remove(CLUTTER_GROUP(me->the_stage_m),  
    135                                         me->progress_label_m); 
     134      clutter_container_remove_actor(CLUTTER_CONTAINER(me->the_stage_m),  
     135                              me->progress_label_m); 
    136136      g_object_unref(me->progress_label_m); 
    137137 
     
    152152         &error); 
    153153 
    154       guint screen_w, screen_h; 
     154      gfloat screen_w, screen_h; 
    155155      clutter_actor_get_size(CLUTTER_ACTOR(me->the_stage_m),  
    156156                             &screen_w, &screen_h); 
     
    173173       
    174174      clutter_actor_set_size(me->current_page_m, w, h); 
    175       clutter_group_add_many(CLUTTER_GROUP(me->the_stage_m),  
    176                              me->current_page_m, NULL); 
     175      clutter_container_add_actor(CLUTTER_CONTAINER(me->the_stage_m),  
     176                            me->current_page_m); 
    177177      return FALSE; 
    178178    }