Replace some 16-bit calls by their 32-bit equivalents

Dmitry Timoshkov dmitry at baikal.ru
Sat Jun 30 22:30:04 CDT 2001


Hello.

Changelog:
    Dmitry Timoshkov <dmitry at codeweavers.com>
    Replace some 16-bit calls by their 32-bit equivalents.

diff -u cvs/hq/wine/objects/palette.c wine/objects/palette.c
--- cvs/hq/wine/objects/palette.c	Fri Jun 29 08:59:40 2001
+++ wine/objects/palette.c	Sun Jul 01 03:02:44 2001
@@ -778,10 +778,14 @@
 typedef BOOL WINAPI (*RedrawWindow_funcptr)( HWND, const RECT *, HRGN, UINT );
 
 /**********************************************************************
- *            UpdateColors   (DISPLAY.366)
- *            UpdateColors16   (GDI.366)
+ * UpdateColors [GDI32.@]  Remaps current colors to logical palette
+ *
+ * RETURNS
+ *    Success: TRUE
+ *    Failure: FALSE
  */
-INT16 WINAPI UpdateColors16( HDC16 hDC )
+BOOL WINAPI UpdateColors(
+    HDC hDC) /* [in] Handle of device context */
 {
     HMODULE mod;
     DC *dc;
@@ -814,16 +818,12 @@
 
 
 /**********************************************************************
- * UpdateColors [GDI32.@]  Remaps current colors to logical palette
- *
- * RETURNS
- *    Success: TRUE
- *    Failure: FALSE
+ *            UpdateColors   (DISPLAY.366)
+ *            UpdateColors16   (GDI.366)
  */
-BOOL WINAPI UpdateColors(
-    HDC hDC) /* [in] Handle of device context */
+INT16 WINAPI UpdateColors16( HDC16 hDC )
 {
-    UpdateColors16( hDC );
+    UpdateColors( hDC );
     return TRUE;
 }
 
diff -u cvs/hq/wine/dlls/msvideo/msvideo_main.c wine/dlls/msvideo/msvideo_main.c
--- cvs/hq/wine/dlls/msvideo/msvideo_main.c	Sun Jun 24 08:24:16 2001
+++ wine/dlls/msvideo/msvideo_main.c	Sun Jul 01 02:37:00 2001
@@ -1161,12 +1161,12 @@
 	WINE_HIC *whic = GlobalLock16(hic);
 	TRACE("(0x%08lx)\n",(DWORD)hic);
 	if (whic->driverproc) {
-		ICSendMessage16(hic,DRV_CLOSE,0,0);
-		ICSendMessage16(hic,DRV_DISABLE,0,0);
-		ICSendMessage16(hic,DRV_FREE,0,0);
+		ICSendMessage(hic,DRV_CLOSE,0,0);
+		ICSendMessage(hic,DRV_DISABLE,0,0);
+		ICSendMessage(hic,DRV_FREE,0,0);
 	} else {
 		CloseDriver(whic->hdrv,0,0);
-}
+	}
 
 	GlobalUnlock16(hic);
 	GlobalFree16(hic);
diff -u cvs/hq/wine/controls/menu.c wine/controls/menu.c
--- cvs/hq/wine/controls/menu.c	Fri Jun 29 08:59:36 2001
+++ wine/controls/menu.c	Sun Jul 01 02:31:42 2001
@@ -2339,7 +2339,7 @@
 	HWND  hNewWnd;
 	UINT  id = 0;
 	LRESULT l = SendMessageA( pmt->hOwnerWnd, WM_NEXTMENU, vk, 
-		(IS_SYSTEM_MENU(menu)) ? GetSubMenu16(pmt->hTopMenu,0) : pmt->hTopMenu );
+		(IS_SYSTEM_MENU(menu)) ? GetSubMenu(pmt->hTopMenu,0) : pmt->hTopMenu );
 
 	TRACE("%04x [%04x] -> %04x [%04x]\n",
 		     (UINT16)pmt->hCurrentMenu, (UINT16)pmt->hOwnerWnd, LOWORD(l), HIWORD(l) );
