]> git.sesse.net Git - vlc/commitdiff
WinCE: wingdi plugin update
authorGeoffroy Couprie <geo.couprie@gmail.com>
Thu, 4 Sep 2008 12:49:23 +0000 (14:49 +0200)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Mon, 8 Sep 2008 17:43:28 +0000 (20:43 +0300)
Signed-off-by: Rémi Denis-Courmont <rdenis@simphalempin.com>
modules/video_output/msw/events.c
modules/video_output/msw/vout.h
modules/video_output/msw/wingdi.c

index 28c4a9c2d5bc45f1b469387fc45c6fd2c413d033..e637ccb52489ddc3e3efc1c1da3e584994aadc46 100644 (file)
 #include "vlc_keys.h"
 #include "vout.h"
 
-#if defined(UNDER_CE) && !defined(__PLUGIN__) /*FIXME*/
-#   define SHFS_SHOWSIPBUTTON 0x0004
+#ifdef UNDER_CE
+#include <aygshell.h>
+    //WINSHELLAPI BOOL WINAPI SHFullScreen(HWND hwndRequester, DWORD dwState);
+#endif
+
+/*#if defined(UNDER_CE) && !defined(__PLUGIN__) /*FIXME*/
+/*#   define SHFS_SHOWSIPBUTTON 0x0004
 #   define SHFS_HIDESIPBUTTON 0x0008
 #   define MENU_HEIGHT 26
     BOOL SHFullScreen(HWND hwndRequester, DWORD dwState);
-#endif
+#endif*/
+
 
 /*****************************************************************************
  * Local prototypes.
@@ -909,16 +915,16 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message,
         if( !p_vout->p_sys->b_parent_focus ) GXSuspend();
 #endif
 #ifdef UNDER_CE
-        if( hWnd == p_vout->p_sys->hfswnd )
+        if( hwnd == p_vout->p_sys->hfswnd )
         {
             HWND htbar = FindWindow( _T("HHTaskbar"), NULL );
             ShowWindow( htbar, SW_SHOW );
         }
 
         if( !p_vout->p_sys->hparent ||
-            hWnd == p_vout->p_sys->hfswnd )
+            hwnd == p_vout->p_sys->hfswnd )
         {
-            SHFullScreen( hWnd, SHFS_SHOWSIPBUTTON );
+            SHFullScreen( hwnd, SHFS_SHOWSIPBUTTON );
         }
 #endif
         return 0;
@@ -930,19 +936,19 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message,
 #endif
 #ifdef UNDER_CE
         if( p_vout->p_sys->hparent &&
-            hWnd != p_vout->p_sys->hfswnd && p_vout->b_fullscreen )
+            hwnd != p_vout->p_sys->hfswnd && p_vout->b_fullscreen )
             p_vout->p_sys->i_changes |= VOUT_FULLSCREEN_CHANGE;
 
-        if( hWnd == p_vout->p_sys->hfswnd )
+        if( hwnd == p_vout->p_sys->hfswnd )
         {
             HWND htbar = FindWindow( _T("HHTaskbar"), NULL );
             ShowWindow( htbar, SW_HIDE );
         }
 
         if( !p_vout->p_sys->hparent ||
-            hWnd == p_vout->p_sys->hfswnd )
+            hwnd == p_vout->p_sys->hfswnd )
         {
-            SHFullScreen( hWnd, SHFS_HIDESIPBUTTON );
+            SHFullScreen( hwnd, SHFS_HIDESIPBUTTON );
         }
 #endif
         return 0;
@@ -1197,7 +1203,8 @@ void Win32ToggleFullscreen( vout_thread_t *p_vout )
                           rect.right, rect.bottom,
                           SWP_NOZORDER|SWP_FRAMECHANGED );
 
-            HWND topLevelParent = GetAncestor( p_vout->p_sys->hparent, GA_ROOT );
+            HWND topLevelParent = GetParent( p_vout->p_sys->hparent );
+            //HWND topLevelParent = GetAncestor( p_vout->p_sys->hparent, GA_ROOT );
             ShowWindow( topLevelParent, SW_HIDE );
         }
 
@@ -1221,7 +1228,8 @@ void Win32ToggleFullscreen( vout_thread_t *p_vout )
                           rect.right, rect.bottom,
                           SWP_NOZORDER|SWP_FRAMECHANGED );
 
-            HWND topLevelParent = GetAncestor( p_vout->p_sys->hparent, GA_ROOT );
+            HWND topLevelParent = GetParent( p_vout->p_sys->hparent );
+            //HWND topLevelParent = GetAncestor( p_vout->p_sys->hparent, GA_ROOT );
             ShowWindow( topLevelParent, SW_SHOW );
             SetForegroundWindow( p_vout->p_sys->hparent );
             ShowWindow( hwnd, SW_HIDE );
index 52bf8169cdb6c3828e1ee088e645ae24628a4220..d964c3630007c5479d34ebada27f0a71d985ce12 100644 (file)
@@ -33,6 +33,39 @@ typedef struct event_thread_t
 
 } event_thread_t;
 
+#ifdef MODULE_NAME_IS_wingapi
+    typedef struct GXDisplayProperties {
+        DWORD cxWidth;
+        DWORD cyHeight;
+        long cbxPitch;
+        long cbyPitch;
+        long cBPP;
+        DWORD ffFormat;
+    } GXDisplayProperties;
+
+    typedef struct GXScreenRect {
+        DWORD dwTop;
+        DWORD dwLeft;
+        DWORD dwWidth;
+        DWORD dwHeight;
+    } GXScreenRect;
+
+#   define GX_FULLSCREEN    0x01
+#   define GX_NORMALKEYS    0x02
+#   define GX_LANDSCAPEKEYS 0x03
+
+#   ifndef kfLandscape
+#       define kfLandscape      0x8
+#       define kfPalette        0x10
+#       define kfDirect         0x20
+#       define kfDirect555      0x40
+#       define kfDirect565      0x80
+#       define kfDirect888      0x100
+#       define kfDirect444      0x200
+#       define kfDirectInverted 0x400
+#   endif
+#endif
+
 /*****************************************************************************
  * vout_sys_t: video output method descriptor
  *****************************************************************************
@@ -219,18 +252,18 @@ void Win32ToggleFullscreen ( vout_thread_t *p_vout );
 #   define GCL_HBRBACKGROUND (-10)
 #endif
 
-#define FindWindowEx(a,b,c,d) 0
+//#define FindWindowEx(a,b,c,d) 0
 
 #define GetWindowPlacement(a,b)
 #define SetWindowPlacement(a,b)
-typedef struct _WINDOWPLACEMENT {
+/*typedef struct _WINDOWPLACEMENT {
     UINT length;
     UINT flags;
     UINT showCmd;
     POINT ptMinPosition;
     POINT ptMaxPosition;
     RECT rcNormalPosition;
-} WINDOWPLACEMENT;
+} WINDOWPLACEMENT;*/
 
 #ifndef WM_NCMOUSEMOVE
 #   define WM_NCMOUSEMOVE 160
