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

C++ clutter_actor_get_stage函数代码示例

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

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



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

示例1: st_icon_update_icon_size

static gboolean
st_icon_update_icon_size (StIcon *icon)
{
  StIconPrivate *priv = icon->priv;
  int new_size;

  if (priv->prop_icon_size > 0)
    new_size = priv->prop_icon_size;
  else if (priv->theme_icon_size > 0)
    {
      gint scale;
      ClutterActor *stage;
      StThemeContext *context;

      /* The theme will give us an already-scaled size, so we
       * undo it here, as priv->icon_size is in unscaled pixels.
       */
      stage = clutter_actor_get_stage (CLUTTER_ACTOR (icon));
      context = st_theme_context_get_for_stage (CLUTTER_STAGE (stage));
      g_object_get (context, "scale-factor", &scale, NULL);
      new_size = (gint) (priv->theme_icon_size / scale);
    }
  else
    new_size = DEFAULT_ICON_SIZE;

  if (new_size != priv->icon_size)
    {
      clutter_actor_queue_relayout (CLUTTER_ACTOR (icon));
      priv->icon_size = new_size;
      return TRUE;
    }
  else
    return FALSE;
}
开发者ID:2gud4u,项目名称:Cinnamon,代码行数:34,代码来源:st-icon.c


示例2: on_texture_size_change

void on_texture_size_change (ClutterTexture *texture,
    gint width,
    gint height,
    gpointer user_data)
{
  ClutterActor *stage;
  gfloat new_x, new_y, new_width, new_height;
  gfloat stage_width, stage_height;
  stage = clutter_actor_get_stage (CLUTTER_ACTOR (texture));
  if (stage == NULL)
    return;
  clutter_actor_get_size (stage, &stage_width, &stage_height);
  new_height = (height * stage_width) / width;
  if (new_height <= stage_height)
    {
      new_width = stage_width;
      new_x = 0;
      new_y = (stage_height - new_height) / 2;
    }
  else
    {
      new_width  = (width * stage_height) / height;
      new_height = stage_height;
      new_x = (stage_width - new_width) / 2;
      new_y = 0;
    }
  clutter_actor_set_position (CLUTTER_ACTOR (texture), new_x, new_y);
  clutter_actor_set_size (CLUTTER_ACTOR (texture), new_width, new_height);
}
开发者ID:aalex,项目名称:jasm,代码行数:29,代码来源:main.c


示例3: handle_button_press_event_cb

static gboolean
handle_button_press_event_cb (ClutterActor       *actor,
                              ClutterButtonEvent *event,
                              StScrollBar        *bar)
{
  StScrollBarPrivate *priv = bar->priv;

  if (event->button != 1)
    return FALSE;

  if (!clutter_actor_transform_stage_point (priv->handle,
                                            event->x,
                                            event->y,
                                            &priv->x_origin,
                                            &priv->y_origin))
    return FALSE;

  /* Account for the scrollbar-trough-handle nesting. */
  priv->x_origin += clutter_actor_get_x (priv->trough);
  priv->y_origin += clutter_actor_get_y (priv->trough);

  /* Turn off picking for motion events */
  clutter_set_motion_events_enabled (FALSE);

  priv->capture_handler = g_signal_connect_after (
    clutter_actor_get_stage (priv->trough),
    "captured-event",
    G_CALLBACK (handle_capture_event_cb),
    bar);
  g_signal_emit (bar, signals[SCROLL_START], 0);

  return TRUE;
}
开发者ID:Jem777,项目名称:Cinnamon,代码行数:33,代码来源:st-scroll-bar.c


示例4: on_trough_bg_button_press_event

