Panda3D
|
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::get_window_handle 00045 // Access: Published 00046 // Description: Returns the WindowHandle corresponding to this window 00047 // on the desktop. This is mainly useful for 00048 // communicating with external libraries. Use 00049 // window_handle->get_os_handle()->get_handle(), or 00050 // window_handle->get_string_handle(), to get the actual 00051 // OS-specific window handle object, whatever type that 00052 // might be. 00053 //////////////////////////////////////////////////////////////////// 00054 INLINE WindowHandle *GraphicsWindow:: 00055 get_window_handle() const { 00056 return _window_handle; 00057 } 00058 00059 //////////////////////////////////////////////////////////////////// 00060 // Function: GraphicsWindow::add_input_device 00061 // Access: Protected 00062 // Description: Adds a GraphicsWindowInputDevice to the vector. 00063 //////////////////////////////////////////////////////////////////// 00064 INLINE void GraphicsWindow:: 00065 add_input_device(const GraphicsWindowInputDevice &device) { 00066 _input_devices.push_back(device); 00067 _input_devices.back().set_device_index(_input_devices.size()-1); 00068 } 00069