@@ -257,8 +290,8 @@ typedef struct _WINDOWPLACEMENT {
 #define WS_EX_APPWINDOW 0x40000
 #endif
 
-#define SetWindowLongPtr SetWindowLong
-#define GetWindowLongPtr GetWindowLong
-#define GWLP_USERDATA GWL_USERDATA
+//#define SetWindowLongPtr SetWindowLong
+//#define GetWindowLongPtr GetWindowLong
+//#define GWLP_USERDATA GWL_USERDATA
 
 #endif //UNDER_CE
index 310d3ea4657e282eb40700355a5ed199b6755f3a..d03b6186c690a071106adea3e1f25047b3a7a8f5 100644 (file)
@@ -38,9 +38,7 @@
 
 #include <commctrl.h>
 
-#include "vout.h"
-
-#ifdef MODULE_NAME_IS_wingapi
+/*#ifdef MODULE_NAME_IS_wingapi
     typedef struct GXDisplayProperties {
         DWORD cxWidth;
         DWORD cyHeight;
@@ -73,6 +71,8 @@
 #   endif
 #endif /* MODULE_NAME_IS_wingapi */
 
+#include "vout.h"
+
 #define MAX_DIRECTBUFFERS 10
 
 #ifdef UNDER_CE
@@ -85,9 +85,9 @@
 #ifndef WS_EX_APPWINDOW
 #define WS_EX_APPWINDOW 0x40000
 #endif
-#define SetWindowLongPtr SetWindowLong
-#define GetWindowLongPtr GetWindowLong
-#define GWLP_USERDATA GWL_USERDATA
+//#define SetWindowLongPtr SetWindowLong
+//#define GetWindowLongPtr GetWindowLong
+//#define GWLP_USERDATA GWL_USERDATA
 #define AdjustWindowRect(a,b,c)
 #endif //UNDER_CE