static gboolean
on_trough_bg_button_press_event (ClutterActor       *actor,
                                 ClutterButtonEvent *event,
                                 MxSlider           *self)
{
  MxSliderPrivate *priv = self->priv;
  ClutterActor *stage;

  if (event->button != 1)
    return FALSE;

  if (mx_widget_get_disabled (MX_WIDGET (actor)))
    return FALSE;


  move_handle (self, event->x, event->y);

  stage = clutter_actor_get_stage (priv->handle);

  /* Turn off picking for motion events */
  clutter_stage_set_motion_events_enabled (CLUTTER_STAGE (stage), FALSE);

  priv->capture_handler =
    g_signal_connect_after (stage,
                            "captured-event",
                            G_CALLBACK (on_handle_capture_event),
                            self);

  return TRUE;
}
开发者ID:3v1n0,项目名称:mx,代码行数:30,代码来源:mx-slider.c


示例5: mnp_clock_tile_drag_begin

static void
mnp_clock_tile_drag_begin (MxDraggable *draggable, gfloat event_x, gfloat event_y, gint event_button, ClutterModifierType  modifiers)
{
	ClutterActor *self = CLUTTER_ACTOR (draggable);
	ClutterActor *stage = clutter_actor_get_stage (self);
	gfloat orig_x, orig_y;
	MnpClockTile *tile = (MnpClockTile *)draggable;
	gfloat width, height;
	MnpClockTilePriv *priv = tile->priv;
	clutter_actor_get_size (self, &width, &height);
	
	g_object_ref (self);

	if (priv->clone)
		clutter_actor_destroy (priv->clone);
	
	priv->clone = clutter_clone_new (self);

	tile->priv->depth = clutter_actor_get_depth (self);
	clutter_actor_get_transformed_position (self, &orig_x, &orig_y);
	//clutter_actor_reparent (self, stage);
	//clutter_actor_set_size (self, width, -1);
	//clutter_actor_raise_top (self);
	//clutter_actor_set_position (self, orig_x, orig_y);
	
	clutter_container_add_actor (CLUTTER_CONTAINER (stage), priv->clone);
	clutter_actor_set_position (priv->clone, orig_x, orig_y);
	clutter_actor_set_size (priv->clone, width, height);
	
	g_object_unref (self);

	clutter_actor_animate (self, CLUTTER_EASE_OUT_CUBIC, 250,
				"opacity", 0,
				NULL);
}
开发者ID:dudochkin-victor,项目名称:gogoo-panel-datetime,代码行数:35,代码来源:mnp-clock-tile.c


示例6: _xfdashboard_text_box_focusable_unset_focus

/* Unset focus from actor */
static void _xfdashboard_text_box_focusable_unset_focus(XfdashboardFocusable *inFocusable)
{
	ClutterActor					*self;
	XfdashboardFocusableInterface	*selfIface;
	XfdashboardFocusableInterface	*parentIface;
	ClutterStage					*stage;

	g_return_if_fail(XFDASHBOARD_IS_FOCUSABLE(inFocusable));
	g_return_if_fail(XFDASHBOARD_IS_ACTOR(inFocusable));

	self=CLUTTER_ACTOR(inFocusable);

	/* Call parent class interface function */
	selfIface=XFDASHBOARD_FOCUSABLE_GET_IFACE(inFocusable);
	parentIface=g_type_interface_peek_parent(selfIface);

	if(parentIface && parentIface->unset_focus)
	{
		parentIface->unset_focus(inFocusable);
	}

	/* Get stage of actor to tell it where the keyboard focus to set to */
	stage=CLUTTER_STAGE(clutter_actor_get_stage(self));
	if(!stage)
	{
		g_warning(_("Focusable actor %s is not on a stage"),
					G_OBJECT_TYPE_NAME(self));
		return;
	}

	clutter_stage_set_key_focus(stage, NULL);
}
开发者ID:tydaikho,项目名称:xfdashboard,代码行数:33,代码来源:text-box.c


示例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: actor_captured_event_cb

