00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 typedef struct event_thread_t
00029 {
00030 VLC_COMMON_MEMBERS
00031
00032 vout_thread_t * p_vout;
00033
00034 } event_thread_t;
00035
00036
00037
00038
00039
00040
00041
00042 struct vout_sys_t
00043 {
00044 HWND hwnd;
00045 HWND hvideownd;
00046 HWND hparent;
00047 HWND hfswnd;
00048 WNDPROC pf_wndproc;
00049
00050
00051 HMONITOR hmonitor;
00052 GUID *p_display_driver;
00053 HMONITOR (WINAPI* MonitorFromWindow)( HWND, DWORD );
00054 BOOL (WINAPI* GetMonitorInfo)( HMONITOR, LPMONITORINFO );
00055
00056
00057 RECT rect_display;
00058 int i_display_depth;
00059
00060
00061 RECT rect_parent;
00062
00063
00064 int i_window_x;
00065 int i_window_y;
00066 int i_window_width;
00067 int i_window_height;
00068 int i_window_style;
00069
00070 volatile uint16_t i_changes;
00071
00072
00073 volatile bool b_cursor_hidden;
00074 volatile mtime_t i_lastmoved;
00075 mtime_t i_mouse_hide_timeout;
00076
00077
00078 bool b_on_top_change;
00079
00080 #ifndef UNDER_CE
00081
00082
00083 UINT i_spi_lowpowertimeout;
00084 UINT i_spi_powerofftimeout;
00085 UINT i_spi_screensavetimeout;
00086
00087 #endif
00088
00089
00090 RECT rect_src;
00091 RECT rect_src_clipped;
00092 RECT rect_dest;
00093 RECT rect_dest_clipped;
00094
00095 bool b_hw_yuv;
00096
00097
00098 #ifdef MODULE_NAME_IS_vout_directx
00099
00100 int i_align_src_boundary;
00101 int i_align_src_size;
00102 int i_align_dest_boundary;
00103 int i_align_dest_size;
00104
00105 bool b_wallpaper;
00106
00107 bool b_using_overlay;
00108 bool b_use_sysmem;
00109 bool b_3buf_overlay;
00110
00111
00112 int b_caps_overlay_clipping;
00113
00114 int i_rgb_colorkey;
00115 int i_colorkey;
00116
00117 COLORREF color_bkg;
00118 COLORREF color_bkgtxt;
00119
00120 LPDIRECTDRAW2 p_ddobject;
00121 LPDIRECTDRAWSURFACE2 p_display;
00122 LPDIRECTDRAWSURFACE2 p_current_surface;
00123 LPDIRECTDRAWCLIPPER p_clipper;
00124 HINSTANCE hddraw_dll;
00125 #endif
00126
00127 #ifdef MODULE_NAME_IS_glwin32
00128 HDC hGLDC;
00129 HGLRC hGLRC;
00130 #endif
00131
00132 #ifdef MODULE_NAME_IS_direct3d
00133
00134 HINSTANCE hd3d9_dll;
00135 LPDIRECT3D9 p_d3dobj;
00136 LPDIRECT3DDEVICE9 p_d3ddev;
00137 D3DFORMAT bbFormat;
00138
00139 LPDIRECT3DTEXTURE9 p_d3dtex;
00140 LPDIRECT3DVERTEXBUFFER9 p_d3dvtc;
00141 #endif
00142
00143 #ifdef MODULE_NAME_IS_wingdi
00144
00145 int i_depth;
00146
00147
00148 HDC off_dc;
00149 HBITMAP off_bitmap;
00150 uint8_t * p_pic_buffer;
00151 int i_pic_pitch;
00152 int i_pic_pixel_pitch;
00153
00154 BITMAPINFO bitmapinfo;
00155 RGBQUAD red;
00156 RGBQUAD green;
00157 RGBQUAD blue;
00158 #endif
00159
00160 #ifdef MODULE_NAME_IS_wingapi
00161 int i_depth;
00162 int render_width;
00163 int render_height;
00164
00165 bool b_focus;
00166 bool b_parent_focus;
00167
00168 HINSTANCE gapi_dll;
00169
00170
00171 int (*GXOpenDisplay)( HWND hWnd, DWORD dwFlags );
00172 int (*GXCloseDisplay)();
00173 void *(*GXBeginDraw)();
00174 int (*GXEndDraw)();
00175 GXDisplayProperties (*GXGetDisplayProperties)();
00176 int (*GXSuspend)();
00177 int (*GXResume)();
00178 #endif
00179
00180 #ifndef UNDER_CE
00181
00182 bool b_suspend_display;
00183 #endif
00184
00185 event_thread_t *p_event;
00186 vlc_mutex_t lock;
00187 };
00188
00189
00190
00191
00192 int DirectDrawUpdateOverlay( vout_thread_t *p_vout );
00193
00194
00195
00196
00197 void* EventThread ( vlc_object_t *p_this );
00198 void UpdateRects ( vout_thread_t *p_vout, bool b_force );
00199 void Win32ToggleFullscreen ( vout_thread_t *p_vout );
00200
00201
00202
00203
00204 #define WM_VLC_HIDE_MOUSE WM_APP
00205 #define WM_VLC_SHOW_MOUSE WM_APP + 1
00206 #define WM_VLC_CHANGE_TEXT WM_APP + 2
00207 #define IDM_TOGGLE_ON_TOP WM_USER + 1
00208 #define DX_POSITION_CHANGE 0x1000
00209 #define DX_WALLPAPER_CHANGE 0x2000
00210
00211
00212
00213
00214 #ifdef UNDER_CE
00215
00216 #define AdjustWindowRect(a,b,c)
00217
00218 #ifndef GCL_HBRBACKGROUND
00219 # define GCL_HBRBACKGROUND (-10)
00220 #endif
00221
00222 #define FindWindowEx(a,b,c,d) 0
00223
00224 #define GetWindowPlacement(a,b)
00225 #define SetWindowPlacement(a,b)
00226 typedef struct _WINDOWPLACEMENT {
00227 UINT length;
00228 UINT flags;
00229 UINT showCmd;
00230 POINT ptMinPosition;
00231 POINT ptMaxPosition;
00232 RECT rcNormalPosition;
00233 } WINDOWPLACEMENT;
00234
00235 #ifndef WM_NCMOUSEMOVE
00236 # define WM_NCMOUSEMOVE 160
00237 #endif
00238 #ifndef CS_OWNDC
00239 # define CS_OWNDC 32
00240 #endif
00241 #ifndef SC_SCREENSAVE
00242 # define SC_SCREENSAVE 0xF140
00243 #endif
00244 #ifndef SC_MONITORPOWER
00245 # define SC_MONITORPOWER 0xF170
00246 #endif
00247 #ifndef WM_NCPAINT
00248 # define WM_NCPAINT 133
00249 #endif
00250 #ifndef WS_OVERLAPPEDWINDOW
00251 # define WS_OVERLAPPEDWINDOW 0xcf0000
00252 #endif
00253 #ifndef WS_EX_NOPARENTNOTIFY
00254 # define WS_EX_NOPARENTNOTIFY 4
00255 #endif
00256 #ifndef WS_EX_APPWINDOW
00257 #define WS_EX_APPWINDOW 0x40000
00258 #endif
00259
00260 #define SetWindowLongPtr SetWindowLong
00261 #define GetWindowLongPtr GetWindowLong
00262 #define GWLP_USERDATA GWL_USERDATA
00263
00264 #endif //UNDER_CE