Ejemplo n.º 1
0
static void
mex_content_box_paint (ClutterActor *actor)
{
  MexContentBoxPrivate *priv = MEX_CONTENT_BOX (actor)->priv;
  gboolean clipped = FALSE;

  CLUTTER_ACTOR_CLASS (mex_content_box_parent_class)->paint (actor);

  if (G_UNLIKELY (priv->clip_to_allocation))
    {
      ClutterActorBox box;
      clutter_actor_get_allocation_box (actor, &box);
      cogl_clip_push_rectangle (0, 0, box.x2 - box.x1, box.y2 - box.y1);
      clipped = TRUE;
    }

  clutter_actor_paint (priv->tile);

  if (G_UNLIKELY (priv->extras_visible))
    {
      ClutterActorBox box;

      clutter_actor_paint (priv->action_list);
      clutter_actor_paint (priv->info_panel);

      /* separator */
      cogl_set_source_color4ub (255, 255, 255, 51);
      clutter_actor_get_allocation_box (priv->info_panel, &box);
      cogl_path_line (box.x1, box.y1, box.x2, box.y1);
      cogl_path_stroke ();
    }

  if (G_UNLIKELY (clipped))
    cogl_clip_pop ();
}
Ejemplo n.º 2
0
static void
mx_menu_floating_pick (ClutterActor       *menu,
                       const ClutterColor *color)
{
    gint i;
    MxMenuPrivate *priv = MX_MENU (menu)->priv;

    /* chain up to get bounding rectangle */

    MX_FLOATING_WIDGET_CLASS (mx_menu_parent_class)->floating_pick (menu, color);

    /* pick children */
    for (i = priv->id_offset; i <= priv->last_shown_id; i++)
    {
        MxMenuChild *child = &g_array_index (priv->children, MxMenuChild, i);

        if (clutter_actor_should_pick_paint (CLUTTER_ACTOR (child->box)))
        {
            clutter_actor_paint (CLUTTER_ACTOR (child->box));
        }
    }
    if(priv->scrolling_mode)
    {
        clutter_actor_paint(priv->up_button);
        clutter_actor_paint(priv->down_button);
    }
}
Ejemplo n.º 3
0
static void
mex_epg_grid_paint (ClutterActor *actor)
{
  MexEpgGrid *grid = MEX_EPG_GRID (actor);
  MexEpgGridPrivate *priv = grid->priv;
  guint i, j;

  CLUTTER_ACTOR_CLASS (mex_epg_grid_parent_class)->paint (actor);

  /* header */
  for (i = 0; i < priv->header->len; i++)
    {
      ClutterActor *header = g_ptr_array_index (priv->header, i);

      clutter_actor_paint (header);
    }

  /* tiles */
  for (i = 0; i < priv->rows->len; i++)
    {
      GPtrArray *tiles = g_ptr_array_index (priv->rows, i);

      if (tiles == NULL)
        continue;

      for (j = 0; j < tiles->len; j++)
        {
          ClutterActor *tile = g_ptr_array_index (tiles, j);

          clutter_actor_paint (tile);
        }
    }
}
Ejemplo n.º 4
0
static void
mex_column_paint (ClutterActor *actor)
{
  GList *c;
  MxPadding padding;
  ClutterActorBox box;

  MexColumn *self = MEX_COLUMN (actor);
  MexColumnPrivate *priv = self->priv;

  CLUTTER_ACTOR_CLASS (mex_column_parent_class)->paint (actor);

  mx_widget_get_padding (MX_WIDGET (actor), &padding);
  clutter_actor_get_allocation_box (actor, &box);

  cogl_clip_push_rectangle (padding.left,
                            padding.top + priv->adjustment_value,
                            box.x2 - box.x1 - padding.right,
                            box.y2 - box.y1 - padding.bottom +
                            priv->adjustment_value);

  for (c = priv->children; c; c = c->next)
    {
      /* skip the current focus and paint it last*/
      if (priv->current_focus != c->data)
        clutter_actor_paint (c->data);
    }

  /* paint the current focused actor last to ensure any shadow is drawn
   * on top of other items */
  if (priv->current_focus)
    clutter_actor_paint (priv->current_focus);

  cogl_clip_pop ();
}
static void
mx_stack_paint_children (ClutterActor *actor)
{
  MxStackPrivate *priv = MX_STACK (actor)->priv;

  GList *c;

  for (c = priv->children; c; c = c->next)
    {
      ClutterActor *child = c->data;
      gboolean crop;

      if (!CLUTTER_ACTOR_IS_VISIBLE (child))
        continue;

      clutter_container_child_get (CLUTTER_CONTAINER (actor),
                                   child,
                                   "crop", &crop,
                                   NULL);

      if (crop)
        {
          /* clip */
          cogl_clip_push_rectangle (priv->allocation.x1,
                                    priv->allocation.y1,
                                    priv->allocation.x2,
                                    priv->allocation.y2);
          clutter_actor_paint (c->data);
          cogl_clip_pop ();
        }
      else
        clutter_actor_paint (c->data);
    }
}
Ejemplo n.º 6
0
static void
mx_expander_paint (ClutterActor *actor)
{
  CLUTTER_ACTOR_CLASS (mx_expander_parent_class)->paint (actor);

  clutter_actor_paint (((MxExpander* ) actor)->priv->label);
  clutter_actor_paint (((MxExpander* ) actor)->priv->arrow);
}
Ejemplo n.º 7
0
static void
mex_content_box_pick (ClutterActor       *actor,
                      const ClutterColor *color)
{
  MexContentBoxPrivate *priv = MEX_CONTENT_BOX (actor)->priv;

  clutter_actor_paint (priv->tile);
  if (G_UNLIKELY (priv->extras_visible))
    clutter_actor_paint (priv->action_list);
}
Ejemplo n.º 8
0
static void
mex_tile_paint (ClutterActor *actor)
{
  MexTilePrivate *priv = MEX_TILE (actor)->priv;
  MxPadding padding;
  ClutterActorBox box;

  CLUTTER_ACTOR_CLASS (mex_tile_parent_class)->paint (actor);

  clutter_actor_paint (priv->child);

  mx_widget_get_padding (MX_WIDGET (actor), &padding);

  if (priv->header_visible)
    {
      clutter_actor_get_allocation_box (actor, &box);


      if (priv->header_background_color)
        {
          cogl_set_source_color4ub (priv->header_background_color->red,
                                    priv->header_background_color->green,
                                    priv->header_background_color->blue,
                                    priv->header_background_color->alpha);

          cogl_rectangle (padding.left, padding.top,
                          box.x2 - box.x1 - padding.right,
                          priv->header_height);
        }


      if (cogl_material_get_n_layers (priv->material) > 0)
        {
          guint8 opacity;

          opacity = clutter_actor_get_paint_opacity (actor);

          cogl_material_set_color4ub (priv->material, opacity, opacity, opacity,
                                      opacity);
          cogl_set_source (priv->material);

          cogl_rectangle (padding.left, padding.top,
                          box.x2 - box.x1 - padding.right,
                          priv->header_height);
        }

      clutter_actor_paint (priv->box_layout);

      if (priv->icon1)
        clutter_actor_paint (priv->icon1);

      if (priv->icon2)
        clutter_actor_paint (priv->icon2);
    }
}
static void
penge_grid_view_paint (ClutterActor *actor)
{
  PengeGridViewPrivate *priv = GET_PRIVATE (actor);

  /* Paint the background */
  clutter_actor_paint (priv->background);
  clutter_actor_paint (priv->background_fade);

  CLUTTER_ACTOR_CLASS (penge_grid_view_parent_class)->paint (actor);
}
Ejemplo n.º 10
0
static void
mpl_entry_paint (ClutterActor *actor)
{
  MplEntryPrivate *priv = MPL_ENTRY (actor)->priv;

  CLUTTER_ACTOR_CLASS (mpl_entry_parent_class)->paint (actor);

  clutter_actor_paint (priv->entry);

  clutter_actor_paint (priv->table);
}
Ejemplo n.º 11
0
static void
ntf_tray_paint (ClutterActor *actor)
{
  NtfTrayPrivate *priv = NTF_TRAY (actor)->priv;

  if (CLUTTER_ACTOR_IS_MAPPED (priv->control))
    clutter_actor_paint (CLUTTER_ACTOR(priv->control));

  if (priv->notifiers && CLUTTER_ACTOR_IS_MAPPED (priv->notifiers))
    clutter_actor_paint (CLUTTER_ACTOR(priv->notifiers));
}
Ejemplo n.º 12
0
static void
mpl_application_view_pick (ClutterActor *actor, const ClutterColor *color)
{
  MplApplicationViewPrivate *priv = ((MplApplicationView *) actor)->priv;

  CLUTTER_ACTOR_CLASS (mpl_application_view_parent_class)->pick (actor, color);

  clutter_actor_paint (priv->icon);
  clutter_actor_paint (priv->title_box);
  clutter_actor_paint (priv->close_button);
  clutter_actor_paint (priv->app_frame);
}
Ejemplo n.º 13
0
static void
tidy_scroll_view_paint (ClutterActor *actor)
{
  TidyScrollViewPrivate *priv = TIDY_SCROLL_VIEW (actor)->priv;
  
  if (priv->child && CLUTTER_ACTOR_IS_VISIBLE (priv->child))
    clutter_actor_paint (priv->child);
  if (CLUTTER_ACTOR_IS_VISIBLE (priv->hscroll))
    clutter_actor_paint (priv->hscroll);
  if (CLUTTER_ACTOR_IS_VISIBLE (priv->vscroll))
    clutter_actor_paint (priv->vscroll);
}
Ejemplo n.º 14
0
static void
mx_expander_paint (ClutterActor *actor)
{
  MxExpanderPrivate *priv = ((MxExpander* ) actor)->priv;

  CLUTTER_ACTOR_CLASS (mx_expander_parent_class)->paint (actor);

  clutter_actor_paint (priv->label);
  clutter_actor_paint (priv->arrow);

  if (priv->expanded)
    clutter_actor_paint (priv->child);
}
Ejemplo n.º 15
0
static void
mx_toolbar_paint (ClutterActor *actor)
{
  MxToolbarPrivate *priv = MX_TOOLBAR (actor)->priv;

  CLUTTER_ACTOR_CLASS (mx_toolbar_parent_class)->paint (actor);

  if (priv->child)
    clutter_actor_paint (priv->child);

  if (priv->close_button)
    clutter_actor_paint (priv->close_button);
}
static void
penge_calendar_pane_paint (ClutterActor *actor)
{
  PengeCalendarPanePrivate *priv = GET_PRIVATE (actor);

  if (CLUTTER_ACTOR_CLASS (penge_calendar_pane_parent_class)->paint)
    CLUTTER_ACTOR_CLASS (penge_calendar_pane_parent_class)->paint (actor);

  clutter_actor_paint (CLUTTER_ACTOR (priv->events_header_table));
  clutter_actor_paint (CLUTTER_ACTOR (priv->events_pane));
  clutter_actor_paint (CLUTTER_ACTOR (priv->tasks_header_table));
  clutter_actor_paint (CLUTTER_ACTOR (priv->tasks_pane));
}
Ejemplo n.º 17
0
static void
st_scroll_view_paint (ClutterActor *actor)
{
  StScrollViewPrivate *priv = ST_SCROLL_VIEW (actor)->priv;

  /* StBin will paint the child */
  CLUTTER_ACTOR_CLASS (st_scroll_view_parent_class)->paint (actor);

  /* paint our custom children */
  if (priv->hscrollbar_visible && CLUTTER_ACTOR_IS_VISIBLE (priv->hscroll))
    clutter_actor_paint (priv->hscroll);
  if (priv->vscrollbar_visible && CLUTTER_ACTOR_IS_VISIBLE (priv->vscroll))
    clutter_actor_paint (priv->vscroll);
}
Ejemplo n.º 18
0
static void
gmc_button_paint (ClutterActor *self)
{
  GmcButtonPrivate *priv;

  priv = GMC_BUTTON_GET_PRIVATE (self);

  if (priv->icon) {
    clutter_actor_paint (priv->icon);
  }
  if (priv->label) {
    clutter_actor_paint (priv->label);
  }
}
Ejemplo n.º 19
0
static void
ntf_overlay_paint (ClutterActor *actor)
{
    NtfOverlayPrivate *priv = NTF_OVERLAY (actor)->priv;

    if (CLUTTER_ACTOR_IS_MAPPED (priv->tray_normal))
        clutter_actor_paint (CLUTTER_ACTOR(priv->tray_normal));

    if (CLUTTER_ACTOR_IS_MAPPED (priv->lowlight))
        clutter_actor_paint (CLUTTER_ACTOR(priv->lowlight));

    if (CLUTTER_ACTOR_IS_MAPPED (priv->tray_urgent))
        clutter_actor_paint (CLUTTER_ACTOR(priv->tray_urgent));
}
Ejemplo n.º 20
0
Archivo: mx-slider.c Proyecto: 3v1n0/mx
static void
mx_slider_pick (ClutterActor       *actor,
                const ClutterColor *pick_color)
{
  MxSlider *self = MX_SLIDER (actor);
  MxSliderPrivate *priv = self->priv;

  /* Chaining up won't draw the media bar outline as it's not set reactive
   * by default */
  CLUTTER_ACTOR_CLASS (mx_slider_parent_class)->pick (actor, pick_color);

  clutter_actor_paint (priv->trough_bg);
  clutter_actor_paint (priv->handle);
}
Ejemplo n.º 21
0
static void
mnb_zones_preview_paint (ClutterActor *actor)
{
  GList *w;
  MnbZonesPreviewPrivate *priv = MNB_ZONES_PREVIEW (actor)->priv;

  /* Chain up for background */
  CLUTTER_ACTOR_CLASS (mnb_zones_preview_parent_class)->paint (actor);

  clutter_actor_paint (priv->workspace_bg);
  /* Paint bins */
  for (w = priv->workspace_bins; w; w = w->next)
    clutter_actor_paint (CLUTTER_ACTOR (w->data));
}
Ejemplo n.º 22
0
static void
st_scroll_view_paint (ClutterActor *actor)
{
  StScrollViewPrivate *priv = ST_SCROLL_VIEW (actor)->priv;

  st_widget_paint_background (ST_WIDGET (actor));

  if (priv->child)
    clutter_actor_paint (priv->child);
  if (priv->hscrollbar_visible)
    clutter_actor_paint (priv->hscroll);
  if (priv->vscrollbar_visible)
    clutter_actor_paint (priv->vscroll);
}
Ejemplo n.º 23
0
static void
mx_scroll_view_pick (ClutterActor       *actor,
                     const ClutterColor *color)
{
  MxScrollViewPrivate *priv = MX_SCROLL_VIEW (actor)->priv;

  /* Chain up so we get a bounding box pained (if we are reactive) */
  CLUTTER_ACTOR_CLASS (mx_scroll_view_parent_class)->pick (actor, color);

  /* paint our custom children */
  if (CLUTTER_ACTOR_IS_VISIBLE (priv->hscroll))
    clutter_actor_paint (priv->hscroll);
  if (CLUTTER_ACTOR_IS_VISIBLE (priv->vscroll))
    clutter_actor_paint (priv->vscroll);
}
Ejemplo n.º 24
0
static void
st_scroll_bar_pick (ClutterActor       *actor,
                    const ClutterColor *pick_color)
{
  StScrollBarPrivate *priv = ST_SCROLL_BAR (actor)->priv;

  CLUTTER_ACTOR_CLASS (st_scroll_bar_parent_class)->pick (actor, pick_color);

  clutter_actor_paint (priv->bw_stepper);
  clutter_actor_paint (priv->fw_stepper);
  clutter_actor_paint (priv->trough);

  if (priv->handle && priv->adjustment)
    clutter_actor_paint (priv->handle);
}
Ejemplo n.º 25
0
static void
mx_toolbar_pick (ClutterActor       *actor,
                 const ClutterColor *color)
{
  MxToolbarPrivate *priv = MX_TOOLBAR (actor)->priv;

  CLUTTER_ACTOR_CLASS (mx_toolbar_parent_class)->pick (actor, color);

  if (priv->child)
    clutter_actor_paint (priv->child);

  if (priv->close_button
      && clutter_actor_should_pick_paint (priv->close_button))
    clutter_actor_paint (priv->close_button);
}
Ejemplo n.º 26
0
static void
mx_combo_box_paint (ClutterActor *actor)
{
  MxComboBoxPrivate *priv = MX_COMBO_BOX (actor)->priv;

  CLUTTER_ACTOR_CLASS (mx_combo_box_parent_class)->paint (actor);

  clutter_actor_paint (priv->label);

  if (priv->icon)
    clutter_actor_paint (priv->icon);

  if (priv->marker)
    clutter_actor_paint (priv->marker);
}
Ejemplo n.º 27
0
static void
st_entry_pick (ClutterActor       *actor,
               const ClutterColor *c)
{
  StEntryPrivate *priv = ST_ENTRY_PRIV (actor);

  CLUTTER_ACTOR_CLASS (st_entry_parent_class)->pick (actor, c);

  clutter_actor_paint (priv->entry);

  if (priv->primary_icon)
    clutter_actor_paint (priv->primary_icon);

  if (priv->secondary_icon)
    clutter_actor_paint (priv->secondary_icon);
}
Ejemplo n.º 28
0
static void
st_scroll_bar_paint (ClutterActor *actor)
{
  StScrollBarPrivate *priv = ST_SCROLL_BAR (actor)->priv;

  CLUTTER_ACTOR_CLASS (st_scroll_bar_parent_class)->paint (actor);

  clutter_actor_paint (priv->bw_stepper);

  clutter_actor_paint (priv->fw_stepper);

  clutter_actor_paint (priv->trough);

  if (priv->handle && CLUTTER_ACTOR_IS_VISIBLE (priv->handle))
    clutter_actor_paint (priv->handle);
}
Ejemplo n.º 29
0
static void
paint (ClutterActor *self)
{
  ChamplainTilePrivate *priv = GET_PRIVATE (self);

  clutter_actor_paint (CLUTTER_ACTOR (priv->content_group));
}
Ejemplo n.º 30
0
static void
mex_shell_paint (ClutterActor *actor)
{
  GList *c;
  MexShellPrivate *priv = MEX_SHELL (actor)->priv;

  CLUTTER_ACTOR_CLASS (mex_shell_parent_class)->paint (actor);

  for (c = priv->children; c; c = c->next)
    {
      gboolean do_paint;
      MexShellChildData *data = c->data;

      if (data->child == priv->presented)
        do_paint = TRUE;
      else if (data->start_animator)
        do_paint = TRUE;
      else if (clutter_timeline_is_playing (
                 clutter_animator_get_timeline (data->animator)))
        do_paint = TRUE;
      else
        do_paint = FALSE;

      if (do_paint)
        clutter_actor_paint (((MexShellChildData *)c->data)->child);

      if (data->start_animator)
        {
          clutter_animator_start (data->animator);
          data->start_animator = FALSE;
        }
    }
}