• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ CLUTTER_IS_ACTOR函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: clarity_cover_destroy

/* composite actors should implement destroy(), and inside their
 * implementation destroy any actors they are composed from;
 * in this case, we just destroy the child ClutterBox
 */
void clarity_cover_destroy(ClutterActor *self) {
    ClarityCoverPrivate *priv = CLARITY_COVER_GET_PRIVATE(self);

    if (priv) {
        if (CLUTTER_IS_ACTOR(priv->texture)) {
            clutter_actor_destroy(priv->texture);
            priv->texture = NULL;
        }

        if (CLUTTER_IS_ACTOR(priv->reflection)) {
            clutter_actor_destroy(priv->reflection);
            priv->reflection = NULL;
        }

        if (G_IS_OBJECT(priv->rotateBehaviour))
            priv->rotateBehaviour = NULL;
    }

    /* chain up to destroy() on the parent ClutterActorClass;
     * note that we check the parent class has a destroy() implementation
     * before calling it
     */
    if (CLUTTER_ACTOR_CLASS(clarity_cover_parent_class)->destroy)
        CLUTTER_ACTOR_CLASS(clarity_cover_parent_class)->destroy(self);
}
开发者ID:Sprezzatech,项目名称:gtkpod,代码行数:29,代码来源:clarity_cover.c


示例2: clutter_box2d_add_weld_joint

ClutterBox2DJoint *
clutter_box2d_add_weld_joint (ClutterBox2D        *box2d,
                              ClutterActor        *actor1,
                              ClutterActor        *actor2,
                              const ClutterVertex *anchor1,
                              const ClutterVertex *anchor2)
{
    ClutterBox2DPrivate *priv;
    b2WeldJointDef jd;

    g_return_val_if_fail (CLUTTER_IS_BOX2D (box2d), NULL);
    g_return_val_if_fail (CLUTTER_IS_ACTOR (actor1), NULL);
    g_return_val_if_fail (CLUTTER_IS_ACTOR (actor2), NULL);
    g_return_val_if_fail (anchor1 != NULL, NULL);
    g_return_val_if_fail (anchor2 != NULL, NULL);

    priv = box2d->priv;

    clutter_box2d_joint_ensure_bodies (box2d, actor1, actor2);

    jd.collideConnected = false;
    jd.bodyA = clutter_box2d_get_child (box2d, actor1)->priv->body;
    jd.bodyB = clutter_box2d_get_child (box2d, actor2)->priv->body;

    if (!jd.bodyA || !jd.bodyB)
        return NULL;

    jd.localAnchorA = b2Vec2 (anchor1->x * priv->scale_factor,
                              anchor1->y * priv->scale_factor);
    jd.localAnchorB = b2Vec2 (anchor2->x * priv->scale_factor,
                              anchor2->y * priv->scale_factor);
    jd.referenceAngle = jd.bodyB->GetAngle() - jd.bodyA->GetAngle();

    return joint_new (box2d, priv->world->CreateJoint (&jd), CLUTTER_BOX2D_JOINT_WELD);
}
开发者ID:GNOME,项目名称:clutter-box2d,代码行数:35,代码来源:clutter-box2d-joint.cpp


示例3: clutter_box2d_add_weld_joint2

ClutterBox2DJoint *
clutter_box2d_add_weld_joint2 (ClutterBox2D        *box2d,
                               ClutterActor        *actor1,
                               ClutterActor        *actor2,
                               const ClutterVertex *anchor)
{
    ClutterBox2DPrivate *priv;
    b2Body *bodyA, *bodyB;
    b2WeldJointDef jd;

    g_return_val_if_fail (CLUTTER_IS_BOX2D (box2d), NULL);
    g_return_val_if_fail (CLUTTER_IS_ACTOR (actor1), NULL);
    g_return_val_if_fail (CLUTTER_IS_ACTOR (actor2), NULL);
    g_return_val_if_fail (anchor != NULL, NULL);

    priv = box2d->priv;

    clutter_box2d_joint_ensure_bodies (box2d, actor1, actor2);

    jd.collideConnected = false;

    bodyA = clutter_box2d_get_child (box2d, actor1)->priv->body;
    bodyB = clutter_box2d_get_child (box2d, actor2)->priv->body;
    if (!bodyA || !bodyB)
        return NULL;

    jd.Initialize (bodyA, bodyB,
                   b2Vec2 (anchor->x * priv->scale_factor,
                           anchor->y * priv->scale_factor));

    return joint_new (box2d, priv->world->CreateJoint (&jd), CLUTTER_BOX2D_JOINT_WELD);
}
开发者ID:GNOME,项目名称:clutter-box2d,代码行数:32,代码来源:clutter-box2d-joint.cpp


