Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-02 08:58:15

0001 ////////////////////////////////////////////////////////////
0002 //
0003 // SFML - Simple and Fast Multimedia Library
0004 // Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org)
0005 //
0006 // This software is provided 'as-is', without any express or implied warranty.
0007 // In no event will the authors be held liable for any damages arising from the use of this software.
0008 //
0009 // Permission is granted to anyone to use this software for any purpose,
0010 // including commercial applications, and to alter it and redistribute it freely,
0011 // subject to the following restrictions:
0012 //
0013 // 1. The origin of this software must not be misrepresented;
0014 //    you must not claim that you wrote the original software.
0015 //    If you use this software in a product, an acknowledgment
0016 //    in the product documentation would be appreciated but is not required.
0017 //
0018 // 2. Altered source versions must be plainly marked as such,
0019 //    and must not be misrepresented as being the original software.
0020 //
0021 // 3. This notice may not be removed or altered from any source distribution.
0022 //
0023 ////////////////////////////////////////////////////////////
0024 
0025 #ifndef SFML_WINDOWHANDLE_HPP
0026 #define SFML_WINDOWHANDLE_HPP
0027 
0028 ////////////////////////////////////////////////////////////
0029 // Headers
0030 ////////////////////////////////////////////////////////////
0031 #include <SFML/Config.hpp>
0032 
0033 // Windows' HWND is a typedef on struct HWND__*
0034 #if defined(SFML_SYSTEM_WINDOWS)
0035     struct HWND__;
0036 #endif
0037 
0038 namespace sf
0039 {
0040 #if defined(SFML_SYSTEM_WINDOWS)
0041 
0042     // Window handle is HWND (HWND__*) on Windows
0043     typedef HWND__* WindowHandle;
0044 
0045 #elif defined(SFML_SYSTEM_LINUX) || defined(SFML_SYSTEM_FREEBSD) || defined(SFML_SYSTEM_OPENBSD) || defined(SFML_SYSTEM_NETBSD)
0046 
0047     // Window handle is Window (unsigned long) on Unix - X11
0048     typedef unsigned long WindowHandle;
0049 
0050 #elif defined(SFML_SYSTEM_MACOS)
0051 
0052     // Window handle is NSWindow or NSView (void*) on Mac OS X - Cocoa
0053     typedef void* WindowHandle;
0054 
0055 #elif defined(SFML_SYSTEM_IOS)
0056 
0057     // Window handle is UIWindow (void*) on iOS - UIKit
0058     typedef void* WindowHandle;
0059 
0060 #elif defined(SFML_SYSTEM_ANDROID)
0061 
0062     // Window handle is ANativeWindow* (void*) on Android
0063     typedef void* WindowHandle;
0064 
0065 #elif defined(SFML_DOXYGEN)
0066 
0067     // Define typedef symbol so that Doxygen can attach some documentation to it
0068     typedef "platform-specific" WindowHandle;
0069 
0070 #endif
0071 
0072 } // namespace sf
0073 
0074 
0075 #endif // SFML_WINDOWHANDLE_HPP
0076 
0077 ////////////////////////////////////////////////////////////
0078 /// \typedef sf::WindowHandle
0079 /// \ingroup window
0080 ///
0081 /// Define a low-level window handle type, specific to
0082 /// each platform.
0083 ///
0084 /// Platform        | Type
0085 /// ----------------|------------------------------------------------------------
0086 /// Windows         | \p HWND
0087 /// Linux/FreeBSD   | \p %Window
0088 /// Mac OS X        | either \p NSWindow* or \p NSView*, disguised as \p void*
0089 /// iOS             | \p UIWindow*
0090 /// Android         | \p ANativeWindow*
0091 ///
0092 /// \par Mac OS X Specification
0093 ///
0094 /// On Mac OS X, a sf::Window can be created either from an
0095 /// existing \p NSWindow* or an \p NSView*. When the window
0096 /// is created from a window, SFML will use its content view
0097 /// as the OpenGL area. sf::Window::getSystemHandle() will
0098 /// return the handle that was used to create the window,
0099 /// which is a \p NSWindow* by default.
0100 ///
0101 ////////////////////////////////////////////////////////////