当前位置: 首页>>代码示例>>C++>>正文


C++ CLUTTER_ACTOR_CLASS函数代码示例

本文整理汇总了C++中CLUTTER_ACTOR_CLASS函数的典型用法代码示例。如果您正苦于以下问题:C++ CLUTTER_ACTOR_CLASS函数的具体用法?C++ CLUTTER_ACTOR_CLASS怎么用?C++ CLUTTER_ACTOR_CLASS使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了CLUTTER_ACTOR_CLASS函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: st_widget_unmap

static void
st_widget_unmap (ClutterActor *actor)
{
  StWidgetPrivate *priv = ST_WIDGET (actor)->priv;

  CLUTTER_ACTOR_CLASS (st_widget_parent_class)->unmap (actor);

  if (priv->border_image)
    clutter_actor_unmap (priv->border_image);

  if (priv->background_image)
    clutter_actor_unmap (priv->background_image);

  if (priv->tooltip)
    clutter_actor_unmap ((ClutterActor *) priv->tooltip);
}
开发者ID:MarkieMark,项目名称:gnome-shell,代码行数:16,代码来源:st-widget.c

示例2: gmc_button_map

static void
gmc_button_map (ClutterActor *self)
{
  GmcButtonPrivate *priv;

  priv = GMC_BUTTON_GET_PRIVATE (self);

  CLUTTER_ACTOR_CLASS (gmc_button_parent_class)->map (self);

  if (priv->icon) {
    clutter_actor_map (priv->icon);
  }
  if (priv->label) {
    clutter_actor_map (priv->label);
  }
}
开发者ID:gcorvala,项目名称:Media-Center,代码行数:16,代码来源:gmc-button.c

示例3: clutter_x11_texture_pixmap_realize

static void
clutter_x11_texture_pixmap_realize (ClutterActor *actor)
{
  ClutterX11TexturePixmap        *texture = CLUTTER_X11_TEXTURE_PIXMAP (actor);
  ClutterX11TexturePixmapPrivate *priv = texture->priv;

  CLUTTER_ACTOR_CLASS (clutter_x11_texture_pixmap_parent_class)->
      realize (actor);

  CLUTTER_ACTOR_SET_FLAGS (actor, CLUTTER_ACTOR_REALIZED);

  clutter_x11_texture_pixmap_update_area_real (texture,
					       0, 0,
					       priv->pixmap_width,
					       priv->pixmap_height);
}
开发者ID:archlinuxarm-n900,项目名称:clutter08,代码行数:16,代码来源:clutter-x11-texture-pixmap.c

示例4: mx_table_allocate

static void
mx_table_allocate (ClutterActor          *self,
                   const ClutterActorBox *box,
                   ClutterAllocationFlags flags)
{
  MxTablePrivate *priv = MX_TABLE (self)->priv;

  CLUTTER_ACTOR_CLASS (mx_table_parent_class)->allocate (self, box, flags);

  if (priv->n_cols < 1 || priv->n_rows < 1)
    {
      return;
    };

  mx_table_preferred_allocate (self, box, flags);
}
开发者ID:ManMower,项目名称:mx,代码行数:16,代码来源:mx-table.c

示例5: st_scroll_view_pick

static void
st_scroll_view_pick (ClutterActor       *actor,
                     const ClutterColor *color)
{
  StScrollViewPrivate *priv = ST_SCROLL_VIEW (actor)->priv;

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

  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);
}
开发者ID:NikoKrause,项目名称:Cinnamon,代码行数:16,代码来源:st-scroll-view.c

示例6: mex_column_class_init

