source: trunk/src/user32/new/wingdi.cpp@ 340

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

Point/Rectangle bug fixes

File size: 2.3 KB
Line 
1/* $Id: wingdi.cpp,v 1.4 1999-07-19 18:40:44 sandervl Exp $ */
2/*
3 * Win32 Window graphics apis for OS/2
4 *
5 *
6 * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
7 *
8 *
9 * Project Odin Software License can be found in LICENSE.TXT
10 *
11 */
12#include <os2win.h>
13#include <misc.h>
14
15#include <win32wnd.h>
16#include <oslibwin.h>
17#include <oslibgdi.h>
18
19//******************************************************************************
20//TODO: Not complete
21//******************************************************************************
22HDC WIN32API BeginPaint(HWND hwnd, PPAINTSTRUCT lps)
23{
24 Win32Window *window;
25
26 window = Win32Window::GetWindowFromHandle(hwnd);
27 if(!window) {
28 dprintf(("GetDC, window %x not found", hwnd));
29 return 0;
30 }
31 dprintf(("BeginPaint %X\n", hwnd));
32 lps->hdc = OSLibWinBeginPaint(window->getOS2WindowHandle(), &lps->rcPaint);
33
34 return lps->hdc;
35}
36//******************************************************************************
37//******************************************************************************
38BOOL WIN32API EndPaint(HWND hwnd, const PAINTSTRUCT *lps)
39{
40 dprintf(("EndPaint %x\n", hwnd));
41 return OSLibWinEndPaint(lps->hdc);
42}
43//******************************************************************************
44//TODO: PARENT_DC flag
45//******************************************************************************
46HDC WIN32API GetDC(HWND hwnd)
47{
48 Win32Window *window;
49
50 window = Win32Window::GetWindowFromHandle(hwnd);
51 if(!window) {
52 dprintf(("GetDC, window %x not found", hwnd));
53 return 0;
54 }
55 dprintf(("GetDC %x", hwnd));
56 return OSLibWinGetPS(window->getOS2WindowHandle());
57}
58//******************************************************************************
59//TODO
60//******************************************************************************
61HDC WIN32API GetDCEx(HWND hwnd, HRGN arg2, DWORD arg3)
62{
63#ifdef DEBUG
64 WriteLog("USER32: GetDCEx NOT CORRECT!\n");
65#endif
66 return GetDC(hwnd);
67}
68//******************************************************************************
69//******************************************************************************
70int WIN32API ReleaseDC(HWND hwnd, HDC hdc)
71{
72 return OSLibWinReleasePS(hdc);
73}
74//******************************************************************************
75//******************************************************************************
Note: See TracBrowser for help on using the repository browser.