示例4: clutter_box2d_add_pulley_joint

ClutterBox2DJoint *
clutter_box2d_add_pulley_joint (ClutterBox2D        *box2d,
                                ClutterActor        *actor1,
                                ClutterActor        *actor2,
                                const ClutterVertex *anchor1,
                                const ClutterVertex *anchor2,
                                const ClutterVertex *ground_anchor1,
                                const ClutterVertex *ground_anchor2,
                                gdouble              length1,
                                gdouble              length2,
                                gdouble              max_length1,
                                gdouble              max_length2,
                                gdouble              ratio)
{
    ClutterBox2DPrivate *priv;
    b2PulleyJointDef jd;

    g_return_val_if_fail (CLUTTER_IS_BOX2D (box2d), NULL);
    g_return_val_if_fail (CLUTTER_IS_ACTOR (actor1), NULL);
    g_return_val_if_fail (CLUTTER_IS_ACTOR (actor2), NULL);
    g_return_val_if_fail (anchor1 != NULL, NULL);
    g_return_val_if_fail (anchor2 != NULL, NULL);
    g_return_val_if_fail (ground_anchor1 != NULL, NULL);
    g_return_val_if_fail (ground_anchor2 != NULL, NULL);

    priv = box2d->priv;

    clutter_box2d_joint_ensure_bodies (box2d, actor1, actor2);

    jd.collideConnected = false;
    jd.bodyA = clutter_box2d_get_child (box2d, actor1)->priv->body;
    jd.bodyB = clutter_box2d_get_child (box2d, actor2)->priv->body;

    if (!jd.bodyA || !jd.bodyB)
        return NULL;

    jd.groundAnchorA = b2Vec2 (ground_anchor1->x * priv->scale_factor,
                               ground_anchor1->y * priv->scale_factor);
    jd.groundAnchorB = b2Vec2 (ground_anchor2->x * priv->scale_factor,
                               ground_anchor2->y * priv->scale_factor);
    jd.localAnchorA = b2Vec2 (anchor1->x * priv->scale_factor,
                              anchor1->y * priv->scale_factor);
    jd.localAnchorB = b2Vec2 (anchor2->x * priv->scale_factor,
                              anchor2->y * priv->scale_factor);
    jd.ratio = ratio;
    jd.lengthA = length1 * priv->scale_factor;
    jd.lengthB = length2 * priv->scale_factor;
    jd.maxLengthA = max_length1 * priv->scale_factor;
    jd.maxLengthB = max_length2 * priv->scale_factor;

    return joint_new (box2d, priv->world->CreateJoint (&jd), CLUTTER_BOX2D_JOINT_PULLEY);
}
开发者ID:GNOME,项目名称:clutter-box2d,代码行数:52,代码来源:clutter-box2d-joint.cpp


示例5: clutter_container_lower_child

/**
 * clutter_container_lower_child: (virtual lower)
 * @container: a #ClutterContainer
 * @actor: the actor to raise
 * @sibling: (allow-none): the sibling to lower to, or %NULL to lower
 *   to the bottom
 *
 * Lowers @actor to @sibling level, in the depth ordering.
 *
 * This function calls the #ClutterContainerIface.lower() virtual function,
 * which has been deprecated. The default implementation will call
 * clutter_actor_set_child_below_sibling().
 *
 * Since: 0.6
 *
 * Deprecated: 1.10: Use clutter_actor_set_child_below_sibling() instead.
 */
