4 * Copyright 1999 Patrik Stridvall
12 #include "debugtools.h"
16 DEFAULT_DEBUG_CHANNEL(ttydrv
);
18 /***********************************************************************
19 * TTYDRV_DC_ExtTextOut
21 BOOL
TTYDRV_DC_ExtTextOut(DC
*dc
, INT x
, INT y
, UINT flags
,
22 const RECT
*lpRect
, LPCWSTR str
, UINT count
,
26 TTYDRV_PDEVICE
*physDev
= (TTYDRV_PDEVICE
*) dc
->physDev
;
30 TRACE("(%p, %d, %d, 0x%08x, %p, %s, %d, %p)\n",
31 dc
, x
, y
, flags
, lpRect
, debugstr_wn(str
, count
), count
, lpDx
);
36 /* FIXME: Is this really correct? */
37 if(dc
->w
.textAlign
& TA_UPDATECP
) {
45 row
= (dc
->w
.DCOrgY
+ y
) / physDev
->cellHeight
;
46 col
= (dc
->w
.DCOrgX
+ x
) / physDev
->cellWidth
;
47 ascii
= HeapAlloc( GetProcessHeap(), 0, count
+1 );
48 lstrcpynWtoA(ascii
, str
, count
+1);
49 mvwaddnstr(physDev
->window
, row
, col
, ascii
, count
);
50 HeapFree( GetProcessHeap(), 0, ascii
);
51 wrefresh(physDev
->window
);
53 if(dc
->w
.textAlign
& TA_UPDATECP
) {
54 dc
->w
.CursPosX
+= count
* physDev
->cellWidth
;
55 dc
->w
.CursPosY
+= physDev
->cellHeight
;
59 #else /* defined(HAVE_LIBCURSES) */
60 FIXME("(%p, %d, %d, 0x%08x, %p, %s, %d, %p): stub\n",
61 dc
, x
, y
, flags
, lpRect
, debugstr_wn(str
,count
), count
, lpDx
);
64 #endif /* defined(HAVE_LIBCURSES) */