Class: Clutter::Stage

Inherits:
Group
  • Object
show all
Defined in:
(unknown)

Overview

The Clutter::StageClass structure contains only private data

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Group

#get_nth_child, #n_children, #remove_all

Methods inherited from Actor

#accessible, #actions, #actions=, #add_action, #add_action_with_name, #add_child, #add_constraint, #add_constraint_with_name, #add_effect, #add_effect_with_name, #add_transition, #allocate, #allocate_align_fill, #allocate_available_size, #allocate_preferred_size, #allocation, #allocation=, #anchor_gravity, #anchor_gravity=, #anchor_point_from_gravity=, #anchor_point_gravity, #anchor_x, #anchor_x=, #anchor_y, #anchor_y=, #animate, #animate_with_alpha, #animate_with_alphav, #animate_with_timeline, #animate_with_timelinev, #animatev, #animation, #apply_relative_transform_to_point, #apply_transform_to_point, #background_color, #background_color=, #background_color_set=, #background_color_set?, #bind_model, #bind_model_with_properties, #child_transform, #child_transform=, #child_transform_set=, #child_transform_set?, #children, #clear_actions, #clear_constraints, #clear_effects, #clip, #clip=, #clip_rect, #clip_rect=, #clip_to_allocation, #clip_to_allocation=, #clip_to_allocation?, #constraints, #constraints=, #contains, #content, #content=, #content_box, #content_box=, #content_gravity, #content_gravity=, #content_repeat, #content_repeat=, #continue_paint, #create_pango_context, #create_pango_layout, #default_paint_volume, #depth, #depth=, #destroy, #destroy_all_children, #detach_animation, #easing_delay, #easing_delay=, #easing_duration, #easing_duration=, #easing_mode, #easing_mode=, #effect=, #effects, #first_child, #first_child=, #fixed_position_set, #fixed_position_set=, #fixed_position_set?, #fixed_x, #fixed_x=, #fixed_y, #fixed_y=, #flags, #flags=, #geometry=, #get_abs_allocation_vertices, #get_action, #get_allocation_box, #get_allocation_geometry, #get_allocation_vertices, #get_anchor_point, #get_background_color, #get_child_at_index, #get_child_transform, #get_clip, #get_constraint, #get_content_box, #get_content_scaling_filters, #get_effect, #get_geometry, #get_margin, #get_paint_box, #get_pivot_point, #get_position, #get_preferred_height, #get_preferred_size, #get_preferred_width, #get_rotation, #get_rotation_angle, #get_scale, #get_scale_center, #get_size, #get_transform, #get_transformation_matrix, #get_transformed_paint_volume, #get_transformed_position, #get_transformed_size, #get_transition, #get_translation, #gid, #grab_key_focus, #has_actions, #has_allocation, #has_clip, #has_clip=, #has_clip?, #has_constraints, #has_effects, #has_key_focus, #has_overlaps, #has_pointer, #has_pointer=, #has_pointer?, #height, #height=, #hide, #hide_all, #insert_child_above, #insert_child_at_index, #insert_child_below, #is_in_clone_paint, #is_mapped, #is_realized, #is_rotated, #is_scaled, #is_visible, #last_child, #last_child=, #layout_manager, #layout_manager=, #lower, #lower_bottom, #magnification_filter, #magnification_filter=, #map, #mapped=, #mapped?, #margin=, #margin_bottom, #margin_bottom=, #margin_left, #margin_left=, #margin_right, #margin_right=, #margin_top, #margin_top=, #min_height, #min_height=, #min_height_set=, #min_height_set?, #min_width, #min_width=, #min_width_set=, #min_width_set?, #minification_filter, #minification_filter=, #move_anchor_point, #move_anchor_point_from_gravity, #move_by, #n_children, #name, #name=, #natural_height, #natural_height=, #natural_height_set=, #natural_height_set?, #natural_width, #natural_width=, #natural_width_set=, #natural_width_set?, #needs_expand, #next_sibling, #offscreen_redirect, #offscreen_redirect=, #opacity, #opacity=, #paint, #paint_opacity, #paint_visibility, #paint_volume, #pango_context, #parent, #parent=, #pivot_point, #pivot_point=, #pivot_point_z, #pivot_point_z=, #pop_internal, #position, #position=, #previous_sibling, #push_internal, #queue_redraw_with_clip, #queue_relayout, #raise, #raise_top, #reactive, #reactive=, #reactive?, #realize, #realized=, #realized?, #remove_action, #remove_action_by_name, #remove_all_children, #remove_all_transitions, #remove_child, #remove_clip, #remove_constraint, #remove_constraint_by_name, #remove_effect, #remove_effect_by_name, #remove_transition, #reparent, #replace_child, #request_mode, #request_mode=, #restore_easing_state, #rotation_angle_x, #rotation_angle_x=, #rotation_angle_y, #rotation_angle_y=, #rotation_angle_z, #rotation_angle_z=, #rotation_center_x, #rotation_center_x=, #rotation_center_y, #rotation_center_y=, #rotation_center_z, #rotation_center_z=, #rotation_center_z_gravity, #rotation_center_z_gravity=, #save_easing_state, #save_easing_state_without_block, #scale_center_x, #scale_center_x=, #scale_center_y, #scale_center_y=, #scale_gravity, #scale_gravity=, #scale_x, #scale_x=, #scale_y, #scale_y=, #scale_z, #scale_z=, #set_allocation, #set_anchor_point, #set_child_above_sibling, #set_child_at_index, #set_child_below_sibling, #set_clip, #set_content_scaling_filters, #set_pivot_point, #set_position, #set_rotation, #set_rotation_angle, #set_scale, #set_scale_full, #set_scale_with_gravity, #set_shader_param, #set_shader_param_float, #set_shader_param_int, #set_size, #set_translation, #set_z_rotation_from_gravity, #shader, #shader=, #should_pick_paint, #show, #show_all, #show_on_set_parent=, #show_on_set_parent?, #size, #size=, #stage, #text_direction, #text_direction=, #transform, #transform=, #transform_set=, #transform_set?, #transform_stage_point, #translation_x, #translation_x=, #translation_y, #translation_y=, #translation_z, #translation_z=, #unmap, #unparent, #unrealize, #unset_flags, #visible=, #visible?, #width, #width=, #x, #x=, #x_align, #x_align=, #x_expand, #x_expand=, #x_expand?, #y, #y=, #y_align, #y_align=, #y_expand, #y_expand=, #y_expand?, #z_position, #z_position=, #z_rotation_gravity

