VLC  4.0.0-dev
Files | Data Structures | Typedefs | Enumerations | Functions

Video output window management. More...

Collaboration diagram for Video window:

Files

file  vlc_vout_window.h
 Video output window modules interface.
 

Data Structures

struct  vout_window_mouse_event_t
 Window mouse event. More...
 
struct  vout_window_cfg_t
 
struct  vout_window_callbacks
 
struct  vout_window_owner
 
struct  vout_window_t
 Graphical window. More...
 

Typedefs

typedef struct vout_window_t vout_window_t
 
typedef struct vout_window_sys_t vout_window_sys_t
 
typedef struct vout_window_mouse_event_t vout_window_mouse_event_t
 Window mouse event. More...
 
typedef struct vout_window_cfg_t vout_window_cfg_t
 
typedef struct vout_window_owner vout_window_owner_t
 

Enumerations

enum  vout_window_type {
  VOUT_WINDOW_TYPE_DUMMY, VOUT_WINDOW_TYPE_XID, VOUT_WINDOW_TYPE_HWND, VOUT_WINDOW_TYPE_NSOBJECT,
  VOUT_WINDOW_TYPE_ANDROID_NATIVE, VOUT_WINDOW_TYPE_WAYLAND
}
 Window handle type. More...
 
enum  vout_window_control {
  VOUT_WINDOW_SET_STATE, VOUT_WINDOW_SET_SIZE, VOUT_WINDOW_SET_FULLSCREEN, VOUT_WINDOW_UNSET_FULLSCREEN,
  VOUT_WINDOW_HIDE_MOUSE
}
 Control query for vout_window_t. More...
 
enum  vout_window_state { VOUT_WINDOW_STATE_NORMAL, VOUT_WINDOW_STATE_ABOVE, VOUT_WINDOW_STATE_BELOW }
 Window management state. More...
 
enum  vout_window_mouse_event_type { VOUT_WINDOW_MOUSE_MOVED, VOUT_WINDOW_MOUSE_PRESSED, VOUT_WINDOW_MOUSE_RELEASED, VOUT_WINDOW_MOUSE_DOUBLE_CLICK }
 Window mouse event type for vout_window_mouse_event_t. More...
 

Functions

vout_window_tvout_window_New (vlc_object_t *, const char *module, const vout_window_cfg_t *, const vout_window_owner_t *)
 Creates a new window. More...
 
void vout_window_Delete (vout_window_t *)
 Deletes a window created by vout_window_New(). More...
 
void vout_window_SetInhibition (vout_window_t *window, bool enabled)
 
static int vout_window_vaControl (vout_window_t *window, int query, va_list ap)
 
static int vout_window_Control (vout_window_t *window, int query,...)
 Reconfigures a window. More...
 
static int vout_window_SetState (vout_window_t *window, unsigned state)
 Configures the window manager state for this window. More...
 
