common.h 3.46 KB
Newer Older
1 2 3
/*****************************************************************************
 * common.h: Windows video output header file
 *****************************************************************************
Jean-Baptiste Kempf's avatar
LGPL  
Jean-Baptiste Kempf committed
4
 * Copyright (C) 2001-2009 VLC authors and VideoLAN
5 6 7
 *
 * Authors: Gildas Bazin <gbazin@videolan.org>
 *          Damien Fouilleul <damienf@videolan.org>
Martell Malone's avatar
Martell Malone committed
8
 *          Martell Malone <martellmalone@gmail.com>
9
 *
Jean-Baptiste Kempf's avatar
LGPL  
Jean-Baptiste Kempf committed
10 11 12
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2.1 of the License, or
13 14 15 16
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Jean-Baptiste Kempf's avatar
LGPL  
Jean-Baptiste Kempf committed
17 18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
19
 *
Jean-Baptiste Kempf's avatar
LGPL  
Jean-Baptiste Kempf committed
20 21 22
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23 24
 *****************************************************************************/

25 26
#include <vlc_vout_display.h>

27 28 29
/*****************************************************************************
 * event_thread_t: event thread
 *****************************************************************************/
30 31

typedef struct event_thread_t event_thread_t;
32

33 34 35 36 37 38
typedef struct display_win32_area_t
{
    /* Coordinates of dest images (used when blitting to display) */
    vout_display_place_t  place;
    bool                  place_changed;

39 40
    video_format_t        texture_source;

41 42 43
    vout_display_cfg_t    vdcfg;
} display_win32_area_t;

44 45 46
#define RECTWidth(r)   (LONG)((r).right - (r).left)
#define RECTHeight(r)  (LONG)((r).bottom - (r).top)

47 48 49 50 51 52
/*****************************************************************************
 * vout_sys_t: video output method descriptor
 *****************************************************************************
 * This structure is part of the video output thread descriptor.
 * It describes the module specific properties of an output thread.
 *****************************************************************************/
53
typedef struct vout_display_sys_win32_t
54 55 56 57 58 59 60 61
{
    /* */
    event_thread_t *event;

    /* */
    HWND                 hvideownd;        /* Handle of the video sub-window */
    HWND                 hparent;             /* Handle of the parent window */

62 63 64
# if !defined(NDEBUG) && defined(HAVE_DXGIDEBUG_H)
    HINSTANCE     dxgidebug_dll;
# endif
65 66 67
} vout_display_sys_win32_t;


68 69 70
/*****************************************************************************
 * Prototypes from common.c
 *****************************************************************************/
71
#if !VLC_WINSTORE_APP
72
int  CommonInit(vlc_object_t *, display_win32_area_t *, vout_display_sys_win32_t *,
73
                bool projection_gestures);
74
void CommonClean(vlc_object_t *, vout_display_sys_win32_t *);
75
#endif /* !VLC_WINSTORE_APP */
76
int  CommonControl(vlc_object_t *, display_win32_area_t *, vout_display_sys_win32_t *, int , va_list );
77

78
void UpdateRects (vlc_object_t *, display_win32_area_t *, vout_display_sys_win32_t *);
79

80
void InitArea(vout_display_t *, display_win32_area_t *, const vout_display_cfg_t *);
81 82 83 84 85 86 87 88 89

# ifdef __cplusplus
extern "C" {
# endif
void* HookWindowsSensors(vout_display_t*, HWND);
void UnhookWindowsSensors(void*);
# ifdef __cplusplus
}
# endif