|
Last change
on this file since 372 was 342, checked in by sandervl, 26 years ago |
|
Accelerator support (not working) + bugfixes
|
|
File size:
1.3 KB
|
| Line | |
|---|
| 1 | /* $Id: oslibgdi.h,v 1.3 1999-07-20 07:42:35 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 |
|
|---|
| 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 | //******************************************************************************
|
|---|
| 41 | //Map win32 y coordinate (in window coordinates) to OS/2 y coord. (in window coordinates)
|
|---|
| 42 | //******************************************************************************
|
|---|
| 43 | inline ULONG MapOS2ToWin32Y(Win32Window *window, ULONG y)
|
|---|
| 44 | {
|
|---|
| 45 | return window->getWindowHeight() - y - 1;
|
|---|
| 46 | }
|
|---|
| 47 |
|
|---|
| 48 | ULONG MapOS2ToWin32Y(HWND hwndParent, ULONG cy, ULONG y);
|
|---|
| 49 | BOOL MapOS2ToWin32Point(HWND hwndParent, HWND hwndChild, OSLIBPOINT *point);
|
|---|
| 50 |
|
|---|
| 51 | BOOL MapOS2ToWin32Rectl(PRECTLOS2 rectOS2, PRECT rectWin32);
|
|---|
| 52 | BOOL MapWin32ToOS2Rectl(PRECT rectWin32, PRECTLOS2 rectOS2);
|
|---|
| 53 |
|
|---|
| 54 | #endif //__OSLIBGDI_H__
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.