Panda3D
 All Classes Functions Variables Enumerations
graphicsWindow.I
00001 // Filename: graphicsWindow.I
00002 // Created by:  frang (07Mar99)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 
00016 ////////////////////////////////////////////////////////////////////
00017 //     Function: GraphicsWindow::is_closed
00018 //       Access: Published
00019 //  Description: Returns true if the window has not yet been opened,
00020 //               or has been fully closed, false if it is open.  The
00021 //               window is not opened immediately after
00022 //               GraphicsEngine::make_window() is called; nor is it
00023 //               closed immediately after
00024 //               GraphicsEngine::remove_window() is called.  Either
00025 //               operation may take a frame or two.
00026 ////////////////////////////////////////////////////////////////////
00027 INLINE bool GraphicsWindow::
00028 is_closed() const {
00029   return !_properties.get_open();
00030 }
00031 
00032 ////////////////////////////////////////////////////////////////////
00033 //     Function: GraphicsWindow::is_fullscreen
00034 //       Access: Published
00035 //  Description: Returns true if the window has been opened as a
00036 //               fullscreen window, false otherwise.
00037 ////////////////////////////////////////////////////////////////////
00038 INLINE bool GraphicsWindow::
00039 is_fullscreen() const {
00040   return _properties.get_fullscreen();
00041 }
00042 
00043 ////////////////////////////////////////////////////////////////////
00044 //     Function: GraphicsWindow::set_unexposed_draw
00045 //       Access: Published
00046 //  Description: If this flag is false, the window is redrawn only
00047 //               after it has received a recent "unexpose" or "draw"
00048 //               event from the underlying windowing systme.  If this
00049 //               flag is true, the window is redrawn every frame
00050 //               regardless.  Setting this false may prevent the
00051 //               window from redrawing unnecessarily when it is
00052 //               hidden, and may play nicer with other windows on the
00053 //               desktop, but may adversely affect frame rate even
00054 //               when the window is fully visible; setting it true will
00055 //               ensure that the window contents are always current.
00056 ////////////////////////////////////////////////////////////////////
00057 INLINE void GraphicsWindow::
00058 set_unexposed_draw(bool unexposed_draw) {
00059   _unexposed_draw = unexposed_draw;
00060 }
00061 
00062 
00063 ////////////////////////////////////////////////////////////////////
00064 //     Function: GraphicsWindow::get_unexposed_draw
00065 //       Access: Published
00066 //  Description: See set_unexposed_draw().
00067 ////////////////////////////////////////////////////////////////////
00068 INLINE bool GraphicsWindow::
00069 get_unexposed_draw() const {
00070   return _unexposed_draw;
00071 }
00072 
00073 ////////////////////////////////////////////////////////////////////
00074 //     Function: GraphicsWindow::get_window_handle
00075 //       Access: Published
00076 //  Description: Returns the WindowHandle corresponding to this window
00077 //               on the desktop.  This is mainly useful for
00078 //               communicating with external libraries.  Use
00079 //               window_handle->get_os_handle()->get_handle(), or
00080 //               window_handle->get_string_handle(), to get the actual
00081 //               OS-specific window handle object, whatever type that
00082 //               might be.
00083 ////////////////////////////////////////////////////////////////////
00084 INLINE WindowHandle *GraphicsWindow::
00085 get_window_handle() const {
00086   return _window_handle;
00087 }
00088 
 All Classes Functions Variables Enumerations