Changeset 4012


Ignore:
Timestamp:
Aug 14, 2000, 5:51:20 PM (25 years ago)
Author:
cbratschi
Message:

activated WinDrawText

Location:
trunk/src/gdi32
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/gdi32/gdi32.DEF

    r3940 r4012  
    1 ; $Id: gdi32.DEF,v 1.11 2000-08-02 19:58:26 bird Exp $
     1; $Id: gdi32.DEF,v 1.12 2000-08-14 15:51:19 cbratschi Exp $
    22
    33;Created by BLAST for IBM's compiler
     
    1212    _GpiEnableYInversion       = PMGPI.723
    1313    _GpiQueryYInversion        = PMGPI.726
     14    WinDrawTabbedText          = PMMERGE.5432
    1415
    1516EXPORTS
     
    356357;
    357358    ObjAllocateHandle__FPUlUl10ObjectType                       @1201
    358     ObjFreeHandle__FUl                                                          @1202
     359    ObjFreeHandle__FUl                                                          @1202
    359360    ObjGetHandleData__FUl                                       @1203
    360361    ObjGetHandleType__FUl                                       @1204
  • TabularUnified trunk/src/gdi32/oslibgpi.cpp

    r3705 r4012  
    1 /* $Id: oslibgpi.cpp,v 1.5 2000-06-14 13:17:51 sandervl Exp $ */
     1/* $Id: oslibgpi.cpp,v 1.6 2000-08-14 15:51:20 cbratschi Exp $ */
    22
    33/*
     
    2121#include "dcdata.h"
    2222
    23 #define DBG_LOCALLOG    DBG_oslibgpi
     23#define DBG_LOCALLOG    DBG_oslibgpi
    2424#include "dbglocal.h"
    2525
     
    292292}
    293293
     294LONG APIENTRY WinDrawTabbedText(HPS hps,LONG cchText,LONG lTabWidth,PCH lpchText,PRECTL prcl,LONG clrFore,LONG clrBack,ULONG flCmd);
     295
    294296LONG OSLibWinDrawTabbedText(PVOID pHps,LONG cchText,LONG lTabs,LPCSTR lpchText,PVOID prcl,LONG clrFore,LONG clrBack,ULONG flCmd)
    295297{
    296   //return WinDraw
    297   //undocumented
    298   return 0;
     298  return WinDrawTabbedText(GetDCData(pHps)->hps,cchText,lTabs,(PCH)lpchText,(PRECTL)prcl,clrFore,clrBack,flCmd);
    299299}
    300300
  • TabularUnified trunk/src/gdi32/oslibgpi.h

    r3705 r4012  
    1 /* $Id: oslibgpi.h,v 1.6 2000-06-14 13:17:51 sandervl Exp $ */
     1/* $Id: oslibgpi.h,v 1.7 2000-08-14 15:51:20 cbratschi Exp $ */
    22
    33/*
     
    139139
    140140VOID calcDimensions(POINTLOS2 box[],PPOINTLOS2 point);
     141
     142#define BMOS_ERROR                      (-1L)
     143#define BMOS_DEFAULT                      0L
     144#define BMOS_OR                           1L
     145#define BMOS_OVERPAINT                    2L
     146#define BMOS_LEAVEALONE                   5L
     147
     148LONG OSLibGpiQueryBackMix(PVOID pHps);
     149
     150#define MMOS_TEXT             1
     151#define MMOS_LOMETRIC         2
     152#define MMOS_HIMETRIC         3
     153#define MMOS_LOENGLISH        4
     154#define MMOS_HIENGLISH        5
     155#define MMOS_TWIPS            6
     156#define MMOS_ISOTROPIC        7
     157#define MMOS_ANISOTROPIC      8
     158
     159BOOL doesYAxisGrowNorth(PVOID pHps);
    141160
    142161#define DTOS_LEFT                    0x00000000
     
    156175#define DTOS_ERASERECT               0x00008000
    157176
    158 #define BMOS_ERROR                      (-1L)
    159 #define BMOS_DEFAULT                      0L
    160 #define BMOS_OR                           1L
    161 #define BMOS_OVERPAINT                    2L
    162 #define BMOS_LEAVEALONE                   5L
    163 
    164 LONG OSLibGpiQueryBackMix(PVOID pHps);
    165 
    166 #define MMOS_TEXT             1
    167 #define MMOS_LOMETRIC         2
    168 #define MMOS_HIMETRIC         3
    169 #define MMOS_LOENGLISH        4
    170 #define MMOS_HIENGLISH        5
    171 #define MMOS_TWIPS            6
    172 #define MMOS_ISOTROPIC        7
    173 #define MMOS_ANISOTROPIC      8
    174 
    175 BOOL doesYAxisGrowNorth(PVOID pHps);
     177#define DTOS_SYSTEMFONT       0x00000001
     178#define DTOS_SINGLELINE       0x00010000
     179#define DTOS_MULTILINE        0x00020000
     180#define DTOS_NOCLIP           0x00040000
     181#define DTOS_OPAQUE           0x00080000
     182#define DTOS_AMPERSAND        0x00100000
     183#define DTOS_VERTICALEXTENT   0x00200000
     184#define DTOS_INVERTCHAR       0x20000000
     185#define DTOS_WORLDRECT        0x40000000
     186#define DTOS_INVERT           0x80000000
    176187
    177188LONG OSLibWinDrawTabbedText(PVOID pHps,LONG cchText,LONG lTabs,LPCSTR lpchText,PVOID prcl,LONG clrFore,LONG clrBack,ULONG flCmd);
  • TabularUnified trunk/src/gdi32/text.cpp

    r3648 r4012  
    1 /* $Id: text.cpp,v 1.10 2000-06-01 19:00:05 sandervl Exp $ */
     1/* $Id: text.cpp,v 1.11 2000-08-14 15:51:20 cbratschi Exp $ */
    22
    33/*
     
    77 *
    88 * Copyright 1993, 1994 Alexandre Julliard
    9  * Copyright 1999 Christoph Bratschi
     9 * Copyright 1999-2000 Christoph Bratschi
    1010 *
    1111 * Project Odin Software License can be found in LICENSE.TXT
     
    1919#include "oslibgpi.h"
    2020
    21 #define DBG_LOCALLOG    DBG_text
     21#define DBG_LOCALLOG    DBG_text
    2222#include "dbglocal.h"
    2323
     
    9595INT SYSTEM EXPORT InternalDrawTextExA(HDC hdc,LPCSTR lpchText,INT cchText,LPRECT lprc,UINT dwDTFormat,LPDRAWTEXTPARAMS lpDTParams,BOOL isDrawTextEx)
    9696{
    97 /*
    98   PVOID pHps = OSLibGpiQueryDCData(hdc);
    9997  INT rc;
    10098  ULONG flCmd;
     
    102100  PRECT rectPtr;
    103101  LONG lTabs,xLeft,yTop;
    104 
    105   if ((!lpchText) || (cchText == 0) || (cchText < -1) || (!lprc == NULL))
     102  UINT fpuctrlword;
     103
     104  //SvL: Open32's DrawText messes up the fpu control word! (@#$@#$@#$)
     105  //CB: don't know if this is still the case with WinDrawTabbedText (-> testcase)
     106  fpuctrlword = _control87(0, 0);
     107
     108  if ((!lpchText) || (cchText == 0) || (cchText < -1) || (lprc == NULL))
    106109  {
    107110    SetLastError(ERROR_INVALID_PARAMETER);
    108111    return 0;
    109112  }
     113
     114  PVOID pHps = OSLibGpiQueryDCData(hdc);
    110115
    111116  if (!pHps)
     
    199204    rectPtr = &localRectangle;
    200205
    201     if (getMapMode(pHps) == MMOS_ANISOTROPIC || getMapMode(pHps) == MMOS_ISOTROPIC)
     206    if ((getMapMode(pHps) == MMOS_ANISOTROPIC) || (getMapMode(pHps) == MMOS_ISOTROPIC))
    202207    {
    203208      if (doesYAxisGrowNorth(pHps))
     
    232237    if (isDrawTextEx)
    233238    {
    234       lTabs = (lpDTParams && dwDTFormat & DT_TABSTOP) ? lpDTParams->iTabLength:8;
     239      lTabs = (lpDTParams && (dwDTFormat & DT_TABSTOP)) ? lpDTParams->iTabLength:8;
    235240    } else
    236241    {
     
    385390
    386391  if (!done)
     392  {
    387393    rc = OSLibWinDrawTabbedText(pHps,cchText,lTabs,lpchText,rectPtr,0,0,flCmd);
     394  }
    388395
    389396  if (dwDTFormat & DT_CALCRECT)
     
    408415  }
    409416
    410   return rc;
    411 */
    412   UINT fpuctrlword;
    413   INT rc;
    414 
    415   //SvL: Open32's DrawText messes up the fpu control word! (@#$@#$@#$)
    416   fpuctrlword = _control87(0, 0);
    417   dwDTFormat &= ~(DT_END_ELLIPSIS | DT_PATH_ELLIPSIS);
    418 
    419   rc = O32_DrawText(hdc,lpchText,cchText,lprc,dwDTFormat);
    420417  _control87(fpuctrlword, 0xFFFF);
     418
    421419  return rc;
    422420}
     
    576574  if (!pHps || (cbCount < 0) || ((lpszString == NULL) && (cbCount != 0)))
    577575  {
    578         dprintf(("InternalTextOutA: invalid parameter"));
    579         SetLastError(ERROR_INVALID_HANDLE);
    580         return FALSE;
     576        dprintf(("InternalTextOutA: invalid parameter"));
     577        SetLastError(ERROR_INVALID_HANDLE);
     578        return FALSE;
    581579  }
    582580
    583581  if (cbCount > 512)
    584582  {
    585         dprintf(("InternalTextOutA: invalid parameter cbCount"));
    586         SetLastError(ERROR_INVALID_PARAMETER);
    587         return FALSE;
     583        dprintf(("InternalTextOutA: invalid parameter cbCount"));
     584        SetLastError(ERROR_INVALID_PARAMETER);
     585        return FALSE;
    588586  }
    589587  if (fuOptions & ~((UINT)(ETO_CLIPPED | ETO_OPAQUE)))
    590588  {
    591         dprintf(("InternalTextOutA: invalid fuOptions"));
    592         //ETO_GLYPH_INDEX, ETO_RTLLEADING, ETO_NUMERICSLOCAL, ETO_NUMERICSLATIN, ETO_IGNORELANGUAGE, ETO_PDY  are ignored
    593         return TRUE;
     589        dprintf(("InternalTextOutA: invalid fuOptions"));
     590        //ETO_GLYPH_INDEX, ETO_RTLLEADING, ETO_NUMERICSLOCAL, ETO_NUMERICSLATIN, ETO_IGNORELANGUAGE, ETO_PDY  are ignored
     591        return TRUE;
    594592  }
    595593
     
    603601      if (excludeBottomRightPoint(pHps,(PPOINTLOS2)&pmRect) == 0)
    604602      {
    605         dprintf(("InternalTextOutA: excludeBottomRightPoint returned 0"));
     603        dprintf(("InternalTextOutA: excludeBottomRightPoint returned 0"));
    606604        return TRUE;
    607605      }
     
    610608      if (fuOptions & ETO_OPAQUE)  flOptions |= CHSOS_OPAQUE;
    611609    }
    612   } 
     610  }
    613611  else
    614612  {
    615613    if (fuOptions)
    616614    {
    617         dprintf(("InternalTextOutA: ERROR_INVALID_HANDLE"));
    618         SetLastError(ERROR_INVALID_HANDLE);
    619         return FALSE;
     615        dprintf(("InternalTextOutA: ERROR_INVALID_HANDLE"));
     616        SetLastError(ERROR_INVALID_HANDLE);
     617        return FALSE;
    620618    }
    621619  }
     
    625623    if (fuOptions & ETO_OPAQUE)
    626624    {
    627         lpszString = " ";
    628         cbCount = 1;
    629         flOptions |= CHSOS_CLIP;
    630     } 
     625        lpszString = " ";
     626        cbCount = 1;
     627        flOptions |= CHSOS_CLIP;
     628    }
    631629    else {
    632         dprintf(("InternalTextOutA: cbCount == 0"));
    633         return TRUE;
     630        dprintf(("InternalTextOutA: cbCount == 0"));
     631        return TRUE;
    634632    }
    635633  }
     
    643641
    644642    flOptions |= CHSOS_LEAVEPOS;
    645   } 
     643  }
    646644  else OSLibGpiQueryCurrentPosition(pHps,&ptl);
    647645
     
    675673
    676674  if(hits == GPIOS_ERROR) {
    677         dprintf(("InternalTextOutA: OSLibGpiCharStringPosAt returned GPIOS_ERROR"));
    678         return FALSE;
     675        dprintf(("InternalTextOutA: OSLibGpiCharStringPosAt returned GPIOS_ERROR"));
     676        return FALSE;
    679677  }
    680678
Note: See TracChangeset for help on using the changeset viewer.