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

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

* empty log message *

File size: 2.5 KB
Line 
1/* $Id: wingdi.cpp,v 1.3 1999-07-18 14:39:35 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 if(OSLibWinQueryUpdateRect(window->getOS2WindowHandle(), &lps->rcPaint) == FALSE)
33 {
34 dprintf(("BeginPaint, NO update rectl"));
35 return 0;
36 }
37 lps->hdc = OSLibWinBeginPaint(window->getOS2WindowHandle(), (PVOID)&lps->rcPaint);
38
39 return lps->hdc;
40}
41//******************************************************************************
42//******************************************************************************
43BOOL WIN32API EndPaint(HWND hwnd, const PAINTSTRUCT *lps)
44{
45 dprintf(("EndPaint %x\n", hwnd));
46 return OSLibWinEndPaint(lps->hdc);
47}
48//******************************************************************************
49//TODO: PARENT_DC flag
50//******************************************************************************
51HDC WIN32API GetDC(HWND hwnd)
52{
53 Win32Window *window;
54
55 window = Win32Window::GetWindowFromHandle(hwnd);
56 if(!window) {
57 dprintf(("GetDC, window %x not found", hwnd));
58 return 0;
59 }
60 dprintf(("GetDC %x", hwnd));
61 return OSLibWinGetPS(window->getOS2WindowHandle());
62}
63//******************************************************************************
64//TODO
65//******************************************************************************
66HDC WIN32API GetDCEx(HWND hwnd, HRGN arg2, DWORD arg3)
67{
68#ifdef DEBUG
69 WriteLog("USER32: GetDCEx NOT CORRECT!\n");
70#endif
71 return GetDC(hwnd);
72}
73//******************************************************************************
74//******************************************************************************
75int WIN32API ReleaseDC(HWND hwnd, HDC hdc)
76{
77 return OSLibWinReleasePS(hdc);
78}
79//******************************************************************************
80//******************************************************************************
Note: See TracBrowser for help on using the repository browser.