Commit 21883d79 authored by Alexandre Julliard's avatar Alexandre Julliard

Get rid of the no longer used tty driver.

parent bc305743
......@@ -137,7 +137,6 @@ DLLs (under dlls/):
stdole32.tlb/ - Standard OLE typelib
sti/ - Still Image service
tapi32/ - Telephone interface
ttydrv/ - TTY display driver (Wine specific)
twain/ - TWAIN Imaging device communications
unicows/ - Unicows replacement (Unicode layer for Win9x)
url/ - Internet shortcut shell extension
......
......@@ -1666,7 +1666,6 @@ dlls/stdole32.tlb/Makefile
dlls/sti/Makefile
dlls/strmiids/Makefile
dlls/tapi32/Makefile
dlls/ttydrv/Makefile
dlls/twain/Makefile
dlls/unicows/Makefile
dlls/url/Makefile
......
......@@ -135,7 +135,6 @@ BASEDIRS = \
stdole32.tlb \
sti \
tapi32 \
ttydrv \
twain \
unicows \
url \
......@@ -413,7 +412,6 @@ SYMLINKS_SO = \
winenas.drv.so \
wineoss.drv.so \
wineps.drv.so \
winetty.drv.so \
wininet.dll.so \
winmm.dll.so \
winnls32.dll.so \
......@@ -979,9 +977,6 @@ wineps.drv.so: wineps/wineps.drv.so
wineps16.drv.so : wineps.drv.so
$(RM) $@ && $(LN_S) wineps.drv.so $@
winetty.drv.so: ttydrv/winetty.drv.so
$(RM) $@ && $(LN_S) ttydrv/winetty.drv.so $@
winex11.drv.so: x11drv/winex11.drv.so
$(RM) $@ && $(LN_S) x11drv/winex11.drv.so $@
......@@ -1736,7 +1731,6 @@ msacm/winemp3/winemp3.acm.so: msacm/winemp3
winmm/winenas/winenas.drv.so: winmm/winenas
winmm/wineoss/wineoss.drv.so: winmm/wineoss
wineps/wineps.drv.so: wineps
ttydrv/winetty.drv.so: ttydrv
x11drv/winex11.drv.so: x11drv
wininet/wininet.dll.so: wininet
winmm/winmm.dll.so: winmm
......
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = winetty.drv
IMPORTS = user32 gdi32 kernel32 ntdll
EXTRALIBS = @CURSESLIBS@
C_SRCS = \
bitmap.c \
dc.c \
graphics.c \
objects.c \
palette.c \
ttydrv_main.c \
wnd.c
@MAKE_DLL_RULES@
### Dependencies:
/*
* TTY bitmap driver
*
* Copyright 1999 Patrik Stridvall
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include <string.h>
#include "ttydrv.h"
#include "winbase.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(ttydrv);
/***********************************************************************
* GetBitmapBits (TTYDRV.@)
*/
LONG TTYDRV_GetBitmapBits(HBITMAP hbitmap, void *bits, LONG count)
{
FIXME("(%p, %p, %ld): stub\n", hbitmap, bits, count);
memset(bits, 0, count);
return count;
}
/***********************************************************************
* SetBitmapBits (TTYDRV.@)
*/
LONG TTYDRV_SetBitmapBits(HBITMAP hbitmap, const void *bits, LONG count)
{
FIXME("(%p, %p, %ld): stub\n", hbitmap, bits, count);
return count;
}
/***********************************************************************
* TTYDRV_BITMAP_CreateDIBSection
*/
HBITMAP TTYDRV_BITMAP_CreateDIBSection(
TTYDRV_PDEVICE *physDev, BITMAPINFO *bmi, UINT usage,
LPVOID *bits, HANDLE section, DWORD offset)
{
FIXME("(%p, %p, %u, %p, %p, %ld): stub\n",
physDev->hdc, bmi, usage, bits, section, offset);
return NULL;
}
/***********************************************************************
* TTYDRV_DC_SetDIBitsToDevice
*/
INT TTYDRV_DC_SetDIBitsToDevice(TTYDRV_PDEVICE *physDev, INT xDest, INT yDest, DWORD cx,
DWORD cy, INT xSrc, INT ySrc,
UINT startscan, UINT lines, LPCVOID bits,
const BITMAPINFO *info, UINT coloruse)
{
FIXME("(%p, %d, %d, %ld, %ld, %d, %d, %u, %u, %p, %p, %u): stub\n",
physDev->hdc, xDest, yDest, cx, cy, xSrc, ySrc, startscan, lines, bits, info, coloruse);
return 0;
}
/*
* TTY DC driver
*
* Copyright 1999 Patrik Stridvall
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "ttydrv.h"
#include "winbase.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(ttydrv);
/**********************************************************************
* TTYDRV_GDI_Initialize
*/
BOOL TTYDRV_GDI_Initialize(void)
{
return TTYDRV_PALETTE_Initialize();
}
/***********************************************************************
* TTYDRV_DC_CreateDC
*/
BOOL TTYDRV_DC_CreateDC(HDC hdc, TTYDRV_PDEVICE **pdev, LPCWSTR driver, LPCWSTR device,
LPCWSTR output, const DEVMODEW *initData)
{
TTYDRV_PDEVICE *physDev;
TRACE("(%p, %s, %s, %s, %p)\n",
hdc, debugstr_w(driver), debugstr_w(device), debugstr_w(output), initData);
physDev = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(TTYDRV_PDEVICE));
if(!physDev) {
ERR("Can't allocate physDev\n");
return FALSE;
}
*pdev = physDev;
physDev->hdc = hdc;
physDev->org.x = physDev->org.y = 0;
if(GetObjectType(hdc) == OBJ_MEMDC) {
physDev->window = NULL;
physDev->cellWidth = 1;
physDev->cellHeight = 1;
} else {
physDev->window = root_window;
physDev->cellWidth = cell_width;
physDev->cellHeight = cell_height;
}
return TRUE;
}
/***********************************************************************
* TTYDRV_DC_DeleteDC
*/
BOOL TTYDRV_DC_DeleteDC(TTYDRV_PDEVICE *physDev)
{
TRACE("(%p)\n", physDev->hdc);
HeapFree( GetProcessHeap(), 0, physDev );
return TRUE;
}
/***********************************************************************
* GetDeviceCaps (TTYDRV.@)
*/
INT TTYDRV_GetDeviceCaps( TTYDRV_PDEVICE *physDev, INT cap )
{
switch(cap)
{
case DRIVERVERSION:
return 0x300;
case TECHNOLOGY:
return DT_RASDISPLAY;
case HORZSIZE:
return 0; /* FIXME: Screen width in mm */
case VERTSIZE:
return 0; /* FIXME: Screen height in mm */
case HORZRES:
return cell_width * screen_cols;
case VERTRES:
return cell_height * screen_rows;
case BITSPIXEL:
return 1; /* FIXME */
case PLANES:
return 1;
case NUMBRUSHES:
return 16 + 6;
case NUMPENS:
return 16;
case NUMMARKERS:
return 0;
case NUMFONTS:
return 0;
case NUMCOLORS:
return 100;
case PDEVICESIZE:
return sizeof(TTYDRV_PDEVICE);
case CURVECAPS:
return (CC_CIRCLES | CC_PIE | CC_CHORD | CC_ELLIPSES | CC_WIDE |
CC_STYLED | CC_WIDESTYLED | CC_INTERIORS | CC_ROUNDRECT);
case LINECAPS:
return (LC_POLYLINE | LC_MARKER | LC_POLYMARKER | LC_WIDE |
LC_STYLED | LC_WIDESTYLED | LC_INTERIORS);
case POLYGONALCAPS:
return (PC_POLYGON | PC_RECTANGLE | PC_WINDPOLYGON |
PC_SCANLINE | PC_WIDE | PC_STYLED | PC_WIDESTYLED | PC_INTERIORS);
case TEXTCAPS:
return 0;
case CLIPCAPS:
return CP_REGION;
case RASTERCAPS:
return (RC_BITBLT | RC_BANDING | RC_SCALING | RC_BITMAP64 | RC_DI_BITMAP |
RC_DIBTODEV | RC_BIGFONT | RC_STRETCHBLT | RC_STRETCHDIB | RC_DEVBITS);
case ASPECTX:
case ASPECTY:
return 36;
case ASPECTXY:
return 51;
case LOGPIXELSX:
case LOGPIXELSY:
return 72; /* FIXME */
case SIZEPALETTE:
return 256; /* FIXME */
case NUMRESERVED:
return 0;
case COLORRES:
return 0;
case PHYSICALWIDTH:
case PHYSICALHEIGHT:
case PHYSICALOFFSETX:
case PHYSICALOFFSETY:
case SCALINGFACTORX:
case SCALINGFACTORY:
case VREFRESH:
case DESKTOPVERTRES:
case DESKTOPHORZRES:
case BTLALIGNMENT:
return 0;
default:
FIXME("(%p): unsupported capability %d, will return 0\n", physDev->hdc, cap );
return 0;
}
}
/***********************************************************************
* GetDCOrgEx (TTYDRV.@)
*/
BOOL TTYDRV_GetDCOrgEx( TTYDRV_PDEVICE *physDev, LPPOINT pt )
{
*pt = physDev->org;
return TRUE;
}
/***********************************************************************
* SetDCOrg (TTYDRV.@)
*/
DWORD TTYDRV_SetDCOrg( TTYDRV_PDEVICE *physDev, INT x, INT y )
{
DWORD ret = MAKELONG( physDev->org.x, physDev->org.y );
physDev->org.x = x;
physDev->org.y = y;
return ret;
}
/**********************************************************************
* ExtEscape (X11DRV.@)
*/
INT TTYDRV_ExtEscape( TTYDRV_PDEVICE *physDev, INT escape, INT in_count, LPCVOID in_data,
INT out_count, LPVOID out_data )
{
switch(escape)
{
case QUERYESCSUPPORT:
if (in_data)
{
switch (*(const INT *)in_data)
{
case TTYDRV_ESCAPE:
return TRUE;
}
}
break;
case TTYDRV_ESCAPE:
if (in_data && in_count >= sizeof(enum ttydrv_escape_codes))
{
switch(*(const enum ttydrv_escape_codes *)in_data)
{
case TTYDRV_SET_DRAWABLE:
if (in_count >= sizeof(struct ttydrv_escape_set_drawable))
{
const struct ttydrv_escape_set_drawable *data = (const struct ttydrv_escape_set_drawable *)in_data;
physDev->org = data->org;
return TRUE;
}
break;
}
}
break;
}
return 0;
}
/*
* TTY DC objects
*
* Copyright 1999 Patrik Stridvall
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "ttydrv.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(ttydrv);
/***********************************************************************
* SelectFont (TTYDRV.@)
*/
HFONT TTYDRV_SelectFont(TTYDRV_PDEVICE *physDev, HFONT hfont, HANDLE gdiFont)
{
TRACE("(%p, %p)\n", physDev->hdc, hfont);
return (HFONT)1; /* Use device font */
}
/*
* TTY palette driver
*
* Copyright 1999 Patrik Stridvall
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include <stdlib.h>
#include "gdi.h"
#include "winbase.h"
#include "ttydrv.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(ttydrv);
/**********************************************************************/
static PALETTEENTRY *COLOR_sysPal;
static unsigned int palette_size = 256; /* FIXME */
/***********************************************************************
* TTYDRV_PALETTE_Initialize
*/
BOOL TTYDRV_PALETTE_Initialize(void)
{
unsigned int i;
PALETTEENTRY sys_pal_template[NB_RESERVED_COLORS];
TRACE("(void)\n");
COLOR_sysPal = HeapAlloc(GetProcessHeap(), 0, sizeof(PALETTEENTRY) * palette_size);
if(COLOR_sysPal == NULL) {
WARN("No memory to create system palette!\n");
return FALSE;
}
GetPaletteEntries( GetStockObject(DEFAULT_PALETTE), 0, NB_RESERVED_COLORS, sys_pal_template );
for(i=0; i < palette_size; i++ ) {
const PALETTEENTRY *src;
PALETTEENTRY *dst = &COLOR_sysPal[i];
if(i < NB_RESERVED_COLORS/2) {
src = &sys_pal_template[i];
} else if(i >= palette_size - NB_RESERVED_COLORS/2) {
src = &sys_pal_template[NB_RESERVED_COLORS + i - palette_size];
} else {
PALETTEENTRY pe = { 0, 0, 0, 0 };
src = &pe;
}
if((src->peRed + src->peGreen + src->peBlue) <= 0xB0) {
dst->peRed = 0;
dst->peGreen = 0;
dst->peBlue = 0;
dst->peFlags = PC_SYS_USED;
} else {
dst->peRed = 255;
dst->peGreen= 255;
dst->peBlue = 255;
dst->peFlags = PC_SYS_USED;
}
}
return TRUE;
}
/***********************************************************************
* GetSystemPaletteEntries (TTYDRV.@)
*/
UINT TTYDRV_GetSystemPaletteEntries( TTYDRV_PDEVICE *dev, UINT start, UINT count,
LPPALETTEENTRY entries )
{
UINT i;
if (!entries) return palette_size;
if (start >= palette_size) return 0;
if (start + count >= palette_size) count = palette_size - start;
for (i = 0; i < count; i++)
{
entries[i].peRed = COLOR_sysPal[start + i].peRed;
entries[i].peGreen = COLOR_sysPal[start + i].peGreen;
entries[i].peBlue = COLOR_sysPal[start + i].peBlue;
entries[i].peFlags = 0;
TRACE("\tidx(%02x) -> RGB(%08lx)\n", start + i, *(COLORREF*)(entries + i) );
}
return count;
}
/*
* TTY driver definitions
*
* Copyright 1998 Patrik Stridvall
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __WINE_TTYDRV_H
#define __WINE_TTYDRV_H
#ifndef __WINE_CONFIG_H
# error You must include config.h to use this header
#endif
#undef ERR
#if defined(HAVE_LIBCURSES) || defined(HAVE_LIBNCURSES)
#ifdef HAVE_NCURSES_H
# include <ncurses.h>
#elif defined(HAVE_CURSES_H)
# include <curses.h>
#endif
#endif
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
struct tagBITMAPOBJ;
#if defined(HAVE_LIBCURSES) || defined(HAVE_LIBNCURSES)
#define WINE_CURSES
#endif
/**************************************************************************
* TTY GDI driver
*/
#ifndef WINE_CURSES
typedef struct { int dummy; } WINDOW;
#endif
typedef struct {
HDC hdc;
POINT org;
WINDOW *window;
int cellWidth;
int cellHeight;
} TTYDRV_PDEVICE;
extern BOOL TTYDRV_GDI_Initialize(void);
/* TTY GDI bitmap driver */
extern HBITMAP TTYDRV_BITMAP_CreateDIBSection(TTYDRV_PDEVICE *physDev, BITMAPINFO *bmi, UINT usage, LPVOID *bits, HANDLE section, DWORD offset);
extern void TTYDRV_BITMAP_DeleteDIBSection(struct tagBITMAPOBJ *bmp);
extern BOOL TTYDRV_DC_Arc(TTYDRV_PDEVICE *physDev, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend);
extern LONG TTYDRV_DC_BitmapBits(HBITMAP hbitmap, void *bits, LONG count, WORD flags);
extern BOOL TTYDRV_DC_DeleteDC(TTYDRV_PDEVICE *physDev);
extern BOOL TTYDRV_DC_BitBlt(TTYDRV_PDEVICE *physDevDst, INT xDst, INT yDst, INT width, INT height, TTYDRV_PDEVICE *physDevSrc, INT xSrc, INT ySrc, DWORD rop);
extern BOOL TTYDRV_DC_Chord(TTYDRV_PDEVICE *physDev, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend);
extern BOOL TTYDRV_DC_Ellipse(TTYDRV_PDEVICE *physDev, INT left, INT top, INT right, INT bottom);
extern BOOL TTYDRV_DC_ExtFloodFill(TTYDRV_PDEVICE *physDev, INT x, INT y, COLORREF color, UINT fillType);
extern BOOL TTYDRV_DC_ExtTextOut(TTYDRV_PDEVICE *physDev, INT x, INT y, UINT flags, const RECT *lpRect, LPCWSTR str, UINT count, const INT *lpDx);
extern BOOL TTYDRV_DC_GetCharWidth(TTYDRV_PDEVICE *physDev, UINT firstChar, UINT lastChar, LPINT buffer);
extern COLORREF TTYDRV_DC_GetPixel(TTYDRV_PDEVICE *physDev, INT x, INT y);
extern BOOL TTYDRV_DC_GetTextExtentPoint(TTYDRV_PDEVICE *physDev, LPCWSTR str, INT count, LPSIZE size);
extern BOOL TTYDRV_DC_GetTextMetrics(TTYDRV_PDEVICE *physDev, TEXTMETRICW *metrics);
extern BOOL TTYDRV_DC_LineTo(TTYDRV_PDEVICE *physDev, INT x, INT y);
extern BOOL TTYDRV_DC_PaintRgn(TTYDRV_PDEVICE *physDev, HRGN hrgn);
extern BOOL TTYDRV_DC_PatBlt(TTYDRV_PDEVICE *physDev, INT left, INT top, INT width, INT height, DWORD rop);
extern BOOL TTYDRV_DC_Pie(TTYDRV_PDEVICE *physDev, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend);
extern BOOL TTYDRV_DC_Polygon(TTYDRV_PDEVICE *physDev, const POINT* pt, INT count);
extern BOOL TTYDRV_DC_Polyline(TTYDRV_PDEVICE *physDev, const POINT* pt, INT count);
extern BOOL TTYDRV_DC_PolyPolygon(TTYDRV_PDEVICE *physDev, const POINT* pt, const INT* counts, UINT polygons);
extern BOOL TTYDRV_DC_PolyPolyline(TTYDRV_PDEVICE *physDev, const POINT* pt, const DWORD* counts, DWORD polylines);
extern BOOL TTYDRV_DC_Rectangle(TTYDRV_PDEVICE *physDev, INT left, INT top, INT right, INT bottom);
extern BOOL TTYDRV_DC_RoundRect(TTYDRV_PDEVICE *physDev, INT left, INT top, INT right, INT bottom, INT ell_width, INT ell_height);
extern COLORREF TTYDRV_DC_SetPixel(TTYDRV_PDEVICE *physDev, INT x, INT y, COLORREF color);
extern BOOL TTYDRV_DC_StretchBlt(TTYDRV_PDEVICE *physDevDst, INT xDst, INT yDst, INT widthDst, INT heightDst, TTYDRV_PDEVICE *physDevSrc, INT xSrc, INT ySrc, INT widthSrc, INT heightSrc, DWORD rop);
INT TTYDRV_DC_SetDIBitsToDevice(TTYDRV_PDEVICE *physDev, INT xDest, INT yDest, DWORD cx, DWORD cy, INT xSrc, INT ySrc, UINT startscan, UINT lines, LPCVOID bits, const BITMAPINFO *info, UINT coloruse);
/* TTY GDI palette driver */
extern BOOL TTYDRV_PALETTE_Initialize(void);
#define TTYDRV_ESCAPE 6999
enum ttydrv_escape_codes
{
TTYDRV_SET_DRAWABLE /* set current drawable for a DC */
};
struct ttydrv_escape_set_drawable
{
enum ttydrv_escape_codes code; /* escape code (TTYDRV_SET_DRAWABLE) */
POINT org; /* origin of DC relative to drawable */
};
/**************************************************************************
* TTY USER driver
*/
extern int cell_width;
extern int cell_height;
extern int screen_rows;
extern int screen_cols;
extern WINDOW *root_window;
#endif /* !defined(__WINE_TTYDRV_H) */
/*
* TTYDRV initialization code
*
* Copyright 2000 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include <stdarg.h>
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
#include "wine/winbase16.h"
#include "wine/debug.h"
#include "ttydrv.h"
WINE_DEFAULT_DEBUG_CHANNEL(ttydrv);
int cell_width = 8;
int cell_height = 8;
int screen_rows = 50; /* default value */
int screen_cols = 80; /* default value */
WINDOW *root_window;
/***********************************************************************
* TTYDRV process initialisation routine
*/
static void process_attach(void)
{
#ifdef WINE_CURSES
if ((root_window = initscr()))
{
werase(root_window);
wrefresh(root_window);
}
getmaxyx(root_window, screen_rows, screen_cols);
#endif /* WINE_CURSES */
TTYDRV_GDI_Initialize();
}
/***********************************************************************
* TTYDRV process termination routine
*/
static void process_detach(void)
{
#ifdef WINE_CURSES
if (root_window) endwin();
#endif /* WINE_CURSES */
}
/***********************************************************************
* TTYDRV initialisation routine
*/
BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
{
switch(reason)
{
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hinst);
process_attach();
break;
case DLL_PROCESS_DETACH:
process_detach();
break;
}
return TRUE;
}
# GDI driver
@ cdecl Arc(ptr long long long long long long long long) TTYDRV_DC_Arc
@ cdecl BitBlt(ptr long long long long ptr long long long) TTYDRV_DC_BitBlt
@ cdecl Chord(ptr long long long long long long long long) TTYDRV_DC_Chord
@ cdecl CreateDC(long ptr wstr wstr wstr ptr) TTYDRV_DC_CreateDC
@ cdecl DeleteDC(ptr) TTYDRV_DC_DeleteDC
@ cdecl Ellipse(ptr long long long long) TTYDRV_DC_Ellipse
@ cdecl ExtEscape(ptr long long ptr long ptr) TTYDRV_ExtEscape
@ cdecl ExtFloodFill(ptr long long long long) TTYDRV_DC_ExtFloodFill
@ cdecl ExtTextOut(ptr long long long ptr ptr long ptr) TTYDRV_DC_ExtTextOut
@ cdecl GetBitmapBits(long ptr long) TTYDRV_GetBitmapBits
@ cdecl GetCharWidth(ptr long long ptr) TTYDRV_DC_GetCharWidth
@ cdecl GetDCOrgEx(ptr ptr) TTYDRV_GetDCOrgEx
@ cdecl GetDeviceCaps(ptr long) TTYDRV_GetDeviceCaps
@ cdecl GetPixel(ptr long long) TTYDRV_DC_GetPixel
@ cdecl GetSystemPaletteEntries(ptr long long ptr) TTYDRV_GetSystemPaletteEntries
@ cdecl GetTextExtentPoint(ptr ptr long ptr) TTYDRV_DC_GetTextExtentPoint
@ cdecl GetTextMetrics(ptr ptr) TTYDRV_DC_GetTextMetrics
@ cdecl LineTo(ptr long long) TTYDRV_DC_LineTo
@ cdecl PaintRgn(ptr long) TTYDRV_DC_PaintRgn
@ cdecl PatBlt(ptr long long long long long) TTYDRV_DC_PatBlt
@ cdecl Pie(ptr long long long long long long long long) TTYDRV_DC_Pie
@ cdecl PolyPolygon(ptr ptr ptr long) TTYDRV_DC_PolyPolygon
@ cdecl PolyPolyline(ptr ptr ptr long) TTYDRV_DC_PolyPolyline
@ cdecl Polygon(ptr ptr long) TTYDRV_DC_Polygon
@ cdecl Polyline(ptr ptr long) TTYDRV_DC_Polyline
@ cdecl Rectangle(ptr long long long long) TTYDRV_DC_Rectangle
@ cdecl RoundRect(ptr long long long long long long) TTYDRV_DC_RoundRect
@ cdecl SelectFont(ptr long long) TTYDRV_SelectFont
@ cdecl SetBitmapBits(long ptr long) TTYDRV_SetBitmapBits
@ cdecl SetDCOrg(ptr long long) TTYDRV_SetDCOrg
@ cdecl SetDIBitsToDevice(ptr long long long long long long long long ptr ptr long) TTYDRV_DC_SetDIBitsToDevice
@ cdecl SetPixel(ptr long long long) TTYDRV_DC_SetPixel
@ cdecl StretchBlt(ptr long long long long ptr long long long long long) TTYDRV_DC_StretchBlt
# USER driver
@ cdecl CreateDesktopWindow(long) TTYDRV_CreateDesktopWindow
@ cdecl CreateWindow(long ptr long) TTYDRV_CreateWindow
@ cdecl DestroyWindow(long) TTYDRV_DestroyWindow
@ cdecl GetDC(long long long long) TTYDRV_GetDC
@ cdecl SetWindowPos(ptr) TTYDRV_SetWindowPos
@ cdecl ShowWindow(long long) TTYDRV_ShowWindow
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment