GstVulkan.VulkanWindow

g GObject.InitiallyUnowned GObject.InitiallyUnowned Gst.Object Gst.Object GObject.InitiallyUnowned->Gst.Object GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned GstVulkan.VulkanWindow GstVulkan.VulkanWindow Gst.Object->GstVulkan.VulkanWindow

Subclasses:

None

Methods

Inherited:

Gst.Object (27), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (display)

close ()

get_display ()

get_presentation_support (device, queue_family_idx)

get_surface_dimensions ()

handle_events (handle_events)

open ()

redraw ()

resize (width, height)

send_key_event (event_type, key_str)

send_mouse_event (event_type, button, posx, posy)

set_window_handle (handle)

Virtual Methods

Inherited:

Gst.Object (1), GObject.Object (7)

do_close ()

do_get_presentation_support (device, queue_family_idx)

do_get_surface_dimensions ()

do_handle_events (handle_events)

do_open ()

do_set_window_handle (handle)

Properties

Inherited:

Gst.Object (2)

Name

Type

Flags

Short Description

display

GstVulkan.VulkanDisplay

r

Associated Vulkan Display

Signals

Inherited:

Gst.Object (1), GObject.Object (1)

Name

Short Description

close

draw

key-event

Will be emitted when a key event is received by the GstVulkan.VulkanWindow.

mouse-event

Will be emitted when a mouse event is received by the GstVulkan.VulkanWindow.

resize

Fields

Inherited:

Gst.Object (1), GObject.Object (1)

Name

Type

Access

Description

display

GstVulkan.VulkanDisplay

r

parent

Gst.Object

r

Class Details

class GstVulkan.VulkanWindow(**kwargs)
Bases:

Gst.Object

Abstract:

Yes

Structure:

GstVulkan.VulkanWindowClass

GstVulkan.VulkanWindow is an opaque struct and should only be accessed through the provided api.

New in version 1.18.

classmethod new(display)
Parameters:

display (GstVulkan.VulkanDisplay) – a GstVulkan.VulkanDisplay

Returns:

a new GstVulkan.VulkanWindow using display's connection

Return type:

GstVulkan.VulkanWindow

New in version 1.18.

close()

Attempt to close the window.

New in version 1.18.

get_display()
Returns:

the GstVulkan.VulkanDisplay for self

Return type:

GstVulkan.VulkanDisplay

New in version 1.18.

get_presentation_support(device, queue_family_idx)
Parameters:
Returns:

whether the given combination of self, device and queue_family_idx supports presentation

Return type:

bool

New in version 1.18.

get_surface_dimensions()
Returns:

width:

Current width of self

height:

Current height of self

Return type:

(width: int, height: int)

New in version 1.18.

handle_events(handle_events)
Parameters:

handle_events (bool) – a bool indicating if events should be handled or not.

Tell a self that it should handle events from the window system. These events are forwarded upstream as navigation events. In some window systems events are not propagated in the window hierarchy if a client is listening for them. This method allows you to disable events handling completely from the self.

New in version 1.18.

open()
Raises:

GLib.Error

Returns:

whether self could be successfully opened

Return type:

bool

New in version 1.18.

redraw()

Ask the self to redraw its contents

New in version 1.18.

resize(width, height)
Parameters:
  • width (int) – the new width

  • height (int) – the new height

Resize the output surface.

Currently intended for subclasses to update internal state.

New in version 1.18.

send_key_event(event_type, key_str)
Parameters:
  • event_type (str) –

  • key_str (str) –

send_mouse_event(event_type, button, posx, posy)
Parameters:
set_window_handle(handle)
Parameters:

handle (int) –

do_close() virtual

Attempt to close the window.

New in version 1.18.

do_get_presentation_support(device, queue_family_idx) virtual
Parameters:
Returns:

whether the given combination of window, device and queue_family_idx supports presentation

Return type:

bool

retrieve whether this window supports presentation

New in version 1.18.

do_get_surface_dimensions() virtual
Returns:

width:

Current width of window

height:

Current height of window

Return type:

(width: int, height: int)

retrieve the current size of the window

New in version 1.18.

do_handle_events(handle_events) virtual
Parameters:

handle_events (bool) – a bool indicating if events should be handled or not.

Tell a window that it should handle events from the window system. These events are forwarded upstream as navigation events. In some window systems events are not propagated in the window hierarchy if a client is listening for them. This method allows you to disable events handling completely from the window.

New in version 1.18.

do_open() virtual
Returns:

whether window could be successfully opened

Return type:

bool

open the connection to the display

New in version 1.18.

do_set_window_handle(handle) virtual
Parameters:

handle (int) –

set the external window handle to render into

Signal Details

GstVulkan.VulkanWindow.signals.close(vulkan_window)
Signal Name:

close

Flags:

RUN_LAST

Parameters:

vulkan_window (GstVulkan.VulkanWindow) – The object which received the signal

Return type:

bool

GstVulkan.VulkanWindow.signals.draw(vulkan_window)
Signal Name:

draw

Flags:

RUN_LAST

Parameters:

vulkan_window (GstVulkan.VulkanWindow) – The object which received the signal

GstVulkan.VulkanWindow.signals.key_event(vulkan_window, id, key)
Signal Name:

key-event

Flags:

RUN_LAST

Parameters:
  • vulkan_window (GstVulkan.VulkanWindow) – The object which received the signal

  • id (str) – the name of the event

  • key (str) – the id of the key pressed

Will be emitted when a key event is received by the GstVulkan.VulkanWindow.

New in version 1.18.

GstVulkan.VulkanWindow.signals.mouse_event(vulkan_window, id, button, x, y)
Signal Name:

mouse-event

Flags:

RUN_LAST

Parameters:
  • vulkan_window (GstVulkan.VulkanWindow) – The object which received the signal

  • id (str) – the name of the event

  • button (int) – the id of the button

  • x (float) – the x coordinate of the mouse event

  • y (float) – the y coordinate of the mouse event

Will be emitted when a mouse event is received by the GstVulkan.VulkanWindow.

New in version 1.18.

GstVulkan.VulkanWindow.signals.resize(vulkan_window, object, p0)
Signal Name:

resize

Flags:

RUN_LAST

Parameters:

Property Details

GstVulkan.VulkanWindow.props.display
Name:

display

Type:

GstVulkan.VulkanDisplay

Default Value:

None

Flags:

READABLE

Associated Vulkan Display