mirror of https://code.videolan.org/videolan/vlc
window: rename vout_window* to vlc_window*
The baseline windowing code has not been specific to the video output for a while.
This commit is contained in:
parent
d12d858d6f
commit
84c253cdd1
|
@ -630,7 +630,7 @@ typedef struct vlc_decoder_device
|
|||
* @param window pointer to a window to help device initialization (can be NULL)
|
||||
**/
|
||||
typedef int (*vlc_decoder_device_Open)(vlc_decoder_device *device,
|
||||
vout_window_t *window);
|
||||
vlc_window_t *window);
|
||||
|
||||
#define set_callback_dec_device(activate, priority) \
|
||||
{ \
|
||||
|
@ -648,7 +648,7 @@ typedef int (*vlc_decoder_device_Open)(vlc_decoder_device *device,
|
|||
* module as a transition.
|
||||
*/
|
||||
VLC_API vlc_decoder_device *
|
||||
vlc_decoder_device_Create(vlc_object_t *, vout_window_t *window) VLC_USED;
|
||||
vlc_decoder_device_Create(vlc_object_t *, vlc_window_t *window) VLC_USED;
|
||||
|
||||
/**
|
||||
* Hold a decoder device
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
typedef struct vlc_inhibit vlc_inhibit_t;
|
||||
typedef struct vlc_inhibit_sys vlc_inhibit_sys_t;
|
||||
|
||||
struct vout_window_t;
|
||||
struct vlc_window;
|
||||
|
||||
enum vlc_inhibit_flags
|
||||
{
|
||||
|
@ -48,9 +48,9 @@ struct vlc_inhibit
|
|||
void (*inhibit) (vlc_inhibit_t *, unsigned flags);
|
||||
};
|
||||
|
||||
static inline struct vout_window_t *vlc_inhibit_GetWindow(vlc_inhibit_t *ih)
|
||||
static inline struct vlc_window *vlc_inhibit_GetWindow(vlc_inhibit_t *ih)
|
||||
{
|
||||
return (struct vout_window_t *)vlc_object_parent(ih);
|
||||
return (struct vlc_window *)vlc_object_parent(ih);
|
||||
}
|
||||
|
||||
static inline void vlc_inhibit_Set (vlc_inhibit_t *ih, unsigned flags)
|
||||
|
|
|
@ -33,8 +33,8 @@ extern "C" {
|
|||
* This file defines GL structures and functions.
|
||||
*/
|
||||
|
||||
struct vout_window_t;
|
||||
struct vout_window_cfg_t;
|
||||
struct vlc_window;
|
||||
struct vlc_window_cfg;
|
||||
struct vout_display_cfg;
|
||||
|
||||
/**
|
||||
|
@ -72,7 +72,7 @@ struct vlc_gl_t
|
|||
struct vlc_decoder_device *device;
|
||||
union {
|
||||
struct { /* on-screen */
|
||||
struct vout_window_t *surface;
|
||||
struct vlc_window *surface;
|
||||
};
|
||||
struct { /* off-screen */
|
||||
vlc_fourcc_t offscreen_chroma_out;
|
||||
|
@ -140,8 +140,8 @@ static inline void *vlc_gl_GetProcAddress(vlc_gl_t *gl, const char *name)
|
|||
}
|
||||
|
||||
VLC_API vlc_gl_t *vlc_gl_surface_Create(vlc_object_t *,
|
||||
const struct vout_window_cfg_t *,
|
||||
struct vout_window_t **) VLC_USED;
|
||||
const struct vlc_window_cfg *,
|
||||
struct vlc_window **) VLC_USED;
|
||||
VLC_API bool vlc_gl_surface_CheckSize(vlc_gl_t *, unsigned *w, unsigned *h);
|
||||
VLC_API void vlc_gl_surface_Destroy(vlc_gl_t *);
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
typedef struct video_splitter_t video_splitter_t;
|
||||
|
||||
struct vout_window_mouse_event_t;
|
||||
struct vlc_window_mouse_event;
|
||||
|
||||
/** Structure describing a video splitter output properties
|
||||
*/
|
||||
|
@ -80,7 +80,7 @@ struct video_splitter_t
|
|||
int (*pf_filter)( video_splitter_t *, picture_t *pp_dst[],
|
||||
picture_t *p_src );
|
||||
int (*mouse)(video_splitter_t *, int idx,
|
||||
struct vout_window_mouse_event_t *);
|
||||
struct vlc_window_mouse_event *);
|
||||
|
||||
void *p_sys;
|
||||
};
|
||||
|
@ -131,7 +131,7 @@ static inline int video_splitter_Filter( video_splitter_t *p_splitter,
|
|||
}
|
||||
|
||||
static inline int video_splitter_Mouse(video_splitter_t *splitter, int index,
|
||||
struct vout_window_mouse_event_t *ev)
|
||||
struct vlc_window_mouse_event *ev)
|
||||
{
|
||||
return (splitter->mouse != NULL)
|
||||
? splitter->mouse(splitter, index, ev) : VLC_SUCCESS;
|
||||
|
|
|
@ -90,7 +90,7 @@ typedef struct vlc_video_align {
|
|||
* multiplied by the zoom factor.
|
||||
*/
|
||||
typedef struct vout_display_cfg {
|
||||
struct vout_window_t *window; /**< Window */
|
||||
struct vlc_window *window; /**< Window */
|
||||
|
||||
/** Display properties */
|
||||
struct {
|
||||
|
@ -420,11 +420,11 @@ void vout_display_SetSize(vout_display_t *vd, unsigned width, unsigned height);
|
|||
|
||||
static inline void vout_display_SendEventMousePressed(vout_display_t *vd, int button)
|
||||
{
|
||||
vout_window_ReportMousePressed(vd->cfg->window, button);
|
||||
vlc_window_ReportMousePressed(vd->cfg->window, button);
|
||||
}
|
||||
static inline void vout_display_SendEventMouseReleased(vout_display_t *vd, int button)
|
||||
{
|
||||
vout_window_ReportMouseReleased(vd->cfg->window, button);
|
||||
vlc_window_ReportMouseReleased(vd->cfg->window, button);
|
||||
}
|
||||
static inline void vout_display_SendEventViewpointMoved(vout_display_t *vd,
|
||||
const vlc_viewpoint_t *vp)
|
||||
|
@ -443,12 +443,12 @@ static inline void vout_display_SendEventViewpointMoved(vout_display_t *vd,
|
|||
*/
|
||||
static inline void vout_display_SendMouseMovedDisplayCoordinates(vout_display_t *vd, int m_x, int m_y)
|
||||
{
|
||||
vout_window_ReportMouseMoved(vd->cfg->window, m_x, m_y);
|
||||
vlc_window_ReportMouseMoved(vd->cfg->window, m_x, m_y);
|
||||
}
|
||||
|
||||
static inline bool vout_display_cfg_IsWindowed(const vout_display_cfg_t *cfg)
|
||||
{
|
||||
return cfg->window->type != VOUT_WINDOW_TYPE_DUMMY;
|
||||
return cfg->window->type != VLC_WINDOW_TYPE_DUMMY;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*****************************************************************************
|
||||
* vlc_vout_window.h: vout_window_t definitions
|
||||
* vlc_vout_window.h: vlc_window definitions
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2008 Rémi Denis-Courmont
|
||||
* Copyright (C) 2009 Laurent Aimar
|
||||
|
@ -33,14 +33,14 @@
|
|||
* Window management
|
||||
*
|
||||
* Window management provides a partial abstraction for windowing systems and
|
||||
* rendering targets (i.e. "windows"). See \ref vout_window_t.
|
||||
* rendering targets (i.e. "windows"). See \ref vlc_window_t.
|
||||
*
|
||||
* @{
|
||||
* \file
|
||||
* Window modules interface
|
||||
*/
|
||||
|
||||
struct vout_window_t;
|
||||
struct vlc_window;
|
||||
struct wl_display;
|
||||
struct wl_surface;
|
||||
|
||||
|
@ -49,47 +49,47 @@ struct wl_surface;
|
|||
*
|
||||
* The window handle type specifies the window system protocol that the
|
||||
* window was created with. It determines which members of the
|
||||
* vout_window_t::handle and vout_window_t::display unions are defined
|
||||
* vlc_window_t::handle and vlc_window_t::display unions are defined
|
||||
* for the given window.
|
||||
*
|
||||
* It also establishes some protocol-dependent semantics such as the exact
|
||||
* interpretation of the window state (\ref vout_window_state)
|
||||
* interpretation of the window state (\ref vlc_window_state)
|
||||
* and the window size.
|
||||
*/
|
||||
enum vout_window_type {
|
||||
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/iOS view */,
|
||||
VOUT_WINDOW_TYPE_ANDROID_NATIVE /**< Android native window */,
|
||||
VOUT_WINDOW_TYPE_WAYLAND /**< Wayland surface */,
|
||||
VOUT_WINDOW_TYPE_DCOMP /**< Win32 DirectComposition */,
|
||||
VOUT_WINDOW_TYPE_KMS /**< DRM KMS CRTC */,
|
||||
enum vlc_window_type {
|
||||
VLC_WINDOW_TYPE_DUMMY /**< Dummy window (not an actual window) */,
|
||||
VLC_WINDOW_TYPE_XID /**< X11 window */,
|
||||
VLC_WINDOW_TYPE_HWND /**< Win32 or OS/2 window */,
|
||||
VLC_WINDOW_TYPE_NSOBJECT /**< macOS/iOS view */,
|
||||
VLC_WINDOW_TYPE_ANDROID_NATIVE /**< Android native window */,
|
||||
VLC_WINDOW_TYPE_WAYLAND /**< Wayland surface */,
|
||||
VLC_WINDOW_TYPE_DCOMP /**< Win32 DirectComposition */,
|
||||
VLC_WINDOW_TYPE_KMS /**< DRM KMS CRTC */,
|
||||
};
|
||||
|
||||
/**
|
||||
* Window states.
|
||||
*
|
||||
* Currently, this only handles different window stacking orders.
|
||||
* See also \ref vout_window_SetState().
|
||||
* See also \ref vlc_window_SetState().
|
||||
*/
|
||||
enum vout_window_state {
|
||||
VOUT_WINDOW_STATE_NORMAL /**< Normal stacking */,
|
||||
VOUT_WINDOW_STATE_ABOVE /**< Stacking above (a.k.a. always on top) */,
|
||||
VOUT_WINDOW_STATE_BELOW /**< Stacking below (a.k.a. wall paper mode) */,
|
||||
enum vlc_window_state {
|
||||
VLC_WINDOW_STATE_NORMAL /**< Normal stacking */,
|
||||
VLC_WINDOW_STATE_ABOVE /**< Stacking above (a.k.a. always on top) */,
|
||||
VLC_WINDOW_STATE_BELOW /**< Stacking below (a.k.a. wall paper mode) */,
|
||||
};
|
||||
|
||||
/**
|
||||
* Window mouse event types.
|
||||
*
|
||||
* This enumeration defines the possible event types
|
||||
* vout_window_mouse_event_t::type.
|
||||
* vlc_window_mouse_event_t::type.
|
||||
*/
|
||||
enum vout_window_mouse_event_type {
|
||||
VOUT_WINDOW_MOUSE_MOVED /**< Pointer position change */,
|
||||
VOUT_WINDOW_MOUSE_PRESSED /**< Pointer button press or single click */,
|
||||
VOUT_WINDOW_MOUSE_RELEASED /**< Pointer button release */,
|
||||
VOUT_WINDOW_MOUSE_DOUBLE_CLICK /**< Double click */,
|
||||
enum vlc_window_mouse_event_type {
|
||||
VLC_WINDOW_MOUSE_MOVED /**< Pointer position change */,
|
||||
VLC_WINDOW_MOUSE_PRESSED /**< Pointer button press or single click */,
|
||||
VLC_WINDOW_MOUSE_RELEASED /**< Pointer button release */,
|
||||
VLC_WINDOW_MOUSE_DOUBLE_CLICK /**< Double click */,
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -97,9 +97,9 @@ enum vout_window_mouse_event_type {
|
|||
*
|
||||
* This structure describes a pointer input event on a window.
|
||||
*/
|
||||
typedef struct vout_window_mouse_event_t
|
||||
typedef struct vlc_window_mouse_event
|
||||
{
|
||||
enum vout_window_mouse_event_type type; /**< Event type. */
|
||||
enum vlc_window_mouse_event_type type; /**< Event type. */
|
||||
|
||||
/**
|
||||
* Pointer abscissa.
|
||||
|
@ -111,7 +111,7 @@ typedef struct vout_window_mouse_event_t
|
|||
* A negative abscissa refers to pixels to the left of the window, and
|
||||
* an abscissa of width or larger refers to pixels to the right.
|
||||
*
|
||||
* This is only set if @c event equals \ref VOUT_WINDOW_MOUSE_MOVED.
|
||||
* This is only set if @c event equals \ref VLC_WINDOW_MOUSE_MOVED.
|
||||
*/
|
||||
int x;
|
||||
|
||||
|
@ -125,7 +125,7 @@ typedef struct vout_window_mouse_event_t
|
|||
* A negative ordinate refers to pixels above the window, and
|
||||
* an ordinate of height or larger refers to pixels below the window.
|
||||
*
|
||||
* This is only set if @c event equals \ref VOUT_WINDOW_MOUSE_MOVED.
|
||||
* This is only set if @c event equals \ref VLC_WINDOW_MOUSE_MOVED.
|
||||
*/
|
||||
int y;
|
||||
|
||||
|
@ -134,18 +134,18 @@ typedef struct vout_window_mouse_event_t
|
|||
*
|
||||
* See \ref vlc_mouse_button for possible values.
|
||||
*
|
||||
* This is set if @c event does not equal \ref VOUT_WINDOW_MOUSE_MOVED.
|
||||
* This is set if @c event does not equal \ref VLC_WINDOW_MOUSE_MOVED.
|
||||
*/
|
||||
int button_mask;
|
||||
} vout_window_mouse_event_t;
|
||||
} vlc_window_mouse_event_t;
|
||||
|
||||
/**
|
||||
* Window (desired) configuration.
|
||||
*
|
||||
* This structure describes the intended initial configuration
|
||||
* of a \ref vout_window_t.
|
||||
* of a \ref vlc_window_t.
|
||||
*/
|
||||
typedef struct vout_window_cfg_t {
|
||||
typedef struct vlc_window_cfg {
|
||||
/**
|
||||
* Whether the window should be in full screen mode or not.
|
||||
*/
|
||||
|
@ -172,34 +172,34 @@ typedef struct vout_window_cfg_t {
|
|||
*/
|
||||
unsigned height;
|
||||
|
||||
} vout_window_cfg_t;
|
||||
} vlc_window_cfg_t;
|
||||
|
||||
/**
|
||||
* Callback prototype for window event acknowledgement.
|
||||
*
|
||||
* @param width pixel width as supplied to vout_window_callbacks::resized
|
||||
* @param height pixel height as supplied to vout_window_callbacks::resized
|
||||
* @param data opaque pointer as supplied to vout_window_callbacks::resized
|
||||
* @param width pixel width as supplied to vlc_window_callbacks::resized
|
||||
* @param height pixel height as supplied to vlc_window_callbacks::resized
|
||||
* @param data opaque pointer as supplied to vlc_window_callbacks::resized
|
||||
*/
|
||||
typedef void (*vout_window_ack_cb)(struct vout_window_t *, unsigned width,
|
||||
typedef void (*vlc_window_ack_cb)(struct vlc_window *, unsigned width,
|
||||
unsigned height, void *data);
|
||||
|
||||
/**
|
||||
* Window event callbacks structure.
|
||||
*
|
||||
* This structure provided to vout_window_New() conveys callbacks to handle
|
||||
* This structure provided to vlc_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 (successfully) being created by vout_window_New()
|
||||
* until the time that the window has been deleted by vout_window_Delete().
|
||||
* the time that the window is (successfully) being created by vlc_window_New()
|
||||
* until the time that the window has been deleted by vlc_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.
|
||||
*/
|
||||
struct vout_window_callbacks {
|
||||
struct vlc_window_callbacks {
|
||||
/**
|
||||
* Callback for window size changes.
|
||||
*
|
||||
|
@ -221,8 +221,8 @@ struct vout_window_callbacks {
|
|||
* \param cb optional acknowledgement callback function (NULL to ignore)
|
||||
* \param opaque opaque data pointer for the acknowledgement callback
|
||||
*/
|
||||
void (*resized)(struct vout_window_t *, unsigned width, unsigned height,
|
||||
vout_window_ack_cb cb, void *opaque);
|
||||
void (*resized)(struct vlc_window *, unsigned width, unsigned height,
|
||||
vlc_window_ack_cb cb, void *opaque);
|
||||
|
||||
/**
|
||||
* Callback for window closing.
|
||||
|
@ -231,25 +231,25 @@ struct vout_window_callbacks {
|
|||
* to close the window. Not all windowing systems support this.
|
||||
*
|
||||
* Soon after this callback, the window should be disabled with
|
||||
* vout_window_Disable().
|
||||
* vlc_window_Disable().
|
||||
*
|
||||
* \warning Do not disable the window within the callback.
|
||||
* That could lead to a dead lock.
|
||||
*/
|
||||
void (*closed)(struct vout_window_t *);
|
||||
void (*closed)(struct vlc_window *);
|
||||
|
||||
/**
|
||||
* 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
|
||||
* as changed, either as a consequence of vlc_window_SetSate() or external
|
||||
* events.
|
||||
*
|
||||
* \bug Many window back-ends fail to invoke this callback when due.
|
||||
*
|
||||
* \param state new window state (see \ref vout_window_state).
|
||||
* \param state new window state (see \ref vlc_window_state).
|
||||
*/
|
||||
void (*state_changed)(struct vout_window_t *, unsigned state);
|
||||
void (*state_changed)(struct vlc_window *, unsigned state);
|
||||
|
||||
/**
|
||||
* Callback for windowed mode.
|
||||
|
@ -259,7 +259,7 @@ struct vout_window_callbacks {
|
|||
*
|
||||
* \bug Many window back-ends fail to invoke this callback when due.
|
||||
*/
|
||||
void (*windowed)(struct vout_window_t *);
|
||||
void (*windowed)(struct vlc_window *);
|
||||
|
||||
/**
|
||||
* Callback for fullscreen mode.
|
||||
|
@ -272,18 +272,18 @@ struct vout_window_callbacks {
|
|||
*
|
||||
* \param id fullscreen output identifier (NULL if unspecified)
|
||||
*/
|
||||
void (*fullscreened)(struct vout_window_t *, const char *id);
|
||||
void (*fullscreened)(struct vlc_window *, const char *id);
|
||||
|
||||
/**
|
||||
* Callback for pointer input events.
|
||||
*
|
||||
* This callback function (if non-NULL) is invoked upon any pointer input
|
||||
* event on the window. See \ref vout_window_mouse_event_t.
|
||||
* event on the window. See \ref vlc_window_mouse_event_t.
|
||||
*
|
||||
* \param mouse pointer to the input event.
|
||||
*/
|
||||
void (*mouse_event)(struct vout_window_t *,
|
||||
const vout_window_mouse_event_t *mouse);
|
||||
void (*mouse_event)(struct vlc_window *,
|
||||
const vlc_window_mouse_event_t *mouse);
|
||||
|
||||
/**
|
||||
* Callback for keyboard input events.
|
||||
|
@ -295,7 +295,7 @@ struct vout_window_callbacks {
|
|||
*
|
||||
* \param key VLC key code
|
||||
*/
|
||||
void (*keyboard_event)(struct vout_window_t *, unsigned key);
|
||||
void (*keyboard_event)(struct vlc_window *, unsigned key);
|
||||
|
||||
/**
|
||||
* Callback for fullscreen output enumeration.
|
||||
|
@ -309,37 +309,37 @@ struct vout_window_callbacks {
|
|||
* \param desc nul-terminated human-readable description,
|
||||
* or NULL if the output has become unavailable
|
||||
*/
|
||||
void (*output_event)(struct vout_window_t *,
|
||||
void (*output_event)(struct vlc_window *,
|
||||
const char *id, const char *desc);
|
||||
};
|
||||
|
||||
/**
|
||||
* Window callbacks and opaque data.
|
||||
*/
|
||||
typedef struct vout_window_owner {
|
||||
const struct vout_window_callbacks *cbs; /**< Callbacks */
|
||||
typedef struct vlc_window_owner {
|
||||
const struct vlc_window_callbacks *cbs; /**< Callbacks */
|
||||
void *sys; /**< Opaque data / private pointer for callbacks */
|
||||
} vout_window_owner_t;
|
||||
} vlc_window_owner_t;
|
||||
|
||||
/**
|
||||
* Window implementation callbacks.
|
||||
*/
|
||||
struct vout_window_operations {
|
||||
int (*enable)(struct vout_window_t *, const vout_window_cfg_t *);
|
||||
void (*disable)(struct vout_window_t *);
|
||||
void (*resize)(struct vout_window_t *, unsigned width, unsigned height);
|
||||
struct vlc_window_operations {
|
||||
int (*enable)(struct vlc_window *, const vlc_window_cfg_t *);
|
||||
void (*disable)(struct vlc_window *);
|
||||
void (*resize)(struct vlc_window *, unsigned width, unsigned height);
|
||||
|
||||
/**
|
||||
* Destroy the window.
|
||||
*
|
||||
* Destroys the window and releases all associated resources.
|
||||
*/
|
||||
void (*destroy)(struct vout_window_t *);
|
||||
void (*destroy)(struct vlc_window *);
|
||||
|
||||
void (*set_state)(struct vout_window_t *, unsigned state);
|
||||
void (*unset_fullscreen)(struct vout_window_t *);
|
||||
void (*set_fullscreen)(struct vout_window_t *, const char *id);
|
||||
void (*set_title)(struct vout_window_t *, const char *id);
|
||||
void (*set_state)(struct vlc_window *, unsigned state);
|
||||
void (*unset_fullscreen)(struct vlc_window *);
|
||||
void (*set_fullscreen)(struct vlc_window *, const char *id);
|
||||
void (*set_title)(struct vlc_window *, const char *id);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -355,7 +355,7 @@ struct vout_window_operations {
|
|||
*
|
||||
* Finally, it must support some control requests such as for fullscreen mode.
|
||||
*/
|
||||
typedef struct vout_window_t {
|
||||
typedef struct vlc_window {
|
||||
struct vlc_object_t obj;
|
||||
|
||||
/**
|
||||
|
@ -365,14 +365,14 @@ typedef struct vout_window_t {
|
|||
* needs to use. This also selects which member of the \ref handle union
|
||||
* and the \ref display union are to be set.
|
||||
*
|
||||
* The possible values are defined in \ref vout_window_type.
|
||||
* The possible values are defined in \ref vlc_window_type.
|
||||
*/
|
||||
unsigned type;
|
||||
|
||||
/**
|
||||
* Window handle (mandatory)
|
||||
*
|
||||
* This must be filled by the plugin upon successful vout_window_Enable().
|
||||
* This must be filled by the plugin upon successful vlc_window_Enable().
|
||||
*
|
||||
* Depending on the \ref type above, a different member of this union is
|
||||
* used.
|
||||
|
@ -402,7 +402,7 @@ typedef struct vout_window_t {
|
|||
int drm_fd; /**< KMS DRM device */
|
||||
} display;
|
||||
|
||||
const struct vout_window_operations *ops; /**< operations handled by the
|
||||
const struct vlc_window_operations *ops; /**< operations handled by the
|
||||
window. Once this is set it MUST NOT be changed */
|
||||
|
||||
struct {
|
||||
|
@ -410,14 +410,14 @@ typedef struct vout_window_t {
|
|||
or need to be emulated */
|
||||
} info;
|
||||
|
||||
/* Private place holder for the vout_window_t module (optional)
|
||||
/* Private place holder for the vlc_window_t module (optional)
|
||||
*
|
||||
* A module is free to use it as it wishes.
|
||||
*/
|
||||
void *sys;
|
||||
|
||||
vout_window_owner_t owner;
|
||||
} vout_window_t;
|
||||
vlc_window_owner_t owner;
|
||||
} vlc_window_t;
|
||||
|
||||
/**
|
||||
* Creates a new window.
|
||||
|
@ -431,19 +431,19 @@ typedef struct vout_window_t {
|
|||
* \param cfg initial window configuration, NULL for defaults
|
||||
* \return a new window, or NULL on error.
|
||||
*/
|
||||
VLC_API vout_window_t *vout_window_New(vlc_object_t *obj,
|
||||
VLC_API vlc_window_t *vlc_window_New(vlc_object_t *obj,
|
||||
const char *module,
|
||||
const vout_window_owner_t *owner,
|
||||
const vout_window_cfg_t *cfg);
|
||||
const vlc_window_owner_t *owner,
|
||||
const vlc_window_cfg_t *cfg);
|
||||
|
||||
/**
|
||||
* Deletes a window.
|
||||
*
|
||||
* This deletes a window created by vout_window_New().
|
||||
* This deletes a window created by vlc_window_New().
|
||||
*
|
||||
* \param window window object to delete
|
||||
*/
|
||||
VLC_API void vout_window_Delete(vout_window_t *window);
|
||||
VLC_API void vlc_window_Delete(vlc_window_t *window);
|
||||
|
||||
/**
|
||||
* Inhibits or deinhibits the screensaver.
|
||||
|
@ -452,18 +452,18 @@ VLC_API void vout_window_Delete(vout_window_t *window);
|
|||
* or deinhibited
|
||||
* \param enabled true to inhibit, false to deinhibit
|
||||
*/
|
||||
void vout_window_SetInhibition(vout_window_t *window, bool enabled);
|
||||
void vlc_window_SetInhibition(vlc_window_t *window, bool enabled);
|
||||
|
||||
/**
|
||||
* Requests a new window state.
|
||||
*
|
||||
* This requests a change of the state of a window from the windowing system.
|
||||
* See \ref vout_window_state for possible states.
|
||||
* See \ref vlc_window_state for possible states.
|
||||
*
|
||||
* @param window window whose state to change
|
||||
* @param state requested state
|
||||
*/
|
||||
static inline void vout_window_SetState(vout_window_t *window, unsigned state)
|
||||
static inline void vlc_window_SetState(vlc_window_t *window, unsigned state)
|
||||
{
|
||||
if (window->ops->set_state != NULL)
|
||||
window->ops->set_state(window, state);
|
||||
|
@ -478,8 +478,8 @@ static inline void vout_window_SetState(vout_window_t *window, unsigned state)
|
|||
*
|
||||
* There is no return value as the request may be processed asynchronously,
|
||||
* ignored and/or modified by the window system. The actual size of the window
|
||||
* is determined by the vout_window_callbacks::resized callback function that
|
||||
* was supplied to vout_window_New().
|
||||
* is determined by the vlc_window_callbacks::resized callback function that
|
||||
* was supplied to vlc_window_New().
|
||||
*
|
||||
* \note The size is expressed in terms of the "useful" area,
|
||||
* i.e. it excludes any side decoration added by the windowing system.
|
||||
|
@ -488,7 +488,7 @@ static inline void vout_window_SetState(vout_window_t *window, unsigned state)
|
|||
* \param width pixel width
|
||||
* \param height height width
|
||||
*/
|
||||
VLC_API void vout_window_SetSize(vout_window_t *window,
|
||||
VLC_API void vlc_window_SetSize(vlc_window_t *window,
|
||||
unsigned width, unsigned height);
|
||||
|
||||
/**
|
||||
|
@ -497,14 +497,14 @@ VLC_API void vout_window_SetSize(vout_window_t *window,
|
|||
* \param window window to be brought to fullscreen mode.
|
||||
* \param id nul-terminated output identifier, NULL for default
|
||||
*/
|
||||
VLC_API void vout_window_SetFullScreen(vout_window_t *window, const char *id);
|
||||
VLC_API void vlc_window_SetFullScreen(vlc_window_t *window, const char *id);
|
||||
|
||||
/**
|
||||
* Requests windowed mode.
|
||||
*
|
||||
* \param window window to be brought into windowed mode.
|
||||
*/
|
||||
VLC_API void vout_window_UnsetFullScreen(vout_window_t *window);
|
||||
VLC_API void vlc_window_UnsetFullScreen(vlc_window_t *window);
|
||||
|
||||
/**
|
||||
* Request a new window title.
|
||||
|
@ -512,7 +512,7 @@ VLC_API void vout_window_UnsetFullScreen(vout_window_t *window);
|
|||
* \param window window to change the title.
|
||||
* \param title window title to use.
|
||||
*/
|
||||
static inline void vout_window_SetTitle(vout_window_t *window, const char *title)
|
||||
static inline void vlc_window_SetTitle(vlc_window_t *window, const char *title)
|
||||
{
|
||||
if (window->ops->set_title != NULL)
|
||||
window->ops->set_title(window, title);
|
||||
|
@ -526,14 +526,14 @@ static inline void vout_window_SetTitle(vout_window_t *window, const char *title
|
|||
* window provider can provide a persistent connection to the display server,
|
||||
* and track any useful events, such as monitors hotplug.
|
||||
*
|
||||
* The window handle (vout_window_t.handle) must remain valid and constant
|
||||
* The window handle (vlc_window_t.handle) must remain valid and constant
|
||||
* while the window is enabled.
|
||||
*
|
||||
* \param window window to enable
|
||||
* \param cfg initial configuration for the window
|
||||
*/
|
||||
VLC_API
|
||||
int vout_window_Enable(vout_window_t *window);
|
||||
int vlc_window_Enable(vlc_window_t *window);
|
||||
|
||||
/**
|
||||
* Disables a window.
|
||||
|
@ -541,12 +541,12 @@ int vout_window_Enable(vout_window_t *window);
|
|||
* This informs the window provider that the window is no longer needed.
|
||||
*
|
||||
* \note
|
||||
* The window may be re-enabled later by a call to vout_window_Enable().
|
||||
* The window may be re-enabled later by a call to vlc_window_Enable().
|
||||
*
|
||||
* \param window window to disable
|
||||
*/
|
||||
VLC_API
|
||||
void vout_window_Disable(vout_window_t *window);
|
||||
void vlc_window_Disable(vlc_window_t *window);
|
||||
|
||||
/**
|
||||
* \defgroup video_window_reporting Window event reporting
|
||||
|
@ -576,7 +576,7 @@ void vout_window_Disable(vout_window_t *window);
|
|||
* \param width width of the usable window area in pixels
|
||||
* \param height height of the usable window area in pixels
|
||||
*/
|
||||
static inline void vout_window_ReportSize(vout_window_t *window,
|
||||
static inline void vlc_window_ReportSize(vlc_window_t *window,
|
||||
unsigned width, unsigned height)
|
||||
{
|
||||
window->owner.cbs->resized(window, width, height, NULL, NULL);
|
||||
|
@ -590,7 +590,7 @@ static inline void vout_window_ReportSize(vout_window_t *window,
|
|||
*
|
||||
* \param window window implementation that reports the event
|
||||
*/
|
||||
static inline void vout_window_ReportClose(vout_window_t *window)
|
||||
static inline void vlc_window_ReportClose(vlc_window_t *window)
|
||||
{
|
||||
if (window->owner.cbs->closed != NULL)
|
||||
window->owner.cbs->closed(window);
|
||||
|
@ -603,9 +603,9 @@ static inline void vout_window_ReportClose(vout_window_t *window)
|
|||
* the window that the state of the window changed.
|
||||
*
|
||||
* \param window the window reporting the state change
|
||||
* \param state \see vout_window_state
|
||||
* \param state \see vlc_window_state
|
||||
*/
|
||||
static inline void vout_window_ReportState(vout_window_t *window,
|
||||
static inline void vlc_window_ReportState(vlc_window_t *window,
|
||||
unsigned state)
|
||||
{
|
||||
if (window->owner.cbs->state_changed != NULL)
|
||||
|
@ -620,7 +620,7 @@ static inline void vout_window_ReportState(vout_window_t *window,
|
|||
*
|
||||
* \param wnd window implementation that reports the event
|
||||
*/
|
||||
VLC_API void vout_window_ReportWindowed(vout_window_t *wnd);
|
||||
VLC_API void vlc_window_ReportWindowed(vlc_window_t *wnd);
|
||||
|
||||
/**
|
||||
* Reports that the window is in full screen.
|
||||
|
@ -628,10 +628,10 @@ VLC_API void vout_window_ReportWindowed(vout_window_t *wnd);
|
|||
* \param wnd the window reporting the fullscreen state
|
||||
* \param id fullscreen output nul-terminated identifier, NULL for default
|
||||
*/
|
||||
VLC_API void vout_window_ReportFullscreen(vout_window_t *wnd, const char *id);
|
||||
VLC_API void vlc_window_ReportFullscreen(vlc_window_t *wnd, const char *id);
|
||||
|
||||
static inline void vout_window_SendMouseEvent(vout_window_t *window,
|
||||
const vout_window_mouse_event_t *mouse)
|
||||
static inline void vlc_window_SendMouseEvent(vlc_window_t *window,
|
||||
const vlc_window_mouse_event_t *mouse)
|
||||
{
|
||||
if (window->owner.cbs->mouse_event != NULL)
|
||||
window->owner.cbs->mouse_event(window, mouse);
|
||||
|
@ -641,19 +641,19 @@ static inline void vout_window_SendMouseEvent(vout_window_t *window,
|
|||
* Reports a pointer movement.
|
||||
*
|
||||
* The mouse position must be expressed in window pixel units.
|
||||
* See also \ref vout_window_mouse_event_t.
|
||||
* See also \ref vlc_window_mouse_event_t.
|
||||
*
|
||||
* \param window window in focus
|
||||
* \param x abscissa
|
||||
* \param y ordinate
|
||||
*/
|
||||
static inline void vout_window_ReportMouseMoved(vout_window_t *window,
|
||||
static inline void vlc_window_ReportMouseMoved(vlc_window_t *window,
|
||||
int x, int y)
|
||||
{
|
||||
const vout_window_mouse_event_t mouse = {
|
||||
VOUT_WINDOW_MOUSE_MOVED, x, y, 0
|
||||
const vlc_window_mouse_event_t mouse = {
|
||||
VLC_WINDOW_MOUSE_MOVED, x, y, 0
|
||||
};
|
||||
vout_window_SendMouseEvent(window, &mouse);
|
||||
vlc_window_SendMouseEvent(window, &mouse);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -662,13 +662,13 @@ static inline void vout_window_ReportMouseMoved(vout_window_t *window,
|
|||
* \param window window in focus
|
||||
* \param button pressed button (see \ref vlc_mouse_button)
|
||||
*/
|
||||
static inline void vout_window_ReportMousePressed(vout_window_t *window,
|
||||
static inline void vlc_window_ReportMousePressed(vlc_window_t *window,
|
||||
int button)
|
||||
{
|
||||
const vout_window_mouse_event_t mouse = {
|
||||
VOUT_WINDOW_MOUSE_PRESSED, 0, 0, button,
|
||||
const vlc_window_mouse_event_t mouse = {
|
||||
VLC_WINDOW_MOUSE_PRESSED, 0, 0, button,
|
||||
};
|
||||
vout_window_SendMouseEvent(window, &mouse);
|
||||
vlc_window_SendMouseEvent(window, &mouse);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -677,13 +677,13 @@ static inline void vout_window_ReportMousePressed(vout_window_t *window,
|
|||
* \param window window in focus
|
||||
* \param button released button (see \ref vlc_mouse_button)
|
||||
*/
|
||||
static inline void vout_window_ReportMouseReleased(vout_window_t *window,
|
||||
static inline void vlc_window_ReportMouseReleased(vlc_window_t *window,
|
||||
int button)
|
||||
{
|
||||
const vout_window_mouse_event_t mouse = {
|
||||
VOUT_WINDOW_MOUSE_RELEASED, 0, 0, button,
|
||||
const vlc_window_mouse_event_t mouse = {
|
||||
VLC_WINDOW_MOUSE_RELEASED, 0, 0, button,
|
||||
};
|
||||
vout_window_SendMouseEvent(window, &mouse);
|
||||
vlc_window_SendMouseEvent(window, &mouse);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -692,13 +692,13 @@ static inline void vout_window_ReportMouseReleased(vout_window_t *window,
|
|||
* \param window window in focus
|
||||
* \param button double-clicked button (see \ref vlc_mouse_button)
|
||||
*/
|
||||
static inline void vout_window_ReportMouseDoubleClick(vout_window_t *window,
|
||||
static inline void vlc_window_ReportMouseDoubleClick(vlc_window_t *window,
|
||||
int button)
|
||||
{
|
||||
const vout_window_mouse_event_t mouse = {
|
||||
VOUT_WINDOW_MOUSE_DOUBLE_CLICK, 0, 0, button,
|
||||
const vlc_window_mouse_event_t mouse = {
|
||||
VLC_WINDOW_MOUSE_DOUBLE_CLICK, 0, 0, button,
|
||||
};
|
||||
vout_window_SendMouseEvent(window, &mouse);
|
||||
vlc_window_SendMouseEvent(window, &mouse);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -707,7 +707,7 @@ static inline void vout_window_ReportMouseDoubleClick(vout_window_t *window,
|
|||
* \param window window in focus
|
||||
* \param key VLC key code
|
||||
*/
|
||||
static inline void vout_window_ReportKeyPress(vout_window_t *window, int key)
|
||||
static inline void vlc_window_ReportKeyPress(vlc_window_t *window, int key)
|
||||
{
|
||||
if (window->owner.cbs->keyboard_event != NULL)
|
||||
window->owner.cbs->keyboard_event(window, key);
|
||||
|
@ -727,7 +727,7 @@ static inline void vout_window_ReportKeyPress(vout_window_t *window, int key)
|
|||
* \param id unique nul-terminated identifier for the output
|
||||
* \param name human-readable name
|
||||
*/
|
||||
static inline void vout_window_ReportOutputDevice(vout_window_t *window,
|
||||
static inline void vlc_window_ReportOutputDevice(vlc_window_t *window,
|
||||
const char *id,
|
||||
const char *name)
|
||||
{
|
||||
|
|
|
@ -2250,7 +2250,7 @@ end:
|
|||
}
|
||||
|
||||
static int
|
||||
OpenDecDevice(vlc_decoder_device *device, vout_window_t *window)
|
||||
OpenDecDevice(vlc_decoder_device *device, vlc_window_t *window)
|
||||
{
|
||||
VLC_UNUSED(window);
|
||||
static const struct vlc_decoder_device_operations ops =
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
int OpenIntf (vlc_object_t *);
|
||||
void CloseIntf (vlc_object_t *);
|
||||
|
||||
int WindowOpen (vout_window_t *);
|
||||
int WindowOpen (vlc_window_t *);
|
||||
|
||||
/*****************************************************************************
|
||||
* Module descriptor
|
||||
|
|
|
@ -36,11 +36,11 @@ extern NSString *VLCWindowLevelKey;
|
|||
|
||||
@property (readonly, nonatomic) NSInteger currentStatusWindowLevel;
|
||||
|
||||
- (VLCVoutView *)setupVoutForWindow:(vout_window_t *)p_wnd withProposedVideoViewPosition:(NSRect)videoViewPosition;
|
||||
- (VLCVoutView *)setupVoutForWindow:(vlc_window_t *)p_wnd withProposedVideoViewPosition:(NSRect)videoViewPosition;
|
||||
- (void)removeVoutForDisplay:(NSValue *)o_key;
|
||||
- (void)setNativeVideoSize:(NSSize)size forWindow:(vout_window_t *)p_wnd;
|
||||
- (void)setWindowLevel:(NSInteger)i_level forWindow:(vout_window_t *)p_wnd;
|
||||
- (void)setFullscreen:(int)i_full forWindow:(vout_window_t *)p_wnd withAnimation:(BOOL)b_animation;
|
||||
- (void)setNativeVideoSize:(NSSize)size forWindow:(vlc_window_t *)p_wnd;
|
||||
- (void)setWindowLevel:(NSInteger)i_level forWindow:(vlc_window_t *)p_wnd;
|
||||
- (void)setFullscreen:(int)i_full forWindow:(vlc_window_t *)p_wnd withAnimation:(BOOL)b_animation;
|
||||
|
||||
- (void)updateControlsBarsUsingBlock:(void (^)(VLCControlsBarCommon *controlsBar))block;
|
||||
- (void)updateWindowsUsingBlock:(void (^)(VLCVideoWindowCommon *o_window))windowUpdater;
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
NSString *VLCWindowShouldUpdateLevel = @"VLCWindowShouldUpdateLevel";
|
||||
NSString *VLCWindowLevelKey = @"VLCWindowLevelKey";
|
||||
|
||||
static int WindowEnable(vout_window_t *p_wnd, const vout_window_cfg_t *cfg)
|
||||
static int WindowEnable(vlc_window_t *p_wnd, const vlc_window_cfg_t *cfg)
|
||||
{
|
||||
@autoreleasepool {
|
||||
msg_Dbg(p_wnd, "Opening video window");
|
||||
|
@ -70,11 +70,11 @@ static int WindowEnable(vout_window_t *p_wnd, const vout_window_cfg_t *cfg)
|
|||
p_wnd->handle.nsobject = (void *)CFBridgingRetain(videoView);
|
||||
}
|
||||
if (cfg->is_fullscreen)
|
||||
vout_window_SetFullScreen(p_wnd, NULL);
|
||||
vlc_window_SetFullScreen(p_wnd, NULL);
|
||||
return VLC_SUCCESS;
|
||||
}
|
||||
|
||||
static void WindowDisable(vout_window_t *p_wnd)
|
||||
static void WindowDisable(vlc_window_t *p_wnd)
|
||||
{
|
||||
@autoreleasepool {
|
||||
VLCVideoOutputProvider *voutProvider = [[VLCMain sharedInstance] voutProvider];
|
||||
|
@ -85,7 +85,7 @@ static void WindowDisable(vout_window_t *p_wnd)
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowResize(vout_window_t *p_wnd,
|
||||
static void WindowResize(vlc_window_t *p_wnd,
|
||||
unsigned i_width, unsigned i_height)
|
||||
{
|
||||
@autoreleasepool {
|
||||
|
@ -98,17 +98,17 @@ static void WindowResize(vout_window_t *p_wnd,
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowSetState(vout_window_t *p_wnd, unsigned i_state)
|
||||
static void WindowSetState(vlc_window_t *p_wnd, unsigned i_state)
|
||||
{
|
||||
if (i_state & VOUT_WINDOW_STATE_BELOW)
|
||||
msg_Dbg(p_wnd, "Ignore change to VOUT_WINDOW_STATE_BELOW");
|
||||
if (i_state & VLC_WINDOW_STATE_BELOW)
|
||||
msg_Dbg(p_wnd, "Ignore change to VLC_WINDOW_STATE_BELOW");
|
||||
|
||||
@autoreleasepool {
|
||||
VLCVideoOutputProvider *voutProvider = [[VLCMain sharedInstance] voutProvider];
|
||||
|
||||
NSInteger i_cocoa_level = NSNormalWindowLevel;
|
||||
|
||||
if (i_state & VOUT_WINDOW_STATE_ABOVE)
|
||||
if (i_state & VLC_WINDOW_STATE_ABOVE)
|
||||
i_cocoa_level = NSStatusWindowLevel;
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
|
@ -119,7 +119,7 @@ static void WindowSetState(vout_window_t *p_wnd, unsigned i_state)
|
|||
|
||||
static const char windowed;
|
||||
|
||||
static void WindowSetFullscreen(vout_window_t *p_wnd, const char *psz_id)
|
||||
static void WindowSetFullscreen(vlc_window_t *p_wnd, const char *psz_id)
|
||||
{
|
||||
if (var_InheritBool(getIntf(), "video-wallpaper")) {
|
||||
msg_Dbg(p_wnd, "Ignore fullscreen event as video-wallpaper is on");
|
||||
|
@ -140,14 +140,14 @@ static void WindowSetFullscreen(vout_window_t *p_wnd, const char *psz_id)
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowUnsetFullscreen(vout_window_t *wnd)
|
||||
static void WindowUnsetFullscreen(vlc_window_t *wnd)
|
||||
{
|
||||
WindowSetFullscreen(wnd, &windowed);
|
||||
}
|
||||
|
||||
static atomic_bool b_intf_starting = ATOMIC_VAR_INIT(false);
|
||||
|
||||
static const struct vout_window_operations ops = {
|
||||
static const struct vlc_window_operations ops = {
|
||||
WindowEnable,
|
||||
WindowDisable,
|
||||
WindowResize,
|
||||
|
@ -157,14 +157,14 @@ static const struct vout_window_operations ops = {
|
|||
WindowSetFullscreen,
|
||||
};
|
||||
|
||||
int WindowOpen(vout_window_t *p_wnd)
|
||||
int WindowOpen(vlc_window_t *p_wnd)
|
||||
{
|
||||
if (!atomic_load(&b_intf_starting)) {
|
||||
msg_Err(p_wnd, "Cannot create vout as Mac OS X interface was not found");
|
||||
return VLC_EGENERIC;
|
||||
}
|
||||
|
||||
p_wnd->type = VOUT_WINDOW_TYPE_NSOBJECT;
|
||||
p_wnd->type = VLC_WINDOW_TYPE_NSOBJECT;
|
||||
p_wnd->ops = &ops;
|
||||
return VLC_SUCCESS;
|
||||
}
|
||||
|
@ -215,7 +215,7 @@ int WindowOpen(vout_window_t *p_wnd)
|
|||
#pragma mark -
|
||||
#pragma mark Methods for vout provider
|
||||
|
||||
- (VLCVoutView *)setupVoutForWindow:(vout_window_t *)p_wnd withProposedVideoViewPosition:(NSRect)videoViewPosition
|
||||
- (VLCVoutView *)setupVoutForWindow:(vlc_window_t *)p_wnd withProposedVideoViewPosition:(NSRect)videoViewPosition
|
||||
{
|
||||
VLCMain *mainInstance = [VLCMain sharedInstance];
|
||||
_playerController = [[mainInstance playlistController] playerController];
|
||||
|
@ -430,7 +430,7 @@ int WindowOpen(vout_window_t *p_wnd)
|
|||
}
|
||||
|
||||
|
||||
- (void)setNativeVideoSize:(NSSize)size forWindow:(vout_window_t *)p_wnd
|
||||
- (void)setNativeVideoSize:(NSSize)size forWindow:(vlc_window_t *)p_wnd
|
||||
{
|
||||
VLCVideoWindowCommon *o_window = [_voutWindows objectForKey:[NSValue valueWithPointer:p_wnd]];
|
||||
if (!o_window) {
|
||||
|
@ -441,7 +441,7 @@ int WindowOpen(vout_window_t *p_wnd)
|
|||
[o_window setNativeVideoSize:size];
|
||||
}
|
||||
|
||||
- (void)setWindowLevel:(NSInteger)i_level forWindow:(vout_window_t *)p_wnd
|
||||
- (void)setWindowLevel:(NSInteger)i_level forWindow:(vlc_window_t *)p_wnd
|
||||
{
|
||||
VLCVideoWindowCommon *o_window = [_voutWindows objectForKey:[NSValue valueWithPointer:p_wnd]];
|
||||
if (!o_window) {
|
||||
|
@ -467,7 +467,7 @@ int WindowOpen(vout_window_t *p_wnd)
|
|||
[o_window setWindowLevel:i_level];
|
||||
}
|
||||
|
||||
- (void)setFullscreen:(int)i_full forWindow:(vout_window_t *)p_wnd withAnimation:(BOOL)b_animation
|
||||
- (void)setFullscreen:(int)i_full forWindow:(vlc_window_t *)p_wnd withAnimation:(BOOL)b_animation
|
||||
{
|
||||
intf_thread_t *p_intf = getIntf();
|
||||
BOOL b_nativeFullscreenMode = var_InheritBool(getIntf(), "macosx-nativefullscreenmode");
|
||||
|
|
|
@ -356,7 +356,7 @@ NSString *VLCWindowShouldShowController = @"VLCWindowShouldShowController";
|
|||
|
||||
- (void)resizeWindow
|
||||
{
|
||||
// VOUT_WINDOW_SET_SIZE is triggered when exiting fullscreen. This event is ignored here
|
||||
// VLC_WINDOW_SET_SIZE is triggered when exiting fullscreen. This event is ignored here
|
||||
// to avoid interference with the animation.
|
||||
if ([self fullscreen] || _inFullscreenTransition)
|
||||
return;
|
||||
|
|
|
@ -99,7 +99,7 @@ static void Run(intf_thread_t *p_intf)
|
|||
* Vout window management
|
||||
*****************************************************************************/
|
||||
|
||||
static int WindowEnable(vout_window_t *p_wnd, const vout_window_cfg_t *cfg)
|
||||
static int WindowEnable(vlc_window_t *p_wnd, const vlc_window_cfg_t *cfg)
|
||||
{
|
||||
@autoreleasepool {
|
||||
VLCMinimalVoutWindow __block *o_window;
|
||||
|
@ -120,11 +120,11 @@ static int WindowEnable(vout_window_t *p_wnd, const vout_window_cfg_t *cfg)
|
|||
}
|
||||
|
||||
if (cfg->is_fullscreen)
|
||||
vout_window_SetFullScreen(p_wnd, NULL);
|
||||
vlc_window_SetFullScreen(p_wnd, NULL);
|
||||
return VLC_SUCCESS;
|
||||
}
|
||||
|
||||
static void WindowDisable(vout_window_t *p_wnd)
|
||||
static void WindowDisable(vlc_window_t *p_wnd)
|
||||
{
|
||||
@autoreleasepool {
|
||||
NSWindow * o_window = [(__bridge id)p_wnd->handle.nsobject window];
|
||||
|
@ -133,7 +133,7 @@ static void WindowDisable(vout_window_t *p_wnd)
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowResize(vout_window_t *p_wnd,
|
||||
static void WindowResize(vlc_window_t *p_wnd,
|
||||
unsigned i_width, unsigned i_height)
|
||||
{
|
||||
NSWindow* o_window = [(__bridge id)p_wnd->handle.nsobject window];
|
||||
|
@ -148,14 +148,14 @@ static void WindowResize(vout_window_t *p_wnd,
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowSetState(vout_window_t *p_wnd, unsigned state)
|
||||
static void WindowSetState(vlc_window_t *p_wnd, unsigned state)
|
||||
{
|
||||
NSWindow* o_window = [(__bridge id)p_wnd->handle.nsobject window];
|
||||
|
||||
[o_window setLevel:state];
|
||||
}
|
||||
|
||||
static void WindowUnsetFullscreen(vout_window_t *p_wnd)
|
||||
static void WindowUnsetFullscreen(vlc_window_t *p_wnd)
|
||||
{
|
||||
NSWindow* o_window = [(__bridge id)p_wnd->handle.nsobject window];
|
||||
|
||||
|
@ -166,7 +166,7 @@ static void WindowUnsetFullscreen(vout_window_t *p_wnd)
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowSetFullscreen(vout_window_t *p_wnd, const char *psz_id)
|
||||
static void WindowSetFullscreen(vlc_window_t *p_wnd, const char *psz_id)
|
||||
{
|
||||
NSWindow* o_window = [(__bridge id)p_wnd->handle.nsobject window];
|
||||
|
||||
|
@ -177,9 +177,9 @@ static void WindowSetFullscreen(vout_window_t *p_wnd, const char *psz_id)
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowClose(vout_window_t *);
|
||||
static void WindowClose(vlc_window_t *);
|
||||
|
||||
static const struct vout_window_operations ops = {
|
||||
static const struct vlc_window_operations ops = {
|
||||
WindowEnable,
|
||||
WindowDisable,
|
||||
WindowResize,
|
||||
|
@ -190,9 +190,9 @@ static const struct vout_window_operations ops = {
|
|||
NULL,
|
||||
};
|
||||
|
||||
int WindowOpen(vout_window_t *p_wnd)
|
||||
int WindowOpen(vlc_window_t *p_wnd)
|
||||
{
|
||||
p_wnd->type = VOUT_WINDOW_TYPE_NSOBJECT;
|
||||
p_wnd->type = VLC_WINDOW_TYPE_NSOBJECT;
|
||||
p_wnd->ops = &ops;
|
||||
return VLC_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
int OpenIntf ( vlc_object_t * );
|
||||
void CloseIntf ( vlc_object_t * );
|
||||
|
||||
int WindowOpen ( vout_window_t * );
|
||||
int WindowOpen ( vlc_window_t * );
|
||||
|
||||
/*****************************************************************************
|
||||
* Module descriptor
|
||||
|
|
|
@ -107,7 +107,7 @@ Compositor* CompositorFactory::createCompositor()
|
|||
extern "C"
|
||||
{
|
||||
|
||||
static int windowEnableCb(vout_window_t* p_wnd, const vout_window_cfg_t * cfg)
|
||||
static int windowEnableCb(vlc_window_t* p_wnd, const vlc_window_cfg_t * cfg)
|
||||
{
|
||||
assert(p_wnd->sys);
|
||||
auto that = static_cast<vlc::CompositorVideo*>(p_wnd->sys);
|
||||
|
@ -118,7 +118,7 @@ static int windowEnableCb(vout_window_t* p_wnd, const vout_window_cfg_t * cfg)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void windowDisableCb(vout_window_t* p_wnd)
|
||||
static void windowDisableCb(vlc_window_t* p_wnd)
|
||||
{
|
||||
assert(p_wnd->sys);
|
||||
auto that = static_cast<vlc::CompositorVideo*>(p_wnd->sys);
|
||||
|
@ -127,35 +127,35 @@ static void windowDisableCb(vout_window_t* p_wnd)
|
|||
}, Qt::BlockingQueuedConnection);
|
||||
}
|
||||
|
||||
static void windowResizeCb(vout_window_t* p_wnd, unsigned width, unsigned height)
|
||||
static void windowResizeCb(vlc_window_t* p_wnd, unsigned width, unsigned height)
|
||||
{
|
||||
assert(p_wnd->sys);
|
||||
auto that = static_cast<vlc::CompositorVideo*>(p_wnd->sys);
|
||||
that->windowResize(width, height);
|
||||
}
|
||||
|
||||
static void windowDestroyCb(struct vout_window_t * p_wnd)
|
||||
static void windowDestroyCb(struct vlc_window * p_wnd)
|
||||
{
|
||||
assert(p_wnd->sys);
|
||||
auto that = static_cast<vlc::CompositorVideo*>(p_wnd->sys);
|
||||
that->windowDestroy();
|
||||
}
|
||||
|
||||
static void windowSetStateCb(vout_window_t* p_wnd, unsigned state)
|
||||
static void windowSetStateCb(vlc_window_t* p_wnd, unsigned state)
|
||||
{
|
||||
assert(p_wnd->sys);
|
||||
auto that = static_cast<vlc::CompositorVideo*>(p_wnd->sys);
|
||||
that->windowSetState(state);
|
||||
}
|
||||
|
||||
static void windowUnsetFullscreenCb(vout_window_t* p_wnd)
|
||||
static void windowUnsetFullscreenCb(vlc_window_t* p_wnd)
|
||||
{
|
||||
assert(p_wnd->sys);
|
||||
auto that = static_cast<vlc::CompositorVideo*>(p_wnd->sys);
|
||||
that->windowUnsetFullscreen();
|
||||
}
|
||||
|
||||
static void windowSetFullscreenCb(vout_window_t* p_wnd, const char *id)
|
||||
static void windowSetFullscreenCb(vlc_window_t* p_wnd, const char *id)
|
||||
{
|
||||
assert(p_wnd->sys);
|
||||
auto that = static_cast<vlc::CompositorVideo*>(p_wnd->sys);
|
||||
|
@ -175,9 +175,9 @@ CompositorVideo::~CompositorVideo()
|
|||
|
||||
}
|
||||
|
||||
void CompositorVideo::commonSetupVoutWindow(vout_window_t* p_wnd, VoutDestroyCb destroyCb)
|
||||
void CompositorVideo::commonSetupVoutWindow(vlc_window_t* p_wnd, VoutDestroyCb destroyCb)
|
||||
{
|
||||
static const struct vout_window_operations ops = {
|
||||
static const struct vlc_window_operations ops = {
|
||||
windowEnableCb,
|
||||
windowDisableCb,
|
||||
windowResizeCb,
|
||||
|
@ -208,7 +208,7 @@ void CompositorVideo::windowResize(unsigned width, unsigned height)
|
|||
|
||||
void CompositorVideo::windowSetState(unsigned state)
|
||||
{
|
||||
m_videoWindowHandler->requestVideoState(static_cast<vout_window_state>(state));
|
||||
m_videoWindowHandler->requestVideoState(static_cast<vlc_window_state>(state));
|
||||
}
|
||||
|
||||
void CompositorVideo::windowUnsetFullscreen()
|
||||
|
|
|
@ -56,7 +56,7 @@ public:
|
|||
X11Compositor
|
||||
};
|
||||
|
||||
typedef void (*VoutDestroyCb)(vout_window_t *p_wnd);
|
||||
typedef void (*VoutDestroyCb)(vlc_window_t *p_wnd);
|
||||
|
||||
public:
|
||||
virtual ~Compositor() = default;
|
||||
|
@ -68,7 +68,7 @@ public:
|
|||
|
||||
virtual void unloadGUI() = 0;
|
||||
|
||||
virtual bool setupVoutWindow(vout_window_t *p_wnd, VoutDestroyCb destroyCb) = 0;
|
||||
virtual bool setupVoutWindow(vlc_window_t *p_wnd, VoutDestroyCb destroyCb) = 0;
|
||||
|
||||
virtual Type type() const = 0;
|
||||
|
||||
|
@ -105,7 +105,7 @@ public:
|
|||
virtual ~CompositorVideo();
|
||||
|
||||
public:
|
||||
virtual int windowEnable(const vout_window_cfg_t *) = 0;
|
||||
virtual int windowEnable(const vlc_window_cfg_t *) = 0;
|
||||
virtual void windowDisable() = 0;
|
||||
virtual void windowDestroy();
|
||||
virtual void windowResize(unsigned width, unsigned height);
|
||||
|
@ -114,7 +114,7 @@ public:
|
|||
virtual void windowSetFullscreen(const char *id);
|
||||
|
||||
protected:
|
||||
void commonSetupVoutWindow(vout_window_t* p_wnd, VoutDestroyCb destroyCb);
|
||||
void commonSetupVoutWindow(vlc_window_t* p_wnd, VoutDestroyCb destroyCb);
|
||||
void commonWindowEnable();
|
||||
void commonWindowDisable();
|
||||
|
||||
|
@ -133,7 +133,7 @@ protected slots:
|
|||
|
||||
protected:
|
||||
qt_intf_t *m_intf = nullptr;
|
||||
vout_window_t* m_wnd = nullptr;
|
||||
vlc_window_t* m_wnd = nullptr;
|
||||
|
||||
MainCtx* m_mainCtx = nullptr;
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ using namespace Microsoft::WRL;
|
|||
//Signature for DCompositionCreateDevice
|
||||
typedef HRESULT (*DCompositionCreateDeviceFun)(IDXGIDevice *dxgiDevice, REFIID iid, void** dcompositionDevice);
|
||||
|
||||
int CompositorDirectComposition::windowEnable(const vout_window_cfg_t *)
|
||||
int CompositorDirectComposition::windowEnable(const vlc_window_cfg_t *)
|
||||
{
|
||||
if (!m_videoVisual)
|
||||
{
|
||||
|
@ -337,7 +337,7 @@ void CompositorDirectComposition::unloadGUI()
|
|||
commonGUIDestroy();
|
||||
}
|
||||
|
||||
bool CompositorDirectComposition::setupVoutWindow(vout_window_t *p_wnd, VoutDestroyCb destroyCb)
|
||||
bool CompositorDirectComposition::setupVoutWindow(vlc_window_t *p_wnd, VoutDestroyCb destroyCb)
|
||||
{
|
||||
//Only the first video is embedded
|
||||
if (m_videoVisual.Get())
|
||||
|
@ -351,7 +351,7 @@ bool CompositorDirectComposition::setupVoutWindow(vout_window_t *p_wnd, VoutDest
|
|||
}
|
||||
|
||||
commonSetupVoutWindow(p_wnd, destroyCb);
|
||||
p_wnd->type = VOUT_WINDOW_TYPE_DCOMP;
|
||||
p_wnd->type = VLC_WINDOW_TYPE_DCOMP;
|
||||
p_wnd->display.dcomp_device = m_dcompDevice.Get();
|
||||
p_wnd->handle.dcomp_visual = m_videoVisual.Get();
|
||||
return true;
|
||||
|
|
|
@ -50,7 +50,7 @@ public:
|
|||
void destroyMainInterface() override;
|
||||
void unloadGUI() override;
|
||||
|
||||
bool setupVoutWindow(vout_window_t *p_wnd, VoutDestroyCb destroyCb) override;
|
||||
bool setupVoutWindow(vlc_window_t *p_wnd, VoutDestroyCb destroyCb) override;
|
||||
virtual QWindow* interfaceMainWindow() const override;
|
||||
|
||||
Type type() const override;
|
||||
|
@ -65,7 +65,7 @@ private slots:
|
|||
void onSurfaceSizeChanged(const QSizeF& size) override;
|
||||
|
||||
protected:
|
||||
int windowEnable(const vout_window_cfg_t *) override;
|
||||
int windowEnable(const vlc_window_cfg_t *) override;
|
||||
void windowDisable() override;
|
||||
void windowDestroy() override;
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ void CompositorDummy::unloadGUI()
|
|||
m_qmlWidget.reset();
|
||||
}
|
||||
|
||||
bool CompositorDummy::setupVoutWindow(vout_window_t*, VoutDestroyCb)
|
||||
bool CompositorDummy::setupVoutWindow(vlc_window_t*, VoutDestroyCb)
|
||||
{
|
||||
//dummy compositor doesn't handle window integration
|
||||
return false;
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
*/
|
||||
virtual void unloadGUI() override;
|
||||
|
||||
bool setupVoutWindow(vout_window_t *p_wnd, VoutDestroyCb destroyCb) override;
|
||||
bool setupVoutWindow(vlc_window_t *p_wnd, VoutDestroyCb destroyCb) override;
|
||||
|
||||
QWindow* interfaceMainWindow() const override;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
using namespace vlc;
|
||||
|
||||
int CompositorWin7::windowEnable(const vout_window_cfg_t *)
|
||||
int CompositorWin7::windowEnable(const vlc_window_cfg_t *)
|
||||
{
|
||||
commonWindowEnable();
|
||||
return VLC_SUCCESS;
|
||||
|
@ -164,7 +164,7 @@ void CompositorWin7::unloadGUI()
|
|||
commonGUIDestroy();
|
||||
}
|
||||
|
||||
bool CompositorWin7::setupVoutWindow(vout_window_t *p_wnd, VoutDestroyCb destroyCb)
|
||||
bool CompositorWin7::setupVoutWindow(vlc_window_t *p_wnd, VoutDestroyCb destroyCb)
|
||||
{
|
||||
BOOL isCompositionEnabled;
|
||||
HRESULT hr = DwmIsCompositionEnabled(&isCompositionEnabled);
|
||||
|
@ -175,7 +175,7 @@ bool CompositorWin7::setupVoutWindow(vout_window_t *p_wnd, VoutDestroyCb destroy
|
|||
return false;
|
||||
|
||||
commonSetupVoutWindow(p_wnd, destroyCb);
|
||||
p_wnd->type = VOUT_WINDOW_TYPE_HWND;
|
||||
p_wnd->type = VLC_WINDOW_TYPE_HWND;
|
||||
p_wnd->handle.hwnd = (HWND)m_stable->winId();
|
||||
p_wnd->display.x11 = nullptr;
|
||||
return true;
|
||||
|
|
|
@ -53,7 +53,7 @@ public:
|
|||
virtual bool makeMainInterface(MainCtx*) override;
|
||||
virtual void destroyMainInterface() override;
|
||||
virtual void unloadGUI() override;
|
||||
virtual bool setupVoutWindow(vout_window_t*, VoutDestroyCb destroyCb) override;
|
||||
virtual bool setupVoutWindow(vlc_window_t*, VoutDestroyCb destroyCb) override;
|
||||
virtual QWindow* interfaceMainWindow() const override;
|
||||
|
||||
Type type() const override;
|
||||
|
@ -64,7 +64,7 @@ protected:
|
|||
bool eventFilter(QObject *obj, QEvent *ev) override;
|
||||
|
||||
private:
|
||||
int windowEnable(const vout_window_cfg_t *) override;
|
||||
int windowEnable(const vlc_window_cfg_t *) override;
|
||||
void windowDisable() override;
|
||||
|
||||
private slots:
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
using namespace vlc;
|
||||
|
||||
int CompositorX11::windowEnable(const vout_window_cfg_t *)
|
||||
int CompositorX11::windowEnable(const vlc_window_cfg_t *)
|
||||
{
|
||||
commonWindowEnable();
|
||||
m_renderWindow->enableVideoWindow();
|
||||
|
@ -219,9 +219,9 @@ void CompositorX11::onSurfaceSizeChanged(const QSizeF& size)
|
|||
m_renderWindow->setVideoSize((size / m_videoWidget->window()->devicePixelRatioF()).toSize());
|
||||
}
|
||||
|
||||
bool CompositorX11::setupVoutWindow(vout_window_t* p_wnd, VoutDestroyCb destroyCb)
|
||||
bool CompositorX11::setupVoutWindow(vlc_window_t* p_wnd, VoutDestroyCb destroyCb)
|
||||
{
|
||||
p_wnd->type = VOUT_WINDOW_TYPE_XID;
|
||||
p_wnd->type = VLC_WINDOW_TYPE_XID;
|
||||
p_wnd->handle.xid = m_videoWidget->winId();
|
||||
commonSetupVoutWindow(p_wnd, destroyCb);
|
||||
return true;
|
||||
|
|
|
@ -45,7 +45,7 @@ public:
|
|||
void destroyMainInterface() override;
|
||||
void unloadGUI() override;
|
||||
|
||||
bool setupVoutWindow(vout_window_t *p_wnd, VoutDestroyCb destroyCb) override;
|
||||
bool setupVoutWindow(vlc_window_t *p_wnd, VoutDestroyCb destroyCb) override;
|
||||
|
||||
inline Type type() const override { return X11Compositor; };
|
||||
|
||||
|
@ -54,7 +54,7 @@ public:
|
|||
QQuickItem * activeFocusItem() const override;
|
||||
|
||||
private:
|
||||
int windowEnable(const vout_window_cfg_t *) override;
|
||||
int windowEnable(const vlc_window_cfg_t *) override;
|
||||
void windowDisable() override;
|
||||
|
||||
private slots:
|
||||
|
|
|
@ -723,7 +723,7 @@ bool MainCtx::onWindowClose( QWindow* )
|
|||
//We need to make sure that noting is playing anymore otherwise the vout will be closed
|
||||
//after the main interface, and it requires (at least with OpenGL) that the OpenGL context
|
||||
//from the main window is still valid.
|
||||
//vout_window_ReportClose is currently stubbed
|
||||
//vlc_window_ReportClose is currently stubbed
|
||||
if (playerController && playerController->hasVideoOutput()) {
|
||||
connect(playerController, &PlayerController::playingStateChanged, [this](PlayerController::PlayingState state){
|
||||
if (state == PlayerController::PLAYING_STATE_STOPPED) {
|
||||
|
|
|
@ -56,7 +56,7 @@ class QSize;
|
|||
class QScreen;
|
||||
class QTimer;
|
||||
class StandardPLPanel;
|
||||
struct vout_window_t;
|
||||
struct vlc_window;
|
||||
class VideoSurfaceProvider;
|
||||
class ControlbarProfileModel;
|
||||
namespace vlc {
|
||||
|
|
|
@ -74,7 +74,7 @@ void VideoWindowHandler::requestVideoFullScreen(const char * )
|
|||
|
||||
void VideoWindowHandler::requestVideoState( unsigned i_arg )
|
||||
{
|
||||
bool on_top = (i_arg & VOUT_WINDOW_STATE_ABOVE) != 0;
|
||||
bool on_top = (i_arg & VLC_WINDOW_STATE_ABOVE) != 0;
|
||||
emit askVideoOnTop( on_top );
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,7 @@ void VideoWindowHandler::setVideoSize(unsigned int w, unsigned int h)
|
|||
if ((states & (Qt::WindowFullScreen | Qt::WindowMaximized)) == 0)
|
||||
{
|
||||
/* Resize video widget to video size, or keep it at the same
|
||||
* size. Call setSize() either way so that vout_window_ReportSize
|
||||
* size. Call setSize() either way so that vlc_window_ReportSize
|
||||
* will always get called.
|
||||
* If the video size is too large for the screen, resize it
|
||||
* to the screen size.
|
||||
|
|
|
@ -36,7 +36,7 @@ bool VideoSurfaceProvider::hasVideoEmbed() const
|
|||
return m_videoEmbed;
|
||||
}
|
||||
|
||||
void VideoSurfaceProvider::enable(vout_window_t* voutWindow)
|
||||
void VideoSurfaceProvider::enable(vlc_window_t* voutWindow)
|
||||
{
|
||||
assert(voutWindow);
|
||||
{
|
||||
|
@ -66,35 +66,35 @@ void VideoSurfaceProvider::onWindowClosed()
|
|||
{
|
||||
QMutexLocker lock(&m_voutlock);
|
||||
if (m_voutWindow)
|
||||
vout_window_ReportClose(m_voutWindow);
|
||||
vlc_window_ReportClose(m_voutWindow);
|
||||
}
|
||||
|
||||
void VideoSurfaceProvider::onMousePressed(int vlcButton)
|
||||
{
|
||||
QMutexLocker lock(&m_voutlock);
|
||||
if (m_voutWindow)
|
||||
vout_window_ReportMousePressed(m_voutWindow, vlcButton);
|
||||
vlc_window_ReportMousePressed(m_voutWindow, vlcButton);
|
||||
}
|
||||
|
||||
void VideoSurfaceProvider::onMouseReleased(int vlcButton)
|
||||
{
|
||||
QMutexLocker lock(&m_voutlock);
|
||||
if (m_voutWindow)
|
||||
vout_window_ReportMouseReleased(m_voutWindow, vlcButton);
|
||||
vlc_window_ReportMouseReleased(m_voutWindow, vlcButton);
|
||||
}
|
||||
|
||||
void VideoSurfaceProvider::onMouseDoubleClick(int vlcButton)
|
||||
{
|
||||
QMutexLocker lock(&m_voutlock);
|
||||
if (m_voutWindow)
|
||||
vout_window_ReportMouseDoubleClick(m_voutWindow, vlcButton);
|
||||
vlc_window_ReportMouseDoubleClick(m_voutWindow, vlcButton);
|
||||
}
|
||||
|
||||
void VideoSurfaceProvider::onMouseMoved(float x, float y)
|
||||
{
|
||||
QMutexLocker lock(&m_voutlock);
|
||||
if (m_voutWindow)
|
||||
vout_window_ReportMouseMoved(m_voutWindow, x, y);
|
||||
vlc_window_ReportMouseMoved(m_voutWindow, x, y);
|
||||
}
|
||||
|
||||
void VideoSurfaceProvider::onMouseWheeled(const QWheelEvent& event)
|
||||
|
@ -102,7 +102,7 @@ void VideoSurfaceProvider::onMouseWheeled(const QWheelEvent& event)
|
|||
int vlckey = qtWheelEventToVLCKey(event);
|
||||
QMutexLocker lock(&m_voutlock);
|
||||
if (m_voutWindow)
|
||||
vout_window_ReportKeyPress(m_voutWindow, vlckey);
|
||||
vlc_window_ReportKeyPress(m_voutWindow, vlckey);
|
||||
}
|
||||
|
||||
void VideoSurfaceProvider::onKeyPressed(int key, Qt::KeyboardModifiers modifiers)
|
||||
|
@ -111,7 +111,7 @@ void VideoSurfaceProvider::onKeyPressed(int key, Qt::KeyboardModifiers modifiers
|
|||
int vlckey = qtEventToVLCKey(&event);
|
||||
QMutexLocker lock(&m_voutlock);
|
||||
if (m_voutWindow)
|
||||
vout_window_ReportKeyPress(m_voutWindow, vlckey);
|
||||
vlc_window_ReportKeyPress(m_voutWindow, vlckey);
|
||||
|
||||
}
|
||||
|
||||
|
@ -120,7 +120,7 @@ void VideoSurfaceProvider::onSurfaceSizeChanged(QSizeF size)
|
|||
emit surfaceSizeChanged(size);
|
||||
QMutexLocker lock(&m_voutlock);
|
||||
if (m_voutWindow)
|
||||
vout_window_ReportSize(m_voutWindow, size.width(), size.height());
|
||||
vlc_window_ReportSize(m_voutWindow, size.width(), size.height());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ public:
|
|||
VideoSurfaceProvider(QObject* parent = nullptr);
|
||||
virtual ~VideoSurfaceProvider() {}
|
||||
|
||||
void enable(vout_window_t* voutWindow);
|
||||
void enable(vlc_window_t* voutWindow);
|
||||
void disable();
|
||||
bool isEnabled();
|
||||
|
||||
|
@ -57,7 +57,7 @@ public slots:
|
|||
|
||||
protected:
|
||||
QMutex m_voutlock;
|
||||
vout_window_t* m_voutWindow = nullptr;
|
||||
vlc_window_t* m_voutWindow = nullptr;
|
||||
bool m_videoEmbed = false;
|
||||
};
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ static void CloseInternal( qt_intf_t * );
|
|||
static int OpenIntf ( vlc_object_t * );
|
||||
static int OpenDialogs ( vlc_object_t * );
|
||||
static void Close ( vlc_object_t * );
|
||||
static int WindowOpen ( vout_window_t * );
|
||||
static int WindowOpen ( vlc_window_t * );
|
||||
static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * );
|
||||
|
||||
|
||||
|
@ -800,13 +800,13 @@ static void *Thread( void *obj )
|
|||
|
||||
QString platform = app.platformName();
|
||||
if( platform == qfu("xcb") )
|
||||
p_intf->voutWindowType = VOUT_WINDOW_TYPE_XID;
|
||||
p_intf->voutWindowType = VLC_WINDOW_TYPE_XID;
|
||||
else if( platform == qfu("wayland") || platform == qfu("wayland-egl") )
|
||||
p_intf->voutWindowType = VOUT_WINDOW_TYPE_WAYLAND;
|
||||
p_intf->voutWindowType = VLC_WINDOW_TYPE_WAYLAND;
|
||||
else if( platform == qfu("windows") )
|
||||
p_intf->voutWindowType = VOUT_WINDOW_TYPE_HWND;
|
||||
p_intf->voutWindowType = VLC_WINDOW_TYPE_HWND;
|
||||
else if( platform == qfu("cocoa" ) )
|
||||
p_intf->voutWindowType = VOUT_WINDOW_TYPE_NSOBJECT;
|
||||
p_intf->voutWindowType = VLC_WINDOW_TYPE_NSOBJECT;
|
||||
else
|
||||
{
|
||||
msg_Err( p_intf, "unknown Qt platform: %s", qtu(platform) );
|
||||
|
@ -939,7 +939,7 @@ static void ShowDialog( intf_thread_t *p_intf, int i_dialog_event, int i_arg,
|
|||
QApplication::postEvent( THEDP, event );
|
||||
}
|
||||
|
||||
static void WindowCloseCb( vout_window_t * )
|
||||
static void WindowCloseCb( vlc_window_t * )
|
||||
{
|
||||
qt_intf_t *p_intf = nullptr;
|
||||
bool shutdown = false;
|
||||
|
@ -960,7 +960,7 @@ static void WindowCloseCb( vout_window_t * )
|
|||
/**
|
||||
* Video output window provider
|
||||
*/
|
||||
static int WindowOpen( vout_window_t *p_wnd )
|
||||
static int WindowOpen( vlc_window_t *p_wnd )
|
||||
{
|
||||
if( !var_InheritBool( p_wnd, "embedded-video" ) )
|
||||
return VLC_EGENERIC;
|
||||
|
@ -985,8 +985,8 @@ static int WindowOpen( vout_window_t *p_wnd )
|
|||
|
||||
switch( p_intf->voutWindowType )
|
||||
{
|
||||
case VOUT_WINDOW_TYPE_XID:
|
||||
case VOUT_WINDOW_TYPE_HWND:
|
||||
case VLC_WINDOW_TYPE_XID:
|
||||
case VLC_WINDOW_TYPE_HWND:
|
||||
if( var_InheritBool( p_wnd, "video-wallpaper" ) )
|
||||
return VLC_EGENERIC;
|
||||
break;
|
||||
|
|
|
@ -103,7 +103,7 @@ struct qt_intf_t
|
|||
class MainCtx *p_mi; /* Main Interface, NULL if DialogProvider Mode */
|
||||
class QSettings *mainSettings; /* Qt State settings not messing main VLC ones */
|
||||
|
||||
unsigned voutWindowType; /* Type of vout_window_t provided */
|
||||
unsigned voutWindowType; /* Type of vlc_window_t provided */
|
||||
bool b_isDialogProvider; /* Qt mode or Skins mode */
|
||||
|
||||
vlc_playlist_t *p_playlist; /* playlist */
|
||||
|
|
|
@ -43,7 +43,7 @@ void CmdResize::execute()
|
|||
|
||||
|
||||
|
||||
CmdResizeVout::CmdResizeVout( intf_thread_t *pIntf, vout_window_t* pWnd,
|
||||
CmdResizeVout::CmdResizeVout( intf_thread_t *pIntf, vlc_window_t* pWnd,
|
||||
int width, int height )
|
||||
: CmdGeneric( pIntf ), m_pWnd( pWnd ), m_width( width ),
|
||||
m_height( height ) { }
|
||||
|
@ -55,7 +55,7 @@ void CmdResizeVout::execute()
|
|||
}
|
||||
|
||||
CmdSetFullscreen::CmdSetFullscreen( intf_thread_t *pIntf,
|
||||
vout_window_t * pWnd, bool fullscreen )
|
||||
vlc_window_t * pWnd, bool fullscreen )
|
||||
: CmdGeneric( pIntf ), m_pWnd( pWnd ), m_bFullscreen( fullscreen ) { }
|
||||
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
class WindowManager;
|
||||
class GenericLayout;
|
||||
class CtrlVideo;
|
||||
struct vout_window_t;
|
||||
struct vlc_window;
|
||||
|
||||
|
||||
/// Command to resize a layout
|
||||
|
@ -55,14 +55,14 @@ class CmdResizeVout: public CmdGeneric
|
|||
{
|
||||
public:
|
||||
/// Resize the given layout
|
||||
CmdResizeVout( intf_thread_t *pIntf, struct vout_window_t* pWnd,
|
||||
CmdResizeVout( intf_thread_t *pIntf, struct vlc_window *pWnd,
|
||||
int width, int height );
|
||||
virtual ~CmdResizeVout() { }
|
||||
virtual void execute();
|
||||
virtual std::string getType() const { return "resize vout"; }
|
||||
|
||||
private:
|
||||
struct vout_window_t* m_pWnd;
|
||||
struct vlc_window *m_pWnd;
|
||||
int m_width, m_height;
|
||||
};
|
||||
|
||||
|
@ -72,14 +72,14 @@ class CmdSetFullscreen: public CmdGeneric
|
|||
{
|
||||
public:
|
||||
/// Resize the given layout
|
||||
CmdSetFullscreen( intf_thread_t *pIntf, struct vout_window_t* pWnd,
|
||||
CmdSetFullscreen( intf_thread_t *pIntf, struct vlc_window *pWnd,
|
||||
bool fullscreen );
|
||||
virtual ~CmdSetFullscreen() { }
|
||||
virtual void execute();
|
||||
virtual std::string getType() const { return "toggle fullscreen"; }
|
||||
|
||||
private:
|
||||
struct vout_window_t* m_pWnd;
|
||||
struct vlc_window *m_pWnd;
|
||||
bool m_bFullscreen;
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -63,8 +63,8 @@ public:
|
|||
HWND getHandle() const { return m_hWndClient; }
|
||||
|
||||
/// Set the window handler
|
||||
void setOSHandle( vout_window_t *pWnd ) const {
|
||||
pWnd->type = VOUT_WINDOW_TYPE_HWND;
|
||||
void setOSHandle( vlc_window_t *pWnd ) const {
|
||||
pWnd->type = VLC_WINDOW_TYPE_HWND;
|
||||
pWnd->info.has_double_click = true;
|
||||
pWnd->handle.hwnd = ( void * )getHandle();
|
||||
}
|
||||
|
|
|
@ -167,7 +167,7 @@ void GenericWindow::innerHide()
|
|||
}
|
||||
|
||||
|
||||
void GenericWindow::updateWindowConfiguration( vout_window_t * pWnd ) const
|
||||
void GenericWindow::updateWindowConfiguration( struct vlc_window *pWnd ) const
|
||||
{
|
||||
m_pOsWindow->setOSHandle( pWnd );
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ class EvtDragLeave;
|
|||
class EvtDragOver;
|
||||
class EvtDragDrop;
|
||||
class WindowManager;
|
||||
struct vout_window_t;
|
||||
struct vlc_window;
|
||||
|
||||
|
||||
/// Generic window class
|
||||
|
@ -112,7 +112,7 @@ public:
|
|||
virtual std::string getType() const { return "Generic"; }
|
||||
|
||||
/// window handle
|
||||
void updateWindowConfiguration( struct vout_window_t *pWnd ) const;
|
||||
void updateWindowConfiguration( struct vlc_window *pWnd ) const;
|
||||
|
||||
/// window type
|
||||
WindowType_t getType() { return m_type; }
|
||||
|
|
|
@ -56,7 +56,7 @@ public:
|
|||
virtual void toggleOnTop( bool onTop ) const = 0;
|
||||
|
||||
/// getter for handler
|
||||
virtual void setOSHandle( vout_window_t* pWnd ) const = 0;
|
||||
virtual void setOSHandle( struct vlc_window *pWnd ) const = 0;
|
||||
|
||||
/// reparent the window
|
||||
virtual void reparent( OSWindow *window,
|
||||
|
|
|
@ -279,18 +279,18 @@ end:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static int WindowOpen( vout_window_t * );
|
||||
static void WindowClose( vout_window_t * );
|
||||
static int WindowOpen( vlc_window_t * );
|
||||
static void WindowClose( vlc_window_t * );
|
||||
|
||||
typedef struct
|
||||
{
|
||||
intf_thread_t* pIntf;
|
||||
vout_window_cfg_t cfg;
|
||||
vlc_window_cfg_t cfg;
|
||||
} vout_window_skins_t;
|
||||
|
||||
static void WindowOpenLocal( intf_thread_t* pIntf, vlc_object_t *pObj )
|
||||
{
|
||||
vout_window_t* pWnd = (vout_window_t*)pObj;
|
||||
vlc_window_t* pWnd = (vlc_window_t*)pObj;
|
||||
vout_window_skins_t* sys = (vout_window_skins_t *)pWnd->sys;
|
||||
int width = sys->cfg.width;
|
||||
int height = sys->cfg.height;
|
||||
|
@ -300,13 +300,13 @@ static void WindowOpenLocal( intf_thread_t* pIntf, vlc_object_t *pObj )
|
|||
|
||||
static void WindowCloseLocal( intf_thread_t* pIntf, vlc_object_t *pObj )
|
||||
{
|
||||
vout_window_t* pWnd = (vout_window_t*)pObj;
|
||||
vlc_window_t* pWnd = (vlc_window_t*)pObj;
|
||||
VoutManager::instance( pIntf )->releaseWnd( pWnd );
|
||||
}
|
||||
|
||||
static void WindowSetFullscreen( vout_window_t *pWnd, const char * );
|
||||
static void WindowSetFullscreen( vlc_window_t *pWnd, const char * );
|
||||
|
||||
static int WindowEnable( vout_window_t *pWnd, const vout_window_cfg_t *cfg )
|
||||
static int WindowEnable( vlc_window_t *pWnd, const vlc_window_cfg_t *cfg )
|
||||
{
|
||||
vout_window_skins_t* sys = static_cast<vout_window_skins_t*>(pWnd->sys);
|
||||
intf_thread_t *pIntf = sys->pIntf;
|
||||
|
@ -318,7 +318,7 @@ static int WindowEnable( vout_window_t *pWnd, const vout_window_cfg_t *cfg )
|
|||
WindowOpenLocal );
|
||||
CmdExecuteBlock::executeWait( CmdGenericPtr( cmd ) );
|
||||
|
||||
if( pWnd->type == VOUT_WINDOW_TYPE_DUMMY )
|
||||
if( pWnd->type == VLC_WINDOW_TYPE_DUMMY )
|
||||
{
|
||||
msg_Dbg( pIntf, "Vout window creation failed" );
|
||||
return VLC_EGENERIC;
|
||||
|
@ -329,7 +329,7 @@ static int WindowEnable( vout_window_t *pWnd, const vout_window_cfg_t *cfg )
|
|||
return VLC_SUCCESS;
|
||||
}
|
||||
|
||||
static void WindowDisable( vout_window_t *pWnd )
|
||||
static void WindowDisable( vlc_window_t *pWnd )
|
||||
{
|
||||
// vout_window_skins_t* sys = (vout_window_skins_t *)pWnd->sys;
|
||||
|
||||
|
@ -350,10 +350,10 @@ static void WindowDisable( vout_window_t *pWnd )
|
|||
WindowCloseLocal );
|
||||
CmdExecuteBlock::executeWait( CmdGenericPtr( cmd ) );
|
||||
|
||||
pWnd->type = VOUT_WINDOW_TYPE_DUMMY;
|
||||
pWnd->type = VLC_WINDOW_TYPE_DUMMY;
|
||||
}
|
||||
|
||||
static void WindowResize( vout_window_t *pWnd,
|
||||
static void WindowResize( vlc_window_t *pWnd,
|
||||
unsigned i_width, unsigned i_height )
|
||||
{
|
||||
vout_window_skins_t* sys = (vout_window_skins_t *)pWnd->sys;
|
||||
|
@ -369,19 +369,19 @@ static void WindowResize( vout_window_t *pWnd,
|
|||
pQueue->push( CmdGenericPtr( pCmd ) );
|
||||
}
|
||||
|
||||
static void WindowSetState( vout_window_t *pWnd, unsigned i_arg )
|
||||
static void WindowSetState( vlc_window_t *pWnd, unsigned i_arg )
|
||||
{
|
||||
vout_window_skins_t* sys = (vout_window_skins_t *)pWnd->sys;
|
||||
intf_thread_t *pIntf = sys->pIntf;
|
||||
AsyncQueue *pQueue = AsyncQueue::instance( pIntf );
|
||||
bool on_top = i_arg & VOUT_WINDOW_STATE_ABOVE;
|
||||
bool on_top = i_arg & VLC_WINDOW_STATE_ABOVE;
|
||||
|
||||
// Post a SetOnTop command
|
||||
CmdSetOnTop* pCmd = new CmdSetOnTop( pIntf, on_top );
|
||||
pQueue->push( CmdGenericPtr( pCmd ) );
|
||||
}
|
||||
|
||||
static void WindowUnsetFullscreen( vout_window_t *pWnd )
|
||||
static void WindowUnsetFullscreen( vlc_window_t *pWnd )
|
||||
{
|
||||
vout_window_skins_t* sys = (vout_window_skins_t *)pWnd->sys;
|
||||
intf_thread_t *pIntf = sys->pIntf;
|
||||
|
@ -391,7 +391,7 @@ static void WindowUnsetFullscreen( vout_window_t *pWnd )
|
|||
pQueue->push( CmdGenericPtr( pCmd ) );
|
||||
}
|
||||
|
||||
static void WindowSetFullscreen( vout_window_t *pWnd, const char * )
|
||||
static void WindowSetFullscreen( vlc_window_t *pWnd, const char * )
|
||||
{
|
||||
vout_window_skins_t* sys = (vout_window_skins_t *)pWnd->sys;
|
||||
intf_thread_t *pIntf = sys->pIntf;
|
||||
|
@ -403,7 +403,7 @@ static void WindowSetFullscreen( vout_window_t *pWnd, const char * )
|
|||
}
|
||||
|
||||
static const auto window_ops = []{
|
||||
struct vout_window_operations ops {};
|
||||
struct vlc_window_operations ops {};
|
||||
ops.enable = WindowEnable;
|
||||
ops.disable = WindowDisable;
|
||||
ops.resize = WindowResize;
|
||||
|
@ -414,7 +414,7 @@ static const auto window_ops = []{
|
|||
return ops;
|
||||
}();
|
||||
|
||||
static int WindowOpen( vout_window_t *pWnd )
|
||||
static int WindowOpen( vlc_window_t *pWnd )
|
||||
{
|
||||
if( var_InheritBool( pWnd, "video-wallpaper" )
|
||||
|| !var_InheritBool( pWnd, "embedded-video" ) )
|
||||
|
@ -437,11 +437,11 @@ static int WindowOpen( vout_window_t *pWnd )
|
|||
pWnd->sys = sys;
|
||||
sys->pIntf = pIntf;
|
||||
pWnd->ops = &window_ops;
|
||||
pWnd->type = VOUT_WINDOW_TYPE_DUMMY;
|
||||
pWnd->type = VLC_WINDOW_TYPE_DUMMY;
|
||||
return VLC_SUCCESS;
|
||||
}
|
||||
|
||||
static void WindowClose( vout_window_t *pWnd )
|
||||
static void WindowClose( vlc_window_t *pWnd )
|
||||
{
|
||||
vout_window_skins_t* sys = (vout_window_skins_t *)pWnd->sys;
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
class OSTimer;
|
||||
class VarBool;
|
||||
struct vout_window_t;
|
||||
struct vlc_window;
|
||||
|
||||
|
||||
/// Singleton object handling VLC internal state and playlist
|
||||
|
|
|
@ -189,7 +189,7 @@ CtrlVideo* VoutManager::getBestCtrlVideo( )
|
|||
// Functions called by window provider
|
||||
// ///////////////////////////////////
|
||||
|
||||
void VoutManager::acceptWnd( vout_window_t* pWnd, int width, int height )
|
||||
void VoutManager::acceptWnd( vlc_window_t* pWnd, int width, int height )
|
||||
{
|
||||
// Creation of a dedicated Window per vout thread
|
||||
VoutWindow* pVoutWindow = new VoutWindow( getIntf(), pWnd, width, height,
|
||||
|
@ -216,7 +216,7 @@ void VoutManager::acceptWnd( vout_window_t* pWnd, int width, int height )
|
|||
}
|
||||
|
||||
|
||||
void VoutManager::releaseWnd( vout_window_t* pWnd )
|
||||
void VoutManager::releaseWnd( vlc_window_t* pWnd )
|
||||
{
|
||||
// remove vout thread from savedVec
|
||||
std::vector<SavedWnd>::iterator it;
|
||||
|
@ -245,7 +245,7 @@ void VoutManager::releaseWnd( vout_window_t* pWnd )
|
|||
}
|
||||
|
||||
|
||||
void VoutManager::setSizeWnd( vout_window_t *pWnd, int width, int height )
|
||||
void VoutManager::setSizeWnd( vlc_window_t *pWnd, int width, int height )
|
||||
{
|
||||
msg_Dbg( pWnd, "setSize (%ix%i) received from vout thread",
|
||||
width, height );
|
||||
|
@ -271,7 +271,7 @@ void VoutManager::setSizeWnd( vout_window_t *pWnd, int width, int height )
|
|||
}
|
||||
|
||||
|
||||
void VoutManager::setFullscreenWnd( vout_window_t *pWnd, bool b_fullscreen )
|
||||
void VoutManager::setFullscreenWnd( vlc_window_t *pWnd, bool b_fullscreen )
|
||||
{
|
||||
msg_Dbg( pWnd, "setFullscreen (%i) received from vout thread",
|
||||
b_fullscreen );
|
||||
|
@ -296,7 +296,7 @@ void VoutManager::setFullscreenWnd( vout_window_t *pWnd, bool b_fullscreen )
|
|||
}
|
||||
|
||||
|
||||
void VoutManager::hideMouseWnd( vout_window_t *pWnd, bool hide )
|
||||
void VoutManager::hideMouseWnd( vlc_window_t *pWnd, bool hide )
|
||||
{
|
||||
msg_Dbg( pWnd, "hide mouse (%i) received from vout thread", hide );
|
||||
OSFactory *pOsFactory = OSFactory::instance( getIntf() );
|
||||
|
|
|
@ -37,20 +37,20 @@
|
|||
class VarBool;
|
||||
class GenericWindow;
|
||||
class FscWindow;
|
||||
struct vout_window_t;
|
||||
struct vlc_window;
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
class SavedWnd
|
||||
{
|
||||
public:
|
||||
SavedWnd( struct vout_window_t* pWnd, VoutWindow* pVoutWindow = NULL,
|
||||
SavedWnd( struct vlc_window *pWnd, VoutWindow* pVoutWindow = NULL,
|
||||
CtrlVideo* pCtrlVideo = NULL, int height = -1, int width = -1 )
|
||||
: pWnd( pWnd ), pVoutWindow( pVoutWindow ),
|
||||
pCtrlVideo( pCtrlVideo ), height( height ), width( width ) { }
|
||||
~SavedWnd() { }
|
||||
|
||||
struct vout_window_t* pWnd;
|
||||
struct vlc_window *pWnd;
|
||||
VoutWindow *pVoutWindow;
|
||||
CtrlVideo *pCtrlVideo;
|
||||
int height;
|
||||
|
@ -106,19 +106,19 @@ public:
|
|||
static void destroy( intf_thread_t *pIntf );
|
||||
|
||||
/// accept window request (vout window provider)
|
||||
void acceptWnd( struct vout_window_t *pWnd, int width, int height );
|
||||
void acceptWnd( struct vlc_window *pWnd, int width, int height );
|
||||
|
||||
// release window (vout window provider)
|
||||
void releaseWnd( struct vout_window_t *pWnd );
|
||||
void releaseWnd( struct vlc_window *pWnd );
|
||||
|
||||
/// set window size (vout window provider)
|
||||
void setSizeWnd( struct vout_window_t* pWnd, int width, int height );
|
||||
void setSizeWnd( struct vlc_window *pWnd, int width, int height );
|
||||
|
||||
/// set fullscreen mode (vout window provider)
|
||||
void setFullscreenWnd( struct vout_window_t* pWnd, bool b_fullscreen );
|
||||
void setFullscreenWnd( struct vlc_window *pWnd, bool b_fullscreen );
|
||||
|
||||
/// hide mouse (vout window provider)
|
||||
void hideMouseWnd( struct vout_window_t* pWnd, bool hide );
|
||||
void hideMouseWnd( struct vlc_window *pWnd, bool hide );
|
||||
|
||||
// Register Video Controls (when building theme)
|
||||
void registerCtrlVideo( CtrlVideo* p_CtrlVideo );
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include <vlc_actions.h>
|
||||
|
||||
|
||||
VoutWindow::VoutWindow( intf_thread_t *pIntf, vout_window_t* pWnd,
|
||||
VoutWindow::VoutWindow( intf_thread_t *pIntf, vlc_window_t* pWnd,
|
||||
int width, int height, GenericWindow* pParent ) :
|
||||
GenericWindow( pIntf, 0, 0, false, false, pParent,
|
||||
GenericWindow::VoutWindow ),
|
||||
|
@ -91,7 +91,7 @@ void VoutWindow::resize( int width, int height )
|
|||
GenericWindow::resize( width, height );
|
||||
|
||||
if( m_pWnd )
|
||||
vout_window_ReportSize( m_pWnd, width, height );
|
||||
vlc_window_ReportSize( m_pWnd, width, height );
|
||||
}
|
||||
|
||||
|
||||
|
@ -117,7 +117,7 @@ void VoutWindow::processEvent( EvtMotion &rEvtMotion )
|
|||
int x = rEvtMotion.getXPos() - m_pParentWindow->getLeft() - getLeft();
|
||||
int y = rEvtMotion.getYPos() - m_pParentWindow->getTop() - getTop();
|
||||
|
||||
vout_window_ReportMouseMoved( m_pWnd, x, y );
|
||||
vlc_window_ReportMouseMoved( m_pWnd, x, y );
|
||||
showMouse();
|
||||
}
|
||||
|
||||
|
@ -133,11 +133,11 @@ void VoutWindow::processEvent( EvtMouse &rEvtMouse )
|
|||
button = 2;
|
||||
|
||||
if( rEvtMouse.getAction() == EvtMouse::kDown )
|
||||
vout_window_ReportMousePressed( m_pWnd, button );
|
||||
vlc_window_ReportMousePressed( m_pWnd, button );
|
||||
else if( rEvtMouse.getAction() == EvtMouse::kUp )
|
||||
vout_window_ReportMouseReleased( m_pWnd, button );
|
||||
vlc_window_ReportMouseReleased( m_pWnd, button );
|
||||
else if( rEvtMouse.getAction() == EvtMouse::kDblClick )
|
||||
vout_window_ReportMouseDoubleClick( m_pWnd, button );
|
||||
vlc_window_ReportMouseDoubleClick( m_pWnd, button );
|
||||
showMouse();
|
||||
}
|
||||
|
||||
|
|
|
@ -32,14 +32,14 @@
|
|||
class OSGraphics;
|
||||
class OSTimer;
|
||||
class CtrlVideo;
|
||||
struct vout_window_t;
|
||||
struct vlc_window;
|
||||
|
||||
/// Class to handle a video output window
|
||||
class VoutWindow: private GenericWindow
|
||||
{
|
||||
public:
|
||||
|
||||
VoutWindow( intf_thread_t *pIntf, struct vout_window_t* pWnd,
|
||||
VoutWindow( intf_thread_t *pIntf, struct vlc_window *pWnd,
|
||||
int width, int height, GenericWindow* pParent = NULL );
|
||||
~VoutWindow();
|
||||
|
||||
|
@ -86,7 +86,7 @@ public:
|
|||
private:
|
||||
|
||||
/// vout thread
|
||||
struct vout_window_t* m_pWnd;
|
||||
struct vlc_window *m_pWnd;
|
||||
|
||||
/// original width and height
|
||||
int original_width;
|
||||
|
|
|
@ -62,8 +62,8 @@ public:
|
|||
virtual void toggleOnTop( bool onTop ) const;
|
||||
|
||||
/// Set the window handler
|
||||
void setOSHandle( vout_window_t *pWnd ) const {
|
||||
pWnd->type = VOUT_WINDOW_TYPE_HWND;
|
||||
void setOSHandle( vlc_window_t *pWnd ) const {
|
||||
pWnd->type = VLC_WINDOW_TYPE_HWND;
|
||||
pWnd->info.has_double_click = true;
|
||||
pWnd->handle.hwnd = m_hWnd;
|
||||
}
|
||||
|
|
|
@ -69,8 +69,8 @@ public:
|
|||
Window getDrawable() const { return m_wnd; }
|
||||
|
||||
/// Set the window handler
|
||||
void setOSHandle( vout_window_t *pWnd ) const {
|
||||
pWnd->type = VOUT_WINDOW_TYPE_XID;
|
||||
void setOSHandle( vlc_window_t *pWnd ) const {
|
||||
pWnd->type = VLC_WINDOW_TYPE_XID;
|
||||
pWnd->info.has_double_click = true;
|
||||
pWnd->handle.xid = m_wnd;
|
||||
pWnd->display.x11 = NULL;
|
||||
|
|
|
@ -43,7 +43,7 @@ static const struct vlc_decoder_device_operations d3d11_dev_ops = {
|
|||
.close = D3D11CloseDecoderDevice,
|
||||
};
|
||||
|
||||
static int D3D11OpenDecoderDevice(vlc_decoder_device *device, bool forced, vout_window_t *wnd)
|
||||
static int D3D11OpenDecoderDevice(vlc_decoder_device *device, bool forced, vlc_window_t *wnd)
|
||||
{
|
||||
VLC_UNUSED(wnd);
|
||||
|
||||
|
@ -61,12 +61,12 @@ static int D3D11OpenDecoderDevice(vlc_decoder_device *device, bool forced, vout_
|
|||
return VLC_SUCCESS;
|
||||
}
|
||||
|
||||
int D3D11OpenDecoderDeviceW8(vlc_decoder_device *device, vout_window_t *wnd)
|
||||
int D3D11OpenDecoderDeviceW8(vlc_decoder_device *device, vlc_window_t *wnd)
|
||||
{
|
||||
return D3D11OpenDecoderDevice(device, false, wnd);
|
||||
}
|
||||
|
||||
int D3D11OpenDecoderDeviceAny(vlc_decoder_device *device, vout_window_t *wnd)
|
||||
int D3D11OpenDecoderDeviceAny(vlc_decoder_device *device, vlc_window_t *wnd)
|
||||
{
|
||||
return D3D11OpenDecoderDevice(device, true, wnd);
|
||||
}
|
||||
|
|
|
@ -38,8 +38,8 @@ int D3D11OpenCPUConverter(filter_t *);
|
|||
int D3D11OpenBlockDecoder(vlc_object_t *);
|
||||
void D3D11CloseBlockDecoder(vlc_object_t *);
|
||||
|
||||
int D3D11OpenDecoderDeviceW8(vlc_decoder_device *, vout_window_t *);
|
||||
int D3D11OpenDecoderDeviceAny(vlc_decoder_device *, vout_window_t *);
|
||||
int D3D11OpenDecoderDeviceW8(vlc_decoder_device *, vlc_window_t *);
|
||||
int D3D11OpenDecoderDeviceAny(vlc_decoder_device *, vlc_window_t *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ static const struct vlc_decoder_device_operations d3d9_dev_ops = {
|
|||
.close = D3D9CloseDecoderDevice,
|
||||
};
|
||||
|
||||
int D3D9OpenDecoderDevice(vlc_decoder_device *device, vout_window_t *wnd)
|
||||
int D3D9OpenDecoderDevice(vlc_decoder_device *device, vlc_window_t *wnd)
|
||||
{
|
||||
VLC_UNUSED(wnd);
|
||||
|
||||
|
|
|
@ -32,6 +32,6 @@ int D3D9OpenDeinterlace(filter_t *);
|
|||
int D3D9OpenConverter(filter_t *);
|
||||
int D3D9OpenCPUConverter(filter_t *);
|
||||
|
||||
int D3D9OpenDecoderDevice(vlc_decoder_device *, vout_window_t *);
|
||||
int D3D9OpenDecoderDevice(vlc_decoder_device *, vlc_window_t *);
|
||||
|
||||
#endif /* VLC_D3D9_FILTERS_H */
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
#include "mmal_picture.h"
|
||||
|
||||
static int OpenDecoderDevice(vlc_decoder_device *, vout_window_t *);
|
||||
static int OpenDecoderDevice(vlc_decoder_device *, vlc_window_t *);
|
||||
|
||||
vlc_module_begin()
|
||||
set_description(N_("MMAL"))
|
||||
|
@ -117,7 +117,7 @@ static const struct vlc_decoder_device_operations mmal_device_ops = {
|
|||
.close = CloseDecoderDevice,
|
||||
};
|
||||
|
||||
static int OpenDecoderDevice(vlc_decoder_device *device, vout_window_t *window)
|
||||
static int OpenDecoderDevice(vlc_decoder_device *device, vlc_window_t *window)
|
||||
{
|
||||
VLC_UNUSED(window);
|
||||
|
||||
|
|
|
@ -724,7 +724,7 @@ static void vd_manage(vout_display_t *vd)
|
|||
if (query_resolution(vd, sys->display_id, &width, &height) >= 0) {
|
||||
sys->display_width = width;
|
||||
sys->display_height = height;
|
||||
// vout_window_ReportSize(vd->cfg->window, width, height);
|
||||
// vlc_window_ReportSize(vd->cfg->window, width, height);
|
||||
}
|
||||
|
||||
sys->need_configure_display = false;
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
static int OpenDecoder(vlc_object_t *);
|
||||
static void CloseDecoder(vlc_object_t *);
|
||||
static int DecoderContextOpen(vlc_decoder_device *, vout_window_t *);
|
||||
static int DecoderContextOpen(vlc_decoder_device *, vlc_window_t *);
|
||||
|
||||
#define DEINTERLACE_MODULE_TEXT N_("Integrated deinterlacing")
|
||||
#define DEINTERLACE_MODULE_LONGTEXT N_( "Specify the deinterlace mode to use." )
|
||||
|
@ -1080,7 +1080,7 @@ static void initCuda(void *opaque)
|
|||
}
|
||||
|
||||
static int
|
||||
DecoderContextOpen(vlc_decoder_device *device, vout_window_t *window)
|
||||
DecoderContextOpen(vlc_decoder_device *device, vlc_window_t *window)
|
||||
{
|
||||
VLC_UNUSED(window);
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ x11_native_destroy_cb(VANativeDisplay native)
|
|||
}
|
||||
|
||||
static struct vaapi_instance *
|
||||
x11_init_vaapi_instance(vlc_decoder_device *device, vout_window_t *window,
|
||||
x11_init_vaapi_instance(vlc_decoder_device *device, vlc_window_t *window,
|
||||
VADisplay *vadpyp)
|
||||
{
|
||||
if (!vlc_xlib_init(VLC_OBJECT(window)))
|
||||
|
@ -199,7 +199,7 @@ drm_init_vaapi_instance(vlc_decoder_device *device, VADisplay *vadpyp)
|
|||
|
||||
#ifdef HAVE_VA_WL
|
||||
static struct vaapi_instance *
|
||||
wl_init_vaapi_instance(vlc_decoder_device *device, vout_window_t *window,
|
||||
wl_init_vaapi_instance(vlc_decoder_device *device, vlc_window_t *window,
|
||||
VADisplay *vadpyp)
|
||||
{
|
||||
VADisplay vadpy = *vadpyp = vaGetDisplayWl(window->display.wl);
|
||||
|
@ -221,15 +221,15 @@ static const struct vlc_decoder_device_operations ops = {
|
|||
};
|
||||
|
||||
static int
|
||||
Open(vlc_decoder_device *device, vout_window_t *window)
|
||||
Open(vlc_decoder_device *device, vlc_window_t *window)
|
||||
{
|
||||
VADisplay vadpy = NULL;
|
||||
struct vaapi_instance *vainst = NULL;
|
||||
#if defined (HAVE_VA_X11)
|
||||
if (window && window->type == VOUT_WINDOW_TYPE_XID)
|
||||
if (window && window->type == VLC_WINDOW_TYPE_XID)
|
||||
vainst = x11_init_vaapi_instance(device, window, &vadpy);
|
||||
#elif defined(HAVE_VA_WL)
|
||||
if (window && window->type == VOUT_WINDOW_TYPE_WAYLAND)
|
||||
if (window && window->type == VLC_WINDOW_TYPE_WAYLAND)
|
||||
vainst = wl_init_vaapi_instance(device, window, &vadpy);
|
||||
#elif defined (HAVE_VA_DRM)
|
||||
(void) window;
|
||||
|
|
|
@ -65,11 +65,11 @@ static int ScreenNumberOfWindow(Display *dpy, Window w)
|
|||
return -1;
|
||||
}
|
||||
|
||||
static int Open(vlc_decoder_device *device, vout_window_t *window)
|
||||
static int Open(vlc_decoder_device *device, vlc_window_t *window)
|
||||
{
|
||||
int errCode = VLC_EGENERIC;
|
||||
|
||||
if (window == NULL || window->type != VOUT_WINDOW_TYPE_XID)
|
||||
if (window == NULL || window->type != VLC_WINDOW_TYPE_XID)
|
||||
return VLC_ENOTSUP;
|
||||
if (!vlc_xlib_init(VLC_OBJECT(device)))
|
||||
return VLC_ENOTSUP;
|
||||
|
|
|
@ -43,8 +43,8 @@ static void UpdateInhibit(vlc_inhibit_t *ih, unsigned mask)
|
|||
static int OpenInhibit(vlc_object_t *obj)
|
||||
{
|
||||
vlc_inhibit_t *ih = (vlc_inhibit_t *)obj;
|
||||
vout_window_t *wnd = vlc_inhibit_GetWindow(ih);
|
||||
if (wnd->type != VOUT_WINDOW_TYPE_NSOBJECT)
|
||||
vlc_window_t *wnd = vlc_inhibit_GetWindow(ih);
|
||||
if (wnd->type != VLC_WINDOW_TYPE_NSOBJECT)
|
||||
return VLC_EGENERIC;
|
||||
|
||||
UIView * view = (__bridge UIView*)wnd->handle.nsobject;
|
||||
|
|
|
@ -46,7 +46,7 @@ struct vlc_inhibit_sys
|
|||
|
||||
static void Inhibit (vlc_inhibit_t *ih, unsigned mask)
|
||||
{
|
||||
vout_window_t *wnd = vlc_inhibit_GetWindow(ih);
|
||||
vlc_window_t *wnd = vlc_inhibit_GetWindow(ih);
|
||||
vlc_inhibit_sys_t *sys = ih->p_sys;
|
||||
bool suspend = (mask & VLC_INHIBIT_DISPLAY) != 0;
|
||||
|
||||
|
@ -88,9 +88,9 @@ static const struct wl_registry_listener registry_cbs =
|
|||
static int Open(vlc_object_t *obj)
|
||||
{
|
||||
vlc_inhibit_t *ih = (vlc_inhibit_t *)obj;
|
||||
vout_window_t *wnd = vlc_inhibit_GetWindow(ih);
|
||||
vlc_window_t *wnd = vlc_inhibit_GetWindow(ih);
|
||||
|
||||
if (wnd->type != VOUT_WINDOW_TYPE_WAYLAND)
|
||||
if (wnd->type != VLC_WINDOW_TYPE_WAYLAND)
|
||||
return VLC_EGENERIC;
|
||||
|
||||
vlc_inhibit_sys_t *sys = vlc_obj_malloc(obj, sizeof (*sys));
|
||||
|
@ -132,7 +132,7 @@ static void Close(vlc_object_t *obj)
|
|||
{
|
||||
vlc_inhibit_t *ih = (vlc_inhibit_t *)obj;
|
||||
vlc_inhibit_sys_t *sys = ih->p_sys;
|
||||
vout_window_t *wnd = vlc_inhibit_GetWindow(ih);
|
||||
vlc_window_t *wnd = vlc_inhibit_GetWindow(ih);
|
||||
|
||||
if (sys->inhibitor != NULL)
|
||||
zwp_idle_inhibitor_v1_destroy(sys->inhibitor);
|
||||
|
|
|
@ -105,7 +105,7 @@ struct buffer_bounds
|
|||
|
||||
typedef struct vout_display_sys_t
|
||||
{
|
||||
vout_window_t *embed;
|
||||
vlc_window_t *embed;
|
||||
|
||||
AWindowHandler *p_awh;
|
||||
native_window_api_t *anw;
|
||||
|
@ -487,8 +487,8 @@ static int Open(vout_display_t *vd,
|
|||
vout_display_sys_t *sys;
|
||||
video_format_t fmt, sub_fmt;
|
||||
|
||||
vout_window_t *embed = vd->cfg->window;
|
||||
if (embed->type != VOUT_WINDOW_TYPE_ANDROID_NATIVE)
|
||||
vlc_window_t *embed = vd->cfg->window;
|
||||
if (embed->type != VLC_WINDOW_TYPE_ANDROID_NATIVE)
|
||||
return VLC_EGENERIC;
|
||||
|
||||
assert(embed->handle.anativewindow);
|
||||
|
|
|
@ -115,7 +115,7 @@ struct AWindowHandler
|
|||
{
|
||||
JavaVM *p_jvm;
|
||||
jobject jobj;
|
||||
vout_window_t *wnd;
|
||||
vlc_window_t *wnd;
|
||||
|
||||
struct vlc_android_jfields jfields;
|
||||
|
||||
|
@ -813,7 +813,7 @@ AWindowHandler_getEnv(AWindowHandler *p_awh)
|
|||
}
|
||||
|
||||
AWindowHandler *
|
||||
AWindowHandler_new(vlc_object_t *obj, vout_window_t *wnd, awh_events_t *p_events)
|
||||
AWindowHandler_new(vlc_object_t *obj, vlc_window_t *wnd, awh_events_t *p_events)
|
||||
{
|
||||
#define AWINDOW_REGISTER_FLAGS_SUCCESS 0x1
|
||||
#define AWINDOW_REGISTER_FLAGS_HAS_VIDEO_LAYOUT_LISTENER 0x2
|
||||
|
|
|
@ -62,9 +62,9 @@ struct awh_mouse_coords
|
|||
|
||||
typedef struct
|
||||
{
|
||||
void (*on_new_window_size)(vout_window_t *wnd, unsigned i_width,
|
||||
void (*on_new_window_size)(vlc_window_t *wnd, unsigned i_width,
|
||||
unsigned i_height);
|
||||
void (*on_new_mouse_coords)(vout_window_t *wnd,
|
||||
void (*on_new_mouse_coords)(vlc_window_t *wnd,
|
||||
const struct awh_mouse_coords *coords);
|
||||
} awh_events_t;
|
||||
|
||||
|
@ -131,7 +131,7 @@ JNIEnv *android_getEnv(vlc_object_t *p_obj, const char *psz_thread_name);
|
|||
* \return a valid AWindowHandler * or NULL. It must be released with
|
||||
* AWindowHandler_destroy.
|
||||
*/
|
||||
AWindowHandler *AWindowHandler_new(vlc_object_t *obj, vout_window_t *wnd, awh_events_t *p_events);
|
||||
AWindowHandler *AWindowHandler_new(vlc_object_t *obj, vlc_window_t *wnd, awh_events_t *p_events);
|
||||
void AWindowHandler_destroy(AWindowHandler *p_awh);
|
||||
|
||||
/**
|
||||
|
|
|
@ -38,9 +38,9 @@
|
|||
|
||||
#include "utils.h"
|
||||
|
||||
static int Open(vout_window_t *);
|
||||
static void Close(vout_window_t *);
|
||||
static int OpenDecDevice(vlc_decoder_device *device, vout_window_t *window);
|
||||
static int Open(vlc_window_t *);
|
||||
static void Close(vlc_window_t *);
|
||||
static int OpenDecDevice(vlc_decoder_device *device, vlc_window_t *window);
|
||||
|
||||
/*
|
||||
* Module descriptor
|
||||
|
@ -57,37 +57,37 @@ vlc_module_begin()
|
|||
vlc_module_end()
|
||||
|
||||
|
||||
static void OnNewWindowSize(vout_window_t *wnd,
|
||||
static void OnNewWindowSize(vlc_window_t *wnd,
|
||||
unsigned i_width, unsigned i_height)
|
||||
{
|
||||
vout_window_ReportSize(wnd, i_width, i_height);
|
||||
vlc_window_ReportSize(wnd, i_width, i_height);
|
||||
}
|
||||
|
||||
static void OnNewMouseCoords(vout_window_t *wnd,
|
||||
static void OnNewMouseCoords(vlc_window_t *wnd,
|
||||
const struct awh_mouse_coords *coords)
|
||||
{
|
||||
vout_window_ReportMouseMoved(wnd, coords->i_x, coords->i_y);
|
||||
vlc_window_ReportMouseMoved(wnd, coords->i_x, coords->i_y);
|
||||
switch (coords->i_action)
|
||||
{
|
||||
case AMOTION_EVENT_ACTION_DOWN:
|
||||
vout_window_ReportMousePressed(wnd, coords->i_button);
|
||||
vlc_window_ReportMousePressed(wnd, coords->i_button);
|
||||
break;
|
||||
case AMOTION_EVENT_ACTION_UP:
|
||||
vout_window_ReportMouseReleased(wnd, coords->i_button);
|
||||
vlc_window_ReportMouseReleased(wnd, coords->i_button);
|
||||
break;
|
||||
case AMOTION_EVENT_ACTION_MOVE:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static const struct vout_window_operations ops = {
|
||||
static const struct vlc_window_operations ops = {
|
||||
.destroy = Close,
|
||||
};
|
||||
|
||||
/**
|
||||
* Create an Android native window.
|
||||
*/
|
||||
static int Open(vout_window_t *wnd)
|
||||
static int Open(vlc_window_t *wnd)
|
||||
{
|
||||
/* We cannot create a window without the associated AWindow instance. */
|
||||
jobject jobj = var_InheritAddress(wnd, "drawable-androidwindow");
|
||||
|
@ -99,7 +99,7 @@ static int Open(vout_window_t *wnd)
|
|||
if (p_awh == NULL)
|
||||
return VLC_EGENERIC;
|
||||
|
||||
wnd->type = VOUT_WINDOW_TYPE_ANDROID_NATIVE;
|
||||
wnd->type = VLC_WINDOW_TYPE_ANDROID_NATIVE;
|
||||
wnd->handle.anativewindow = p_awh;
|
||||
wnd->ops = &ops;
|
||||
|
||||
|
@ -110,16 +110,16 @@ static int Open(vout_window_t *wnd)
|
|||
/**
|
||||
* Destroys the Android native window.
|
||||
*/
|
||||
static void Close(vout_window_t *wnd)
|
||||
static void Close(vlc_window_t *wnd)
|
||||
{
|
||||
AWindowHandler_destroy(wnd->handle.anativewindow);
|
||||
}
|
||||
|
||||
static int
|
||||
OpenDecDevice(vlc_decoder_device *device, vout_window_t *window)
|
||||
OpenDecDevice(vlc_decoder_device *device, vlc_window_t *window)
|
||||
{
|
||||
AWindowHandler *awh;
|
||||
if (window && window->type == VOUT_WINDOW_TYPE_ANDROID_NATIVE)
|
||||
if (window && window->type == VLC_WINDOW_TYPE_ANDROID_NATIVE)
|
||||
awh = window->handle.anativewindow;
|
||||
else
|
||||
awh = AWindowHandler_new(VLC_OBJECT(device), NULL, NULL);
|
||||
|
|
|
@ -243,7 +243,7 @@ static void Close(vlc_gl_t *gl)
|
|||
return self;
|
||||
}
|
||||
|
||||
- (BOOL)attachToWindow:(vout_window_t*)wnd
|
||||
- (BOOL)attachToWindow:(vlc_window_t*)wnd
|
||||
{
|
||||
@try {
|
||||
UIView *viewContainer = (__bridge UIView*)wnd->handle.nsobject;
|
||||
|
@ -493,10 +493,10 @@ static void Close(vlc_gl_t *gl)
|
|||
|
||||
static int Open(vlc_gl_t *gl, unsigned width, unsigned height)
|
||||
{
|
||||
vout_window_t *wnd = gl->surface;
|
||||
vlc_window_t *wnd = gl->surface;
|
||||
|
||||
/* We only support UIView container window. */
|
||||
if (wnd->type != VOUT_WINDOW_TYPE_NSOBJECT)
|
||||
if (wnd->type != VLC_WINDOW_TYPE_NSOBJECT)
|
||||
return VLC_EGENERIC;
|
||||
|
||||
@autoreleasepool {
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
/**
|
||||
* @file VLCVideoUIView.m
|
||||
* @brief UIView-based vout_window_t provider
|
||||
* @brief UIView-based vlc_window_t provider
|
||||
*
|
||||
* This UIView window provider mostly handles resizing constraints from parent
|
||||
* views and provides event forwarding to VLC. It is usable for any kind of
|
||||
|
@ -70,7 +70,7 @@
|
|||
|
||||
@interface VLCVideoUIView : UIView {
|
||||
/* VLC window object, set to NULL under _mutex lock when closing. */
|
||||
vout_window_t *_wnd;
|
||||
vlc_window_t *_wnd;
|
||||
vlc_mutex_t _mutex;
|
||||
|
||||
/* Parent view defined by libvlc_media_player_set_nsobject. */
|
||||
|
@ -86,7 +86,7 @@
|
|||
dispatch_queue_t _eventq;
|
||||
}
|
||||
|
||||
- (id)initWithWindow:(vout_window_t *)wnd;
|
||||
- (id)initWithWindow:(vlc_window_t *)wnd;
|
||||
- (BOOL)fetchViewContainer;
|
||||
- (void)detachFromParent;
|
||||
- (void)tapRecognized:(UITapGestureRecognizer *)tapRecognizer;
|
||||
|
@ -99,7 +99,7 @@
|
|||
*****************************************************************************/
|
||||
@implementation VLCVideoUIView
|
||||
|
||||
- (id)initWithWindow:(vout_window_t *)wnd
|
||||
- (id)initWithWindow:(vlc_window_t *)wnd
|
||||
{
|
||||
_wnd = wnd;
|
||||
_enabled = NO;
|
||||
|
@ -125,7 +125,7 @@
|
|||
|
||||
CGSize size = _viewContainer.bounds.size;
|
||||
[self reportEvent:^{
|
||||
vout_window_ReportSize(_wnd, size.width, size.height);
|
||||
vlc_window_ReportSize(_wnd, size.width, size.height);
|
||||
}];
|
||||
|
||||
return self;
|
||||
|
@ -219,7 +219,7 @@
|
|||
{
|
||||
/* We need to lock because we consider that _wnd might be destroyed
|
||||
* after this function returns, typically as it will be called in the
|
||||
* Close() operation which preceed the vout_window_t destruction in
|
||||
* Close() operation which preceed the vlc_window_t destruction in
|
||||
* the core. */
|
||||
vlc_mutex_lock(&_mutex);
|
||||
/* The UIView must not be attached before releasing. Disable() is doing
|
||||
|
@ -323,7 +323,7 @@
|
|||
}
|
||||
|
||||
[self reportEvent:^{
|
||||
vout_window_ReportSize(_wnd,
|
||||
vlc_window_ReportSize(_wnd,
|
||||
viewSize.width * scaleFactor,
|
||||
viewSize.height * scaleFactor);
|
||||
}];
|
||||
|
@ -345,10 +345,10 @@
|
|||
}
|
||||
|
||||
[self reportEvent:^{
|
||||
vout_window_ReportMouseMoved(_wnd,
|
||||
vlc_window_ReportMouseMoved(_wnd,
|
||||
(int)touchPoint.x * scaleFactor, (int)touchPoint.y * scaleFactor);
|
||||
vout_window_ReportMousePressed(_wnd, MOUSE_BUTTON_LEFT);
|
||||
vout_window_ReportMouseReleased(_wnd, MOUSE_BUTTON_LEFT);
|
||||
vlc_window_ReportMousePressed(_wnd, MOUSE_BUTTON_LEFT);
|
||||
vlc_window_ReportMouseReleased(_wnd, MOUSE_BUTTON_LEFT);
|
||||
}];
|
||||
vlc_mutex_unlock(&_mutex);
|
||||
}
|
||||
|
@ -378,7 +378,7 @@
|
|||
* C core wrapper of the vout window operations for the ObjC module.
|
||||
*/
|
||||
|
||||
static int Enable(vout_window_t *wnd, const vout_window_cfg_t *cfg)
|
||||
static int Enable(vlc_window_t *wnd, const vlc_window_cfg_t *cfg)
|
||||
{
|
||||
VLCVideoUIView *sys = (__bridge VLCVideoUIView *)wnd->sys;
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
|
@ -387,7 +387,7 @@ static int Enable(vout_window_t *wnd, const vout_window_cfg_t *cfg)
|
|||
return VLC_SUCCESS;
|
||||
}
|
||||
|
||||
static void Disable(vout_window_t *wnd)
|
||||
static void Disable(vlc_window_t *wnd)
|
||||
{
|
||||
VLCVideoUIView *sys = (__bridge VLCVideoUIView *)wnd->sys;
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
|
@ -395,7 +395,7 @@ static void Disable(vout_window_t *wnd)
|
|||
});
|
||||
}
|
||||
|
||||
static void Close(vout_window_t *wnd)
|
||||
static void Close(vlc_window_t *wnd)
|
||||
{
|
||||
VLCVideoUIView *sys = (__bridge_transfer VLCVideoUIView*)wnd->sys;
|
||||
|
||||
|
@ -404,14 +404,14 @@ static void Close(vout_window_t *wnd)
|
|||
[sys detachFromParent];
|
||||
}
|
||||
|
||||
static const struct vout_window_operations window_ops =
|
||||
static const struct vlc_window_operations window_ops =
|
||||
{
|
||||
.enable = Enable,
|
||||
.disable = Disable,
|
||||
.destroy = Close,
|
||||
};
|
||||
|
||||
static int Open(vout_window_t *wnd)
|
||||
static int Open(vlc_window_t *wnd)
|
||||
{
|
||||
dispatch_sync(dispatch_get_main_queue(), ^{
|
||||
VLCVideoUIView *sys = [[VLCVideoUIView alloc] initWithWindow:wnd];
|
||||
|
@ -424,7 +424,7 @@ static int Open(vout_window_t *wnd)
|
|||
return VLC_EGENERIC;
|
||||
}
|
||||
|
||||
wnd->type = VOUT_WINDOW_TYPE_NSOBJECT;
|
||||
wnd->type = VLC_WINDOW_TYPE_NSOBJECT;
|
||||
wnd->handle.nsobject = wnd->sys;
|
||||
wnd->ops = &window_ops;
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ static void *VoutDisplayEventKeyDispatch(void *data)
|
|||
vlc_caca_event_t *event;
|
||||
|
||||
while ((event = vlc_queue_DequeueKillable(&sys->q, &sys->dead)) != NULL) {
|
||||
vout_window_ReportKeyPress(vd->cfg->window, event->key);
|
||||
vlc_window_ReportKeyPress(vd->cfg->window, event->key);
|
||||
free(event);
|
||||
}
|
||||
|
||||
|
@ -315,7 +315,7 @@ static void Manage(vout_display_t *vd)
|
|||
case CACA_EVENT_MOUSE_MOTION:
|
||||
caca_set_mouse(sys->dp, 1);
|
||||
sys->cursor_deadline = vlc_tick_now() + sys->cursor_timeout;
|
||||
vout_window_ReportMouseMoved(vd->cfg->window,
|
||||
vlc_window_ReportMouseMoved(vd->cfg->window,
|
||||
caca_get_event_mouse_x(&ev),
|
||||
caca_get_event_mouse_y(&ev));
|
||||
break;
|
||||
|
@ -328,10 +328,10 @@ static void Manage(vout_display_t *vd)
|
|||
for (int i = 0; mouses[i].caca != -1; i++) {
|
||||
if (mouses[i].caca == caca) {
|
||||
if (caca_get_event_type(&ev) == CACA_EVENT_MOUSE_PRESS)
|
||||
vout_window_ReportMousePressed(vd->cfg->window,
|
||||
vlc_window_ReportMousePressed(vd->cfg->window,
|
||||
mouses[i].vlc);
|
||||
else
|
||||
vout_window_ReportMouseReleased(vd->cfg->window,
|
||||
vlc_window_ReportMouseReleased(vd->cfg->window,
|
||||
mouses[i].vlc);
|
||||
return;
|
||||
}
|
||||
|
@ -339,7 +339,7 @@ static void Manage(vout_display_t *vd)
|
|||
break;
|
||||
}
|
||||
case CACA_EVENT_QUIT:
|
||||
vout_window_ReportClose(vd->cfg->window);
|
||||
vlc_window_ReportClose(vd->cfg->window);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -281,7 +281,7 @@ static int Open (vout_display_t *vd,
|
|||
video_format_t *fmt, vlc_video_context *context)
|
||||
{
|
||||
vout_display_sys_t *sys;
|
||||
if (vd->cfg->window->type != VOUT_WINDOW_TYPE_NSOBJECT)
|
||||
if (vd->cfg->window->type != VLC_WINDOW_TYPE_NSOBJECT)
|
||||
return VLC_EGENERIC;
|
||||
|
||||
@autoreleasepool {
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
"Video will be embedded in this pre-existing window. " \
|
||||
"If zero, a new window will be created.")
|
||||
|
||||
static int Open(vout_window_t *);
|
||||
static void Close(vout_window_t *);
|
||||
static int Open(vlc_window_t *);
|
||||
static void Close(vlc_window_t *);
|
||||
|
||||
/*
|
||||
* Module descriptor
|
||||
|
@ -59,7 +59,7 @@ vlc_module_end ()
|
|||
static vlc_mutex_t serializer = VLC_STATIC_MUTEX;
|
||||
static uintptr_t *used = NULL;
|
||||
|
||||
static const struct vout_window_operations ops = {
|
||||
static const struct vlc_window_operations ops = {
|
||||
.destroy = Close,
|
||||
};
|
||||
|
||||
|
@ -90,7 +90,7 @@ static void RemoveDrawable(uintptr_t val)
|
|||
/**
|
||||
* Find the drawable set by libvlc application.
|
||||
*/
|
||||
static int Open(vout_window_t *wnd)
|
||||
static int Open(vlc_window_t *wnd)
|
||||
{
|
||||
uintptr_t val = var_InheritInteger (wnd, "drawable-hwnd");
|
||||
if (val == 0)
|
||||
|
@ -124,7 +124,7 @@ skip:
|
|||
if (val == 0)
|
||||
return VLC_EGENERIC;
|
||||
|
||||
wnd->type = VOUT_WINDOW_TYPE_HWND;
|
||||
wnd->type = VLC_WINDOW_TYPE_HWND;
|
||||
wnd->handle.hwnd = (void *)val;
|
||||
wnd->ops = &ops;
|
||||
wnd->sys = (void *)val;
|
||||
|
@ -134,7 +134,7 @@ skip:
|
|||
/**
|
||||
* Release the drawable.
|
||||
*/
|
||||
static void Close (vout_window_t *wnd)
|
||||
static void Close (vlc_window_t *wnd)
|
||||
{
|
||||
uintptr_t val = (uintptr_t)wnd->sys;
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ static void Display(vout_display_t *vd, picture_t *picture)
|
|||
{
|
||||
VLC_UNUSED(picture);
|
||||
vout_display_sys_t *sys = vd->sys;
|
||||
vout_window_t *wnd = vd->cfg->window;
|
||||
vlc_window_t *wnd = vd->cfg->window;
|
||||
const video_format_t *fmt = vd->fmt;
|
||||
picture_t *pic = sys->buffers[sys->front_buf];
|
||||
vout_display_place_t place;
|
||||
|
@ -151,11 +151,11 @@ static const struct vlc_display_operations ops = {
|
|||
static int Open(vout_display_t *vd,
|
||||
video_format_t *fmtp, vlc_video_context *context)
|
||||
{
|
||||
vout_window_t *wnd = vd->cfg->window;
|
||||
vlc_window_t *wnd = vd->cfg->window;
|
||||
uint_fast32_t drm_fourcc = 0;
|
||||
video_format_t fmt;
|
||||
|
||||
if (wnd->type != VOUT_WINDOW_TYPE_KMS)
|
||||
if (wnd->type != VLC_WINDOW_TYPE_KMS)
|
||||
return VLC_EGENERIC;
|
||||
|
||||
/*
|
||||
|
|
|
@ -135,7 +135,7 @@ static int Open(vlc_gl_t *gl, unsigned width, unsigned height)
|
|||
{
|
||||
vlc_object_t *obj = VLC_OBJECT(gl);
|
||||
|
||||
if (gl->surface->type != VOUT_WINDOW_TYPE_XID || !vlc_xlib_init (obj))
|
||||
if (gl->surface->type != VLC_WINDOW_TYPE_XID || !vlc_xlib_init (obj))
|
||||
return VLC_EGENERIC;
|
||||
|
||||
/* Initialize GLX display */
|
||||
|
|
|
@ -114,7 +114,7 @@ struct vout_window_sys_t {
|
|||
uint32_t main_buffer;
|
||||
};
|
||||
|
||||
static deviceRval FindCRTC(vout_window_t *wnd, drmModeRes const *res,
|
||||
static deviceRval FindCRTC(vlc_window_t *wnd, drmModeRes const *res,
|
||||
drmModeConnector const *conn)
|
||||
{
|
||||
struct vout_window_sys_t *sys = wnd->sys;
|
||||
|
@ -159,7 +159,7 @@ static deviceRval FindCRTC(vout_window_t *wnd, drmModeRes const *res,
|
|||
}
|
||||
|
||||
|
||||
static deviceRval SetupDevice(vout_window_t *wnd, drmModeRes const *res,
|
||||
static deviceRval SetupDevice(vlc_window_t *wnd, drmModeRes const *res,
|
||||
drmModeConnector const *conn)
|
||||
{
|
||||
struct vout_window_sys_t *sys = wnd->sys;
|
||||
|
@ -182,7 +182,7 @@ static deviceRval SetupDevice(vout_window_t *wnd, drmModeRes const *res,
|
|||
return drvSuccess;
|
||||
}
|
||||
|
||||
static void UpdateOutputs(vout_window_t *wnd)
|
||||
static void UpdateOutputs(vlc_window_t *wnd)
|
||||
{
|
||||
struct vout_window_sys_t *sys = wnd->sys;
|
||||
drmModeRes *modeRes = sys->modeRes;
|
||||
|
@ -217,7 +217,7 @@ static void UpdateOutputs(vout_window_t *wnd)
|
|||
if ((enc->possible_crtcs & (1 << crtc_index)) != 0) {
|
||||
|
||||
drmModeFreeEncoder(enc);
|
||||
vout_window_ReportOutputDevice(wnd, name, name);
|
||||
vlc_window_ReportOutputDevice(wnd, name, name);
|
||||
break;
|
||||
}
|
||||
drmModeFreeEncoder(enc);
|
||||
|
@ -226,7 +226,7 @@ static void UpdateOutputs(vout_window_t *wnd)
|
|||
}
|
||||
}
|
||||
|
||||
static int WindowEnable(vout_window_t *wnd, const vout_window_cfg_t *cfg)
|
||||
static int WindowEnable(vlc_window_t *wnd, const vlc_window_cfg_t *cfg)
|
||||
{
|
||||
struct vout_window_sys_t *sys = wnd->sys;
|
||||
(void)cfg;
|
||||
|
@ -324,7 +324,7 @@ static int WindowEnable(vout_window_t *wnd, const vout_window_cfg_t *cfg)
|
|||
sys->framebuffer = new_fb;
|
||||
sys->main_buffer = request.handle;
|
||||
|
||||
vout_window_ReportSize(wnd, sys->width, sys->height);
|
||||
vlc_window_ReportSize(wnd, sys->width, sys->height);
|
||||
|
||||
return VLC_SUCCESS;
|
||||
|
||||
|
@ -352,7 +352,7 @@ error_create_dumb:
|
|||
return VLC_EGENERIC;
|
||||
}
|
||||
|
||||
static void WindowDisable(vout_window_t *wnd)
|
||||
static void WindowDisable(vlc_window_t *wnd)
|
||||
{
|
||||
struct vout_window_sys_t *sys = wnd->sys;
|
||||
sys->crtc = 0;
|
||||
|
@ -385,7 +385,7 @@ static void WindowDisable(vout_window_t *wnd)
|
|||
(void)ret;
|
||||
}
|
||||
|
||||
static void WindowClose(vout_window_t *wnd)
|
||||
static void WindowClose(vlc_window_t *wnd)
|
||||
{
|
||||
struct vout_window_sys_t *sys = wnd->sys;
|
||||
drmModeFreeResources(sys->modeRes);
|
||||
|
@ -395,14 +395,14 @@ static void WindowClose(vout_window_t *wnd)
|
|||
free(sys);
|
||||
}
|
||||
|
||||
static const struct vout_window_operations window_ops =
|
||||
static const struct vlc_window_operations window_ops =
|
||||
{
|
||||
.destroy = WindowClose,
|
||||
.enable = WindowEnable,
|
||||
.disable = WindowDisable,
|
||||
};
|
||||
|
||||
static int OpenWindow(vout_window_t *wnd)
|
||||
static int OpenWindow(vlc_window_t *wnd)
|
||||
{
|
||||
char *psz_device;
|
||||
|
||||
|
@ -461,7 +461,7 @@ static int OpenWindow(vout_window_t *wnd)
|
|||
}
|
||||
|
||||
wnd->ops = &window_ops;
|
||||
wnd->type = VOUT_WINDOW_TYPE_KMS;
|
||||
wnd->type = VLC_WINDOW_TYPE_KMS;
|
||||
wnd->display.drm_fd = sys->drm_fd;
|
||||
/* Note: wnd->handle.crtc will be initialized later */
|
||||
|
||||
|
|
|
@ -325,7 +325,7 @@ static int Open ( vout_display_t *vd,
|
|||
|
||||
sys->b_fixt23 = var_CreateGetBool( vd, "kva-fixt23");
|
||||
|
||||
if( !sys->b_fixt23 && vd->cfg->window->type != VOUT_WINDOW_TYPE_HWND )
|
||||
if( !sys->b_fixt23 && vd->cfg->window->type != VLC_WINDOW_TYPE_HWND )
|
||||
{
|
||||
free( sys );
|
||||
return VLC_ENOTSUP;
|
||||
|
@ -832,7 +832,7 @@ static void MousePressed( vout_display_t *vd, HWND hwnd, unsigned button )
|
|||
|
||||
sys->button_pressed |= 1 << button;
|
||||
|
||||
vout_window_ReportMousePressed( vd->cfg->window, button );
|
||||
vlc_window_ReportMousePressed( vd->cfg->window, button );
|
||||
}
|
||||
|
||||
static void MouseReleased( vout_display_t *vd, unsigned button )
|
||||
|
@ -843,7 +843,7 @@ static void MouseReleased( vout_display_t *vd, unsigned button )
|
|||
if( !sys->button_pressed )
|
||||
WinSetCapture( HWND_DESKTOP, NULLHANDLE );
|
||||
|
||||
vout_window_ReportMouseReleased( vd->cfg->window, button );
|
||||
vlc_window_ReportMouseReleased( vd->cfg->window, button );
|
||||
}
|
||||
|
||||
#define WM_MOUSELEAVE 0x41F
|
||||
|
@ -876,7 +876,7 @@ static MRESULT EXPENTRY WndProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 )
|
|||
{
|
||||
/* the user wants to close the window */
|
||||
case WM_CLOSE:
|
||||
vout_window_ReportClose(vd->cfg->window);
|
||||
vlc_window_ReportClose(vd->cfg->window);
|
||||
result = 0;
|
||||
break;
|
||||
|
||||
|
@ -903,7 +903,7 @@ static MRESULT EXPENTRY WndProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 )
|
|||
/* Invert Y coordinate and add y offset */
|
||||
y = ( place.height - y ) + place.y;
|
||||
|
||||
vout_window_ReportMouseMoved( vd->cfg->window, x, y );
|
||||
vlc_window_ReportMouseMoved( vd->cfg->window, x, y );
|
||||
|
||||
result = WinDefWindowProc( hwnd, msg, mp1,mp2 );
|
||||
break;
|
||||
|
@ -934,7 +934,7 @@ static MRESULT EXPENTRY WndProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 )
|
|||
break;
|
||||
|
||||
case WM_BUTTON1DBLCLK :
|
||||
vout_window_ReportMouseDoubleClick( vd->cfg->window, MOUSE_BUTTON_LEFT );
|
||||
vlc_window_ReportMouseDoubleClick( vd->cfg->window, MOUSE_BUTTON_LEFT );
|
||||
break;
|
||||
|
||||
case WM_TRANSLATEACCEL :
|
||||
|
@ -975,7 +975,7 @@ static MRESULT EXPENTRY WndProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 )
|
|||
if( i_flags & KC_ALT )
|
||||
i_key |= KEY_MODIFIER_ALT;
|
||||
|
||||
vout_window_ReportKeyPress(vd->cfg->window, i_key);
|
||||
vlc_window_ReportKeyPress(vd->cfg->window, i_key);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -142,7 +142,7 @@ static int Open (vout_display_t *vd,
|
|||
video_format_t *fmt, vlc_video_context *context)
|
||||
{
|
||||
|
||||
if (vd->cfg->window->type != VOUT_WINDOW_TYPE_NSOBJECT)
|
||||
if (vd->cfg->window->type != VLC_WINDOW_TYPE_NSOBJECT)
|
||||
return VLC_EGENERIC;
|
||||
|
||||
vout_display_sys_t *sys = vlc_obj_calloc (vd, 1, sizeof(*sys));
|
||||
|
|
|
@ -126,13 +126,13 @@ static int Open(vout_display_t *vd,
|
|||
sys->gl = NULL;
|
||||
sys->is_dirty = false;
|
||||
|
||||
vout_window_t *surface = vd->cfg->window;
|
||||
vlc_window_t *surface = vd->cfg->window;
|
||||
char *gl_name = var_InheritString(surface, MODULE_VARNAME);
|
||||
|
||||
/* VDPAU GL interop works only with GLX. Override the "gl" option to force
|
||||
* it. */
|
||||
#ifndef USE_OPENGL_ES2
|
||||
if (surface->type == VOUT_WINDOW_TYPE_XID)
|
||||
if (surface->type == VLC_WINDOW_TYPE_XID)
|
||||
{
|
||||
switch (vd->source->i_chroma)
|
||||
{
|
||||
|
|
|
@ -202,7 +202,7 @@ static void Close(vlc_gl_t *gl)
|
|||
#ifdef USE_PLATFORM_X11
|
||||
if (sys->x11 != NULL) {
|
||||
if (sys->restore_forget_gravity) {
|
||||
vout_window_t *wnd = gl->surface;
|
||||
vlc_window_t *wnd = gl->surface;
|
||||
XSetWindowAttributes swa;
|
||||
swa.bit_gravity = ForgetGravity;
|
||||
XChangeWindowAttributes(sys->x11, wnd->handle.xid, CWBitGravity,
|
||||
|
@ -250,7 +250,7 @@ static int Open(vlc_gl_t *gl, const struct gl_api *api,
|
|||
sys->context = EGL_NO_CONTEXT;
|
||||
sys->is_current = false;
|
||||
|
||||
vout_window_t *wnd = gl->surface;
|
||||
vlc_window_t *wnd = gl->surface;
|
||||
EGLSurface (*createSurface)(EGLDisplay, EGLConfig, void *, const EGLint *)
|
||||
= CreateWindowSurface;
|
||||
void *window;
|
||||
|
@ -268,7 +268,7 @@ static int Open(vlc_gl_t *gl, const struct gl_api *api,
|
|||
#ifdef USE_PLATFORM_X11
|
||||
sys->x11 = NULL;
|
||||
|
||||
if (wnd->type != VOUT_WINDOW_TYPE_XID || !vlc_xlib_init(obj))
|
||||
if (wnd->type != VLC_WINDOW_TYPE_XID || !vlc_xlib_init(obj))
|
||||
goto error;
|
||||
|
||||
window = &wnd->handle.xid;
|
||||
|
@ -319,7 +319,7 @@ static int Open(vlc_gl_t *gl, const struct gl_api *api,
|
|||
sys->conn = NULL;
|
||||
sys->restore_forget_gravity = false;
|
||||
|
||||
if (wnd->type != VOUT_WINDOW_TYPE_XID)
|
||||
if (wnd->type != VLC_WINDOW_TYPE_XID)
|
||||
goto error;
|
||||
|
||||
# ifdef EGL_EXT_platform_xcb
|
||||
|
@ -362,7 +362,7 @@ static int Open(vlc_gl_t *gl, const struct gl_api *api,
|
|||
#elif defined (USE_PLATFORM_WAYLAND)
|
||||
sys->window = NULL;
|
||||
|
||||
if (wnd->type != VOUT_WINDOW_TYPE_WAYLAND)
|
||||
if (wnd->type != VLC_WINDOW_TYPE_WAYLAND)
|
||||
goto error;
|
||||
|
||||
# ifdef EGL_EXT_platform_wayland
|
||||
|
@ -381,7 +381,7 @@ static int Open(vlc_gl_t *gl, const struct gl_api *api,
|
|||
# endif
|
||||
|
||||
#elif defined (USE_PLATFORM_WIN32)
|
||||
if (wnd->type != VOUT_WINDOW_TYPE_HWND)
|
||||
if (wnd->type != VLC_WINDOW_TYPE_HWND)
|
||||
goto error;
|
||||
|
||||
window = &wnd->handle.hwnd;
|
||||
|
@ -392,7 +392,7 @@ static int Open(vlc_gl_t *gl, const struct gl_api *api,
|
|||
(void) width; (void) height;
|
||||
|
||||
#elif defined (USE_PLATFORM_ANDROID)
|
||||
if (wnd->type != VOUT_WINDOW_TYPE_ANDROID_NATIVE)
|
||||
if (wnd->type != VLC_WINDOW_TYPE_ANDROID_NATIVE)
|
||||
goto error;
|
||||
|
||||
ANativeWindow *anw =
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include <vlc_video_splitter.h>
|
||||
|
||||
struct vlc_vidsplit_part {
|
||||
vout_window_t *window;
|
||||
vlc_window_t *window;
|
||||
vout_display_t *display;
|
||||
vlc_sem_t lock;
|
||||
unsigned width;
|
||||
|
@ -128,8 +128,8 @@ static void vlc_vidsplit_Close(vout_display_t *vd)
|
|||
if (display != NULL)
|
||||
vout_display_Delete(display);
|
||||
|
||||
vout_window_Disable(part->window);
|
||||
vout_window_Delete(part->window);
|
||||
vlc_window_Disable(part->window);
|
||||
vlc_window_Delete(part->window);
|
||||
}
|
||||
|
||||
module_unneed(&sys->splitter, sys->splitter.p_module);
|
||||
|
@ -137,9 +137,9 @@ static void vlc_vidsplit_Close(vout_display_t *vd)
|
|||
vlc_object_delete(&sys->splitter);
|
||||
}
|
||||
|
||||
static void vlc_vidsplit_window_Resized(vout_window_t *wnd,
|
||||
static void vlc_vidsplit_window_Resized(vlc_window_t *wnd,
|
||||
unsigned width, unsigned height,
|
||||
vout_window_ack_cb cb, void *opaque)
|
||||
vlc_window_ack_cb cb, void *opaque)
|
||||
{
|
||||
struct vlc_vidsplit_part *part = wnd->owner.sys;
|
||||
|
||||
|
@ -155,7 +155,7 @@ static void vlc_vidsplit_window_Resized(vout_window_t *wnd,
|
|||
vlc_sem_post(&part->lock);
|
||||
}
|
||||
|
||||
static void vlc_vidsplit_window_Closed(vout_window_t *wnd)
|
||||
static void vlc_vidsplit_window_Closed(vlc_window_t *wnd)
|
||||
{
|
||||
struct vlc_vidsplit_part *part = wnd->owner.sys;
|
||||
vout_display_t *display;
|
||||
|
@ -169,46 +169,46 @@ static void vlc_vidsplit_window_Closed(vout_window_t *wnd)
|
|||
vout_display_Delete(display);
|
||||
}
|
||||
|
||||
static void vlc_vidsplit_window_MouseEvent(vout_window_t *wnd,
|
||||
const vout_window_mouse_event_t *e)
|
||||
static void vlc_vidsplit_window_MouseEvent(vlc_window_t *wnd,
|
||||
const vlc_window_mouse_event_t *e)
|
||||
{
|
||||
struct vlc_vidsplit_part *part = wnd->owner.sys;
|
||||
vout_display_t *vd = (vout_display_t *)vlc_object_parent(wnd);
|
||||
vout_display_sys_t *sys = vd->sys;
|
||||
vout_window_mouse_event_t ev = *e;
|
||||
vlc_window_mouse_event_t ev = *e;
|
||||
|
||||
vlc_mutex_lock(&sys->lock);
|
||||
if (video_splitter_Mouse(&sys->splitter, part - sys->parts,
|
||||
&ev) == VLC_SUCCESS)
|
||||
vout_window_SendMouseEvent(vd->cfg->window, &ev);
|
||||
vlc_window_SendMouseEvent(vd->cfg->window, &ev);
|
||||
vlc_mutex_unlock(&sys->lock);
|
||||
}
|
||||
|
||||
static void vlc_vidsplit_window_KeyboardEvent(vout_window_t *wnd, unsigned key)
|
||||
static void vlc_vidsplit_window_KeyboardEvent(vlc_window_t *wnd, unsigned key)
|
||||
{
|
||||
vout_display_t *vd = (vout_display_t *)vlc_object_parent(wnd);
|
||||
vout_display_sys_t *sys = vd->sys;
|
||||
|
||||
vlc_mutex_lock(&sys->lock);
|
||||
vout_window_ReportKeyPress(vd->cfg->window, key);
|
||||
vlc_window_ReportKeyPress(vd->cfg->window, key);
|
||||
vlc_mutex_unlock(&sys->lock);
|
||||
}
|
||||
|
||||
static const struct vout_window_callbacks vlc_vidsplit_window_cbs = {
|
||||
static const struct vlc_window_callbacks vlc_vidsplit_window_cbs = {
|
||||
.resized = vlc_vidsplit_window_Resized,
|
||||
.closed = vlc_vidsplit_window_Closed,
|
||||
.mouse_event = vlc_vidsplit_window_MouseEvent,
|
||||
.keyboard_event = vlc_vidsplit_window_KeyboardEvent,
|
||||
};
|
||||
|
||||
static vout_window_t *video_splitter_CreateWindow(vlc_object_t *obj,
|
||||
static vlc_window_t *video_splitter_CreateWindow(vlc_object_t *obj,
|
||||
const vout_display_cfg_t *restrict vdcfg,
|
||||
const video_format_t *restrict source, void *sys)
|
||||
{
|
||||
vout_window_cfg_t cfg = {
|
||||
vlc_window_cfg_t cfg = {
|
||||
.is_decorated = true,
|
||||
};
|
||||
vout_window_owner_t owner = {
|
||||
vlc_window_owner_t owner = {
|
||||
.cbs = &vlc_vidsplit_window_cbs,
|
||||
.sys = sys,
|
||||
};
|
||||
|
@ -216,10 +216,10 @@ static vout_window_t *video_splitter_CreateWindow(vlc_object_t *obj,
|
|||
vout_display_GetDefaultDisplaySize(&cfg.width, &cfg.height, source,
|
||||
vdcfg);
|
||||
|
||||
vout_window_t *window = vout_window_New(obj, NULL, &owner, &cfg);
|
||||
vlc_window_t *window = vlc_window_New(obj, NULL, &owner, &cfg);
|
||||
if (window != NULL) {
|
||||
if (vout_window_Enable(window)) {
|
||||
vout_window_Delete(window);
|
||||
if (vlc_window_Enable(window)) {
|
||||
vlc_window_Delete(window);
|
||||
window = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -308,8 +308,8 @@ static int vlc_vidsplit_Open(vout_display_t *vd,
|
|||
modname, NULL);
|
||||
if (display == NULL) {
|
||||
vlc_sem_post(&part->lock);
|
||||
vout_window_Disable(part->window);
|
||||
vout_window_Delete(part->window);
|
||||
vlc_window_Disable(part->window);
|
||||
vlc_window_Delete(part->window);
|
||||
splitter->i_output = i;
|
||||
vlc_vidsplit_Close(vd);
|
||||
return VLC_EGENERIC;
|
||||
|
|
|
@ -48,7 +48,7 @@ static int vlc_vk_start(void *func, bool forced, va_list ap)
|
|||
* @param name module name (or "any")
|
||||
* @return a new platform object, or NULL on failure
|
||||
*/
|
||||
vlc_vk_platform_t *vlc_vk_platform_Create(struct vout_window_t *wnd, const char *name)
|
||||
vlc_vk_platform_t *vlc_vk_platform_Create(struct vlc_window *wnd, const char *name)
|
||||
{
|
||||
vlc_object_t *parent = (vlc_object_t *) wnd;
|
||||
struct vlc_vk_platform_t *vk;
|
||||
|
|
|
@ -39,7 +39,7 @@ typedef struct vlc_vk_platform_t
|
|||
{
|
||||
// set by platform.c
|
||||
struct vlc_object_t obj;
|
||||
struct vout_window_t *window;
|
||||
struct vlc_window *window;
|
||||
module_t *module;
|
||||
|
||||
// set by the platform
|
||||
|
@ -48,7 +48,7 @@ typedef struct vlc_vk_platform_t
|
|||
const struct vlc_vk_platform_operations *ops;
|
||||
} vlc_vk_platform_t;
|
||||
|
||||
vlc_vk_platform_t *vlc_vk_platform_Create(struct vout_window_t *, const char *) VLC_USED;
|
||||
vlc_vk_platform_t *vlc_vk_platform_Create(struct vlc_window *, const char *) VLC_USED;
|
||||
void vlc_vk_platform_Release(vlc_vk_platform_t *);
|
||||
|
||||
// Create a vulkan surface and store it to `surface_out`
|
||||
|
|
|
@ -40,7 +40,7 @@ static const struct vlc_vk_platform_operations platform_ops =
|
|||
|
||||
static int InitPlatform(vlc_vk_platform_t *vk)
|
||||
{
|
||||
if (vk->window->type != VOUT_WINDOW_TYPE_ANDROID_NATIVE)
|
||||
if (vk->window->type != VLC_WINDOW_TYPE_ANDROID_NATIVE)
|
||||
return VLC_EGENERIC;
|
||||
|
||||
vk->platform_ext = VK_KHR_ANDROID_SURFACE_EXTENSION_NAME;
|
||||
|
|
|
@ -61,7 +61,7 @@ static const struct vlc_vk_platform_operations platform_ops =
|
|||
|
||||
static int InitPlatform(vlc_vk_platform_t *vk)
|
||||
{
|
||||
if (vk->window->type != VOUT_WINDOW_TYPE_HWND)
|
||||
if (vk->window->type != VLC_WINDOW_TYPE_HWND)
|
||||
return VLC_EGENERIC;
|
||||
|
||||
vk->platform_ext = VK_KHR_WIN32_SURFACE_EXTENSION_NAME;
|
||||
|
|
|
@ -40,7 +40,7 @@ static const struct vlc_vk_platform_operations platform_ops =
|
|||
|
||||
static int InitPlatform(vlc_vk_platform_t *vk)
|
||||
{
|
||||
if (vk->window->type != VOUT_WINDOW_TYPE_XID)
|
||||
if (vk->window->type != VLC_WINDOW_TYPE_XID)
|
||||
return VLC_EGENERIC;
|
||||
|
||||
const char *display = vk->window->display.x11;
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
struct seat_data
|
||||
{
|
||||
vout_window_t *owner;
|
||||
vlc_window_t *owner;
|
||||
struct wl_seat *seat;
|
||||
|
||||
struct wl_pointer *pointer;
|
||||
|
@ -98,7 +98,7 @@ static void pointer_motion_cb(void *data, struct wl_pointer *pointer,
|
|||
struct seat_data *sd = data;
|
||||
|
||||
pointer_show(sd, pointer);
|
||||
vout_window_ReportMouseMoved(sd->owner,
|
||||
vlc_window_ReportMouseMoved(sd->owner,
|
||||
wl_fixed_to_int(sx), wl_fixed_to_int(sy));
|
||||
(void) time;
|
||||
}
|
||||
|
@ -130,10 +130,10 @@ static void pointer_button_cb(void *data, struct wl_pointer *pointer,
|
|||
switch (state)
|
||||
{
|
||||
case WL_POINTER_BUTTON_STATE_RELEASED:
|
||||
vout_window_ReportMouseReleased(sd->owner, button);
|
||||
vlc_window_ReportMouseReleased(sd->owner, button);
|
||||
break;
|
||||
case WL_POINTER_BUTTON_STATE_PRESSED:
|
||||
vout_window_ReportMousePressed(sd->owner, button);
|
||||
vlc_window_ReportMousePressed(sd->owner, button);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -144,7 +144,7 @@ static void pointer_axis_cb(void *data, struct wl_pointer *pointer,
|
|||
uint32_t serial, uint32_t type, wl_fixed_t value)
|
||||
{
|
||||
struct seat_data *sd = data;
|
||||
vout_window_t *wnd = sd->owner;
|
||||
vlc_window_t *wnd = sd->owner;
|
||||
int button;
|
||||
bool plus = value > 0;
|
||||
|
||||
|
@ -165,8 +165,8 @@ static void pointer_axis_cb(void *data, struct wl_pointer *pointer,
|
|||
|
||||
while (value > 0)
|
||||
{
|
||||
vout_window_ReportMousePressed(wnd, button);
|
||||
vout_window_ReportMouseReleased(wnd, button);
|
||||
vlc_window_ReportMousePressed(wnd, button);
|
||||
vlc_window_ReportMouseReleased(wnd, button);
|
||||
value -= wl_fixed_from_int(10);
|
||||
}
|
||||
(void) serial;
|
||||
|
@ -239,7 +239,7 @@ static void keyboard_keymap_cb(void *data, struct wl_keyboard *keyboard,
|
|||
uint32_t format, int fd, uint32_t size)
|
||||
{
|
||||
struct seat_data *sd = data;
|
||||
vout_window_t *wnd = sd->owner;
|
||||
vlc_window_t *wnd = sd->owner;
|
||||
void *map;
|
||||
|
||||
msg_Dbg(wnd, "format %"PRIu32" keymap of %"PRIu32" bytes", format, size);
|
||||
|
@ -289,7 +289,7 @@ static void keyboard_key_cb(void *data, struct wl_keyboard *keyboard,
|
|||
uint32_t state)
|
||||
{
|
||||
struct seat_data *sd = data;
|
||||
vout_window_t *wnd = sd->owner;
|
||||
vlc_window_t *wnd = sd->owner;
|
||||
uint_fast32_t vk;
|
||||
|
||||
if (state != WL_KEYBOARD_KEY_STATE_PRESSED)
|
||||
|
@ -302,7 +302,7 @@ static void keyboard_key_cb(void *data, struct wl_keyboard *keyboard,
|
|||
{
|
||||
msg_Dbg(wnd, "key: 0x%08"PRIxFAST32" (XKB: 0x%04"PRIx32")",
|
||||
vk, keycode);
|
||||
vout_window_ReportKeyPress(wnd, vk);
|
||||
vlc_window_ReportKeyPress(wnd, vk);
|
||||
}
|
||||
|
||||
(void) keyboard; (void) serial; (void) time;
|
||||
|
@ -328,7 +328,7 @@ static void keyboard_repeat_info_cb(void *data, struct wl_keyboard *keyboard,
|
|||
int32_t rate, int32_t delay)
|
||||
{
|
||||
struct seat_data *sd = data;
|
||||
vout_window_t *wnd = sd->owner;
|
||||
vlc_window_t *wnd = sd->owner;
|
||||
|
||||
msg_Dbg(wnd, "keyboard repeat info: %d Hz after %d ms", rate, delay);
|
||||
(void) keyboard;
|
||||
|
@ -382,7 +382,7 @@ static void seat_capabilities_cb(void *data, struct wl_seat *seat,
|
|||
uint32_t capabilities)
|
||||
{
|
||||
struct seat_data *sd = data;
|
||||
struct vout_window_t *wnd = sd->owner;
|
||||
struct vlc_window *wnd = sd->owner;
|
||||
|
||||
msg_Dbg(wnd, "seat capabilities: 0x%"PRIx32, capabilities);
|
||||
(void) seat;
|
||||
|
@ -420,7 +420,7 @@ static const struct wl_seat_listener seat_cbs =
|
|||
seat_name_cb,
|
||||
};
|
||||
|
||||
int seat_create(vout_window_t *wnd, struct wl_registry *registry,
|
||||
int seat_create(vlc_window_t *wnd, struct wl_registry *registry,
|
||||
uint32_t name, uint32_t version, struct wl_list *list)
|
||||
{
|
||||
struct seat_data *sd = malloc(sizeof (*sd));
|
||||
|
|
|
@ -18,12 +18,12 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
struct vout_window_t;
|
||||
struct vlc_window;
|
||||
struct wl_registry;
|
||||
struct wl_surface;
|
||||
struct wl_list;
|
||||
|
||||
int seat_create(struct vout_window_t *wnd, struct wl_registry *,
|
||||
int seat_create(struct vlc_window *wnd, struct wl_registry *,
|
||||
uint32_t name, uint32_t version, struct wl_list *list);
|
||||
int seat_destroy_one(struct wl_list *list, uint32_t name);
|
||||
void seat_destroy_all(struct wl_list *list);
|
||||
|
@ -31,5 +31,5 @@ void seat_destroy_all(struct wl_list *list);
|
|||
int seat_next_timeout(const struct wl_list *list);
|
||||
void seat_timeout(struct wl_list *list);
|
||||
|
||||
struct wl_surface *window_get_cursor(vout_window_t *wnd, int32_t *hotspot_x,
|
||||
struct wl_surface *window_get_cursor(vlc_window_t *wnd, int32_t *hotspot_x,
|
||||
int32_t *hotspot_y);
|
||||
|
|
|
@ -35,13 +35,13 @@
|
|||
|
||||
struct output_list
|
||||
{
|
||||
vout_window_t *owner;
|
||||
vlc_window_t *owner;
|
||||
struct wl_list outputs;
|
||||
};
|
||||
|
||||
struct output_data
|
||||
{
|
||||
vout_window_t *owner;
|
||||
vlc_window_t *owner;
|
||||
struct wl_output *wl_output;
|
||||
|
||||
uint32_t id;
|
||||
|
@ -60,7 +60,7 @@ static void output_geometry_cb(void *data, struct wl_output *output,
|
|||
int32_t transform)
|
||||
{
|
||||
struct output_data *od = data;
|
||||
vout_window_t *wnd = od->owner;
|
||||
vlc_window_t *wnd = od->owner;
|
||||
|
||||
msg_Dbg(wnd, "output %"PRIu32" geometry: %"PRId32"x%"PRId32"mm"
|
||||
"+%"PRId32"+%"PRId32", subpixel %"PRId32", transform %"PRId32,
|
||||
|
@ -87,7 +87,7 @@ static void output_mode_cb(void *data, struct wl_output *output,
|
|||
uint32_t flags, int32_t w, int32_t h, int32_t vr)
|
||||
{
|
||||
struct output_data *od = data;
|
||||
vout_window_t *wnd = od->owner;
|
||||
vlc_window_t *wnd = od->owner;
|
||||
div_t d = div(vr, 1000);
|
||||
|
||||
msg_Dbg(wnd, "output %"PRIu32" mode: 0x%"PRIx32" %"PRId32"x%"PRId32
|
||||
|
@ -102,14 +102,14 @@ static void output_mode_cb(void *data, struct wl_output *output,
|
|||
static void output_done_cb(void *data, struct wl_output *output)
|
||||
{
|
||||
struct output_data *od = data;
|
||||
vout_window_t *wnd = od->owner;
|
||||
vlc_window_t *wnd = od->owner;
|
||||
const char *name = od->name;
|
||||
const char *description = od->description;
|
||||
|
||||
if (unlikely(description == NULL))
|
||||
description = name;
|
||||
if (likely(name != NULL))
|
||||
vout_window_ReportOutputDevice(wnd, name, description);
|
||||
vlc_window_ReportOutputDevice(wnd, name, description);
|
||||
|
||||
(void) output;
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ static void output_done_cb(void *data, struct wl_output *output)
|
|||
static void output_scale_cb(void *data, struct wl_output *output, int32_t f)
|
||||
{
|
||||
struct output_data *od = data;
|
||||
vout_window_t *wnd = od->owner;
|
||||
vlc_window_t *wnd = od->owner;
|
||||
|
||||
msg_Dbg(wnd, "output %"PRIu32" scale: %"PRId32, od->id, f);
|
||||
(void) output;
|
||||
|
@ -154,7 +154,7 @@ static const struct wl_output_listener wl_output_cbs =
|
|||
output_description_cb,
|
||||
};
|
||||
|
||||
struct output_list *output_list_create(vout_window_t *wnd)
|
||||
struct output_list *output_list_create(vlc_window_t *wnd)
|
||||
{
|
||||
struct output_list *ol = malloc(sizeof (*ol));
|
||||
if (unlikely(ol == NULL))
|
||||
|
@ -209,7 +209,7 @@ void output_destroy(struct output_list *ol, struct wl_output *wo)
|
|||
free(od->description);
|
||||
|
||||
if (od->name != NULL) {
|
||||
vout_window_ReportOutputDevice(ol->owner, od->name, NULL);
|
||||
vlc_window_ReportOutputDevice(ol->owner, od->name, NULL);
|
||||
free(od->name);
|
||||
}
|
||||
|
||||
|
|
|
@ -18,11 +18,11 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
struct vout_window_t;
|
||||
struct vlc_window;
|
||||
struct wl_registry;
|
||||
struct output_list;
|
||||
|
||||
struct output_list *output_list_create(struct vout_window_t *wnd);
|
||||
struct output_list *output_list_create(struct vlc_window *wnd);
|
||||
void output_list_destroy(struct output_list *);
|
||||
|
||||
struct wl_output *output_create(struct output_list *, struct wl_registry *,
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
typedef struct vout_display_sys_t
|
||||
{
|
||||
vout_window_t *embed; /* VLC window */
|
||||
vlc_window_t *embed; /* VLC window */
|
||||
struct wl_event_queue *eventq;
|
||||
struct wl_shm *shm;
|
||||
struct wp_viewporter *viewporter;
|
||||
|
@ -267,7 +267,7 @@ static const struct vlc_display_operations ops = {
|
|||
static int Open(vout_display_t *vd,
|
||||
video_format_t *fmtp, vlc_video_context *context)
|
||||
{
|
||||
if (vd->cfg->window->type != VOUT_WINDOW_TYPE_WAYLAND)
|
||||
if (vd->cfg->window->type != VLC_WINDOW_TYPE_WAYLAND)
|
||||
return VLC_EGENERIC;
|
||||
|
||||
vout_display_sys_t *sys = malloc(sizeof (*sys));
|
||||
|
|
|
@ -57,7 +57,7 @@ static const struct vlc_vk_platform_operations platform_ops =
|
|||
|
||||
static int InitPlatform(vlc_vk_platform_t *vk)
|
||||
{
|
||||
if (vk->window->type != VOUT_WINDOW_TYPE_WAYLAND)
|
||||
if (vk->window->type != VLC_WINDOW_TYPE_WAYLAND)
|
||||
return VLC_EGENERIC;
|
||||
|
||||
vk->platform_ext = VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME;
|
||||
|
|
|
@ -119,7 +119,7 @@ static void cleanup_wl_display_read(void *data)
|
|||
/** Background thread for Wayland shell events handling */
|
||||
static void *Thread(void *data)
|
||||
{
|
||||
vout_window_t *wnd = data;
|
||||
vlc_window_t *wnd = data;
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
struct wl_display *display = wnd->display.wl;
|
||||
struct pollfd ufd[1];
|
||||
|
@ -156,7 +156,7 @@ static void *Thread(void *data)
|
|||
//return NULL;
|
||||
}
|
||||
|
||||
static void ResizeAck(vout_window_t *wnd, unsigned width, unsigned height,
|
||||
static void ResizeAck(vlc_window_t *wnd, unsigned width, unsigned height,
|
||||
void *data)
|
||||
{
|
||||
#ifdef XDG_SHELL
|
||||
|
@ -172,7 +172,7 @@ static void ResizeAck(vout_window_t *wnd, unsigned width, unsigned height,
|
|||
#endif
|
||||
}
|
||||
|
||||
static void ReportSize(vout_window_t *wnd, void *data)
|
||||
static void ReportSize(vlc_window_t *wnd, void *data)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
/* Zero wm.width or zero wm.height means the client should choose.
|
||||
|
@ -183,7 +183,7 @@ static void ReportSize(vout_window_t *wnd, void *data)
|
|||
wnd->owner.cbs->resized(wnd, width, height, ResizeAck, data);
|
||||
}
|
||||
|
||||
static void Resize(vout_window_t *wnd, unsigned width, unsigned height)
|
||||
static void Resize(vlc_window_t *wnd, unsigned width, unsigned height)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
|
@ -203,9 +203,9 @@ static void Resize(vout_window_t *wnd, unsigned width, unsigned height)
|
|||
wl_display_flush(wnd->display.wl);
|
||||
}
|
||||
|
||||
static void Close(vout_window_t *);
|
||||
static void Close(vlc_window_t *);
|
||||
|
||||
static void UnsetFullscreen(vout_window_t *wnd)
|
||||
static void UnsetFullscreen(vlc_window_t *wnd)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
|
@ -213,7 +213,7 @@ static void UnsetFullscreen(vout_window_t *wnd)
|
|||
wl_display_flush(wnd->display.wl);
|
||||
}
|
||||
|
||||
static void SetFullscreen(vout_window_t *wnd, const char *idstr)
|
||||
static void SetFullscreen(vlc_window_t *wnd, const char *idstr)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
struct wl_output *output = NULL;
|
||||
|
@ -229,7 +229,7 @@ static void SetFullscreen(vout_window_t *wnd, const char *idstr)
|
|||
}
|
||||
|
||||
#ifdef XDG_SHELL
|
||||
static void SetDecoration(vout_window_t *wnd, bool decorated)
|
||||
static void SetDecoration(vlc_window_t *wnd, bool decorated)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
const uint_fast32_t deco_mode = decorated
|
||||
|
@ -244,7 +244,7 @@ static void SetDecoration(vout_window_t *wnd, bool decorated)
|
|||
}
|
||||
#endif
|
||||
|
||||
static int Enable(vout_window_t *wnd, const vout_window_cfg_t *restrict cfg)
|
||||
static int Enable(vlc_window_t *wnd, const vlc_window_cfg_t *restrict cfg)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
struct wl_display *display = wnd->display.wl;
|
||||
|
@ -269,7 +269,7 @@ static int Enable(vout_window_t *wnd, const vout_window_cfg_t *restrict cfg)
|
|||
return VLC_SUCCESS;
|
||||
}
|
||||
|
||||
static const struct vout_window_operations ops = {
|
||||
static const struct vlc_window_operations ops = {
|
||||
.enable = Enable,
|
||||
.resize = Resize,
|
||||
.destroy = Close,
|
||||
|
@ -283,7 +283,7 @@ static void xdg_toplevel_configure_cb(void *data,
|
|||
int32_t width, int32_t height,
|
||||
struct wl_array *states)
|
||||
{
|
||||
vout_window_t *wnd = data;
|
||||
vlc_window_t *wnd = data;
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
const uint32_t *state;
|
||||
|
||||
|
@ -309,9 +309,9 @@ static void xdg_toplevel_configure_cb(void *data,
|
|||
|
||||
static void xdg_toplevel_close_cb(void *data, struct xdg_toplevel *toplevel)
|
||||
{
|
||||
vout_window_t *wnd = data;
|
||||
vlc_window_t *wnd = data;
|
||||
|
||||
vout_window_ReportClose(wnd);
|
||||
vlc_window_ReportClose(wnd);
|
||||
(void) toplevel;
|
||||
}
|
||||
|
||||
|
@ -324,13 +324,13 @@ static const struct xdg_toplevel_listener xdg_toplevel_cbs =
|
|||
static void xdg_surface_configure_cb(void *data, struct xdg_surface *surface,
|
||||
uint32_t serial)
|
||||
{
|
||||
vout_window_t *wnd = data;
|
||||
vlc_window_t *wnd = data;
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
if (sys->wm.latch.fullscreen)
|
||||
vout_window_ReportFullscreen(wnd, NULL);
|
||||
vlc_window_ReportFullscreen(wnd, NULL);
|
||||
else
|
||||
vout_window_ReportWindowed(wnd);
|
||||
vlc_window_ReportWindowed(wnd);
|
||||
|
||||
vlc_mutex_lock(&sys->lock);
|
||||
sys->wm.width = sys->wm.latch.width;
|
||||
|
@ -363,7 +363,7 @@ static void xdg_toplevel_decoration_configure_cb(void *data,
|
|||
struct zxdg_toplevel_decoration_v1 *deco,
|
||||
uint32_t mode)
|
||||
{
|
||||
vout_window_t *wnd = data;
|
||||
vlc_window_t *wnd = data;
|
||||
|
||||
msg_Dbg(wnd, "new decoration mode: %"PRIu32, mode);
|
||||
(void) deco;
|
||||
|
@ -380,10 +380,10 @@ static void wl_shell_surface_configure_cb(void *data,
|
|||
uint32_t edges,
|
||||
int32_t width, int32_t height)
|
||||
{
|
||||
vout_window_t *wnd = data;
|
||||
vlc_window_t *wnd = data;
|
||||
|
||||
msg_Dbg(wnd, "new configuration: %"PRId32"x%"PRId32, width, height);
|
||||
vout_window_ReportSize(wnd, width, height);
|
||||
vlc_window_ReportSize(wnd, width, height);
|
||||
(void) toplevel; (void) edges;
|
||||
}
|
||||
|
||||
|
@ -413,7 +413,7 @@ static const struct wl_shell_surface_listener wl_shell_surface_cbs =
|
|||
static void register_wl_compositor(void *data, struct wl_registry *registry,
|
||||
uint32_t name, uint32_t vers)
|
||||
{
|
||||
vout_window_t *wnd = data;
|
||||
vlc_window_t *wnd = data;
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
if (likely(sys->compositor == NULL))
|
||||
|
@ -424,7 +424,7 @@ static void register_wl_compositor(void *data, struct wl_registry *registry,
|
|||
static void register_wl_output(void *data, struct wl_registry *registry,
|
||||
uint32_t name, uint32_t vers)
|
||||
{
|
||||
vout_window_t *wnd = data;
|
||||
vlc_window_t *wnd = data;
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
output_create(sys->outputs, registry, name, vers);
|
||||
|
@ -433,7 +433,7 @@ static void register_wl_output(void *data, struct wl_registry *registry,
|
|||
static void register_wl_seat(void *data, struct wl_registry *registry,
|
||||
uint32_t name, uint32_t vers)
|
||||
{
|
||||
vout_window_t *wnd = data;
|
||||
vlc_window_t *wnd = data;
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
seat_create(wnd, registry, name, vers, &sys->seats);
|
||||
|
@ -443,7 +443,7 @@ static void register_wl_seat(void *data, struct wl_registry *registry,
|
|||
static void register_wl_shell(void *data, struct wl_registry *registry,
|
||||
uint32_t name, uint32_t vers)
|
||||
{
|
||||
vout_window_t *wnd = data;
|
||||
vlc_window_t *wnd = data;
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
if (likely(sys->wm_base == NULL))
|
||||
|
@ -455,7 +455,7 @@ static void register_wl_shell(void *data, struct wl_registry *registry,
|
|||
static void register_wl_shm(void *data, struct wl_registry *registry,
|
||||
uint32_t name, uint32_t vers)
|
||||
{
|
||||
vout_window_t *wnd = data;
|
||||
vlc_window_t *wnd = data;
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
if (likely(sys->shm == NULL))
|
||||
|
@ -466,7 +466,7 @@ static void register_wl_shm(void *data, struct wl_registry *registry,
|
|||
static void register_xdg_wm_base(void *data, struct wl_registry *registry,
|
||||
uint32_t name, uint32_t vers)
|
||||
{
|
||||
vout_window_t *wnd = data;
|
||||
vlc_window_t *wnd = data;
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
if (likely(sys->wm_base == NULL))
|
||||
|
@ -478,7 +478,7 @@ static void register_xdg_decoration_manager(void *data,
|
|||
struct wl_registry *registry,
|
||||
uint32_t name, uint32_t vers)
|
||||
{
|
||||
vout_window_t *wnd = data;
|
||||
vlc_window_t *wnd = data;
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
if (likely(sys->deco_manager == NULL))
|
||||
|
@ -520,7 +520,7 @@ static int rghcmp(const void *a, const void *b)
|
|||
static void registry_global_cb(void *data, struct wl_registry *registry,
|
||||
uint32_t name, const char *iface, uint32_t vers)
|
||||
{
|
||||
vout_window_t *wnd = data;
|
||||
vlc_window_t *wnd = data;
|
||||
const struct registry_handler *h;
|
||||
|
||||
msg_Dbg(wnd, "global %3"PRIu32": %s version %"PRIu32, name, iface, vers);
|
||||
|
@ -538,7 +538,7 @@ static void registry_global_cb(void *data, struct wl_registry *registry,
|
|||
static void registry_global_remove_cb(void *data, struct wl_registry *registry,
|
||||
uint32_t name)
|
||||
{
|
||||
vout_window_t *wnd = data;
|
||||
vlc_window_t *wnd = data;
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
msg_Dbg(wnd, "global remove %3"PRIu32, name);
|
||||
|
@ -561,7 +561,7 @@ static const struct wl_registry_listener registry_cbs =
|
|||
registry_global_remove_cb,
|
||||
};
|
||||
|
||||
struct wl_surface *window_get_cursor(vout_window_t *wnd, int32_t *restrict hsx,
|
||||
struct wl_surface *window_get_cursor(vlc_window_t *wnd, int32_t *restrict hsx,
|
||||
int32_t *restrict hsy)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
@ -590,7 +590,7 @@ struct wl_surface *window_get_cursor(vout_window_t *wnd, int32_t *restrict hsx,
|
|||
/**
|
||||
* Creates a Wayland shell surface.
|
||||
*/
|
||||
static int Open(vout_window_t *wnd)
|
||||
static int Open(vlc_window_t *wnd)
|
||||
{
|
||||
vout_window_sys_t *sys = malloc(sizeof (*sys));
|
||||
if (unlikely(sys == NULL))
|
||||
|
@ -704,7 +704,7 @@ static int Open(vout_window_t *wnd)
|
|||
wnd);
|
||||
#endif
|
||||
|
||||
wnd->type = VOUT_WINDOW_TYPE_WAYLAND;
|
||||
wnd->type = VLC_WINDOW_TYPE_WAYLAND;
|
||||
wnd->handle.wl = surface;
|
||||
wnd->display.wl = display;
|
||||
wnd->ops = &ops;
|
||||
|
@ -749,7 +749,7 @@ error:
|
|||
/**
|
||||
* Destroys a XDG shell surface.
|
||||
*/
|
||||
static void Close(vout_window_t *wnd)
|
||||
static void Close(vlc_window_t *wnd)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
|
|
|
@ -30,20 +30,20 @@
|
|||
#include <vlc_plugin.h>
|
||||
#include <vlc_vout_window.h>
|
||||
|
||||
static int Enable(vout_window_t *wnd, const vout_window_cfg_t *cfg)
|
||||
static int Enable(vlc_window_t *wnd, const vlc_window_cfg_t *cfg)
|
||||
{
|
||||
vout_window_ReportSize(wnd, cfg->width, cfg->height);
|
||||
vlc_window_ReportSize(wnd, cfg->width, cfg->height);
|
||||
return VLC_SUCCESS;
|
||||
}
|
||||
|
||||
static const struct vout_window_operations ops = {
|
||||
static const struct vlc_window_operations ops = {
|
||||
.enable = Enable,
|
||||
.resize = vout_window_ReportSize,
|
||||
.resize = vlc_window_ReportSize,
|
||||
};
|
||||
|
||||
static int Open(vout_window_t *wnd)
|
||||
static int Open(vlc_window_t *wnd)
|
||||
{
|
||||
wnd->type = VOUT_WINDOW_TYPE_DUMMY;
|
||||
wnd->type = VLC_WINDOW_TYPE_DUMMY;
|
||||
wnd->ops = &ops;
|
||||
return VLC_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include <vlc/libvlc_renderer_discoverer.h>
|
||||
#include <vlc/libvlc_media_player.h>
|
||||
|
||||
static int Open(vout_window_t *);
|
||||
static int Open(vlc_window_t *);
|
||||
|
||||
vlc_module_begin()
|
||||
set_shortname(N_("Callback window"))
|
||||
|
@ -53,11 +53,11 @@ typedef struct {
|
|||
|
||||
static void WindowResize(void *opaque, unsigned width, unsigned height)
|
||||
{
|
||||
vout_window_t *window = opaque;
|
||||
vout_window_ReportSize(window, width, height);
|
||||
vlc_window_t *window = opaque;
|
||||
vlc_window_ReportSize(window, width, height);
|
||||
}
|
||||
|
||||
static int Enable(struct vout_window_t *wnd, const vout_window_cfg_t *wcfg)
|
||||
static int Enable(struct vlc_window *wnd, const vlc_window_cfg_t *wcfg)
|
||||
{
|
||||
wextern_t *sys = wnd->sys;
|
||||
|
||||
|
@ -69,7 +69,7 @@ static int Enable(struct vout_window_t *wnd, const vout_window_cfg_t *wcfg)
|
|||
return VLC_SUCCESS;
|
||||
}
|
||||
|
||||
static void Disable(struct vout_window_t *wnd)
|
||||
static void Disable(struct vlc_window *wnd)
|
||||
{
|
||||
wextern_t *sys = wnd->sys;
|
||||
|
||||
|
@ -77,14 +77,14 @@ static void Disable(struct vout_window_t *wnd)
|
|||
sys->setResizeCb( sys->opaque, NULL, NULL );
|
||||
}
|
||||
|
||||
static const struct vout_window_operations ops = {
|
||||
static const struct vlc_window_operations ops = {
|
||||
.enable = Enable,
|
||||
.disable = Disable,
|
||||
// .resize: don't let the core resize us on zoom/crop/ar changes
|
||||
// the display module should do the ReportSize for us
|
||||
};
|
||||
|
||||
static int Open(vout_window_t *wnd)
|
||||
static int Open(vlc_window_t *wnd)
|
||||
{
|
||||
wextern_t *sys = vlc_obj_malloc(VLC_OBJECT(wnd), sizeof(*sys));
|
||||
if (unlikely(sys==NULL))
|
||||
|
@ -93,7 +93,7 @@ static int Open(vout_window_t *wnd)
|
|||
sys->setResizeCb = var_InheritAddress( wnd, "vout-cb-resize-cb" );
|
||||
|
||||
wnd->sys = sys;
|
||||
wnd->type = VOUT_WINDOW_TYPE_DUMMY;
|
||||
wnd->type = VLC_WINDOW_TYPE_DUMMY;
|
||||
wnd->ops = &ops;
|
||||
return VLC_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -388,7 +388,7 @@ static int Open(vout_display_t *vd,
|
|||
if ( sys->swapCb == NULL || sys->startEndRenderingCb == NULL || sys->updateOutputCb == NULL )
|
||||
{
|
||||
#ifndef VLC_WINSTORE_APP
|
||||
if (vd->cfg->window->type == VOUT_WINDOW_TYPE_HWND)
|
||||
if (vd->cfg->window->type == VLC_WINDOW_TYPE_HWND)
|
||||
{
|
||||
if (CommonWindowInit(vd, &sys->area, &sys->sys,
|
||||
vd->source->projection_mode != PROJECTION_MODE_RECTANGULAR))
|
||||
|
@ -399,7 +399,7 @@ static int Open(vout_display_t *vd,
|
|||
|
||||
/* use our internal swapchain callbacks */
|
||||
#if defined(HAVE_DCOMP_H) && !defined(VLC_WINSTORE_APP)
|
||||
if (vd->cfg->window->type == VOUT_WINDOW_TYPE_DCOMP)
|
||||
if (vd->cfg->window->type == VLC_WINDOW_TYPE_DCOMP)
|
||||
sys->outside_opaque =
|
||||
D3D11_CreateLocalSwapchainHandleDComp(VLC_OBJECT(vd),
|
||||
vd->cfg->window->display.dcomp_device,
|
||||
|
@ -426,7 +426,7 @@ static int Open(vout_display_t *vd,
|
|||
goto error;
|
||||
}
|
||||
|
||||
vout_window_SetTitle(vd->cfg->window, VOUT_TITLE " (Direct3D11 output)");
|
||||
vlc_window_SetTitle(vd->cfg->window, VOUT_TITLE " (Direct3D11 output)");
|
||||
msg_Dbg(vd, "Direct3D11 display adapter successfully initialized");
|
||||
|
||||
vd->info.can_scale_spu = true;
|
||||
|
|
|
@ -1884,7 +1884,7 @@ static int Open(vout_display_t *vd,
|
|||
vd->ops = &ops;
|
||||
|
||||
/* Change the window title bar text */
|
||||
vout_window_SetTitle(vd->cfg->window, VOUT_TITLE " (Direct3D9 output)");
|
||||
vlc_window_SetTitle(vd->cfg->window, VOUT_TITLE " (Direct3D9 output)");
|
||||
|
||||
return VLC_SUCCESS;
|
||||
error:
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
"Video will be embedded in this pre-existing window. " \
|
||||
"If zero, a new window will be created.")
|
||||
|
||||
static int Open(vout_window_t *);
|
||||
static void Close(vout_window_t *);
|
||||
static int Open(vlc_window_t *);
|
||||
static void Close(vlc_window_t *);
|
||||
|
||||
/*
|
||||
* Module descriptor
|
||||
|
@ -59,7 +59,7 @@ vlc_module_end ()
|
|||
static vlc_mutex_t serializer = VLC_STATIC_MUTEX;
|
||||
static HWND *used = NULL;
|
||||
|
||||
static const struct vout_window_operations ops = {
|
||||
static const struct vlc_window_operations ops = {
|
||||
.destroy = Close,
|
||||
};
|
||||
|
||||
|
@ -72,7 +72,7 @@ struct drawable_sys
|
|||
{
|
||||
vlc_sem_t hwnd_set;
|
||||
|
||||
vout_window_t *wnd;
|
||||
vlc_window_t *wnd;
|
||||
HWND hWnd;
|
||||
HWND embed_hwnd;
|
||||
RECT rect_parent;
|
||||
|
@ -94,7 +94,7 @@ static LRESULT CALLBACK WinVoutEventProc(HWND hwnd, UINT message,
|
|||
return DefWindowProc(hwnd, message, wParam, lParam);
|
||||
struct drawable_sys *sys = (struct drawable_sys *)p_user_data;
|
||||
|
||||
vout_window_t *wnd = sys->wnd;
|
||||
vlc_window_t *wnd = sys->wnd;
|
||||
|
||||
RECT clientRect;
|
||||
GetClientRect(sys->embed_hwnd, &clientRect);
|
||||
|
@ -120,7 +120,7 @@ static LRESULT CALLBACK WinVoutEventProc(HWND hwnd, UINT message,
|
|||
break;
|
||||
|
||||
case WM_CLOSE:
|
||||
vout_window_ReportClose(wnd);
|
||||
vlc_window_ReportClose(wnd);
|
||||
return 0;
|
||||
|
||||
/* the window has been closed so shut down everything now */
|
||||
|
@ -130,7 +130,7 @@ static LRESULT CALLBACK WinVoutEventProc(HWND hwnd, UINT message,
|
|||
return 0;
|
||||
|
||||
case WM_SIZE:
|
||||
vout_window_ReportSize(wnd, LOWORD(lParam), HIWORD(lParam));
|
||||
vlc_window_ReportSize(wnd, LOWORD(lParam), HIWORD(lParam));
|
||||
return 0;
|
||||
|
||||
default:
|
||||
|
@ -208,7 +208,7 @@ static void RemoveDrawable(HWND val)
|
|||
/**
|
||||
* Find the drawable set by libvlc application.
|
||||
*/
|
||||
static int Open(vout_window_t *wnd)
|
||||
static int Open(vlc_window_t *wnd)
|
||||
{
|
||||
uintptr_t drawable = var_InheritInteger (wnd, "drawable-hwnd");
|
||||
if (drawable == 0)
|
||||
|
@ -282,7 +282,7 @@ static int Open(vout_window_t *wnd)
|
|||
goto error;
|
||||
}
|
||||
|
||||
wnd->type = VOUT_WINDOW_TYPE_HWND;
|
||||
wnd->type = VLC_WINDOW_TYPE_HWND;
|
||||
wnd->handle.hwnd = (void *)sys->hWnd;
|
||||
wnd->ops = &ops;
|
||||
wnd->sys = (void *)sys;
|
||||
|
@ -297,7 +297,7 @@ error:
|
|||
/**
|
||||
* Release the drawable.
|
||||
*/
|
||||
static void Close (vout_window_t *wnd)
|
||||
static void Close (vlc_window_t *wnd)
|
||||
{
|
||||
struct drawable_sys *sys = wnd->sys;
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ struct event_thread_t
|
|||
RECT window_area;
|
||||
|
||||
/* */
|
||||
vout_window_t *parent_window;
|
||||
vlc_window_t *parent_window;
|
||||
WCHAR class_video[256];
|
||||
HWND hparent;
|
||||
HWND hvideownd;
|
||||
|
@ -136,9 +136,9 @@ static void *EventThread( void *p_this )
|
|||
return NULL;
|
||||
}
|
||||
|
||||
event_thread_t *EventThreadCreate( vlc_object_t *obj, vout_window_t *parent_window)
|
||||
event_thread_t *EventThreadCreate( vlc_object_t *obj, vlc_window_t *parent_window)
|
||||
{
|
||||
if (parent_window->type != VOUT_WINDOW_TYPE_HWND)
|
||||
if (parent_window->type != VLC_WINDOW_TYPE_HWND)
|
||||
return NULL;
|
||||
/* Create the Vout EventThread, this thread is created by us to isolate
|
||||
* the Win32 PeekMessage function calls. We want to do this because
|
||||
|
@ -248,7 +248,7 @@ static long FAR PASCAL VideoEventProc( HWND hwnd, UINT message,
|
|||
{
|
||||
/* the user wants to close the window */
|
||||
case WM_CLOSE:
|
||||
vout_window_ReportClose(p_event->parent_window);
|
||||
vlc_window_ReportClose(p_event->parent_window);
|
||||
return 0;
|
||||
|
||||
/* the window has been closed so shut down everything now */
|
||||
|
@ -298,7 +298,7 @@ static int Win32VoutCreateWindow( event_thread_t *p_event )
|
|||
hInstance = GetModuleHandle(NULL);
|
||||
|
||||
/* If an external window was specified, we'll draw in it. */
|
||||
assert( p_event->parent_window->type == VOUT_WINDOW_TYPE_HWND );
|
||||
assert( p_event->parent_window->type == VLC_WINDOW_TYPE_HWND );
|
||||
p_event->hparent = p_event->parent_window->handle.hwnd;
|
||||
|
||||
/* Fill in the window class structure */
|
||||
|
|
|
@ -36,12 +36,12 @@ typedef struct {
|
|||
} event_cfg_t;
|
||||
|
||||
typedef struct {
|
||||
vout_window_t *parent_window;
|
||||
vlc_window_t *parent_window;
|
||||
HWND hparent;
|
||||
HWND hvideownd;
|
||||
} event_hwnd_t;
|
||||
|
||||
event_thread_t *EventThreadCreate( vlc_object_t *, vout_window_t *);
|
||||
event_thread_t *EventThreadCreate( vlc_object_t *, vlc_window_t *);
|
||||
void EventThreadDestroy( event_thread_t * );
|
||||
int EventThreadStart( event_thread_t *, event_hwnd_t *, const event_cfg_t * );
|
||||
void EventThreadStop( event_thread_t * );
|
||||
|
|
|
@ -87,19 +87,19 @@ static int Control(vout_display_t *vd, int query)
|
|||
return CommonControl(vd, &sys->area, &sys->sys, query);
|
||||
}
|
||||
|
||||
static const struct vout_window_operations embedVideoWindow_Ops =
|
||||
static const struct vlc_window_operations embedVideoWindow_Ops =
|
||||
{
|
||||
};
|
||||
|
||||
static vout_window_t *EmbedVideoWindow_Create(vout_display_t *vd)
|
||||
static vlc_window_t *EmbedVideoWindow_Create(vout_display_t *vd)
|
||||
{
|
||||
vout_display_sys_t *sys = vd->sys;
|
||||
|
||||
vout_window_t *wnd = vlc_object_create(vd, sizeof(vout_window_t));
|
||||
vlc_window_t *wnd = vlc_object_create(vd, sizeof(vlc_window_t));
|
||||
if (!wnd)
|
||||
return NULL;
|
||||
|
||||
wnd->type = VOUT_WINDOW_TYPE_HWND;
|
||||
wnd->type = VLC_WINDOW_TYPE_HWND;
|
||||
wnd->handle.hwnd = sys->sys.hvideownd;
|
||||
wnd->ops = &embedVideoWindow_Ops;
|
||||
return wnd;
|
||||
|
@ -139,7 +139,7 @@ static int Open(vout_display_t *vd,
|
|||
if (vd->source->projection_mode != PROJECTION_MODE_RECTANGULAR)
|
||||
sys->p_sensors = HookWindowsSensors(vd, sys->sys.hvideownd);
|
||||
|
||||
vout_window_SetTitle(vd->cfg->window, VOUT_TITLE " (OpenGL output)");
|
||||
vlc_window_SetTitle(vd->cfg->window, VOUT_TITLE " (OpenGL output)");
|
||||
|
||||
vout_display_cfg_t embed_cfg = *vd->cfg;
|
||||
embed_cfg.window = EmbedVideoWindow_Create(vd);
|
||||
|
@ -188,7 +188,7 @@ static void Close(vout_display_t *vd)
|
|||
|
||||
if (gl)
|
||||
{
|
||||
vout_window_t *surface = gl->surface;
|
||||
vlc_window_t *surface = gl->surface;
|
||||
if (sys->vgl)
|
||||
{
|
||||
vlc_gl_MakeCurrent (gl);
|
||||
|
|
|
@ -162,8 +162,8 @@ static int Open(vlc_gl_t *gl, unsigned width, unsigned height)
|
|||
int nVidiaAffinity = var_InheritInteger(gl, "gpu-affinity");
|
||||
if (nVidiaAffinity >= 0) CreateGPUAffinityDC(gl, nVidiaAffinity);
|
||||
|
||||
vout_window_t *wnd = gl->surface;
|
||||
if (wnd->type != VOUT_WINDOW_TYPE_HWND || wnd->handle.hwnd == 0)
|
||||
vlc_window_t *wnd = gl->surface;
|
||||
if (wnd->type != VLC_WINDOW_TYPE_HWND || wnd->handle.hwnd == 0)
|
||||
goto error;
|
||||
|
||||
sys->hvideownd = wnd->handle.hwnd;
|
||||
|
|
|
@ -77,7 +77,7 @@ typedef struct vout_window_sys_t
|
|||
} vout_window_sys_t;
|
||||
|
||||
|
||||
static void Resize(vout_window_t *wnd, unsigned width, unsigned height)
|
||||
static void Resize(vlc_window_t *wnd, unsigned width, unsigned height)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
|
@ -96,7 +96,7 @@ static void Resize(vout_window_t *wnd, unsigned width, unsigned height)
|
|||
SWP_NOZORDER|SWP_NOMOVE);
|
||||
}
|
||||
|
||||
static int Enable(vout_window_t *wnd, const vout_window_cfg_t *cfg)
|
||||
static int Enable(vlc_window_t *wnd, const vlc_window_cfg_t *cfg)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
|
@ -123,19 +123,19 @@ static int Enable(vout_window_t *wnd, const vout_window_cfg_t *cfg)
|
|||
return VLC_SUCCESS;
|
||||
}
|
||||
|
||||
static void Disable(struct vout_window_t *wnd)
|
||||
static void Disable(struct vlc_window *wnd)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
ShowWindow( sys->hwnd, SW_HIDE );
|
||||
}
|
||||
|
||||
static void SetState(vout_window_t *wnd, unsigned state)
|
||||
static void SetState(vlc_window_t *wnd, unsigned state)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
PostMessage( sys->hwnd, WM_VLC_SET_TOP_STATE, state, 0);
|
||||
}
|
||||
|
||||
static void SetTitle(vout_window_t *wnd, const char *title)
|
||||
static void SetTitle(vlc_window_t *wnd, const char *title)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
char *psz_title = var_InheritString( wnd, "video-title" );
|
||||
|
@ -150,7 +150,7 @@ static void SetTitle(vout_window_t *wnd, const char *title)
|
|||
PostMessage( sys->hwnd, WM_VLC_CHANGE_TEXT, 0, 0 );
|
||||
}
|
||||
|
||||
static void SetFullscreen(vout_window_t *wnd, const char *id)
|
||||
static void SetFullscreen(vlc_window_t *wnd, const char *id)
|
||||
{
|
||||
VLC_UNUSED(id);
|
||||
msg_Dbg(wnd, "entering fullscreen mode");
|
||||
|
@ -178,7 +178,7 @@ static void SetFullscreen(vout_window_t *wnd, const char *id)
|
|||
SWP_NOZORDER|SWP_FRAMECHANGED);
|
||||
}
|
||||
|
||||
static void UnsetFullscreen(vout_window_t *wnd)
|
||||
static void UnsetFullscreen(vlc_window_t *wnd)
|
||||
{
|
||||
msg_Dbg(wnd, "leaving fullscreen mode");
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
@ -193,11 +193,11 @@ static void UnsetFullscreen(vout_window_t *wnd)
|
|||
ShowWindow(sys->hwnd, SW_SHOWNORMAL);
|
||||
}
|
||||
|
||||
static void SetAbove( vout_window_t *wnd, enum vout_window_state state )
|
||||
static void SetAbove( vlc_window_t *wnd, enum vlc_window_state state )
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
switch (state) {
|
||||
case VOUT_WINDOW_STATE_NORMAL:
|
||||
case VLC_WINDOW_STATE_NORMAL:
|
||||
if ((GetWindowLong(sys->hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST))
|
||||
{
|
||||
HMENU hMenu = GetSystemMenu(sys->hwnd, FALSE);
|
||||
|
@ -205,7 +205,7 @@ static void SetAbove( vout_window_t *wnd, enum vout_window_state state )
|
|||
SetWindowPos(sys->hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE);
|
||||
}
|
||||
break;
|
||||
case VOUT_WINDOW_STATE_ABOVE:
|
||||
case VLC_WINDOW_STATE_ABOVE:
|
||||
if (!(GetWindowLong(sys->hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST))
|
||||
{
|
||||
HMENU hMenu = GetSystemMenu(sys->hwnd, FALSE);
|
||||
|
@ -213,29 +213,29 @@ static void SetAbove( vout_window_t *wnd, enum vout_window_state state )
|
|||
SetWindowPos(sys->hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
|
||||
}
|
||||
break;
|
||||
case VOUT_WINDOW_STATE_BELOW:
|
||||
case VLC_WINDOW_STATE_BELOW:
|
||||
SetWindowPos(sys->hwnd, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
static void MousePressed( vout_window_t *wnd, HWND hwnd, unsigned button )
|
||||
static void MousePressed( vlc_window_t *wnd, HWND hwnd, unsigned button )
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
if( !sys->button_pressed )
|
||||
SetCapture( hwnd );
|
||||
sys->button_pressed |= 1 << button;
|
||||
vout_window_ReportMousePressed(wnd, button);
|
||||
vlc_window_ReportMousePressed(wnd, button);
|
||||
}
|
||||
|
||||
static void MouseReleased( vout_window_t *wnd, unsigned button )
|
||||
static void MouseReleased( vlc_window_t *wnd, unsigned button )
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
sys->button_pressed &= ~(1 << button);
|
||||
if( !sys->button_pressed )
|
||||
ReleaseCapture();
|
||||
vout_window_ReportMouseReleased(wnd, button);
|
||||
vlc_window_ReportMouseReleased(wnd, button);
|
||||
}
|
||||
|
||||
|
||||
|
@ -332,12 +332,12 @@ static long FAR PASCAL WinVoutEventProc( HWND hwnd, UINT message,
|
|||
LONG_PTR p_user_data = GetWindowLongPtr( hwnd, GWLP_USERDATA );
|
||||
if( p_user_data == 0 )
|
||||
return DefWindowProc(hwnd, message, wParam, lParam);
|
||||
vout_window_t *wnd = (vout_window_t *)p_user_data;
|
||||
vlc_window_t *wnd = (vlc_window_t *)p_user_data;
|
||||
|
||||
switch( message )
|
||||
{
|
||||
case WM_CLOSE:
|
||||
vout_window_ReportClose(wnd);
|
||||
vlc_window_ReportClose(wnd);
|
||||
break;
|
||||
|
||||
case WM_DESTROY:
|
||||
|
@ -345,11 +345,11 @@ static long FAR PASCAL WinVoutEventProc( HWND hwnd, UINT message,
|
|||
break;
|
||||
|
||||
case WM_SIZE:
|
||||
vout_window_ReportSize(wnd, LOWORD(lParam), HIWORD(lParam));
|
||||
vlc_window_ReportSize(wnd, LOWORD(lParam), HIWORD(lParam));
|
||||
return 0;
|
||||
|
||||
case WM_MOUSEMOVE:
|
||||
vout_window_ReportMouseMoved(wnd, LOWORD(lParam), HIWORD(lParam));
|
||||
vlc_window_ReportMouseMoved(wnd, LOWORD(lParam), HIWORD(lParam));
|
||||
break;
|
||||
case WM_NCMOUSEMOVE:
|
||||
break;
|
||||
|
@ -361,7 +361,7 @@ static long FAR PASCAL WinVoutEventProc( HWND hwnd, UINT message,
|
|||
{
|
||||
unsigned m = 1 << button;
|
||||
if( sys->button_pressed & m )
|
||||
vout_window_ReportMouseReleased(wnd, button);
|
||||
vlc_window_ReportMouseReleased(wnd, button);
|
||||
sys->button_pressed &= ~m;
|
||||
}
|
||||
sys->button_pressed = 0;
|
||||
|
@ -375,7 +375,7 @@ static long FAR PASCAL WinVoutEventProc( HWND hwnd, UINT message,
|
|||
MouseReleased( wnd, MOUSE_BUTTON_LEFT );
|
||||
return 0;
|
||||
case WM_LBUTTONDBLCLK:
|
||||
vout_window_ReportMouseDoubleClick(wnd, MOUSE_BUTTON_LEFT);
|
||||
vlc_window_ReportMouseDoubleClick(wnd, MOUSE_BUTTON_LEFT);
|
||||
return 0;
|
||||
|
||||
case WM_MBUTTONDOWN:
|
||||
|
@ -385,7 +385,7 @@ static long FAR PASCAL WinVoutEventProc( HWND hwnd, UINT message,
|
|||
MouseReleased( wnd, MOUSE_BUTTON_CENTER );
|
||||
return 0;
|
||||
case WM_MBUTTONDBLCLK:
|
||||
vout_window_ReportMouseDoubleClick(wnd, MOUSE_BUTTON_CENTER);
|
||||
vlc_window_ReportMouseDoubleClick(wnd, MOUSE_BUTTON_CENTER);
|
||||
return 0;
|
||||
|
||||
case WM_RBUTTONDOWN:
|
||||
|
@ -395,7 +395,7 @@ static long FAR PASCAL WinVoutEventProc( HWND hwnd, UINT message,
|
|||
MouseReleased( wnd, MOUSE_BUTTON_RIGHT );
|
||||
return 0;
|
||||
case WM_RBUTTONDBLCLK:
|
||||
vout_window_ReportMouseDoubleClick(wnd, MOUSE_BUTTON_RIGHT);
|
||||
vlc_window_ReportMouseDoubleClick(wnd, MOUSE_BUTTON_RIGHT);
|
||||
return 0;
|
||||
|
||||
case WM_KEYDOWN:
|
||||
|
@ -426,7 +426,7 @@ static long FAR PASCAL WinVoutEventProc( HWND hwnd, UINT message,
|
|||
i_key |= KEY_MODIFIER_ALT;
|
||||
}
|
||||
|
||||
vout_window_ReportKeyPress(wnd, i_key);
|
||||
vlc_window_ReportKeyPress(wnd, i_key);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -438,7 +438,7 @@ static long FAR PASCAL WinVoutEventProc( HWND hwnd, UINT message,
|
|||
{
|
||||
HMENU hMenu = GetSystemMenu(hwnd, FALSE);
|
||||
const bool is_on_top = (GetMenuState(hMenu, IDM_TOGGLE_ON_TOP, MF_BYCOMMAND) & MF_CHECKED) == 0;
|
||||
SetAbove( wnd, is_on_top ? VOUT_WINDOW_STATE_ABOVE : VOUT_WINDOW_STATE_NORMAL );
|
||||
SetAbove( wnd, is_on_top ? VLC_WINDOW_STATE_ABOVE : VLC_WINDOW_STATE_NORMAL );
|
||||
return 0;
|
||||
}
|
||||
default:
|
||||
|
@ -447,7 +447,7 @@ static long FAR PASCAL WinVoutEventProc( HWND hwnd, UINT message,
|
|||
break;
|
||||
|
||||
case WM_VLC_SET_TOP_STATE:
|
||||
SetAbove( wnd, (enum vout_window_state) wParam);
|
||||
SetAbove( wnd, (enum vlc_window_state) wParam);
|
||||
return 0;
|
||||
|
||||
case WM_VLC_CHANGE_TEXT:
|
||||
|
@ -467,7 +467,7 @@ static long FAR PASCAL WinVoutEventProc( HWND hwnd, UINT message,
|
|||
return DefWindowProc(hwnd, message, wParam, lParam);
|
||||
}
|
||||
|
||||
static void Close(vout_window_t *wnd)
|
||||
static void Close(vlc_window_t *wnd)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
|
@ -520,7 +520,7 @@ static HWND GetDesktopHandle(vlc_object_t *obj)
|
|||
return hwnd;
|
||||
}
|
||||
|
||||
static void UpdateCursor( vout_window_t *wnd, bool b_show )
|
||||
static void UpdateCursor( vlc_window_t *wnd, bool b_show )
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
if( sys->is_cursor_hidden == !b_show )
|
||||
|
@ -539,12 +539,12 @@ static void CALLBACK HideMouse(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwT
|
|||
VLC_UNUSED(uMsg); VLC_UNUSED(dwTime);
|
||||
if (hwnd)
|
||||
{
|
||||
vout_window_t *wnd = (vout_window_t *)idEvent;
|
||||
vlc_window_t *wnd = (vlc_window_t *)idEvent;
|
||||
UpdateCursor( wnd, false );
|
||||
}
|
||||
}
|
||||
|
||||
static void UpdateCursorMoved( vout_window_t *wnd )
|
||||
static void UpdateCursorMoved( vlc_window_t *wnd )
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
UpdateCursor( wnd, true );
|
||||
|
@ -580,7 +580,7 @@ static inline bool isMouseEvent( WPARAM type )
|
|||
|
||||
static void *EventThread( void *p_this )
|
||||
{
|
||||
vout_window_t *wnd = (vout_window_t *)p_this;
|
||||
vlc_window_t *wnd = (vlc_window_t *)p_this;
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
int canc = vlc_savecancel ();
|
||||
|
@ -668,7 +668,7 @@ static void *EventThread( void *p_this )
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static const struct vout_window_operations ops = {
|
||||
static const struct vlc_window_operations ops = {
|
||||
.enable = Enable,
|
||||
.disable = Disable,
|
||||
.resize = Resize,
|
||||
|
@ -679,7 +679,7 @@ static const struct vout_window_operations ops = {
|
|||
.destroy = Close,
|
||||
};
|
||||
|
||||
static int Open(vout_window_t *wnd)
|
||||
static int Open(vlc_window_t *wnd)
|
||||
{
|
||||
vout_window_sys_t *sys = vlc_obj_calloc(VLC_OBJECT(wnd), 1, sizeof(vout_window_sys_t));
|
||||
if (unlikely(sys == NULL))
|
||||
|
@ -736,7 +736,7 @@ static int Open(vout_window_t *wnd)
|
|||
}
|
||||
|
||||
wnd->sys = sys;
|
||||
wnd->type = VOUT_WINDOW_TYPE_HWND;
|
||||
wnd->type = VLC_WINDOW_TYPE_HWND;
|
||||
wnd->handle.hwnd = sys->hwnd;
|
||||
wnd->ops = &ops;
|
||||
wnd->info.has_double_click = true;
|
||||
|
|
|
@ -131,7 +131,7 @@ static int Open(vout_display_t *vd,
|
|||
if (Init(vd, fmtp))
|
||||
goto error;
|
||||
|
||||
vout_window_SetTitle(vd->cfg->window, VOUT_TITLE " (WinGDI output)");
|
||||
vlc_window_SetTitle(vd->cfg->window, VOUT_TITLE " (WinGDI output)");
|
||||
|
||||
/* */
|
||||
vd->ops = &ops;
|
||||
|
|
|
@ -70,13 +70,13 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
@interface VLCVideoWindowModuleDelegate : NSObject {
|
||||
@private
|
||||
// VLC window object, only use it on the eventQueue
|
||||
vout_window_t* vlc_vout_window;
|
||||
vlc_window_t* vlc_vout_window;
|
||||
dispatch_queue_t eventQueue;
|
||||
|
||||
BOOL _isViewSet;
|
||||
}
|
||||
|
||||
- (instancetype)initWithVLCVoutWindow:(vout_window_t *)vout_window;
|
||||
- (instancetype)initWithVLCVoutWindow:(vlc_window_t *)vout_window;
|
||||
|
||||
/// Reports that the window is fullscreen now
|
||||
- (void)reportFullscreen;
|
||||
|
@ -131,7 +131,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
}
|
||||
|
||||
- (instancetype)initWithModuleDelegate:(VLCVideoWindowModuleDelegate *)delegate;
|
||||
- (void)showWindowWithConfig:(const vout_window_cfg_t *restrict)config;
|
||||
- (void)showWindowWithConfig:(const vlc_window_cfg_t *restrict)config;
|
||||
|
||||
/* Methods called by the callbacks to change properties of the Window */
|
||||
- (void)setWindowDecorated:(BOOL)decorated;
|
||||
|
@ -145,7 +145,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
|
||||
@implementation VLCVideoWindowModuleDelegate : NSObject
|
||||
|
||||
- (instancetype)initWithVLCVoutWindow:(vout_window_t *)vout_window
|
||||
- (instancetype)initWithVLCVoutWindow:(vlc_window_t *)vout_window
|
||||
{
|
||||
NSAssert(vout_window != NULL,
|
||||
@"VLCVideoWindowDelegate must be initialized with a valid vout_window");
|
||||
|
@ -169,28 +169,28 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
{
|
||||
NSAssert(_isViewSet == NO,
|
||||
@"VLCVideoWindowDelegate's viewObject must only bet set once");
|
||||
vlc_vout_window->type = VOUT_WINDOW_TYPE_NSOBJECT;
|
||||
vlc_vout_window->type = VLC_WINDOW_TYPE_NSOBJECT;
|
||||
vlc_vout_window->handle.nsobject = (__bridge void*)view;
|
||||
}
|
||||
|
||||
- (void)reportFullscreen
|
||||
{
|
||||
[self enqueueEventBlock:^void (void) {
|
||||
vout_window_ReportFullscreen(vlc_vout_window, NULL);
|
||||
vlc_window_ReportFullscreen(vlc_vout_window, NULL);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)reportWindowed
|
||||
{
|
||||
[self enqueueEventBlock:^void (void) {
|
||||
vout_window_ReportWindowed(vlc_vout_window);
|
||||
vlc_window_ReportWindowed(vlc_vout_window);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)reportSizeChanged:(NSSize)newSize
|
||||
{
|
||||
[self enqueueEventBlock:^void (void) {
|
||||
vout_window_ReportSize(vlc_vout_window,
|
||||
vlc_window_ReportSize(vlc_vout_window,
|
||||
(unsigned int)newSize.width,
|
||||
(unsigned int)newSize.height);
|
||||
}];
|
||||
|
@ -199,7 +199,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
- (void)reportClose
|
||||
{
|
||||
[self enqueueEventBlock:^void (void) {
|
||||
vout_window_ReportClose(vlc_vout_window);
|
||||
vlc_window_ReportClose(vlc_vout_window);
|
||||
}];
|
||||
}
|
||||
|
||||
|
@ -268,7 +268,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
/**
|
||||
* Applies the given config to the window and shows it.
|
||||
*/
|
||||
- (void)showWindowWithConfig:(const vout_window_cfg_t *restrict)config
|
||||
- (void)showWindowWithConfig:(const vlc_window_cfg_t *restrict)config
|
||||
{
|
||||
VLC_ASSERT_MAINTHREAD;
|
||||
|
||||
|
@ -416,7 +416,7 @@ typedef struct
|
|||
|
||||
/* Enable Window
|
||||
*/
|
||||
static int WindowEnable(vout_window_t *wnd, const vout_window_cfg_t *restrict cfg)
|
||||
static int WindowEnable(vlc_window_t *wnd, const vlc_window_cfg_t *restrict cfg)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
|
@ -431,7 +431,7 @@ static int WindowEnable(vout_window_t *wnd, const vout_window_cfg_t *restrict cf
|
|||
}
|
||||
|
||||
/* Request to close the window */
|
||||
static void WindowDisable(vout_window_t *wnd)
|
||||
static void WindowDisable(vlc_window_t *wnd)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
|
@ -444,7 +444,7 @@ static void WindowDisable(vout_window_t *wnd)
|
|||
}
|
||||
|
||||
/* Request to resize the window */
|
||||
static void WindowResize(vout_window_t *wnd, unsigned width, unsigned height)
|
||||
static void WindowResize(vlc_window_t *wnd, unsigned width, unsigned height)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
|
@ -464,7 +464,7 @@ static void WindowResize(vout_window_t *wnd, unsigned width, unsigned height)
|
|||
}
|
||||
|
||||
/* Request to enable/disable Window decorations */
|
||||
static void SetDecoration(vout_window_t *wnd, bool decorated)
|
||||
static void SetDecoration(vlc_window_t *wnd, bool decorated)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
|
@ -477,7 +477,7 @@ static void SetDecoration(vout_window_t *wnd, bool decorated)
|
|||
}
|
||||
|
||||
/* Request to enter fullscreen */
|
||||
static void WindowSetFullscreen(vout_window_t *wnd, const char *idstr)
|
||||
static void WindowSetFullscreen(vlc_window_t *wnd, const char *idstr)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
|
@ -490,7 +490,7 @@ static void WindowSetFullscreen(vout_window_t *wnd, const char *idstr)
|
|||
}
|
||||
|
||||
/* Request to exit fullscreen */
|
||||
static void WindowUnsetFullscreen(vout_window_t *wnd)
|
||||
static void WindowUnsetFullscreen(vlc_window_t *wnd)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
|
@ -502,7 +502,7 @@ static void WindowUnsetFullscreen(vout_window_t *wnd)
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowSetTitle(struct vout_window_t *wnd, const char *title)
|
||||
static void WindowSetTitle(struct vlc_window *wnd, const char *title)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
@autoreleasepool {
|
||||
|
@ -516,7 +516,7 @@ static void WindowSetTitle(struct vout_window_t *wnd, const char *title)
|
|||
/*
|
||||
* Module destruction
|
||||
*/
|
||||
void Close(vout_window_t *wnd)
|
||||
void Close(vlc_window_t *wnd)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
|
@ -529,7 +529,7 @@ void Close(vout_window_t *wnd)
|
|||
/*
|
||||
* Callbacks
|
||||
*/
|
||||
static const struct vout_window_operations ops = {
|
||||
static const struct vlc_window_operations ops = {
|
||||
.enable = WindowEnable,
|
||||
.disable = WindowDisable,
|
||||
.resize = WindowResize,
|
||||
|
@ -543,7 +543,7 @@ static const struct vout_window_operations ops = {
|
|||
/*
|
||||
* Module initialization
|
||||
*/
|
||||
int Open(vout_window_t *wnd)
|
||||
int Open(vlc_window_t *wnd)
|
||||
{
|
||||
@autoreleasepool {
|
||||
msg_Info(wnd, "using the macOS new video output window module");
|
||||
|
@ -580,19 +580,19 @@ int Open(vout_window_t *wnd)
|
|||
}
|
||||
}
|
||||
|
||||
static void DrawableClose(vout_window_t *wnd)
|
||||
static void DrawableClose(vlc_window_t *wnd)
|
||||
{
|
||||
id drawable = (__bridge_transfer id)wnd->handle.nsobject;
|
||||
wnd->handle.nsobject = nil;
|
||||
(void)drawable;
|
||||
}
|
||||
|
||||
static const struct vout_window_operations drawable_ops =
|
||||
static const struct vlc_window_operations drawable_ops =
|
||||
{
|
||||
.destroy = DrawableClose,
|
||||
};
|
||||
|
||||
static int DrawableOpen(vout_window_t *wnd)
|
||||
static int DrawableOpen(vlc_window_t *wnd)
|
||||
{
|
||||
id drawable = (__bridge id)
|
||||
var_InheritAddress(wnd, "drawable-nsobject");
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
/*****************************************************************************
|
||||
* Module descriptor
|
||||
*****************************************************************************/
|
||||
static int Open( vout_window_t *wnd );
|
||||
static int Open( vlc_window_t *wnd );
|
||||
|
||||
vlc_module_begin ()
|
||||
set_shortname( N_("OS/2 window"))
|
||||
|
@ -71,21 +71,21 @@ typedef struct vout_window_sys_t
|
|||
* Local prototypes
|
||||
*****************************************************************************/
|
||||
static int ConvertKey( USHORT i_pmkey );
|
||||
static void MousePressed( vout_window_t *wnd, HWND hwnd, unsigned button );
|
||||
static void MouseReleased( vout_window_t *wnd, unsigned button );
|
||||
static void MousePressed( vlc_window_t *wnd, HWND hwnd, unsigned button );
|
||||
static void MouseReleased( vlc_window_t *wnd, unsigned button );
|
||||
static MRESULT EXPENTRY WndProc( HWND hwnd, ULONG msg,
|
||||
MPARAM mp1, MPARAM mp2 );
|
||||
static void MorphToPM( void );
|
||||
static void PMThread( void *arg );
|
||||
|
||||
static int Enable( vout_window_t *wnd, const vout_window_cfg_t *cfg );
|
||||
static void Disable( struct vout_window_t *wnd );
|
||||
static void Resize( vout_window_t *wnd, unsigned width, unsigned height );
|
||||
static void Close(vout_window_t *wnd );
|
||||
static void SetState( vout_window_t *wnd, unsigned state );
|
||||
static void UnsetFullscreen( vout_window_t *wnd );
|
||||
static void SetFullscreen( vout_window_t *wnd, const char *id );
|
||||
static void SetTitle( vout_window_t *wnd, const char *title );
|
||||
static int Enable( vlc_window_t *wnd, const vlc_window_cfg_t *cfg );
|
||||
static void Disable( struct vlc_window *wnd );
|
||||
static void Resize( vlc_window_t *wnd, unsigned width, unsigned height );
|
||||
static void Close(vlc_window_t *wnd );
|
||||
static void SetState( vlc_window_t *wnd, unsigned state );
|
||||
static void UnsetFullscreen( vlc_window_t *wnd );
|
||||
static void SetFullscreen( vlc_window_t *wnd, const char *id );
|
||||
static void SetTitle( vlc_window_t *wnd, const char *title );
|
||||
|
||||
#define WC_VLC_WINDOW_OS2 "WC_VLC_WINDOW_OS2"
|
||||
|
||||
|
@ -172,7 +172,7 @@ static int ConvertKey( USHORT i_pmkey )
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void MousePressed( vout_window_t *wnd, HWND hwnd, unsigned button )
|
||||
static void MousePressed( vlc_window_t *wnd, HWND hwnd, unsigned button )
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
|
@ -184,10 +184,10 @@ static void MousePressed( vout_window_t *wnd, HWND hwnd, unsigned button )
|
|||
|
||||
sys->button_pressed |= 1 << button;
|
||||
|
||||
vout_window_ReportMousePressed( wnd, button );
|
||||
vlc_window_ReportMousePressed( wnd, button );
|
||||
}
|
||||
|
||||
static void MouseReleased( vout_window_t *wnd, unsigned button )
|
||||
static void MouseReleased( vlc_window_t *wnd, unsigned button )
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
|
@ -195,14 +195,14 @@ static void MouseReleased( vout_window_t *wnd, unsigned button )
|
|||
if( !sys->button_pressed )
|
||||
WinSetCapture( HWND_DESKTOP, NULLHANDLE );
|
||||
|
||||
vout_window_ReportMouseReleased(wnd, button);
|
||||
vlc_window_ReportMouseReleased(wnd, button);
|
||||
}
|
||||
|
||||
#define WM_MOUSELEAVE 0x41F
|
||||
|
||||
static MRESULT EXPENTRY WndProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 )
|
||||
{
|
||||
vout_window_t *wnd = WinQueryWindowPtr( hwnd, 0 );
|
||||
vlc_window_t *wnd = WinQueryWindowPtr( hwnd, 0 );
|
||||
MRESULT result = ( MRESULT )TRUE;
|
||||
|
||||
if ( !wnd )
|
||||
|
@ -228,13 +228,13 @@ static MRESULT EXPENTRY WndProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 )
|
|||
{
|
||||
/* the user wants to close the window */
|
||||
case WM_CLOSE:
|
||||
vout_window_ReportClose( wnd );
|
||||
vlc_window_ReportClose( wnd );
|
||||
WinPostMsg( hwnd, WM_QUIT, 0, 0 );
|
||||
result = 0;
|
||||
break;
|
||||
|
||||
case WM_SIZE:
|
||||
vout_window_ReportSize( wnd,
|
||||
vlc_window_ReportSize( wnd,
|
||||
SHORT1FROMMP( mp2 ), SHORT2FROMMP( mp2 ));
|
||||
result = 0;
|
||||
break;
|
||||
|
@ -250,7 +250,7 @@ static MRESULT EXPENTRY WndProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 )
|
|||
int h = rcl.yTop - rcl.yBottom;
|
||||
i_mouse_y = ( h - i_mouse_y ) - 1;
|
||||
|
||||
vout_window_ReportMouseMoved( wnd, i_mouse_x, i_mouse_y );
|
||||
vlc_window_ReportMouseMoved( wnd, i_mouse_x, i_mouse_y );
|
||||
|
||||
result = WinDefWindowProc( hwnd, msg, mp1, mp2 );
|
||||
break;
|
||||
|
@ -281,15 +281,15 @@ static MRESULT EXPENTRY WndProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 )
|
|||
break;
|
||||
|
||||
case WM_BUTTON1DBLCLK :
|
||||
vout_window_ReportMouseDoubleClick( wnd, MOUSE_BUTTON_LEFT );
|
||||
vlc_window_ReportMouseDoubleClick( wnd, MOUSE_BUTTON_LEFT );
|
||||
break;
|
||||
|
||||
case WM_BUTTON2DBLCLK :
|
||||
vout_window_ReportMouseDoubleClick( wnd, MOUSE_BUTTON_RIGHT );
|
||||
vlc_window_ReportMouseDoubleClick( wnd, MOUSE_BUTTON_RIGHT );
|
||||
break;
|
||||
|
||||
case WM_BUTTON3DBLCLK :
|
||||
vout_window_ReportMouseDoubleClick( wnd, MOUSE_BUTTON_CENTER );
|
||||
vlc_window_ReportMouseDoubleClick( wnd, MOUSE_BUTTON_CENTER );
|
||||
break;
|
||||
|
||||
case WM_TRANSLATEACCEL :
|
||||
|
@ -323,7 +323,7 @@ static MRESULT EXPENTRY WndProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 )
|
|||
if( i_flags & KC_ALT )
|
||||
i_key |= KEY_MODIFIER_ALT;
|
||||
|
||||
vout_window_ReportKeyPress( wnd, i_key );
|
||||
vlc_window_ReportKeyPress( wnd, i_key );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -357,7 +357,7 @@ static MRESULT EXPENTRY WndProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 )
|
|||
}
|
||||
|
||||
/* Enable */
|
||||
vout_window_cfg_t *cfg = PVOIDFROMMP( mp2 );
|
||||
vlc_window_cfg_t *cfg = PVOIDFROMMP( mp2 );
|
||||
|
||||
if( cfg->is_decorated )
|
||||
{
|
||||
|
@ -494,7 +494,7 @@ static void MorphToPM( void )
|
|||
|
||||
static void PMThread( void *arg )
|
||||
{
|
||||
vout_window_t *wnd = arg;
|
||||
vlc_window_t *wnd = arg;
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
ULONG i_frame_flags;
|
||||
QMSG qm;
|
||||
|
@ -564,7 +564,7 @@ exit_error:
|
|||
DosPostEventSem( sys->ack_event );
|
||||
}
|
||||
|
||||
static const struct vout_window_operations ops = {
|
||||
static const struct vlc_window_operations ops = {
|
||||
.enable = Enable,
|
||||
.disable = Disable,
|
||||
.resize = Resize,
|
||||
|
@ -575,7 +575,7 @@ static const struct vout_window_operations ops = {
|
|||
.set_title = SetTitle,
|
||||
};
|
||||
|
||||
static int Open( vout_window_t *wnd )
|
||||
static int Open( vlc_window_t *wnd )
|
||||
{
|
||||
vout_window_sys_t *sys;
|
||||
|
||||
|
@ -597,7 +597,7 @@ static int Open( vout_window_t *wnd )
|
|||
return VLC_EGENERIC;
|
||||
}
|
||||
|
||||
wnd->type = VOUT_WINDOW_TYPE_HWND;
|
||||
wnd->type = VLC_WINDOW_TYPE_HWND;
|
||||
wnd->handle.hwnd = ( void * )sys->client;
|
||||
wnd->ops = &ops;
|
||||
wnd->info.has_double_click = true;
|
||||
|
@ -605,11 +605,11 @@ static int Open( vout_window_t *wnd )
|
|||
return VLC_SUCCESS;
|
||||
}
|
||||
|
||||
static int Enable( vout_window_t *wnd, const vout_window_cfg_t *cfg)
|
||||
static int Enable( vlc_window_t *wnd, const vlc_window_cfg_t *cfg)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
vout_window_cfg_t *config = malloc( sizeof( *config ));
|
||||
vlc_window_cfg_t *config = malloc( sizeof( *config ));
|
||||
if( !config )
|
||||
return VLC_ENOMEM;
|
||||
|
||||
|
@ -620,14 +620,14 @@ static int Enable( vout_window_t *wnd, const vout_window_cfg_t *cfg)
|
|||
return VLC_SUCCESS;
|
||||
}
|
||||
|
||||
static void Disable( struct vout_window_t *wnd )
|
||||
static void Disable( struct vlc_window *wnd )
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
WinPostMsg( sys->client, WM_VLC_ENABLE, MPFROMLONG( FALSE ), 0 );
|
||||
}
|
||||
|
||||
static void Resize( vout_window_t *wnd, unsigned width, unsigned height )
|
||||
static void Resize( vlc_window_t *wnd, unsigned width, unsigned height )
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
|
@ -635,7 +635,7 @@ static void Resize( vout_window_t *wnd, unsigned width, unsigned height )
|
|||
MPFROMLONG( width ), MPFROMLONG( height ));
|
||||
}
|
||||
|
||||
static void Close( vout_window_t *wnd )
|
||||
static void Close( vlc_window_t *wnd )
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
|
@ -648,21 +648,21 @@ static void Close( vout_window_t *wnd )
|
|||
free( sys );
|
||||
}
|
||||
|
||||
static void SetState( vout_window_t *wnd, unsigned state )
|
||||
static void SetState( vlc_window_t *wnd, unsigned state )
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
WinPostMsg( sys->client, WM_VLC_SETSTATE, MPFROMLONG( state ), 0 );
|
||||
}
|
||||
|
||||
static void UnsetFullscreen(vout_window_t *wnd)
|
||||
static void UnsetFullscreen(vlc_window_t *wnd)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
WinPostMsg( sys->client, WM_VLC_FULLSCREEN, MPFROMLONG( FALSE ), 0 );
|
||||
}
|
||||
|
||||
static void SetFullscreen(vout_window_t *wnd, const char *id)
|
||||
static void SetFullscreen(vlc_window_t *wnd, const char *id)
|
||||
{
|
||||
VLC_UNUSED( id );
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
@ -670,7 +670,7 @@ static void SetFullscreen(vout_window_t *wnd, const char *id)
|
|||
WinPostMsg( sys->client, WM_VLC_FULLSCREEN, MPFROMLONG( TRUE ), 0 );
|
||||
}
|
||||
|
||||
static void SetTitle(vout_window_t *wnd, const char *title)
|
||||
static void SetTitle(vlc_window_t *wnd, const char *title)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
|
|
|
@ -101,11 +101,11 @@ static const xcb_screen_t *FindScreen(struct vlc_logger *log,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
int vlc_xcb_parent_Create(struct vlc_logger *log, const vout_window_t *wnd,
|
||||
int vlc_xcb_parent_Create(struct vlc_logger *log, const vlc_window_t *wnd,
|
||||
xcb_connection_t **restrict pconn,
|
||||
const xcb_screen_t **restrict pscreen)
|
||||
{
|
||||
if (wnd->type != VOUT_WINDOW_TYPE_XID)
|
||||
if (wnd->type != VLC_WINDOW_TYPE_XID)
|
||||
{
|
||||
vlc_error(log, "window not available");
|
||||
return VLC_ENOTSUP;
|
||||
|
|
|
@ -40,7 +40,7 @@ int vlc_xcb_error_Check(struct vlc_logger *, xcb_connection_t *conn,
|
|||
* Creates a VLC video X window object, connects to the corresponding X server,
|
||||
* finds the corresponding X server screen.
|
||||
*/
|
||||
int vlc_xcb_parent_Create(struct vlc_logger *, const vout_window_t *wnd,
|
||||
int vlc_xcb_parent_Create(struct vlc_logger *, const vlc_window_t *wnd,
|
||||
xcb_connection_t **connp,
|
||||
const xcb_screen_t **screenp);
|
||||
/**
|
||||
|
|
|
@ -73,7 +73,7 @@ typedef struct
|
|||
} vout_window_sys_t;
|
||||
|
||||
#ifdef HAVE_XKBCOMMON
|
||||
static int InitKeyboard(vout_window_t *wnd)
|
||||
static int InitKeyboard(vlc_window_t *wnd)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
xcb_connection_t *conn = sys->conn;
|
||||
|
@ -97,7 +97,7 @@ static int InitKeyboard(vout_window_t *wnd)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void DeinitKeyboard(vout_window_t *wnd)
|
||||
static void DeinitKeyboard(vlc_window_t *wnd)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
|
@ -109,7 +109,7 @@ static void DeinitKeyboard(vout_window_t *wnd)
|
|||
sys->xkb.map = NULL;
|
||||
}
|
||||
|
||||
static void ProcessKeyboardEvent(vout_window_t *wnd,
|
||||
static void ProcessKeyboardEvent(vlc_window_t *wnd,
|
||||
const xcb_generic_event_t *ev)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
@ -137,7 +137,7 @@ static void ProcessKeyboardEvent(vout_window_t *wnd,
|
|||
}
|
||||
}
|
||||
|
||||
static int InitKeyboardExtension(vout_window_t *wnd)
|
||||
static int InitKeyboardExtension(vlc_window_t *wnd)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
xcb_connection_t *conn = sys->conn;
|
||||
|
@ -200,7 +200,7 @@ static int InitKeyboardExtension(vout_window_t *wnd)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void DeinitKeyboardExtension(vout_window_t *wnd)
|
||||
static void DeinitKeyboardExtension(vlc_window_t *wnd)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
|
@ -224,7 +224,7 @@ static xcb_cursor_t CursorCreate(xcb_connection_t *conn, xcb_window_t root)
|
|||
return cur;
|
||||
}
|
||||
|
||||
static int ProcessEvent(vout_window_t *wnd, xcb_generic_event_t *ev)
|
||||
static int ProcessEvent(vlc_window_t *wnd, xcb_generic_event_t *ev)
|
||||
{
|
||||
#ifdef HAVE_XKBCOMMON
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
@ -244,7 +244,7 @@ static int ProcessEvent(vout_window_t *wnd, xcb_generic_event_t *ev)
|
|||
if (vk == KEY_UNSET)
|
||||
break;
|
||||
|
||||
vout_window_ReportKeyPress(wnd, vk);
|
||||
vlc_window_ReportKeyPress(wnd, vk);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
@ -257,7 +257,7 @@ static int ProcessEvent(vout_window_t *wnd, xcb_generic_event_t *ev)
|
|||
{
|
||||
xcb_button_release_event_t *bpe = (void *)ev;
|
||||
|
||||
vout_window_ReportMousePressed(wnd, bpe->detail - 1);
|
||||
vlc_window_ReportMousePressed(wnd, bpe->detail - 1);
|
||||
ret = 1;
|
||||
break;
|
||||
}
|
||||
|
@ -266,7 +266,7 @@ static int ProcessEvent(vout_window_t *wnd, xcb_generic_event_t *ev)
|
|||
{
|
||||
xcb_button_release_event_t *bre = (void *)ev;
|
||||
|
||||
vout_window_ReportMouseReleased(wnd, bre->detail - 1);
|
||||
vlc_window_ReportMouseReleased(wnd, bre->detail - 1);
|
||||
ret = 1;
|
||||
break;
|
||||
}
|
||||
|
@ -275,7 +275,7 @@ static int ProcessEvent(vout_window_t *wnd, xcb_generic_event_t *ev)
|
|||
{
|
||||
xcb_motion_notify_event_t *mne = (void *)ev;
|
||||
|
||||
vout_window_ReportMouseMoved(wnd, mne->event_x, mne->event_y);
|
||||
vlc_window_ReportMouseMoved(wnd, mne->event_x, mne->event_y);
|
||||
ret = 1;
|
||||
break;
|
||||
}
|
||||
|
@ -283,11 +283,11 @@ static int ProcessEvent(vout_window_t *wnd, xcb_generic_event_t *ev)
|
|||
case XCB_CONFIGURE_NOTIFY:
|
||||
{
|
||||
xcb_configure_notify_event_t *cne = (void *)ev;
|
||||
vout_window_ReportSize (wnd, cne->width, cne->height);
|
||||
vlc_window_ReportSize (wnd, cne->width, cne->height);
|
||||
break;
|
||||
}
|
||||
case XCB_DESTROY_NOTIFY:
|
||||
vout_window_ReportClose (wnd);
|
||||
vlc_window_ReportClose (wnd);
|
||||
break;
|
||||
|
||||
case XCB_UNMAP_NOTIFY:
|
||||
|
@ -321,7 +321,7 @@ static int ProcessEvent(vout_window_t *wnd, xcb_generic_event_t *ev)
|
|||
/** Background thread for X11 events handling */
|
||||
static void *Thread (void *data)
|
||||
{
|
||||
vout_window_t *wnd = data;
|
||||
vlc_window_t *wnd = data;
|
||||
vout_window_sys_t *p_sys = wnd->sys;
|
||||
xcb_connection_t *conn = p_sys->conn;
|
||||
struct pollfd ufd = {
|
||||
|
@ -390,7 +390,7 @@ static void *Thread (void *data)
|
|||
#define NET_WM_STATE_TOGGLE 2
|
||||
|
||||
/** Changes the EWMH state of the (mapped) window */
|
||||
static void change_wm_state (vout_window_t *wnd, bool on, xcb_atom_t state)
|
||||
static void change_wm_state (vlc_window_t *wnd, bool on, xcb_atom_t state)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
/* From EWMH "_WM_STATE" */
|
||||
|
@ -413,7 +413,7 @@ static void change_wm_state (vout_window_t *wnd, bool on, xcb_atom_t state)
|
|||
(const char *)&ev);
|
||||
}
|
||||
|
||||
static void Resize(vout_window_t *wnd, unsigned width, unsigned height)
|
||||
static void Resize(vlc_window_t *wnd, unsigned width, unsigned height)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
xcb_connection_t *conn = sys->conn;
|
||||
|
@ -425,18 +425,18 @@ static void Resize(vout_window_t *wnd, unsigned width, unsigned height)
|
|||
xcb_flush(conn);
|
||||
}
|
||||
|
||||
static void SetState(vout_window_t *wnd, unsigned state)
|
||||
static void SetState(vlc_window_t *wnd, unsigned state)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
bool above = (state & VOUT_WINDOW_STATE_ABOVE) != 0;
|
||||
bool below = (state & VOUT_WINDOW_STATE_BELOW) != 0;
|
||||
bool above = (state & VLC_WINDOW_STATE_ABOVE) != 0;
|
||||
bool below = (state & VLC_WINDOW_STATE_BELOW) != 0;
|
||||
|
||||
change_wm_state(wnd, above, sys->wm_state_above);
|
||||
change_wm_state(wnd, below, sys->wm_state_below);
|
||||
xcb_flush(sys->conn);
|
||||
}
|
||||
|
||||
static void UnsetFullscreen(vout_window_t *wnd)
|
||||
static void UnsetFullscreen(vlc_window_t *wnd)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
|
@ -444,7 +444,7 @@ static void UnsetFullscreen(vout_window_t *wnd)
|
|||
xcb_flush(sys->conn);
|
||||
}
|
||||
|
||||
static void SetFullscreen(vout_window_t *wnd, const char *idstr)
|
||||
static void SetFullscreen(vlc_window_t *wnd, const char *idstr)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
|
@ -531,7 +531,7 @@ xcb_atom_t get_atom (xcb_connection_t *conn, xcb_intern_atom_cookie_t ck)
|
|||
return atom;
|
||||
}
|
||||
|
||||
static int Enable(vout_window_t *wnd, const vout_window_cfg_t *restrict cfg)
|
||||
static int Enable(vlc_window_t *wnd, const vlc_window_cfg_t *restrict cfg)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
xcb_connection_t *conn = sys->conn;
|
||||
|
@ -561,14 +561,14 @@ static int Enable(vout_window_t *wnd, const vout_window_cfg_t *restrict cfg)
|
|||
|
||||
if (pr != NULL)
|
||||
{
|
||||
vout_window_ReportMouseMoved(wnd, pr->win_x, pr->win_y);
|
||||
vlc_window_ReportMouseMoved(wnd, pr->win_x, pr->win_y);
|
||||
free(pr);
|
||||
}
|
||||
|
||||
return VLC_SUCCESS;
|
||||
}
|
||||
|
||||
static void Disable(vout_window_t *wnd)
|
||||
static void Disable(vlc_window_t *wnd)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
xcb_connection_t *conn = sys->conn;
|
||||
|
@ -577,9 +577,9 @@ static void Disable(vout_window_t *wnd)
|
|||
xcb_flush(conn);
|
||||
}
|
||||
|
||||
static void Close(vout_window_t *);
|
||||
static void Close(vlc_window_t *);
|
||||
|
||||
static const struct vout_window_operations ops = {
|
||||
static const struct vlc_window_operations ops = {
|
||||
.enable = Enable,
|
||||
.disable = Disable,
|
||||
.resize = Resize,
|
||||
|
@ -589,7 +589,7 @@ static const struct vout_window_operations ops = {
|
|||
.set_state = SetState,
|
||||
};
|
||||
|
||||
static int OpenCommon(vout_window_t *wnd, char *display,
|
||||
static int OpenCommon(vlc_window_t *wnd, char *display,
|
||||
xcb_connection_t *conn,
|
||||
xcb_window_t root, xcb_window_t window)
|
||||
{
|
||||
|
@ -597,7 +597,7 @@ static int OpenCommon(vout_window_t *wnd, char *display,
|
|||
if (sys == NULL)
|
||||
return VLC_ENOMEM;
|
||||
|
||||
wnd->type = VOUT_WINDOW_TYPE_XID;
|
||||
wnd->type = VLC_WINDOW_TYPE_XID;
|
||||
wnd->handle.xid = window;
|
||||
wnd->display.x11 = display;
|
||||
wnd->ops = &ops;
|
||||
|
@ -692,7 +692,7 @@ static int OpenCommon(vout_window_t *wnd, char *display,
|
|||
/**
|
||||
* Create an X11 window.
|
||||
*/
|
||||
static int Open(vout_window_t *wnd)
|
||||
static int Open(vlc_window_t *wnd)
|
||||
{
|
||||
xcb_generic_error_t *err;
|
||||
xcb_void_cookie_t ck;
|
||||
|
@ -768,7 +768,7 @@ error:
|
|||
/**
|
||||
* Destroys the X11 window.
|
||||
*/
|
||||
static void Close (vout_window_t *wnd)
|
||||
static void Close (vlc_window_t *wnd)
|
||||
{
|
||||
vout_window_sys_t *p_sys = wnd->sys;
|
||||
xcb_connection_t *conn = p_sys->conn;
|
||||
|
@ -783,7 +783,7 @@ static void Close (vout_window_t *wnd)
|
|||
|
||||
/*** Embedded drawable support ***/
|
||||
|
||||
static int EmEnable(vout_window_t *wnd, const vout_window_cfg_t *restrict cfg)
|
||||
static int EmEnable(vlc_window_t *wnd, const vlc_window_cfg_t *restrict cfg)
|
||||
{
|
||||
vout_window_sys_t *sys = wnd->sys;
|
||||
|
||||
|
@ -867,9 +867,9 @@ static void ReleaseDrawable (vlc_object_t *obj, xcb_window_t window)
|
|||
var_Destroy(vlc, "xid-in-use");
|
||||
}
|
||||
|
||||
static void EmClose(vout_window_t *);
|
||||
static void EmClose(vlc_window_t *);
|
||||
|
||||
static const struct vout_window_operations em_ops = {
|
||||
static const struct vlc_window_operations em_ops = {
|
||||
.enable = EmEnable,
|
||||
.set_fullscreen = SetFullscreen,
|
||||
.unset_fullscreen = UnsetFullscreen,
|
||||
|
@ -880,7 +880,7 @@ static const struct vout_window_operations em_ops = {
|
|||
/**
|
||||
* Wrap an existing X11 window to embed the video.
|
||||
*/
|
||||
static int EmOpen (vout_window_t *wnd)
|
||||
static int EmOpen (vlc_window_t *wnd)
|
||||
{
|
||||
int ret = VLC_EGENERIC;
|
||||
xcb_window_t window = var_InheritInteger (wnd, "drawable-xid");
|
||||
|
@ -911,7 +911,7 @@ static int EmOpen (vout_window_t *wnd)
|
|||
}
|
||||
root = geo->root;
|
||||
/* FIXME: racy - compare seq.no.with configure event */
|
||||
vout_window_ReportSize(wnd, geo->width, geo->height);
|
||||
vlc_window_ReportSize(wnd, geo->width, geo->height);
|
||||
free (geo);
|
||||
|
||||
/* Try to subscribe to keyboard and mouse events (only one X11 client can
|
||||
|
@ -936,7 +936,7 @@ error:
|
|||
return VLC_EGENERIC;
|
||||
}
|
||||
|
||||
static void EmClose (vout_window_t *wnd)
|
||||
static void EmClose (vlc_window_t *wnd)
|
||||
{
|
||||
xcb_window_t window = wnd->handle.xid;
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue