- Timestamp:
- May 27, 2001, 9:01:35 PM (24 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/gdi32.DEF
r5390 r5810 1 ; $Id: gdi32.DEF,v 1.1 6 2001-03-27 20:47:52sandervl Exp $1 ; $Id: gdi32.DEF,v 1.17 2001-05-27 19:01:14 sandervl Exp $ 2 2 3 3 ;Created by BLAST for IBM's compiler … … 367 367 InternalDrawTextExA @1205 NONAME 368 368 InternalDrawTextExW @1206 NONAME 369 InternalTabbedTextOutA @1207 NONAME370 InternalTabbedTextOutW @1208 NONAME371 InternalGetTabbedTextExtentA @1209 NONAME372 InternalGetTabbedTextExtentW @1210 NONAME369 ;; InternalTabbedTextOutA @1207 NONAME 370 ;; InternalTabbedTextOutW @1208 NONAME 371 ;; InternalGetTabbedTextExtentA @1209 NONAME 372 ;; InternalGetTabbedTextExtentW @1210 NONAME 373 373 _setWinDeviceRegionFromPMDeviceRegion@16 @1211 NONAME 374 374 -
trunk/src/gdi32/text.cpp
r5799 r5810 1 /* $Id: text.cpp,v 1.2 2 2001-05-25 10:05:29sandervl Exp $ */1 /* $Id: text.cpp,v 1.23 2001-05-27 19:01:14 sandervl Exp $ */ 2 2 3 3 /* … … 470 470 return(rc); 471 471 } 472 #if 0 473 //Replaced with Wine functions in user32\text.cpp) 472 474 //****************************************************************************** 473 475 // CB: USER32 function, but here is the better place … … 488 490 return 0; 489 491 } 490 if ((lpString == NULL) || ( nCount > 512) || ((nTabPositions > 0) && (lpnTabStopPositions == NULL)))492 if ((lpString == NULL) || ((nTabPositions > 0) && (lpnTabStopPositions == NULL))) 491 493 { 492 494 SetLastError(ERROR_INVALID_PARAMETER); 493 495 return 0; 494 496 } 497 if(nCount > 512) { 498 DWORD cbStringNew; 499 DWORD ret1; 500 DWORD ret = 0; 501 502 dprintf(("WARNING: InternalGetTabbedTextExtentA string longer than 512 chars; splitting up")); 503 while(nCount) { 504 cbStringNew = min(500, nCount); 505 506 ret = InternalGetTabbedTextExtentA(hDC, lpString, cbStringNew, nTabPositions, lpnTabStopPositions); 507 lpString += cbStringNew; 508 nCount -= cbStringNew; 509 } 510 return ret; 511 } 512 495 513 //CB: Win95 supports negative values for right aligned text 496 514 for (INT i = 0;i < nTabPositions;i++) … … 623 641 return(rc); 624 642 } 643 #endif 625 644 //****************************************************************************** 626 645 // todo: metafile support -
trunk/src/user32/text.cpp
r5796 r5810 1 /* $Id: text.cpp,v 1.1 1 2001-05-24 19:26:59sandervl Exp $ */1 /* $Id: text.cpp,v 1.12 2001-05-27 19:01:35 sandervl Exp $ */ 2 2 3 3 /* … … 14 14 #include "user32.h" 15 15 #include "syscolor.h" 16 #include <winnls.h> 16 17 17 18 #define DBG_LOCALLOG DBG_text … … 50 51 return InternalDrawTextExW(hdc,lpchText,cchText,lprc,dwDTFormat,lpDTParams,TRUE); 51 52 } 53 #if 1 54 //Based on Wine version 20010510 55 /*********************************************************************** 56 * TEXT_TabbedTextOut 57 * 58 * Helper function for TabbedTextOut() and GetTabbedTextExtent(). 59 * Note: this doesn't work too well for text-alignment modes other 60 * than TA_LEFT|TA_TOP. But we want bug-for-bug compatibility :-) 61 */ 62 static LONG TEXT_TabbedTextOut( HDC hdc, INT x, INT y, LPCSTR lpstr, 63 INT count, INT cTabStops, const INT16 *lpTabPos16, 64 const INT *lpTabPos32, INT nTabOrg, 65 BOOL fDisplayText ) 66 { 67 INT defWidth; 68 SIZE extent; 69 int i, tabPos = x; 70 int start = x; 71 72 extent.cx = 0; 73 extent.cy = 0; 74 75 if (cTabStops == 1) 76 { 77 defWidth = lpTabPos32 ? *lpTabPos32 : *lpTabPos16; 78 cTabStops = 0; 79 } 80 else 81 { 82 TEXTMETRICA tm; 83 GetTextMetricsA( hdc, &tm ); 84 defWidth = 8 * tm.tmAveCharWidth; 85 } 86 87 while (count > 0) 88 { 89 for (i = 0; i < count; i++) 90 if (lpstr[i] == '\t') break; 91 GetTextExtentPointA( hdc, lpstr, i, &extent ); 92 if (lpTabPos32) 93 { 94 while ((cTabStops > 0) && 95 (nTabOrg + *lpTabPos32 <= x + extent.cx)) 96 { 97 lpTabPos32++; 98 cTabStops--; 99 } 100 } 101 else 102 { 103 while ((cTabStops > 0) && 104 (nTabOrg + *lpTabPos16 <= x + extent.cx)) 105 { 106 lpTabPos16++; 107 cTabStops--; 108 } 109 } 110 if (i == count) 111 tabPos = x + extent.cx; 112 else if (cTabStops > 0) 113 tabPos = nTabOrg + (lpTabPos32 ? *lpTabPos32 : *lpTabPos16); 114 else 115 tabPos = nTabOrg + ((x + extent.cx - nTabOrg) / defWidth + 1) * defWidth; 116 if (fDisplayText) 117 { 118 RECT r; 119 r.left = x; 120 r.top = y; 121 r.right = tabPos; 122 r.bottom = y + extent.cy; 123 ExtTextOutA( hdc, x, y, 124 GetBkMode(hdc) == OPAQUE ? ETO_OPAQUE : 0, 125 &r, lpstr, i, NULL ); 126 } 127 x = tabPos; 128 count -= i+1; 129 lpstr += i+1; 130 } 131 return MAKELONG(tabPos - start, extent.cy); 132 } 133 134 135 136 /*********************************************************************** 137 * TabbedTextOutA (USER32.@) 138 */ 139 LONG WINAPI TabbedTextOutA( HDC hdc, INT x, INT y, LPCSTR lpstr, INT count, 140 INT cTabStops, INT *lpTabPos, INT nTabOrg ) 141 { 142 dprintf(("USER32: TabbedTextOutA %x (%d,%d) %s %d %d %x %d", hdc, x, y, lpstr, count, cTabStops, lpTabPos, nTabOrg)); 143 return TEXT_TabbedTextOut( hdc, x, y, lpstr, count, cTabStops, 144 NULL, lpTabPos, nTabOrg, TRUE ); 145 } 146 147 148 /*********************************************************************** 149 * TabbedTextOutW (USER32.@) 150 */ 151 LONG WINAPI TabbedTextOutW( HDC hdc, INT x, INT y, LPCWSTR str, INT count, 152 INT cTabStops, INT *lpTabPos, INT nTabOrg ) 153 { 154 LONG ret; 155 LPSTR p; 156 INT acount; 157 UINT codepage = CP_ACP; /* FIXME: get codepage of font charset */ 158 159 acount = WideCharToMultiByte(codepage,0,str,count,NULL,0,NULL,NULL); 160 p = (LPSTR)HeapAlloc( GetProcessHeap(), 0, acount ); 161 if(p == NULL) return 0; /* FIXME: is this the correct return on failure */ 162 acount = WideCharToMultiByte(codepage,0,str,count,p,acount,NULL,NULL); 163 ret = TabbedTextOutA( hdc, x, y, p, acount, cTabStops, lpTabPos, nTabOrg ); 164 HeapFree( GetProcessHeap(), 0, p ); 165 return ret; 166 } 167 168 169 170 /*********************************************************************** 171 * GetTabbedTextExtentA (USER32.@) 172 */ 173 DWORD WINAPI GetTabbedTextExtentA( HDC hdc, LPCSTR lpstr, INT count, 174 INT cTabStops, INT *lpTabPos ) 175 { 176 dprintf(("USER32: GetTabbedTextExtentA %x %s %d %d %x",hdc, lpstr, count, cTabStops, lpTabPos)); 177 178 return TEXT_TabbedTextOut( hdc, 0, 0, lpstr, count, cTabStops, 179 NULL, lpTabPos, 0, FALSE ); 180 } 181 182 183 /*********************************************************************** 184 * GetTabbedTextExtentW (USER32.@) 185 */ 186 DWORD WINAPI GetTabbedTextExtentW( HDC hdc, LPCWSTR lpstr, INT count, 187 INT cTabStops, INT *lpTabPos ) 188 { 189 LONG ret; 190 LPSTR p; 191 INT acount; 192 UINT codepage = CP_ACP; /* FIXME: get codepage of font charset */ 193 194 acount = WideCharToMultiByte(codepage,0,lpstr,count,NULL,0,NULL,NULL); 195 p = (LPSTR)HeapAlloc( GetProcessHeap(), 0, acount ); 196 if(p == NULL) return 0; /* FIXME: is this the correct failure value? */ 197 acount = WideCharToMultiByte(codepage,0,lpstr,count,p,acount,NULL,NULL); 198 ret = GetTabbedTextExtentA( hdc, p, acount, cTabStops, lpTabPos ); 199 HeapFree( GetProcessHeap(), 0, p ); 200 return ret; 201 } 202 #else 52 203 //****************************************************************************** 53 204 //****************************************************************************** … … 82 233 return InternalTabbedTextOutW(hdc,x,y,lpString,nCount,nTabPositions,lpnTabStopPositions,nTabOrigin); 83 234 } 235 #endif 84 236 //****************************************************************************** 85 237 // WINE/objects/text.c -
trunk/src/user32/win32wbase.cpp
r5725 r5810 1 /* $Id: win32wbase.cpp,v 1.25 8 2001-05-17 09:50:30sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.259 2001-05-27 19:01:35 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 1999 1999 } 2000 2000 fInternalMsg = fInternalMsgBackup; 2001 dprintf2(("SendMessageA %x %x %x %x returned %d", getWindowHandle(), Msg, wParam, lParam, rc)); 2001 2002 return rc; 2002 2003 } … … 2059 2060 } 2060 2061 fInternalMsg = fInternalMsgBackup; 2062 dprintf2(("SendMessageW %x %x %x %x returned %d", getWindowHandle(), Msg, wParam, lParam, rc)); 2061 2063 return rc; 2062 2064 }
Note:
See TracChangeset
for help on using the changeset viewer.