VLC  3.0.21
Files | Data Structures | Typedefs | Enumerations | Functions
Video window
Collaboration diagram for Video window:

Files

file  vlc_vout_window.h
 

Data Structures

struct  vout_window_mouse_event_t
 Window mouse event. More...
 
struct  vout_window_cfg_t
 
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_INVALID =0, 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_HIDE_MOUSE }
 Control query for vout_window_t. More...
 
enum  vout_window_mouse_event_type {
  VOUT_WINDOW_MOUSE_STATE, 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, bool full)
 Sets fullscreen mode. More...
 
static int vout_window_HideMouse (vout_window_t *window, bool hide)
 Hide the mouse cursor. 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_SendMouseEvent (vout_window_t *window, const vout_window_mouse_event_t *mouse)
 
static void vout_window_ReportMouseState (vout_window_t *window, int x, int y, int button_mask)
 Send a full mouse state. More...
 
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...
 

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_HIDE_MOUSE 

◆ vout_window_mouse_event_type

Window mouse event type for vout_window_mouse_event_t.

Enumerator
VOUT_WINDOW_MOUSE_STATE 
VOUT_WINDOW_MOUSE_MOVED 
VOUT_WINDOW_MOUSE_PRESSED 
VOUT_WINDOW_MOUSE_RELEASED 
VOUT_WINDOW_MOUSE_DOUBLE_CLICK 

◆ vout_window_type

Window handle type.

Enumerator
VOUT_WINDOW_TYPE_INVALID 

Invalid or unspecified window type.

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_HideMouse(), vout_window_SetFullScreen(), vout_window_SetSize(), and vout_window_SetState().

◆ vout_window_Delete()

void vout_window_Delete ( vout_window_t )

Deletes a window created by vout_window_New().

Note
See vout_window_New() about window recycling.

Referenced by vlc_gl_surface_Create(), vlc_gl_surface_Destroy(), and vout_display_window_Delete().

◆ vout_window_HideMouse()

static int vout_window_HideMouse ( vout_window_t window,
bool  hide 
)
inlinestatic

Hide the mouse cursor.

References vout_window_Control(), and VOUT_WINDOW_HIDE_MOUSE.

◆ 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  
)

Creates a new window.

Parameters
moduleplugin name (usually "$window")
Note
If you are inside a "vout display", you must use / vout_display_NewWindow() and vout_display_DeleteWindow() instead. This enables recycling windows.

Referenced by vlc_gl_surface_Create(), and vout_display_window_New().

◆ vout_window_ReportClose()

static void vout_window_ReportClose ( vout_window_t window)
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, and vout_window_SendMouseEvent().

◆ 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_ReportMouseState()

static void vout_window_ReportMouseState ( vout_window_t window,
int  x,
int  y,
int  button_mask 
)
inlinestatic

Send a full mouse state.

The mouse position must be expressed against window unit. You can use this function of others vout_window_ReportMouse*() functions.

References VOUT_WINDOW_MOUSE_STATE, and vout_window_SendMouseEvent().

◆ 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_t::owner, and vout_window_owner::resized.

◆ 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,
bool  full 
)
inlinestatic

Sets fullscreen mode.

References vout_window_Control(), and VOUT_WINDOW_SET_FULLSCREEN.

◆ 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_window_Attach().

◆ 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.

◆ 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().