本文整理汇总了C++中CLUTTER_ACTOR_IS_VISIBLE函数的典型用法代码示例。如果您正苦于以下问题:C++ CLUTTER_ACTOR_IS_VISIBLE函数的具体用法?C++ CLUTTER_ACTOR_IS_VISIBLE怎么用?C++ CLUTTER_ACTOR_IS_VISIBLE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了CLUTTER_ACTOR_IS_VISIBLE函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: actor_realize_not_recursive
static void
actor_realize_not_recursive (void)
{
ClutterActor *actor, *group;
ClutterActor *stage;
stage = clutter_test_get_stage ();
clutter_actor_show (stage);
group = clutter_actor_new ();
actor = clutter_actor_new ();
clutter_actor_hide (group); /* don't show, so won't map */
clutter_actor_hide (actor); /* don't show, so won't map */
g_assert (!(CLUTTER_ACTOR_IS_REALIZED (group)));
g_assert (!(CLUTTER_ACTOR_IS_REALIZED (actor)));
clutter_actor_add_child (stage, group);
clutter_actor_add_child (group, actor);
clutter_actor_realize (group);
g_assert (CLUTTER_ACTOR_IS_REALIZED (group));
g_assert (!(CLUTTER_ACTOR_IS_MAPPED (group)));
g_assert (!(CLUTTER_ACTOR_IS_VISIBLE (group)));
/* realizing group did not realize the child */
g_assert (!CLUTTER_ACTOR_IS_REALIZED (actor));
g_assert (!(CLUTTER_ACTOR_IS_MAPPED (actor)));
g_assert (!(CLUTTER_ACTOR_IS_VISIBLE (actor)));
}
开发者ID:Distrotech,项目名称:clutter,代码行数:34,代码来源:actor-invariants.c
示例2: mx_scroll_view_allocate
static void
mx_scroll_view_allocate (ClutterActor *actor,
const ClutterActorBox *box,
ClutterAllocationFlags flags)
{
MxPadding padding;
ClutterActorBox child_box;
gfloat avail_width, avail_height, sb_width, sb_height;
MxScrollViewPrivate *priv = MX_SCROLL_VIEW (actor)->priv;
CLUTTER_ACTOR_CLASS (mx_scroll_view_parent_class)->
allocate (actor, box, flags);
mx_widget_get_padding (MX_WIDGET (actor), &padding);
avail_width = (box->x2 - box->x1) - padding.left - padding.right;
avail_height = (box->y2 - box->y1) - padding.top - padding.bottom;
sb_width = priv->scrollbar_width;
sb_height = priv->scrollbar_height;
if (!CLUTTER_ACTOR_IS_VISIBLE (priv->vscroll))
sb_width = 0;
if (!CLUTTER_ACTOR_IS_VISIBLE (priv->hscroll))
sb_height = 0;
/* Vertical scrollbar */
if (CLUTTER_ACTOR_IS_VISIBLE (priv->vscroll))
{
child_box.x1 = avail_width - sb_width;
child_box.y1 = padding.top;
child_box.x2 = avail_width;
child_box.y2 = child_box.y1 + avail_height - sb_height;
clutter_actor_allocate (priv->vscroll, &child_box, flags);
}
/* Horizontal scrollbar */
if (CLUTTER_ACTOR_IS_VISIBLE (priv->hscroll))
{
child_box.x1 = padding.left;
child_box.x2 = child_box.x1 + avail_width - sb_width;
child_box.y1 = avail_height - sb_height;
child_box.y2 = avail_height;
clutter_actor_allocate (priv->hscroll, &child_box, flags);
}
/* Child */
child_box.x1 = padding.left;
child_box.x2 = avail_width - sb_width;
child_box.y1 = padding.top;
child_box.y2 = avail_height - sb_height;
if (priv->child)
clutter_actor_allocate (priv->child, &child_box, flags);
}
开发者ID:ebassi,项目名称:mx,代码行数:60,代码来源:mx-scroll-view.c
示例3: mex_info_bar_dialog_visible
gboolean mex_info_bar_dialog_visible (MexInfoBar *self)
{
MexInfoBarPrivate *priv = self->priv;
return (CLUTTER_ACTOR_IS_VISIBLE (priv->power_dialog)
|| CLUTTER_ACTOR_IS_VISIBLE (priv->settings_dialog));
}
开发者ID:ocrete,项目名称:media-explorer,代码行数:7,代码来源:mex-info-bar.c
示例4: tidy_scroll_view_paint
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);
}
开发者ID:ak2consulting,项目名称:tweet,代码行数:12,代码来源:tidy-scroll-view.c
示例5: st_scroll_view_paint
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);
}
开发者ID:aldatsa,项目名称:Cinnamon,代码行数:14,代码来源:st-scroll-view.c
示例6: _close_dialog_cb
static gboolean
_close_dialog_cb (gpointer unused, MexInfoBar *self)
{
MexInfoBarPrivate *priv = self->priv;
if (CLUTTER_ACTOR_IS_VISIBLE (priv->power_dialog))
clutter_actor_hide (priv->power_dialog);
if (CLUTTER_ACTOR_IS_VISIBLE (priv->settings_dialog))
clutter_actor_hide (priv->settings_dialog);
mex_push_focus (MX_FOCUSABLE (self));
return FALSE;
}
开发者ID:ocrete,项目名称:media-explorer,代码行数:15,代码来源:mex-info-bar.c
示例7: mx_scroll_view_pick
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);
}
开发者ID:ebassi,项目名称:mx,代码行数:15,代码来源:mx-scroll-view.c
示例8: show_tile_preview
void
show_tile_preview (MetaPlugin *plugin,
MetaWindow *window,
MetaRectangle *tile_rect,
int tile_monitor_number)
{
MetaScreen *screen = meta_plugin_get_screen (plugin);
ScreenTilePreview *preview = get_screen_tile_preview (screen);
ClutterActor *window_actor;
if (CLUTTER_ACTOR_IS_VISIBLE (preview->actor)
&& preview->tile_rect.x == tile_rect->x
&& preview->tile_rect.y == tile_rect->y
&& preview->tile_rect.width == tile_rect->width
&& preview->tile_rect.height == tile_rect->height)
return; /* nothing to do */
clutter_actor_set_position (preview->actor, tile_rect->x, tile_rect->y);
clutter_actor_set_size (preview->actor, tile_rect->width, tile_rect->height);
clutter_actor_show (preview->actor);
window_actor = CLUTTER_ACTOR (meta_window_get_compositor_private (window));
clutter_actor_lower (preview->actor, window_actor);
preview->tile_rect = *tile_rect;
}
开发者ID:efernandesng,项目名称:budgie-desktop,代码行数:27,代码来源:legacy.c
示例9: mx_notebook_allocate
static void
mx_notebook_allocate (ClutterActor *actor,
const ClutterActorBox *box,
ClutterAllocationFlags flags)
{
MxNotebookPrivate *priv = MX_NOTEBOOK (actor)->priv;
GList *l;
MxPadding padding;
ClutterActorBox childbox;
CLUTTER_ACTOR_CLASS (mx_notebook_parent_class)->allocate (actor, box, flags);
mx_widget_get_padding (MX_WIDGET (actor), &padding);
childbox.x1 = 0 + padding.left;
childbox.x2 = box->x2 - box->x1 - padding.right;
childbox.y1 = 0 + padding.top;
childbox.y2 = box->y2 - box->y1 - padding.bottom;
for (l = priv->children; l; l = l->next)
{
ClutterActor *child;
child = CLUTTER_ACTOR (l->data);
if (CLUTTER_ACTOR_IS_VISIBLE (l->data))
clutter_actor_allocate (child, &childbox, flags);
}
}
开发者ID:3v1n0,项目名称:mx,代码行数:30,代码来源:mx-notebook.c
示例10: test_realized
void
test_realized (TestConformSimpleFixture *fixture,
gconstpointer data)
{
ClutterActor *actor;
ClutterActor *stage;
stage = clutter_stage_get_default ();
actor = clutter_rectangle_new ();
g_assert (!(CLUTTER_ACTOR_IS_REALIZED (actor)));
clutter_actor_hide (actor); /* don't show, so won't map */
clutter_container_add_actor (CLUTTER_CONTAINER (stage),
actor);
clutter_actor_realize (actor);
g_assert (CLUTTER_ACTOR_IS_REALIZED (actor));
g_assert (!(CLUTTER_ACTOR_IS_MAPPED (actor)));
g_assert (!(CLUTTER_ACTOR_IS_VISIBLE (actor)));
clutter_actor_destroy (actor);
}
开发者ID:Docworld,项目名称:chromiumos,代码行数:25,代码来源:test-actor-invariants.c
示例11: st_container_remove
static void
st_container_remove (ClutterContainer *container,
ClutterActor *actor)
{
StContainerPrivate *priv = ST_CONTAINER (container)->priv;
g_object_ref (actor);
priv->children = g_list_remove (priv->children, actor);
clutter_actor_unparent (actor);
/* queue a relayout, to get the correct positioning inside
* the ::actor-removed signal handlers
*/
clutter_actor_queue_relayout (CLUTTER_ACTOR (container));
/* at this point, the actor passed to the "actor-removed" signal
* handlers is not parented anymore to the container but since we
* are holding a reference on it, it's still valid
*/
g_signal_emit_by_name (container, "actor-removed", actor);
st_container_update_pseudo_classes (ST_CONTAINER (container));
if (CLUTTER_ACTOR_IS_VISIBLE (container))
clutter_actor_queue_redraw (CLUTTER_ACTOR (container));
g_object_unref (actor);
}
开发者ID:hosttor,项目名称:Cinnamon,代码行数:29,代码来源:st-container.c
示例12: mx_menu_event
static gboolean
mx_menu_event (ClutterActor *actor,
ClutterEvent *event)
{
/* We swallow mouse events so that they don't fall through to whatever's
* beneath us.
*/
switch (event->type)
{
case CLUTTER_MOTION:
case CLUTTER_BUTTON_PRESS:
case CLUTTER_BUTTON_RELEASE:
case CLUTTER_SCROLL:
return TRUE;
case CLUTTER_KEY_PRESS:
case CLUTTER_KEY_RELEASE:
/* hide the menu if the escape key was pressed */
if (((ClutterKeyEvent*) event)->keyval == CLUTTER_KEY_Escape
&& CLUTTER_ACTOR_IS_VISIBLE (actor))
{
mx_menu_close (actor);
}
default:
return FALSE;
}
}
开发者ID:jonnylamb,项目名称:mx,代码行数:28,代码来源:mx-menu.c
示例13: mx_stack_paint_children
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);
}
}
开发者ID:bhgv,项目名称:mx--clutter-based-GUI-framework--orange-pi-2-h3,代码行数:34,代码来源:mx-stack.c
示例14: _xfdashboard_viewpad_update_scrollbars
/* Allocation of a view changed */
static void _xfdashboard_viewpad_update_scrollbars(XfdashboardViewpad *self)
{
XfdashboardViewpadPrivate *priv;
gfloat w, h;
g_return_if_fail(XFDASHBOARD_IS_VIEWPAD(self));
priv=self->priv;
/* Set range of scroll bar to width and height of active view
* But we need to check for nan-values here - I do not get rid of it :(
*/
if(priv->activeView) clutter_actor_get_size(CLUTTER_ACTOR(priv->activeView), &w, &h);
else w=h=1.0f;
xfdashboard_scrollbar_set_range(XFDASHBOARD_SCROLLBAR(priv->hScrollbar), isnan(w)==0 ? w : 0.0f);
xfdashboard_scrollbar_set_range(XFDASHBOARD_SCROLLBAR(priv->vScrollbar), isnan(h)==0 ? h : 0.0f);
/* If any scroll bar policy is automatic then reallocate the
* same allocation again in an unkindly way to force a recalculation
* if scroll bars needed to shown (or hidden what is unlikely)
*/
if(CLUTTER_ACTOR_IS_VISIBLE(self) &&
(priv->hScrollbarPolicy==XFDASHBOARD_POLICY_AUTOMATIC ||
priv->vScrollbarPolicy==XFDASHBOARD_POLICY_AUTOMATIC))
{
ClutterActorBox box;
clutter_actor_get_allocation_box(CLUTTER_ACTOR(self), &box);
_xfdashboard_viewpad_allocate(CLUTTER_ACTOR(self), &box, CLUTTER_DELEGATE_LAYOUT);
}
}
开发者ID:tydaikho,项目名称:xfdashboard,代码行数:33,代码来源:viewpad.c
示例15: glide_slide_button_drawing_area_expose
static gboolean
glide_slide_button_drawing_area_expose (GtkWidget *drawing_area,
GdkEventExpose *event,
gpointer user_data)
{
GlideSlideButton *b = (GlideSlideButton *)user_data;
cairo_t *cr = gdk_cairo_create (gtk_widget_get_window (drawing_area));
gfloat width, height;
clutter_actor_get_size (CLUTTER_ACTOR (b->priv->slide), &width, &height);
cairo_save (cr);
cairo_scale (cr, 80.0/width, 60.0/height);
glide_actor_print (GLIDE_ACTOR (b->priv->slide), cr);
cairo_restore (cr);
if (CLUTTER_ACTOR_IS_VISIBLE (b->priv->slide))
{
glide_cairo_set_fg_color (cr, drawing_area, GTK_STATE_NORMAL);
cairo_set_line_width (cr, 3);
cairo_rectangle (cr, 0, 0, 80, 60);
cairo_stroke (cr);
}
cairo_destroy (cr);
return FALSE;
}
开发者ID:GNOME,项目名称:glide,代码行数:28,代码来源:glide-slide-button.c
示例16: mpl_application_view_get_property
static void
mpl_application_view_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
MplApplicationViewPrivate *priv = APPLICATION_VIEW_PRIVATE (object);
switch (property_id)
{
case PROP_ICON:
g_value_set_object (value, priv->icon);
break;
case PROP_TITLE:
g_value_set_string (value, mx_label_get_text (MX_LABEL (priv->title)));
break;
case PROP_SUBTITLE:
g_value_set_string (value, mx_label_get_text (MX_LABEL (priv->subtitle)));
break;
case PROP_CAN_CLOSE:
g_value_set_boolean (value, CLUTTER_ACTOR_IS_VISIBLE (priv->close_button));
break;
case PROP_THUMBNAIL:
g_value_set_object (value, priv->thumbnail);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
}
}
开发者ID:phmccarty,项目名称:dawati-shell,代码行数:34,代码来源:mpl-application-view.c
示例17: on_fullscreen
static gboolean
on_fullscreen (GtkWindow *window,
GdkEventWindowState *event,
CalibArea *area)
{
ClutterRect rect;
if ((event->changed_mask & GDK_WINDOW_STATE_FULLSCREEN) == 0)
return FALSE;
/* Protect against window state multiple changes*/
if (CLUTTER_ACTOR_IS_VISIBLE (area->action_layer))
return FALSE;
clutter_actor_show (area->action_layer);
clutter_actor_show (area->clock);
rect.origin.x = 0;
rect.origin.y = 0;
clutter_actor_get_size (area->helper_text_title,
&rect.size.width,
&rect.size.height);
g_object_set (area->text_title_holder, "clip-rect", &rect, NULL);
clutter_actor_get_size (area->helper_text_body,
&rect.size.width,
&rect.size.height);
g_object_set (area->text_body_holder, "clip-rect", &rect, NULL);
clutter_actor_set_y (area->helper_text_body,
- clutter_actor_get_height (area->helper_text_body));
show_helper_text_title (area);
return FALSE;
}
开发者ID:Amphiboly,项目名称:gnome-control-center,代码行数:34,代码来源:calibrator-gui.c
示例18: mex_music_player_captured_event
static gboolean
mex_music_player_captured_event (ClutterActor *actor,
ClutterEvent *event)
{
MexMusicPlayerPrivate *priv = MEX_MUSIC_PLAYER (actor)->priv;
ClutterKeyEvent *kevent;
if (event->type != CLUTTER_KEY_PRESS)
return FALSE;
kevent = (ClutterKeyEvent *) event;
if (MEX_KEY_INFO (kevent->keyval))
{
ClutterActor *tracks;
tracks = mex_script_get_actor (priv->script, "tracks-scrollview");
if (CLUTTER_ACTOR_IS_VISIBLE (tracks))
clutter_actor_hide (tracks);
else
clutter_actor_show (tracks);
return TRUE;
}
return FALSE;
}
开发者ID:frankopt,项目名称:media-explorer,代码行数:29,代码来源:mex-music-player.c
示例19: mx_menu_event
static gboolean
mx_menu_event (ClutterActor *actor,
ClutterEvent *event)
{
/* We swallow mouse events so that they don't fall through to whatever's
* beneath us.
*/
switch (event->type)
{
case CLUTTER_MOTION:
case CLUTTER_BUTTON_PRESS:
case CLUTTER_BUTTON_RELEASE:
case CLUTTER_SCROLL:
return TRUE;
case CLUTTER_KEY_PRESS:
case CLUTTER_KEY_RELEASE:
/* hide the menu if the escape key was pressed */
if (((ClutterKeyEvent*) event)->keyval == CLUTTER_KEY_Escape
&& CLUTTER_ACTOR_IS_VISIBLE (actor))
{
clutter_actor_set_reactive (actor, FALSE);
clutter_actor_animate (actor, CLUTTER_LINEAR, 250,
"opacity", (guchar) 0,
"signal-swapped::completed",
clutter_actor_hide,
actor,
NULL);
}
default:
return FALSE;
}
}
开发者ID:jku,项目名称:mx,代码行数:34,代码来源:mx-menu.c
示例20: clutter_rectangle_set_border_width
/**
* clutter_rectangle_set_border_width:
* @rectangle: a #ClutterRectangle
* @width: the width of the border
*
* Sets the width (in pixel) of the border used by @rectangle.
* A @width of 0 will unset the border.
*
* Since: 0.2
*/
void
clutter_rectangle_set_border_width (ClutterRectangle *rectangle,
guint width)
{
ClutterRectanglePrivate *priv;
g_return_if_fail (CLUTTER_IS_RECTANGLE (rectangle));
priv = rectangle->priv;
if (priv->border_width != width)
{
g_object_ref (rectangle);
priv->border_width = width;
if (priv->border_width != 0)
priv->has_border = TRUE;
else
priv->has_border = FALSE;
if (CLUTTER_ACTOR_IS_VISIBLE (CLUTTER_ACTOR (rectangle)))
clutter_actor_queue_redraw (CLUTTER_ACTOR (rectangle));
g_object_notify (G_OBJECT (rectangle), "border-width");
g_object_notify (G_OBJECT (rectangle), "has-border");
g_object_unref (rectangle);
}
}
开发者ID:archlinuxarm-n900,项目名称:clutter08,代码行数:38,代码来源:clutter-rectangle.c
注:本文中的CLUTTER_ACTOR_IS_VISIBLE函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论