Panda3D
graphicsWindow.I
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file graphicsWindow.I
10  * @author frang
11  * @date 1999-03-07
12  */
13 
14 /**
15  * Returns true if the window has not yet been opened, or has been fully
16  * closed, false if it is open. The window is not opened immediately after
17  * GraphicsEngine::make_window() is called; nor is it closed immediately after
18  * GraphicsEngine::remove_window() is called. Either operation may take a
19  * frame or two.
20  */
21 INLINE bool GraphicsWindow::
22 is_closed() const {
23  return !_properties.get_open();
24 }
25 
26 /**
27  * Returns true if the window has been opened as a fullscreen window, false
28  * otherwise.
29  */
30 INLINE bool GraphicsWindow::
31 is_fullscreen() const {
32  return _properties.get_fullscreen();
33 }
34 
35 /**
36  * If this flag is false, the window is redrawn only after it has received a
37  * recent "unexpose" or "draw" event from the underlying windowing systme. If
38  * this flag is true, the window is redrawn every frame regardless. Setting
39  * this false may prevent the window from redrawing unnecessarily when it is
40  * hidden, and may play nicer with other windows on the desktop, but may
41  * adversely affect frame rate even when the window is fully visible; setting
42  * it true will ensure that the window contents are always current.
43  */
44 INLINE void GraphicsWindow::
45 set_unexposed_draw(bool unexposed_draw) {
46  _unexposed_draw = unexposed_draw;
47 }
48 
49 
50 /**
51  * See set_unexposed_draw().
52  */
53 INLINE bool GraphicsWindow::
54 get_unexposed_draw() const {
55  return _unexposed_draw;
56 }
57 
58 /**
59  * Returns the WindowHandle corresponding to this window on the desktop. This
60  * is mainly useful for communicating with external libraries. Use
61  * window_handle->get_os_handle()->get_handle(), or
62  * window_handle->get_string_handle(), to get the actual OS-specific window
63  * handle object, whatever type that might be.
64  */
65 INLINE WindowHandle *GraphicsWindow::
66 get_window_handle() const {
67  return _window_handle;
68 }
get_open
Returns true if the window is open.
This object represents a window on the desktop, not necessarily a Panda window.
Definition: windowHandle.h:34
get_fullscreen
Returns true if the window is in fullscreen mode.
bool is_fullscreen() const
Returns true if the window has been opened as a fullscreen window, false otherwise.
set_unexposed_draw
If this flag is false, the window is redrawn only after it has received a recent "unexpose" or "draw"...