zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Window.hxx
Go to the documentation of this file.
1 /* This file is part of the Zenipex Library (zenilib).
2  * Copyright (C) 2011 Mitchell Keith Bloch (bazald).
3  *
4  * zenilib is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * zenilib is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with zenilib. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef ZENI_WINDOW_HXX
19 #define ZENI_WINDOW_HXX
20 
21 #include <Zeni/Window.h>
22 
23 namespace Zeni {
24 
25  const bool & Window::is_enabled() {
26  return g_enabled;
27  }
28 
30  return g_screen_size;
31  }
32 
33  const int & Window::get_width() {
34  return g_screen_size.x;
35  }
36 
37  const int & Window::get_height() {
38  return g_screen_size.y;
39  }
40 
41 #ifdef ANDROID
42  EGLDisplay & Window::get_display() {
43  return m_display;
44  }
45 
46  EGLSurface & Window::get_surface() {
47  return m_surface;
48  }
49 
50  EGLContext & Window::get_context() {
51  return m_context;
52  }
53 #else
54  const bool & Window::is_full_screen() {
55  return g_screen_full;
56  }
57 
58  const bool & Window::is_frame_visible() {
59  return g_screen_show_frame;
60  }
61 
62  const bool & Window::is_resizable() {
63  return g_screen_resizable;
64  }
65 
66  const std::vector<Point2i> & Window::get_resolutions() const {
67  return m_modes;
68  }
69 
70 #if SDL_VERSION_ATLEAST(1,3,0)
71  SDL_Window * Window::get_window() {
72  return m_window;
73  }
74 #else
76  return m_display_surface;
77  }
78 #endif
79 
80  const String & Window::get_title() const {
81  return get_m_title();
82  }
83 
84  const String & Window::get_taskmsg() const {
85  return get_m_taskmsg();
86  }
87 #endif
88 
89 }
90 
91 #endif
static const int & get_width()
Get the size of the window.
Definition: Window.hxx:33
SDL_Surface * get_display_surface()
Definition: Window.hxx:75
static const bool & is_enabled()
Determine whether the use of rendering is desired.
Definition: Window.hxx:25
A collection of pixels used in software blitting.
Definition: SDL_surface.h:69
void * EGLDisplay
Definition: egl.h:48
void * EGLSurface
Definition: egl.h:49
void * EGLContext
Definition: egl.h:47
const String & get_taskmsg() const
Get the taskbar message.
Definition: Window.hxx:84
static const bool & is_full_screen()
Determine whether the window is windowed or full screen.
Definition: Window.hxx:54
const std::vector< Point2i > & get_resolutions() const
Get available full screen resolutions.
Definition: Window.hxx:66
const String & get_title() const
Get the window title.
Definition: Window.hxx:80
static const int & get_height()
Get the height of the window.
Definition: Window.hxx:37
static const bool & is_resizable()
Determine whether the frame is resizable (windowed only)
Definition: Window.hxx:62
static const Point2i & get_size()
Definition: Window.hxx:29
static const bool & is_frame_visible()
Determine whether the frame is visible (windowed only)
Definition: Window.hxx:58
A 2D Point represented with integers.
Definition: Coordinate.h:85