Update shell xxxAW wrapper prototypes for fixed SHLWAPI functions.
[wine] / dlls / ttydrv / ttydrv.h
1 /*
2  * TTY driver definitions
3  *
4  * Copyright 1998 Patrik Stridvall
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #ifndef __WINE_TTYDRV_H
22 #define __WINE_TTYDRV_H
23
24 #ifndef __WINE_CONFIG_H 
25 # error You must include config.h to use this header 
26 #endif 
27
28 #undef ERR
29 #ifdef HAVE_NCURSES_H
30 # include <ncurses.h>
31 #elif defined(HAVE_CURSES_H)
32 # include <curses.h>
33 #endif
34
35 #include "windef.h"
36 #include "wingdi.h"
37 #include "wine/winuser16.h"
38 #include "wine/wingdi16.h"
39 #include "user.h"
40
41 struct tagBITMAPOBJ;
42 struct tagCLASS;
43 struct tagDC;
44 struct tagDESKTOP;
45 struct tagPALETTEOBJ;
46 struct tagWND;
47 struct tagCURSORICONINFO;
48 struct tagCREATESTRUCTA;
49 struct tagWINDOWPOS;
50
51 #if defined(HAVE_LIBCURSES) || defined(HAVE_LIBNCURSES)
52 #define WINE_CURSES
53 #endif
54
55 /**************************************************************************
56  * TTY GDI driver
57  */
58
59 extern BOOL TTYDRV_GDI_Initialize(void);
60
61 /* TTY GDI bitmap driver */
62
63 extern HBITMAP TTYDRV_BITMAP_CreateDIBSection(struct tagDC *dc, BITMAPINFO *bmi, UINT usage, LPVOID *bits, HANDLE section, DWORD offset);
64 extern INT TTYDRV_BITMAP_SetDIBits(struct tagBITMAPOBJ *bmp, struct tagDC *dc, UINT startscan, UINT lines, LPCVOID bits, const BITMAPINFO *info, UINT coloruse, HBITMAP hbitmap);
65 extern INT TTYDRV_BITMAP_GetDIBits(struct tagBITMAPOBJ *bmp, struct tagDC *dc, UINT startscan, UINT lines, LPVOID bits, BITMAPINFO *info, UINT coloruse, HBITMAP hbitmap);
66 extern void TTYDRV_BITMAP_DeleteDIBSection(struct tagBITMAPOBJ *bmp);
67 extern UINT TTYDRV_BITMAP_SetDIBColorTable(struct tagBITMAPOBJ *,struct tagDC *,UINT,UINT,const RGBQUAD *);
68 extern UINT TTYDRV_BITMAP_GetDIBColorTable(struct tagBITMAPOBJ *,struct tagDC *,UINT,UINT,RGBQUAD *);
69 extern INT TTYDRV_BITMAP_Lock(struct tagBITMAPOBJ *,INT,BOOL);
70 extern void TTYDRV_BITMAP_Unlock(struct tagBITMAPOBJ *,BOOL);
71
72 #ifndef WINE_CURSES
73 typedef struct { int dummy; } WINDOW;
74 #endif
75
76 typedef struct {
77   WINDOW *window;
78   int cellWidth;
79   int cellHeight;
80 } TTYDRV_PDEVICE;
81
82 typedef struct {
83   int dummy; /* FIXME: Remove later */
84 } TTYDRV_PHYSBITMAP;
85
86 extern BOOL TTYDRV_DC_CreateBitmap(HBITMAP hbitmap);
87
88 extern BOOL TTYDRV_DC_Arc(struct tagDC *dc, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend);
89 extern LONG TTYDRV_DC_BitmapBits(HBITMAP hbitmap, void *bits, LONG count, WORD flags);
90 extern BOOL TTYDRV_DC_CreateBitmap(HBITMAP hbitmap);
91 extern BOOL TTYDRV_DC_CreateDC(struct tagDC *dc, LPCSTR driver, LPCSTR device, LPCSTR output, const DEVMODEA *initData);
92 extern BOOL TTYDRV_DC_DeleteDC(struct tagDC *dc);
93 extern BOOL TTYDRV_DC_DeleteObject(HGDIOBJ handle);
94 extern BOOL TTYDRV_DC_BitBlt(struct tagDC *dcDst, INT xDst, INT yDst, INT width, INT height, struct tagDC *dcSrc, INT xSrc, INT ySrc, DWORD rop);
95 extern BOOL TTYDRV_DC_Chord(struct tagDC *dc, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend);
96 extern BOOL TTYDRV_DC_Ellipse(struct tagDC *dc, INT left, INT top, INT right, INT bottom);
97 extern INT TTYDRV_DC_Escape(struct tagDC *dc, INT nEscape, INT cbInput, SEGPTR lpInData, SEGPTR lpOutData);
98 extern BOOL TTYDRV_DC_ExtFloodFill(struct tagDC *dc, INT x, INT y, COLORREF color, UINT fillType);
99 extern BOOL TTYDRV_DC_ExtTextOut(struct tagDC *dc, INT x, INT y, UINT flags, const RECT *lpRect, LPCWSTR str, UINT count, const INT *lpDx);
100 extern BOOL TTYDRV_DC_GetCharWidth(struct tagDC *dc, UINT firstChar, UINT lastChar, LPINT buffer);
101 extern COLORREF TTYDRV_DC_GetPixel(struct tagDC *dc, INT x, INT y);
102
103 extern BOOL TTYDRV_DC_GetTextExtentPoint(struct tagDC *dc, LPCWSTR str, INT count, LPSIZE size);
104 extern BOOL TTYDRV_DC_GetTextMetrics(struct tagDC *dc, TEXTMETRICW *metrics);
105 extern BOOL TTYDRV_DC_LineTo(struct tagDC *dc, INT x, INT y);
106 extern BOOL TTYDRV_DC_PaintRgn(struct tagDC *dc, HRGN hrgn);
107 extern BOOL TTYDRV_DC_PatBlt(struct tagDC *dc, INT left, INT top, INT width, INT height, DWORD rop);
108 extern BOOL TTYDRV_DC_Pie(struct tagDC *dc, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend);
109 extern BOOL TTYDRV_DC_Polygon(struct tagDC *dc, const POINT* pt, INT count);
110 extern BOOL TTYDRV_DC_Polyline(struct tagDC *dc, const POINT* pt, INT count);
111 extern BOOL TTYDRV_DC_PolyPolygon(struct tagDC *dc, const POINT* pt, const INT* counts, UINT polygons);
112 extern BOOL TTYDRV_DC_PolyPolyline(struct tagDC *dc, const POINT* pt, const DWORD* counts, DWORD polylines);
113 extern BOOL TTYDRV_DC_Rectangle(struct tagDC *dc, INT left, INT top, INT right, INT bottom);
114 extern BOOL TTYDRV_DC_RoundRect(struct tagDC *dc, INT left, INT top, INT right, INT bottom, INT ell_width, INT ell_height);
115 extern void TTYDRV_DC_SetDeviceClipping(struct tagDC *dc);
116 extern HGDIOBJ TTYDRV_DC_SelectObject(struct tagDC *dc, HGDIOBJ handle);
117 extern COLORREF TTYDRV_DC_SetBkColor(struct tagDC *dc, COLORREF color);
118 extern COLORREF TTYDRV_DC_SetPixel(struct tagDC *dc, INT x, INT y, COLORREF color);
119 extern COLORREF TTYDRV_DC_SetTextColor(struct tagDC *dc, COLORREF color);
120 extern BOOL TTYDRV_DC_StretchBlt(struct tagDC *dcDst, INT xDst, INT yDst, INT widthDst, INT heightDst, struct tagDC *dcSrc, INT xSrc, INT ySrc, INT widthSrc, INT heightSrc, DWORD rop);
121 INT TTYDRV_DC_SetDIBitsToDevice(struct tagDC *dc, INT xDest, INT yDest, DWORD cx, DWORD cy, INT xSrc, INT ySrc, UINT startscan, UINT lines, LPCVOID bits, const BITMAPINFO *info, UINT coloruse);
122
123 /* TTY GDI palette driver */
124
125 extern struct tagPALETTE_DRIVER TTYDRV_PALETTE_Driver;
126
127 extern BOOL TTYDRV_PALETTE_Initialize(void);
128 extern int TTYDRV_PALETTE_SetMapping(struct tagPALETTEOBJ *palPtr, UINT uStart, UINT uNum, BOOL mapOnly);
129 extern int TTYDRV_PALETTE_UpdateMapping(struct tagPALETTEOBJ *palPtr);
130 extern BOOL TTYDRV_PALETTE_IsDark(int pixel);
131
132 /**************************************************************************
133  * TTY USER driver
134  */
135
136 extern int cell_width;
137 extern int cell_height;
138 extern int screen_rows;
139 extern int screen_cols;
140 extern WINDOW *root_window;
141
142 #endif /* !defined(__WINE_TTYDRV_H) */