static gboolean
actor_captured_event_cb (ClutterActor *actor,
                         ClutterEvent *event,
                         ClutterGestureAction *action)
{
  ClutterGestureActionPrivate *priv = action->priv;
  GesturePoint *point G_GNUC_UNUSED;

  if ((clutter_event_type (event) != CLUTTER_BUTTON_PRESS) &&
      (clutter_event_type (event) != CLUTTER_TOUCH_BEGIN))
    return CLUTTER_EVENT_PROPAGATE;

  if (!clutter_actor_meta_get_enabled (CLUTTER_ACTOR_META (action)))
    return CLUTTER_EVENT_PROPAGATE;

  point = gesture_register_point (action, event);

  if (priv->stage == NULL)
    priv->stage = clutter_actor_get_stage (actor);

  if (priv->stage_capture_id == 0)
    priv->stage_capture_id =
      g_signal_connect_after (priv->stage, "captured-event",
                              G_CALLBACK (stage_captured_event_cb),
                              action);

  /* Start the gesture immediately if the gesture has no
   * _TRIGGER_EDGE_AFTER drag threshold. */
  if ((priv->points->len >= priv->requested_nb_points) &&
      (priv->edge != CLUTTER_GESTURE_TRIGGER_EDGE_AFTER))
    begin_gesture (action, actor);

  return CLUTTER_EVENT_PROPAGATE;
}
开发者ID:collinss,项目名称:muffin,代码行数:34,代码来源:clutter-gesture-action.c


示例9: on_drag_begin

static void
on_drag_begin (ClutterDragAction   *action,
               ClutterActor        *actor,
               gfloat               event_x,
               gfloat               event_y,
               ClutterModifierType  modifiers)
{
  gboolean is_copy = (modifiers & CLUTTER_SHIFT_MASK) ? TRUE : FALSE;
  ClutterActor *drag_handle = NULL;

  if (is_copy)
    {
      ClutterActor *stage = clutter_actor_get_stage (actor);

      drag_handle = clutter_rectangle_new ();
      clutter_actor_set_size (drag_handle, 48, 48);

      clutter_rectangle_set_color (CLUTTER_RECTANGLE (drag_handle),
                                   CLUTTER_COLOR_DarkSkyBlue);

      clutter_container_add_actor (CLUTTER_CONTAINER (stage), drag_handle);
      clutter_actor_set_position (drag_handle, event_x, event_y);
    }
  else
    drag_handle = actor;

  clutter_drag_action_set_drag_handle (action, drag_handle);

  /* fully desaturate the actor */
  clutter_actor_animate (actor, CLUTTER_LINEAR, 150,
                         "@effects.disable.factor", 1.0,
                         NULL);
}
开发者ID:nobled,项目名称:clutter,代码行数:33,代码来源:test-drag.c


示例10: _fcitx_im_context_forward_key_cb

void _fcitx_im_context_forward_key_cb(DBusGProxy* proxy, guint keyval, guint state, gint type, void* user_data)
{
    FcitxLog(LOG_LEVEL, "_fcitx_im_context_forward_key_cb");
    ClutterIMContext* context =  CLUTTER_IM_CONTEXT(user_data);
    const char* signal_name;
    gboolean consumed = FALSE;
    FcitxKeyEventType tp = (FcitxKeyEventType) type;
    ClutterKeyEvent clutter_key_event;
    clutter_key_event.flags = 0;
    clutter_key_event.source = NULL;
    clutter_key_event.keyval = keyval;
    clutter_key_event.hardware_keycode = 0;
    clutter_key_event.unicode_value = 0;
    clutter_key_event.modifier_state = state;
    clutter_key_event.device = NULL;
    
    struct timeval current_time;
    gettimeofday(&current_time, NULL);
    clutter_key_event.time = current_time.tv_sec * 1000 + current_time.tv_usec / 1000;
    
    if (tp == FCITX_PRESS_KEY) {
        clutter_key_event.type = CLUTTER_KEY_PRESS;
        signal_name = "key-press-event";
    }
    else {
        clutter_key_event.type = CLUTTER_KEY_RELEASE;
        clutter_key_event.modifier_state |= CLUTTER_RELEASE_MASK;
        signal_name = "key-release-event";
    }
    clutter_key_event.modifier_state |= FcitxKeyState_IgnoredMask;
    clutter_key_event.stage = CLUTTER_STAGE (clutter_actor_get_stage(context->actor));
    
    g_signal_emit_by_name(context->actor, signal_name, &clutter_key_event, &consumed);
    
}
开发者ID:fcitx,项目名称:fcitx-clutter,代码行数:35,代码来源:fcitximcontext.c


