00001 // Filename: config_device.cxx 00002 // Created by: drose (04May00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 00019 00020 #include "config_device.h" 00021 #include "analogNode.h" 00022 #include "buttonNode.h" 00023 #include "clientAnalogDevice.h" 00024 #include "clientBase.h" 00025 #include "clientButtonDevice.h" 00026 #include "clientDevice.h" 00027 #include "clientDialDevice.h" 00028 #include "clientTrackerDevice.h" 00029 #include "dialNode.h" 00030 #include "mouseAndKeyboard.h" 00031 #include "trackerNode.h" 00032 #include "virtualMouse.h" 00033 00034 #include <dconfig.h> 00035 00036 Configure(config_device); 00037 NotifyCategoryDef(device, ""); 00038 00039 const bool asynchronous_clients = config_device.GetBool("asynchronous-clients", true); 00040 00041 ConfigureFn(config_device) { 00042 init_libdevice(); 00043 } 00044 00045 //////////////////////////////////////////////////////////////////// 00046 // Function: init_libdevice 00047 // Description: Initializes the library. This must be called at 00048 // least once before any of the functions or classes in 00049 // this library can be used. Normally it will be 00050 // called by the static initializers and need not be 00051 // called explicitly, but special cases exist. 00052 //////////////////////////////////////////////////////////////////// 00053 void 00054 init_libdevice() { 00055 static bool initialized = false; 00056 if (initialized) { 00057 return; 00058 } 00059 initialized = true; 00060 00061 AnalogNode::init_type(); 00062 ButtonNode::init_type(); 00063 ClientAnalogDevice::init_type(); 00064 ClientBase::init_type(); 00065 ClientButtonDevice::init_type(); 00066 ClientDevice::init_type(); 00067 ClientDialDevice::init_type(); 00068 ClientTrackerDevice::init_type(); 00069 DialNode::init_type(); 00070 MouseAndKeyboard::init_type(); 00071 TrackerNode::init_type(); 00072 VirtualMouse::init_type(); 00073 }