void
clutter_container_lower_child (ClutterContainer *container,
                               ClutterActor     *actor,
                               ClutterActor     *sibling)
{
  ClutterContainerIface *iface;
  ClutterActor *self;

  g_return_if_fail (CLUTTER_IS_CONTAINER (container));
  g_return_if_fail (CLUTTER_IS_ACTOR (actor));
  g_return_if_fail (sibling == NULL || CLUTTER_IS_ACTOR (sibling));

  if (actor == sibling)
    return;

  self = CLUTTER_ACTOR (container);

  if (clutter_actor_get_parent (actor) != self)
    {
      g_warning ("Actor of type '%s' is not a child of the container "
                 "of type '%s'",
                 g_type_name (G_OBJECT_TYPE (actor)),
                 g_type_name (G_OBJECT_TYPE (container)));
      return;
    }

  if (sibling != NULL&&
      clutter_actor_get_parent (sibling) != self)
    {
      g_warning ("Actor of type '%s' is not a child of the container "
                 "of type '%s'",
                 g_type_name (G_OBJECT_TYPE (sibling)),
                 g_type_name (G_OBJECT_TYPE (container)));
      return;
    }

  iface = CLUTTER_CONTAINER_GET_IFACE (container);

#ifdef CLUTTER_ENABLE_DEBUG
  if (G_UNLIKELY (_clutter_diagnostic_enabled ()))
    {
      if (iface->lower != container_real_lower)
        _clutter_diagnostic_message ("The ClutterContainer::lower() "
                                     "virtual function has been deprecated "
                                     "and it should not be overridden by "
                                     "newly written code");
    }
#endif /* CLUTTER_ENABLE_DEBUG */

  iface->lower (container, actor, sibling);
}
开发者ID:linuxmint,项目名称:muffin,代码行数:68,代码来源:clutter-container.c


示例6: clutter_box2d_add_pulley_joint2

ClutterBox2DJoint *
clutter_box2d_add_pulley_joint2 (ClutterBox2D        *box2d,
                                 ClutterActor        *actor1,
                                 ClutterActor        *actor2,
                                 const ClutterVertex *anchor1,
                                 const ClutterVertex *anchor2,
                                 const ClutterVertex *ground_anchor1,
                                 const ClutterVertex *ground_anchor2,
                                 gdouble              max_length1,
                                 gdouble              max_length2,
                                 gdouble              ratio)
{
    ClutterBox2DPrivate *priv;
    b2Body *bodyA, *bodyB;
    b2PulleyJointDef jd;

    g_return_val_if_fail (CLUTTER_IS_BOX2D (box2d), NULL);
    g_return_val_if_fail (CLUTTER_IS_ACTOR (actor1), NULL);
    g_return_val_if_fail (CLUTTER_IS_ACTOR (actor2), NULL);
    g_return_val_if_fail (anchor1 != NULL, NULL);
    g_return_val_if_fail (anchor2 != NULL, NULL);
    g_return_val_if_fail (ground_anchor1 != NULL, NULL);
    g_return_val_if_fail (ground_anchor2 != NULL, NULL);

    priv = box2d->priv;

    clutter_box2d_joint_ensure_bodies (box2d, actor1, actor2);

    jd.collideConnected = false;

    bodyA = clutter_box2d_get_child (box2d, actor1)->priv->body;
    bodyB = clutter_box2d_get_child (box2d, actor2)->priv->body;
    if (!bodyA || !bodyB)
        return NULL;

    jd.Initialize (bodyA, bodyB,
                   b2Vec2 (ground_anchor1->x * priv->scale_factor,
                           ground_anchor1->y * priv->scale_factor),
                   b2Vec2 (ground_anchor2->x * priv->scale_factor,
                           ground_anchor2->y * priv->scale_factor),
                   b2Vec2 (anchor1->x * priv->scale_factor,
                           anchor1->y * priv->scale_factor),
                   b2Vec2 (anchor2->x * priv->scale_factor,
                           anchor2->y * priv->scale_factor),
                   ratio);

    return joint_new (box2d, priv->world->CreateJoint (&jd), CLUTTER_BOX2D_JOINT_PULLEY);
}
开发者ID:GNOME,项目名称:clutter-box2d,代码行数:48,代码来源:clutter-box2d-joint.cpp


示例7: _xfdashboard_tooltip_action_on_leave_event