示例11: _xfdashboard_stage_interface_get_preferred_width

static void _xfdashboard_stage_interface_get_preferred_width(ClutterActor *inActor,
																gfloat inForHeight,
																gfloat *outMinWidth,
																gfloat *outNaturalWidth)
{
	XfdashboardStageInterface			*self=XFDASHBOARD_STAGE_INTERFACE(inActor);
	XfdashboardStageInterfacePrivate	*priv=self->priv;
	gfloat								minWidth, naturalWidth;
	gint								w;
	ClutterActor						 *stage;

	/* Set up default values */
	minWidth=naturalWidth=0.0f;

	/* Get monitor size if available otherwise get stage size */
	if(priv->monitor)
	{
		xfdashboard_window_tracker_monitor_get_geometry(priv->monitor, NULL, NULL, &w, NULL);
		minWidth=naturalWidth=w;
	}
		else
		{
			stage=clutter_actor_get_stage(inActor);
			minWidth=naturalWidth=clutter_actor_get_width(stage);
		}

	/* Store sizes computed */
	if(outMinWidth) *outMinWidth=minWidth;
	if(outNaturalWidth) *outNaturalWidth=naturalWidth;
}
开发者ID:gmc-holle,项目名称:xfdashboard,代码行数:30,代码来源:stage-interface.c


示例12: mx_fade_effect_post_paint

static void
mx_fade_effect_post_paint (ClutterEffect *effect)
{
  MxFadeEffectPrivate *priv = MX_FADE_EFFECT (effect)->priv;

  if (!priv->freeze_update)
    CLUTTER_EFFECT_CLASS (mx_fade_effect_parent_class)->post_paint (effect);
  else
    {
      CoglMatrix modelview;
      ClutterActor *actor, *stage;

      actor = clutter_actor_meta_get_actor (CLUTTER_ACTOR_META (effect));
      stage = clutter_actor_get_stage (actor);

      /* Set up the draw matrix so we draw the offscreen texture at the
       * absolute coordinates of the actor-box. We need to do this to
       * avoid transforming by the actor matrix twice, as when it's drawn
       * into the offscreen surface, it'll already be transformed.
       */
      cogl_push_matrix ();

      cogl_matrix_init_identity (&modelview);
      CLUTTER_ACTOR_CLASS (G_OBJECT_GET_CLASS (stage))->
        apply_transform (stage, &modelview);
      cogl_matrix_translate (&modelview, priv->x_offset, priv->y_offset, 0.f);
      cogl_set_modelview_matrix (&modelview);

      clutter_offscreen_effect_paint_target (CLUTTER_OFFSCREEN_EFFECT (effect));

      cogl_pop_matrix ();
    }
}
开发者ID:3v1n0,项目名称:mx,代码行数:33,代码来源:mx-fade-effect.c


示例13: mx_droppable_real_enable

static void
mx_droppable_real_enable (MxDroppable *droppable)
{
  ClutterActor *stage;
  DropContext *context;

  stage = clutter_actor_get_stage (CLUTTER_ACTOR (droppable));
  if (G_UNLIKELY (stage == NULL))
    {
      g_warning ("A MxDroppable must be on the stage before "
                 "being enabled.");
      return;
    }

  context = g_object_get_qdata (G_OBJECT (stage), quark_drop_context);
  if (context == NULL)
    {
      context = drop_context_create (stage, droppable);

      g_signal_connect_after (stage, "captured-event",
                              G_CALLBACK (on_stage_capture),
                              context);
    }
  else
    drop_context_update (context, droppable);
}
开发者ID:3v1n0,项目名称:mx,代码行数:26,代码来源:mx-droppable.c


