Fixed the behavior for SHGetFileInfo when the SHGFI_USEFILEATTRIBUTES
[wine] / dlls / ttydrv / ttydrv.h
1 /*
2  * TTY driver definitions
3  */
4
5 #ifndef __WINE_TTYDRV_H
6 #define __WINE_TTYDRV_H
7
8 #include "config.h"
9
10 #undef ERR
11 #ifdef HAVE_NCURSES_H
12 # include <ncurses.h>
13 #elif defined(HAVE_CURSES_H)
14 # include <curses.h>
15 #endif
16
17 #include "windef.h"
18 #include "wingdi.h"
19 #include "wine/winuser16.h"
20 #include "wine/wingdi16.h"
21 #include "user.h"
22
23 struct tagBITMAPOBJ;
24 struct tagCLASS;
25 struct tagDC;
26 struct tagDESKTOP;
27 struct tagPALETTEOBJ;
28 struct tagWND;
29 struct tagCURSORICONINFO;
30 struct tagCREATESTRUCTA;
31 struct tagWINDOWPOS;
32
33 #if defined(HAVE_LIBCURSES) || defined(HAVE_LIBNCURSES)
34 #define WINE_CURSES
35 #endif
36
37 /**************************************************************************
38  * TTY GDI driver
39  */
40
41 extern BOOL TTYDRV_GDI_Initialize(void);
42
43 /* TTY GDI bitmap driver */
44
45 extern HBITMAP TTYDRV_BITMAP_CreateDIBSection(struct tagDC *dc, BITMAPINFO *bmi, UINT usage, LPVOID *bits, HANDLE section, DWORD offset);
46 extern INT TTYDRV_BITMAP_SetDIBits(struct tagBITMAPOBJ *bmp, struct tagDC *dc, UINT startscan, UINT lines, LPCVOID bits, const BITMAPINFO *info, UINT coloruse, HBITMAP hbitmap);
47 extern INT TTYDRV_BITMAP_GetDIBits(struct tagBITMAPOBJ *bmp, struct tagDC *dc, UINT startscan, UINT lines, LPVOID bits, BITMAPINFO *info, UINT coloruse, HBITMAP hbitmap);
48 extern void TTYDRV_BITMAP_DeleteDIBSection(struct tagBITMAPOBJ *bmp);
49 extern UINT TTYDRV_BITMAP_SetDIBColorTable(struct tagBITMAPOBJ *,struct tagDC *,UINT,UINT,const RGBQUAD *);
50 extern UINT TTYDRV_BITMAP_GetDIBColorTable(struct tagBITMAPOBJ *,struct tagDC *,UINT,UINT,RGBQUAD *);
51 extern INT TTYDRV_BITMAP_Lock(struct tagBITMAPOBJ *,INT,BOOL);
52 extern void TTYDRV_BITMAP_Unlock(struct tagBITMAPOBJ *,BOOL);
53
54 #ifndef WINE_CURSES
55 typedef struct { int dummy; } WINDOW;
56 #endif
57
58 typedef struct {
59   WINDOW *window;
60   int cellWidth;
61   int cellHeight;
62 } TTYDRV_PDEVICE;
63
64 typedef struct {
65   int dummy; /* FIXME: Remove later */
66 } TTYDRV_PHYSBITMAP;
67
68 extern BOOL TTYDRV_DC_CreateBitmap(HBITMAP hbitmap);
69
70 extern BOOL TTYDRV_DC_Arc(struct tagDC *dc, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend);
71 extern LONG TTYDRV_DC_BitmapBits(HBITMAP hbitmap, void *bits, LONG count, WORD flags);
72 extern BOOL TTYDRV_DC_CreateBitmap(HBITMAP hbitmap);
73 extern BOOL TTYDRV_DC_CreateDC(struct tagDC *dc, LPCSTR driver, LPCSTR device, LPCSTR output, const DEVMODEA *initData);
74 extern BOOL TTYDRV_DC_DeleteDC(struct tagDC *dc);
75 extern BOOL TTYDRV_DC_DeleteObject(HGDIOBJ handle);
76 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);
77 extern BOOL TTYDRV_DC_Chord(struct tagDC *dc, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend);
78 extern BOOL TTYDRV_DC_Ellipse(struct tagDC *dc, INT left, INT top, INT right, INT bottom);
79 extern INT TTYDRV_DC_Escape(struct tagDC *dc, INT nEscape, INT cbInput, SEGPTR lpInData, SEGPTR lpOutData);
80 extern BOOL TTYDRV_DC_ExtFloodFill(struct tagDC *dc, INT x, INT y, COLORREF color, UINT fillType);
81 extern BOOL TTYDRV_DC_ExtTextOut(struct tagDC *dc, INT x, INT y, UINT flags, const RECT *lpRect, LPCWSTR str, UINT count, const INT *lpDx);
82 extern BOOL TTYDRV_DC_GetCharWidth(struct tagDC *dc, UINT firstChar, UINT lastChar, LPINT buffer);
83 extern COLORREF TTYDRV_DC_GetPixel(struct tagDC *dc, INT x, INT y);
84
85 extern BOOL TTYDRV_DC_GetTextExtentPoint(struct tagDC *dc, LPCWSTR str, INT count, LPSIZE size);
86 extern BOOL TTYDRV_DC_GetTextMetrics(struct tagDC *dc, TEXTMETRICW *metrics);
87 extern BOOL TTYDRV_DC_LineTo(struct tagDC *dc, INT x, INT y);
88 extern BOOL TTYDRV_DC_PaintRgn(struct tagDC *dc, HRGN hrgn);
89 extern BOOL TTYDRV_DC_PatBlt(struct tagDC *dc, INT left, INT top, INT width, INT height, DWORD rop);
90 extern BOOL TTYDRV_DC_Pie(struct tagDC *dc, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend);
91 extern BOOL TTYDRV_DC_Polygon(struct tagDC *dc, const POINT* pt, INT count);
92 extern BOOL TTYDRV_DC_Polyline(struct tagDC *dc, const POINT* pt, INT count);
93 extern BOOL TTYDRV_DC_PolyPolygon(struct tagDC *dc, const POINT* pt, const INT* counts, UINT polygons);
94 extern BOOL TTYDRV_DC_PolyPolyline(struct tagDC *dc, const POINT* pt, const DWORD* counts, DWORD polylines);
95 extern BOOL TTYDRV_DC_Rectangle(struct tagDC *dc, INT left, INT top, INT right, INT bottom);
96 extern BOOL TTYDRV_DC_RoundRect(struct tagDC *dc, INT left, INT top, INT right, INT bottom, INT ell_width, INT ell_height);
97 extern void TTYDRV_DC_SetDeviceClipping(struct tagDC *dc);
98 extern HGDIOBJ TTYDRV_DC_SelectObject(struct tagDC *dc, HGDIOBJ handle);
99 extern COLORREF TTYDRV_DC_SetBkColor(struct tagDC *dc, COLORREF color);
100 extern COLORREF TTYDRV_DC_SetPixel(struct tagDC *dc, INT x, INT y, COLORREF color);
101 extern COLORREF TTYDRV_DC_SetTextColor(struct tagDC *dc, COLORREF color);
102 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);
103 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);
104
105 /* TTY GDI palette driver */
106
107 extern struct tagPALETTE_DRIVER TTYDRV_PALETTE_Driver;
108
109 extern BOOL TTYDRV_PALETTE_Initialize(void);
110 extern int TTYDRV_PALETTE_SetMapping(struct tagPALETTEOBJ *palPtr, UINT uStart, UINT uNum, BOOL mapOnly);
111 extern int TTYDRV_PALETTE_UpdateMapping(struct tagPALETTEOBJ *palPtr);
112 extern BOOL TTYDRV_PALETTE_IsDark(int pixel);
113
114 /**************************************************************************
115  * TTY USER driver
116  */
117
118 extern int cell_width;
119 extern int cell_height;
120 extern int screen_rows;
121 extern int screen_cols;
122 extern WINDOW *root_window;
123
124 #endif /* !defined(__WINE_TTYDRV_H) */