Constructor Details

#initializeClutter::Actor

Creates a new, non-default stage. A non-default stage is a new
top-level actor which can be used as another container. It works
exactly like the default stage, but while clutter_stage_get_default()
will always return the same instance, you will have to keep a pointer
to any Clutter::Stage returned by clutter_stage_new().

The ability to support multiple stages depends on the current
backend. Use clutter_feature_available() and
%CLUTTER_FEATURE_STAGE_MULTIPLE to check at runtime whether a
backend supports multiple stages.

Class Method Details

.defaultClutter::Stage

Retrieves a Clutter::Stage singleton.

This function is not as useful as it sounds, and will most likely
by deprecated in the future. Application code should only create
a Clutter::Stage instance using clutter_stage_new(), and manage the
lifetime of the stage manually.

The default stage singleton has a platform-specific behaviour: on
platforms without the %CLUTTER_FEATURE_STAGE_MULTIPLE feature flag
set, the first Clutter::Stage instance will also be set to be the
default stage instance, and this function will always return a
pointer to it.

On platforms with the %CLUTTER_FEATURE_STAGE_MULTIPLE feature flag
set, the default stage will be created by the first call to this
function, and every following call will return the same pointer to
it.

Returns:

  • (Clutter::Stage)

    the main
    Clutter::Stage. You should never destroy or unref the returned
    actor.

Instance Method Details

#accept_focusBoolean

Retrieves the value set with clutter_stage_set_accept_focus().

Returns:

  • (Boolean)

    true if the Clutter::Stage should accept focus, and false
    otherwise

#accept_focus=(accept_focus) ⇒ Boolean

Whether the Clutter::Stage should accept key focus when shown.

Parameters:

  • accept_focus (Boolean)

Returns:

  • (Boolean)

    accept-focus

  • (Boolean)

    accept-focus

#accept_focus?Boolean

Whether the Clutter::Stage should accept key focus when shown.

Returns:

  • (Boolean)

    accept-focus

#colorClutter::Color

The background color of the main stage.

