1 /*
2  * DSFML - The Simple and Fast Multimedia Library for D
3  *
4  * Copyright (c) 2013 - 2017 Jeremy DeHaan (dehaan.jeremiah@gmail.com)
5  *
6  * This software is provided 'as-is', without any express or implied warranty.
7  * In no event will the authors be held liable for any damages arising from the
8  * use of this software.
9  *
10  * Permission is granted to anyone to use this software for any purpose,
11  * including commercial applications, and to alter it and redistribute it
12  * freely, subject to the following restrictions:
13  *
14  * 1. The origin of this software must not be misrepresented; you must not claim
15  * that you wrote the original software. If you use this software in a product,
16  * an acknowledgment in the product documentation would be appreciated but is
17  * not required.
18  *
19  * 2. Altered source versions must be plainly marked as such, and must not be
20  * misrepresented as being the original software.
21  *
22  * 3. This notice may not be removed or altered from any source distribution
23  */
24 
25 /**
26  * Define a low-level window handle type, specific to each platform.
27  *
28  * $(TABLE
29  * $(TR $(TH Platform) $(TH Type))
30  * $(TR $(TD Windows) $(TD `HWND`))
31  * $(TR $(TD Linux/FreeBSD) $(TD `Window`))
32  * $(TR $(TD Mac OS X)
33  * $(TD either `NSWindow*` or `NSView*`, disguised as `void*`)))
34  * $(LF)
35  *
36  * $(PARA $(B Mac OS X Specification)
37  *
38  * On Mac OS X, a $(WINDOW_LINK) can be created either from an existing
39  * `NSWindow*` or an `NSView*`. When the window is created from a window, DSFML
40  * will use its content view as the OpenGL area. `Window.getSystemHandle()` will
41  * return the handle that was used to create the window,
42  * which is a `NSWindow*` by default.)
43  */
44 module dsfml.window.windowhandle;
45 
46 
47 //TODO: Make the Windows Window Handle the right type?
48 //(ie, a HWND from std.c.windows.windows?
49 version(Windows)
50 {
51 	//import std.c.windows.windows;
52 	struct HWND__;
53 	alias HWND__* WindowHandle;
54 }
55 version(OSX)
56 {
57 	import core.stdc.config;
58 	alias c_ulong WindowHandle;
59 }
60 version(linux)
61 {
62 	alias void* WindowHandle;
63 }