static int vout_window_SetSize (vout_window_t *window, unsigned width, unsigned height)
 Configures the window display (i.e. More...
 
static int vout_window_SetFullScreen (vout_window_t *window, const char *id)
 Requests fullscreen mode. More...
 
static int vout_window_UnsetFullScreen (vout_window_t *window)
 Requests windowed mode. More...
 
static void vout_window_ReportSize (vout_window_t *window, unsigned width, unsigned height)
 Report current window size. More...
 
static void vout_window_ReportClose (vout_window_t *window)
 
static void vout_window_ReportState (vout_window_t *window, unsigned state)
 Reports the current window state. More...
 
static void vout_window_ReportWindowed (vout_window_t *window)
 Reports that the window is not in full screen. More...
 
static void vout_window_ReportFullscreen (vout_window_t *window, const char *id)
 Reports that the window is in full screen. More...
 
static void vout_window_SendMouseEvent (vout_window_t *window, const vout_window_mouse_event_t *mouse)
 
static void vout_window_ReportMouseMoved (vout_window_t *window, int x, int y)
 Send a mouse movement. More...
 
static void vout_window_ReportMousePressed (vout_window_t *window, int button)
 Send a mouse pressed event. More...
 
static void vout_window_ReportMouseReleased (vout_window_t *window, int button)
 Send a mouse released event. More...
 
static void vout_window_ReportMouseDoubleClick (vout_window_t *window, int button)
 Send a mouse double click event. More...
 
static void vout_window_ReportKeyPress (vout_window_t *window, int key)
 
static void vout_window_ReportOutputDevice (vout_window_t *window, const char *id, const char *name)
 Adds/removes a fullscreen output. More...
 

Detailed Description

Video output window management.

Typedef Documentation

◆ vout_window_cfg_t

◆ vout_window_mouse_event_t

Window mouse event.

◆ vout_window_owner_t

◆ vout_window_sys_t

◆ vout_window_t

typedef struct vout_window_t vout_window_t

Enumeration Type Documentation

◆ vout_window_control

Control query for vout_window_t.

Enumerator
VOUT_WINDOW_SET_STATE 
VOUT_WINDOW_SET_SIZE 
VOUT_WINDOW_SET_FULLSCREEN 
VOUT_WINDOW_UNSET_FULLSCREEN 
VOUT_WINDOW_HIDE_MOUSE 

◆ vout_window_mouse_event_type

Window mouse event type for vout_window_mouse_event_t.

Enumerator
VOUT_WINDOW_MOUSE_MOVED 
VOUT_WINDOW_MOUSE_PRESSED 
VOUT_WINDOW_MOUSE_RELEASED 
VOUT_WINDOW_MOUSE_DOUBLE_CLICK 

◆ vout_window_state

Window management state.

Enumerator
VOUT_WINDOW_STATE_NORMAL 
VOUT_WINDOW_STATE_ABOVE 
VOUT_WINDOW_STATE_BELOW 

◆ vout_window_type

Window handle type.

Enumerator
VOUT_WINDOW_TYPE_DUMMY 

Dummy window (not an actual window)

VOUT_WINDOW_TYPE_XID 

X11 window.

VOUT_WINDOW_TYPE_HWND 

Win32 or OS/2 window.

VOUT_WINDOW_TYPE_NSOBJECT 

MacOS X view.

VOUT_WINDOW_TYPE_ANDROID_NATIVE 

Android native window.

VOUT_WINDOW_TYPE_WAYLAND 

Wayland surface.

Function Documentation

◆ vout_window_Control()

static int vout_window_Control ( vout_window_t window,
int  query,
  ... 
)
inlinestatic

Reconfigures a window.

Note
The vout_window_* wrappers should be used instead of this function.
Warning
The caller must own the window, as vout_window_t is not thread safe.

References vout_window_vaControl().

Referenced by vout_window_SetFullScreen(), vout_window_SetSize(), vout_window_SetState(), and vout_window_UnsetFullScreen().

◆ vout_window_Delete()

void vout_window_Delete ( vout_window_t )

◆ vout_window_New()

vout_window_t* vout_window_New ( vlc_object_t ,
const char *  module,
const vout_window_cfg_t ,
const vout_window_owner_t  
)

◆ vout_window_ReportClose()

static void vout_window_ReportClose ( vout_window_t window)
inlinestatic

◆ vout_window_ReportFullscreen()

static void vout_window_ReportFullscreen ( vout_window_t window,
const char *  id 
)
inlinestatic

Reports that the window is in full screen.

Parameters
idfullscreen output nul-terminated identifier, NULL for default

References vout_window_owner::cbs, vout_window_callbacks::fullscreened, and vout_window_t::owner.

◆ vout_window_ReportKeyPress()

static void vout_window_ReportKeyPress ( vout_window_t window,
int  key 
)
inlinestatic

◆ vout_window_ReportMouseDoubleClick()

static void vout_window_ReportMouseDoubleClick ( vout_window_t window,
int  button 
)
inlinestatic

Send a mouse double click event.

References VOUT_WINDOW_MOUSE_DOUBLE_CLICK, and vout_window_SendMouseEvent().

◆ vout_window_ReportMouseMoved()

static void vout_window_ReportMouseMoved ( vout_window_t window,
int  x,
int  y 
)
inlinestatic

Send a mouse movement.

The mouse position must be expressed against window unit.

References VOUT_WINDOW_MOUSE_MOVED, vout_window_SendMouseEvent(), vout_window_mouse_event_t::x, and vout_window_mouse_event_t::y.

◆ vout_window_ReportMousePressed()

static void vout_window_ReportMousePressed ( vout_window_t window,
int  button 
)
inlinestatic

Send a mouse pressed event.

References VOUT_WINDOW_MOUSE_PRESSED, and vout_window_SendMouseEvent().

◆ vout_window_ReportMouseReleased()

static void vout_window_ReportMouseReleased ( vout_window_t window,
int  button 
)
inlinestatic

Send a mouse released event.

References VOUT_WINDOW_MOUSE_RELEASED, and vout_window_SendMouseEvent().

◆ vout_window_ReportOutputDevice()

static void vout_window_ReportOutputDevice ( vout_window_t window,
const char *  id,
const char *  name 
)
inlinestatic

Adds/removes a fullscreen output.

This notifies the owner of the window that a usable fullscreen output has been added, changed or removed.

If an output with the same identifier is already known, its name will be updated. Otherwise it will be added. If the name parameter is NULL, the output will be removed.

Parameters
idunique nul-terminated identifier for the output
namehuman-readable name

References vout_window_owner::cbs, vout_window_callbacks::output_event, and vout_window_t::owner.

◆ vout_window_ReportSize()

static void vout_window_ReportSize ( vout_window_t window,
unsigned  width,
unsigned  height 
)
inlinestatic

Report current window size.

This notifies the user of the window what the pixel dimensions of the window are (or should be, depending on the windowing system).

Note
This function is thread-safe. In case of concurrent call, it is undefined which one is taken into account (but at least one is).

References vout_window_owner::cbs, vout_window_t::owner, and vout_window_callbacks::resized.

Referenced by vout_display_SendEventDisplaySize().

◆ vout_window_ReportState()

static void vout_window_ReportState ( vout_window_t window,
unsigned  state 
)
inlinestatic

Reports the current window state.

This notifies the owner of the window that the state of the window changed.

Parameters
state
See also
vout_window_state

References vout_window_owner::cbs, vout_window_t::owner, and vout_window_callbacks::state_changed.

◆ vout_window_ReportWindowed()

static void vout_window_ReportWindowed ( vout_window_t window)
inlinestatic

Reports that the window is not in full screen.

This notifies the owner of the window that the window is windowed, i.e. not in full screen mode.

References vout_window_owner::cbs, vout_window_t::owner, and vout_window_callbacks::windowed.

◆ vout_window_SendMouseEvent()

static void vout_window_SendMouseEvent ( vout_window_t window,
const vout_window_mouse_event_t mouse 
)
inlinestatic

◆ vout_window_SetFullScreen()

static int vout_window_SetFullScreen ( vout_window_t window,
const char *  id 
)
inlinestatic

Requests fullscreen mode.

Parameters
idnul-terminated output identifier, NULL for default
Return values
VLC_SUCCESSThe request has been queued to the windowing system (that does not imply that the request is complete nor succesful).
VLC_EGENERICThe request could not be queued, e.g. the back-end does not implement toggling between fullscreen and windowed modes.

References vout_window_Control(), and VOUT_WINDOW_SET_FULLSCREEN.

Referenced by ThreadChangeFullscreen().

◆ vout_window_SetInhibition()

void vout_window_SetInhibition ( vout_window_t window,
bool  enabled 
)

◆ vout_window_SetSize()

static int vout_window_SetSize ( vout_window_t window,
unsigned  width,
unsigned  height 
)
inlinestatic

Configures the window display (i.e.

inner/useful) size.

References vout_window_Control(), and VOUT_WINDOW_SET_SIZE.

Referenced by vout_display_New(), and vout_SetDisplayWindowSize().

◆ vout_window_SetState()

static int vout_window_SetState ( vout_window_t window,
unsigned  state 
)
inlinestatic

Configures the window manager state for this window.

References vout_window_Control(), and VOUT_WINDOW_SET_STATE.

Referenced by ThreadChangeWindowState(), and VoutCreate().

◆ vout_window_UnsetFullScreen()

static int vout_window_UnsetFullScreen ( vout_window_t window)
inlinestatic

Requests windowed mode.

Returns
See also
vout_window_SetFullScreen()

References vout_window_Control(), and VOUT_WINDOW_UNSET_FULLSCREEN.

Referenced by ThreadChangeWindow().

◆ vout_window_vaControl()

static int vout_window_vaControl ( vout_window_t window,
int  query,
va_list  ap 
)
inlinestatic

References vout_window_t::control.

Referenced by vout_window_Control().