~ubuntu-branches/ubuntu/maverick/unity/maverick

« back to all changes in this revision

Viewing changes to unity-private/launcher/scroller-view.c

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-09-17 14:02:54 UTC
  • mfrom: (1.1.17 upstream)
  • Revision ID: james.westby@ubuntu.com-20100917140254-6cbue12klia2f07l
Tags: 0.2.40-0ubuntu1
* New upstream release:
  - Fix inactive menus accessible (LP: #604505)
  - Fix some more memory leaks (LP: #604777, #621690, #628144)
  - Fix weird behaviors of quicklist (LP: #617339)
  - Provide an "open this folder" button (LP: #633201)
  - Hidden menu causing gap (LP: #600191)
  - Cannot go fullscreen for flash videos (LP: #631381)
  - Can't access menu items from the keyboard (LP: #636728)
  - Don't register for MDRAGs since they aren't used (LP: #632613)
  - Don't run indicator on special launchers (LP: #627488)
  - Center arrows position in folded launcher tiles (LP: #633084)
  - Launcher icons first appear as white upon login (LP: #601093)
  - Removes jittering when rubber band is in use on the launcher (LP: #632991)
  - Mutter restarts on closing almost any application (LP: #634701)
  - Can't launch apps like synaptic with root privileges from launch bar
    (LP: #599298)
  - Launcher tile dragging shouldn't be masked (LP: #631443)
  - Fix Carousel-ed icons have distorted perspective (LP: #607515)
  - Use no longer sync call (LP: #620011)
* update debian/libunity0.symbols

Show diffs side-by-side

added added

removed removed

Lines of Context:
212
212
        gboolean do_logic_pick;
213
213
        float last_known_pointer_x;
214
214
        gboolean can_scroll;
 
215
        float last_known_x;
 
216
        float last_known_y;
215
217
        gboolean is_scrolling;
216
218
        float scroll_position;
217
219
        float settle_position;
251
253
        gboolean do_not_render;
252
254
        UnityLauncherScrollerChildController* controller;
253
255
        float grabbed_push;
 
256
        UnityUnityIcon* processed_icon;
254
257
};
255
258
 
256
259
struct _UnityLauncherScrollerChildClass {
363
366
static void unity_launcher_scroller_view_disable_animations_on_children (UnityLauncherScrollerView* self, ClutterEvent* event);
364
367
void unity_launcher_scroller_view_set_is_autoscrolling (UnityLauncherScrollerView* self, gboolean value);
365
368
static void unity_launcher_scroller_view_model_child_added (UnityLauncherScrollerView* self, UnityLauncherScrollerChild* child);
366
 
static void _lambda81_ (UnityLauncherScrollerView* self);
367
 
static void __lambda81__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
 
369
static void _vala_array_add2 (float** array, int* length, int* size, float value);
 
370
float unity_launcher_scroller_child_get_rotation (UnityLauncherScrollerChild* self);
 
371
static void _vala_array_add3 (float** array, int* length, int* size, float value);
 
372
static void unity_launcher_scroller_view_change_child_position_rotation (UnityLauncherScrollerView* self, UnityLauncherScrollerChild* child, float position, float rotation, gboolean immediate);
 
373
static void _lambda83_ (UnityLauncherScrollerView* self);
 
374
static void __lambda83__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
368
375
static void unity_launcher_scroller_view_model_child_removed (UnityLauncherScrollerView* self, UnityLauncherScrollerChild* child);
369
376
#define UNITY_LAUNCHER_SHORT_DELAY ((guint) 400)
370
 
static void _lambda82_ (Block13Data* _data13_);
371
 
static void __lambda82__clutter_animation_completed (ClutterAnimation* _sender, gpointer self);
 
377
static void _lambda84_ (Block13Data* _data13_);
 
378
static void __lambda84__clutter_animation_completed (ClutterAnimation* _sender, gpointer self);
372
379
static Block13Data* block13_data_ref (Block13Data* _data13_);
373
380
static void block13_data_unref (Block13Data* _data13_);
374
381
static void unity_launcher_scroller_view_model_order_changed (UnityLauncherScrollerView* self);
375
382
static void unity_launcher_scroller_view_on_auto_scrolling_state_change (UnityLauncherScrollerView* self);
376
383
gboolean unity_launcher_scroller_view_get_is_autoscrolling (UnityLauncherScrollerView* self);
377
 
static gboolean _lambda83_ (UnityLauncherScrollerView* self);
378
 
static gboolean __lambda83__gsource_func (gpointer self);
 
384
static gboolean _lambda85_ (UnityLauncherScrollerView* self);
 
385
static gboolean __lambda85__gsource_func (gpointer self);
379
386
static gboolean unity_launcher_scroller_view_on_button_press_event (UnityLauncherScrollerView* self, ClutterEvent* event);
380
387
static gboolean unity_launcher_scroller_view_on_button_release_event (UnityLauncherScrollerView* self, ClutterEvent* event);
381
388
static gboolean _unity_launcher_scroller_view_on_button_release_event_clutter_actor_button_release_event (ClutterActor* _sender, ClutterEvent* event, gpointer self);
399
406
static void unity_launcher_scroller_view_do_anim_fling (UnityLauncherScrollerView* self, ClutterTimeline* timeline, gint msecs);
400
407
static void unity_launcher_scroller_view_do_anim_bounce (UnityLauncherScrollerView* self, ClutterTimeline* timeline, gint msecs);
401
408
CtkEffectCache* unity_launcher_scroller_view_get_cache (UnityLauncherScrollerView* self);
402
 
static gboolean _lambda84_ (UnityLauncherScrollerView* self);
403
 
static gboolean __lambda84__gsource_func (gpointer self);
 
409
static gboolean _lambda86_ (UnityLauncherScrollerView* self);
 
410
static gboolean __lambda86__gsource_func (gpointer self);
404
411
static void unity_launcher_scroller_view_real_get_preferred_width (ClutterActor* base, float for_height, float* minimum_width, float* natural_width);
405
412
static void unity_launcher_scroller_view_real_get_preferred_height (ClutterActor* base, float for_width, float* minimum_height, float* natural_height);
406
413
static void unity_launcher_scroller_view_order_children_expanded (UnityLauncherScrollerView* self, gboolean immediate);
407
414
static void unity_launcher_scroller_view_order_children_contracted (UnityLauncherScrollerView* self, gboolean immediate);
408
 
static void unity_launcher_scroller_view_change_child_position_rotation (UnityLauncherScrollerView* self, UnityLauncherScrollerChild* child, float position, float rotation, gboolean immediate);
409
415
void unity_launcher_scroller_child_force_rotation_jump (UnityLauncherScrollerChild* self, float degrees);
410
416
void unity_launcher_scroller_child_set_rotation (UnityLauncherScrollerChild* self, float value);
411
417
gint unity_launcher_scroller_view_get_drag_indicator_index (UnityLauncherScrollerView* self);
441
447
static void _unity_launcher_scroller_view_on_auto_scrolling_state_change_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
442
448
static void _unity_launcher_scroller_view_on_drag_motion_event_unity_drag_controller_drag_motion (UnityDragController* _sender, UnityDragModel* model, float x, float y, gpointer self);
443
449
static void _unity_launcher_scroller_view_on_scroller_frame_clutter_timeline_new_frame (ClutterTimeline* _sender, gint msecs, gpointer self);
444
 
static void _lambda85_ (UnityLauncherScrollerView* self);
445
 
static void __lambda85__clutter_timeline_started (ClutterTimeline* _sender, gpointer self);
446
 
static void _lambda86_ (UnityLauncherScrollerView* self);
447
 
static gboolean _lambda87_ (UnityLauncherScrollerView* self);
448
 
static gboolean __lambda87__gsource_func (gpointer self);
449
 
static void __lambda86__clutter_timeline_completed (ClutterTimeline* _sender, gpointer self);
 
450
static void _lambda87_ (UnityLauncherScrollerView* self);
 
451
static void __lambda87__clutter_timeline_started (ClutterTimeline* _sender, gpointer self);
450
452
static void _lambda88_ (UnityLauncherScrollerView* self);
451
 
static void __lambda88__unity_drag_controller_drag_start (UnityDragController* _sender, UnityDragModel* model, gpointer self);
452
 
static void _lambda89_ (UnityDragModel* drag_model, float x, float y, UnityLauncherScrollerView* self);
453
 
static gboolean _lambda90_ (UnityLauncherScrollerView* self);
454
 
static gboolean __lambda90__gsource_func (gpointer self);
455
 
static void __lambda89__unity_drag_controller_drag_drop (UnityDragController* _sender, UnityDragModel* model, float x, float y, gpointer self);
456
 
static void _lambda91_ (UnityDragModel* model, float x, float y, UnityLauncherScrollerView* self);
457
 
static void __lambda91__unity_drag_controller_drag_motion (UnityDragController* _sender, UnityDragModel* model, float x, float y, gpointer self);
 
453
static gboolean _lambda89_ (UnityLauncherScrollerView* self);
 
454
static gboolean __lambda89__gsource_func (gpointer self);
 
455
static void __lambda88__clutter_timeline_completed (ClutterTimeline* _sender, gpointer self);
 
456
static void _lambda90_ (UnityLauncherScrollerView* self);
 
457
static void __lambda90__unity_drag_controller_drag_start (UnityDragController* _sender, UnityDragModel* model, gpointer self);
 
458
static void _lambda91_ (UnityDragModel* drag_model, float x, float y, UnityLauncherScrollerView* self);
458
459
static gboolean _lambda92_ (UnityLauncherScrollerView* self);
459
460
static gboolean __lambda92__gsource_func (gpointer self);
 
461
static void __lambda91__unity_drag_controller_drag_drop (UnityDragController* _sender, UnityDragModel* model, float x, float y, gpointer self);
 
462
static void _lambda93_ (UnityDragModel* model, float x, float y, UnityLauncherScrollerView* self);
 
463
static void __lambda93__unity_drag_controller_drag_motion (UnityDragController* _sender, UnityDragModel* model, float x, float y, gpointer self);
 
464
static gboolean _lambda94_ (UnityLauncherScrollerView* self);
 
465
static gboolean __lambda94__gsource_func (gpointer self);
460
466
static GObject * unity_launcher_scroller_view_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
461
467
static void unity_launcher_scroller_view_finalize (GObject* obj);
462
468
static void unity_launcher_scroller_view_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
709
715
                _unity_launcher_scroller_model_iterator_unref0 (_actor_it);
710
716
        }
711
717
        clutter_event_get_coords (event, &x, &y);
 
718
        self->priv->last_known_x = x;
 
719
        self->priv->last_known_y = y;
712
720
        if (assume_on_launcher) {
713
721
                x = (float) 25;
714
722
        }
1410
1418
 
1411
1419
 
1412
1420
static void unity_launcher_scroller_view_disable_animations_on_children (UnityLauncherScrollerView* self, ClutterEvent* event) {
1413
 
        ClutterEvent _tmp0_ = {0};
1414
 
        ClutterEvent e;
1415
1421
        g_return_if_fail (self != NULL);
1416
 
        self->priv->disable_child_events = TRUE;
1417
 
        e = (_tmp0_.type = 0, _tmp0_);
1418
 
        e.type = CLUTTER_LEAVE;
1419
 
        e.crossing.time = (*event).motion.time;
1420
 
        e.crossing.flags = (*event).motion.flags;
1421
 
        e.crossing.stage = (*event).motion.stage;
1422
 
        e.crossing.x = (*event).motion.x;
1423
 
        e.crossing.y = (*event).motion.y;
1424
 
        {
1425
 
                UnityLauncherScrollerModelIterator* _child_it;
1426
 
                _child_it = unity_launcher_scroller_model_iterator (self->priv->_model);
1427
 
                while (TRUE) {
1428
 
                        UnityLauncherScrollerChild* child;
1429
 
                        if (!unity_launcher_scroller_model_iterator_next (_child_it)) {
1430
 
                                break;
1431
 
                        }
1432
 
                        child = unity_launcher_scroller_model_iterator_get (_child_it);
1433
 
                        if (CLUTTER_IS_ACTOR (child)) {
1434
 
                                e.crossing.source = (ClutterActor*) child;
1435
 
                                clutter_actor_event ((ClutterActor*) child, &e, FALSE);
1436
 
                        }
1437
 
                        _g_object_unref0 (child);
1438
 
                }
1439
 
                _unity_launcher_scroller_model_iterator_unref0 (_child_it);
1440
 
        }
1441
1422
}
1442
1423
 
1443
1424
 
1503
1484
}
1504
1485
 
1505
1486
 
1506
 
static void _lambda81_ (UnityLauncherScrollerView* self) {
 
1487
static void _vala_array_add2 (float** array, int* length, int* size, float value) {
 
1488
        if ((*length) == (*size)) {
 
1489
                *size = (*size) ? (2 * (*size)) : 4;
 
1490
                *array = g_renew (float, *array, *size);
 
1491
        }
 
1492
        (*array)[(*length)++] = value;
 
1493
}
 
1494
 
 
1495
 
 
1496
static void _vala_array_add3 (float** array, int* length, int* size, float value) {
 
1497
        if ((*length) == (*size)) {
 
1498
                *size = (*size) ? (2 * (*size)) : 4;
 
1499
                *array = g_renew (float, *array, *size);
 
1500
        }
 
1501
        (*array)[(*length)++] = value;
 
1502
}
 
1503
 
 
1504
 
 
1505
static void _lambda83_ (UnityLauncherScrollerView* self) {
1507
1506
        clutter_actor_queue_relayout ((ClutterActor*) self);
1508
1507
}
1509
1508
 
1510
1509
 
1511
 
static void __lambda81__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
1512
 
        _lambda81_ (self);
 
1510
static void __lambda83__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
 
1511
        _lambda83_ (self);
1513
1512
}
1514
1513
 
1515
1514
 
1516
1515
static void unity_launcher_scroller_view_model_child_added (UnityLauncherScrollerView* self, UnityLauncherScrollerChild* child) {
 
1516
        gint prev_positions_length1;
 
1517
        gint _prev_positions_size_;
 
1518
        float* _tmp1_;
 
1519
        float* _tmp0_ = NULL;
 
1520
        float* prev_positions;
 
1521
        gint prev_rotations_length1;
 
1522
        gint _prev_rotations_size_;
 
1523
        float* _tmp3_;
 
1524
        float* _tmp2_ = NULL;
 
1525
        float* prev_rotations;
 
1526
        gint index;
1517
1527
        g_return_if_fail (self != NULL);
1518
1528
        g_return_if_fail (child != NULL);
1519
1529
        clutter_actor_unparent ((ClutterActor*) child);
1520
1530
        clutter_actor_set_parent ((ClutterActor*) child, (ClutterActor*) self);
1521
 
        if (unity_launcher_scroller_model_index_of (self->priv->_model, child) == (unity_launcher_scroller_model_get_size (self->priv->_model) - 1)) {
1522
 
                unity_launcher_scroller_view_order_children (self, TRUE);
1523
 
        } else {
1524
 
                unity_launcher_scroller_view_order_children (self, FALSE);
1525
 
        }
 
1531
        prev_positions = (_tmp1_ = (_tmp0_ = g_new0 (float, 0), _tmp0_), prev_positions_length1 = 0, _prev_positions_size_ = prev_positions_length1, _tmp1_);
 
1532
        prev_rotations = (_tmp3_ = (_tmp2_ = g_new0 (float, 0), _tmp2_), prev_rotations_length1 = 0, _prev_rotations_size_ = prev_rotations_length1, _tmp3_);
 
1533
        {
 
1534
                UnityLauncherScrollerModelIterator* _modelchild_it;
 
1535
                _modelchild_it = unity_launcher_scroller_model_iterator (self->priv->_model);
 
1536
                while (TRUE) {
 
1537
                        UnityLauncherScrollerChild* modelchild;
 
1538
                        if (!unity_launcher_scroller_model_iterator_next (_modelchild_it)) {
 
1539
                                break;
 
1540
                        }
 
1541
                        modelchild = unity_launcher_scroller_model_iterator_get (_modelchild_it);
 
1542
                        _vala_array_add2 (&prev_positions, &prev_positions_length1, &_prev_positions_size_, unity_launcher_scroller_child_get_position (modelchild));
 
1543
                        _vala_array_add3 (&prev_rotations, &prev_rotations_length1, &_prev_rotations_size_, unity_launcher_scroller_child_get_rotation (modelchild));
 
1544
                        _g_object_unref0 (modelchild);
 
1545
                }
 
1546
                _unity_launcher_scroller_model_iterator_unref0 (_modelchild_it);
 
1547
        }
 
1548
        unity_launcher_scroller_view_order_children (self, TRUE);
 
1549
        index = 0;
 
1550
        {
 
1551
                UnityLauncherScrollerModelIterator* _modelchild_it;
 
1552
                _modelchild_it = unity_launcher_scroller_model_iterator (self->priv->_model);
 
1553
                while (TRUE) {
 
1554
                        UnityLauncherScrollerChild* modelchild;
 
1555
                        if (!unity_launcher_scroller_model_iterator_next (_modelchild_it)) {
 
1556
                                break;
 
1557
                        }
 
1558
                        modelchild = unity_launcher_scroller_model_iterator_get (_modelchild_it);
 
1559
                        if (child != modelchild) {
 
1560
                                unity_launcher_scroller_view_change_child_position_rotation (self, modelchild, prev_positions[index], prev_rotations[index], TRUE);
 
1561
                        }
 
1562
                        index++;
 
1563
                        _g_object_unref0 (modelchild);
 
1564
                }
 
1565
                _unity_launcher_scroller_model_iterator_unref0 (_modelchild_it);
 
1566
        }
 
1567
        unity_launcher_scroller_view_order_children (self, FALSE);
1526
1568
        clutter_actor_queue_relayout ((ClutterActor*) self);
1527
 
        g_signal_connect_object ((GObject*) child, "notify::position", (GCallback) __lambda81__g_object_notify, self, 0);
 
1569
        g_signal_connect_object ((GObject*) child, "notify::position", (GCallback) __lambda83__g_object_notify, self, 0);
1528
1570
        clutter_actor_set_reactive ((ClutterActor*) child, FALSE);
 
1571
        prev_rotations = (g_free (prev_rotations), NULL);
 
1572
        prev_positions = (g_free (prev_positions), NULL);
1529
1573
}
1530
1574
 
1531
1575
 
1532
 
static void _lambda82_ (Block13Data* _data13_) {
 
1576
static void _lambda84_ (Block13Data* _data13_) {
1533
1577
        UnityLauncherScrollerView * self;
1534
1578
        self = _data13_->self;
1535
1579
        clutter_actor_unparent ((ClutterActor*) _data13_->child);
1536
1580
        gee_abstract_collection_remove ((GeeAbstractCollection*) self->priv->child_refs, _data13_->child);
 
1581
        unity_launcher_scroller_view_order_children (self, FALSE);
 
1582
        clutter_actor_queue_relayout ((ClutterActor*) self);
1537
1583
}
1538
1584
 
1539
1585
 
1540
 
static void __lambda82__clutter_animation_completed (ClutterAnimation* _sender, gpointer self) {
1541
 
        _lambda82_ (self);
 
1586
static void __lambda84__clutter_animation_completed (ClutterAnimation* _sender, gpointer self) {
 
1587
        _lambda84_ (self);
1542
1588
}
1543
1589
 
1544
1590
 
1559
1605
 
1560
1606
static void unity_launcher_scroller_view_model_child_removed (UnityLauncherScrollerView* self, UnityLauncherScrollerChild* child) {
1561
1607
        Block13Data* _data13_;
1562
 
        ClutterAnimation* anim;
 
1608
        UnityDragController* drag_controller;
1563
1609
        g_return_if_fail (self != NULL);
1564
1610
        g_return_if_fail (child != NULL);
1565
1611
        _data13_ = g_slice_new0 (Block13Data);
1566
1612
        _data13_->_ref_count_ = 1;
1567
1613
        _data13_->self = g_object_ref (self);
1568
1614
        _data13_->child = _g_object_ref0 (child);
1569
 
        gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->child_refs, _data13_->child);
1570
 
        anim = _g_object_ref0 (clutter_actor_animate ((ClutterActor*) _data13_->child, (gulong) CLUTTER_EASE_OUT_QUAD, UNITY_LAUNCHER_SHORT_DELAY, "opacity", 0, NULL));
1571
 
        g_signal_connect_data (anim, "completed", (GCallback) __lambda82__clutter_animation_completed, block13_data_ref (_data13_), (GClosureNotify) block13_data_unref, 0);
1572
 
        unity_launcher_scroller_view_order_children (self, FALSE);
1573
 
        clutter_actor_queue_relayout ((ClutterActor*) self);
1574
 
        _g_object_unref0 (anim);
 
1615
        drag_controller = _g_object_ref0 (unity_drag_controller_get_default ());
 
1616
        if (unity_drag_controller_get_is_dragging (drag_controller)) {
 
1617
                unity_launcher_scroller_view_order_children (self, FALSE);
 
1618
                clutter_actor_queue_relayout ((ClutterActor*) self);
 
1619
        } else {
 
1620
                ClutterAnimation* anim;
 
1621
                ClutterAnimation* icon_scale_anim;
 
1622
                gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->child_refs, _data13_->child);
 
1623
                anim = _g_object_ref0 (clutter_actor_animate ((ClutterActor*) _data13_->child, (gulong) CLUTTER_EASE_OUT_QUAD, UNITY_LAUNCHER_SHORT_DELAY, "opacity", 0, NULL));
 
1624
                icon_scale_anim = _g_object_ref0 (clutter_actor_animate ((ClutterActor*) _data13_->child->processed_icon, (gulong) CLUTTER_EASE_OUT_QUAD, UNITY_LAUNCHER_SHORT_DELAY, "scale-x", 0.0, "scale-y", 0.0, NULL));
 
1625
                g_signal_connect_data (anim, "completed", (GCallback) __lambda84__clutter_animation_completed, block13_data_ref (_data13_), (GClosureNotify) block13_data_unref, 0);
 
1626
                _g_object_unref0 (icon_scale_anim);
 
1627
                _g_object_unref0 (anim);
 
1628
        }
 
1629
        _g_object_unref0 (drag_controller);
1575
1630
        block13_data_unref (_data13_);
1576
1631
}
1577
1632
 
1583
1638
}
1584
1639
 
1585
1640
 
1586
 
static gboolean _lambda83_ (UnityLauncherScrollerView* self) {
 
1641
static gboolean _lambda85_ (UnityLauncherScrollerView* self) {
1587
1642
        gboolean result = FALSE;
1588
1643
        float speed;
 
1644
        ClutterEvent _tmp0_ = {0};
 
1645
        ClutterEvent motion_event;
 
1646
        ClutterActor* _tmp1_;
1589
1647
        speed = 12.0f - fabsf (self->priv->autoscroll_mouse_pos_cache);
1590
1648
        speed = speed / 12.0f;
1591
1649
        speed = speed * ((float) 30);
1592
1650
        speed = speed * ((float) self->priv->autoscroll_direction);
1593
1651
        unity_launcher_scroller_view_move_scroll_position (self, speed, TRUE, 160.0f);
1594
1652
        self->priv->autoscroll_anim_active = self->priv->_is_autoscrolling;
 
1653
        motion_event = (_tmp0_.type = 0, _tmp0_);
 
1654
        motion_event.type = CLUTTER_MOTION;
 
1655
        motion_event.motion.x = self->priv->last_known_x;
 
1656
        motion_event.motion.y = self->priv->last_known_y;
 
1657
        motion_event.motion.stage = (_tmp1_ = clutter_actor_get_stage ((ClutterActor*) self), CLUTTER_IS_STAGE (_tmp1_) ? ((ClutterStage*) _tmp1_) : NULL);
 
1658
        motion_event.motion.flags = CLUTTER_EVENT_FLAG_SYNTHETIC;
 
1659
        unity_launcher_scroller_view_passthrough_motion_event (self, &motion_event);
1595
1660
        result = self->priv->_is_autoscrolling;
1596
1661
        return result;
1597
1662
}
1598
1663
 
1599
1664
 
1600
 
static gboolean __lambda83__gsource_func (gpointer self) {
 
1665
static gboolean __lambda85__gsource_func (gpointer self) {
1601
1666
        gboolean result;
1602
 
        result = _lambda83_ (self);
 
1667
        result = _lambda85_ (self);
1603
1668
        return result;
1604
1669
}
1605
1670
 
1613
1678
                _tmp0_ = FALSE;
1614
1679
        }
1615
1680
        if (_tmp0_) {
1616
 
                g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 33, __lambda83__gsource_func, g_object_ref (self), g_object_unref);
 
1681
                g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 33, __lambda85__gsource_func, g_object_ref (self), g_object_unref);
1617
1682
        }
1618
1683
}
1619
1684
 
1959
2024
 
1960
2025
static void unity_launcher_scroller_view_on_scroller_frame (UnityLauncherScrollerView* self, ClutterTimeline* timeline, gint msecs) {
1961
2026
        guint delta;
 
2027
        ClutterEvent _tmp1_ = {0};
 
2028
        ClutterEvent motion_event;
 
2029
        ClutterActor* _tmp2_;
1962
2030
        g_return_if_fail (self != NULL);
1963
2031
        g_return_if_fail (timeline != NULL);
1964
2032
        delta = clutter_timeline_get_delta (timeline);
2019
2087
        } else {
2020
2088
                ctk_effect_cache_invalidate_texture_cache (self->priv->_cache);
2021
2089
        }
 
2090
        motion_event = (_tmp1_.type = 0, _tmp1_);
 
2091
        motion_event.type = CLUTTER_MOTION;
 
2092
        motion_event.motion.x = self->priv->last_known_x;
 
2093
        motion_event.motion.y = self->priv->last_known_y;
 
2094
        motion_event.motion.stage = (_tmp2_ = clutter_actor_get_stage ((ClutterActor*) self), CLUTTER_IS_STAGE (_tmp2_) ? ((ClutterStage*) _tmp2_) : NULL);
 
2095
        motion_event.motion.flags = CLUTTER_EVENT_FLAG_SYNTHETIC;
 
2096
        unity_launcher_scroller_view_passthrough_motion_event (self, &motion_event);
2022
2097
        self->priv->stored_delta = delta;
2023
2098
}
2024
2099
 
2036
2111
}
2037
2112
 
2038
2113
 
2039
 
static gboolean _lambda84_ (UnityLauncherScrollerView* self) {
 
2114
static gboolean _lambda86_ (UnityLauncherScrollerView* self) {
2040
2115
        gboolean result = FALSE;
2041
2116
        self->priv->current_phase = UNITY_LAUNCHER_SCROLLER_PHASE_SETTLING;
2042
2117
        self->priv->settle_position = unity_launcher_scroller_view_get_aligned_settle_position (self);
2046
2121
}
2047
2122
 
2048
2123
 
2049
 
static gboolean __lambda84__gsource_func (gpointer self) {
 
2124
static gboolean __lambda86__gsource_func (gpointer self) {
2050
2125
        gboolean result;
2051
 
        result = _lambda84_ (self);
 
2126
        result = _lambda86_ (self);
2052
2127
        return result;
2053
2128
}
2054
2129
 
2062
2137
        unity_launcher_scroller_view_move_scroll_position (self, scroll_move_amount, FALSE, 60.0f);
2063
2138
        if (fabsf (scroll_move_amount) < 1.0) {
2064
2139
                self->priv->current_phase = UNITY_LAUNCHER_SCROLLER_PHASE_NONE;
2065
 
                self->priv->fling_timeout_source = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 300, __lambda84__gsource_func, g_object_ref (self), g_object_unref);
 
2140
                self->priv->fling_timeout_source = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 300, __lambda86__gsource_func, g_object_ref (self), g_object_unref);
2066
2141
        }
2067
2142
}
2068
2143
 
2402
2477
                                }
2403
2478
                                if (_tmp4_) {
2404
2479
                                        unity_launcher_scroller_view_change_child_position_rotation (self, child, h, 0.0f, immediate);
2405
 
                                        h = h + (nat_height + self->spacing);
 
2480
                                        h = h + ((float) (48 + self->spacing));
2406
2481
                                        num_children_handled++;
2407
2482
                                        if (index == index_start_flat) {
2408
2483
                                                gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->draw_ftb, child);
3029
3104
}
3030
3105
 
3031
3106
 
3032
 
static void _lambda85_ (UnityLauncherScrollerView* self) {
 
3107
static void _lambda87_ (UnityLauncherScrollerView* self) {
3033
3108
        ctk_effect_cache_invalidate_texture_cache (self->priv->_cache);
3034
3109
}
3035
3110
 
3036
3111
 
3037
 
static void __lambda85__clutter_timeline_started (ClutterTimeline* _sender, gpointer self) {
3038
 
        _lambda85_ (self);
 
3112
static void __lambda87__clutter_timeline_started (ClutterTimeline* _sender, gpointer self) {
 
3113
        _lambda87_ (self);
3039
3114
}
3040
3115
 
3041
3116
 
3042
 
static gboolean _lambda87_ (UnityLauncherScrollerView* self) {
 
3117
static gboolean _lambda89_ (UnityLauncherScrollerView* self) {
3043
3118
        gboolean result = FALSE;
3044
3119
        ctk_effect_cache_update_texture_cache (self->priv->_cache);
3045
3120
        result = FALSE;
3047
3122
}
3048
3123
 
3049
3124
 
3050
 
static gboolean __lambda87__gsource_func (gpointer self) {
 
3125
static gboolean __lambda89__gsource_func (gpointer self) {
3051
3126
        gboolean result;
3052
 
        result = _lambda87_ (self);
 
3127
        result = _lambda89_ (self);
3053
3128
        return result;
3054
3129
}
3055
3130
 
3056
3131
 
3057
 
static void _lambda86_ (UnityLauncherScrollerView* self) {
3058
 
        g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 0, __lambda87__gsource_func, g_object_ref (self), g_object_unref);
3059
 
}
3060
 
 
3061
 
 
3062
 
static void __lambda86__clutter_timeline_completed (ClutterTimeline* _sender, gpointer self) {
3063
 
        _lambda86_ (self);
3064
 
}
3065
 
 
3066
 
 
3067
3132
static void _lambda88_ (UnityLauncherScrollerView* self) {
 
3133
        g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 0, __lambda89__gsource_func, g_object_ref (self), g_object_unref);
 
3134
}
 
3135
 
 
3136
 
 
3137
static void __lambda88__clutter_timeline_completed (ClutterTimeline* _sender, gpointer self) {
 
3138
        _lambda88_ (self);
 
3139
}
 
3140
 
 
3141
 
 
3142
static void _lambda90_ (UnityLauncherScrollerView* self) {
3068
3143
        guint _tmp0_;
3069
3144
        self->priv->is_scrolling = FALSE;
3070
3145
        self->priv->button_down = FALSE;
3078
3153
}
3079
3154
 
3080
3155
 
3081
 
static void __lambda88__unity_drag_controller_drag_start (UnityDragController* _sender, UnityDragModel* model, gpointer self) {
3082
 
        _lambda88_ (self);
 
3156
static void __lambda90__unity_drag_controller_drag_start (UnityDragController* _sender, UnityDragModel* model, gpointer self) {
 
3157
        _lambda90_ (self);
3083
3158
}
3084
3159
 
3085
3160
 
3086
 
static gboolean _lambda90_ (UnityLauncherScrollerView* self) {
 
3161
static gboolean _lambda92_ (UnityLauncherScrollerView* self) {
3087
3162
        gboolean result = FALSE;
3088
3163
        unity_launcher_scroller_view_order_children (self, FALSE);
3089
3164
}
3090
3165
 
3091
3166
 
3092
 
static gboolean __lambda90__gsource_func (gpointer self) {
 
3167
static gboolean __lambda92__gsource_func (gpointer self) {
3093
3168
        gboolean result;
3094
 
        result = _lambda90_ (self);
 
3169
        result = _lambda92_ (self);
3095
3170
        return result;
3096
3171
}
3097
3172
 
3098
3173
 
3099
 
static void _lambda89_ (UnityDragModel* drag_model, float x, float y, UnityLauncherScrollerView* self) {
 
3174
static void _lambda91_ (UnityDragModel* drag_model, float x, float y, UnityLauncherScrollerView* self) {
3100
3175
        g_return_if_fail (drag_model != NULL);
3101
3176
        unity_launcher_disable_quicklists = FALSE;
3102
3177
        {
3116
3191
        if (x > clutter_actor_get_width ((ClutterActor*) self)) {
3117
3192
                unity_launcher_scroller_view_contract_launcher (self);
3118
3193
        } else {
3119
 
                g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, __lambda90__gsource_func, g_object_ref (self), g_object_unref);
 
3194
                g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, __lambda92__gsource_func, g_object_ref (self), g_object_unref);
3120
3195
        }
3121
3196
        clutter_actor_animate ((ClutterActor*) self, (gulong) CLUTTER_EASE_OUT_SINE, (guint) 150, "drag-indicator-opacity", 0.0f, NULL);
3122
3197
}
3123
3198
 
3124
3199
 
3125
 
static void __lambda89__unity_drag_controller_drag_drop (UnityDragController* _sender, UnityDragModel* model, float x, float y, gpointer self) {
3126
 
        _lambda89_ (model, x, y, self);
 
3200
static void __lambda91__unity_drag_controller_drag_drop (UnityDragController* _sender, UnityDragModel* model, float x, float y, gpointer self) {
 
3201
        _lambda91_ (model, x, y, self);
3127
3202
}
3128
3203
 
3129
3204
 
3130
 
static void _lambda91_ (UnityDragModel* model, float x, float y, UnityLauncherScrollerView* self) {
 
3205
static void _lambda93_ (UnityDragModel* model, float x, float y, UnityLauncherScrollerView* self) {
3131
3206
        g_return_if_fail (model != NULL);
3132
3207
        self->priv->last_known_pointer_x = x;
3133
3208
        if (x > (200 + clutter_actor_get_width ((ClutterActor*) self))) {
3138
3213
}
3139
3214
 
3140
3215
 
3141
 
static void __lambda91__unity_drag_controller_drag_motion (UnityDragController* _sender, UnityDragModel* model, float x, float y, gpointer self) {
3142
 
        _lambda91_ (model, x, y, self);
 
3216
static void __lambda93__unity_drag_controller_drag_motion (UnityDragController* _sender, UnityDragModel* model, float x, float y, gpointer self) {
 
3217
        _lambda93_ (model, x, y, self);
3143
3218
}
3144
3219
 
3145
3220
 
3146
 
static gboolean _lambda92_ (UnityLauncherScrollerView* self) {
 
3221
static gboolean _lambda94_ (UnityLauncherScrollerView* self) {
3147
3222
        gboolean result = FALSE;
3148
3223
        unity_launcher_scroller_view_order_children (self, TRUE);
3149
3224
        clutter_actor_queue_relayout ((ClutterActor*) self);
3150
3225
}
3151
3226
 
3152
3227
 
3153
 
static gboolean __lambda92__gsource_func (gpointer self) {
 
3228
static gboolean __lambda94__gsource_func (gpointer self) {
3154
3229
        gboolean result;
3155
 
        result = _lambda92_ (self);
 
3230
        result = _lambda94_ (self);
3156
3231
        return result;
3157
3232
}
3158
3233
 
3219
3294
                self->fling_timeline = (_tmp4_ = clutter_timeline_new ((guint) 1000), _g_object_unref0 (self->fling_timeline), _tmp4_);
3220
3295
                clutter_timeline_set_loop (self->fling_timeline, TRUE);
3221
3296
                g_signal_connect_object (self->fling_timeline, "new-frame", (GCallback) _unity_launcher_scroller_view_on_scroller_frame_clutter_timeline_new_frame, self, 0);
3222
 
                g_signal_connect_object (self->fling_timeline, "started", (GCallback) __lambda85__clutter_timeline_started, self, 0);
3223
 
                g_signal_connect_object (self->fling_timeline, "completed", (GCallback) __lambda86__clutter_timeline_completed, self, 0);
 
3297
                g_signal_connect_object (self->fling_timeline, "started", (GCallback) __lambda87__clutter_timeline_started, self, 0);
 
3298
                g_signal_connect_object (self->fling_timeline, "completed", (GCallback) __lambda88__clutter_timeline_completed, self, 0);
3224
3299
                drag_controller = _g_object_ref0 (unity_drag_controller_get_default ());
3225
 
                g_signal_connect_object (drag_controller, "drag-start", (GCallback) __lambda88__unity_drag_controller_drag_start, self, 0);
3226
 
                g_signal_connect_object (drag_controller, "drag-drop", (GCallback) __lambda89__unity_drag_controller_drag_drop, self, 0);
3227
 
                g_signal_connect_object (drag_controller, "drag-motion", (GCallback) __lambda91__unity_drag_controller_drag_motion, self, 0);
 
3300
                g_signal_connect_object (drag_controller, "drag-start", (GCallback) __lambda90__unity_drag_controller_drag_start, self, 0);
 
3301
                g_signal_connect_object (drag_controller, "drag-drop", (GCallback) __lambda91__unity_drag_controller_drag_drop, self, 0);
 
3302
                g_signal_connect_object (drag_controller, "drag-motion", (GCallback) __lambda93__unity_drag_controller_drag_motion, self, 0);
3228
3303
                clutter_actor_set_reactive ((ClutterActor*) self, TRUE);
3229
3304
                self->priv->child_refs = (_tmp5_ = gee_array_list_new (UNITY_LAUNCHER_TYPE_SCROLLER_CHILD, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL), _g_object_unref0 (self->priv->child_refs), _tmp5_);
3230
3305
                unity_launcher_scroller_view_order_children (self, TRUE);
3231
3306
                clutter_actor_queue_relayout ((ClutterActor*) self);
3232
 
                g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, __lambda92__gsource_func, g_object_ref (self), g_object_unref);
 
3307
                g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, __lambda94__gsource_func, g_object_ref (self), g_object_unref);
3233
3308
                unity_launcher_scroller_view_set_drag_indicator_space (self, FALSE);
3234
3309
                _g_object_unref0 (drag_controller);
3235
3310
        }
3277
3352
        self->priv->do_logic_pick = TRUE;
3278
3353
        self->priv->last_known_pointer_x = 0.0f;
3279
3354
        self->priv->can_scroll = FALSE;
 
3355
        self->priv->last_known_x = (float) 0;
 
3356
        self->priv->last_known_y = (float) 0;
3280
3357
        self->priv->scroll_position = 0.0f;
3281
3358
        self->priv->settle_position = 0.0f;
3282
3359
        self->priv->autoscroll_anim_active = FALSE;