PageRenderTime 100ms CodeModel.GetById 91ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/platform/win/widget.d

http://github.com/wilkie/djehuty
D | 35 lines | 18 code | 8 blank | 9 comment | 0 complexity | a2e1ceaea150fbf85b3c582ecb079b7a MD5 | raw file
 1/*
 2 * widget.d
 3 *
 4 * This file holds the WinWidget interface that must be a part of an OSWidget.
 5 *
 6 * Author: Dave Wilkinson
 7 *
 8 */
 9
10module platform.win.widget;
11
12import platform.win.common;
13
14import graphics.view;
15
16// os control interface
17
18interface WinWidget {
19protected:
20	LRESULT _AppLoopMessage(uint message, WPARAM wParam, LPARAM lParam);
21	View _ReturnView(out int x, out int y, out int w, out int h);
22	HDC _GetDC();
23}
24
25HDC GetBaseDC(WinWidget ctrl) {
26	return ctrl._GetDC;
27}
28
29LRESULT CallAppLoopMessage(WinWidget ctrl, uint message, WPARAM wParam, LPARAM lParam) {
30	return ctrl._AppLoopMessage(message, wParam, lParam);
31}
32
33View CallReturnView(WinWidget ctrl, out int x, out int y, out int w, out int h) {
34	return ctrl._ReturnView(x,y,w,h);
35}