1 | /* $Id: oslibgdi.h,v 1.5 2000-01-18 20:08:10 sandervl Exp $ */
|
---|
2 | /*
|
---|
3 | * Window GDI wrapper functions for OS/2
|
---|
4 | *
|
---|
5 | *
|
---|
6 | * Copyright 1999 Sander van Leeuwen (sandervl@xs4all.nl)
|
---|
7 | *
|
---|
8 | *
|
---|
9 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
10 | *
|
---|
11 | */
|
---|
12 | #ifndef __OSLIBGDI_H__
|
---|
13 | #define __OSLIBGDI_H__
|
---|
14 |
|
---|
15 | #ifdef OS2_INCLUDED
|
---|
16 | #include "win32type.h"
|
---|
17 | #endif
|
---|
18 | #include <win32wbase.h>
|
---|
19 |
|
---|
20 | typedef struct
|
---|
21 | {
|
---|
22 | LONG xLeft;
|
---|
23 | LONG yBottom;
|
---|
24 | LONG xRight;
|
---|
25 | LONG yTop;
|
---|
26 | } RECTLOS2, *PRECTLOS2;
|
---|
27 |
|
---|
28 | typedef struct
|
---|
29 | {
|
---|
30 | LONG x;
|
---|
31 | LONG y;
|
---|
32 | } OSLIBPOINT;
|
---|
33 |
|
---|
34 | HDC OSLibWinBeginPaint(HWND hwnd, RECT *pRectl);
|
---|
35 | BOOL OSLibWinEndPaint(HDC hdc);
|
---|
36 |
|
---|
37 | HDC OSLibWinGetPS(HWND hwnd);
|
---|
38 | BOOL OSLibWinReleasePS(HDC hdc);
|
---|
39 |
|
---|
40 | BOOL OSLibWinInvalidateRect(HWND hwnd, PRECT pRect, BOOL fIncludeChildren); //must be RECTL pointer!
|
---|
41 | BOOL OSLibWinQueryUpdateRect(HWND hwnd, PRECT pRect);
|
---|
42 |
|
---|
43 | //Mapping functions
|
---|
44 |
|
---|
45 | INT mapScreenY(INT screenPosY);
|
---|
46 | INT mapScreenY(INT screenH,INT screenPosY);
|
---|
47 | INT mapY(HWND os2Client,INT clientPosY);
|
---|
48 | INT mapY(Win32BaseWindow *win32wnd,INT clientPosY);
|
---|
49 | INT mapOS2ToWin32Y(HWND os2From,HWND os2To,INT fromPosY);
|
---|
50 | INT mapOS2ToWin32Y(Win32BaseWindow *wndFrom,Win32BaseWindow *wndTo,INT fromPosY);
|
---|
51 | INT mapWin32Y(HWND os2From,HWND os2To,INT fromPosY);
|
---|
52 | INT mapWin32Y(Win32BaseWindow *wndFrom,Win32BaseWindow *wndTo,INT fromPosY);
|
---|
53 | BOOL mapScreenPoint(OSLIBPOINT *screenPt);
|
---|
54 | BOOL mapScreenPoint(INT screenH,OSLIBPOINT *screenPt);
|
---|
55 | BOOL mapPoint(HWND os2Client,OSLIBPOINT *clientPt);
|
---|
56 | BOOL mapPoint(Win32BaseWindow *win32wnd,OSLIBPOINT *clientPt);
|
---|
57 | BOOL mapOS2ToWin32Point(HWND os2From,HWND os2To,OSLIBPOINT *fromPt);
|
---|
58 | BOOL mapOS2ToWin32Point(Win32BaseWindow *wndFrom,Win32BaseWindow *wndTo,OSLIBPOINT *fromPt);
|
---|
59 | BOOL mapWin32Point(HWND os2From,HWND os2To,OSLIBPOINT *fromPt);
|
---|
60 | BOOL mapWin32Point(Win32BaseWindow *wndFrom,Win32BaseWindow *wndTo,OSLIBPOINT *fromPt);
|
---|
61 | BOOL mapOS2ToWin32ScreenRect(PRECTLOS2 rectOS2,PRECT rectWin32);
|
---|
62 | BOOL mapWin32ToOS2ScreenRect(PRECT rectWin32,PRECTLOS2 rectOS2);
|
---|
63 | BOOL mapOS2ToWin32Rect(HWND os2Client,PRECTLOS2 rectOS2,PRECT rectWin32);
|
---|
64 | BOOL mapOS2ToWin32Rect(Win32BaseWindow *win32wnd,PRECTLOS2 rectOS2,PRECT rectWin32);
|
---|
65 | BOOL mapOS2ToWin32Rect(HWND os2From,HWND os2To,PRECTLOS2 rectOS2,PRECT rectWin32);
|
---|
66 | BOOL mapOS2ToWin32Rect(Win32BaseWindow *wndFrom,Win32BaseWindow *wndTo,PRECTLOS2 rectOS2,PRECT rectWin32);
|
---|
67 | BOOL mapWin32ToOS2Rect(HWND os2Client,PRECT rectWin32,PRECTLOS2 rectOS2);
|
---|
68 | BOOL mapWin32ToOS2Rect(Win32BaseWindow *win32wnd,PRECT rectWin32,PRECTLOS2 rectOS2);
|
---|
69 | BOOL mapWin32ToOS2Rect(HWND os2From,HWND os2To,PRECT rectWin32,PRECTLOS2 rectOS2);
|
---|
70 | BOOL mapWin32ToOS2Rect(Win32BaseWindow *wndFrom,Win32BaseWindow *wndTo,PRECT rectWin32,PRECTLOS2 rectOS2);
|
---|
71 | BOOL mapWin32Rect(HWND os2From,HWND os2To,PRECT rectWin32);
|
---|
72 | BOOL copyOS2ToWin32Rect(PRECTLOS2 rectOS2,PRECT rectWin32);
|
---|
73 | BOOL copyWin32ToOS2WindowRect(PRECT rectWin32,PRECTLOS2 rectOS2);
|
---|
74 | INT mapOS2ToWin32ChildOrigin(INT parentH,INT parentPosY,INT childH);
|
---|
75 |
|
---|
76 | #endif //__OSLIBGDI_H__
|
---|