/* Pointer left actor with tooltip */
static gboolean _xfdashboard_tooltip_action_on_leave_event(XfdashboardTooltipAction *self,
															ClutterEvent *inEvent,
															gpointer inUserData)
{
	XfdashboardTooltipActionPrivate		*priv;
	ClutterActor						*actor;
	ClutterActor						*stage;
	ClutterActor						*actorMeta;

	g_return_val_if_fail(XFDASHBOARD_IS_TOOLTIP_ACTION(self), CLUTTER_EVENT_PROPAGATE);
	g_return_val_if_fail(CLUTTER_IS_ACTOR(inUserData), CLUTTER_EVENT_PROPAGATE);

	priv=self->priv;
	actor=CLUTTER_ACTOR(inUserData);

	/* Get current actor this action belongs to */
	actorMeta=clutter_actor_meta_get_actor(CLUTTER_ACTOR_META(self));

	/* Release all sources and signal handler (except for enter event) */
	if(priv->motionSignalID!=0)
	{
		if(actorMeta) g_signal_handler_disconnect(actorMeta, priv->motionSignalID);
		priv->motionSignalID=0;
	}

	if(priv->leaveSignalID!=0)
	{
		if(actorMeta) g_signal_handler_disconnect(actorMeta, priv->leaveSignalID);
		priv->leaveSignalID=0;
	}

	if(priv->captureSignalID)
	{
		if(priv->captureSignalActor) g_signal_handler_disconnect(priv->captureSignalActor, priv->captureSignalID);
		priv->captureSignalActor=NULL;
		priv->captureSignalID=0;
	}

	if(priv->timeoutSourceID!=0)
	{
		g_source_remove(priv->timeoutSourceID);
		priv->timeoutSourceID=0;
	}

	/* Clear last actor we remembered if it is pointing to this actor */
	if(_xfdashboard_tooltip_last_event_actor==actor)
	{
		_xfdashboard_tooltip_last_event_actor=NULL;
	}

	/* Hide tooltip now */
	stage=clutter_actor_get_stage(actor);
	if(stage && XFDASHBOARD_IS_STAGE(stage))
	{
		g_signal_emit_by_name(stage, "hide-tooltip", self, NULL);
		priv->isVisible=FALSE;
	}

	return(CLUTTER_EVENT_PROPAGATE);
}
开发者ID:Pablohn26,项目名称:xfdashboard,代码行数:61,代码来源:tooltip-action.c


示例8: _xfdashboard_tooltip_action_on_enter_event

/* Pointer entered an actor with tooltip */
static gboolean _xfdashboard_tooltip_action_on_enter_event(XfdashboardTooltipAction *self,
															ClutterEvent *inEvent,
															gpointer inUserData)
{
	XfdashboardTooltipActionPrivate		*priv;
	ClutterActor						*actor;

	g_return_val_if_fail(XFDASHBOARD_IS_TOOLTIP_ACTION(self), CLUTTER_EVENT_PROPAGATE);
	g_return_val_if_fail(CLUTTER_IS_ACTOR(inUserData), CLUTTER_EVENT_PROPAGATE);

	priv=self->priv;
	actor=CLUTTER_ACTOR(inUserData);

	/* Remove any timeout source we have added for this actor */
	if(priv->timeoutSourceID!=0)
	{
		g_source_remove(priv->timeoutSourceID);
		priv->timeoutSourceID=0;
	}

	/* Connect signals */
	g_warn_if_fail(priv->motionSignalID==0);
	priv->motionSignalID=g_signal_connect_swapped(actor,
													"motion-event",
													G_CALLBACK(_xfdashboard_tooltip_action_on_motion_event),
													self);

	g_warn_if_fail(priv->leaveSignalID==0);
	priv->leaveSignalID=g_signal_connect_swapped(actor,
													"leave-event",
													G_CALLBACK(_xfdashboard_tooltip_action_on_leave_event),
													self);

	return(CLUTTER_EVENT_PROPAGATE);
}
开发者ID:Pablohn26,项目名称:xfdashboard,代码行数:36,代码来源:tooltip-action.c


示例9: clutter_bin_layout_add