@@ -2387,7 +2387,7 @@
 		wndPtr = WIN_FindWndPtr(hNewWnd);
 
 		if( wndPtr->dwStyle & WS_SYSMENU &&
-		    GetSubMenu16(wndPtr->hSysMenu, 0) == hNewMenu )
+		    GetSubMenu(wndPtr->hSysMenu, 0) == hNewMenu )
 		{
 	            /* get the real system menu */
 		    hNewMenu =  wndPtr->hSysMenu;
@@ -3897,7 +3897,7 @@
 	if( wndPtr->hSysMenu )
         {
 	    POPUPMENU *menu;
-	    retvalue = GetSubMenu16(wndPtr->hSysMenu, 0);
+	    retvalue = GetSubMenu(wndPtr->hSysMenu, 0);
 
 	    /* Store the dummy sysmenu handle to facilitate the refresh */
 	    /* of the close button if the SC_CLOSE item change */
diff -u cvs/hq/wine/windows/mdi.c wine/windows/mdi.c
--- cvs/hq/wine/windows/mdi.c	Thu May 24 04:11:20 2001
+++ wine/windows/mdi.c	Sun Jul 01 03:14:34 2001
@@ -2343,7 +2343,7 @@
 			newPos = maxPos;
 			break;
 	case SB_ENDSCROLL:
-			CalcChildScroll16(hWnd,(uMsg == WM_VSCROLL)?SB_VERT:SB_HORZ);
+			CalcChildScroll(hWnd,(uMsg == WM_VSCROLL)?SB_VERT:SB_HORZ);
 			return;
     }
 
diff -u cvs/hq/wine/objects/clipping.c wine/objects/clipping.c
--- cvs/hq/wine/objects/clipping.c	Fri Jun 29 08:59:40 2001
+++ wine/objects/clipping.c	Sun Jul 01 02:54:46 2001
@@ -433,10 +433,21 @@
 /***********************************************************************
  *           RectVisible    (GDI.465)
  */
-BOOL16 WINAPI RectVisible16( HDC16 hdc, const RECT16* rect )
+BOOL16 WINAPI RectVisible16( HDC16 hdc, const RECT16* rect16 )
+{
+    RECT rect;
+    CONV_RECT16TO32( rect16, &rect );
+    return RectVisible( hdc, &rect );
+}
+
+
+/***********************************************************************
+ *           RectVisible    (GDI32.@)
+ */
+BOOL WINAPI RectVisible( HDC hdc, const RECT* rect )
 {
     BOOL ret = FALSE;
-    RECT16 tmpRect;
+    RECT tmpRect;
     DC *dc = DC_GetDCUpdate( hdc );
     if (!dc) return FALSE;
     TRACE("%04x %d,%dx%d,%d\n",
@@ -445,26 +456,15 @@
     {
         /* copy rectangle to avoid overwriting by LPtoDP */
         tmpRect = *rect;
-        LPtoDP16( hdc, (LPPOINT16)&tmpRect, 2 );
+        LPtoDP( hdc, (LPPOINT)&tmpRect, 2 );
         tmpRect.left   += dc->DCOrgX;
         tmpRect.right  += dc->DCOrgX;
         tmpRect.top    += dc->DCOrgY;
         tmpRect.bottom += dc->DCOrgY;
-        ret = RectInRegion16( dc->hGCClipRgn, &tmpRect );
+        ret = RectInRegion( dc->hGCClipRgn, &tmpRect );
     }
     GDI_ReleaseObj( hdc );
     return ret;
-}
-
-
-/***********************************************************************
- *           RectVisible    (GDI32.@)
- */
-BOOL WINAPI RectVisible( HDC hdc, const RECT* rect )
-{
-    RECT16 rect16;
-    CONV_RECT32TO16( rect, &rect16 );
-    return RectVisible16( (HDC16)hdc, &rect16 );
 }
 
 
diff -u cvs/hq/wine/windows/clipboard.c wine/windows/clipboard.c
--- cvs/hq/wine/windows/clipboard.c	Fri Jun 15 04:06:38 2001
+++ wine/windows/clipboard.c	Sun Jul 01 03:10:34 2001
@@ -1180,9 +1180,9 @@
 
 
 /**************************************************************************
- *		RegisterClipboardFormat (USER.145)
+ *		RegisterClipboardFormatA (USER32.@)
  */
-UINT16 WINAPI RegisterClipboardFormat16( LPCSTR FormatName )
+UINT WINAPI RegisterClipboardFormatA( LPCSTR FormatName )
 {
     LPWINE_CLIPFORMAT lpNewFormat; 
     LPWINE_CLIPFORMAT lpFormat = ClipFormats; 
@@ -1240,11 +1240,11 @@
 
 
 /**************************************************************************
- *		RegisterClipboardFormatA (USER32.@)
+ *		RegisterClipboardFormat (USER.145)
  */
-UINT WINAPI RegisterClipboardFormatA( LPCSTR formatName )
+UINT16 WINAPI RegisterClipboardFormat16( LPCSTR FormatName )
 {
-    return RegisterClipboardFormat16( formatName );
+    return RegisterClipboardFormatA( FormatName );
 }
 
 






More information about the wine-patches mailing list