1 /*****************************************************************************
2 * vout.h: Windows DirectX video output header file
3 *****************************************************************************
4 * Copyright (C) 1998, 1999, 2000 VideoLAN
5 * $Id: vout.h,v 1.8 2003/11/19 23:44:35 gbazin Exp $
7 * Authors: Gildas Bazin <gbazin@netcourrier.com>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
22 *****************************************************************************/
24 /*****************************************************************************
25 * event_thread_t: DirectX event thread
26 *****************************************************************************/
27 typedef struct event_thread_t
31 vout_thread_t * p_vout;
35 /*****************************************************************************
36 * vout_sys_t: video output DirectX method descriptor
37 *****************************************************************************
38 * This structure is part of the video output thread descriptor.
39 * It describes the DirectX specific properties of an output thread.
40 *****************************************************************************/
43 LPDIRECTDRAW2 p_ddobject; /* DirectDraw object */
44 LPDIRECTDRAWSURFACE2 p_display; /* Display device */
45 LPDIRECTDRAWSURFACE2 p_current_surface; /* surface currently displayed */
46 LPDIRECTDRAWCLIPPER p_clipper; /* clipper used for blitting */
47 HINSTANCE hddraw_dll; /* handle of the opened ddraw dll */
49 HWND hwnd; /* Handle of the main window */
50 HWND hvideownd; /* Handle of the video sub-window */
51 HWND hparent; /* Handle of the parent window */
52 WNDPROC pf_wndproc; /* Window handling callback */
54 vlc_bool_t b_using_overlay; /* Are we using an overlay surface */
55 vlc_bool_t b_use_sysmem; /* Should we use system memory for surfaces */
56 vlc_bool_t b_hw_yuv; /* Should we use hardware YUV->RGB conversions */
57 vlc_bool_t b_3buf_overlay; /* Should we use triple buffered overlays */
59 /* size of the display */
63 /* Window position and size */
69 /* Coordinates of src and dest images (used when blitting to display) */
71 RECT rect_src_clipped;
73 RECT rect_dest_clipped;
75 /* DDraw capabilities */
76 int b_caps_overlay_clipping;
78 int i_rgb_colorkey; /* colorkey in RGB used by the overlay */
79 int i_colorkey; /* colorkey used by the overlay */
81 volatile uint16_t i_changes; /* changes made to the video display */
84 volatile vlc_bool_t b_cursor_hidden;
85 volatile mtime_t i_lastmoved;
88 vlc_bool_t b_on_top_change;
90 event_thread_t * p_event;
93 /*****************************************************************************
94 * picture_sys_t: direct buffer method descriptor
95 *****************************************************************************
96 * This structure is part of the picture descriptor, it describes the
97 * DirectX specific properties of a direct buffer.
98 *****************************************************************************/
101 LPDIRECTDRAWSURFACE2 p_surface;
103 LPDIRECTDRAWSURFACE2 p_front_surface;
106 /*****************************************************************************
107 * Prototypes from vout.c
108 *****************************************************************************/
109 int DirectXUpdateOverlay( vout_thread_t *p_vout );
111 /*****************************************************************************
112 * Prototypes from events.c
113 *****************************************************************************/
114 void DirectXEventThread ( event_thread_t *p_event );
115 void DirectXUpdateRects ( vout_thread_t *p_vout, vlc_bool_t b_force );
117 /*****************************************************************************
119 *****************************************************************************/
120 #define WM_VLC_HIDE_MOUSE WM_APP
121 #define WM_VLC_CREATE_VIDEO_WIN WM_APP + 1
122 #define IDM_TOGGLE_ON_TOP WM_USER + 1