/**
 * clutter_bin_layout_add:
 * @self: a #ClutterBinLayout
 * @child: a #ClutterActor
 * @x_align: horizontal alignment policy for @child
 * @y_align: vertical alignment policy for @child
 *
 * Adds a #ClutterActor to the container using @self and
 * sets the alignment policies for it
 *
 * This function is equivalent to clutter_container_add_actor()
 * and clutter_layout_manager_child_set_property() but it does not
 * require a pointer to the #ClutterContainer associated to the
 * #ClutterBinLayout
 *
 * Since: 1.2
 */
void
clutter_bin_layout_add (ClutterBinLayout    *self,
                        ClutterActor        *child,
                        ClutterBinAlignment  x_align,
                        ClutterBinAlignment  y_align)
{
  ClutterBinLayoutPrivate *priv;
  ClutterLayoutManager *manager;
  ClutterLayoutMeta *meta;

  g_return_if_fail (CLUTTER_IS_BIN_LAYOUT (self));
  g_return_if_fail (CLUTTER_IS_ACTOR (child));

  priv = self->priv;

  if (priv->container == NULL)
    {
      g_warning ("The layout of type '%s' must be associated to "
                 "a ClutterContainer before adding children",
                 G_OBJECT_TYPE_NAME (self));
      return;
    }

  clutter_container_add_actor (priv->container, child);

  manager = CLUTTER_LAYOUT_MANAGER (self);
  meta = clutter_layout_manager_get_child_meta (manager,
                                                priv->container,
                                                child);
  g_assert (CLUTTER_IS_BIN_LAYER (meta));

  set_layer_x_align (CLUTTER_BIN_LAYER (meta), x_align);
  set_layer_y_align (CLUTTER_BIN_LAYER (meta), y_align);
}
开发者ID:nobled,项目名称:clutter,代码行数:51,代码来源:clutter-bin-layout.c


示例10: meta_switcher_dispose

static void meta_switcher_dispose(GObject *object)
{
    MetaSwitcher *switcher = META_SWITCHER(object);
    MetaSwitcherPrivate* priv = switcher->priv;

    if (priv->disposed) return;
    priv->disposed = TRUE;

    MetaScreen* screen = meta_plugin_get_screen(priv->plugin);
    ClutterActor* stage = meta_get_stage_for_screen(screen);
    clutter_actor_remove_child(stage, priv->top);

    if (priv->modaled) {
        meta_plugin_end_modal(priv->plugin, clutter_get_current_event_time());
        meta_enable_unredirect_for_screen(screen);

        if (priv->selected_id < 0 && priv->previous_focused)
            clutter_stage_set_key_focus(CLUTTER_STAGE(stage), priv->previous_focused);
    }

    if (CLUTTER_IS_ACTOR(priv->top)) {
        g_clear_pointer(&priv->top, clutter_actor_destroy);
    } else priv->top = NULL;

    if (priv->autoclose_id) {
        g_source_remove(priv->autoclose_id);
        priv->autoclose_id = 0;
    }

    GList* ws_list = meta_screen_get_workspaces(screen);
    g_list_foreach(ws_list, (GFunc)unhook_ws_event, switcher);

    G_OBJECT_CLASS(meta_switcher_parent_class)->dispose(object);
}
开发者ID:AOSC-Dev,项目名称:elsa-shell,代码行数:34,代码来源:switcher.c


示例11: clutter_behaviour_remove

/**
 * clutter_behaviour_remove:
 * @behave: a #ClutterBehaviour
 * @actor: a #ClutterActor
 *
 * Removes @actor from the list of #ClutterActor<!-- -->s to which
 * @behave applies.  This function removes a reference on the actor.
 *
 * Since: 0.2
 */
void
clutter_behaviour_remove (ClutterBehaviour *behave,
                          ClutterActor     *actor)
{
  ClutterBehaviourPrivate *priv;

  g_return_if_fail (CLUTTER_IS_BEHAVIOUR (behave));
  g_return_if_fail (CLUTTER_IS_ACTOR (actor));

  priv = behave->priv;

  if (!g_slist_find (priv->actors, actor))
    {
      g_warning ("The behaviour of type %s is not applied "
                 "to the actor of type %s",
                 g_type_name (G_OBJECT_TYPE (behave)),
                 g_type_name (G_OBJECT_TYPE (actor)));
      return;
    }

  g_signal_handlers_disconnect_by_func (actor,
                                        G_CALLBACK (remove_actor_on_destroy),
                                        behave);

  priv->actors = g_slist_remove (priv->actors, actor);
  
  g_signal_emit (behave, behave_signals[REMOVED], 0, actor);

  g_object_unref (actor);
}
开发者ID:spatulasnout,项目名称:clutter,代码行数:40,代码来源:clutter-behaviour.c