Returns:

#color=(color) ⇒ Clutter::Color

The background color of the main stage.

Parameters:

Returns:

#cursor_visible=(cursor_visible) ⇒ Boolean

Whether the mouse pointer should be visible

Parameters:

  • cursor_visible (Boolean)

Returns:

  • (Boolean)

    cursor-visible

  • (Boolean)

    cursor-visible

#cursor_visible?Boolean

Whether the mouse pointer should be visible

Returns:

  • (Boolean)

    cursor-visible

#ensure_currentnil

This function essentially makes sure the right GL context is
current for the passed stage. It is not intended to
be used by applications.

Returns:

  • (nil)

#ensure_redrawnil

Ensures that stage is redrawn

This function should not be called by applications: it is
used when embedding a Clutter::Stage into a toolkit with
another windowing system, like GTK+.

Returns:

  • (nil)

#ensure_viewportnil

Ensures that the GL viewport is updated with the current
stage window size.

This function will queue a redraw of stage.

This function should not be called by applications; it is used
when embedding a Clutter::Stage into a toolkit with another
windowing system, like GTK+.

Returns:

  • (nil)

#event(event) ⇒ Boolean

This function is used to emit an event on the main stage.

You should rarely need to use this function, except for
synthetised events.

Parameters:

Returns:

  • (Boolean)

    the return value from the signal emission

#fogClutter::Fog

The settings for the GL "fog", used only if Clutter::Stage:use-fog
is set to true

Returns:

  • (Clutter::Fog)

    fog

#fog=(fog) ⇒ Clutter::Fog

The settings for the GL "fog", used only if Clutter::Stage:use-fog
is set to true

Parameters:

  • fog (Clutter::Fog)

Returns:

  • (Clutter::Fog)

    fog

  • (Clutter::Fog)

    fog

#fullscreenBoolean

Retrieves whether the stage is full screen or not

Returns:

  • (Boolean)

    true if the stage is full screen

#fullscreen=(fullscreen) ⇒ nil

Asks to place the stage window in the fullscreen or unfullscreen
states.

