source: trunk/src/user32/new/oslibgdi.h@ 340

Last change on this file since 340 was 340, checked in by sandervl, 26 years ago

Point/Rectangle bug fixes

File size: 1.3 KB
Line 
1/* $Id: oslibgdi.h,v 1.2 1999-07-19 18:40:43 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 <win32wnd.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
40//******************************************************************************
41//Map win32 y coordinate (in window coordinates) to OS/2 y coord. (in window coordinates)
42//******************************************************************************
43inline ULONG MapOS2ToWin32Y(Win32Window *window, ULONG y)
44{
45 return window->getWindowHeight() - y;
46}
47
48ULONG MapOS2ToWin32Y(HWND hwndParent, ULONG cy, ULONG y);
49BOOL MapOS2ToWin32Point(HWND hwndParent, HWND hwndChild, OSLIBPOINT *point);
50
51BOOL MapOS2ToWin32Rectl(PRECTLOS2 rectOS2, PRECT rectWin32);
52BOOL MapWin32ToOS2Rectl(PRECT rectWin32, PRECTLOS2 rectOS2);
53
54#endif //__OSLIBGDI_H__
Note: See TracBrowser for help on using the repository browser.