示例12: pkg_graph_place_child

static void
pkg_graph_place_child (PkgGraph     *graph,
                       ClutterActor *child)
{
	PkgGraphPrivate *priv;
	gfloat w, h, x = 0, y = 0;

	g_return_if_fail(PKG_IS_GRAPH(graph));
	g_return_if_fail(CLUTTER_IS_ACTOR(child));

	priv = graph->priv;

	clutter_actor_get_size(CLUTTER_ACTOR(graph), &w, &h);

	if (priv->xpad) {
		x = priv->xpad;
	}

	if (priv->ypad) {
		y = priv->ypad;
	}

	w -= 2 * priv->xpad;
	h -= 2 * priv->ypad;

	clutter_actor_set_size(child, w, h);
	clutter_actor_set_position(child, x, y);
	clutter_actor_queue_redraw(child);
}
开发者ID:chergert,项目名称:graph-hack,代码行数:29,代码来源:pkg-graph.c


示例13: get_window

static AstroWindow *
get_window (AstroApplication *app)
{
  AstroExamplePrivate *priv;
  ClutterColor color = { 0xff, 0xff, 0x22, 0x22 };
  ClutterActor *window = NULL, *rect;

  g_return_val_if_fail (ASTRO_IS_EXAMPLE (app), NULL);
  priv = ASTRO_EXAMPLE (app)->priv;

  if (CLUTTER_IS_ACTOR (priv->window))
    window = priv->window;
  else
    {
      window = astro_window_new ();
      
      rect = clutter_rectangle_new_with_color (&color);
      clutter_container_add_actor (CLUTTER_CONTAINER (window), rect);
      clutter_actor_set_size (rect, CSW (), CSH()-ASTRO_PANEL_HEIGHT());
      clutter_actor_show (rect);
    }

  ASTRO_EXAMPLE (app)->priv->window = window;

  return ASTRO_WINDOW (window);
}
开发者ID:UIKit0,项目名称:toys,代码行数:26,代码来源:astro-example.c


示例14: xfdashboard_traverse_actor

/**
 * xfdashboard_traverse_actor:
 * @inRootActor: The root #ClutterActor where to begin traversing
 * @inSelector: A #XfdashboardCssSelector to filter actors while traversing or
 *   %NULL to disable filterting
 * @inCallback: Function to call on matching children
 * @inUserData: Data to pass to callback function
 *
 * Iterates through all children of @inRootActor recursively beginning at
 * @inRootActor and for each child matching the selector @inSelector it calls the
 * callback function @inCallback with the matching child and the user-data at
 * @inUserData.
 *
 * If @inRootActor is %NULL it begins at the global stage.
 *
 * If the selector @inSelector is %NULL all children will match and the callback
 * function @inCallback is called for all children.
 */
void xfdashboard_traverse_actor(ClutterActor *inRootActor,
								XfdashboardCssSelector *inSelector,
								XfdashboardTraversalCallback inCallback,
								gpointer inUserData)
{
	g_return_if_fail(!inRootActor || CLUTTER_IS_ACTOR(inRootActor));
	g_return_if_fail(!inSelector || XFDASHBOARD_IS_CSS_SELECTOR(inSelector));
	g_return_if_fail(inCallback);

	/* If root actor where begin traversal is NULL then begin at stage */
	if(!inRootActor)
	{
		inRootActor=CLUTTER_ACTOR(xfdashboard_application_get_stage(NULL));
	}

	/* If no selector is provider create a seletor matching all actors.
	 * Otherwise take an extra ref on provided selector to prevent
	 * destruction when we unref it later.
	 */
	if(!inSelector) inSelector=xfdashboard_css_selector_new_from_string("*");
		else g_object_ref(inSelector);

	/* Do traversal */
	_xfdashboard_traverse_actor_internal(inRootActor, inSelector, inCallback, inUserData);

	/* Release reference on selector */
	g_object_unref(inSelector);
}
开发者ID:Pablohn26,项目名称:xfdashboard,代码行数:46,代码来源:utils.c


