本文整理汇总了C++中clutter_actor_queue_redraw函数的典型用法代码示例。如果您正苦于以下问题:C++ clutter_actor_queue_redraw函数的具体用法?C++ clutter_actor_queue_redraw怎么用?C++ clutter_actor_queue_redraw使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了clutter_actor_queue_redraw函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: st_background_effect_paint_target
static void
st_background_effect_paint_target (ClutterOffscreenEffect *effect)
{
StBackgroundEffect *self = ST_BACKGROUND_EFFECT (effect);
if ((self->bg_texture != NULL) && (self->opacity == 0xff))
{
cogl_push_source (self->pipeline2);
cogl_rectangle (0.0f, 0.0f, (self->fg_width_i), (self->fg_height_i));
cogl_pop_source ();
CoglOffscreen *vertical_FBO;
vertical_FBO = cogl_offscreen_new_to_texture (self->bg_sub_texture);
cogl_push_framebuffer ((CoglFramebuffer*)vertical_FBO);
cogl_push_source (self->pipeline0);
cogl_rectangle (-1.0f, 1.0f, 1.0f, -1.0f);
cogl_pop_source ();
cogl_pop_framebuffer ();
cogl_handle_unref (vertical_FBO);
cogl_pipeline_set_layer_texture (self->pipeline1, 0, self->bg_sub_texture);
cogl_push_source (self->pipeline1);
cogl_rectangle (4.0f, 4.0f, (self->bg_width_i) + 4.0f,
(self->bg_height_i) + 4.0f);
cogl_pop_source ();
}
cogl_pipeline_set_color4ub (self->pipeline3,
0x00,
0x00,
0x00,
0x80);
cogl_push_source (self->pipeline3);
cogl_rectangle (0.0f, 0.0f, (self->fg_width_i), (self->fg_height_i));
cogl_pop_source ();
clutter_actor_queue_redraw (self->actor);
cogl_pipeline_set_color4ub (self->pipeline4,
self->opacity,
self->opacity,
self->opacity,
self->opacity);
cogl_push_source (self->pipeline4);
cogl_rectangle (0.0f, 0.0f, (self->fg_width_i), (self->fg_height_i));
cogl_pop_source ();
clutter_actor_queue_redraw (self->actor);
}
开发者ID:2gud4u,项目名称:Cinnamon,代码行数:53,代码来源:st-background-effect.c
示例2: fps_queue_redraw
static gboolean
fps_queue_redraw ()
{
clutter_actor_queue_redraw (CLUTTER_ACTOR (mex_get_stage ()));
return TRUE;
}
开发者ID:Cyrene,项目名称:media-explorer,代码行数:7,代码来源:mex-debug-plugin.c
示例3: shell_recorder_close
/**
* shell_recorder_close:
* @recorder: the #ShellRecorder
*
* Stops recording. It's possible to call shell_recorder_record()
* again to reopen a new recording stream, but unless change the
* recording filename, this may result in the old recording being
* overwritten.
*/
void
shell_recorder_close (ShellRecorder *recorder)
{
g_return_if_fail (SHELL_IS_RECORDER (recorder));
g_return_if_fail (recorder->state != RECORDER_STATE_CLOSED);
/* We want to record one more frame since some time may have
* elapsed since the last frame
*/
recorder_record_frame (recorder, TRUE);
recorder_remove_update_pointer_timeout (recorder);
recorder_close_pipeline (recorder);
/* Queue a redraw to remove the recording indicator */
clutter_actor_queue_redraw (CLUTTER_ACTOR (recorder->stage));
if (recorder->repaint_hook_id != 0)
{
clutter_threads_remove_repaint_func (recorder->repaint_hook_id);
recorder->repaint_hook_id = 0;
}
recorder->state = RECORDER_STATE_CLOSED;
/* Reenable after the recording */
meta_enable_unredirect_for_screen (shell_global_get_screen (shell_global_get ()));
/* Release the refcount we took when we started recording */
g_object_unref (recorder);
}
开发者ID:kenvandine,项目名称:gnome-shell,代码行数:40,代码来源:shell-recorder.c
示例4: champlain_group_real_lower
static void
champlain_group_real_lower (ClutterContainer *container,
ClutterActor *actor,
ClutterActor *sibling)
{
ChamplainGroup *self = CHAMPLAIN_GROUP (container);
ChamplainGroupPrivate *priv = self->priv;
GList *link;
link = g_list_find (priv->children, actor);
if (link)
{
if (link == priv->children_end)
priv->children_end = g_list_previous (priv->children_end);
priv->children = g_list_delete_link (priv->children, link);
}
/* Push to bottom */
if (!sibling || !priv->children_end)
{
priv->children = g_list_prepend (priv->children, actor);
if (!priv->children_end)
priv->children_end = priv->children;
}
else
{
gint index_ = g_list_index (priv->children, sibling);
priv->children = g_list_insert (priv->children, actor, index_);
}
clutter_actor_queue_redraw (CLUTTER_ACTOR (container));
}
开发者ID:PabloCastellano,项目名称:libchamplain,代码行数:34,代码来源:champlain-group.c
示例5: queue_redraw
static gboolean queue_redraw (gpointer data)
{
ClutterActor *stage = CLUTTER_ACTOR (data);
clutter_actor_queue_redraw (stage);
do_events (stage);
return TRUE;
}
开发者ID:ChrisCummins,项目名称:clutter,代码行数:7,代码来源:test-picking.c
示例6: champlain_group_real_remove
static void
champlain_group_real_remove (ClutterContainer *container,
ClutterActor *actor)
{
ChamplainGroupPrivate *priv = CHAMPLAIN_GROUP (container)->priv;
GList *link;
g_object_ref (actor);
link = g_list_find (priv->children, actor);
if (link)
{
if (link == priv->children_end)
priv->children_end = g_list_previous (priv->children_end);
priv->children = g_list_delete_link (priv->children, link);
}
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);
clutter_actor_queue_redraw (CLUTTER_ACTOR (container));
g_object_unref (actor);
}
开发者ID:PabloCastellano,项目名称:libchamplain,代码行数:35,代码来源:champlain-group.c
示例7: clutter_group_real_remove
static void
clutter_group_real_remove (ClutterContainer *container,
ClutterActor *actor)
{
ClutterGroupPrivate *priv = CLUTTER_GROUP (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);
clutter_actor_queue_redraw (CLUTTER_ACTOR (container));
g_object_unref (actor);
}
开发者ID:spatulasnout,项目名称:clutter,代码行数:26,代码来源:clutter-group.c
示例8: clutter_rectangle_set_border_color
/**
* clutter_rectangle_set_border_color:
* @rectangle: a #ClutterRectangle
* @color: the color of the border
*
* Sets the color of the border used by @rectangle using @color
*
* Deprecated: 1.10: Use #ClutterActor and a #ClutterCanvas to draw
* the border with Cairo
*/
void
clutter_rectangle_set_border_color (ClutterRectangle *rectangle,
const ClutterColor *color)
{
ClutterRectanglePrivate *priv;
g_return_if_fail (CLUTTER_IS_RECTANGLE (rectangle));
g_return_if_fail (color != NULL);
priv = rectangle->priv;
if (priv->border_color.red != color->red ||
priv->border_color.green != color->green ||
priv->border_color.blue != color->blue ||
priv->border_color.alpha != color->alpha)
{
g_object_ref (rectangle);
priv->border_color.red = color->red;
priv->border_color.green = color->green;
priv->border_color.blue = color->blue;
priv->border_color.alpha = color->alpha;
if (clutter_color_equal (&priv->color, &priv->border_color))
priv->has_border = FALSE;
else
priv->has_border = TRUE;
clutter_actor_queue_redraw (CLUTTER_ACTOR (rectangle));
g_object_notify (G_OBJECT (rectangle), "border-color");
g_object_notify (G_OBJECT (rectangle), "has-border");
g_object_unref (rectangle);
}
}
开发者ID:Distrotech,项目名称:clutter,代码行数:45,代码来源:clutter-rectangle.c
示例9: mx_slider_set_value
/**
* mx_slider_set_value:
* @bar: A #MxSlider
* @value: A value between 0.0 and 1.0
*
* Set the value of the slider
*/
void
mx_slider_set_value (MxSlider *bar,
gdouble value)
{
MxSliderPrivate *priv = bar->priv;
g_return_if_fail (MX_IS_SLIDER (bar));
if (priv->value == value)
return;
if (G_UNLIKELY ((value < 0.0) || (value > 1.0)))
{
g_warning ("MxSlider:value must be a number between 0.0 and 1.0");
return;
}
priv->value = value;
if (!priv->capture_handler)
{
mx_slider_allocate_fill_handle (bar, NULL, 0);
clutter_actor_queue_redraw (CLUTTER_ACTOR (bar));
}
g_object_notify (G_OBJECT (bar), "value");
}
开发者ID:3v1n0,项目名称:mx,代码行数:34,代码来源:mx-slider.c
示例10: adjustment_value_notify_cb
/*
* StScrollable Interface Implementation
*/
static void
adjustment_value_notify_cb (StAdjustment *adjustment,
GParamSpec *pspec,
StBoxLayout *box)
{
clutter_actor_queue_redraw (CLUTTER_ACTOR (box));
}
开发者ID:MarxGonzalez,项目名称:Cinnamon,代码行数:10,代码来源:st-box-layout.c
示例11: drag_handle
static void
drag_handle (MxSlider *bar,
gfloat x,
gfloat y)
{
MxSliderPrivate *priv = bar->priv;
gdouble value;
gfloat ux, pos, handle_width_2, fill_size, offset;
if (!clutter_actor_transform_stage_point (CLUTTER_ACTOR (bar),
x, y,
&ux, NULL))
{
return;
}
fill_size = priv->handle_middle_end - priv->handle_middle_start;
/* offset is the difference between the middle of the handle and where one
* clicked on it */
handle_width_2 = clutter_actor_get_width (priv->handle) / 2;
offset = handle_width_2 - priv->x_origin;
pos = ux - priv->handle_middle_start + offset;
pos = CLAMP (pos, 0, fill_size);
value = pos / fill_size;
mx_slider_set_value (bar, value);
/* update the handle position */
mx_slider_allocate_fill_handle (bar, NULL, 0);
clutter_actor_queue_redraw (CLUTTER_ACTOR (bar));
}
开发者ID:3v1n0,项目名称:mx,代码行数:33,代码来源:mx-slider.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: clutter_clock_prepare
static gboolean
clutter_clock_prepare (GSource *source,
gint *timeout)
{
ClutterClockSource *clock_source = (ClutterClockSource *) source;
ClutterMasterClockDefault *master_clock = clock_source->master_clock;
int delay;
_clutter_threads_acquire_lock ();
if (G_UNLIKELY (clutter_paint_debug_flags &
CLUTTER_DEBUG_CONTINUOUS_REDRAW))
{
ClutterStageManager *stage_manager = clutter_stage_manager_get_default ();
const GSList *stages, *l;
stages = clutter_stage_manager_peek_stages (stage_manager);
/* Queue a full redraw on all of the stages */
for (l = stages; l != NULL; l = l->next)
clutter_actor_queue_redraw (l->data);
}
delay = master_clock_next_frame_delay (master_clock);
_clutter_threads_release_lock ();
*timeout = delay;
return delay == 0;
}
开发者ID:Distrotech,项目名称:clutter,代码行数:31,代码来源:clutter-master-clock-default.c
示例14: queue_redraw
static gboolean
queue_redraw (gpointer stage)
{
clutter_actor_queue_redraw (CLUTTER_ACTOR (stage));
return TRUE;
}
开发者ID:collects,项目名称:cogl,代码行数:7,代码来源:test-vertex-buffer-contiguous.c
示例15: calculate_and_scroll
static void
calculate_and_scroll (ClutterActor *self,
gint mouse_x,
gint mouse_y,
gfloat box_x,
gfloat box_y,
gfloat width,
gfloat height)
{
StScrollViewPrivate *priv = ST_SCROLL_VIEW (self)->priv;
gboolean up;
gint sub_region;
gdouble delta, vvalue;
up = get_sub_region_y (mouse_y, box_y, height, &sub_region);
if (up)
delta = sub_region * -1.0 / AUTO_SCROLL_SPEED_DIVISOR;
else
delta = sub_region / AUTO_SCROLL_SPEED_DIVISOR;
g_object_get (priv->vadjustment,
"value", &vvalue,
NULL);
st_adjustment_set_value (priv->vadjustment, vvalue + delta);
clutter_actor_queue_redraw (self);
}
开发者ID:NikoKrause,项目名称:Cinnamon,代码行数:28,代码来源:st-scroll-view.c
示例16: pp_super_aa_set_resolution
void
pp_super_aa_set_resolution (PPSuperAA *aa, gfloat x_res, gfloat y_res)
{
aa->priv->x_res = x_res;
aa->priv->y_res = y_res;
clutter_actor_queue_redraw (CLUTTER_ACTOR (aa));
}
开发者ID:GNOME,项目名称:pinpoint,代码行数:7,代码来源:pp-super-aa.c
示例17: idle_cb
static gboolean
idle_cb (gpointer data)
{
clutter_actor_queue_redraw (data);
return G_SOURCE_CONTINUE;
}
开发者ID:ChrisCummins,项目名称:clutter,代码行数:7,代码来源:test-cogl-shader-arbfp.c
示例18: 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
示例19: clone_source_queue_redraw_cb
static void
clone_source_queue_redraw_cb (ClutterActor *source,
ClutterActor *origin,
ClutterClone *self)
{
clutter_actor_queue_redraw (CLUTTER_ACTOR (self));
}
开发者ID:ChrisCummins,项目名称:clutter,代码行数:7,代码来源:clutter-clone.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_queue_redraw函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论