Showing the changes to interface/src/Application.cpp (1 of 3 files). Show all
Unified · Split
| @@ -126,6 +126,7 @@ · 125 unmodified lines | ||
| 126 | 126 | #include "scripting/AccountScriptingInterface.h" |
| 127 | 127 | #include "scripting/AudioDeviceScriptingInterface.h" |
| 128 | 128 | #include "scripting/ClipboardScriptingInterface.h" |
| 129 | +#include "scripting/DesktopScriptingInterface.h" | |
| 129 | 130 | #include "scripting/HMDScriptingInterface.h" |
| 130 | 131 | #include "scripting/GlobalServicesScriptingInterface.h" |
| 131 | 132 | #include "scripting/LocationScriptingInterface.h" |
| @@ -284,6 +285,7 @@ bool setupEssentials(int& argc, char** argv) { · 152 unmodified lines | ||
| 284 | 285 | auto dialogsManager = DependencyManager::set<DialogsManager>(); |
| 285 | 286 | auto bandwidthRecorder = DependencyManager::set<BandwidthRecorder>(); |
| 286 | 287 | auto resourceCacheSharedItems = DependencyManager::set<ResourceCacheSharedItems>(); |
| 288 | + auto desktopScriptingInterface = DependencyManager::set<DesktopScriptingInterface>(); | |
| 287 | 289 | auto entityScriptingInterface = DependencyManager::set<EntityScriptingInterface>(); |
| 288 | 290 | auto windowScriptingInterface = DependencyManager::set<WindowScriptingInterface>(); |
| 289 | 291 | #if defined(Q_OS_MAC) || defined(Q_OS_WIN) |
| @@ -3970,6 +3972,8 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEngine* scri · 3680 unmodified lines | ||
| 3970 | 3972 | qScriptRegisterMetaType(scriptEngine, RayToOverlayIntersectionResultToScriptValue, |
| 3971 | 3973 | RayToOverlayIntersectionResultFromScriptValue); |
| 3972 | 3974 | |
| 3975 | + scriptEngine->registerGlobalObject("Desktop", DependencyManager::get<DesktopScriptingInterface>().data()); | |
| 3976 | + | |
| 3973 | 3977 | QScriptValue windowValue = scriptEngine->registerGlobalObject("Window", DependencyManager::get<WindowScriptingInterface>().data()); |
| 3974 | 3978 | scriptEngine->registerGetterSetter("location", LocationScriptingInterface::locationGetter, |
| 3975 | 3979 | LocationScriptingInterface::locationSetter, windowValue); |