示例14: size_change

/* Setup the video texture once its size is known */
void size_change (ClutterActor *texture, gint width, gint height, gpointer user_data) {
    ClutterActor *stage;
    gfloat new_x, new_y, new_width, new_height;
    gfloat stage_width, stage_height;
    ClutterAnimation *animation = NULL;

    stage = clutter_actor_get_stage (texture);
    if (stage == NULL)
        return;

    clutter_actor_get_size (stage, &stage_width, &stage_height);

    /* Center video on window and calculate new size preserving aspect ratio */
    new_height = (height * stage_width) / width;
    if (new_height <= stage_height) {
        new_width = stage_width;

        new_x = 0;
        new_y = (stage_height - new_height) / 2;
    } else {
        new_width  = (width * stage_height) / height;
        new_height = stage_height;

        new_x = (stage_width - new_width) / 2;
        new_y = 0;
    }
    clutter_actor_set_position (texture, new_x, new_y);
    clutter_actor_set_size (texture, new_width, new_height);
    clutter_actor_set_rotation (texture, CLUTTER_Y_AXIS, 0.0, stage_width / 2, 0, 0);
    /* Animate it */
    animation = clutter_actor_animate (texture, CLUTTER_LINEAR, 10000, "rotation-angle-y", 360.0, NULL);
    clutter_animation_set_loop (animation, TRUE);
}
开发者ID:huamulan,项目名称:gst-sdk-tutorial,代码行数:34,代码来源:basic-tutorial-15.c


示例15: mx_menu_show

static void
mx_menu_show (ClutterActor *actor)
{
  ClutterAnimation *animation = NULL;
  ClutterStage *stage;

  /* set reactive and opacity, since these may have been set by the fade-out
   * animation (e.g. from captured_event_handler or button_release_cb) */
  if ((animation = clutter_actor_get_animation (actor)))
    {
      clutter_animation_completed (animation);
    }
  clutter_actor_set_reactive (actor, TRUE);
  clutter_actor_set_opacity (actor, 0xff);

  /* chain up to run show after re-setting properties above */
  CLUTTER_ACTOR_CLASS (mx_menu_parent_class)->show (actor);

  clutter_actor_grab_key_focus (actor);

  stage = (ClutterStage*) clutter_actor_get_stage (actor);

  mx_focus_manager_push_focus (mx_focus_manager_get_for_stage (stage),
                               MX_FOCUSABLE (actor));

}
开发者ID:jku,项目名称:mx,代码行数:26,代码来源:mx-menu.c


示例16: mx_menu_map

static void
mx_menu_map (ClutterActor *actor)
{
    gint i;
    MxMenuPrivate *priv = MX_MENU (actor)->priv;

    CLUTTER_ACTOR_CLASS (mx_menu_parent_class)->map (actor);

    clutter_actor_map (priv->up_button);
    clutter_actor_map (priv->down_button);
    for (i = 0; i < priv->children->len; i++)
    {
        MxMenuChild *child = &g_array_index (priv->children, MxMenuChild,
                                             i);
        clutter_actor_map (CLUTTER_ACTOR (child->box));
    }

    /* set up a capture so we can close the menu if the user clicks outside it */
    priv->stage = clutter_actor_get_stage (actor);
    g_object_weak_ref (G_OBJECT (priv->stage), (GWeakNotify) stage_weak_notify,
                       actor);

    priv->captured_event_handler =
        g_signal_connect (priv->stage,
                          "captured-event",
                          G_CALLBACK (mx_menu_captured_event_handler),
                          actor);
}
开发者ID:jonnylamb,项目名称:mx,代码行数:28,代码来源:mx-menu.c


