source: trunk/src/user32/oslibgdi.h@ 2013

Last change on this file since 2013 was 1849, checked in by cbratschi, 26 years ago

map rect, WM_ERASEBKGND and other fixes

File size: 1.8 KB
Line 
1/* $Id: oslibgdi.h,v 1.2 1999-11-26 17:06:07 cbratschi 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
20typedef struct
21{
22 LONG xLeft;
23 LONG yBottom;
24 LONG xRight;
25 LONG yTop;
26} RECTLOS2, *PRECTLOS2;
27
28typedef struct
29{
30 LONG x;
31 LONG y;
32} OSLIBPOINT;
33
34HDC OSLibWinBeginPaint(HWND hwnd, RECT *pRectl);
35BOOL OSLibWinEndPaint(HDC hdc);
36
37HDC OSLibWinGetPS(HWND hwnd);
38BOOL OSLibWinReleasePS(HDC hdc);
39
40BOOL OSLibWinInvalidateRect(HWND hwnd, PRECT pRect, BOOL fIncludeChildren); //must be RECTL pointer!
41BOOL OSLibWinQueryUpdateRect(HWND hwnd, PRECT pRect);
42
43//******************************************************************************
44//Map win32 y coordinate (in window coordinates) to OS/2 y coord. (in window coordinates)
45//******************************************************************************
46inline ULONG MapOS2ToWin32Y(Win32BaseWindow *window, ULONG y)
47{
48 return window->getWindowHeight() - y - 1;
49}
50
51ULONG MapOS2ToWin32Y(HWND hwndParent, ULONG cy, ULONG y);
52BOOL MapOS2ToWin32Point(HWND hwndParent, HWND hwndChild, OSLIBPOINT *point);
53
54//map os/2 rectangle to screen coordinates and convert to win32 rect
55BOOL MapOS2ToWin32Rectl(HWND hwndParent, HWND hwndChild, PRECTLOS2 rectOS2, PRECT rectWin32);
56
57BOOL MapOS2ToWin32Rectl(HWND hwnd,PRECTLOS2 rectOS2, PRECT rectWin32);
58BOOL MapWin32ToOS2Rectl(HWND hwnd,PRECT rectWin32, PRECTLOS2 rectOS2);
59
60BOOL MapOS2ToWin32WindowRect(PRECTLOS2 rectOS2,PRECT rectWin32);
61BOOL MapWin32ToOS2WindowRect(PRECT rectWin32,PRECTLOS2 rectOS2);
62
63#endif //__OSLIBGDI_H__
Note: See TracBrowser for help on using the repository browser.