( Note that you shouldn't assume the window is definitely full screen
afterward, because other entities (e.g. the user or window manager)
could unfullscreen it again, and not all window managers honor
requests to fullscreen windows.

If you want to receive notification of the fullscreen state you
should either use the Clutter::Stage::fullscreen and
Clutter::Stage::unfullscreen signals, or use the notify signal
for the Clutter::Stage:fullscreen-set property

Parameters:

  • fullscreen (Boolean)

    true to to set the stage fullscreen

Returns:

  • (nil)

#fullscreen_set=(fullscreen_set) ⇒ Boolean

Parameters:

  • fullscreen_set (Boolean)

Returns:

  • (Boolean)

    fullscreen-set

  • (Boolean)

    fullscreen-set

#fullscreen_set?Boolean

Returns fullscreen-set.

Returns:

  • (Boolean)

    fullscreen-set

#get_actor_at_pos(pick_mode, x, y) ⇒ Clutter::Actor

Checks the scene at the coordinates x and y and returns a pointer
to the Clutter::Actor at those coordinates.

By using pick_mode it is possible to control which actors will be
painted and thus available.

Parameters:

  • pick_mode (Clutter::PickMode)

    how the scene graph should be painted

  • x (Integer)

    X coordinate to check

  • y (Integer)

    Y coordinate to check

Returns:

#get_color(color) ⇒ nil

Retrieves the stage color.

Parameters:

Returns:

  • (nil)

#get_fog(fog) ⇒ nil

Retrieves the current depth cueing settings from the stage.

Parameters:

  • fog (Clutter::Fog)

    return location for a Clutter::Fog structure

Returns:

  • (nil)

#get_minimum_size(width, height) ⇒ nil

Retrieves the minimum size for a stage window as set using
clutter_stage_set_minimum_size().

The returned size may not correspond to the actual minimum size and
it is specific to the Clutter::Stage implementation inside the
Clutter backend

Parameters:

  • width (Integer)

    return location for the minimum width, in pixels,
    or nil

  • height (Integer)

    return location for the minimum height, in pixels,
    or nil

Returns:

  • (nil)

#get_perspective(perspective) ⇒ nil

Retrieves the stage perspective.

Parameters:

  • perspective (Clutter::Perspective)

    return location for a
    Clutter::Perspective

Returns:

  • (nil)

#get_redraw_clip_bounds(clip) ⇒ nil

Gets the bounds of the current redraw for stage in stage pixel
coordinates. E.g., if only a single actor has queued a redraw then
Clutter may redraw the stage with a clip so that it doesn't have to
paint every pixel in the stage. This function would then return the
bounds of that clip. An application can use this information to
avoid some extra work if it knows that some regions of the stage
aren't going to be painted. This should only be called while the
stage is being painted. If there is no current redraw clip then
this function will set clip to the full extents of the stage.

Parameters:

  • clip (cairo::RectangleInt)

    Return location for the clip bounds

Returns:

  • (nil)

#hide_cursornil

Makes the cursor invisible on the stage window

Returns:

  • (nil)

#is_defaultBoolean

Checks if stage is the default stage, or an instance created using
clutter_stage_new() but internally using the same implementation.

Returns:

  • (Boolean)

    true if the passed stage is the default one

#key_focusClutter::Actor

The Clutter::Actor that will receive key events from the underlying
windowing system.

If nil, the Clutter::Stage will receive the events.

Returns:

#key_focus=(key_focus) ⇒ Clutter::Actor

The Clutter::Actor that will receive key events from the underlying
windowing system.

If nil, the Clutter::Stage will receive the events.

Parameters:

Returns:

#motion_events_enabledBoolean

Retrieves the value set using clutter_stage_set_motion_events_enabled().

Returns:

  • (Boolean)

    true if the per-actor motion event delivery is enabled
    and false otherwise

#motion_events_enabled=(enabled) ⇒ nil

Sets whether per-actor motion events (and relative crossing
events) should be disabled or not.

The default is true.

If enable is false the following signals will not be emitted
by the actors children of stage:

  • Clutter::Actor::motion-event
  • Clutter::Actor::enter-event
  • Clutter::Actor::leave-event

The events will still be delivered to the Clutter::Stage.

The main side effect of this function is that disabling the motion
events will disable picking to detect the Clutter::Actor underneath
the pointer for each motion event. This is useful, for instance,
when dragging a Clutter::Actor across the stage: the actor underneath
the pointer is not going to change, so it's meaningless to perform
a pick.

Parameters:

  • enabled (Boolean)

    true to enable the motion events delivery, and false
    otherwise

Returns:

  • (nil)

#no_clear_hintBoolean

Retrieves the hint set with clutter_stage_set_no_clear_hint()

Returns:

  • (Boolean)

    true if the stage should not clear itself on every paint
    cycle, and false otherwise

#no_clear_hint=(no_clear_hint) ⇒ Boolean

Whether or not the Clutter::Stage should clear its contents
before each paint cycle.

See clutter_stage_set_no_clear_hint() for further information.

Parameters:

  • no_clear_hint (Boolean)

Returns:

  • (Boolean)

    no-clear-hint

  • (Boolean)

    no-clear-hint

#no_clear_hint?Boolean

Whether or not the Clutter::Stage should clear its contents
before each paint cycle.

See clutter_stage_set_no_clear_hint() for further information.

Returns:

  • (Boolean)

    no-clear-hint

#offscreen=(offscreen) ⇒ Boolean

Whether the stage should be rendered in an offscreen buffer.

Parameters:

  • offscreen (Boolean)

Returns:

  • (Boolean)

    offscreen

  • (Boolean)

    offscreen

#offscreen?Boolean

Whether the stage should be rendered in an offscreen buffer.

Returns:

  • (Boolean)

    offscreen

#perspectiveClutter::Perspective

The parameters used for the perspective projection from 3D
coordinates to 2D

Returns:

  • (Clutter::Perspective)

    perspective

#perspective=(perspective) ⇒ Clutter::Perspective

The parameters used for the perspective projection from 3D
coordinates to 2D

Parameters:

  • perspective (Clutter::Perspective)

Returns:

  • (Clutter::Perspective)

    perspective

  • (Clutter::Perspective)

    perspective

#queue_redrawnil

Queues a redraw for the passed stage.

Applications should call clutter_actor_queue_redraw() and not
this function.

Returns:

  • (nil)

#read_pixels(x, y, width, height) ⇒ Array<Integer>

Makes a screenshot of the stage in RGBA 8bit data, returns a
linear buffer with width * 4 as rowstride.

The alpha data contained in the returned buffer is driver-dependent,
and not guaranteed to hold any sensible value.

Parameters:

  • x (Integer)

    x coordinate of the first pixel that is read from stage

  • y (Integer)

    y coordinate of the first pixel that is read from stage

  • width (Integer)

    Width dimention of pixels to be read, or -1 for the
    entire stage width

  • height (Integer)

    Height dimention of pixels to be read, or -1 for the
    entire stage height

Returns:

  • (Array<Integer>)

    a pointer to newly allocated memory with the buffer
    or nil if the read failed. Use g_free() on the returned data
    to release the resources it has allocated.

#set_minimum_size(width, height) ⇒ nil

Sets the minimum size for a stage window, if the default backend
uses Clutter::Stage inside a window

This is a convenience function, and it is equivalent to setting the
Clutter::Actor:min-width and #ClutterActor:min-height on stage

If the current size of stage is smaller than the minimum size, the
stage will be resized to the new width and height

This function has no effect if stage is fullscreen

Parameters:

  • width (Integer)

    width, in pixels

  • height (Integer)

    height, in pixels

Returns:

  • (nil)

#show_cursornil

Shows the cursor on the stage window

Returns:

  • (nil)

#throttle_motion_eventsBoolean

Retrieves the value set with clutter_stage_set_throttle_motion_events()

Returns:

  • (Boolean)

    true if the motion events are being throttled,
    and false otherwise

#throttle_motion_events=(throttle) ⇒ nil

Sets whether motion events received between redraws should
be throttled or not. If motion events are throttled, those
events received by the windowing system between redraws will
be compressed so that only the last event will be propagated
to the stage and its actors.

This function should only be used if you want to have all
the motion events delivered to your application code.

Parameters:

  • throttle (Boolean)

    true to throttle motion events

Returns:

  • (nil)

#titleString

The stage's title - usually displayed in stage windows title decorations.

Returns:

  • (String)

    title

#title=(title) ⇒ String

The stage's title - usually displayed in stage windows title decorations.

Parameters:

  • title (String)

Returns:

  • (String)

    title

  • (String)

    title

#use_alphaBoolean

Retrieves the value set using clutter_stage_set_use_alpha()

Returns:

  • (Boolean)

    true if the stage should honour the opacity and the
    alpha channel of the stage color

#use_alpha=(use_alpha) ⇒ Boolean

Whether the Clutter::Stage should honour the alpha component of the
Clutter::Stage:color property when painting. If Clutter is run under
a compositing manager this will result in the stage being blended
with the underlying window(s)

Parameters:

  • use_alpha (Boolean)

Returns:

  • (Boolean)

    use-alpha

  • (Boolean)

    use-alpha

#use_alpha?Boolean

Whether the Clutter::Stage should honour the alpha component of the
Clutter::Stage:color property when painting. If Clutter is run under
a compositing manager this will result in the stage being blended
with the underlying window(s)

Returns:

  • (Boolean)

    use-alpha

#use_fogBoolean

Gets whether the depth cueing effect is enabled on stage.

Returns:

  • (Boolean)

    true if the depth cueing effect is enabled

#use_fog=(use_fog) ⇒ Boolean

Whether the stage should use a linear GL "fog" in creating the
depth-cueing effect, to enhance the perception of depth by fading
actors farther from the viewpoint.

Parameters:

  • use_fog (Boolean)

Returns:

  • (Boolean)

    use-fog

  • (Boolean)

    use-fog

#use_fog?Boolean

Whether the stage should use a linear GL "fog" in creating the
depth-cueing effect, to enhance the perception of depth by fading
actors farther from the viewpoint.

Returns:

  • (Boolean)

    use-fog

#user_resizableBoolean

Retrieves the value set with clutter_stage_set_user_resizable().

Returns:

  • (Boolean)

    true if the stage is resizable by the user.

#user_resizable=(user_resizable) ⇒ Boolean

Whether the stage is resizable via user interaction.

Parameters:

  • user_resizable (Boolean)

Returns:

  • (Boolean)

    user-resizable

  • (Boolean)

    user-resizable

#user_resizable?Boolean

Whether the stage is resizable via user interaction.

Returns:

  • (Boolean)

    user-resizable