Panda3D
|
00001 // Filename: config_device.cxx 00002 // Created by: drose (04May00) 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 #include "config_device.h" 00017 #include "analogNode.h" 00018 #include "buttonNode.h" 00019 #include "clientAnalogDevice.h" 00020 #include "clientBase.h" 00021 #include "clientButtonDevice.h" 00022 #include "clientDevice.h" 00023 #include "clientDialDevice.h" 00024 #include "clientTrackerDevice.h" 00025 #include "dialNode.h" 00026 #include "mouseAndKeyboard.h" 00027 #include "trackerNode.h" 00028 #include "virtualMouse.h" 00029 00030 #include "dconfig.h" 00031 00032 Configure(config_device); 00033 NotifyCategoryDef(device, ""); 00034 00035 ConfigVariableBool asynchronous_clients 00036 ("asynchronous-clients", true); 00037 00038 ConfigureFn(config_device) { 00039 init_libdevice(); 00040 } 00041 00042 //////////////////////////////////////////////////////////////////// 00043 // Function: init_libdevice 00044 // Description: Initializes the library. This must be called at 00045 // least once before any of the functions or classes in 00046 // this library can be used. Normally it will be 00047 // called by the static initializers and need not be 00048 // called explicitly, but special cases exist. 00049 //////////////////////////////////////////////////////////////////// 00050 void 00051 init_libdevice() { 00052 static bool initialized = false; 00053 if (initialized) { 00054 return; 00055 } 00056 initialized = true; 00057 00058 AnalogNode::init_type(); 00059 ButtonNode::init_type(); 00060 ClientAnalogDevice::init_type(); 00061 ClientBase::init_type(); 00062 ClientButtonDevice::init_type(); 00063 ClientDevice::init_type(); 00064 ClientDialDevice::init_type(); 00065 ClientTrackerDevice::init_type(); 00066 DialNode::init_type(); 00067 MouseAndKeyboard::init_type(); 00068 TrackerNode::init_type(); 00069 VirtualMouse::init_type(); 00070 }