Retro.CoreView

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Bin Gtk.Bin Gtk.EventBox Gtk.EventBox Gtk.Bin->Gtk.EventBox Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.Container->Gtk.Bin Retro.CoreView Retro.CoreView Gtk.EventBox->Retro.CoreView Gtk.Widget->Gtk.Container

Subclasses:None

Properties

Inherited:Gtk.EventBox (2), Gtk.Container (3), Gtk.Widget (39)
Name Type Flags Short Description
can-grab-pointer bool r/w Whether the pointer can be grabbed
snap-pointer-to-borders bool r/w Wheter the pointer is considered to be on the border when it is out of the display

Style Properties

Inherited:Gtk.Widget (17)

Class Details

class Retro.CoreView(**kwargs)
Bases:Gtk.EventBox
Abstract:No
Structure:Retro.CoreViewClass
classmethod new()
Returns:a new Retro.CoreView
Return type:Retro.CoreView

Creates a new Retro.CoreView.

as_controller(controller_type)
Parameters:controller_type (Retro.ControllerType) – the controller type to expose self as
Returns:a new Retro.Controller
Return type:Retro.Controller

Creates a new Retro.Controller exposing self as the specified controller type. The valid controller types are Retro.ControllerType.JOYPAD, Retro.ControllerType.MOUSE, Retro.ControllerType.KEYBOARD and Retro.ControllerType.POINTER.

get_can_grab_pointer()
Returns:whether the pointer should snap to the borders
Return type:bool

Gets whether the pointer should be grabbed when clicking on the view. This allows self to work as a Retro.ControllerType.MOUSE instead of a Retro.ControllerType.POINTER.

get_controller_capabilities()
Returns:the capabilities flag of self when exposed as a controller
Return type:int

Gets a flag representing the capabilities of self when exposed as a controller. See Retro.Controller.get_capabilities() for more information on the flag.

See Retro.CoreView.as_controller() to know the capabilities of Retro.CoreView when exposed as a controller.

get_input_state(input)
Parameters:input (Retro.Input) – a Retro.Input to query self
Returns:the input’s state
Return type:int

Gets the state of an input of self.

get_key_joypad_mapping()
Returns:a Retro.KeyJoypadMapping
Return type:Retro.KeyJoypadMapping

Gets the currently set key joypad mapping.

get_pixbuf()
Returns:a GdkPixbuf.Pixbuf
Return type:GdkPixbuf.Pixbuf

Gets the currently displayed video frame.

get_snap_pointer_to_borders()
Returns:whether the pointer should snap to the borders
Return type:bool

Gets whether the pointer should be considered to be at the border of the video display when it is outside of it. This is used when self is exposed as a Retro.ControllerType.POINTER.

set_as_default_controller(core)
Parameters:core (Retro.Core or None) – a Retro.Core

Sets the self as the default controllers of core.

set_can_grab_pointer(can_grab_pointer)
Parameters:can_grab_pointer (bool) – whether the pointer should be grabbed when clicking on the view

Sets whether the pointer should be grabbed when clicking on the view. This allows self to work as a Retro.ControllerType.MOUSE instead of a Retro.ControllerType.POINTER.

set_core(core)
Parameters:core (Retro.Core or None) – a Retro.Core, or None

Sets core as the Retro.Core handled by self.

set_filter(filter)
Parameters:filter (Retro.VideoFilter) – a Retro.VideoFilter

Sets the video filter to use to render the core’s video on self.

set_key_joypad_mapping(mapping)
Parameters:mapping (Retro.KeyJoypadMapping or None) – a Retro.KeyJoypadMapping

Sets the key joypad mapping on self. If given mapping is None, then set to an empty configuration.

set_pixbuf(pixbuf)
Parameters:pixbuf (GdkPixbuf.Pixbuf) – a GdkPixbuf.Pixbuf

Sets pixbuf as the currently displayed video frame.

Retro.pixbuf_set_aspect_ratio() can be used to specify the aspect ratio for the pixbuf. Otherwise the core’s aspect ratio will be used.

set_snap_pointer_to_borders(snap_pointer_to_borders)
Parameters:snap_pointer_to_borders (bool) – whether the pointer should snap to the borders

Sets whether the pointer should be considered to be at the border of the video display when it is outside of it. This is used when self is exposed as a Retro.ControllerType.POINTER.

Property Details

Retro.CoreView.props.can_grab_pointer
Name:can-grab-pointer
Type:bool
Default Value:False
Flags:READABLE, WRITABLE

Whether the pointer can be grabbed

Retro.CoreView.props.snap_pointer_to_borders
Name:snap-pointer-to-borders
Type:bool
Default Value:False
Flags:READABLE, WRITABLE

Wheter the pointer is considered to be on the border when it is out of the display