示例17: mpl_panel_background_get_preferred_height

static void
mpl_panel_background_get_preferred_height (ClutterActor *self,
                                           gfloat        for_width,
                                           gfloat       *min_height_p,
                                           gfloat       *natural_height_p)
{
  MplPanelBackgroundPrivate *priv = MPL_PANEL_BACKGROUND (self)->priv;
  ClutterActor              *stage = clutter_actor_get_stage (self);
  gfloat                     height = 0.0;

  /*
   * This is as good place to hook the ClutterStage::allocation callback as any.
   */
  if (!priv->stage_alloc_cb)
    {
      priv->stage = stage;

      priv->stage_alloc_cb =
        g_signal_connect (stage, "notify::allocation",
                          G_CALLBACK (mpl_panel_background_stage_allocation_cb),
                          self);
    }

  height = clutter_actor_get_height (stage);

  if (min_height_p)
    *min_height_p = height;

  if (natural_height_p)
    *natural_height_p = height;
}
开发者ID:dudochkin-victor,项目名称:mutter-netbook,代码行数:31,代码来源:mpl-panel-background.c


示例18: handle_capture_event_cb

static gboolean
handle_capture_event_cb (ClutterActor *trough,
                         ClutterEvent *event,
                         StScrollBar  *bar)
{
  if (clutter_event_type (event) == CLUTTER_MOTION)
    {
      move_slider (bar,
                   ((ClutterMotionEvent*) event)->x,
                   ((ClutterMotionEvent*) event)->y);
    }
  else if (clutter_event_type (event) == CLUTTER_BUTTON_RELEASE
           && ((ClutterButtonEvent*) event)->button == 1)
    {
      ClutterActor *stage, *target;

      stop_scrolling (bar);

      /* check if the mouse pointer has left the handle during the drag and
       * remove the hover state if it has */
      stage = clutter_actor_get_stage (bar->priv->trough);
      target = clutter_stage_get_actor_at_pos ((ClutterStage*) stage,
                                               CLUTTER_PICK_REACTIVE,
                                               ((ClutterButtonEvent*) event)->x,
                                               ((ClutterButtonEvent*) event)->y);
      if (target != bar->priv->handle)
        {
          st_widget_remove_style_pseudo_class ((StWidget*) bar->priv->handle, "hover");
        }
    }

  return TRUE;
}
开发者ID:Jem777,项目名称:Cinnamon,代码行数:33,代码来源:st-scroll-bar.c


示例19: _enter_event_cb

static gboolean
_enter_event_cb (ClutterActor         *actor,
                 ClutterCrossingEvent *event,
                 gpointer              data)
{
  MxFocusable *focusable;
  MxFocusManager *f_manager;

  f_manager =
    mx_focus_manager_get_for_stage (CLUTTER_STAGE (clutter_actor_get_stage (actor)));

  focusable = mx_focus_manager_get_focused (f_manager);

  /* hide the hover state on a button that has accepted focus via the default
   * focus as we're navigating by mouse and not keys we don't want to move
   * the focus as we may still want it in the place e.g. search bar
   */
  if ((focusable) &&
      (MNB_IS_LAUNCHER_BUTTON (focusable)) &&
      (CLUTTER_ACTOR (focusable) != actor))
    mx_stylable_set_style_pseudo_class (MX_STYLABLE (focusable), NULL);

  mx_stylable_set_style_pseudo_class (MX_STYLABLE (actor), "hover");

  return FALSE;
}
开发者ID:Cordia,项目名称:dawati-shell,代码行数:26,代码来源:mnb-launcher-button.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_actor_get_stage函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ clutter_actor_get_width函数代码示例发布时间:2022-05-30
下一篇:
C++ clutter_actor_get_preferred_width函数代码示例发布时间: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