VLC  4.0.0-dev
Data Fields
vout_window_callbacks Struct Reference

Window event callbacks structure. More...

Data Fields

void(* resized )(struct vout_window_t *, unsigned width, unsigned height)
 Callback for window size changes. More...
 
void(* closed )(struct vout_window_t *)
 Callback for window closing. More...
 
void(* state_changed )(struct vout_window_t *, unsigned state)
 Callback for window state change. More...
 
void(* windowed )(struct vout_window_t *)
 Callback for windowed mode. More...
 
void(* fullscreened )(struct vout_window_t *, const char *id)
 Callback for fullscreen mode. More...
 
void(* mouse_event )(struct vout_window_t *, const vout_window_mouse_event_t *mouse)
 Callback for pointer input events. More...
 
void(* keyboard_event )(struct vout_window_t *, unsigned key)
 Callback for keyboard input events. More...
 
void(* output_event )(struct vout_window_t *, const char *id, const char *desc)
 Callback for fullscreen output enumeration. More...
 

Detailed Description

Window event callbacks structure.

This structure provided to vout_window_New() conveys callbacks to handle window events.

As a general rule, the events can occur synchronously or asynchronously from the time that the window is (succesfully) being created by vout_window_New() until the time that the window has been deleted by vout_window_Delete().

Warning
Also, a window object functions are not reentrant, so the callbacks must not invoke the window object functions. Otherwise a deadlock or infinite recursion may occur.

Field Documentation

◆ closed

void(* vout_window_callbacks::closed) (struct vout_window_t *)

Callback for window closing.

This callback function (if non-NULL) is invoked upon an external request to close the window. Not all windowing systems support this.

Soon after this callback, the window should be disabled with vout_window_Disable().

Warning
Do not disable the window within the callback. That could lead to a dead lock.

Referenced by vout_window_ReportClose().

◆ fullscreened

void(* vout_window_callbacks::fullscreened) (struct vout_window_t *, const char *id)

Callback for fullscreen mode.

This callback function (if non-NULL) is invoked when the window becomes fullscreen, when it changes to a different fullscreen output, or spuriously when the window remains in fullscreen mode.

Bug:
Many window back-ends fail to invoke this callback when due.
Parameters
idfullscreen output identifier (NULL if unspecified)

Referenced by vout_window_ReportFullscreen().

◆ keyboard_event

void(* vout_window_callbacks::keyboard_event) (struct vout_window_t *, unsigned key)

Callback for keyboard input events.

This callback function (if non-NULL) is invoked upon any keyboard key press event, or repetition event, on the window.

Note
No events are delivered for keyboard key releases.
Parameters
keyVLC key code

Referenced by vout_window_ReportKeyPress().

◆ mouse_event

void(* vout_window_callbacks::mouse_event) (struct vout_window_t *, const vout_window_mouse_event_t *mouse)

Callback for pointer input events.

This callback function (if non-NULL) is invoked upon any pointer input event on the window. See vout_window_mouse_event_t.

Parameters
mousepointer to the input event.

Referenced by vout_window_SendMouseEvent().

◆ output_event

void(* vout_window_callbacks::output_event) (struct vout_window_t *, const char *id, const char *desc)

Callback for fullscreen output enumeration.

This callback function (if non-NULL) indicates that a fullscreen output becomes available, changes human-readable description, or becomes unavailable.

Parameters
idnul-terminated id fullscreen output identifier (cannot be NULL)
descnul-terminated human-readable description, or NULL if the output has become unavailable

Referenced by vout_window_ReportOutputDevice().

◆ resized

void(* vout_window_callbacks::resized) (struct vout_window_t *, unsigned width, unsigned height)

Callback for window size changes.

This callback function is invoked when the windowing system changes the window size.

This event may occur synchronously when the window is created or a size change is requested. It may also occur asynchronously as a consequence of external events from the windowing system, or deferred processing of a size change request.

Referenced by vlc_gl_surface_Create(), and vout_window_ReportSize().

◆ state_changed

void(* vout_window_callbacks::state_changed) (struct vout_window_t *, unsigned state)

Callback for window state change.

This callback function (if non-NULL) is invoked when the window state as changed, either as a consequence of vout_window_SetSate() or external events.

Bug:
Many window back-ends fail to invoke this callback when due.
Parameters
statenew window state (see vout_window_state).

Referenced by vout_window_ReportState().

◆ windowed

void(* vout_window_callbacks::windowed) (struct vout_window_t *)

Callback for windowed mode.

This callback function (if non-NULL) is invoked when the window becomes windowed. It might also occur spuriously if the window remains windowed.

Bug:
Many window back-ends fail to invoke this callback when due.

Referenced by vout_window_ReportWindowed().


The documentation for this struct was generated from the following file: