#include <vlc_keys.h>
#include "vout.h"
+#ifndef UNDER_CE
+#include <vlc_windows_interfaces.h>
+#endif
+
#ifdef UNDER_CE
#include <aygshell.h>
//WINSHELLAPI BOOL WINAPI SHFullScreen(HWND hwndRequester, DWORD dwState);
#endif
}
-#ifdef UNICODE
{
wchar_t *psz_title = malloc( strlen(val.psz_string) * 2 + 2 );
if( psz_title )
free( val.psz_string ); val.psz_string = (char *)psz_title;
}
}
-#endif
SetWindowText( p_event->p_vout->p_sys->hwnd,
(LPCTSTR)val.psz_string );
#define rect_dest p_vout->p_sys->rect_dest
#define rect_dest_clipped p_vout->p_sys->rect_dest_clipped
- int i_width, i_height, i_x, i_y;
+ unsigned int i_width, i_height, i_x, i_y;
RECT rect;
POINT point;
#ifndef NDEBUG
msg_Dbg( p_vout, "DirectXUpdateRects image_dst_clipped coords:"
- " %i,%i,%i,%i",
+ " %li,%li,%li,%li",
rect_dest_clipped.left, rect_dest_clipped.top,
rect_dest_clipped.right, rect_dest_clipped.bottom );
#endif
#ifndef NDEBUG
msg_Dbg( p_vout, "DirectXUpdateRects image_src_clipped"
- " coords: %i,%i,%i,%i",
+ " coords: %li,%li,%li,%li",
rect_src_clipped.left, rect_src_clipped.top,
rect_src_clipped.right, rect_src_clipped.bottom );
#endif
DirectDrawUpdateOverlay( p_vout );
#endif
+#ifndef UNDER_CE
+ /* Windows 7 taskbar thumbnail code */
+ LPTASKBARLIST3 p_taskbl;
+ OSVERSIONINFO winVer;
+ winVer.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+ if( GetVersionEx(&winVer) && winVer.dwMajorVersion > 5 )
+ {
+ CoInitialize( 0 );
+
+ if( S_OK == CoCreateInstance( &clsid_ITaskbarList,
+ NULL, CLSCTX_INPROC_SERVER,
+ &IID_ITaskbarList3,
+ &p_taskbl) )
+ {
+ RECT rect_video, rect_parent, rect_relative;
+ HWND hroot = GetAncestor(p_vout->p_sys->hwnd,GA_ROOT);
+
+ p_taskbl->vt->HrInit(p_taskbl);
+ GetWindowRect(p_vout->p_sys->hvideownd, &rect_video);
+ GetWindowRect(hroot, &rect_parent);
+ rect_relative.left = rect_video.left - rect_parent.left - 8;
+ rect_relative.right = rect_video.right - rect_video.left + rect_relative.left;
+ rect_relative.top = rect_video.top - rect_parent.top - 10;
+ rect_relative.bottom = rect_video.bottom - rect_video.top + rect_relative.top - 25;
+
+ if (S_OK != p_taskbl->vt->SetThumbnailClip(p_taskbl, hroot, &rect_relative))
+ msg_Err( p_vout, "SetThumbNailClip failed");
+
+ p_taskbl->vt->Release(p_taskbl);
+ }
+ CoUninitialize();
+ }
+#endif
/* Signal the change in size/position */
p_vout->p_sys->i_changes |= DX_POSITION_CHANGE;
}
else
{
- p_vout = (vout_thread_t *)GetWindowLongPtr( hwnd, GWLP_USERDATA );
+ LONG_PTR p_user_data = GetWindowLongPtr( hwnd, GWLP_USERDATA );
+ p_vout = (vout_thread_t *)p_user_data;
if( !p_vout )
{
/* Hmmm mozilla does manage somehow to save the pointer to our
}
}
+#if 0
static int ControlParentWindow( vout_thread_t *p_vout, int i_query, ... )
{
va_list args;
va_end( args );
return ret;
}
+#endif
void Win32ToggleFullscreen( vout_thread_t *p_vout )
{
*on the right screen */
HMONITOR hmon = MonitorFromWindow(p_vout->p_sys->hparent,
MONITOR_DEFAULTTONEAREST);
- MONITORINFO mi = {sizeof(mi)};
+ MONITORINFO mi;
if (GetMonitorInfo(hmon, &mi))
SetWindowPos( hwnd, 0,
mi.rcMonitor.left,
int CreateEventThread( vout_thread_t *p_vout )
{
+ if( !( p_vout->p_sys->i_changes & SWITCHING_MODE_FLAG ) )
+ vlc_mutex_init( &p_vout->p_sys->lock );
+
/* Create the Vout EventThread, this thread is created by us to isolate
* the Win32 PeekMessage function calls. We want to do this because
* Windows can stay blocked inside this call for a long time, and when
vlc_object_release( p_vout->p_sys->p_event );
}
- if( !p_vout->p_sys->i_changes & SWITCHING_MODE_FLAG )
+ if( !( p_vout->p_sys->i_changes & SWITCHING_MODE_FLAG ) )
vlc_mutex_destroy( &p_vout->p_sys->lock );
}