static void
mex_column_class_init (MexColumnClass *klass)
{
  GParamSpec *pspec;

  GObjectClass *o_class = G_OBJECT_CLASS (klass);
  ClutterActorClass *a_class = CLUTTER_ACTOR_CLASS (klass);

  o_class->dispose = mex_column_dispose;
  o_class->finalize = mex_column_finalize;
  o_class->set_property = mex_column_set_property;
  o_class->get_property = mex_column_get_property;

  a_class->get_preferred_width  = mex_column_get_preferred_width;
  a_class->get_preferred_height = mex_column_get_preferred_height;
  a_class->allocate             = mex_column_allocate;
  a_class->apply_transform      = mex_column_apply_transform;
  a_class->paint                = mex_column_paint;
  a_class->pick                 = mex_column_pick;
  a_class->map                  = mex_column_map;
  a_class->unmap                = mex_column_unmap;
  a_class->get_paint_volume     = mex_column_get_paint_volume;

  g_type_class_add_private (klass, sizeof (MexColumnPrivate));

  pspec = g_param_spec_boolean ("collapse-on-focus",
                                "Collapse On Focus",
                                "Collapse items before the focused item.",
                                TRUE,
                                G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
  g_object_class_install_property (o_class, PROP_COLLAPSE_ON_FOCUS, pspec);

  pspec = g_param_spec_boolean ("opened",
                                "Opened",
                                "Whether the column has at least one open item.",
                                TRUE,
                                G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
  g_object_class_install_property (o_class, PROP_OPENED, pspec);

  /* MxScrollable properties */
  g_object_class_override_property (o_class,
                                    PROP_HADJUST,
                                    "horizontal-adjustment");
  g_object_class_override_property (o_class,
                                    PROP_VADJUST,
                                    "vertical-adjustment");
}
开发者ID:ocrete,项目名称:media-explorer,代码行数:47,代码来源:mex-column.c

示例7: mx_combo_box_class_init

static void
mx_combo_box_class_init (MxComboBoxClass *klass)
{
  GParamSpec *pspec;
  GObjectClass *object_class = G_OBJECT_CLASS (klass);
  ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);

  g_type_class_add_private (klass, sizeof (MxComboBoxPrivate));

  object_class->get_property = mx_combo_box_get_property;
  object_class->set_property = mx_combo_box_set_property;
  object_class->finalize = mx_combo_box_finalize;

  actor_class->paint = mx_combo_box_paint;

  actor_class->get_preferred_width = mx_combo_box_get_preferred_width;
  actor_class->get_preferred_height = mx_combo_box_get_preferred_height;
  actor_class->allocate = mx_combo_box_allocate;

  actor_class->button_press_event = mx_combo_box_button_press_event;
  actor_class->touch_event = mx_combo_box_touch_event;
  actor_class->key_press_event = mx_combo_box_key_press_event;

  pspec = g_param_spec_string ("active-text",
                               "Active Text",
                               "Text currently displayed in the combo box"
                               " button",
                               "",
                               MX_PARAM_READWRITE);
  g_object_class_install_property (object_class, PROP_ACTIVE_TEXT, pspec);

  pspec = g_param_spec_string ("active-icon-name",
                               "Active Icon-name",
                               "Name of the icon currently displayed in the "
                               "combo-box",
                               NULL,
                               MX_PARAM_READWRITE);
  g_object_class_install_property (object_class, PROP_ACTIVE_ICON_NAME, pspec);

  pspec = g_param_spec_int ("index",
                            "Index",
                            "Index of the selected item, or -1 if no item is"
                            " selected.",
                            -1, G_MAXINT, -1,
                            MX_PARAM_READWRITE);
  g_object_class_install_property (object_class, PROP_INDEX, pspec);
}
开发者ID:ManMower,项目名称:mx,代码行数:47,代码来源:mx-combo-box.c

示例8: mex_shell_class_init

static void
mex_shell_class_init (MexShellClass *klass)
{
  GParamSpec *pspec;

  GObjectClass *object_class = G_OBJECT_CLASS (klass);
  ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);

  g_type_class_add_private (klass, sizeof (MexShellPrivate));

  object_class->get_property = mex_shell_get_property;
  object_class->set_property = mex_shell_set_property;
  object_class->dispose = mex_shell_dispose;
  object_class->finalize = mex_shell_finalize;

  actor_class->destroy = mex_shell_destroy;
  actor_class->get_preferred_width = mex_shell_get_preferred_width;
  actor_class->get_preferred_height = mex_shell_get_preferred_height;
  actor_class->allocate = mex_shell_allocate;
  actor_class->paint = mex_shell_paint;
  actor_class->pick = mex_shell_pick;

  pspec = g_param_spec_object ("presented",
                               "Presented",
                               "The last presented actor",
                               CLUTTER_TYPE_ACTOR,
                               G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
  g_object_class_install_property (object_class, PROP_PRESENTED, pspec);

  signals[SIGNAL_TRANSITION_STARTED] =
    g_signal_new ("transition-started",
                  G_TYPE_FROM_CLASS (klass),
                  G_SIGNAL_RUN_LAST,
                  G_STRUCT_OFFSET (MexShellClass, transition_started),
                  NULL, NULL,
                  g_cclosure_marshal_VOID__VOID,
                  G_TYPE_NONE, 0);

  signals[SIGNAL_TRANSITION_COMPLETED] =
    g_signal_new ("transition-completed",
                  G_TYPE_FROM_CLASS (klass),
                  G_SIGNAL_RUN_LAST,
                  G_STRUCT_OFFSET (MexShellClass, transition_completed),
                  NULL, NULL,
                  g_cclosure_marshal_VOID__VOID,
                  G_TYPE_NONE, 0);
}
开发者ID:dudochkin-victor,项目名称:mex,代码行数:47,代码来源:mex-shell.c

示例9: xfdashboard_stage_interface_class_init

/* Class initialization
 * Override functions in parent classes and define properties
 * and signals
 */
static void xfdashboard_stage_interface_class_init(XfdashboardStageInterfaceClass *klass)
{
	XfdashboardActorClass			*actorClass=XFDASHBOARD_ACTOR_CLASS(klass);
	ClutterActorClass				*clutterActorClass=CLUTTER_ACTOR_CLASS(klass);
	GObjectClass					*gobjectClass=G_OBJECT_CLASS(klass);

	/* Override functions */
	clutterActorClass->parent_set=xfdashboard_stage_interface_parent_set;
	clutterActorClass->get_preferred_width=_xfdashboard_stage_interface_get_preferred_width;
	clutterActorClass->get_preferred_height=_xfdashboard_stage_interface_get_preferred_height;

	gobjectClass->dispose=_xfdashboard_stage_interface_dispose;
	gobjectClass->set_property=_xfdashboard_stage_interface_set_property;
	gobjectClass->get_property=_xfdashboard_stage_interface_get_property;

	/* Set up private structure */
	g_type_class_add_private(klass, sizeof(XfdashboardStageInterfacePrivate));

	/* Define properties */
	XfdashboardStageInterfaceProperties[PROP_MONITOR]=
		g_param_spec_object("monitor",
							_("Monitor"),
							_("The monitor where this stage interface is connected to"),
							XFDASHBOARD_TYPE_WINDOW_TRACKER_MONITOR,
							G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);

	XfdashboardStageInterfaceProperties[PROP_BACKGROUND_IMAGE_TYPE]=
		g_param_spec_enum("background-image-type",
							_("Background image type"),
							_("Background image type"),
							XFDASHBOARD_TYPE_STAGE_BACKGROUND_IMAGE_TYPE,
							XFDASHBOARD_STAGE_BACKGROUND_IMAGE_TYPE_NONE,
							G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);

	XfdashboardStageInterfaceProperties[PROP_BACKGROUND_COLOR]=
		clutter_param_spec_color("background-color",
									_("Background color"),
									_("Color of stage's background"),
									NULL,
									G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);

	g_object_class_install_properties(gobjectClass, PROP_LAST, XfdashboardStageInterfaceProperties);

	/* Define stylable properties */
	xfdashboard_actor_install_stylable_property(actorClass, XfdashboardStageInterfaceProperties[PROP_BACKGROUND_IMAGE_TYPE]);
	xfdashboard_actor_install_stylable_property(actorClass, XfdashboardStageInterfaceProperties[PROP_BACKGROUND_COLOR]);
}
开发者ID:gmc-holle,项目名称:xfdashboard,代码行数:51,代码来源:stage-interface.c

示例10: mex_column_paint

static void
mex_column_paint (ClutterActor *actor)
{
  GList *c;
  gdouble value;
  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);
  if (priv->adjustment)
    value = mx_adjustment_get_value (priv->adjustment);
  else
    value = 0;

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

  if (priv->n_items < 1 && priv->placeholder_actor)
    clutter_actor_paint (priv->placeholder_actor);
  else
    {
      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 ();

  clutter_actor_paint (priv->header);
}
开发者ID:olethanh,项目名称:media-explorer,代码行数:47,代码来源:mex-column.c

示例11: mx_toggle_allocate

static void
mx_toggle_allocate (ClutterActor          *actor,
                    const ClutterActorBox *box,
                    ClutterAllocationFlags flags)
{
  MxTogglePrivate *priv = MX_TOGGLE (actor)->priv;
  ClutterActorBox handle_box, child_box;
  CoglHandle background;
  gfloat handle_w;
  gfloat toggle_pos;

  CLUTTER_ACTOR_CLASS (mx_toggle_parent_class)->allocate (actor, box, flags);

  mx_widget_get_available_area (MX_WIDGET (actor), box, &child_box);

  /* background-image don't get stretched, so adjust the child box so that the
   * handle appears in the correct place.
   */
  background = mx_widget_get_background_texture (MX_WIDGET (actor));
  if (background)
    {
      gfloat width;
      MxPadding padding;

      mx_widget_get_padding (MX_WIDGET (actor), &padding);
      width = cogl_texture_get_width (background);
      width -= padding.left + padding.right;

      child_box.x1 += (child_box.x2 - child_box.x1) / 2.f;
      child_box.x1 -= width / 2.f;
      child_box.x2 = child_box.x1 + width;
    }

  clutter_actor_get_preferred_width (priv->handle, -1, NULL, &handle_w);
  toggle_pos = child_box.x2 - handle_w - child_box.x1;
  priv->slide_length = toggle_pos;

  toggle_pos = toggle_pos * priv->position;

  handle_box.x1 = (gint) (child_box.x1 + toggle_pos);
  handle_box.y1 = child_box.y1;
  handle_box.x2 = handle_box.x1 + handle_w;
  handle_box.y2 = child_box.y2;

  clutter_actor_allocate (priv->handle, &handle_box, flags);
}
开发者ID:ManMower,项目名称:mx,代码行数:46,代码来源:mx-toggle.c

示例12: gmc_button_pick

static void
gmc_button_pick (ClutterActor       *self,
                 const ClutterColor *pick_color)
{
  GmcButtonPrivate *priv;

  priv = GMC_BUTTON_GET_PRIVATE (self);

  CLUTTER_ACTOR_CLASS (gmc_button_parent_class)->pick (self, pick_color);

  if (priv->icon) {
    clutter_actor_paint (priv->icon);
  }
  if (priv->label) {
    clutter_actor_paint (priv->label);
  }
}
开发者ID:gcorvala,项目名称:Media-Center,代码行数:17,代码来源:gmc-button.c

示例13: mx_table_pick

static void
mx_table_pick (ClutterActor       *self,
               const ClutterColor *color)
{
  ClutterActorIter iter;
  ClutterActor *child;

  /* Chain up so we get a bounding box painted (if we are reactive) */
  CLUTTER_ACTOR_CLASS (mx_table_parent_class)->pick (self, color);

  clutter_actor_iter_init (&iter, self);
  while (clutter_actor_iter_next (&iter, &child))
    {
      if (CLUTTER_ACTOR_IS_VISIBLE (child))
        clutter_actor_paint (child);
    }
}
开发者ID:ManMower,项目名称:mx,代码行数:17,代码来源:mx-table.c

示例14: clutter_group_class_init

static void
clutter_group_class_init (ClutterGroupClass *klass)
{
  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
  ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);

  actor_class->get_preferred_width = clutter_group_real_get_preferred_width;
  actor_class->get_preferred_height = clutter_group_real_get_preferred_height;
  actor_class->allocate = clutter_group_real_allocate;
  actor_class->paint = clutter_group_real_paint;
  actor_class->pick = clutter_group_real_pick;
  actor_class->show_all = clutter_group_real_show_all;
  actor_class->hide_all = clutter_group_real_hide_all;
  actor_class->get_paint_volume = clutter_group_real_get_paint_volume;

  gobject_class->dispose = clutter_group_dispose;
}
开发者ID:collinss,项目名称:muffin,代码行数:17,代码来源:clutter-group.c

示例15: tweet_overlay_pick

static void
tweet_overlay_pick (ClutterActor       *actor,
                    const ClutterColor *pick_color)
{
  TweetOverlayPrivate *priv = TWEET_OVERLAY (actor)->priv;
  GList *l;

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

  for (l = priv->children; l != NULL; l = l->next)
    {
      ClutterActor *child = l->data;

      if (CLUTTER_ACTOR_IS_VISIBLE (child))
        clutter_actor_paint (child);
    }
}
开发者ID:ak2consulting,项目名称:tweet,代码行数:17,代码来源:tweet-overlay.c


注:本文中的CLUTTER_ACTOR_CLASS函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。