static void mnb_statusbar_stage_allocation_cb (ClutterActor *stage, GParamSpec *pspec, MnbStatusbar *self) { MnbStatusbarPrivate *priv = self->priv; ClutterActorBox box; clutter_actor_get_allocation_box (stage, &box); clutter_actor_set_size (CLUTTER_ACTOR (self), box.x2 - box.x1, STATUSBAR_HEIGHT); mnb_input_manager_push_actor (CLUTTER_ACTOR (self), MNB_INPUT_LAYER_TOP); dawati_netbook_set_struts (priv->plugin, -1, -1, STATUSBAR_HEIGHT, -1); }
static void ntf_tray_constructed (GObject *object) { NtfTray *self = (NtfTray*) object; ClutterActor *actor = (ClutterActor*) self; NtfTrayPrivate *priv = self->priv; ClutterActor *button; if (G_OBJECT_CLASS (ntf_tray_parent_class)->constructed) G_OBJECT_CLASS (ntf_tray_parent_class)->constructed (object); priv->notifiers = clutter_actor_new (); clutter_actor_add_child(actor, priv->notifiers); /* 'Overflow' control */ priv->control = mx_table_new (); mx_stylable_set_style_class (MX_STYLABLE (priv->control), "notification-control"); #if 0 button = mx_button_new (); mx_button_set_label (MX_BUTTON (button), _("Dismiss All")); mx_table_add_actor (MX_TABLE (priv->control), button, 0, 1); g_signal_connect (button, "clicked", G_CALLBACK (ntf_tray_dismiss_all_cb), self); #endif //DV priv->control_text = mx_label_new (); mx_table_add_actor (MX_TABLE (priv->control), CLUTTER_ACTOR (priv->control_text), 0, 0); clutter_actor_set_width (priv->control, CLUSTER_WIDTH); clutter_actor_add_child(actor, priv->control); clutter_actor_hide (priv->control); clutter_actor_set_reactive (priv->notifiers, TRUE); clutter_actor_set_reactive (actor, TRUE); mnb_input_manager_push_actor (actor, MNB_INPUT_LAYER_TOP); }
static void ntf_overlay_constructed (GObject *object) { NtfOverlay *self = (NtfOverlay*) object; NtfOverlayPrivate *priv = self->priv; ClutterActor *actor = (ClutterActor*) object; ClutterColor low_clr = {0, 0, 0, 0x7f}; if (G_OBJECT_CLASS (ntf_overlay_parent_class)->constructed) G_OBJECT_CLASS (ntf_overlay_parent_class)->constructed (object); priv->tray_normal = ntf_tray_new (FALSE); clutter_actor_set_parent (CLUTTER_ACTOR (priv->tray_normal), actor); priv->tray_urgent = ntf_tray_new (TRUE); clutter_actor_set_parent (CLUTTER_ACTOR (priv->tray_urgent), actor); priv->lowlight = clutter_rectangle_new_with_color (&low_clr); clutter_actor_set_parent (CLUTTER_ACTOR (priv->lowlight), actor); mnb_input_manager_push_actor (priv->lowlight, MNB_INPUT_LAYER_TOP); clutter_actor_hide (priv->lowlight); /* * The urgent tray shows/hides itself when it contains something / is empty. * We need to show the lowlight any time it is visible. */ g_signal_connect (priv->tray_urgent, "show", G_CALLBACK (ntf_overlay_urgent_tray_show_cb), self); g_signal_connect (priv->tray_urgent, "hide", G_CALLBACK (ntf_overlay_urgent_tray_hide_cb), self); g_signal_connect (priv->lowlight, "button-press-event", G_CALLBACK (ntf_overlay_lowlight_button_event_cb), self); g_signal_connect (priv->lowlight, "button-release-event", G_CALLBACK (ntf_overlay_lowlight_button_event_cb), self); }