示例15: clutter_container_add_actor

/**
 * clutter_container_add_actor:
 * @container: a #ClutterContainer
 * @actor: the first #ClutterActor to add
 *
 * Adds a #ClutterActor to @container. This function will emit the
 * "actor-added" signal. The actor should be parented to
 * @container. You cannot add a #ClutterActor to more than one
 * #ClutterContainer.
 *
 * Since: 0.4
 */
void
clutter_container_add_actor (ClutterContainer *container,
                             ClutterActor     *actor)
{
  ClutterContainerIface *iface;
  ClutterActor *parent;

  g_return_if_fail (CLUTTER_IS_CONTAINER (container));
  g_return_if_fail (CLUTTER_IS_ACTOR (actor));

  iface = CLUTTER_CONTAINER_GET_IFACE (container);
  if (!iface->add)
    {
      CLUTTER_CONTAINER_WARN_NOT_IMPLEMENTED (container, "add");
      return;
    }

  parent = clutter_actor_get_parent (actor);
  if (parent)
    {
      g_warning ("Attempting to add actor of type '%s' to a "
		 "container of type '%s', but the actor has "
                 "already a parent of type '%s'.",
		 g_type_name (G_OBJECT_TYPE (actor)),
		 g_type_name (G_OBJECT_TYPE (container)),
		 g_type_name (G_OBJECT_TYPE (parent)));
      return;
    }

  clutter_container_create_child_meta (container, actor);

  iface->add (container, actor);
}
开发者ID:gramozeka,项目名称:GSB-NEW,代码行数:45,代码来源:clutter-container.c


示例16: clutter_container_remove_actor

/**
 * clutter_container_remove_actor:
 * @container: a #ClutterContainer
 * @actor: a #ClutterActor
 *
 * Removes @actor from @container. The actor should be unparented, so
 * if you want to keep it around you must hold a reference to it
 * yourself, using g_object_ref(). When the actor has been removed,
 * the "actor-removed" signal is emitted by @container.
 *
 * Since: 0.4
 */
void
clutter_container_remove_actor (ClutterContainer *container,
                                ClutterActor     *actor)
{
  ClutterContainerIface *iface;
  ClutterActor *parent;

  g_return_if_fail (CLUTTER_IS_CONTAINER (container));
  g_return_if_fail (CLUTTER_IS_ACTOR (actor));

  iface = CLUTTER_CONTAINER_GET_IFACE (container);
  if (!iface->remove)
    {
      CLUTTER_CONTAINER_WARN_NOT_IMPLEMENTED (container, "remove");
      return;
    }

  parent = clutter_actor_get_parent (actor);
  if (parent != CLUTTER_ACTOR (container))
    {
      g_warning ("Attempting to remove actor of type '%s' from "
		 "group of class '%s', but the container is not "
                 "the actor's parent.",
		 g_type_name (G_OBJECT_TYPE (actor)),
		 g_type_name (G_OBJECT_TYPE (container)));
      return;
    }

  clutter_container_destroy_child_meta (container, actor);

  iface->remove (container, actor);
}
开发者ID:gramozeka,项目名称:GSB-NEW,代码行数:44,代码来源:clutter-container.c


示例17: _xfdashboard_stylable_real_get_parent

/* Default implementation of virtual function "get_parent" */
static XfdashboardStylable* _xfdashboard_stylable_real_get_parent(XfdashboardStylable *self)
{
	XfdashboardStylable		*parent;

	g_return_val_if_fail(XFDASHBOARD_IS_STYLABLE(self), NULL);

	parent=NULL;

	/* If object implementing this interface is derived from ClutterActor
	 * get actor's parent actor.
	 */
	if(CLUTTER_IS_ACTOR(self))
	{
		ClutterActor		*parentActor;

		/* Get parent and if parent stylable set parent as result */
		parentActor=clutter_actor_get_parent(CLUTTER_ACTOR(self));
		if(parentActor &&
			XFDASHBOARD_IS_STYLABLE(parentActor))
		{
			parent=XFDASHBOARD_STYLABLE(parentActor);
		}
	}

	/* Return stylable parent */
	return(parent);
}
开发者ID:paulmadore,项目名称:luckyde,代码行数:28,代码来源:stylable.c


