Module: ClutterGdk

Defined in:
lib/clutter-gdk.rb

Overview

Version:

  • 1.0

Instance Method Summary collapse

Instance Method Details

#default_displayGdk::Display

Retrieves the pointer to the default display.

Returns:

  • (Gdk::Display)

    the default display

#disable_event_retrievalnil

Disable the event retrieval in Clutter.

Callers of this function have to set up an event filter using the GDK API, and call clutter_gdk_handle_event().

This function should only be used when embedding Clutter into a GDK based toolkit.

Returns:

  • (nil)

#display=(display) ⇒ nil

Sets the display connection Clutter should use; must be called before clutter_init(), clutter_init_with_args() or other functions pertaining Clutter's initialization process.

If you are parsing the command line arguments by retrieving Clutter's GOption::Group with clutter_get_option_group() and calling g_option_context_parse() yourself, you should also call clutter_gdk_set_display() before g_option_context_parse().

Parameters:

  • display (Gdk::Display)

    pointer to a GDK display connection.

Returns:

  • (nil)

#get_stage_from_window(window) ⇒ Clutter::Stage

Gets the stage for a particular X window.

Parameters:

  • window (Gdk::Window)

    a Gtk::Window

Returns:

  • (Clutter::Stage)

    A Clutter::Stage, or% NULL if a stage does not exist for the window

#get_stage_window(stage) ⇒ Gdk::Window

Gets the stages GdkWindow.

Parameters:

  • stage (Clutter::Stage)

    a Clutter::Stage

Returns:

  • (Gdk::Window)

    A GdkWindow* for the stage window.

#handle_event(event) ⇒ Gdk::FilterReturn

This function processes a single GDK event; it can be used to hook into external event processing

Parameters:

  • event (Gdk::Event)

    a Gdk::Event

Returns:

  • (Gdk::FilterReturn)

    Gdk::FilterReturn. %GDK_FILTER_REMOVE indicates that Clutter has internally handled the event and the caller should do no further processing. %GDK_FILTER_CONTINUE indicates that Clutter is either not interested in the event, or has used the event to update internal state without taking any exclusive action. %GDK_FILTER_TRANSLATE will not occur.

#set_stage_foreign(stage, window) ⇒ Boolean

Target the Clutter::Stage to use an existing external #GdkWindow

Parameters:

  • stage (Clutter::Stage)

    a Clutter::Stage

  • window (Gdk::Window)

    an existing Gdk::Window

Returns:

  • (Boolean)

    true if foreign window is valid

#visualGdk::Visual

Retrieves the Gdk::Visual used by Clutter.

This function should be used when embedding Clutter inside GDK-based foreign toolkits, to ensure that the visual applied to the Gdk::Window used to render the Clutter::Stage is the correct one.

Returns:

  • (Gdk::Visual)

    a Gdk::Visual instance