Trait gstreamer_gl::prelude::GLWindowExt[][src]

pub trait GLWindowExt: 'static {
Show methods fn controls_viewport(&self) -> bool;
fn draw(&self);
fn context(&self) -> Option<GLContext>;
fn surface_dimensions(&self) -> (u32, u32);
fn handle_events(&self, handle_events: bool);
fn has_output_surface(&self) -> bool;
fn queue_resize(&self);
fn quit(&self);
fn resize(&self, width: u32, height: u32);
fn run(&self);
fn send_key_event(&self, event_type: &str, key_str: &str);
fn send_mouse_event(
        &self,
        event_type: &str,
        button: i32,
        posx: f64,
        posy: f64
    );
fn send_scroll_event(
        &self,
        posx: f64,
        posy: f64,
        delta_x: f64,
        delta_y: f64
    );
fn set_preferred_size(&self, width: i32, height: i32);
fn set_render_rectangle(
        &self,
        x: i32,
        y: i32,
        width: i32,
        height: i32
    ) -> Result<(), BoolError>;
fn show(&self);
fn connect_key_event<F: Fn(&Self, &str, &str) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_mouse_event<F: Fn(&Self, &str, i32, f64, f64) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_scroll_event<F: Fn(&Self, f64, f64, f64, f64) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
}

Trait containing all GLWindow methods.

Implementors

crate::GLWindow

Required methods

fn controls_viewport(&self) -> bool[src]

This is supported on crate feature v1_16 only.

Checks if self controls the GL viewport.

Returns

true if self controls the GL viewport, otherwise false

fn draw(&self)[src]

Redraw the window contents. Implementations should invoke the draw callback.

fn context(&self) -> Option<GLContext>[src]

Returns

the crate::GLContext associated with this self

fn surface_dimensions(&self) -> (u32, u32)[src]

width

resulting surface width

height

resulting surface height

fn handle_events(&self, handle_events: bool)[src]

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.

handle_events

a gboolean indicating if events should be handled or not.

fn has_output_surface(&self) -> bool[src]

This is supported on crate feature v1_18 only.

Query whether self has output surface or not

Returns

true if self has useable output surface

fn queue_resize(&self)[src]

Queue resizing of self.

fn quit(&self)[src]

Quit the runloop’s execution.

fn resize(&self, width: u32, height: u32)[src]

Resize self to the given width and height.

width

new width

height

new height

fn run(&self)[src]

Start the execution of the runloop.

fn send_key_event(&self, event_type: &str, key_str: &str)[src]

fn send_mouse_event(&self, event_type: &str, button: i32, posx: f64, posy: f64)[src]

fn send_scroll_event(&self, posx: f64, posy: f64, delta_x: f64, delta_y: f64)[src]

This is supported on crate feature v1_18 only.

Notify a self about a scroll event. A scroll signal holding the event coordinates will be emitted.

posx

x position of the mouse cursor

posy

y position of the mouse cursor

delta_x

the x offset of the scroll event

delta_y

the y offset of the scroll event

fn set_preferred_size(&self, width: i32, height: i32)[src]

Set the preferred width and height of the window. Implementations are free to ignore this information.

width

new preferred width

height

new preferred height

fn set_render_rectangle(
    &self,
    x: i32,
    y: i32,
    width: i32,
    height: i32
) -> Result<(), BoolError>
[src]

Tell a self that it should render into a specific region of the window according to the crate::gst_video::VideoOverlay interface.

x

x position

y

y position

width

width

height

height

Returns

whether the specified region could be set

fn show(&self)[src]

Present the window to the screen.

fn connect_key_event<F: Fn(&Self, &str, &str) + Send + Sync + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

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

id

the name of the event

key

the id of the key pressed

fn connect_mouse_event<F: Fn(&Self, &str, i32, f64, f64) + Send + Sync + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

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

id

the name of the event

button

the id of the button

x

the x coordinate of the mouse event

y

the y coordinate of the mouse event

fn connect_scroll_event<F: Fn(&Self, f64, f64, f64, f64) + Send + Sync + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

This is supported on crate feature v1_18 only.

Will be emitted when a mouse scroll event is received by the GstGLwindow.

x

the x coordinate of the mouse event

y

the y coordinate of the mouse event

delta_x

the x offset of the scroll event

delta_y

the y offset of the scroll event

Loading content...

Implementors

impl<O: IsA<GLWindow>> GLWindowExt for O[src]

fn controls_viewport(&self) -> bool[src]

This is supported on crate feature v1_16 only.

fn draw(&self)[src]

fn context(&self) -> Option<GLContext>[src]

fn surface_dimensions(&self) -> (u32, u32)[src]

fn handle_events(&self, handle_events: bool)[src]

fn has_output_surface(&self) -> bool[src]

This is supported on crate feature v1_18 only.

fn queue_resize(&self)[src]

fn quit(&self)[src]

fn resize(&self, width: u32, height: u32)[src]

fn run(&self)[src]

fn send_key_event(&self, event_type: &str, key_str: &str)[src]

fn send_mouse_event(&self, event_type: &str, button: i32, posx: f64, posy: f64)[src]

fn send_scroll_event(&self, posx: f64, posy: f64, delta_x: f64, delta_y: f64)[src]

This is supported on crate feature v1_18 only.

fn set_preferred_size(&self, width: i32, height: i32)[src]

fn set_render_rectangle(
    &self,
    x: i32,
    y: i32,
    width: i32,
    height: i32
) -> Result<(), BoolError>
[src]

fn show(&self)[src]

fn connect_key_event<F: Fn(&Self, &str, &str) + Send + Sync + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

fn connect_mouse_event<F: Fn(&Self, &str, i32, f64, f64) + Send + Sync + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

fn connect_scroll_event<F: Fn(&Self, f64, f64, f64, f64) + Send + Sync + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

This is supported on crate feature v1_18 only.
Loading content...