示例18: mex_tile_set_secondary_icon

void
mex_tile_set_secondary_icon (MexTile      *tile,
                             ClutterActor *icon)
{
  MexTilePrivate *priv;

  g_return_if_fail (MEX_IS_TILE (tile));
  g_return_if_fail (!icon || CLUTTER_IS_ACTOR (icon));

  priv = tile->priv;
  if (priv->icon2 != icon)
    {
      if (priv->icon2)
        clutter_actor_destroy (priv->icon2);

      if (icon)
        {
          clutter_actor_push_internal (CLUTTER_ACTOR (tile));
          clutter_actor_set_parent (icon, CLUTTER_ACTOR (tile));
          clutter_actor_pop_internal (CLUTTER_ACTOR (tile));
        }

      priv->icon2 = icon;

      g_object_notify (G_OBJECT (tile), "secondary-icon");
    }
}
开发者ID:frankopt,项目名称:media-explorer,代码行数:27,代码来源:mex-tile.c


示例19: _xfdashboard_dump_actor_internal

/* Dump actors */
static void _xfdashboard_dump_actor_internal(ClutterActor *inActor, gint inLevel)
{
	ClutterActorIter	iter;
	ClutterActor		*child;
	gint				i;

	g_return_if_fail(CLUTTER_IS_ACTOR(inActor));
	g_return_if_fail(inLevel>=0);

	clutter_actor_iter_init(&iter, CLUTTER_ACTOR(inActor));
	while(clutter_actor_iter_next(&iter, &child))
	{
		for(i=0; i<inLevel; i++) g_print("  ");
		g_print("+- %[email protected]%p - name: %s - geometry: %.2f,%.2f [%.2fx%.2f], mapped: %s, visible: %s, children: %d\n",
					G_OBJECT_TYPE_NAME(child), child,
					clutter_actor_get_name(child),
					clutter_actor_get_x(child),
					clutter_actor_get_y(child),
					clutter_actor_get_width(child),
					clutter_actor_get_height(child),
					clutter_actor_is_mapped(child) ? "yes" : "no",
					clutter_actor_is_visible(child) ? "yes" : "no",
					clutter_actor_get_n_children(child));
		if(clutter_actor_get_n_children(child)>0) _xfdashboard_dump_actor_internal(child, inLevel+1);
	}
}
开发者ID:AtheistSpacePirate,项目名称:xfdashboard,代码行数:27,代码来源:utils.c


示例20: _xfdashboard_notify_traverse_callback

/* Callback function for xfdashboard_traverse_actor() to find stage interface
 * used in xfdashboard_notify().
 */
static gboolean _xfdashboard_notify_traverse_callback(ClutterActor *inActor, gpointer inUserData)
{
	XfdashboardStage					**outStageInterface;
	XfdashboardWindowTrackerMonitor		*stageMonitor;

	g_return_val_if_fail(CLUTTER_IS_ACTOR(inActor), XFDASHBOARD_TRAVERSAL_CONTINUE);
	g_return_val_if_fail(inUserData, XFDASHBOARD_TRAVERSAL_CONTINUE);

	outStageInterface=(XfdashboardStage**)inUserData;

	/* If actor currently traverse is a stage interface then store
	 * the actor in user-data and stop further traversal.
	 */
	if(XFDASHBOARD_IS_STAGE_INTERFACE(inActor))
	{
		stageMonitor=xfdashboard_stage_interface_get_monitor(XFDASHBOARD_STAGE_INTERFACE(inActor));
		if(xfdashboard_window_tracker_monitor_is_primary(stageMonitor))
		{
			*outStageInterface=XFDASHBOARD_STAGE(clutter_actor_get_stage(inActor));
			return(XFDASHBOARD_TRAVERSAL_STOP);
		}
	}

	/* If we get here a stage interface was not found so continue traversal */
	return(XFDASHBOARD_TRAVERSAL_CONTINUE);
}
开发者ID:Pablohn26,项目名称:xfdashboard,代码行数:29,代码来源:utils.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ CLUTTER_NOTE函数代码示例发布时间:2022-05-30
下一篇:
C++ CLUTTER_CONTAINER函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap