├── .gitignore ├── .vscode └── launch.json ├── CHANGELOG.md ├── LICENSE.txt ├── README.md ├── images ├── autocomplete-enums.png ├── autocomplete-keys.png ├── autocompletion.gif ├── documentation.png ├── json_filling.png ├── logo.png ├── quick-pick-menu.png ├── suggestions.png ├── toolbar-info.png ├── undocumented_hover.png └── version-selection.png ├── package.json ├── resources ├── 2.1 │ ├── ma3_dummy_object.lua │ ├── ma3_dummy_object_free.lua │ ├── ma3_dummy_object_free_no_doc.lua │ ├── ma3_dummy_object_no_doc.lua │ ├── ma3_enums.lua │ ├── ma3_object.json │ ├── ma3_object_free.json │ ├── ma3_object_free_no_doc.json │ └── ma3_object_no_doc.json └── 2.2 │ ├── ma3_dummy_object.lua │ ├── ma3_dummy_object_free.lua │ ├── ma3_dummy_object_free_no_doc.lua │ ├── ma3_dummy_object_no_doc.lua │ ├── ma3_enums.lua │ ├── ma3_object.json │ ├── ma3_object_free.json │ ├── ma3_object_free_no_doc.json │ └── ma3_object_no_doc.json ├── src └── extension.js ├── tests ├── test_2.1.lua └── test_2.2.lua └── utils └── GenerateEnumsFile ├── GenerateLuaEnums.py ├── enums.lua ├── enums_list.txt └── exportEnumList.lua /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | tests/.vscode 3 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "Extension", 6 | "type": "extensionHost", 7 | "request": "launch", 8 | "args": ["--extensionDevelopmentPath=${workspaceFolder}"] 9 | } 10 | ] 11 | } -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | ## 1.3.4 — April 7, 2025 4 | - Updtate some text format in MessageBox documentation 5 | - Fix readme image link 6 | - Add missing changelog for 1.3.3 7 | 8 | ## 1.3.3 — March 24, 2025 9 | - Add new fields to Handle class and Obj function 10 | 11 | ## 1.3.2 — March 11, 2025 12 | - Move cSpell words from workspace settings to user settings 13 | 14 | ## 1.3.1 — February 7, 2025 15 | - Added a missing "@Optional" annotation 16 | 17 | ## 1.3.0 — February 7, 2025 18 | - Add menu to disable extension in non-Ma3 Lua projects 19 | 20 | ## 1.2.0 — February 6, 2025 21 | - Various spell check 22 | - Added a missing "@Optional" annotation 23 | - Added underscore on start of optional fields in autocomplete 24 | 25 | ## 1.1.2 — February 3, 2025 26 | - Fix wrong text argument for MessageBox 27 | 28 | ## 1.1.1 — February 1, 2025 29 | - Change extension logo 30 | 31 | ## 1.1.0 — January 31, 2025 32 | - Add Enums to the dummy files 33 | 34 | ## 1.0.2 — January 30, 2025 35 | - Add configuration to disable 'undefined-field' diagnostics in workspace 36 | 37 | ## 1.0.1 — January 30, 2025 38 | - added missing "@Optional" annotation to few functions in the dummy files 39 | 40 | ## 1.0.0 — January 29, 2025 41 | - Initial public release -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # Ma3 Lua API 3 | A VS Code extension for the Grand Ma 3 Lua Api, it provide autocomplete and documentation for functions to write Grand Ma 3 plugins. 4 | 5 | ### Suggestions: 6 | When typing the extension provide functions related to the selected API version. 7 | ![suggestions](images/suggestions.png) 8 | 9 | 10 | ### Autocomplete: 11 | When you select a suggested function, the extension add automatically functions parameters. 12 | ![autocompletion](images/autocompletion.gif) 13 | 14 | Autocomplete are available for Enums and keys: 15 | 16 | ![autocomplete-enums](images/autocomplete-enums.png) 17 | ![autocomplete-keys](images/autocomplete-keys.png) 18 | 19 | 20 | ### Documentation: 21 | The extension provide documentation and examples with a mouse over popup. 22 | ![documentation](images/documentation.png) 23 | 24 | The extension also references functions that are not documented in the official manual, so the popup displays the description provided by the HelpLua command. 25 | ![undocumented_hover](images/undocumented_hover.png) 26 | 27 | 28 | ### API version selection: 29 | The VS Code bottom toolbar display the actual Ma3 API version. 30 | ![toolbar-info](images/toolbar-info.png) 31 | 32 | Clicking on this toolbar button will open a quick pick menu that allow you to: 33 | - Select the Ma3 version 34 | - Disable the extension for the actual project 35 | - Restart the extension 36 | 37 | ![quick-pick-menu](images/quick-pick-menu.png) 38 | ![version-selection](images/version-selection.png) 39 | 40 | 41 | # How to contribute 42 | This is an open source project, feel free to contribute by making pull requests. 43 | 44 | ### What do you need: 45 | 46 | - [VS Code IDE](https://code.visualstudio.com/download) 47 | - [Node JS](https://nodejs.org/en/download) 48 | - Clone this repository 49 | 50 | ### File organization 51 | All the extension data is in the resources folder, that folder contain a folder for each Ma3 version, each folder contain: 52 | 53 | - Dummy lua files to helps the Lua Language Server to know all the functions: 54 | - Function documented in the manual 55 | - [ma3_dummy_object_free.lua](resources/2.1/ma3_dummy_object_free.lua) : object free functions 56 | - [ma3_dummy_object.lua](resources/2.1/ma3_dummy_object.lua) : object functions 57 | - Function not documented in the manual but returned by the [HelpLua](https://help.malighting.com/grandMA3/2.1/HTML/keyword_helplua.html) command 58 | - [ma3_dummy_object_free_no_doc.lua](resources/2.1/ma3_dummy_object_free_no_doc.lua) : object free functions 59 | - [ma3_dummy_object_no_doc.lua](resources/2.1/ma3_dummy_object_no_doc.lua) : object functions 60 | - [ma3_enums.lua](resources/2.1/ma3_enums.lua) : Enums list returned by this [lua script](utils/GenerateEnumsFile/exportEnumList.lua) and converted to lua enum with this [Python script](utils/GenerateEnumsFile/GenerateLuaEnums.py) 61 | - Json files that contain all object api documentation and autocompletion: 62 | - Function documented in the manual 63 | - [ma3_object_free.json](resources/2.1/ma3_object_free.json) : object free functions 64 | - [ma3_object.json](resources/2.1/ma3_object.json) : object functions 65 | - For not documented functions 66 | - [ma3_object_free_no_doc.json](resources/2.1/ma3_object_free_no_doc.json) : object free functions 67 | - [ma3_object_no_doc.json](resources/2.1/ma3_object_no_doc.json) : object functions 68 | 69 | ### To update or complete the documented files: 70 | 71 | This image explain how to fill the json files according to the [Ma help pages](https://help.malighting.com/grandMA3/2.1/HTML/lua_objectfree.html) that corresponding to the version. 72 | ![json filling](images/json_filling.png) 73 | 74 | - For the body part, fill the parentheses with the function parameters, optional parameters starting with an underscore: 75 | 76 | function(${1:fixtureId}, ${2:count}, ${3:_type}) 77 | 78 | - All the text part need to be converted to Markdown format, this can be done using this online tool: [Clipboard 2 Markdown](https://euangoddard.github.io/clipboard2markdown/). 79 | 80 | - After that you have to convert the markdown text to a single line string, this can be done with [json Stringlfy](https://toolsaday.com/text-tools/json-stringify). 81 | 82 | - For the code part of the example, you only have to convert to a single line string. 83 | 84 | ### To update or complete the dummy file: 85 | 86 | This file contain dummy functions with input parameters, you have to enumerate all parameters types, if they are optional, if they can be nil and the return type: 87 | 88 | ---@param fixtureTableHandle Handle 89 | ---@param multiPatchAmount integer 90 | ---@param undoText? string @Optional 91 | ---@return integer|nil multiPatchAmountCreated 92 | function CreateMultiPatch(fixtureTableHandle, multiPatchAmount, undoText) 93 | return 0 94 | end 95 | 96 | Test your modification and then, start a pull request! 97 | 98 | ⚠ **Disclaimer** 99 | This extension is **not affiliated with or endorsed by MA Lighting**. It is an independent project created to provide autocomplete and documentation for the GrandMA 3 Lua API to assist in writing plugins. -------------------------------------------------------------------------------- /images/autocomplete-enums.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeremyDufeux/ma3-lua-api-for-vscode/24e5283454a0a08a81bcfd25a31d38dfe19d1066/images/autocomplete-enums.png -------------------------------------------------------------------------------- /images/autocomplete-keys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeremyDufeux/ma3-lua-api-for-vscode/24e5283454a0a08a81bcfd25a31d38dfe19d1066/images/autocomplete-keys.png -------------------------------------------------------------------------------- /images/autocompletion.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeremyDufeux/ma3-lua-api-for-vscode/24e5283454a0a08a81bcfd25a31d38dfe19d1066/images/autocompletion.gif -------------------------------------------------------------------------------- /images/documentation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeremyDufeux/ma3-lua-api-for-vscode/24e5283454a0a08a81bcfd25a31d38dfe19d1066/images/documentation.png -------------------------------------------------------------------------------- /images/json_filling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeremyDufeux/ma3-lua-api-for-vscode/24e5283454a0a08a81bcfd25a31d38dfe19d1066/images/json_filling.png -------------------------------------------------------------------------------- /images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeremyDufeux/ma3-lua-api-for-vscode/24e5283454a0a08a81bcfd25a31d38dfe19d1066/images/logo.png -------------------------------------------------------------------------------- /images/quick-pick-menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeremyDufeux/ma3-lua-api-for-vscode/24e5283454a0a08a81bcfd25a31d38dfe19d1066/images/quick-pick-menu.png -------------------------------------------------------------------------------- /images/suggestions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeremyDufeux/ma3-lua-api-for-vscode/24e5283454a0a08a81bcfd25a31d38dfe19d1066/images/suggestions.png -------------------------------------------------------------------------------- /images/toolbar-info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeremyDufeux/ma3-lua-api-for-vscode/24e5283454a0a08a81bcfd25a31d38dfe19d1066/images/toolbar-info.png -------------------------------------------------------------------------------- /images/undocumented_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeremyDufeux/ma3-lua-api-for-vscode/24e5283454a0a08a81bcfd25a31d38dfe19d1066/images/undocumented_hover.png -------------------------------------------------------------------------------- /images/version-selection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeremyDufeux/ma3-lua-api-for-vscode/24e5283454a0a08a81bcfd25a31d38dfe19d1066/images/version-selection.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ma3-lua-api", 3 | "displayName": "Ma3 Lua Api for VS Code", 4 | "description": "Lua extension for Grand Ma 3 Api", 5 | "version": "1.3.4", 6 | "publisher": "Carrot-Industries", 7 | "author": { 8 | "name": "Jeremy Dufeux", 9 | "email": "contact@carrot-industries.com" 10 | }, 11 | "license": "GPL v3", 12 | "homepage": "https://github.com/JeremyDufeux/ma3-lua-api", 13 | "repository": { 14 | "type": "git", 15 | "url": "https://github.com/JeremyDufeux/ma3-lua-api.git" 16 | }, 17 | "icon": "images/logo.png", 18 | "bugs": { 19 | "url": "https://github.com/JeremyDufeux/ma3-lua-api/issues" 20 | }, 21 | "engines": { 22 | "vscode": "^1.96.0" 23 | }, 24 | "categories": [ 25 | "Programming Languages", 26 | "Snippets" 27 | ], 28 | "activationEvents": [ 29 | "onLanguage:lua" 30 | ], 31 | "main": "./src/extension.js", 32 | "files": [ 33 | "resources/ma3_documented_api.lua" 34 | ], 35 | "extensionDependencies": [ 36 | "sumneko.lua" 37 | ], 38 | "devDependencies": { 39 | "@types/vscode": "^1.96.0", 40 | "@types/mocha": "^10.0.10", 41 | "@types/node": "20.x", 42 | "eslint": "^9.16.0", 43 | "@vscode/test-cli": "^0.0.10", 44 | "@vscode/test-electron": "^2.4.1" 45 | }, 46 | "keywords": [ 47 | "lua", 48 | "grandma3", 49 | "api", 50 | "vscode-extension" 51 | ], 52 | "contributes": { 53 | "configuration": { 54 | "title": "GrandMa 3", 55 | "properties": { 56 | "grandMa3.apiVersion": { 57 | "type": "string", 58 | "description": "Select the GrandMa 3 API version" 59 | }, 60 | "grandMa3.extensionEnabled": { 61 | "type": "boolean", 62 | "default": true, 63 | "description": "Enable/disable GrandMa 3 extension for this workspace" 64 | } 65 | } 66 | }, 67 | "commands": [ 68 | { 69 | "command": "grandMa3.menu", 70 | "title": "GrandMa 3: Open Menu", 71 | "category": "GrandMA 3 API" 72 | } 73 | ] 74 | }, 75 | "menus": { 76 | "commandPalette": [ 77 | { 78 | "command": "grandMa3.menu", 79 | "when": "editorLangId == lua" 80 | } 81 | ], 82 | "editor/title": [ 83 | { 84 | "command": "grandMa3.menu", 85 | "group": "navigation", 86 | "when": "editorLangId == lua" 87 | } 88 | ] 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /resources/2.1/ma3_dummy_object.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | --- Ma3 API version: 2.1 3 | 4 | -- Object definition 5 | -- ======================================== 6 | 7 | ---@class Handle 8 | Handle = {} 9 | 10 | ---@return Handle 11 | function Handle:new() 12 | end 13 | 14 | ---@param baseLocationHandle? Handle @Optional 15 | ---@param useToAddrIndex? boolean|nil @Optional 16 | ---@return string numericRootAddress 17 | function Handle:Addr(baseLocationHandle, useToAddrIndex) 18 | return "" 19 | end 20 | 21 | ---@param baseLocationHandle? Handle @Optional 22 | ---@param returnNamesInQuotes? boolean @Optional 23 | ---@return string numericRootAddress 24 | function Handle:AddrNative(baseLocationHandle, returnNamesInQuotes) 25 | return "" 26 | end 27 | 28 | ---@return table children 29 | function Handle:Children() 30 | return {} 31 | end 32 | 33 | ---@return integer count 34 | function Handle:Count() 35 | return 0 36 | end 37 | 38 | function Handle:Dump() 39 | end 40 | 41 | ---@param filePath string 42 | ---@param fileName string 43 | ---@return boolean success 44 | function Handle:Export(filePath, fileName) 45 | return true 46 | end 47 | 48 | ---@param propertyName string 49 | ---@param roleInteger? integer @Optional 50 | ---@return string property 51 | function Handle:Get(propertyName, roleInteger) 52 | return "" 53 | end 54 | 55 | ---@return string className 56 | function Handle:GetChildClass() 57 | return "" 58 | end 59 | 60 | ---@return string className 61 | function Handle:GetClass() 62 | return "" 63 | end 64 | 65 | ---@return boolean hasActivePlayback 66 | function Handle:HasActivePlayback() 67 | return true 68 | end 69 | 70 | ---@param filePath string 71 | ---@param fileName string 72 | ---@return boolean success 73 | function Handle:Import(filePath, fileName) 74 | return true 75 | end 76 | 77 | ---@param childIndex integer 78 | ---@return Handle|nil child 79 | function Handle:Ptr(childIndex) 80 | return Handle:new() 81 | end 82 | 83 | ---@return string address 84 | function Handle:ToAddr() 85 | return "" 86 | end -------------------------------------------------------------------------------- /resources/2.1/ma3_dummy_object_free.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | --- Ma3 API version: 2.1 3 | 4 | -- Object free definition 5 | -- ======================================== 6 | 7 | ---@param fixtureTable table 8 | ---@return boolean|nil success 9 | function AddFixtures(fixtureTable) 10 | return true 11 | end 12 | 13 | ---@param addonName string 14 | ---@return Handle addonVariable 15 | function AddonVars(addonName) 16 | return Handle:new() 17 | end 18 | 19 | ---@return table buildDetails 20 | function BuildDetails() 21 | return {} 22 | end 23 | 24 | ---@param dmxMode Handle 25 | ---@param startAddress string 26 | ---@param count? integer|nil @Optional 27 | ---@param breakIndex? integer @Optional 28 | ---@return boolean noCollisionFound 29 | function CheckDMXCollision(dmxMode, startAddress, count, breakIndex) 30 | return true 31 | end 32 | 33 | ---@param fixtureId integer 34 | ---@param count? integer @Optional 35 | ---@param type? integer @Optional 36 | ---@return boolean noCollisionFound 37 | function CheckFIDCollision(fixtureId, count, type) 38 | return true 39 | end 40 | 41 | ---@param className string 42 | ---@return boolean result 43 | function ClassExists(className) 44 | return true 45 | end 46 | 47 | function CloseAllOverlays() 48 | end 49 | 50 | ---@param undoHandle Handle 51 | ---@return boolean closed 52 | function CloseUndo(undoHandle) 53 | return true 54 | end 55 | 56 | ---@param command string 57 | ---@param undoHandle? Handle @Optional 58 | ---@return string result 59 | function Cmd(command, undoHandle) 60 | return "" 61 | end 62 | 63 | ---@param command string 64 | ---@param undoHandle? Handle @Optional 65 | ---@param handleTarget? Handle @Optional 66 | function CmdIndirect(command, undoHandle, handleTarget) 67 | 68 | end 69 | 70 | ---@param command string 71 | ---@param undoHandle? Handle @Optional 72 | ---@param handleTarget? Handle @Optional 73 | function CmdIndirectWait(command, undoHandle, handleTarget) 74 | 75 | end 76 | 77 | ---@return Handle object 78 | function CmdObj() 79 | return Handle:new() 80 | end 81 | 82 | ---@return table configDetails 83 | function ConfigTable() 84 | return {} 85 | end 86 | 87 | ---@param title string 88 | ---@param text? string @Optional 89 | ---@param screen? integer @Optional 90 | ---@param showCancel? boolean @Optional 91 | ---@return boolean result 92 | function Confirm(title, text, screen, showCancel) 93 | return true 94 | end 95 | 96 | ---@param fixtureTableHandle Handle 97 | ---@param multiPatchAmount integer 98 | ---@param undoText? string @Optional 99 | ---@return integer|nil multiPatchAmountCreated 100 | function CreateMultiPatch(fixtureTableHandle, multiPatchAmount, undoText) 101 | return 0 102 | end 103 | 104 | ---@param undoText any 105 | ---@return Handle undoHandle 106 | function CreateUndo(undoText) 107 | return Handle:new() 108 | end 109 | 110 | ---@return Handle environmentHandle 111 | function CurrentEnvironment() 112 | return Handle:new() 113 | end 114 | 115 | ---@return Handle execHandle 116 | function CurrentExecPage() 117 | return Handle:new() 118 | end 119 | 120 | ---@return Handle profileHandle 121 | function CurrentProfile() 122 | return Handle:new() 123 | end 124 | 125 | ---@return Handle screenConfigHandle 126 | function CurrentScreenConfig() 127 | return Handle:new() 128 | end 129 | 130 | ---@return Handle userHandle 131 | function CurrentUser() 132 | return Handle:new() 133 | end 134 | 135 | ---@return Handle dataPoolHandle 136 | function DataPool() 137 | return Handle:new() 138 | end 139 | 140 | ---@return Handle displayPositionsHandle 141 | function DefaultDisplayPositions() 142 | return Handle:new() 143 | end 144 | 145 | ---@param variableSetHandle Handle 146 | ---@param variableName string 147 | ---@return boolean success 148 | function DelVar(variableSetHandle, variableName) 149 | return true 150 | end 151 | 152 | ---@return boolean deskIsLocked 153 | function DeskLocked() 154 | return true 155 | end 156 | 157 | ---@return Handle configurationHandle 158 | function DeviceConfiguration() 159 | return Handle:new() 160 | end 161 | 162 | ---@param path string 163 | ---@param filter? string @Optional 164 | ---@return table 165 | function DirList(path, filter) 166 | return {} 167 | end 168 | 169 | ---@param displayIndex integer 170 | ---@param position table 171 | ---@param duration? integer @Optional 172 | function DrawPointer(displayIndex, position, duration) 173 | end 174 | 175 | function DumpAllHooks() 176 | end 177 | 178 | ---@param message string 179 | function Echo(message) 180 | end 181 | 182 | ---@param message string 183 | function ErrEcho(message) 184 | end 185 | 186 | ---@param message string 187 | function ErrPrintf(message) 188 | 189 | end 190 | 191 | ---@param fileName string 192 | ---@param exportData table 193 | ---@return boolean success 194 | function Export(fileName, exportData) 195 | return true 196 | end 197 | 198 | ---@param fileName string 199 | ---@param exportData table 200 | ---@return boolean success 201 | function ExportCSV(fileName, exportData) 202 | return true 203 | end 204 | 205 | ---@param fileName string 206 | ---@param exportData table 207 | ---@return boolean success 208 | function ExportJson(fileName, exportData) 209 | return true 210 | end 211 | 212 | ---@param fileName string 213 | ---@return boolean result 214 | function FileExists(fileName) 215 | return true 216 | end 217 | 218 | ---@param textureName string 219 | ---@return Handle|nil textureHandle 220 | function FindTexture(textureName) 221 | return Handle:new() 222 | end 223 | 224 | ---@param fixtureDMXMode Handle 225 | ---@return Handle fixtureHandle 226 | function FirstDmxModeFixture(fixtureDMXMode) 227 | return Handle:new() 228 | end 229 | 230 | ---@return Handle|nil fixtureHandle 231 | function FixtureType() 232 | return Handle:new() 233 | end 234 | 235 | ---@param objectString string 236 | ---@param addressHandle? Handle @Optional 237 | ---@return Handle object 238 | function FromAddr(objectString, addressHandle) 239 | return Handle:new() 240 | end 241 | 242 | ---@return table apiDescriptor 243 | function GetApiDescriptor() 244 | return {} 245 | end 246 | 247 | ---@param channelIndex integer 248 | ---@return Handle attributeHandle 249 | function GetAttributeByUIChannel(channelIndex) 250 | return Handle:new() 251 | end 252 | 253 | ---@return integer attributeCount 254 | function GetAttributeCount() 255 | return 0 256 | end 257 | 258 | ---@param attributeName string 259 | ---@return integer attributeIndex 260 | function GetAttributeIndex(attributeName) 261 | return 0 262 | end 263 | 264 | ---@param Ma3ModuleHandle Handle 265 | ---@return table state 266 | function GetButton(Ma3ModuleHandle) 267 | return {} 268 | end 269 | 270 | ---@param channelIndex integer 271 | ---@param attributeIndex integer 272 | ---@return Handle channelFunctionHandle 273 | function GetChannelFunction(channelIndex, attributeIndex) 274 | return Handle:new() 275 | end 276 | 277 | ---@param channelIndex integer 278 | ---@param attributeIndex integer 279 | ---@return integer channelFunctionIndex 280 | function GetChannelFunctionIndex(channelIndex, attributeIndex) 281 | return 0 282 | end 283 | 284 | ---@param className string 285 | ---@return integer derivationLevel 286 | function GetClassDerivationLevel(className) 287 | return 0 288 | end 289 | 290 | ---@return Handle cueHandle 291 | function GetCurrentCue() 292 | return Handle:new() 293 | end 294 | 295 | ---@return integer fps 296 | function GetDebugFPS() 297 | return 0 298 | end 299 | 300 | ---@param displayIndex integer 301 | ---@return Handle displayHandle 302 | function GetDisplayByIndex(displayIndex) 303 | return Handle:new() 304 | end 305 | 306 | ---@return Handle DisplayCollectHandle 307 | function GetDisplayCollect() 308 | return Handle:new() 309 | end 310 | 311 | ---@param universe integer 312 | ---@param isPercent? boolean @Optional 313 | ---@return table|nil universe 314 | function GetDMXUniverse(universe, isPercent) 315 | return {} 316 | end 317 | 318 | ---@param address integer 319 | ---@param universe? integer @Optional 320 | ---@param returnPercent? boolean @Optional 321 | ---@return integer|nil value 322 | function GetDMXValue(address, universe, returnPercent) 323 | return 0 324 | end 325 | 326 | ---@param executorNumber integer 327 | ---@return Handle executor, Handle page 328 | function GetExecutor(executorNumber) 329 | return Handle:new(), Handle:new() 330 | end 331 | 332 | ---@return Handle focusHandle 333 | function GetFocus() 334 | return Handle:new() 335 | end 336 | 337 | ---@return Handle focusDisplayHandle 338 | function GetFocusDisplay() 339 | return Handle:new() 340 | end 341 | 342 | ---@return table apiDescriptor 343 | function GetObjApiDescriptor() 344 | return {} 345 | end 346 | 347 | ---@param folderNameOrIndex string|integer 348 | ---@param createIfNotExist? boolean|nil @Optional 349 | ---@return string path 350 | function GetPath(folderNameOrIndex, createIfNotExist) 351 | return "" 352 | end 353 | 354 | ---@param folderNameOrIndex string|integer 355 | ---@param basePath string 356 | ---@param createIfNotExist? boolean @Optional 357 | ---@return string path 358 | function GetPathOverrideFor(folderNameOrIndex, basePath, createIfNotExist) 359 | return "" 360 | end 361 | 362 | ---@return string separator 363 | function GetPathSeparator() 364 | return "" 365 | end 366 | 367 | ---@param objectHandle Handle 368 | ---@param pathContentType? integer @Optional 369 | ---@return string pathType 370 | function GetPathType(objectHandle, pathContentType) 371 | return "" 372 | end 373 | 374 | ---@param rtChannelIndex integer 375 | ---@return table reChanelDescriptor 376 | function GetRTChannel(rtChannelIndex) 377 | return {} 378 | end 379 | 380 | ---@param presetHandle Handle 381 | ---@param returnPhaserData? boolean|nil @Optional 382 | ---@param extract? boolean @Optional 383 | ---@return table|nil presetData 384 | function GetPresetData(presetHandle, returnPhaserData, extract) 385 | return {} 386 | end 387 | 388 | ---@return integer count 389 | function GetRTChannelCount() 390 | return 0 391 | end 392 | 393 | ---@param fixtureIndexOrHandle integer|Handle 394 | ---@param returnHandles? boolean @Optional 395 | ---@return table rtChannels 396 | function GetRTChannels(fixtureIndexOrHandle, returnHandles) 397 | return {} 398 | end 399 | 400 | ---@param sampleType string 401 | ---@return number sample 402 | function GetSample(sampleType) 403 | return 0.1 404 | 405 | end 406 | 407 | ---@param screenHandle Handle 408 | ---@return Handle screenContentHandle 409 | function GetScreenContent(screenHandle) 410 | return Handle:new() 411 | end 412 | 413 | ---@return Handle attributeHandle 414 | function GetSelectedAttribute() 415 | return Handle:new() 416 | end 417 | 418 | ---@return string status 419 | function GetShowFileStatus() 420 | return "" 421 | end 422 | 423 | ---@param fixtureIndex integer 424 | ---@return Handle subFixtureHandle 425 | function GetSubfixture(fixtureIndex) 426 | return Handle:new() 427 | end 428 | 429 | ---@return integer count 430 | function GetSubfixtureCount() 431 | return 0 432 | end 433 | 434 | ---@param shortKeyword string 435 | ---@return string|nil tokenName 436 | function GetTokenName(shortKeyword) 437 | return "" 438 | end 439 | 440 | ---@param index string 441 | ---@return string|nil tokenName 442 | function GetTokenNameByIndex(index) 443 | return "" 444 | end 445 | 446 | ---@return Handle|nil modalHandle 447 | function GetTopModal() 448 | return Handle:new() 449 | end 450 | 451 | ---@return Handle|nil overlayHandle 452 | function GetTopOverlay() 453 | return Handle:new() 454 | end 455 | 456 | ---@return integer count 457 | function GetUIChannelCount() 458 | return 0 459 | end 460 | 461 | ---@param patchIndex integer 462 | ---@param attributeIndex integer 463 | ---@return integer index 464 | function GetUIChannelIndex(patchIndex, attributeIndex) 465 | return 0 466 | end 467 | 468 | ---@param fixtureIndexOrHandle integer|Handle 469 | ---@param returnHandles? boolean @Optional 470 | ---@return table channels 471 | function GetUIChannels(fixtureIndexOrHandle, returnHandles) 472 | return {} 473 | end 474 | 475 | ---@param displayIndex integer 476 | ---@param positionTable table 477 | ---@return Handle|nil objectHandle 478 | function GetUIObjectAtPosition(displayIndex, positionTable) 479 | return Handle:new() 480 | end 481 | 482 | ---@param variableHandle Handle 483 | ---@param varName string 484 | ---@return string|integer|number|nil value 485 | function GetVar(variableHandle, varName) 486 | return "" 487 | end 488 | 489 | ---@return Handle globalVarHandle 490 | function GlobalVars() 491 | return Handle:new() 492 | end 493 | 494 | ---@param objectHandle Handle 495 | ---@return integer handleInt 496 | function HandleToInt(objectHandle) 497 | return 0 498 | end 499 | 500 | ---@param objectHandle Handle 501 | ---@return string handleString 502 | function HandleToStr(objectHandle) 503 | return "" 504 | end 505 | 506 | ---@param functionName function 507 | ---@param objectHandle Handle 508 | ---@param pluginHandle Handle 509 | ---@param passedObjectHandle? Handle @Optional 510 | ---@return integer hookId 511 | function HookObjectChange(functionName, objectHandle, pluginHandle, passedObjectHandle) 512 | return 0 513 | end 514 | 515 | ---@return string os 516 | function HostOS() 517 | return "" 518 | end 519 | ---@return string subType 520 | function HostSubType() 521 | return "" 522 | end 523 | ---@return string type 524 | function HostType() 525 | return "" 526 | end 527 | 528 | ---@param fileName string 529 | ---@return table content 530 | function Import(fileName) 531 | return {} 532 | end 533 | 534 | ---@param progressBarHandle Handle 535 | ---@param value integer 536 | function IncProgress(progressBarHandle, value) 537 | end 538 | 539 | ---@param handleInteger integer 540 | ---@return Handle handle 541 | function IntToHandle(handleInteger) 542 | return Handle:new() 543 | end 544 | 545 | ---@param derivedClassName string 546 | ---@param baseClassName string 547 | ---@return boolean result 548 | function IsClassDerivedFrom(derivedClassName, baseClassName) 549 | return true 550 | end 551 | 552 | ---@param objectHandle Handle 553 | ---@return boolean|nil valid 554 | function IsObjectValid(objectHandle) 555 | return true 556 | end 557 | 558 | ---@return Handle keyboardHandle 559 | function KeyboardObj() 560 | return Handle:new() 561 | end 562 | 563 | ---@return Handle poolHandle 564 | function MasterPool() 565 | return Handle:new() 566 | end 567 | 568 | ---@param messageBoxSettings table 569 | ---@return table result 570 | function MessageBox(messageBoxSettings) 571 | return {} 572 | end 573 | 574 | ---@return Handle mouseHandle 575 | function MouseObj() 576 | return Handle:new() 577 | end 578 | 579 | ---@return boolean needShowSave 580 | function NeedShowSave() 581 | return true 582 | end 583 | 584 | ---@param objectListCommand string 585 | ---@param optionsTable? table @Optional 586 | ---@return table objectList 587 | function ObjectList(objectListCommand, optionsTable) 588 | return {} 589 | end 590 | 591 | ---@return Handle patchHandle 592 | function Patch() 593 | return Handle:new() 594 | end 595 | 596 | ---@param message string 597 | function Printf(message) 598 | end 599 | 600 | ---@return Handle programmerHandle 601 | function Programmer() 602 | return Handle:new() 603 | end 604 | 605 | ---@return Handle programmerPartHandle 606 | function ProgrammerPart() 607 | return Handle:new() 608 | end 609 | 610 | ---@return Handle currentPultHandle 611 | function Pult() 612 | return Handle:new() 613 | end 614 | 615 | ---@return string releaseType 616 | function ReleaseType() 617 | return "" 618 | end 619 | 620 | ---@return Handle rootHandle 621 | function Root() 622 | return Handle:new() 623 | end 624 | 625 | ---@return Handle featureHandle 626 | function SelectedFeature() 627 | return Handle:new() 628 | end 629 | 630 | ---@return Handle layoutHandle 631 | function SelectedLayout() 632 | return Handle:new() 633 | end 634 | 635 | ---@return Handle sequenceHandle 636 | function SelectedSequence() 637 | return Handle:new() 638 | end 639 | 640 | ---@return Handle timecodeHandle 641 | function SelectedTimecode() 642 | return Handle:new() 643 | end 644 | 645 | ---@return Handle timerHandle 646 | function SelectedTimer() 647 | return Handle:new() 648 | end 649 | 650 | ---@return Handle fixturesHandle 651 | function Selection() 652 | return Handle:new() 653 | end 654 | 655 | ---@return integer count 656 | function SelectionCount() 657 | return 0 658 | end 659 | 660 | ---@return integer patchIndex, integer gridX, integer gridY, integer gridZ 661 | function SelectionFirst() 662 | return 0, 0, 0, 0 663 | end 664 | 665 | ---@param fixtureIndex integer 666 | ---@return integer patchIndex, integer gridX, integer gridY, integer gridZ 667 | function SelectionNext(fixtureIndex) 668 | return 0, 0, 0, 0 669 | end 670 | 671 | ---@return string serialNumber 672 | function SerialNumber() 673 | return "" 674 | end 675 | 676 | ---@param block boolean 677 | function SetBlockInput(block) 678 | end 679 | 680 | ---@param moduleHandle Handle 681 | ---@param ledTable table 682 | function SetLED(moduleHandle, ledTable) 683 | end 684 | 685 | ---@param progressBarHandle Handle 686 | ---@param progress integer 687 | function SetProgress(progressBarHandle, progress) 688 | end 689 | 690 | ---@param progressBarHandle Handle 691 | ---@param rangeStart integer 692 | ---@param rangeEnd integer 693 | function SetProgressRange(progressBarHandle, rangeStart, rangeEnd) 694 | end 695 | 696 | ---@param progressBarHandle Handle 697 | ---@param text string 698 | function SetProgressText(progressBarHandle, text) 699 | end 700 | 701 | ---@param variableSetHandle Handle 702 | ---@param varName string 703 | ---@param value string|number 704 | ---@return boolean success 705 | function SetVar(variableSetHandle, varName, value) 706 | return true 707 | end 708 | 709 | ---@return Handle showDataHandle 710 | function ShowData() 711 | return Handle:new() 712 | end 713 | 714 | ---@return Handle settingsHandle 715 | function ShowSettings() 716 | return Handle:new() 717 | end 718 | 719 | ---@param title string 720 | ---@return Handle progressBarHandle 721 | function StartProgress(title) 722 | return Handle:new() 723 | end 724 | 725 | ---@param progressBarHandle Handle 726 | function StopProgress(progressBarHandle) 727 | end 728 | 729 | ---@param handleString string 730 | ---@return Handle handle 731 | function StrToHandle(handleString) 732 | return Handle:new() 733 | end 734 | 735 | ---@param title? string @Optional 736 | ---@param textGuide? string @Optional 737 | ---@param xPosition? string @Optional 738 | ---@param yPosition? string @Optional 739 | ---@return string textInputHandle 740 | function TextInput(title, textGuide, xPosition, yPosition) 741 | return "" 742 | end 743 | 744 | ---@return integer time 745 | function Time() 746 | return 0 747 | end 748 | 749 | ---@param timedFunction function 750 | ---@param waitSeconds integer 751 | ---@param iterations integer 752 | ---@param timerCleanup? function|nil @Optional 753 | ---@param passedObjectHandle? Handle @Optional 754 | function Timer(timedFunction, waitSeconds, iterations, timerCleanup, passedObjectHandle) 755 | end 756 | 757 | ---@param objectHandle Handle 758 | ---@param returnType? boolean @Optional 759 | ---@return string address 760 | function ToAddr(objectHandle, returnType) 761 | return "" 762 | end 763 | 764 | ---@return Handle touchObjectHandle 765 | function TouchObj() 766 | return Handle:new() 767 | end 768 | 769 | ---@param hookId integer 770 | function Unhook(hookId) 771 | end 772 | 773 | ---@param functionName function|nil 774 | ---@param targetObjectHandle Handle|nil 775 | ---@param contextObjectHandle Handle|nil 776 | ---@return integer amount 777 | function UnhookMultiple(functionName, targetObjectHandle, contextObjectHandle) 778 | return 0 779 | end 780 | 781 | ---@return Handle userVarHandle 782 | function UserVars() 783 | return Handle:new() 784 | end 785 | 786 | ---@return string textVersion 787 | function Version() 788 | return "" 789 | end -------------------------------------------------------------------------------- /resources/2.1/ma3_dummy_object_free_no_doc.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | --- Ma3 API version: 2.2 3 | 4 | -- Not documented Object free definition 5 | -- ======================================== 6 | 7 | ---@return integer flag 8 | function ColMeasureDeviceDarkCalibrate() 9 | return 0 10 | end 11 | 12 | ---@return table values 13 | function ColMeasureDeviceDoMeasurement() 14 | return {} 15 | end 16 | 17 | ---@param path string 18 | ---@return boolean result 19 | function CreateDirectoryRecursive(path) 20 | return true 21 | end 22 | 23 | ---@return string devmode3d 24 | function DevMode3d() 25 | return "" 26 | end 27 | 28 | ---@param handle Handle @handle to UIGrid (or derived) 29 | ---@param cell table @{r, c} 30 | ---@return boolean 31 | function FSExtendedModeHasDots(handle, cell) 32 | return true 33 | end 34 | 35 | ---@param patch Handle 36 | ---@param startingAddress integer 37 | ---@param footprint integer 38 | ---@return integer absoluteAddress 39 | function FindBestDMXPatchAddr(patch, startingAddress, footprint) 40 | return 0 41 | end 42 | 43 | ---@param handle? Handle @Optional 44 | function FindBestFocus(handle) 45 | end 46 | 47 | ---@param backwards? boolean @Optional @default: false 48 | ---@param reason? integer @Optional @Focus::Reason, default: UserTabKey 49 | function FindNextFocus(backwards, reason) 50 | end 51 | 52 | ---@param handle Handle 53 | ---@param attribute Handle 54 | ---@return integer columnId 55 | function GetAttributeColumnId(handle, attribute) 56 | return 0 57 | end 58 | 59 | ---@param address string 60 | ---@return Handle handle 61 | function GetObject(address) 62 | return Handle:new() 63 | end 64 | 65 | ---@param uiChannelIndex integer 66 | ---@param phaserOnly boolean 67 | ---@return table 68 | function GetProgPhaser(uiChannelIndex, phaserOnly) 69 | return {} 70 | end 71 | 72 | ---@param uiChannelIndex integer 73 | ---@param step integer 74 | ---@return table 75 | function GetProgPhaserValue(uiChannelIndex, step) 76 | return {} 77 | end 78 | 79 | ---@param handle Handle 80 | ---@param propertyName string 81 | ---@return integer columnId 82 | function GetPropertyColumnId(handle, propertyName) 83 | return 0 84 | end 85 | 86 | ---@return integer wingID, boolean isExtension 87 | function GetRemoteVideoInfo() 88 | return 0, false 89 | end 90 | 91 | ---@param uiChannelIndex integer|Handle 92 | ---@param attributeIndex integer|string 93 | ---@return table uiChannelDescriptor 94 | function GetUIChannel(uiChannelIndex, attributeIndex) 95 | return {} 96 | end 97 | 98 | ---@param displayIndex integer 99 | ---@param type string @'press', 'char', 'release' 100 | ---@param charOrKeycode? string @Optional 101 | ---@param shift? boolean @Optional 102 | ---@param ctrl? boolean @Optional 103 | ---@param alt? boolean @Optional 104 | ---@param numlock? boolean @Optional 105 | function Keyboard(displayIndex, type, charOrKeycode, shift, ctrl, alt, numlock) 106 | end 107 | 108 | ---@param executor Handle 109 | function LoadExecConfig(executor) 110 | end 111 | 112 | ---@param displayIndex integer 113 | ---@param type string @'press', 'move', 'release' 114 | ---@param buttonOrAbsX string|integer @'Left', 'Middle', 'Right' for 'press'/'release' or absolute X coordinate 115 | ---@param absY? integer @Optional 116 | function Mouse(displayIndex, type, buttonOrAbsX, absY) 117 | end 118 | 119 | 120 | ---@return Handle handle 121 | function OverallDeviceCertificate() 122 | return Handle:new() 123 | end 124 | 125 | ---@param pluginName? string @Optional 126 | ---@return Handle pluginPreferences 127 | function PluginVars(pluginName) 128 | return Handle:new() 129 | end 130 | 131 | ---@param options table 132 | ---@return integer selectedIndex, string selectedValue 133 | function PopupInput(options) 134 | return 0, "" 135 | end 136 | 137 | ---@param handle Handle 138 | ---@param changeLevelThreshold? integer @Optional 139 | ---@return boolean 140 | function PrepareWaitObjectChange(handle, changeLevelThreshold) 141 | return true 142 | end 143 | 144 | ---@param handle Handle 145 | function RefreshLibrary(handle) 146 | end 147 | 148 | ---@param ip string 149 | ---@param command string 150 | ---@return boolean success 151 | function RemoteCommand(ip, command) 152 | return true 153 | end 154 | 155 | ---@param executor Handle 156 | function SaveExecConfig(executor) 157 | end 158 | 159 | ---@return Handle handle 160 | function SelectedDrive() 161 | return Handle:new() 162 | end 163 | 164 | ---@return integer min, integer max, integer index, integer block, integer group 165 | function SelectionComponentX() 166 | return 0, 0, 0, 0, 0 167 | end 168 | 169 | ---@return integer min, integer max, integer index, integer block, integer group 170 | function SelectionComponentY() 171 | return 0, 0, 0, 0, 0 172 | end 173 | 174 | ---@return integer min, integer max, integer index, integer block, integer group 175 | function SelectionComponentZ() 176 | return 0, 0, 0, 0, 0 177 | end 178 | 179 | ---@param context Handle 180 | function SelectionNotifyBegin(context) 181 | end 182 | 183 | ---@param context Handle 184 | function SelectionNotifyEnd(context) 185 | end 186 | 187 | ---@param objectToNotify Handle 188 | function SelectionNotifyObject(objectToNotify) 189 | end 190 | 191 | ---@param colorModel string @'RGB', 'xyY', 'Lab', 'XYZ', 'HSB' 192 | ---@param tripel1 number 193 | ---@param tripel2 number 194 | ---@param tripel3 number 195 | ---@param brightness number 196 | ---@param quality number 197 | ---@param constBrightness boolean 198 | ---@return integer flag 199 | function SetColor(colorModel, tripel1, tripel2, tripel3, brightness, quality, constBrightness) 200 | return 0 201 | end 202 | 203 | ---@param uiChannelIndex integer 204 | ---@param options table 205 | function SetProgPhaser(uiChannelIndex, options) 206 | end 207 | 208 | ---@param uiChannelIndex integer 209 | ---@param step integer 210 | ---@param options table 211 | function SetProgPhaserValue(uiChannelIndex, step, options) 212 | end 213 | 214 | function SyncFS() 215 | end 216 | 217 | ---@param expectations table 218 | ---@return boolean success, string resultText 219 | function TestPlaybackOutput(expectations) 220 | return true, "" 221 | end 222 | 223 | ---@param expectations table 224 | ---@return boolean success, string resultText 225 | function TestPlaybackOutputSteps(expectations) 226 | return true, "" 227 | end 228 | 229 | ---@param displayIndex integer 230 | ---@param type string @'press', 'move', 'release' 231 | ---@param touchId integer 232 | ---@param absX integer 233 | ---@param absY integer 234 | function Touch(displayIndex, type, touchId, absX, absY) 235 | end 236 | 237 | ---@param secondsToWait? number @Optional 238 | ---@return Handle|nil modalHandle 239 | function WaitModal(secondsToWait) 240 | return nil 241 | end 242 | 243 | ---@param handle Handle @handle to UIObject 244 | ---@param secondsToWait? number @Optional 245 | ---@return boolean|nil @true on success, nil on timeout 246 | function WaitObjectDelete(handle, secondsToWait) 247 | return true 248 | end -------------------------------------------------------------------------------- /resources/2.1/ma3_dummy_object_no_doc.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | --- Ma3 API version: 2.2 3 | 4 | -- Not documented Object definition 5 | -- ======================================== 6 | 7 | ---@param class? string @Optional 8 | ---@param undo? Handle @Optional 9 | ---@return Handle childHandle 10 | function Handle:Acquire(class, undo) 11 | return Handle:new() 12 | end 13 | 14 | ---@param parent Handle 15 | ---@param role? string @Optional 16 | function Handle:AddListChildren(parent, role) 17 | end 18 | 19 | ---@param parent Handle 20 | ---@param role? string @Optional 21 | function Handle:AddListChildrenNames(parent, role) 22 | end 23 | 24 | ---@param name string 25 | ---@param value string 26 | ---@param callback function 27 | ---@param argument? any @Optional 28 | ---@param appearance? table @Optional 29 | function Handle:AddListLuaItem(name, value, callback, argument, appearance) 30 | end 31 | 32 | ---@param items table 33 | function Handle:AddListLuaItems(items) 34 | end 35 | 36 | ---@param name string 37 | ---@param value number 38 | ---@param baseHandle? Handle @Optional 39 | ---@param appearance? table @Optional 40 | function Handle:AddListNumericItem(name, value, baseHandle, appearance) 41 | end 42 | 43 | ---@param items table 44 | function Handle:AddListNumericItems(items) 45 | end 46 | 47 | ---@param targetObject Handle 48 | ---@param explicitName? string @Optional 49 | ---@param appearance? table @Optional 50 | function Handle:AddListObjectItem(targetObject, explicitName, appearance) 51 | end 52 | 53 | ---@param name string 54 | ---@param value string 55 | ---@param targetHandle Handle 56 | ---@param appearance? table @Optional 57 | function Handle:AddListPropertyItem(name, value, targetHandle, appearance) 58 | end 59 | 60 | ---@param items table 61 | function Handle:AddListPropertyItems(items) 62 | end 63 | 64 | ---@param parent Handle 65 | ---@param role? string @Optional 66 | function Handle:AddListRecursiveNames(parent, role) 67 | end 68 | 69 | ---@param name string 70 | ---@param value string 71 | ---@param appearance? table @Optional 72 | function Handle:AddListStringItem(name, value, appearance) 73 | end 74 | 75 | ---@param items table 76 | function Handle:AddListStringItems(items) 77 | end 78 | 79 | ---@param class? string @Optional 80 | ---@param undo? Handle @Optional 81 | ---@param count? integer @Optional 82 | ---@return Handle childHandle 83 | function Handle:Append(class, undo, count) 84 | return Handle:new() 85 | end 86 | 87 | ---@param changeLevelEnum string 88 | function Handle:Changed(changeLevelEnum) 89 | end 90 | 91 | function Handle:ClearList() 92 | end 93 | 94 | function Handle:ClearUIChildren() 95 | end 96 | 97 | ---@return table childHandles 98 | function Handle:CmdlineChildren() 99 | return {} 100 | end 101 | 102 | ---@param index integer 103 | ---@return Handle childHandle 104 | function Handle:CmdlinePtr(index) 105 | return Handle:new() 106 | end 107 | 108 | function Handle:CommandAt() 109 | end 110 | 111 | ---@param destHandle Handle 112 | ---@param focusSearchAllowed? boolean @Optional 113 | function Handle:CommandCall(destHandle, focusSearchAllowed) 114 | end 115 | 116 | function Handle:CommandCreateDefaults() 117 | end 118 | 119 | function Handle:CommandDelete() 120 | end 121 | 122 | function Handle:CommandStore() 123 | end 124 | 125 | ---@param otherHandle Handle 126 | ---@return boolean isEqual 127 | ---@return string whatDiffers 128 | function Handle:Compare(otherHandle) 129 | return false, "" 130 | end 131 | 132 | ---@param srcHandle Handle 133 | ---@param undo? Handle @Optional 134 | function Handle:Copy(srcHandle, undo) 135 | end 136 | 137 | ---@param childIndex integer 138 | ---@param class? string @Optional 139 | ---@param undo? Handle @Optional 140 | ---@return Handle childHandle 141 | function Handle:Create(childIndex, class, undo) 142 | return Handle:new() 143 | end 144 | 145 | ---@return Handle|nil currentChild 146 | function Handle:CurrentChild() 147 | return Handle:new() 148 | end 149 | 150 | ---@param childIndex integer 151 | ---@param undo? Handle @Optional 152 | function Handle:Delete(childIndex, undo) 153 | end 154 | 155 | ---@param cell table 156 | ---@return boolean 157 | function Handle:FSExtendedModeHasDots(cell) 158 | return false 159 | end 160 | 161 | ---@param searchName string 162 | ---@param searchClassName? string @Optional 163 | ---@return Handle foundHandle 164 | function Handle:Find(searchName, searchClassName) 165 | return Handle:new() 166 | end 167 | 168 | ---@param value string 169 | ---@return integer index 170 | function Handle:FindListItemByName(value) 171 | return 1 172 | end 173 | 174 | ---@param value string 175 | ---@return integer index 176 | function Handle:FindListItemByValueStr(value) 177 | return 1 178 | end 179 | 180 | ---@param searchClassName string 181 | ---@return Handle foundHandle 182 | function Handle:FindParent(searchClassName) 183 | return Handle:new() 184 | end 185 | 186 | ---@param searchName string 187 | ---@param searchClassName? string @Optional 188 | ---@return Handle foundHandle 189 | function Handle:FindRecursive(searchName, searchClassName) 190 | return Handle:new() 191 | end 192 | 193 | ---@param searchName string 194 | ---@return Handle foundHandle 195 | function Handle:FindWild(searchName) 196 | return Handle:new() 197 | end 198 | 199 | ---@return Handle assignedHandle 200 | function Handle:GetAssignedObj() 201 | return Handle:new() 202 | end 203 | 204 | ---@return table dependencies 205 | function Handle:GetDependencies() 206 | return {} 207 | end 208 | 209 | ---@param tokenAndIndex table 210 | ---@return number value 211 | function Handle:GetFader(tokenAndIndex) 212 | return 0 213 | end 214 | 215 | ---@param tokenAndIndex table 216 | ---@return string text 217 | function Handle:GetFaderText(tokenAndIndex) 218 | return "" 219 | end 220 | 221 | ---@return string references 222 | function Handle:GetReferences() 223 | return "" 224 | end 225 | 226 | ---@return string uiEditorName 227 | function Handle:GetUIEditor() 228 | return "" 229 | end 230 | 231 | ---@return string uiSettingsName 232 | function Handle:GetUISettings() 233 | return "" 234 | end 235 | 236 | ---@return Handle displayHandle 237 | function Handle:GetDisplay() 238 | return Handle:new() 239 | end 240 | 241 | ---@return integer displayIndex 242 | function Handle:GetDisplayIndex() 243 | return 1 244 | end 245 | 246 | ---@param camelCaseToFileName? boolean @Optional 247 | ---@return string fileName 248 | function Handle:GetExportFileName(camelCaseToFileName) 249 | return "" 250 | end 251 | 252 | ---@param lineNumber integer 253 | ---@return string lineContent 254 | function Handle:GetLineAt(lineNumber) 255 | return "" 256 | end 257 | 258 | ---@return integer count 259 | function Handle:GetLineCount() 260 | return 0 261 | end 262 | 263 | ---@param index integer 264 | ---@return table appearance 265 | function Handle:GetListItemAppearance(index) 266 | return {} 267 | end 268 | 269 | ---@param index integer 270 | ---@return Handle|nil buttonHandle 271 | function Handle:GetListItemButton(index) 272 | return Handle:new() 273 | end 274 | 275 | ---@param index integer 276 | ---@return string name 277 | function Handle:GetListItemName(index) 278 | return "" 279 | end 280 | 281 | ---@param index integer 282 | ---@return integer value 283 | function Handle:GetListItemValueI64(index) 284 | return 0 285 | end 286 | 287 | ---@param index integer 288 | ---@return string value 289 | function Handle:GetListItemValueStr(index) 290 | return "" 291 | end 292 | 293 | ---@return integer count 294 | function Handle:GetListItemsCount() 295 | return 0 296 | end 297 | 298 | ---@return integer index 299 | function Handle:GetListSelectedItemIndex() 300 | return 1 301 | end 302 | 303 | ---@return Handle overlayHandle 304 | function Handle:GetOverlay() 305 | return Handle:new() 306 | end 307 | 308 | ---@return Handle screenHandle 309 | function Handle:GetScreen() 310 | return Handle:new() 311 | end 312 | 313 | ---@param index integer 314 | ---@return Handle uiObjectHandle 315 | function Handle:GetUIChild(index) 316 | return Handle:new() 317 | end 318 | 319 | ---@return integer count 320 | function Handle:GetUIChildrenCount() 321 | return 0 322 | end 323 | 324 | ---@param cell table 325 | ---@return boolean exists 326 | function Handle:GridCellExists(cell) 327 | return false 328 | end 329 | 330 | ---@return Handle gridBaseHandle 331 | function Handle:GridGetBase() 332 | return Handle:new() 333 | end 334 | 335 | ---@param cell table 336 | ---@return table cellData 337 | function Handle:GridGetCellData(cell) 338 | return {} 339 | end 340 | 341 | ---@param cell table 342 | ---@return table dimensions 343 | function Handle:GridGetCellDimensions(cell) 344 | return {} 345 | end 346 | 347 | ---@return Handle gridDataHandle 348 | function Handle:GridGetData() 349 | return Handle:new() 350 | end 351 | 352 | ---@return table dimensions 353 | function Handle:GridGetDimensions() 354 | return {} 355 | end 356 | 357 | ---@param rowId integer 358 | ---@return integer|nil parentRowId 359 | function Handle:GridGetParentRowId(rowId) 360 | return 0 361 | end 362 | 363 | ---@return table cell 364 | function Handle:GridGetScrollCell() 365 | return {} 366 | end 367 | 368 | ---@return table offset 369 | function Handle:GridGetScrollOffset() 370 | return {} 371 | end 372 | 373 | ---@return table selectedCells 374 | function Handle:GridGetSelectedCells() 375 | return {} 376 | end 377 | 378 | ---@return Handle gridSelectionHandle 379 | function Handle:GridGetSelection() 380 | return Handle:new() 381 | end 382 | 383 | ---@return Handle gridSettingsHandle 384 | function Handle:GridGetSettings() 385 | return Handle:new() 386 | end 387 | 388 | ---@param cell table 389 | ---@return boolean isReadOnly 390 | function Handle:GridIsCellReadOnly(cell) 391 | return false 392 | end 393 | 394 | ---@param cell table 395 | ---@return boolean isVisible 396 | function Handle:GridIsCellVisible(cell) 397 | return false 398 | end 399 | 400 | ---@param x integer 401 | ---@param y integer 402 | function Handle:GridMoveSelection(x, y) 403 | end 404 | 405 | ---@param cell table 406 | function Handle:GridScrollCellIntoView(cell) 407 | end 408 | 409 | ---@param columnId integer 410 | ---@param size integer 411 | function Handle:GridSetColumnSize(columnId, size) 412 | end 413 | 414 | ---@param columnId integer 415 | ---@return integer|nil columnIndex 416 | function Handle:GridsGetColumnById(columnId) 417 | return 0 418 | end 419 | 420 | ---@return table|nil cell 421 | function Handle:GridsGetExpandHeaderCell() 422 | return {} 423 | end 424 | 425 | ---@return boolean|nil state 426 | function Handle:GridsGetExpandHeaderCellState() 427 | return false 428 | end 429 | 430 | ---@param cell table 431 | ---@return integer|nil width 432 | function Handle:GridsGetLevelButtonWidth(cell) 433 | return 0 434 | end 435 | 436 | ---@param rowId integer 437 | ---@return integer|nil rowIndex 438 | function Handle:GridsGetRowById(rowId) 439 | return 0 440 | end 441 | 442 | ---@return boolean hasDependencies 443 | function Handle:HasDependencies() 444 | return false 445 | end 446 | 447 | ---@return boolean hasEditSettingUI 448 | function Handle:HasEditSettingUI() 449 | return false 450 | end 451 | 452 | ---@return boolean hasEditUI 453 | function Handle:HasEditUI() 454 | return false 455 | end 456 | 457 | ---@param objectToCheck Handle 458 | function Handle:HasParent(objectToCheck) 459 | end 460 | 461 | ---@return boolean hasReferences 462 | function Handle:HasReferences() 463 | return false 464 | end 465 | 466 | ---@param callback function 467 | ---@param argument? any @Optional 468 | ---@return boolean|nil success 469 | function Handle:HookDelete(callback, argument) 470 | return true 471 | end 472 | 473 | ---@return integer index 474 | function Handle:Index() 475 | return 0 476 | end 477 | 478 | ---@param functionName string 479 | ---@return any result 480 | function Handle:InputCallFunction(functionName) 481 | return nil 482 | end 483 | 484 | ---@param functionName string 485 | ---@return boolean|nil hasFunction 486 | function Handle:InputHasFunction(functionName) 487 | return true 488 | end 489 | 490 | function Handle:InputRun() 491 | end 492 | 493 | ---@param parameterName string 494 | ---@param parameterValue string 495 | function Handle:InputSetAdditionalParameter(parameterName, parameterValue) 496 | end 497 | 498 | ---@param nameValue string 499 | function Handle:InputSetEditTitle(nameValue) 500 | end 501 | 502 | ---@param length integer 503 | function Handle:InputSetMaxLength(length) 504 | end 505 | 506 | ---@param nameValue string 507 | function Handle:InputSetTitle(nameValue) 508 | end 509 | 510 | ---@param value string 511 | function Handle:InputSetValue(value) 512 | end 513 | 514 | ---@param childIndex integer 515 | ---@param class? string @Optional 516 | ---@param undo? Handle @Optional 517 | ---@param count? integer @Optional 518 | ---@return Handle childHandle 519 | function Handle:Insert(childIndex, class, undo, count) 520 | return Handle:new() 521 | end 522 | 523 | ---@return boolean isClass 524 | function Handle:IsClass() 525 | return false 526 | end 527 | 528 | ---@return boolean isEmpty 529 | function Handle:IsEmpty() 530 | return false 531 | end 532 | 533 | ---@return boolean isEnabled 534 | function Handle:IsEnabled() 535 | return false 536 | end 537 | 538 | ---@param index integer 539 | function Handle:IsListItemEmpty(index) 540 | end 541 | 542 | ---@param index integer 543 | function Handle:IsListItemEnabled(index) 544 | end 545 | 546 | ---@return boolean isLocked 547 | function Handle:IsLocked() 548 | return false 549 | end 550 | 551 | ---@return boolean isValid 552 | function Handle:IsValid() 553 | return false 554 | end 555 | 556 | ---@return boolean isVisible 557 | function Handle:IsVisible() 558 | return false 559 | end 560 | 561 | ---@param filePath string 562 | ---@param fileName string 563 | ---@return boolean success 564 | function Handle:Load(filePath, fileName) 565 | return false 566 | end 567 | 568 | ---@return integer maxCount 569 | function Handle:MaxCount() 570 | return 0 571 | end 572 | 573 | ---@param callbackName string 574 | ---@param ctx? any @Optional 575 | function Handle:OverlaySetCloseCallback(callbackName, ctx) 576 | end 577 | 578 | ---@return Handle parentHandle 579 | function Handle:Parent() 580 | return Handle:new() 581 | end 582 | 583 | function Handle:PrepareAccess() 584 | end 585 | 586 | ---@return integer propertyCount 587 | function Handle:PropertyCount() 588 | return 0 589 | end 590 | 591 | ---@param propertyIndex integer 592 | ---@return table propertyInfo 593 | function Handle:PropertyInfo(propertyIndex) 594 | return {} 595 | end 596 | 597 | ---@param propertyIndex integer 598 | ---@return string propertyName 599 | function Handle:PropertyName(propertyIndex) 600 | return "" 601 | end 602 | 603 | ---@param propertyIndex integer 604 | ---@return string propertyType 605 | function Handle:PropertyType(propertyIndex) 606 | return "" 607 | end 608 | 609 | ---@param childIndex integer 610 | ---@param undo? Handle @Optional 611 | function Handle:Remove(childIndex, undo) 612 | end 613 | 614 | ---@param name string 615 | function Handle:RemoveListItem(name) 616 | end 617 | 618 | ---@param size integer 619 | function Handle:Resize(size) 620 | end 621 | 622 | ---@param filePath string 623 | ---@param fileName string 624 | ---@return boolean success 625 | function Handle:Save(filePath, fileName) 626 | return false 627 | end 628 | 629 | ---@param scrollType integer 630 | ---@param scrollEntity integer 631 | ---@param valueType integer 632 | ---@param value number 633 | ---@param updateOpposite boolean 634 | ---@return boolean success 635 | function Handle:ScrollDo(scrollType, scrollEntity, valueType, value, updateOpposite) 636 | return false 637 | end 638 | 639 | ---@param scrollType integer 640 | ---@return table|nil scrollInfo 641 | function Handle:ScrollGetInfo(scrollType) 642 | return {} 643 | end 644 | 645 | ---@param scrollType integer 646 | ---@param offset integer 647 | ---@return integer itemIndex 648 | function Handle:ScrollGetItemByOffset(scrollType, offset) 649 | return 1 650 | end 651 | 652 | ---@param scrollType integer 653 | ---@param itemIdx integer 654 | ---@return integer|nil offset 655 | function Handle:ScrollGetItemOffset(scrollType, itemIdx) 656 | return 0 657 | end 658 | 659 | ---@param scrollType integer 660 | ---@param itemIdx integer 661 | ---@return integer|nil size 662 | function Handle:ScrollGetItemSize(scrollType, itemIdx) 663 | return 0 664 | end 665 | 666 | ---@param scrollType integer 667 | ---@return boolean isNeeded 668 | function Handle:ScrollIsNeeded(scrollType) 669 | return false 670 | end 671 | 672 | ---@param index integer 673 | function Handle:SelectListItemByIndex(index) 674 | end 675 | 676 | ---@param nameValue string 677 | function Handle:SelectListItemByName(nameValue) 678 | end 679 | 680 | ---@param value string 681 | function Handle:SelectListItemByValue(value) 682 | end 683 | 684 | ---@param propertyName string 685 | ---@param propertyValue string 686 | ---@param overrideChangeLevel? integer @Optional 687 | function Handle:Set(propertyName, propertyValue, overrideChangeLevel) 688 | end 689 | 690 | ---@param propertyName string 691 | ---@param propertyValue string 692 | ---@param recursive? boolean @Optional 693 | function Handle:SetChildren(propertyName, propertyValue, recursive) 694 | end 695 | 696 | ---@param propertyName string 697 | ---@param propertyValue string 698 | ---@param recursive? boolean @Optional 699 | function Handle:SetChildrenRecursive(propertyName, propertyValue, recursive) 700 | end 701 | 702 | ---@param topicName string 703 | function Handle:SetContextSensHelpLink(topicName) 704 | end 705 | 706 | ---@param index integer 707 | ---@param empty? boolean @Optional 708 | function Handle:SetEmptyListItem(index, empty) 709 | end 710 | 711 | ---@param index integer 712 | ---@param enable? boolean @Optional 713 | function Handle:SetEnabledListItem(index, enable) 714 | end 715 | 716 | ---@param settingsTable table 717 | function Handle:SetFader(settingsTable) 718 | end 719 | 720 | ---@param index integer 721 | ---@param appearance table 722 | function Handle:SetListItemAppearance(index, appearance) 723 | end 724 | 725 | ---@param index integer 726 | ---@param name string 727 | function Handle:SetListItemName(index, name) 728 | end 729 | 730 | ---@param index integer 731 | ---@param value string 732 | function Handle:SetListItemValueStr(index, value) 733 | end 734 | 735 | ---@param x integer 736 | ---@param y integer 737 | function Handle:SetPositionHint(x, y) 738 | end 739 | 740 | ---@param callback function 741 | function Handle:ShowModal(callback) 742 | end 743 | 744 | ---@return table childHandles 745 | function Handle:UIChildren() 746 | return {} 747 | end 748 | 749 | ---@param index integer 750 | ---@return integer x 751 | function Handle:UILGGetColumnAbsXLeft(index) 752 | return 0 753 | end 754 | 755 | ---@param index integer 756 | ---@return integer x 757 | function Handle:UILGGetColumnAbsXRight(index) 758 | return 0 759 | end 760 | 761 | ---@param index integer 762 | ---@return integer size 763 | function Handle:UILGGetColumnWidth(index) 764 | return 0 765 | end 766 | 767 | ---@param index integer 768 | ---@return integer y 769 | function Handle:UILGGetRowAbsYBottom(index) 770 | return 0 771 | end 772 | 773 | ---@param index integer 774 | ---@return integer y 775 | function Handle:UILGGetRowAbsYTop(index) 776 | return 0 777 | end 778 | 779 | ---@param index integer 780 | ---@return integer size 781 | function Handle:UILGGetRowHeight(index) 782 | return 0 783 | end 784 | 785 | ---@param expectedChildren integer 786 | ---@param secondsToWait? number @Optional 787 | ---@return boolean success 788 | function Handle:WaitChildren(expectedChildren, secondsToWait) 789 | return false 790 | end 791 | 792 | ---@param secondsToWait? number @Optional 793 | ---@param forceReInit? boolean @Optional 794 | ---@return boolean success 795 | function Handle:WaitInit(secondsToWait, forceReInit) 796 | return false 797 | end -------------------------------------------------------------------------------- /resources/2.1/ma3_object_free_no_doc.json: -------------------------------------------------------------------------------- 1 | { 2 | "_Ma3_API_Version": "2.2", 3 | "ColMeasureDeviceDarkCalibrate": { 4 | "prefix": "ColMeasureDeviceDarkCalibrate()", 5 | "body": [ 6 | "ColMeasureDeviceDarkCalibrate()" 7 | ], 8 | "code": "ColMeasureDeviceDarkCalibrate(nothing): integer:flag" 9 | }, 10 | "ColMeasureDeviceDoMeasurement": { 11 | "prefix": "ColMeasureDeviceDoMeasurement()", 12 | "body": [ 13 | "ColMeasureDeviceDoMeasurement()" 14 | ], 15 | "code": "ColMeasureDeviceDoMeasurement(nothing): table:values" 16 | }, 17 | "CreateDirectoryRecursive": { 18 | "prefix": "CreateDirectoryRecursive(path)", 19 | "body": [ 20 | "CreateDirectoryRecursive(${1:path})" 21 | ], 22 | "code": "CreateDirectoryRecursive(string:path): boolean:result" 23 | }, 24 | "DevMode3d": { 25 | "prefix": "DevMode3d()", 26 | "body": [ 27 | "DevMode3d()" 28 | ], 29 | "code": "DevMode3d(nothing): string:devmode3d" 30 | }, 31 | "FSExtendedModeHasDots": { 32 | "prefix": "FSExtendedModeHasDots(handle, cell)", 33 | "body": [ 34 | "FSExtendedModeHasDots(${1:handle}, ${2:cell})" 35 | ], 36 | "code": "FSExtendedModeHasDots(light_userdata:handle to UIGrid (or derived), {r, c}:cell): boolean" 37 | }, 38 | "FindBestDMXPatchAddr": { 39 | "prefix": "FindBestDMXPatchAddr(patch, startingAddress, footprint)", 40 | "body": [ 41 | "FindBestDMXPatchAddr(${1:patch}, ${2:startingAddress}, ${3:footprint})" 42 | ], 43 | "code": "FindBestDMXPatchAddr(light_userdata:patch, integer:starting_address, integer:footprint): integer:absolute_address" 44 | }, 45 | "FindBestFocus": { 46 | "prefix": "FindBestFocus(handle)", 47 | "body": [ 48 | "FindBestFocus(${1:_handle})" 49 | ], 50 | "code": "FindBestFocus([light_userdata:handle]): nothing" 51 | }, 52 | "FindNextFocus": { 53 | "prefix": "FindNextFocus(backwards, reason)", 54 | "body": [ 55 | "FindNextFocus(${1:_backwards}, ${2:_reason})" 56 | ], 57 | "code": "FindNextFocus([bool:backwards(false)[, int(Focus::Reason):reason(UserTabKey)]]): nothing" 58 | }, 59 | "GetAttributeColumnId": { 60 | "prefix": "GetAttributeColumnId(handle, attribute)", 61 | "body": [ 62 | "GetAttributeColumnId(${1:handle}, ${2:attribute})" 63 | ], 64 | "code": "GetAttributeColumnId(light_userdata:handle, light_userdata:attribute): integer:column_id" 65 | }, 66 | "GetObject": { 67 | "prefix": "GetObject(address)", 68 | "body": [ 69 | "GetObject(${1:address})" 70 | ], 71 | "code": "GetObject(string:address): light_userdata:handle" 72 | }, 73 | "GetProgPhaser": { 74 | "prefix": "GetProgPhaser(uiChannelIndex, phaserOnly)", 75 | "body": [ 76 | "GetProgPhaser(${1:uiChannelIndex}, ${2:phaserOnly})" 77 | ], 78 | "code": "GetProgPhaser(integer:ui_channel_index, boolean:phaser_only): {['abs_preset'=light_userdata:handle], ['rel_preset'=light_userdata:handle], ['fade'=integer:seconds], ['delay'=integer:seconds], ['speed'=integer:hz], ['phase'=integer:degree], ['measure'=integer:value], ['gridpos'=integer:value], ['mask_active_phaser'=boolean:value], ['mask_active_value'=boolean:value], ['mask_individual'=boolean:value], {['channel_function'=integer:value], ['absolute'=integer:percent], ['absolute_value'=integer:value], ['relative'=integer:percent], ['accel'=integer:percent[, 'accel_type'=integer:enum_value(Enums.SplineType)]], ['decel'=integer:percent[, 'decel_type'=integer:enum_value(Enums.SplineType)]], ['trans'=integer:percent], ['width'=integer:percent], ['integrated'=light_userdata:preset_handle]}}" 79 | }, 80 | "GetProgPhaserValue": { 81 | "prefix": "GetProgPhaserValue(uiChannelIndex, step)", 82 | "body": [ 83 | "GetProgPhaserValue(${1:uiChannelIndex}, ${2:step})" 84 | ], 85 | "code": "GetProgPhaserValue(integer:ui_channel_index, integer:step): {['channel_function'=integer:value], ['absolute'=integer:percent], ['absolute_value'=integer:value], ['relative'=integer:percent], ['accel'=integer:percent[, 'accel_type'=integer:enum_value(Enums.SplineType)]], ['decel'=integer:percent[, 'decel_type'=integer:enum_value(Enums.SplineType)]], ['trans'=integer:percent], ['width'=integer:percent], ['integrated'=light_userdata:preset_handle]}" 86 | }, 87 | "GetPropertyColumnId": { 88 | "prefix": "GetPropertyColumnId(handle, propertyName)", 89 | "body": [ 90 | "GetPropertyColumnId(${1:handle}, ${2:propertyName})" 91 | ], 92 | "code": "GetPropertyColumnId(light_userdata:handle, string:property_name): integer:column_id" 93 | }, 94 | "GetRemoteVideoInfo": { 95 | "prefix": "GetRemoteVideoInfo()", 96 | "body": [ 97 | "GetRemoteVideoInfo()" 98 | ], 99 | "code": "GetRemoteVideoInfo(nothing): integer:wingID, boolean:isExtension" 100 | }, 101 | "GetUIChannel": { 102 | "prefix": "GetUIChannel(uiChannelIndex, attributeIndex)", 103 | "body": [ 104 | "GetUIChannel(${1:uiChannelIndex}, ${2:attributeIndex})" 105 | ], 106 | "code": "GetUIChannel(integer:ui_channel_index or light_userdata: subfixture_reference, integer:attribute_index or string:attribute_name): table:ui_channel_descriptor" 107 | }, 108 | "Keyboard": { 109 | "prefix": "Keyboard(displayIndex, type, charOrKeycode, shift, ctrl, alt, numlock)", 110 | "body": [ 111 | "Keyboard(${1:displayIndex}, ${2:type}, ${3:_charOrKeycode}, ${4:_shift}, ${5:_ctrl}, ${6:_alt}, ${7:_numlock})" 112 | ], 113 | "code": "Keyboard(integer:display_index, string:type('press', 'char', 'release')[ ,string:char(for type 'char') or string:keycode, boolean:shift, boolean:ctrl, boolean:alt, boolean:numlock]): nothing" 114 | }, 115 | "LoadExecConfig": { 116 | "prefix": "LoadExecConfig(executor)", 117 | "body": [ 118 | "LoadExecConfig(${1:executor})" 119 | ], 120 | "code": "LoadExecConfig(light_userdata:executor): nothing" 121 | }, 122 | "Mouse": { 123 | "prefix": "Mouse(displayIndex, type, buttonOrAbsX, absY)", 124 | "body": [ 125 | "Mouse(${1:displayIndex}, ${2:type}, ${3:buttonOrAbsX}, ${4:_absY})" 126 | ], 127 | "code": "Mouse(integer:display_index, string:type('press', 'move', 'release')[ ,string:button('Left', 'Middle', 'Right' for 'press', 'release') or integer:abs_x, integer:abs_y)]): nothing" 128 | }, 129 | "OverallDeviceCertificate": { 130 | "prefix": "OverallDeviceCertificate()", 131 | "body": [ 132 | "OverallDeviceCertificate()" 133 | ], 134 | "code": "OverallDeviceCertificate(nothing): light_userdata:handle" 135 | }, 136 | "PluginVars": { 137 | "prefix": "PluginVars(pluginName)", 138 | "body": [ 139 | "PluginVars(${1:_pluginName})" 140 | ], 141 | "code": "PluginVars([string:plugin_name]): light_userdata:plugin_preferences" 142 | }, 143 | "PopupInput": { 144 | "prefix": "PopupInput(options)", 145 | "body": [ 146 | "PopupInput(${1:options})" 147 | ], 148 | "code": "PopupInput({title:str, caller:handle, items:table, selectedValue:str, x:int, y:int, target:handle, render_options:{left_icon, number, right_icon}, useTopLeft:bool, properties:{prop:value}, add_args:{FilterSupport='Yes'/'No'}}): integer:selected_index, string:selected_value" 149 | }, 150 | "PrepareWaitObjectChange": { 151 | "prefix": "PrepareWaitObjectChange(handle, changeLevelThreshold)", 152 | "body": [ 153 | "PrepareWaitObjectChange(${1:handle}, ${2:_changeLevelThreshold})" 154 | ], 155 | "code": "PrepareWaitObjectChange(light_userdata:handle[ ,integer:change_level_threshold]): boolean:true or nothing" 156 | }, 157 | "RefreshLibrary": { 158 | "prefix": "RefreshLibrary(handle)", 159 | "body": [ 160 | "RefreshLibrary(${1:handle})" 161 | ], 162 | "code": "RefreshLibrary(light_userdata:handle): nothing" 163 | }, 164 | "RemoteCommand": { 165 | "prefix": "RemoteCommand(ip, command)", 166 | "body": [ 167 | "RemoteCommand(${1:ip}, ${2:command})" 168 | ], 169 | "code": "RemoteCommand(string:ip, string:command): boolean:success" 170 | }, 171 | "SaveExecConfig": { 172 | "prefix": "SaveExecConfig(executor)", 173 | "body": [ 174 | "SaveExecConfig(${1:executor})" 175 | ], 176 | "code": "SaveExecConfig(light_userdata:executor): nothing" 177 | }, 178 | "SelectedDrive": { 179 | "prefix": "SelectedDrive()", 180 | "body": [ 181 | "SelectedDrive()" 182 | ], 183 | "code": "SelectedDrive(nothing): light_userdata:handle" 184 | }, 185 | "SelectionComponentX": { 186 | "prefix": "SelectionComponentX()", 187 | "body": [ 188 | "SelectionComponentX()" 189 | ], 190 | "code": "SelectionComponentX(nothing): integer:min, integer:max, integer:index, integer:block, integer:group" 191 | }, 192 | "SelectionComponentY": { 193 | "prefix": "SelectionComponentY()", 194 | "body": [ 195 | "SelectionComponentY()" 196 | ], 197 | "code": "SelectionComponentY(nothing): integer:min, integer:max, integer:index, integer:block, integer:group" 198 | }, 199 | "SelectionComponentZ": { 200 | "prefix": "SelectionComponentZ()", 201 | "body": [ 202 | "SelectionComponentZ()" 203 | ], 204 | "code": "SelectionComponentZ(nothing): integer:min, integer:max, integer:index, integer:block, integer:group" 205 | }, 206 | "SelectionNotifyBegin": { 207 | "prefix": "SelectionNotifyBegin(context)", 208 | "body": [ 209 | "SelectionNotifyBegin(${1:context})" 210 | ], 211 | "code": "SelectionNotifyBegin(light_userdata:associated_context): nothing" 212 | }, 213 | "SelectionNotifyEnd": { 214 | "prefix": "SelectionNotifyEnd(context)", 215 | "body": [ 216 | "SelectionNotifyEnd(${1:context})" 217 | ], 218 | "code": "SelectionNotifyEnd(light_userdata:associated_context): nothing" 219 | }, 220 | "SelectionNotifyObject": { 221 | "prefix": "SelectionNotifyObject(objectToNotify)", 222 | "body": [ 223 | "SelectionNotifyObject(${1:objectToNotify})" 224 | ], 225 | "code": "SelectionNotifyObject(light_userdata:object_to_notify_about): nothing" 226 | }, 227 | "SetColor": { 228 | "prefix": "SetColor(colorModel, tripel1, tripel2, tripel3, brightness, quality, constBrightness)", 229 | "body": [ 230 | "SetColor(${1:colorModel}, ${2:tripel1}, ${3:tripel2}, ${4:tripel3}, ${5:brightness}, ${6:quality}, ${7:constBrightness})" 231 | ], 232 | "code": "SetColor(string:color_model('RGB', 'xyY', 'Lab', 'XYZ', 'HSB'), float:tripel1, float:tripel2, float:tripel3, float:brightness, float:quality, boolean:const_brightness): integer:flag" 233 | }, 234 | "SetProgPhaser": { 235 | "prefix": "SetProgPhaser(uiChannelIndex, options)", 236 | "body": [ 237 | "SetProgPhaser(${1:uiChannelIndex}, ${2:options})" 238 | ], 239 | "code": "SetProgPhaser(integer:ui_channel_index, {['abs_preset'=light_userdata:handle], ['rel_preset'=light_userdata:handle], ['fade'=integer:seconds], ['delay'=integer:seconds], ['speed'=integer:hz], ['phase'=integer:degree], ['measure'=integer:value], ['gridpos'=integer:value], {['channel_function'=integer:value], ['absolute'=integer:percent], ['absolute_value'=integer:value], ['relative'=integer:percent], ['accel'=integer:percent[, 'accel_type'=integer:enum_value(Enums.SplineType)]], ['decel'=integer:percent[, 'decel_type'=integer:enum_value(Enums.SplineType)]], ['trans'=integer:percent], ['width'=integer:percent], ['integrated'=light_userdata:preset_handle]}}): nothing" 240 | }, 241 | "SetProgPhaserValue": { 242 | "prefix": "SetProgPhaserValue(uiChannelIndex, step, options)", 243 | "body": [ 244 | "SetProgPhaserValue(${1:uiChannelIndex}, ${2:step}, ${3:options})" 245 | ], 246 | "code": "SetProgPhaserValue(integer:ui_channel_index, integer:step, {['channel_function'=integer:value], ['absolute'=integer:percent], ['absolute_value'=integer:value], ['relative'=integer:percent], ['accel'=integer:percent[, 'accel_type'=integer:enum_value(Enums.SplineType)]], ['decel'=integer:percent[, 'decel_type'=integer:enum_value(Enums.SplineType)]], ['trans'=integer:percent], ['width'=integer:percent], ['integrated'=light_userdata:preset_handle]}): nothing" 247 | }, 248 | "SyncFS": { 249 | "prefix": "SyncFS()", 250 | "body": [ 251 | "SyncFS()" 252 | ], 253 | "code": "SyncFS(nothing): nothing" 254 | }, 255 | "TestPlaybackOutput": { 256 | "prefix": "TestPlaybackOutput(expectations)", 257 | "body": [ 258 | "TestPlaybackOutput(${1:expectations})" 259 | ], 260 | "code": "TestPlaybackOutput(table:expectations): boolean:success, string:result text" 261 | }, 262 | "TestPlaybackOutputSteps": { 263 | "prefix": "TestPlaybackOutputSteps(expectations)", 264 | "body": [ 265 | "TestPlaybackOutputSteps(${1:expectations})" 266 | ], 267 | "code": "TestPlaybackOutputSteps(table:expectations): boolean:success, string:result text" 268 | }, 269 | "Touch": { 270 | "prefix": "Touch(displayIndex, type, touchId, absX, absY)", 271 | "body": [ 272 | "Touch(${1:displayIndex}, ${2:type}, ${3:touchId}, ${4:absX}, ${5:absY})" 273 | ], 274 | "code": "Touch(integer:display_index, string:type('press', 'move', 'release'), integer:touch_id, integer:abs_x, integer:abs_y): nothing" 275 | }, 276 | "WaitModal": { 277 | "prefix": "WaitModal(secondsToWait)", 278 | "body": [ 279 | "WaitModal(${1:_secondsToWait})" 280 | ], 281 | "code": "WaitModal([number:seconds to wait]): handle to modal overlay or nil on failure(timeout)" 282 | }, 283 | "WaitObjectDelete": { 284 | "prefix": "WaitObjectDelete(handle, secondsToWait)", 285 | "body": [ 286 | "WaitObjectDelete(${1:handle}, ${2:_secondsToWait})" 287 | ], 288 | "code": "WaitObjectDelete(light_userdata:handle to UIObject[, number:seconds to wait]): boolean:true on success, nil on timeout" 289 | } 290 | } -------------------------------------------------------------------------------- /resources/2.2/ma3_dummy_object.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | --- Ma3 API version: 2.2 3 | 4 | -- Object definition 5 | -- ======================================== 6 | 7 | ---@class Handle 8 | --- @field dmxInvertPan boolean | string 9 | --- @field dmxInvertTilt boolean | string 10 | --- @field encInvertPan boolean | string 11 | --- @field encInvertTilt boolean | string 12 | --- @field castShadow boolean | string 13 | --- @field followTarget boolean | string 14 | --- @field gridInvX boolean | string 15 | --- @field gridInvY boolean | string 16 | --- @field gridInvZ boolean | string 17 | Handle = {} 18 | 19 | ---@return Handle 20 | function Handle:new() 21 | local instance = setmetatable({}, { __index = Handle }) 22 | instance.dmxInvertPan = nil 23 | instance.dmxInvertTilt = nil 24 | instance.encInvertPan = nil 25 | instance.encInvertTilt = nil 26 | instance.castShadow = nil 27 | instance.gridInvX = nil 28 | instance.gridInvY = nil 29 | instance.gridInvZ = nil 30 | return instance 31 | end 32 | 33 | ---@return Handle handle 34 | function Obj() 35 | return Handle:new() 36 | end 37 | 38 | ---@param baseLocationHandle? Handle @Optional 39 | ---@param useToAddrIndex? boolean|nil @Optional 40 | ---@param isCueObject? boolean @Optional 41 | ---@return string numericRootAddress 42 | function Handle:Addr(baseLocationHandle, useToAddrIndex, isCueObject) 43 | return "" 44 | end 45 | 46 | ---@param baseLocationHandle? Handle @Optional 47 | ---@param returnNamesInQuotes? boolean @Optional 48 | ---@return string numericRootAddress 49 | function Handle:AddrNative(baseLocationHandle, returnNamesInQuotes) 50 | return "" 51 | end 52 | 53 | ---@return table children 54 | function Handle:Children() 55 | return {} 56 | end 57 | 58 | ---@return integer count 59 | function Handle:Count() 60 | return 0 61 | end 62 | 63 | function Handle:Dump() 64 | end 65 | 66 | ---@param filePath string 67 | ---@param fileName string 68 | ---@return boolean success 69 | function Handle:Export(filePath, fileName) 70 | return true 71 | end 72 | 73 | ---@param propertyName string 74 | ---@param roleInteger? integer @Optional 75 | ---@return string property 76 | function Handle:Get(propertyName, roleInteger) 77 | return "" 78 | end 79 | 80 | ---@return string className 81 | function Handle:GetChildClass() 82 | return "" 83 | end 84 | 85 | ---@return string className 86 | function Handle:GetClass() 87 | return "" 88 | end 89 | 90 | ---@return table dependencies 91 | function Handle:GetDependencies() 92 | return {} 93 | end 94 | 95 | ---@param tokenAndIndex table 96 | ---@return number value 97 | function Handle:GetFader(tokenAndIndex) 98 | return 0 99 | end 100 | 101 | ---@param tokenAndIndex table 102 | ---@return string text 103 | function Handle:GetFaderText(tokenAndIndex) 104 | return "" 105 | end 106 | 107 | ---@return string references 108 | function Handle:GetReferences() 109 | return "" 110 | end 111 | 112 | ---@return string uiEditorName 113 | function Handle:GetUIEditor() 114 | return "" 115 | end 116 | 117 | ---@return string uiSettingsName 118 | function Handle:GetUISettings() 119 | return "" 120 | end 121 | 122 | ---@return boolean hasActivePlayback 123 | function Handle:HasActivePlayback() 124 | return true 125 | end 126 | 127 | ---@param filePath string 128 | ---@param fileName string 129 | ---@return boolean success 130 | function Handle:Import(filePath, fileName) 131 | return true 132 | end 133 | 134 | ---@param settingsTable table 135 | function Handle:SetFader(settingsTable) 136 | end 137 | 138 | ---@param childIndex integer 139 | ---@return Handle|nil child 140 | function Handle:Ptr(childIndex) 141 | return Handle:new() 142 | end 143 | 144 | ---@param returnName boolean 145 | ---@return string address 146 | function Handle:ToAddr(returnName) 147 | return "" 148 | end -------------------------------------------------------------------------------- /resources/2.2/ma3_dummy_object_free.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | --- Ma3 API version: 2.2 3 | 4 | -- Object free definition 5 | -- ======================================== 6 | 7 | ---@param fixtureTable table 8 | ---@return boolean|nil success 9 | function AddFixtures(fixtureTable) 10 | return true 11 | end 12 | 13 | ---@param addonName string 14 | ---@return Handle addonVariable 15 | function AddonVars(addonName) 16 | return Handle:new() 17 | end 18 | 19 | ---@return table buildDetails 20 | function BuildDetails() 21 | return {} 22 | end 23 | 24 | ---@param dmxMode Handle 25 | ---@param startAddress string 26 | ---@param count? integer|nil @Optional 27 | ---@param breakIndex? integer @Optional 28 | ---@return boolean noCollisionFound 29 | function CheckDMXCollision(dmxMode, startAddress, count, breakIndex) 30 | return true 31 | end 32 | 33 | ---@param fixtureId integer 34 | ---@param count? integer @Optional 35 | ---@param type? integer @Optional 36 | ---@return boolean noCollisionFound 37 | function CheckFIDCollision(fixtureId, count, type) 38 | return true 39 | end 40 | 41 | ---@param className string 42 | ---@return boolean result 43 | function ClassExists(className) 44 | return true 45 | end 46 | 47 | function CloseAllOverlays() 48 | end 49 | 50 | ---@param undoHandle Handle 51 | ---@return boolean closed 52 | function CloseUndo(undoHandle) 53 | return true 54 | end 55 | 56 | ---@param command string 57 | ---@param undoHandle? Handle @Optional 58 | ---@return string result 59 | function Cmd(command, undoHandle) 60 | return "" 61 | end 62 | 63 | ---@param command string 64 | ---@param undoHandle? Handle @Optional 65 | ---@param handleTarget? Handle @Optional 66 | function CmdIndirect(command, undoHandle, handleTarget) 67 | 68 | end 69 | 70 | ---@param command string 71 | ---@param undoHandle? Handle @Optional 72 | ---@param handleTarget? Handle @Optional 73 | function CmdIndirectWait(command, undoHandle, handleTarget) 74 | 75 | end 76 | 77 | ---@return Handle object 78 | function CmdObj() 79 | return Handle:new() 80 | end 81 | 82 | ---@return table configDetails 83 | function ConfigTable() 84 | return {} 85 | end 86 | 87 | ---@param title string 88 | ---@param text? string @Optional 89 | ---@param screen? integer @Optional 90 | ---@param showCancel? boolean @Optional 91 | ---@return boolean result 92 | function Confirm(title, text, screen, showCancel) 93 | return true 94 | end 95 | 96 | ---@param fixtureTableHandle Handle 97 | ---@param multiPatchAmount integer 98 | ---@param undoText? string @Optional 99 | ---@return integer|nil multiPatchAmountCreated 100 | function CreateMultiPatch(fixtureTableHandle, multiPatchAmount, undoText) 101 | return 0 102 | end 103 | 104 | ---@param undoText any 105 | ---@return Handle undoHandle 106 | function CreateUndo(undoText) 107 | return Handle:new() 108 | end 109 | 110 | ---@return Handle environmentHandle 111 | function CurrentEnvironment() 112 | return Handle:new() 113 | end 114 | 115 | ---@return Handle execHandle 116 | function CurrentExecPage() 117 | return Handle:new() 118 | end 119 | 120 | ---@return Handle profileHandle 121 | function CurrentProfile() 122 | return Handle:new() 123 | end 124 | 125 | ---@return Handle screenConfigHandle 126 | function CurrentScreenConfig() 127 | return Handle:new() 128 | end 129 | 130 | ---@return Handle userHandle 131 | function CurrentUser() 132 | return Handle:new() 133 | end 134 | 135 | ---@return Handle dataPoolHandle 136 | function DataPool() 137 | return Handle:new() 138 | end 139 | 140 | ---@return Handle displayPositionsHandle 141 | function DefaultDisplayPositions() 142 | return Handle:new() 143 | end 144 | 145 | ---@param variableSetHandle Handle 146 | ---@param variableName string 147 | ---@return boolean success 148 | function DelVar(variableSetHandle, variableName) 149 | return true 150 | end 151 | 152 | ---@return boolean deskIsLocked 153 | function DeskLocked() 154 | return true 155 | end 156 | 157 | ---@return Handle configurationHandle 158 | function DeviceConfiguration() 159 | return Handle:new() 160 | end 161 | 162 | ---@param path string 163 | ---@param filter? string @Optional 164 | ---@return table 165 | function DirList(path, filter) 166 | return {} 167 | end 168 | 169 | ---@param displayIndex integer 170 | ---@param position table 171 | ---@param duration? integer @Optional 172 | function DrawPointer(displayIndex, position, duration) 173 | end 174 | 175 | function DumpAllHooks() 176 | end 177 | 178 | ---@param message string 179 | function Echo(message) 180 | end 181 | 182 | ---@param message string 183 | function ErrEcho(message) 184 | end 185 | 186 | ---@param message string 187 | function ErrPrintf(message) 188 | 189 | end 190 | 191 | ---@param fileName string 192 | ---@param exportData table 193 | ---@return boolean success 194 | function Export(fileName, exportData) 195 | return true 196 | end 197 | 198 | ---@param fileName string 199 | ---@param exportData table 200 | ---@return boolean success 201 | function ExportCSV(fileName, exportData) 202 | return true 203 | end 204 | 205 | ---@param fileName string 206 | ---@param exportData table 207 | ---@return boolean success 208 | function ExportJson(fileName, exportData) 209 | return true 210 | end 211 | 212 | ---@param fileName string 213 | ---@return boolean result 214 | function FileExists(fileName) 215 | return true 216 | end 217 | 218 | ---@param textureName string 219 | ---@return Handle|nil textureHandle 220 | function FindTexture(textureName) 221 | return Handle:new() 222 | end 223 | 224 | ---@param fixtureDMXMode Handle 225 | ---@return Handle fixtureHandle 226 | function FirstDmxModeFixture(fixtureDMXMode) 227 | return Handle:new() 228 | end 229 | 230 | ---@return Handle|nil fixtureHandle 231 | function FixtureType() 232 | return Handle:new() 233 | end 234 | 235 | ---@param objectString string 236 | ---@param addressHandle? Handle @Optional 237 | ---@return Handle object 238 | function FromAddr(objectString, addressHandle) 239 | return Handle:new() 240 | end 241 | 242 | ---@return table apiDescriptor 243 | function GetApiDescriptor() 244 | return {} 245 | end 246 | 247 | ---@param channelIndex integer 248 | ---@return Handle attributeHandle 249 | function GetAttributeByUIChannel(channelIndex) 250 | return Handle:new() 251 | end 252 | 253 | ---@return integer attributeCount 254 | function GetAttributeCount() 255 | return 0 256 | end 257 | 258 | ---@param attributeName string 259 | ---@return integer attributeIndex 260 | function GetAttributeIndex(attributeName) 261 | return 0 262 | end 263 | 264 | ---@param Ma3ModuleHandle Handle 265 | ---@return table state 266 | function GetButton(Ma3ModuleHandle) 267 | return {} 268 | end 269 | 270 | ---@param channelIndex integer 271 | ---@param attributeIndex integer 272 | ---@return Handle channelFunctionHandle 273 | function GetChannelFunction(channelIndex, attributeIndex) 274 | return Handle:new() 275 | end 276 | 277 | ---@param channelIndex integer 278 | ---@param attributeIndex integer 279 | ---@return integer channelFunctionIndex 280 | function GetChannelFunctionIndex(channelIndex, attributeIndex) 281 | return 0 282 | end 283 | 284 | ---@param className string 285 | ---@return integer derivationLevel 286 | function GetClassDerivationLevel(className) 287 | return 0 288 | end 289 | 290 | ---@return Handle cueHandle 291 | function GetCurrentCue() 292 | return Handle:new() 293 | end 294 | 295 | ---@return integer fps 296 | function GetDebugFPS() 297 | return 0 298 | end 299 | 300 | ---@param displayIndex integer 301 | ---@return Handle displayHandle 302 | function GetDisplayByIndex(displayIndex) 303 | return Handle:new() 304 | end 305 | 306 | ---@return Handle DisplayCollectHandle 307 | function GetDisplayCollect() 308 | return Handle:new() 309 | end 310 | 311 | ---@param universe integer 312 | ---@param isPercent? boolean @Optional 313 | ---@return table|nil universe 314 | function GetDMXUniverse(universe, isPercent) 315 | return {} 316 | end 317 | 318 | ---@param address integer 319 | ---@param universe? integer @Optional 320 | ---@param returnPercent? boolean @Optional 321 | ---@return integer|nil value 322 | function GetDMXValue(address, universe, returnPercent) 323 | return 0 324 | end 325 | 326 | ---@param executorNumber integer 327 | ---@return Handle executor, Handle page 328 | function GetExecutor(executorNumber) 329 | return Handle:new(), Handle:new() 330 | end 331 | 332 | ---@return Handle focusHandle 333 | function GetFocus() 334 | return Handle:new() 335 | end 336 | 337 | ---@return Handle focusDisplayHandle 338 | function GetFocusDisplay() 339 | return Handle:new() 340 | end 341 | 342 | ---@return table apiDescriptor 343 | function GetObjApiDescriptor() 344 | return {} 345 | end 346 | 347 | ---@param folderNameOrIndex string|integer 348 | ---@param createIfNotExist? boolean|nil @Optional 349 | ---@return string path 350 | function GetPath(folderNameOrIndex, createIfNotExist) 351 | return "" 352 | end 353 | 354 | ---@param folderNameOrIndex string|integer 355 | ---@param basePath string 356 | ---@param createIfNotExist? boolean @Optional 357 | ---@return string path 358 | function GetPathOverrideFor(folderNameOrIndex, basePath, createIfNotExist) 359 | return "" 360 | end 361 | 362 | ---@return string separator 363 | function GetPathSeparator() 364 | return "" 365 | end 366 | 367 | ---@param objectHandle Handle 368 | ---@param pathContentType? integer @Optional 369 | ---@return string pathType 370 | function GetPathType(objectHandle, pathContentType) 371 | return "" 372 | end 373 | 374 | ---@param presetHandle Handle 375 | ---@param returnPhaserData? boolean|nil @Optional 376 | ---@param extract? boolean @Optional 377 | ---@return table|nil presetData 378 | function GetPresetData(presetHandle, returnPhaserData, extract) 379 | return {} 380 | end 381 | 382 | ---@param rtChannelIndex integer 383 | ---@return table reChanelDescriptor 384 | function GetRTChannel(rtChannelIndex) 385 | return {} 386 | end 387 | 388 | ---@return integer count 389 | function GetRTChannelCount() 390 | return 0 391 | end 392 | 393 | ---@param fixtureIndexOrHandle integer|Handle 394 | ---@param returnHandles? boolean @Optional 395 | ---@return table rtChannels 396 | function GetRTChannels(fixtureIndexOrHandle, returnHandles) 397 | return {} 398 | end 399 | 400 | ---@param sampleType string 401 | ---@return number sample 402 | function GetSample(sampleType) 403 | return 0.1 404 | end 405 | 406 | ---@param screenHandle Handle 407 | ---@return Handle screenContentHandle 408 | function GetScreenContent(screenHandle) 409 | return Handle:new() 410 | end 411 | 412 | ---@return Handle attributeHandle 413 | function GetSelectedAttribute() 414 | return Handle:new() 415 | end 416 | 417 | ---@return string status 418 | function GetShowFileStatus() 419 | return "" 420 | end 421 | 422 | ---@param fixtureIndex integer 423 | ---@return Handle subFixtureHandle 424 | function GetSubfixture(fixtureIndex) 425 | return Handle:new() 426 | end 427 | 428 | ---@return integer count 429 | function GetSubfixtureCount() 430 | return 0 431 | end 432 | 433 | ---@param shortKeyword string 434 | ---@return string|nil tokenName 435 | function GetTokenName(shortKeyword) 436 | return "" 437 | end 438 | 439 | ---@param index string 440 | ---@return string|nil tokenName 441 | function GetTokenNameByIndex(index) 442 | return "" 443 | end 444 | 445 | ---@return Handle|nil modalHandle 446 | function GetTopModal() 447 | return Handle:new() 448 | end 449 | 450 | ---@return Handle|nil overlayHandle 451 | function GetTopOverlay() 452 | return Handle:new() 453 | end 454 | 455 | ---@return integer count 456 | function GetUIChannelCount() 457 | return 0 458 | end 459 | 460 | ---@param patchIndex integer 461 | ---@param attributeIndex integer 462 | ---@return integer index 463 | function GetUIChannelIndex(patchIndex, attributeIndex) 464 | return 0 465 | end 466 | 467 | ---@param fixtureIndexOrHandle integer|Handle 468 | ---@param returnHandles? boolean @Optional 469 | ---@return table channels 470 | function GetUIChannels(fixtureIndexOrHandle, returnHandles) 471 | return {} 472 | end 473 | 474 | ---@param displayIndex integer 475 | ---@param positionTable table 476 | ---@return Handle|nil objectHandle 477 | function GetUIObjectAtPosition(displayIndex, positionTable) 478 | return Handle:new() 479 | end 480 | 481 | ---@param variableHandle Handle 482 | ---@param varName string 483 | ---@return string|integer|number|nil value 484 | function GetVar(variableHandle, varName) 485 | return "" 486 | end 487 | 488 | ---@return Handle globalVarHandle 489 | function GlobalVars() 490 | return Handle:new() 491 | end 492 | 493 | ---@param objectHandle Handle 494 | ---@return integer handleInt 495 | function HandleToInt(objectHandle) 496 | return 0 497 | end 498 | 499 | ---@param objectHandle Handle 500 | ---@return string handleString 501 | function HandleToStr(objectHandle) 502 | return "" 503 | end 504 | 505 | ---@param functionName function 506 | ---@param objectHandle Handle 507 | ---@param pluginHandle Handle 508 | ---@param passedObjectHandle? Handle @Optional 509 | ---@return integer hookId 510 | function HookObjectChange(functionName, objectHandle, pluginHandle, passedObjectHandle) 511 | return 0 512 | end 513 | 514 | ---@return string os 515 | function HostOS() 516 | return "" 517 | end 518 | 519 | ---@return string subType 520 | function HostSubType() 521 | return "" 522 | end 523 | 524 | ---@return string type 525 | function HostType() 526 | return "" 527 | end 528 | 529 | ---@param fileName string 530 | ---@return table content 531 | function Import(fileName) 532 | return {} 533 | end 534 | 535 | ---@param progressBarHandle Handle 536 | ---@param value integer 537 | function IncProgress(progressBarHandle, value) 538 | end 539 | 540 | ---@param handleInteger integer 541 | ---@return Handle handle 542 | function IntToHandle(handleInteger) 543 | return Handle:new() 544 | end 545 | 546 | ---@param derivedClassName string 547 | ---@param baseClassName string 548 | ---@return boolean result 549 | function IsClassDerivedFrom(derivedClassName, baseClassName) 550 | return true 551 | end 552 | 553 | ---@param objectHandle Handle 554 | ---@return boolean|nil valid 555 | function IsObjectValid(objectHandle) 556 | return true 557 | end 558 | 559 | ---@return Handle keyboardHandle 560 | function KeyboardObj() 561 | return Handle:new() 562 | end 563 | 564 | ---@return Handle poolHandle 565 | function MasterPool() 566 | return Handle:new() 567 | end 568 | 569 | ---@param messageBoxSettings table 570 | ---@return table result 571 | function MessageBox(messageBoxSettings) 572 | return {} 573 | end 574 | 575 | ---@return Handle mouseHandle 576 | function MouseObj() 577 | return Handle:new() 578 | end 579 | 580 | ---@return boolean needShowSave 581 | function NeedShowSave() 582 | return true 583 | end 584 | 585 | ---@param objectListCommand string 586 | ---@param optionsTable? table @Optional 587 | ---@return table objectList 588 | function ObjectList(objectListCommand, optionsTable) 589 | return {} 590 | end 591 | 592 | ---@return Handle patchHandle 593 | function Patch() 594 | return Handle:new() 595 | end 596 | 597 | ---@param message string 598 | function Printf(message) 599 | end 600 | 601 | ---@return Handle programmerHandle 602 | function Programmer() 603 | return Handle:new() 604 | end 605 | 606 | ---@return Handle programmerPartHandle 607 | function ProgrammerPart() 608 | return Handle:new() 609 | end 610 | 611 | ---@return Handle currentPultHandle 612 | function Pult() 613 | return Handle:new() 614 | end 615 | 616 | ---@return string releaseType 617 | function ReleaseType() 618 | return "" 619 | end 620 | 621 | ---@return Handle rootHandle 622 | function Root() 623 | return Handle:new() 624 | end 625 | 626 | ---@return Handle featureHandle 627 | function SelectedFeature() 628 | return Handle:new() 629 | end 630 | 631 | ---@return Handle layoutHandle 632 | function SelectedLayout() 633 | return Handle:new() 634 | end 635 | 636 | ---@return Handle sequenceHandle 637 | function SelectedSequence() 638 | return Handle:new() 639 | end 640 | 641 | ---@return Handle timecodeHandle 642 | function SelectedTimecode() 643 | return Handle:new() 644 | end 645 | 646 | ---@return Handle timerHandle 647 | function SelectedTimer() 648 | return Handle:new() 649 | end 650 | 651 | ---@return Handle fixturesHandle 652 | function Selection() 653 | return Handle:new() 654 | end 655 | 656 | ---@return integer count 657 | function SelectionCount() 658 | return 0 659 | end 660 | 661 | ---@return integer patchIndex, integer gridX, integer gridY, integer gridZ 662 | function SelectionFirst() 663 | return 0, 0, 0, 0 664 | end 665 | 666 | ---@param fixtureIndex integer 667 | ---@return integer patchIndex, integer gridX, integer gridY, integer gridZ 668 | function SelectionNext(fixtureIndex) 669 | return 0, 0, 0, 0 670 | end 671 | 672 | ---@return string serialNumber 673 | function SerialNumber() 674 | return "" 675 | end 676 | 677 | ---@param block boolean 678 | function SetBlockInput(block) 679 | end 680 | 681 | ---@param moduleHandle Handle 682 | ---@param ledTable table 683 | function SetLED(moduleHandle, ledTable) 684 | end 685 | 686 | ---@param progressBarHandle Handle 687 | ---@param progress integer 688 | function SetProgress(progressBarHandle, progress) 689 | end 690 | 691 | ---@param progressBarHandle Handle 692 | ---@param rangeStart integer 693 | ---@param rangeEnd integer 694 | function SetProgressRange(progressBarHandle, rangeStart, rangeEnd) 695 | end 696 | 697 | ---@param progressBarHandle Handle 698 | ---@param text string 699 | function SetProgressText(progressBarHandle, text) 700 | end 701 | 702 | ---@param variableSetHandle Handle 703 | ---@param varName string 704 | ---@param value string|number 705 | ---@return boolean success 706 | function SetVar(variableSetHandle, varName, value) 707 | return true 708 | end 709 | 710 | ---@return Handle showDataHandle 711 | function ShowData() 712 | return Handle:new() 713 | end 714 | 715 | ---@return Handle settingsHandle 716 | function ShowSettings() 717 | return Handle:new() 718 | end 719 | 720 | ---@param title string 721 | ---@return Handle progressBarHandle 722 | function StartProgress(title) 723 | return Handle:new() 724 | end 725 | 726 | ---@param progressBarHandle Handle 727 | function StopProgress(progressBarHandle) 728 | end 729 | 730 | ---@param handleString string 731 | ---@return Handle handle 732 | function StrToHandle(handleString) 733 | return Handle:new() 734 | end 735 | 736 | ---@param title? string @Optional 737 | ---@param textGuide? string @Optional 738 | ---@param xPosition? string @Optional 739 | ---@param yPosition? string @Optional 740 | ---@return string textInputHandle 741 | function TextInput(title, textGuide, xPosition, yPosition) 742 | return "" 743 | end 744 | 745 | ---@return integer time 746 | function Time() 747 | return 0 748 | end 749 | 750 | ---@param timedFunction function 751 | ---@param waitSeconds integer 752 | ---@param iterations integer 753 | ---@param timerCleanup? function|nil @Optional 754 | ---@param passedObjectHandle? Handle @Optional 755 | function Timer(timedFunction, waitSeconds, iterations, timerCleanup, passedObjectHandle) 756 | end 757 | 758 | ---@param objectHandle Handle 759 | ---@param returnType? boolean @Optional 760 | ---@return string address 761 | function ToAddr(objectHandle, returnType) 762 | return "" 763 | end 764 | 765 | ---@return Handle touchObjectHandle 766 | function TouchObj() 767 | return Handle:new() 768 | end 769 | 770 | ---@param hookId integer 771 | function Unhook(hookId) 772 | end 773 | 774 | ---@param functionName function|nil 775 | ---@param targetObjectHandle Handle|nil 776 | ---@param contextObjectHandle Handle|nil 777 | ---@return integer amount 778 | function UnhookMultiple(functionName, targetObjectHandle, contextObjectHandle) 779 | return 0 780 | end 781 | 782 | ---@return Handle userVarHandle 783 | function UserVars() 784 | return Handle:new() 785 | end 786 | 787 | ---@return string textVersion, integer major, integer minor, integer streaming, integer ui 788 | function Version() 789 | return "", 0, 0, 0, 0 790 | end -------------------------------------------------------------------------------- /resources/2.2/ma3_dummy_object_free_no_doc.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | --- Ma3 API version: 2.2 3 | 4 | -- Not documented Object free definition 5 | -- ======================================== 6 | 7 | ---@param queueName string 8 | ---@return boolean success 9 | function CloseMessageQueue(queueName) 10 | return true 11 | end 12 | 13 | ---@return integer flag 14 | function ColMeasureDeviceDarkCalibrate() 15 | return 0 16 | end 17 | 18 | ---@return table values 19 | function ColMeasureDeviceDoMeasurement() 20 | return {} 21 | end 22 | 23 | ---@param sourcePath string 24 | ---@param destinationPath string 25 | ---@return boolean result 26 | function CopyFile(sourcePath, destinationPath) 27 | return true 28 | end 29 | 30 | ---@param path string 31 | ---@return boolean result 32 | function CreateDirectoryRecursive(path) 33 | return true 34 | end 35 | 36 | ---@return string devmode3d 37 | function DevMode3d() 38 | return "" 39 | end 40 | 41 | ---@param handle Handle @handle to UIGrid (or derived) 42 | ---@param cell table @{r, c} 43 | ---@return boolean 44 | function FSExtendedModeHasDots(handle, cell) 45 | return true 46 | end 47 | 48 | ---@param patch Handle 49 | ---@param startingAddress integer 50 | ---@param footprint integer 51 | ---@return integer absoluteAddress 52 | function FindBestDMXPatchAddr(patch, startingAddress, footprint) 53 | return 0 54 | end 55 | 56 | ---@param handle? Handle @Optional 57 | function FindBestFocus(handle) 58 | end 59 | 60 | ---@param backwards? boolean @Optional @default: false 61 | ---@param reason? integer @Optional @Focus::Reason, default: UserTabKey 62 | function FindNextFocus(backwards, reason) 63 | end 64 | 65 | ---@param handle Handle 66 | ---@param attribute Handle 67 | ---@return integer columnId 68 | function GetAttributeColumnId(handle, attribute) 69 | return 0 70 | end 71 | 72 | ---@param address string 73 | ---@return Handle handle 74 | function GetObject(address) 75 | return Handle:new() 76 | end 77 | 78 | ---@param uiChannelIndex integer 79 | ---@param phaserOnly boolean 80 | ---@return table 81 | function GetProgPhaser(uiChannelIndex, phaserOnly) 82 | return {} 83 | end 84 | 85 | ---@param uiChannelIndex integer 86 | ---@param step integer 87 | ---@return table 88 | function GetProgPhaserValue(uiChannelIndex, step) 89 | return {} 90 | end 91 | 92 | ---@param handle Handle 93 | ---@param propertyName string 94 | ---@return integer columnId 95 | function GetPropertyColumnId(handle, propertyName) 96 | return 0 97 | end 98 | 99 | ---@return integer wingID, boolean isExtension 100 | function GetRemoteVideoInfo() 101 | return 0, false 102 | end 103 | 104 | ---@return integer internalLineNumber 105 | function GetTextScreenLine() 106 | return 0 107 | end 108 | 109 | ---@param startingInternalLineNumber? integer @Optional 110 | ---@return integer lineCount 111 | function GetTextScreenLineCount(startingInternalLineNumber) 112 | return 0 113 | end 114 | 115 | ---@param uiChannelIndex integer|Handle 116 | ---@param attributeIndex integer|string 117 | ---@return table uiChannelDescriptor 118 | function GetUIChannel(uiChannelIndex, attributeIndex) 119 | return {} 120 | end 121 | 122 | ---@param displayIndex integer 123 | ---@param type string @'press', 'char', 'release' 124 | ---@param charOrKeycode? string @Optional 125 | ---@param shift? boolean @Optional 126 | ---@param ctrl? boolean @Optional 127 | ---@param alt? boolean @Optional 128 | ---@param numlock? boolean @Optional 129 | function Keyboard(displayIndex, type, charOrKeycode, shift, ctrl, alt, numlock) 130 | end 131 | 132 | ---@param executor Handle 133 | function LoadExecConfig(executor) 134 | end 135 | 136 | ---@param displayIndex integer 137 | ---@param type string @'press', 'move', 'release' 138 | ---@param buttonOrAbsX string|integer @'Left', 'Middle', 'Right' for 'press'/'release' or absolute X coordinate 139 | ---@param absY? integer @Optional 140 | function Mouse(displayIndex, type, buttonOrAbsX, absY) 141 | end 142 | 143 | ---@param queueName string 144 | ---@return boolean success 145 | function OpenMessageQueue(queueName) 146 | return true 147 | end 148 | 149 | ---@return Handle handle 150 | function OverallDeviceCertificate() 151 | return Handle:new() 152 | end 153 | 154 | ---@param pluginName? string @Optional 155 | ---@return Handle pluginPreferences 156 | function PluginVars(pluginName) 157 | return Handle:new() 158 | end 159 | 160 | ---@param options table 161 | ---@return integer selectedIndex, string selectedValue 162 | function PopupInput(options) 163 | return 0, "" 164 | end 165 | 166 | ---@param handle Handle 167 | ---@param changeLevelThreshold? integer @Optional 168 | ---@return boolean 169 | function PrepareWaitObjectChange(handle, changeLevelThreshold) 170 | return true 171 | end 172 | 173 | ---@param handle Handle 174 | function RefreshLibrary(handle) 175 | end 176 | 177 | ---@param ip string 178 | ---@param command string 179 | ---@return boolean success 180 | function RemoteCommand(ip, command) 181 | return true 182 | end 183 | 184 | ---@param samplingPoints table 185 | ---@return table|boolean result, string? resultText @Optional 186 | function SampleOutput(samplingPoints) 187 | return {}, "" 188 | end 189 | 190 | ---@param executor Handle 191 | function SaveExecConfig(executor) 192 | end 193 | 194 | ---@return Handle handle 195 | function SelectedDrive() 196 | return Handle:new() 197 | end 198 | 199 | ---@return integer min, integer max, integer index, integer block, integer group 200 | function SelectionComponentX() 201 | return 0, 0, 0, 0, 0 202 | end 203 | 204 | ---@return integer min, integer max, integer index, integer block, integer group 205 | function SelectionComponentY() 206 | return 0, 0, 0, 0, 0 207 | end 208 | 209 | ---@return integer min, integer max, integer index, integer block, integer group 210 | function SelectionComponentZ() 211 | return 0, 0, 0, 0, 0 212 | end 213 | 214 | ---@param context Handle 215 | function SelectionNotifyBegin(context) 216 | end 217 | 218 | ---@param context Handle 219 | function SelectionNotifyEnd(context) 220 | end 221 | 222 | ---@param objectToNotify Handle 223 | function SelectionNotifyObject(objectToNotify) 224 | end 225 | 226 | ---@param ipOrStation string 227 | ---@param channelName string 228 | ---@param data table 229 | ---@return boolean success 230 | function SendLuaMessage(ipOrStation, channelName, data) 231 | return true 232 | end 233 | 234 | ---@param colorModel string @'RGB', 'xyY', 'Lab', 'XYZ', 'HSB' 235 | ---@param tripel1 number 236 | ---@param tripel2 number 237 | ---@param tripel3 number 238 | ---@param brightness number 239 | ---@param quality number 240 | ---@param constBrightness boolean 241 | ---@return integer flag 242 | function SetColor(colorModel, tripel1, tripel2, tripel3, brightness, quality, constBrightness) 243 | return 0 244 | end 245 | 246 | ---@param uiChannelIndex integer 247 | ---@param options table 248 | function SetProgPhaser(uiChannelIndex, options) 249 | end 250 | 251 | ---@param uiChannelIndex integer 252 | ---@param step integer 253 | ---@param options table 254 | function SetProgPhaserValue(uiChannelIndex, step, options) 255 | end 256 | 257 | function SyncFS() 258 | end 259 | 260 | ---@param expectations table 261 | ---@return boolean success, string resultText 262 | function TestPlaybackOutput(expectations) 263 | return true, "" 264 | end 265 | 266 | ---@param expectations table 267 | ---@return boolean success, string resultText 268 | function TestPlaybackOutputSteps(expectations) 269 | return true, "" 270 | end 271 | 272 | ---@param displayIndex integer 273 | ---@param type string @'press', 'move', 'release' 274 | ---@param touchId integer 275 | ---@param absX integer 276 | ---@param absY integer 277 | function Touch(displayIndex, type, touchId, absX, absY) 278 | end 279 | 280 | ---@param secondsToWait? number @Optional 281 | ---@return Handle|nil modalHandle 282 | function WaitModal(secondsToWait) 283 | return nil 284 | end 285 | 286 | ---@param handle Handle @handle to UIObject 287 | ---@param secondsToWait? number @Optional 288 | ---@return boolean|nil @true on success, nil on timeout 289 | function WaitObjectDelete(handle, secondsToWait) 290 | return true 291 | end -------------------------------------------------------------------------------- /resources/2.2/ma3_dummy_object_no_doc.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | --- Ma3 API version: 2.2 3 | 4 | -- Not documented Object definition 5 | -- ======================================== 6 | 7 | ---@param class? string @Optional 8 | ---@param undo? Handle @Optional 9 | ---@return Handle childHandle 10 | function Handle:Acquire(class, undo) 11 | return Handle:new() 12 | end 13 | 14 | ---@param parent Handle 15 | ---@param role? string @Optional 16 | function Handle:AddListChildren(parent, role) 17 | end 18 | 19 | ---@param parent Handle 20 | ---@param role? string @Optional 21 | function Handle:AddListChildrenNames(parent, role) 22 | end 23 | 24 | ---@param name string 25 | ---@param value string 26 | ---@param callback function 27 | ---@param argument? any @Optional 28 | ---@param appearance? table @Optional 29 | function Handle:AddListLuaItem(name, value, callback, argument, appearance) 30 | end 31 | 32 | ---@param items table 33 | function Handle:AddListLuaItems(items) 34 | end 35 | 36 | ---@param name string 37 | ---@param value number 38 | ---@param baseHandle? Handle @Optional 39 | ---@param appearance? table @Optional 40 | function Handle:AddListNumericItem(name, value, baseHandle, appearance) 41 | end 42 | 43 | ---@param items table 44 | function Handle:AddListNumericItems(items) 45 | end 46 | 47 | ---@param targetObject Handle 48 | ---@param explicitName? string @Optional 49 | ---@param appearance? table @Optional 50 | function Handle:AddListObjectItem(targetObject, explicitName, appearance) 51 | end 52 | 53 | ---@param name string 54 | ---@param value string 55 | ---@param targetHandle Handle 56 | ---@param appearance? table @Optional 57 | function Handle:AddListPropertyItem(name, value, targetHandle, appearance) 58 | end 59 | 60 | ---@param items table 61 | function Handle:AddListPropertyItems(items) 62 | end 63 | 64 | ---@param parent Handle 65 | ---@param role? string @Optional 66 | function Handle:AddListRecursiveNames(parent, role) 67 | end 68 | 69 | ---@param name string 70 | ---@param value string 71 | ---@param appearance? table @Optional 72 | function Handle:AddListStringItem(name, value, appearance) 73 | end 74 | 75 | ---@param items table 76 | function Handle:AddListStringItems(items) 77 | end 78 | 79 | ---@param class? string @Optional 80 | ---@param undo? Handle @Optional 81 | ---@param count? integer @Optional 82 | ---@return Handle childHandle 83 | function Handle:Append(class, undo, count) 84 | return Handle:new() 85 | end 86 | 87 | ---@param changeLevelEnum string 88 | function Handle:Changed(changeLevelEnum) 89 | end 90 | 91 | function Handle:ClearList() 92 | end 93 | 94 | function Handle:ClearUIChildren() 95 | end 96 | 97 | ---@return table childHandles 98 | function Handle:CmdlineChildren() 99 | return {} 100 | end 101 | 102 | ---@param index integer 103 | ---@return Handle childHandle 104 | function Handle:CmdlinePtr(index) 105 | return Handle:new() 106 | end 107 | 108 | function Handle:CommandAt() 109 | end 110 | 111 | ---@param destHandle Handle 112 | ---@param focusSearchAllowed? boolean @Optional 113 | function Handle:CommandCall(destHandle, focusSearchAllowed) 114 | end 115 | 116 | function Handle:CommandCreateDefaults() 117 | end 118 | 119 | function Handle:CommandDelete() 120 | end 121 | 122 | function Handle:CommandStore() 123 | end 124 | 125 | ---@param otherHandle Handle 126 | ---@return boolean isEqual 127 | ---@return string whatDiffers 128 | function Handle:Compare(otherHandle) 129 | return false, "" 130 | end 131 | 132 | ---@param srcHandle Handle 133 | ---@param undo? Handle @Optional 134 | function Handle:Copy(srcHandle, undo) 135 | end 136 | 137 | ---@param childIndex integer 138 | ---@param class? string @Optional 139 | ---@param undo? Handle @Optional 140 | ---@return Handle childHandle 141 | function Handle:Create(childIndex, class, undo) 142 | return Handle:new() 143 | end 144 | 145 | ---@return Handle|nil currentChild 146 | function Handle:CurrentChild() 147 | return Handle:new() 148 | end 149 | 150 | ---@param childIndex integer 151 | ---@param undo? Handle @Optional 152 | function Handle:Delete(childIndex, undo) 153 | end 154 | 155 | ---@param cell table 156 | ---@return boolean 157 | function Handle:FSExtendedModeHasDots(cell) 158 | return false 159 | end 160 | 161 | ---@param searchName string 162 | ---@param searchClassName? string @Optional 163 | ---@return Handle foundHandle 164 | function Handle:Find(searchName, searchClassName) 165 | return Handle:new() 166 | end 167 | 168 | ---@param value string 169 | ---@return integer index 170 | function Handle:FindListItemByName(value) 171 | return 1 172 | end 173 | 174 | ---@param value string 175 | ---@return integer index 176 | function Handle:FindListItemByValueStr(value) 177 | return 1 178 | end 179 | 180 | ---@param searchClassName string 181 | ---@return Handle foundHandle 182 | function Handle:FindParent(searchClassName) 183 | return Handle:new() 184 | end 185 | 186 | ---@param searchName string 187 | ---@param searchClassName? string @Optional 188 | ---@return Handle foundHandle 189 | function Handle:FindRecursive(searchName, searchClassName) 190 | return Handle:new() 191 | end 192 | 193 | ---@param searchName string 194 | ---@return Handle foundHandle 195 | function Handle:FindWild(searchName) 196 | return Handle:new() 197 | end 198 | 199 | ---@return Handle assignedHandle 200 | function Handle:GetAssignedObj() 201 | return Handle:new() 202 | end 203 | 204 | ---@return Handle displayHandle 205 | function Handle:GetDisplay() 206 | return Handle:new() 207 | end 208 | 209 | ---@return integer displayIndex 210 | function Handle:GetDisplayIndex() 211 | return 1 212 | end 213 | 214 | ---@param camelCaseToFileName? boolean @Optional 215 | ---@return string fileName 216 | function Handle:GetExportFileName(camelCaseToFileName) 217 | return "" 218 | end 219 | 220 | ---@param lineNumber integer 221 | ---@return string lineContent 222 | function Handle:GetLineAt(lineNumber) 223 | return "" 224 | end 225 | 226 | ---@return integer count 227 | function Handle:GetLineCount() 228 | return 0 229 | end 230 | 231 | ---@param index integer 232 | ---@return table appearance 233 | function Handle:GetListItemAppearance(index) 234 | return {} 235 | end 236 | 237 | ---@param index integer 238 | ---@return Handle|nil buttonHandle 239 | function Handle:GetListItemButton(index) 240 | return Handle:new() 241 | end 242 | 243 | ---@param index integer 244 | ---@return string name 245 | function Handle:GetListItemName(index) 246 | return "" 247 | end 248 | 249 | ---@param index integer 250 | ---@return integer value 251 | function Handle:GetListItemValueI64(index) 252 | return 0 253 | end 254 | 255 | ---@param index integer 256 | ---@return string value 257 | function Handle:GetListItemValueStr(index) 258 | return "" 259 | end 260 | 261 | ---@return integer count 262 | function Handle:GetListItemsCount() 263 | return 0 264 | end 265 | 266 | ---@return integer index 267 | function Handle:GetListSelectedItemIndex() 268 | return 1 269 | end 270 | 271 | ---@return Handle overlayHandle 272 | function Handle:GetOverlay() 273 | return Handle:new() 274 | end 275 | 276 | ---@return Handle screenHandle 277 | function Handle:GetScreen() 278 | return Handle:new() 279 | end 280 | 281 | ---@param index integer 282 | ---@return Handle uiObjectHandle 283 | function Handle:GetUIChild(index) 284 | return Handle:new() 285 | end 286 | 287 | ---@return integer count 288 | function Handle:GetUIChildrenCount() 289 | return 0 290 | end 291 | 292 | ---@param cell table 293 | ---@return boolean exists 294 | function Handle:GridCellExists(cell) 295 | return false 296 | end 297 | 298 | ---@return Handle gridBaseHandle 299 | function Handle:GridGetBase() 300 | return Handle:new() 301 | end 302 | 303 | ---@param cell table 304 | ---@return table cellData 305 | function Handle:GridGetCellData(cell) 306 | return {} 307 | end 308 | 309 | ---@param cell table 310 | ---@return table dimensions 311 | function Handle:GridGetCellDimensions(cell) 312 | return {} 313 | end 314 | 315 | ---@return Handle gridDataHandle 316 | function Handle:GridGetData() 317 | return Handle:new() 318 | end 319 | 320 | ---@return table dimensions 321 | function Handle:GridGetDimensions() 322 | return {} 323 | end 324 | 325 | ---@param rowId integer 326 | ---@return integer|nil parentRowId 327 | function Handle:GridGetParentRowId(rowId) 328 | return 0 329 | end 330 | 331 | ---@return table cell 332 | function Handle:GridGetScrollCell() 333 | return {} 334 | end 335 | 336 | ---@return table offset 337 | function Handle:GridGetScrollOffset() 338 | return {} 339 | end 340 | 341 | ---@return table selectedCells 342 | function Handle:GridGetSelectedCells() 343 | return {} 344 | end 345 | 346 | ---@return Handle gridSelectionHandle 347 | function Handle:GridGetSelection() 348 | return Handle:new() 349 | end 350 | 351 | ---@return Handle gridSettingsHandle 352 | function Handle:GridGetSettings() 353 | return Handle:new() 354 | end 355 | 356 | ---@param cell table 357 | ---@return boolean isReadOnly 358 | function Handle:GridIsCellReadOnly(cell) 359 | return false 360 | end 361 | 362 | ---@param cell table 363 | ---@return boolean isVisible 364 | function Handle:GridIsCellVisible(cell) 365 | return false 366 | end 367 | 368 | ---@param x integer 369 | ---@param y integer 370 | function Handle:GridMoveSelection(x, y) 371 | end 372 | 373 | ---@param cell table 374 | function Handle:GridScrollCellIntoView(cell) 375 | end 376 | 377 | ---@param columnId integer 378 | ---@param size integer 379 | function Handle:GridSetColumnSize(columnId, size) 380 | end 381 | 382 | ---@param columnId integer 383 | ---@return integer|nil columnIndex 384 | function Handle:GridsGetColumnById(columnId) 385 | return 0 386 | end 387 | 388 | ---@return table|nil cell 389 | function Handle:GridsGetExpandHeaderCell() 390 | return {} 391 | end 392 | 393 | ---@return boolean|nil state 394 | function Handle:GridsGetExpandHeaderCellState() 395 | return false 396 | end 397 | 398 | ---@param cell table 399 | ---@return integer|nil width 400 | function Handle:GridsGetLevelButtonWidth(cell) 401 | return 0 402 | end 403 | 404 | ---@param rowId integer 405 | ---@return integer|nil rowIndex 406 | function Handle:GridsGetRowById(rowId) 407 | return 0 408 | end 409 | 410 | ---@return boolean hasDependencies 411 | function Handle:HasDependencies() 412 | return false 413 | end 414 | 415 | ---@return boolean hasEditSettingUI 416 | function Handle:HasEditSettingUI() 417 | return false 418 | end 419 | 420 | ---@return boolean hasEditUI 421 | function Handle:HasEditUI() 422 | return false 423 | end 424 | 425 | ---@param objectToCheck Handle 426 | function Handle:HasParent(objectToCheck) 427 | end 428 | 429 | ---@return boolean hasReferences 430 | function Handle:HasReferences() 431 | return false 432 | end 433 | 434 | ---@param callback function 435 | ---@param argument? any @Optional 436 | ---@return boolean|nil success 437 | function Handle:HookDelete(callback, argument) 438 | return true 439 | end 440 | 441 | ---@return integer index 442 | function Handle:Index() 443 | return 0 444 | end 445 | 446 | ---@param functionName string 447 | ---@return any result 448 | function Handle:InputCallFunction(functionName) 449 | return nil 450 | end 451 | 452 | ---@param functionName string 453 | ---@return boolean|nil hasFunction 454 | function Handle:InputHasFunction(functionName) 455 | return true 456 | end 457 | 458 | function Handle:InputRun() 459 | end 460 | 461 | ---@param parameterName string 462 | ---@param parameterValue string 463 | function Handle:InputSetAdditionalParameter(parameterName, parameterValue) 464 | end 465 | 466 | ---@param nameValue string 467 | function Handle:InputSetEditTitle(nameValue) 468 | end 469 | 470 | ---@param length integer 471 | function Handle:InputSetMaxLength(length) 472 | end 473 | 474 | ---@param nameValue string 475 | function Handle:InputSetTitle(nameValue) 476 | end 477 | 478 | ---@param value string 479 | function Handle:InputSetValue(value) 480 | end 481 | 482 | ---@param childIndex integer 483 | ---@param class? string @Optional 484 | ---@param undo? Handle @Optional 485 | ---@param count? integer @Optional 486 | ---@return Handle childHandle 487 | function Handle:Insert(childIndex, class, undo, count) 488 | return Handle:new() 489 | end 490 | 491 | ---@return boolean isClass 492 | function Handle:IsClass() 493 | return false 494 | end 495 | 496 | ---@return boolean isEmpty 497 | function Handle:IsEmpty() 498 | return false 499 | end 500 | 501 | ---@return boolean isEnabled 502 | function Handle:IsEnabled() 503 | return false 504 | end 505 | 506 | ---@param index integer 507 | function Handle:IsListItemEmpty(index) 508 | end 509 | 510 | ---@param index integer 511 | function Handle:IsListItemEnabled(index) 512 | end 513 | 514 | ---@return boolean isLocked 515 | function Handle:IsLocked() 516 | return false 517 | end 518 | 519 | ---@return boolean isValid 520 | function Handle:IsValid() 521 | return false 522 | end 523 | 524 | ---@return boolean isVisible 525 | function Handle:IsVisible() 526 | return false 527 | end 528 | 529 | ---@param filePath string 530 | ---@param fileName string 531 | ---@return boolean success 532 | function Handle:Load(filePath, fileName) 533 | return false 534 | end 535 | 536 | ---@return integer maxCount 537 | function Handle:MaxCount() 538 | return 0 539 | end 540 | 541 | ---@param callbackName string 542 | ---@param ctx? any @Optional 543 | function Handle:OverlaySetCloseCallback(callbackName, ctx) 544 | end 545 | 546 | ---@return Handle parentHandle 547 | function Handle:Parent() 548 | return Handle:new() 549 | end 550 | 551 | function Handle:PrepareAccess() 552 | end 553 | 554 | ---@return integer propertyCount 555 | function Handle:PropertyCount() 556 | return 0 557 | end 558 | 559 | ---@param propertyIndex integer 560 | ---@return table propertyInfo 561 | function Handle:PropertyInfo(propertyIndex) 562 | return {} 563 | end 564 | 565 | ---@param propertyIndex integer 566 | ---@return string propertyName 567 | function Handle:PropertyName(propertyIndex) 568 | return "" 569 | end 570 | 571 | ---@param propertyIndex integer 572 | ---@return string propertyType 573 | function Handle:PropertyType(propertyIndex) 574 | return "" 575 | end 576 | 577 | ---@param childIndex integer 578 | ---@param undo? Handle @Optional 579 | function Handle:Remove(childIndex, undo) 580 | end 581 | 582 | ---@param name string 583 | function Handle:RemoveListItem(name) 584 | end 585 | 586 | ---@param size integer 587 | function Handle:Resize(size) 588 | end 589 | 590 | ---@param filePath string 591 | ---@param fileName string 592 | ---@return boolean success 593 | function Handle:Save(filePath, fileName) 594 | return false 595 | end 596 | 597 | ---@param scrollType integer 598 | ---@param scrollEntity integer 599 | ---@param valueType integer 600 | ---@param value number 601 | ---@param updateOpposite boolean 602 | ---@return boolean success 603 | function Handle:ScrollDo(scrollType, scrollEntity, valueType, value, updateOpposite) 604 | return false 605 | end 606 | 607 | ---@param scrollType integer 608 | ---@return table|nil scrollInfo 609 | function Handle:ScrollGetInfo(scrollType) 610 | return {} 611 | end 612 | 613 | ---@param scrollType integer 614 | ---@param offset integer 615 | ---@return integer itemIndex 616 | function Handle:ScrollGetItemByOffset(scrollType, offset) 617 | return 1 618 | end 619 | 620 | ---@param scrollType integer 621 | ---@param itemIdx integer 622 | ---@return integer|nil offset 623 | function Handle:ScrollGetItemOffset(scrollType, itemIdx) 624 | return 0 625 | end 626 | 627 | ---@param scrollType integer 628 | ---@param itemIdx integer 629 | ---@return integer|nil size 630 | function Handle:ScrollGetItemSize(scrollType, itemIdx) 631 | return 0 632 | end 633 | 634 | ---@param scrollType integer 635 | ---@return boolean isNeeded 636 | function Handle:ScrollIsNeeded(scrollType) 637 | return false 638 | end 639 | 640 | ---@param index integer 641 | function Handle:SelectListItemByIndex(index) 642 | end 643 | 644 | ---@param nameValue string 645 | function Handle:SelectListItemByName(nameValue) 646 | end 647 | 648 | ---@param value string 649 | function Handle:SelectListItemByValue(value) 650 | end 651 | 652 | ---@param propertyName string 653 | ---@param propertyValue string 654 | ---@param overrideChangeLevel? integer @Optional 655 | function Handle:Set(propertyName, propertyValue, overrideChangeLevel) 656 | end 657 | 658 | ---@param propertyName string 659 | ---@param propertyValue string 660 | ---@param recursive? boolean @Optional 661 | function Handle:SetChildren(propertyName, propertyValue, recursive) 662 | end 663 | 664 | ---@param propertyName string 665 | ---@param propertyValue string 666 | ---@param recursive? boolean @Optional 667 | function Handle:SetChildrenRecursive(propertyName, propertyValue, recursive) 668 | end 669 | 670 | ---@param topicName string 671 | function Handle:SetContextSensHelpLink(topicName) 672 | end 673 | 674 | ---@param index integer 675 | ---@param empty? boolean @Optional 676 | function Handle:SetEmptyListItem(index, empty) 677 | end 678 | 679 | ---@param index integer 680 | ---@param enable? boolean @Optional 681 | function Handle:SetEnabledListItem(index, enable) 682 | end 683 | 684 | ---@param index integer 685 | ---@param appearance table 686 | function Handle:SetListItemAppearance(index, appearance) 687 | end 688 | 689 | ---@param index integer 690 | ---@param name string 691 | function Handle:SetListItemName(index, name) 692 | end 693 | 694 | ---@param index integer 695 | ---@param value string 696 | function Handle:SetListItemValueStr(index, value) 697 | end 698 | 699 | ---@param x integer 700 | ---@param y integer 701 | function Handle:SetPositionHint(x, y) 702 | end 703 | 704 | ---@param callback function 705 | function Handle:ShowModal(callback) 706 | end 707 | 708 | ---@return table childHandles 709 | function Handle:UIChildren() 710 | return {} 711 | end 712 | 713 | ---@param index integer 714 | ---@return integer x 715 | function Handle:UILGGetColumnAbsXLeft(index) 716 | return 0 717 | end 718 | 719 | ---@param index integer 720 | ---@return integer x 721 | function Handle:UILGGetColumnAbsXRight(index) 722 | return 0 723 | end 724 | 725 | ---@param index integer 726 | ---@return integer size 727 | function Handle:UILGGetColumnWidth(index) 728 | return 0 729 | end 730 | 731 | ---@param index integer 732 | ---@return integer y 733 | function Handle:UILGGetRowAbsYBottom(index) 734 | return 0 735 | end 736 | 737 | ---@param index integer 738 | ---@return integer y 739 | function Handle:UILGGetRowAbsYTop(index) 740 | return 0 741 | end 742 | 743 | ---@param index integer 744 | ---@return integer size 745 | function Handle:UILGGetRowHeight(index) 746 | return 0 747 | end 748 | 749 | ---@param expectedChildren integer 750 | ---@param secondsToWait? number @Optional 751 | ---@return boolean success 752 | function Handle:WaitChildren(expectedChildren, secondsToWait) 753 | return false 754 | end 755 | 756 | ---@param secondsToWait? number @Optional 757 | ---@param forceReInit? boolean @Optional 758 | ---@return boolean success 759 | function Handle:WaitInit(secondsToWait, forceReInit) 760 | return false 761 | end -------------------------------------------------------------------------------- /resources/2.2/ma3_object_free_no_doc.json: -------------------------------------------------------------------------------- 1 | { 2 | "_Ma3_API_Version": "2.2", 3 | "CloseMessageQueue": { 4 | "prefix": "CloseMessageQueue(queueName)", 5 | "body": [ 6 | "CloseMessageQueue(${1:queueName})" 7 | ], 8 | "code": "CloseMessageQueue(string:queue name): boolean:success" 9 | }, 10 | "ColMeasureDeviceDarkCalibrate": { 11 | "prefix": "ColMeasureDeviceDarkCalibrate()", 12 | "body": [ 13 | "ColMeasureDeviceDarkCalibrate()" 14 | ], 15 | "code": "ColMeasureDeviceDarkCalibrate(nothing): integer:flag" 16 | }, 17 | "ColMeasureDeviceDoMeasurement": { 18 | "prefix": "ColMeasureDeviceDoMeasurement()", 19 | "body": [ 20 | "ColMeasureDeviceDoMeasurement()" 21 | ], 22 | "code": "ColMeasureDeviceDoMeasurement(nothing): table:values" 23 | }, 24 | "CopyFile": { 25 | "prefix": "CopyFile(sourcePath, destinationPath)", 26 | "body": [ 27 | "CopyFile(${1:sourcePath}, ${2:destinationPath})" 28 | ], 29 | "code": "CopyFile(string:source_path, string:destination_path): boolean:result" 30 | }, 31 | "CreateDirectoryRecursive": { 32 | "prefix": "CreateDirectoryRecursive(path)", 33 | "body": [ 34 | "CreateDirectoryRecursive(${1:path})" 35 | ], 36 | "code": "CreateDirectoryRecursive(string:path): boolean:result" 37 | }, 38 | "DevMode3d": { 39 | "prefix": "DevMode3d()", 40 | "body": [ 41 | "DevMode3d()" 42 | ], 43 | "code": "DevMode3d(nothing): string:devmode3d" 44 | }, 45 | "FSExtendedModeHasDots": { 46 | "prefix": "FSExtendedModeHasDots(handle, cell)", 47 | "body": [ 48 | "FSExtendedModeHasDots(${1:handle}, ${2:cell})" 49 | ], 50 | "code": "FSExtendedModeHasDots(light_userdata:handle to UIGrid (or derived), {r, c}:cell): boolean" 51 | }, 52 | "FindBestDMXPatchAddr": { 53 | "prefix": "FindBestDMXPatchAddr(patch, startingAddress, footprint)", 54 | "body": [ 55 | "FindBestDMXPatchAddr(${1:patch}, ${2:startingAddress}, ${3:footprint})" 56 | ], 57 | "code": "FindBestDMXPatchAddr(light_userdata:patch, integer:starting_address, integer:footprint): integer:absolute_address" 58 | }, 59 | "FindBestFocus": { 60 | "prefix": "FindBestFocus(handle)", 61 | "body": [ 62 | "FindBestFocus(${1:_handle})" 63 | ], 64 | "code": "FindBestFocus([light_userdata:handle]): nothing" 65 | }, 66 | "FindNextFocus": { 67 | "prefix": "FindNextFocus(backwards, reason)", 68 | "body": [ 69 | "FindNextFocus(${1:_backwards}, ${2:_reason})" 70 | ], 71 | "code": "FindNextFocus([bool:backwards(false)[, int(Focus::Reason):reason(UserTabKey)]]): nothing" 72 | }, 73 | "GetAttributeColumnId": { 74 | "prefix": "GetAttributeColumnId(handle, attribute)", 75 | "body": [ 76 | "GetAttributeColumnId(${1:handle}, ${2:attribute})" 77 | ], 78 | "code": "GetAttributeColumnId(light_userdata:handle, light_userdata:attribute): integer:column_id" 79 | }, 80 | "GetObject": { 81 | "prefix": "GetObject(address)", 82 | "body": [ 83 | "GetObject(${1:address})" 84 | ], 85 | "code": "GetObject(string:address): light_userdata:handle" 86 | }, 87 | "GetProgPhaser": { 88 | "prefix": "GetProgPhaser(uiChannelIndex, phaserOnly)", 89 | "body": [ 90 | "GetProgPhaser(${1:uiChannelIndex}, ${2:phaserOnly})" 91 | ], 92 | "code": "GetProgPhaser(integer:ui_channel_index, boolean:phaser_only): {['abs_preset'=light_userdata:handle], ['rel_preset'=light_userdata:handle], ['fade'=float:seconds], ['delay'=float:seconds], ['speed'=float:hz], ['phase'=float:degree], ['measure'=float:percent], ['gridpos'=integer:value], ['mask_active_phaser'=integer:bitmask], ['mask_active_value'=integer:bitmask], ['mask_individual'=integer:bitmask]}" 93 | }, 94 | "GetProgPhaserValue": { 95 | "prefix": "GetProgPhaserValue(uiChannelIndex, step)", 96 | "body": [ 97 | "GetProgPhaserValue(${1:uiChannelIndex}, ${2:step})" 98 | ], 99 | "code": "GetProgPhaserValue(integer:ui_channel_index, integer:step): {['channel_function'=integer:value], ['absolute'=number:percent], ['absolute_value'=number:value], ['relative'=number:percent]}" 100 | }, 101 | "GetPropertyColumnId": { 102 | "prefix": "GetPropertyColumnId(handle, propertyName)", 103 | "body": [ 104 | "GetPropertyColumnId(${1:handle}, ${2:propertyName})" 105 | ], 106 | "code": "GetPropertyColumnId(light_userdata:handle, string:property_name): integer:column_id" 107 | }, 108 | "GetRemoteVideoInfo": { 109 | "prefix": "GetRemoteVideoInfo()", 110 | "body": [ 111 | "GetRemoteVideoInfo()" 112 | ], 113 | "code": "GetRemoteVideoInfo(nothing): integer:wingID, boolean:isExtension" 114 | }, 115 | "GetTextScreenLine": { 116 | "prefix": "GetTextScreenLine()", 117 | "body": [ 118 | "GetTextScreenLine()" 119 | ], 120 | "code": "GetTextScreenLine(nothing): integer:internal line number" 121 | }, 122 | "GetTextScreenLineCount": { 123 | "prefix": "GetTextScreenLineCount(startingInternalLineNumber)", 124 | "body": [ 125 | "GetTextScreenLineCount(${1:_startingInternalLineNumber})" 126 | ], 127 | "code": "GetTextScreenLineCount([integer:starting internal line number]): integer:line count" 128 | }, 129 | "GetUIChannel": { 130 | "prefix": "GetUIChannel(uiChannelIndex, attributeIndex)", 131 | "body": [ 132 | "GetUIChannel(${1:uiChannelIndex}, ${2:attributeIndex})" 133 | ], 134 | "code": "GetUIChannel(integer:ui_channel_index or light_userdata: subfixture_reference, integer:attribute_index or string:attribute_name): table:ui_channel_descriptor" 135 | }, 136 | "Keyboard": { 137 | "prefix": "Keyboard(displayIndex, type, charOrKeycode, shift, ctrl, alt, numlock)", 138 | "body": [ 139 | "Keyboard(${1:displayIndex}, ${2:type}, ${3:_charOrKeycode}, ${4:_shift}, ${5:_ctrl}, ${6:_alt}, ${7:_numlock})" 140 | ], 141 | "code": "Keyboard(integer:display_index, string:type('press', 'char', 'release')[ ,string:char(for type 'char') or string:keycode, boolean:shift, boolean:ctrl, boolean:alt, boolean:numlock]): nothing" 142 | }, 143 | "LoadExecConfig": { 144 | "prefix": "LoadExecConfig(executor)", 145 | "body": [ 146 | "LoadExecConfig(${1:executor})" 147 | ], 148 | "code": "LoadExecConfig(light_userdata:executor): nothing" 149 | }, 150 | "Mouse": { 151 | "prefix": "Mouse(displayIndex, type, buttonOrAbsX, absY)", 152 | "body": [ 153 | "Mouse(${1:displayIndex}, ${2:type}, ${3:buttonOrAbsX}, ${4:_absY})" 154 | ], 155 | "code": "Mouse(integer:display_index, string:type('press', 'move', 'release')[ ,string:button('Left', 'Middle', 'Right' for 'press', 'release') or integer:abs_x, integer:abs_y)]): nothing" 156 | }, 157 | "OpenMessageQueue": { 158 | "prefix": "OpenMessageQueue(queueName)", 159 | "body": [ 160 | "OpenMessageQueue(${1:queueName})" 161 | ], 162 | "code": "OpenMessageQueue(string:queue name): boolean:success" 163 | }, 164 | "OverallDeviceCertificate": { 165 | "prefix": "OverallDeviceCertificate()", 166 | "body": [ 167 | "OverallDeviceCertificate()" 168 | ], 169 | "code": "OverallDeviceCertificate(nothing): light_userdata:handle" 170 | }, 171 | "PluginVars": { 172 | "prefix": "PluginVars(pluginName)", 173 | "body": [ 174 | "PluginVars(${1:_pluginName})" 175 | ], 176 | "code": "PluginVars([string:plugin_name]): light_userdata:plugin_preferences" 177 | }, 178 | "PopupInput": { 179 | "prefix": "PopupInput(options)", 180 | "body": [ 181 | "PopupInput(${1:options})" 182 | ], 183 | "code": "PopupInput({title:str, caller:handle, items:table, selectedValue:str, x:int, y:int, target:handle, render_options:{left_icon, number, right_icon}, useTopLeft:bool, properties:{prop:value}, add_args:{FilterSupport='Yes'/'No'}}): integer:selected_index, string:selected_value" 184 | }, 185 | "PrepareWaitObjectChange": { 186 | "prefix": "PrepareWaitObjectChange(handle, changeLevelThreshold)", 187 | "body": [ 188 | "PrepareWaitObjectChange(${1:handle}, ${2:_changeLevelThreshold})" 189 | ], 190 | "code": "PrepareWaitObjectChange(light_userdata:handle[ ,integer:change_level_threshold]): boolean:true or nothing" 191 | }, 192 | "RefreshLibrary": { 193 | "prefix": "RefreshLibrary(handle)", 194 | "body": [ 195 | "RefreshLibrary(${1:handle})" 196 | ], 197 | "code": "RefreshLibrary(light_userdata:handle): nothing" 198 | }, 199 | "RemoteCommand": { 200 | "prefix": "RemoteCommand(ip, command)", 201 | "body": [ 202 | "RemoteCommand(${1:ip}, ${2:command})" 203 | ], 204 | "code": "RemoteCommand(string:ip, string:command): boolean:success" 205 | }, 206 | "SampleOutput": { 207 | "prefix": "SampleOutput(samplingPoints)", 208 | "body": [ 209 | "SampleOutput(${1:_samplingPoints})" 210 | ], 211 | "code": "SampleOutput(table:sampling points): table with results | boolean:false, string:result text" 212 | }, 213 | "SaveExecConfig": { 214 | "prefix": "SaveExecConfig(executor)", 215 | "body": [ 216 | "SaveExecConfig(${1:executor})" 217 | ], 218 | "code": "SaveExecConfig(light_userdata:executor): nothing" 219 | }, 220 | "SelectedDrive": { 221 | "prefix": "SelectedDrive()", 222 | "body": [ 223 | "SelectedDrive()" 224 | ], 225 | "code": "SelectedDrive(nothing): light_userdata:handle" 226 | }, 227 | "SelectionComponentX": { 228 | "prefix": "SelectionComponentX()", 229 | "body": [ 230 | "SelectionComponentX()" 231 | ], 232 | "code": "SelectionComponentX(nothing): integer:min, integer:max, integer:index, integer:block, integer:group" 233 | }, 234 | "SelectionComponentY": { 235 | "prefix": "SelectionComponentY()", 236 | "body": [ 237 | "SelectionComponentY()" 238 | ], 239 | "code": "SelectionComponentY(nothing): integer:min, integer:max, integer:index, integer:block, integer:group" 240 | }, 241 | "SelectionComponentZ": { 242 | "prefix": "SelectionComponentZ()", 243 | "body": [ 244 | "SelectionComponentZ()" 245 | ], 246 | "code": "SelectionComponentZ(nothing): integer:min, integer:max, integer:index, integer:block, integer:group" 247 | }, 248 | "SelectionNotifyBegin": { 249 | "prefix": "SelectionNotifyBegin(context)", 250 | "body": [ 251 | "SelectionNotifyBegin(${1:context})" 252 | ], 253 | "code": "SelectionNotifyBegin(light_userdata:associated_context): nothing" 254 | }, 255 | "SelectionNotifyEnd": { 256 | "prefix": "SelectionNotifyEnd(context)", 257 | "body": [ 258 | "SelectionNotifyEnd(${1:context})" 259 | ], 260 | "code": "SelectionNotifyEnd(light_userdata:associated_context): nothing" 261 | }, 262 | "SelectionNotifyObject": { 263 | "prefix": "SelectionNotifyObject(objectToNotify)", 264 | "body": [ 265 | "SelectionNotifyObject(${1:objectToNotify})" 266 | ], 267 | "code": "SelectionNotifyObject(light_userdata:object_to_notify_about): nothing" 268 | }, 269 | "SendLuaMessage": { 270 | "prefix": "SendLuaMessage(ipOrStation, channelName, data)", 271 | "body": [ 272 | "SendLuaMessage(${1:ipOrStation}, ${2:channelName}, ${3:data})" 273 | ], 274 | "code": "SendLuaMessage(string:ip/station, string:channel name, table:data): boolean:success" 275 | }, 276 | "SetColor": { 277 | "prefix": "SetColor(colorModel, tripel1, tripel2, tripel3, brightness, quality, constBrightness)", 278 | "body": [ 279 | "SetColor(${1:colorModel}, ${2:tripel1}, ${3:tripel2}, ${4:tripel3}, ${5:brightness}, ${6:quality}, ${7:constBrightness})" 280 | ], 281 | "code": "SetColor(string:color_model('RGB', 'xyY', 'Lab', 'XYZ', 'HSB'), float:tripel1, float:tripel2, float:tripel3, float:brightness, float:quality, boolean:const_brightness): integer:flag" 282 | }, 283 | "SetProgPhaser": { 284 | "prefix": "SetProgPhaser(uiChannelIndex, options)", 285 | "body": [ 286 | "SetProgPhaser(${1:uiChannelIndex}, ${2:options})" 287 | ], 288 | "code": "SetProgPhaser(integer:ui_channel_index, {['abs_preset'=light_userdata:handle], ['rel_preset'=light_userdata:handle], ['fade'=number:seconds], ['delay'=number:seconds], ['speed'=number:hz], ['phase'=number:degree], ['measure'=number:percent], ['gridpos'=integer:value], {['channel_function'=integer:value], ['absolute'=number:percent], ['absolute_value'=integer:value], ['relative'=number:percent], ['accel'=number:percent[, 'accel_type'=integer:enum_value(Enums.SplineType)]], ['decel'=number:percent[, 'decel_type'=integer:enum_value(Enums.SplineType)]], ['trans'=number:percent], ['width'=number:percent], ['integrated'=light_userdata:preset_handle]}}): nothing" 289 | }, 290 | "SetProgPhaserValue": { 291 | "prefix": "SetProgPhaserValue(uiChannelIndex, step, options)", 292 | "body": [ 293 | "SetProgPhaserValue(${1:uiChannelIndex}, ${2:step}, ${3:options})" 294 | ], 295 | "code": "SetProgPhaserValue(integer:ui_channel_index, integer:step, {['channel_function'=integer:value], ['absolute'=number:percent], ['absolute_value'=integer:value], ['relative'=number:percent], ['accel'=number:percent[, 'accel_type'=integer:enum_value(Enums.SplineType)]], ['decel'=number:percent[, 'decel_type'=integer:enum_value(Enums.SplineType)]], ['trans'=number:percent], ['width'=number:percent], ['integrated'=light_userdata:preset_handle]}): nothing" 296 | }, 297 | "SyncFS": { 298 | "prefix": "SyncFS()", 299 | "body": [ 300 | "SyncFS()" 301 | ], 302 | "code": "SyncFS(nothing): nothing" 303 | }, 304 | "TestPlaybackOutput": { 305 | "prefix": "TestPlaybackOutput(expectations)", 306 | "body": [ 307 | "TestPlaybackOutput(${1:expectations})" 308 | ], 309 | "code": "TestPlaybackOutput(table:expectations): boolean:success, string:result text" 310 | }, 311 | "TestPlaybackOutputSteps": { 312 | "prefix": "TestPlaybackOutputSteps(expectations)", 313 | "body": [ 314 | "TestPlaybackOutputSteps(${1:expectations})" 315 | ], 316 | "code": "TestPlaybackOutputSteps(table:expectations): boolean:success, string:result text" 317 | }, 318 | "Touch": { 319 | "prefix": "Touch(displayIndex, type, touchId, absX, absY)", 320 | "body": [ 321 | "Touch(${1:displayIndex}, ${2:type}, ${3:touchId}, ${4:absX}, ${5:absY})" 322 | ], 323 | "code": "Touch(integer:display_index, string:type('press', 'move', 'release'), integer:touch_id, integer:abs_x, integer:abs_y): nothing" 324 | }, 325 | "WaitModal": { 326 | "prefix": "WaitModal(secondsToWait)", 327 | "body": [ 328 | "WaitModal(${1:_secondsToWait]})" 329 | ], 330 | "code": "WaitModal([number:seconds to wait]): handle to modal overlay or nil on failure(timeout)" 331 | }, 332 | "WaitObjectDelete": { 333 | "prefix": "WaitObjectDelete(handle, secondsToWait)", 334 | "body": [ 335 | "WaitObjectDelete(${1:handle}, ${2:_secondsToWait})" 336 | ], 337 | "code": "WaitObjectDelete(light_userdata:handle to UIObject[, number:seconds to wait]): boolean:true on success, nil on timeout" 338 | } 339 | } -------------------------------------------------------------------------------- /src/extension.js: -------------------------------------------------------------------------------- 1 | const vscode = require('vscode'); 2 | const path = require('path'); 3 | const fs = require('fs'); 4 | 5 | const API_VERSION_CONFIG_KEY = 'apiVersion'; 6 | const EXTENSION_ENABLED_CONFIG_KEY = 'extensionEnabled'; 7 | 8 | const extensionState = { 9 | hoverProviders: [], 10 | completionProviders: [] 11 | }; 12 | 13 | 14 | function activate(context) { 15 | const configuration = vscode.workspace.getConfiguration('grandMa3'); 16 | const isExtensionEnabled = configuration.get(EXTENSION_ENABLED_CONFIG_KEY, true); 17 | 18 | 19 | if (!extensionState.statusBarItem) { 20 | extensionState.statusBarItem = createApiVersionStatusBarItem(); 21 | createMenu(context); 22 | } 23 | extensionState.statusBarItem.show(); 24 | 25 | if (!isExtensionEnabled) { 26 | extensionState.statusBarItem.text = `GrandMa 3 API: Off`; 27 | return; 28 | } 29 | 30 | const currentApiVersion = getCurrentApiVersion(context); 31 | extensionState.statusBarItem.text = `GrandMa 3 API: ${currentApiVersion}`; 32 | 33 | configureWorkspace(context, currentApiVersion); 34 | loadApiFiles(context, currentApiVersion); 35 | } 36 | 37 | function createMenu(context){ 38 | context.subscriptions.push(extensionState.statusBarItem); 39 | 40 | const changeApiVersionCommand = vscode.commands.registerCommand('grandMa3.menu', async () => { 41 | const configuration = vscode.workspace.getConfiguration('grandMa3'); 42 | const isExtensionEnabled = configuration.get(EXTENSION_ENABLED_CONFIG_KEY, true); 43 | 44 | const selection = isExtensionEnabled ? await vscode.window.showQuickPick( 45 | [ 46 | { label: 'Select GrandMa 3 API version' }, 47 | { label: 'Disable extension for this project' }, 48 | { label: 'Restart extension' } 49 | ], 50 | { 51 | title: 'GrandMa 3 API Menu', 52 | placeHolder: 'Choose an action' 53 | } 54 | ) 55 | : await vscode.window.showQuickPick( 56 | [ 57 | { label: 'Enable extension for this project' }, 58 | ], 59 | { 60 | title: 'GrandMa 3 API Menu', 61 | placeHolder: 'Choose an action' 62 | } 63 | ); 64 | 65 | if (!selection) return; 66 | 67 | switch(selection.label) { 68 | case 'Restart extension': 69 | const currentApiVersion = getCurrentApiVersion(context); 70 | configureWorkspace(context, currentApiVersion); 71 | loadApiFiles(context, currentApiVersion); 72 | restartLuaServer(); 73 | vscode.window.showInformationMessage(`GrandMa 3 extension restarted`); 74 | break; 75 | 76 | case 'Select GrandMa 3 API version': 77 | await showApiVersionQuickPick(context); 78 | break; 79 | 80 | case 'Disable extension for this project': 81 | await toggleExtension(context, false); 82 | break; 83 | 84 | case 'Enable extension for this project': 85 | await toggleExtension(context, true); 86 | break; 87 | } 88 | }); 89 | context.subscriptions.push(changeApiVersionCommand); 90 | } 91 | 92 | async function toggleExtension(context, enable) { 93 | const configuration = vscode.workspace.getConfiguration('grandMa3'); 94 | await configuration.update(EXTENSION_ENABLED_CONFIG_KEY, enable, vscode.ConfigurationTarget.Workspace); 95 | 96 | const luaConfig = vscode.workspace.getConfiguration('Lua'); 97 | 98 | if (enable) { 99 | const currentApiVersion = getCurrentApiVersion(context); 100 | extensionState.statusBarItem.text = `GrandMa 3 API: ${currentApiVersion}`; 101 | configureWorkspace(context, currentApiVersion); 102 | loadApiFiles(context, currentApiVersion); 103 | vscode.window.showInformationMessage('GrandMa 3 extension enabled for this workspace'); 104 | } else { 105 | deactivate() 106 | extensionState.statusBarItem.text = `GrandMa 3 API: Off`; 107 | await luaConfig.update('workspace.library', [], vscode.ConfigurationTarget.Workspace); 108 | vscode.window.showInformationMessage('GrandMa 3 extension disabled for this workspace'); 109 | } 110 | 111 | restartLuaServer(); 112 | } 113 | 114 | function createApiVersionStatusBarItem() { 115 | const statusBarItem = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Right, 100); 116 | statusBarItem.command = 'grandMa3.menu'; 117 | statusBarItem.show(); 118 | return statusBarItem; 119 | } 120 | 121 | function getCurrentApiVersion(context) { 122 | const configuration = vscode.workspace.getConfiguration('grandMa3'); 123 | const availableVersions = getAvailableApiVersions(context); 124 | 125 | const configuredVersion = configuration.get(API_VERSION_CONFIG_KEY); 126 | 127 | return availableVersions.includes(configuredVersion) 128 | ? configuredVersion 129 | : availableVersions[0]; 130 | } 131 | 132 | function getAvailableApiVersions(context) { 133 | const resourcePath = path.join(context.extensionPath, 'resources'); 134 | return fs.readdirSync(resourcePath) 135 | .filter(file => fs.statSync(path.join(resourcePath, file)).isDirectory()) 136 | .sort((a, b) => b.localeCompare(a)); 137 | } 138 | 139 | async function showApiVersionQuickPick(context) { 140 | const availableVersions = getAvailableApiVersions(context); 141 | const currentVersion = getCurrentApiVersion(context); 142 | 143 | const selection = await vscode.window.showQuickPick( 144 | availableVersions.map(version => ({ 145 | label: version, 146 | description: version === currentVersion ? 'Current Version' : '' 147 | })), 148 | { 149 | title: 'Select GrandMa 3 API Version', 150 | placeHolder: 'Choose API Version' 151 | } 152 | ); 153 | 154 | if (selection && selection.label != currentVersion) { 155 | const configuration = vscode.workspace.getConfiguration('grandMa3'); 156 | await configuration.update(API_VERSION_CONFIG_KEY, selection.label, vscode.ConfigurationTarget.Workspace); 157 | 158 | extensionState.statusBarItem.text = `GrandMa 3 API: ${selection.label}`; 159 | 160 | configureWorkspace(context, selection.label); 161 | loadApiFiles(context, selection.label); 162 | 163 | restartLuaServer(); 164 | vscode.window.showInformationMessage(`GrandMa 3 API version changed to ${selection.label}`); 165 | } 166 | } 167 | 168 | async function restartLuaServer() { 169 | try { 170 | await vscode.commands.executeCommand('lua.stopServer'); 171 | await vscode.commands.executeCommand('lua.startServer'); 172 | } catch (error) { 173 | console.error('Failed to restart Lua server:', error); 174 | } 175 | } 176 | 177 | function loadApiFiles(context, version) { 178 | if (extensionState.hoverProviders) { 179 | extensionState.hoverProviders.forEach(provider => provider.dispose()); 180 | extensionState.hoverProviders.length = 0; 181 | } 182 | 183 | if (extensionState.completionProviders) { 184 | extensionState.completionProviders.forEach(provider => provider.dispose()); 185 | extensionState.completionProviders.length = 0; 186 | } 187 | 188 | const objectFreeFilePath = getObjectFreeFilePath(context, version); 189 | const objectFilePath = getObjectFilePath(context, version); 190 | const objectFreeNoDocFilePath = getObjectFreeNoDocFilePath(context, version); 191 | const objectNoDocFilePath = getObjectNoDocFilePath(context, version); 192 | 193 | fs.readFile(objectFreeFilePath, 'utf8', (err, data) => { 194 | if (err) { 195 | console.error('Error reading object free Api file:', err); 196 | return; 197 | } 198 | 199 | addFunctionsHover(context, data); 200 | addFunctionsCompletion(context, data); 201 | }); 202 | 203 | fs.readFile(objectFilePath, 'utf8', (err, data) => { 204 | if (err) { 205 | console.error('Error reading object Api file:', err); 206 | return; 207 | } 208 | 209 | addFunctionsHover(context, data, "Handle"); 210 | addObjectFunctionsCompletion(context, data); 211 | }); 212 | 213 | fs.readFile(objectFreeNoDocFilePath, 'utf8', (err, data) => { 214 | if (err) { 215 | console.error('Error reading object free Api file:', err); 216 | return; 217 | } 218 | 219 | addFunctionsNoDocHover(context, data); 220 | addFunctionsCompletion(context, data); 221 | }); 222 | 223 | fs.readFile(objectNoDocFilePath, 'utf8', (err, data) => { 224 | if (err) { 225 | console.error('Error reading object Api file:', err); 226 | return; 227 | } 228 | 229 | addFunctionsNoDocHover(context, data, "Handle"); 230 | addObjectFunctionsCompletion(context, data); 231 | }); 232 | } 233 | 234 | function configureWorkspace(context, version){ 235 | importDummyFunctions(context, version); 236 | addFunctionNamesToCSpell(context, version); 237 | } 238 | 239 | async function importDummyFunctions(context, version){ 240 | const luaConfig = vscode.workspace.getConfiguration('Lua'); 241 | 242 | await luaConfig.update('workspace.library', [ 243 | context.asAbsolutePath(path.join('resources', version)) 244 | ], vscode.ConfigurationTarget.Workspace); 245 | 246 | await luaConfig.update('diagnostics.disable', ['undefined-field'], vscode.ConfigurationTarget.Workspace); 247 | } 248 | 249 | async function addFunctionNamesToCSpell(context, version) { 250 | const objectFreeApiPath = getObjectFreeFilePath(context, version); 251 | const objectFreeApiData = JSON.parse(fs.readFileSync(objectFreeApiPath, 'utf8')); 252 | const functionNames = Object.keys(objectFreeApiData); 253 | 254 | const cspellUserConfig = vscode.workspace.getConfiguration('cSpell', undefined); 255 | 256 | let words = cspellUserConfig.get('userWords') || []; 257 | if (!Array.isArray(words)) { 258 | words = []; 259 | } 260 | 261 | const newWords = functionNames.filter(word => !words.includes(word)); 262 | if (newWords.length > 0) { 263 | words = [...words, ...newWords]; 264 | await cspellUserConfig.update('userWords', words, vscode.ConfigurationTarget.Global); 265 | } 266 | } 267 | 268 | function addFunctionsHover(context, data, className){ 269 | const jsonData = JSON.parse(data); 270 | var jsonKeys = Object.keys(jsonData).filter(key => !key.includes('_')); 271 | jsonKeys = processJsonKeys(jsonKeys, className); 272 | 273 | const hoverProvider = vscode.languages.registerHoverProvider('lua', { 274 | provideHover(document, position, token) { 275 | const range = document.getWordRangeAtPosition(position); 276 | if (!range) return; 277 | 278 | const lineText = document.lineAt(position).text; 279 | const linePrefix = lineText.slice(0, position.character); 280 | 281 | if (linePrefix.trim().startsWith('--')) { 282 | return []; 283 | } 284 | 285 | if (className != null) { 286 | const cleanPrefix = linePrefix.trim(); 287 | const lastColon = cleanPrefix.lastIndexOf(':'); 288 | 289 | if (lastColon === -1) { 290 | return []; 291 | } 292 | } else { 293 | const cleanPrefix = linePrefix.trim(); 294 | 295 | const lastColon = cleanPrefix.lastIndexOf(':'); 296 | const lastDot = cleanPrefix.lastIndexOf('.'); 297 | const lastSpace = cleanPrefix.lastIndexOf(' '); 298 | 299 | if (lastColon > lastDot && lastColon > lastSpace) { 300 | return []; 301 | } 302 | } 303 | 304 | const snippetKey = document.getText(range); 305 | const markdownContent = new vscode.MarkdownString(); 306 | markdownContent.isTrusted = true; 307 | 308 | jsonDataExist = false; 309 | if(className && jsonData[className+":"+snippetKey]){ 310 | jsonDataExist = true; 311 | } else if(jsonData[snippetKey]){ 312 | jsonDataExist = true; 313 | } 314 | 315 | if (jsonKeys.includes(snippetKey) && jsonDataExist) { 316 | var snippetData = jsonData[snippetKey]; 317 | if(className){ 318 | snippetData = jsonData[className+":"+snippetKey]; 319 | } 320 | 321 | const cleanedPrefix = snippetData.prefix.replace(/\(.*?\)/g, ''); 322 | 323 | if(className){ 324 | markdownContent.appendMarkdown(`# ${className}:${cleanedPrefix}\n\n`); 325 | } else { 326 | markdownContent.appendMarkdown(`# ${cleanedPrefix}\n\n`); 327 | } 328 | markdownContent.appendMarkdown(`${snippetData.description}\n\n`); 329 | 330 | if (snippetData.examples) { 331 | const examples = snippetData.examples; 332 | const examplesCount = Object.keys(examples).length; 333 | 334 | for (const key in examples) { 335 | const example = examples[key]; 336 | if (examplesCount > 1) { 337 | markdownContent.appendMarkdown(`\n\nExample ${key}\n-------\n\n`); 338 | } else { 339 | markdownContent.appendMarkdown(`\n\nExample\n-------\n\n`); 340 | } 341 | markdownContent.appendMarkdown(example.description); 342 | markdownContent.appendCodeblock(example.code, 'lua'); 343 | markdownContent.appendMarkdown(`\n\n${example.suffix}`); 344 | } 345 | } 346 | 347 | markdownContent.appendMarkdown(`${snippetData.suffix}\n\n`); 348 | return new vscode.Hover(markdownContent); 349 | } 350 | 351 | return null; 352 | } 353 | }); 354 | 355 | context.subscriptions.push(hoverProvider); 356 | extensionState.hoverProviders.push(hoverProvider); 357 | } 358 | 359 | function addFunctionsNoDocHover(context, data, className){ 360 | const jsonData = JSON.parse(data); 361 | var jsonKeys = Object.keys(jsonData).filter(key => !key.includes('_')); 362 | jsonKeys = processJsonKeys(jsonKeys, className); 363 | 364 | const hoverProvider = vscode.languages.registerHoverProvider('lua', { 365 | provideHover(document, position, token) { 366 | const range = document.getWordRangeAtPosition(position); 367 | if (!range) return; 368 | 369 | const lineText = document.lineAt(position).text; 370 | const linePrefix = lineText.slice(0, position.character); 371 | 372 | if (linePrefix.trim().startsWith('--')) { 373 | return []; 374 | } 375 | 376 | if (className != null) { 377 | const cleanPrefix = linePrefix.trim(); 378 | const lastColon = cleanPrefix.lastIndexOf(':'); 379 | 380 | if (lastColon === -1) { 381 | return []; 382 | } 383 | } else { 384 | const cleanPrefix = linePrefix.trim(); 385 | 386 | const lastColon = cleanPrefix.lastIndexOf(':'); 387 | const lastDot = cleanPrefix.lastIndexOf('.'); 388 | const lastSpace = cleanPrefix.lastIndexOf(' '); 389 | 390 | if (lastColon > lastDot && lastColon > lastSpace) { 391 | return []; 392 | } 393 | } 394 | 395 | const snippetKey = document.getText(range); 396 | const markdownContent = new vscode.MarkdownString(); 397 | markdownContent.isTrusted = true; 398 | 399 | jsonDataExist = false; 400 | if(className && jsonData[className+":"+snippetKey]){ 401 | jsonDataExist = true; 402 | } else if(jsonData[snippetKey]){ 403 | jsonDataExist = true; 404 | } 405 | 406 | if (jsonKeys.includes(snippetKey) && jsonDataExist) { 407 | var snippetData = jsonData[snippetKey]; 408 | if(className){ 409 | snippetData = jsonData[className+":"+snippetKey]; 410 | } 411 | 412 | const cleanedPrefix = snippetData.prefix.replace(/\(.*?\)/g, ''); 413 | 414 | if(className){ 415 | markdownContent.appendMarkdown(`# ${className}:${cleanedPrefix}\n\n`); 416 | } else { 417 | markdownContent.appendMarkdown(`# ${cleanedPrefix}\n\n`); 418 | } 419 | markdownContent.appendMarkdown(`This function is not documented, this is what the 'HelpLua' command provided:\n\n`); 420 | markdownContent.appendCodeblock(snippetData.code, 'lua'); 421 | 422 | return new vscode.Hover(markdownContent); 423 | } 424 | 425 | return null; 426 | } 427 | }); 428 | 429 | context.subscriptions.push(hoverProvider); 430 | extensionState.hoverProviders.push(hoverProvider); 431 | } 432 | 433 | function processJsonKeys(jsonKeys, className) { 434 | if (!className) { 435 | return jsonKeys; 436 | } 437 | 438 | return jsonKeys.map(key => { 439 | const prefix = `${className}:`; 440 | if (key.startsWith(prefix)) { 441 | return key.slice(prefix.length); 442 | } 443 | return key; 444 | }); 445 | } 446 | 447 | function addFunctionsCompletion(context, data){ 448 | const objectFreeJson = JSON.parse(data); 449 | 450 | const snippetProvider = vscode.languages.registerCompletionItemProvider('lua', { 451 | provideCompletionItems(document, position) { 452 | const lineText = document.lineAt(position).text; 453 | const linePrefix = lineText.slice(0, position.character); 454 | 455 | if (linePrefix.trim().startsWith('--')) { 456 | return []; 457 | } 458 | 459 | const cleanPrefix = linePrefix.trim(); 460 | 461 | const lastColon = cleanPrefix.lastIndexOf(':'); 462 | const lastDot = cleanPrefix.lastIndexOf('.'); 463 | const lastSpace = cleanPrefix.lastIndexOf(' '); 464 | 465 | if (lastColon > lastDot && lastColon > lastSpace) { 466 | return []; 467 | } 468 | 469 | var suggestions = Object.entries(objectFreeJson) 470 | .filter(([funcName]) => !funcName.includes('_')) 471 | .map(([funcName, data]) => { 472 | const item = new vscode.CompletionItem(funcName, vscode.CompletionItemKind.Snippet); 473 | item.insertText = new vscode.SnippetString(data.body[0]); 474 | item.kind = vscode.CompletionItemKind.Function; 475 | item.sortText = "0"; 476 | item.label = { 477 | label: data.prefix, 478 | description: "GrandMa 3 API", 479 | }; 480 | return item; 481 | }); 482 | 483 | return suggestions; 484 | } 485 | }); 486 | context.subscriptions.push(snippetProvider); 487 | extensionState.completionProviders.push(snippetProvider); 488 | } 489 | 490 | function addObjectFunctionsCompletion(context, data){ 491 | const objectJson = JSON.parse(data); 492 | 493 | const snippetProvider = vscode.languages.registerCompletionItemProvider('lua', { 494 | provideCompletionItems(document, position) { 495 | const lineText = document.lineAt(position).text; 496 | const linePrefix = lineText.slice(0, position.character); 497 | 498 | if (linePrefix.trim().startsWith('--')) { 499 | return []; 500 | } 501 | 502 | const cleanPrefix = linePrefix.trim(); 503 | 504 | const lastColon = cleanPrefix.lastIndexOf(':'); 505 | const lastDot = cleanPrefix.lastIndexOf('.'); 506 | const lastSpace = cleanPrefix.lastIndexOf(' '); 507 | 508 | if (!(lastColon > lastDot && lastColon > lastSpace)) { 509 | return []; 510 | } 511 | 512 | var suggestions = Object.entries(objectJson) 513 | .filter(([funcName]) => funcName.startsWith('Handle:') || funcName.startsWith('Obj') && !funcName.includes('_')) 514 | .map(([funcName, data]) => { 515 | const displayName = funcName.replace('Handle:', ''); 516 | const item = new vscode.CompletionItem(displayName, vscode.CompletionItemKind.Method); 517 | item.insertText = new vscode.SnippetString(data.body[0]); 518 | item.documentation = new vscode.MarkdownString(data.description); 519 | item.kind = vscode.CompletionItemKind.Method; 520 | item.sortText = "0"; 521 | item.label = { 522 | label: data.prefix, 523 | description: "GrandMa 3 API", 524 | }; 525 | 526 | return item; 527 | }); 528 | 529 | return suggestions; 530 | } 531 | }, ':'); 532 | 533 | context.subscriptions.push(snippetProvider); 534 | extensionState.completionProviders.push(snippetProvider); 535 | } 536 | 537 | function getObjectFreeFilePath(context, version){ 538 | return normalizePath(path.join(context.extensionPath, 'resources', version, 'ma3_object_free.json')); 539 | } 540 | 541 | function getObjectFilePath(context, version){ 542 | return normalizePath(path.join(context.extensionPath, 'resources', version, 'ma3_object.json')); 543 | } 544 | 545 | function getObjectFreeNoDocFilePath(context, version){ 546 | return normalizePath(path.join(context.extensionPath, 'resources', version, 'ma3_object_free_no_doc.json')); 547 | } 548 | 549 | function getObjectNoDocFilePath(context, version){ 550 | return normalizePath(path.join(context.extensionPath, 'resources', version, 'ma3_object_no_doc.json')); 551 | } 552 | 553 | function normalizePath(filePath) { 554 | return path.resolve(filePath).toLowerCase(); 555 | } 556 | 557 | function deactivate() { 558 | if (extensionState.hoverProviders) { 559 | extensionState.hoverProviders.forEach(provider => provider.dispose()); 560 | extensionState.hoverProviders.length = 0; 561 | } 562 | 563 | if (extensionState.completionProviders) { 564 | extensionState.completionProviders.forEach(provider => provider.dispose()); 565 | extensionState.completionProviders.length = 0; 566 | } 567 | } 568 | 569 | module.exports = { 570 | activate, 571 | deactivate 572 | }; -------------------------------------------------------------------------------- /tests/test_2.1.lua: -------------------------------------------------------------------------------- 1 | local function test() 2 | 3 | -- variables declaration 4 | -- ======================================== 5 | 6 | local handle = Handle:new() 7 | local fixtureTable, name, startAddress, fixtureId, type, command, fixtureTableHandle, multiPatchAmount 8 | local undoText, message, fileName, exportData, path, textureName, objectString, addressHandle 9 | local Ma3ModuleHandle, channelIndex, attributeName, displayIndex, universeNumber, folderName, createIfNotExist 10 | local address, universe, executorNumber, screenHandle, patchIndex, attributeIndex, positionTable 11 | local basePath, rtChannelIndex, presetHandle, attribute, uiChannelIndex, phaserOnly, step, footprint 12 | local sampleType, _returnType, _backwards, _reason, _charOrKeycode, _shift, _ctrl, _alt, _numlock, _absY 13 | local variableHandle, varName, functionName, objectHandle, pluginHandle, waitSeconds, iterations, _timerCleanup 14 | local index, position, title, text, _title, _textGuide, _xPosition, _yPosition, timedFunction, startingAddress 15 | local fixtureIndex, shortKeyword,progressBarHandle, value, expectedChildren, secondsToWait, patch, options 16 | local handleInteger, derivedClassName, baseClassName, hookId, targetObjectHandle, contextObjectHandle 17 | local moduleHandle, progress, rangeTart, rangeEnd, handleString, baseLocationHandle, _forceReInit 18 | local pathTypeIndex, block, filePath, propertyName, childIndex, tokenAndIndex, settingsTable, targetObject 19 | local parent, callback, appearance, items, targetHandle, changeLevelEnum, destHandle, otherHandle, srcHandle 20 | local searchName, searchClassName, lineNumber, rowId, x, y, columnId, size, cell, valueType, updateOpposite 21 | local objectToCheck, parameterName, parameterValue, nameValue, length, callbackName, propertyIndex, scrollType 22 | local offset, itemIdx, topicName, propertyValue, scrollEntity, _optionsTable, _passedObjectHandle 23 | local executor, buttonOrAbsX, absY, pluginName, changeLevelThreshold, ip, objectListCommand, _returnHandles 24 | local context, objectToNotify, colorModel, tripel1, tripel2, tripel3, _extract, fixtureIndexOrHandle 25 | local brightness, quality, constBrightness, expectations, touchId, absX, _returnPhaserData, _duration 26 | local _baseLocationHandle, _useToAddrIndex, _returnNamesInQuotes, _roleInteger, _undoText, _filter 27 | local _class, _undo, _baseHandle, _appearance, _role, _argument, _explicitName, _count, _text, _screen 28 | local _overrideChangeLevel, _recursive, _empty, _enable, _secondsToWait, _type, _undoHandle, _handleTarget 29 | local _focusSearchAllowed, _searchClassName, _camelCaseToFileName, _ctx, dmxModeHandle, _breakIndex 30 | local _isPercent, _universe, _returnPercent, folderNameOrIndex, _createIfNotExist, _pathContentType 31 | 32 | -- Object definition 33 | -- ======================================== 34 | 35 | handle:Addr() 36 | handle:Addr(_baseLocationHandle) 37 | handle:Addr(_baseLocationHandle, _useToAddrIndex) 38 | handle:AddrNative() 39 | handle:AddrNative(baseLocationHandle) 40 | handle:AddrNative(_baseLocationHandle, _returnNamesInQuotes) 41 | 42 | handle:Children() 43 | handle:Count() 44 | 45 | handle:Dump() 46 | 47 | handle:Export(filePath, fileName) 48 | 49 | handle:Get(propertyName) 50 | handle:Get(propertyName, _roleInteger) 51 | handle:GetChildClass() 52 | handle:GetClass() 53 | handle:GetDependencies() 54 | handle:GetFader(tokenAndIndex) 55 | handle:GetFaderText(tokenAndIndex) 56 | handle:GetReferences() 57 | handle:GetUIEditor() 58 | handle:GetUISettings() 59 | 60 | handle:HasActivePlayback() 61 | 62 | handle:Import(filePath, fileName) 63 | 64 | handle:Ptr(childIndex) 65 | 66 | handle:ToAddr() 67 | 68 | -- Not documented Object definition 69 | -- ======================================== 70 | 71 | handle:Acquire() 72 | handle:Acquire(_class) 73 | handle:Acquire(_class, _undo) 74 | handle:AddListChildren(parent) 75 | handle:AddListChildren(parent, _role) 76 | handle:AddListChildrenNames(parent) 77 | handle:AddListChildrenNames(parent, _role) 78 | handle:AddListLuaItem(name, value, callback) 79 | handle:AddListLuaItem(name, value, callback, _argument) 80 | handle:AddListLuaItem(name, value, callback, _argument, _appearance) 81 | handle:AddListLuaItems(items) 82 | handle:AddListNumericItem(name, value) 83 | handle:AddListNumericItem(name, value, _baseHandle) 84 | handle:AddListNumericItem(name, value, _baseHandle, _appearance) 85 | handle:AddListNumericItems(items) 86 | handle:AddListObjectItem(targetObject) 87 | handle:AddListObjectItem(targetObject, _explicitName) 88 | handle:AddListObjectItem(targetObject, _explicitName, _appearance) 89 | handle:AddListPropertyItem(name, value, targetHandle) 90 | handle:AddListPropertyItem(name, value, targetHandle, _appearance) 91 | handle:AddListPropertyItems(items) 92 | handle:AddListRecursiveNames(parent) 93 | handle:AddListRecursiveNames(parent, _role) 94 | handle:AddListStringItem(name, value) 95 | handle:AddListStringItem(name, value, _appearance) 96 | handle:AddListStringItems(items) 97 | handle:Append() 98 | handle:Append(_class) 99 | handle:Append(_class, _undo) 100 | handle:Append(_class, _undo, _count) 101 | 102 | handle:Changed(changeLevelEnum) 103 | handle:ClearList() 104 | handle:ClearUIChildren() 105 | handle:CmdlineChildren() 106 | handle:CmdlinePtr(index) 107 | handle:CommandAt() 108 | handle:CommandCall(destHandle) 109 | handle:CommandCall(destHandle, _focusSearchAllowed) 110 | handle:CommandCreateDefaults() 111 | handle:CommandDelete() 112 | handle:CommandStore() 113 | handle:Compare(otherHandle) 114 | handle:Copy(srcHandle) 115 | handle:Copy(srcHandle, _undo) 116 | handle:Create(childIndex) 117 | handle:Create(childIndex, _class) 118 | handle:Create(childIndex, _class, _undo) 119 | handle:CurrentChild() 120 | 121 | handle:Delete(childIndex) 122 | handle:Delete(childIndex, _undo) 123 | 124 | handle:FSExtendedModeHasDots(cell) 125 | handle:Find(searchName) 126 | handle:Find(searchName, _searchClassName) 127 | handle:FindListItemByName(value) 128 | handle:FindListItemByValueStr(value) 129 | handle:FindParent(searchClassName) 130 | handle:FindRecursive(searchName) 131 | handle:FindRecursive(searchName, _searchClassName) 132 | handle:FindWild(searchName) 133 | 134 | handle:GetAssignedObj() 135 | handle:GetDisplay() 136 | handle:GetDisplayIndex() 137 | handle:GetExportFileName() 138 | handle:GetExportFileName(_camelCaseToFileName) 139 | handle:GetLineAt(lineNumber) 140 | handle:GetLineCount() 141 | handle:GetListItemAppearance(index) 142 | handle:GetListItemButton(index) 143 | handle:GetListItemName(index) 144 | handle:GetListItemValueI64(index) 145 | handle:GetListItemValueStr(index) 146 | handle:GetListItemsCount() 147 | handle:GetListSelectedItemIndex() 148 | handle:GetOverlay() 149 | handle:GetScreen() 150 | handle:GetUIChild(index) 151 | handle:GetUIChildrenCount() 152 | handle:GridCellExists(cell) 153 | handle:GridGetBase() 154 | handle:GridGetCellData(cell) 155 | handle:GridGetCellDimensions(cell) 156 | handle:GridGetData() 157 | handle:GridGetDimensions() 158 | handle:GridGetParentRowId(rowId) 159 | handle:GridGetScrollCell() 160 | handle:GridGetScrollOffset() 161 | handle:GridGetSelectedCells() 162 | handle:GridGetSelection() 163 | handle:GridGetSettings() 164 | handle:GridIsCellReadOnly(cell) 165 | handle:GridIsCellVisible(cell) 166 | handle:GridMoveSelection(x, y) 167 | handle:GridScrollCellIntoView(cell) 168 | handle:GridSetColumnSize(columnId, size) 169 | handle:GridsGetColumnById(columnId) 170 | handle:GridsGetExpandHeaderCell() 171 | handle:GridsGetExpandHeaderCellState() 172 | handle:GridsGetLevelButtonWidth(cell) 173 | handle:GridsGetRowById(rowId) 174 | 175 | handle:HasDependencies() 176 | handle:HasEditSettingUI() 177 | handle:HasEditUI() 178 | handle:HasParent(objectToCheck) 179 | handle:HasReferences() 180 | handle:HookDelete(callback) 181 | handle:HookDelete(callback, _argument) 182 | 183 | handle:Index() 184 | handle:InputCallFunction(functionName) 185 | handle:InputHasFunction(functionName) 186 | handle:InputRun() 187 | handle:InputSetAdditionalParameter(parameterName, parameterValue) 188 | handle:InputSetEditTitle(nameValue) 189 | handle:InputSetMaxLength(length) 190 | handle:InputSetTitle(nameValue) 191 | handle:InputSetValue(value) 192 | handle:Insert(childIndex) 193 | handle:Insert(childIndex, _class) 194 | handle:Insert(childIndex, _class, _undo) 195 | handle:Insert(childIndex, _class, _undo, _count) 196 | handle:IsClass() 197 | handle:IsEmpty() 198 | handle:IsEnabled() 199 | handle:IsListItemEmpty(index) 200 | handle:IsListItemEnabled(index) 201 | handle:IsLocked() 202 | handle:IsValid() 203 | handle:IsVisible() 204 | 205 | handle:Load(filePath, fileName) 206 | 207 | handle:MaxCount() 208 | 209 | handle:OverlaySetCloseCallback(callbackName) 210 | handle:OverlaySetCloseCallback(callbackName, _ctx) 211 | 212 | handle:Parent() 213 | handle:PrepareAccess() 214 | handle:PropertyCount() 215 | handle:PropertyInfo(propertyIndex) 216 | handle:PropertyName(propertyIndex) 217 | handle:PropertyType(propertyIndex) 218 | 219 | handle:Remove(childIndex) 220 | handle:Remove(childIndex, _undo) 221 | handle:RemoveListItem(name) 222 | handle:Resize(size) 223 | 224 | handle:Save(filePath, fileName) 225 | handle:ScrollDo(scrollType, scrollEntity, valueType, value, updateOpposite) 226 | handle:ScrollGetInfo(scrollType) 227 | handle:ScrollGetItemByOffset(scrollType, offset) 228 | handle:ScrollGetItemOffset(scrollType, itemIdx) 229 | handle:ScrollGetItemSize(scrollType, itemIdx) 230 | handle:ScrollIsNeeded(scrollType) 231 | handle:SelectListItemByIndex(index) 232 | handle:SelectListItemByName(nameValue) 233 | handle:SelectListItemByValue(value) 234 | handle:Set(propertyName, propertyValue) 235 | handle:Set(propertyName, propertyValue, _overrideChangeLevel) 236 | handle:SetChildren(propertyName, propertyValue) 237 | handle:SetChildren(propertyName, propertyValue, _recursive) 238 | handle:SetChildrenRecursive(propertyName, propertyValue) 239 | handle:SetChildrenRecursive(propertyName, propertyValue, _recursive) 240 | handle:SetContextSensHelpLink(topicName) 241 | handle:SetEmptyListItem(index) 242 | handle:SetEmptyListItem(index, _empty) 243 | handle:SetEnabledListItem(index) 244 | handle:SetEnabledListItem(index, _enable) 245 | handle:SetFader(settingsTable) 246 | handle:SetListItemAppearance(index, appearance) 247 | handle:SetListItemName(index, name) 248 | handle:SetListItemValueStr(index, value) 249 | handle:SetPositionHint(x, y) 250 | handle:ShowModal(callback) 251 | 252 | handle:UIChildren() 253 | handle:UILGGetColumnAbsXLeft(index) 254 | handle:UILGGetColumnAbsXRight(index) 255 | handle:UILGGetColumnWidth(index) 256 | handle:UILGGetRowAbsYBottom(index) 257 | handle:UILGGetRowAbsYTop(index) 258 | handle:UILGGetRowHeight(index) 259 | 260 | handle:WaitChildren(expectedChildren) 261 | handle:WaitChildren(expectedChildren, _secondsToWait) 262 | handle:WaitInit() 263 | handle:WaitInit(_secondsToWait) 264 | handle:WaitInit(_secondsToWait, _forceReInit) 265 | 266 | -- Object free definition 267 | -- ======================================== 268 | 269 | AddFixtures(fixtureTable) 270 | AddonVars(name) 271 | 272 | BuildDetails() 273 | 274 | CheckDMXCollision(dmxModeHandle, startAddress) 275 | CheckDMXCollision(dmxModeHandle, startAddress, _count) 276 | CheckDMXCollision(dmxModeHandle, startAddress, _count, _breakIndex) 277 | CheckFIDCollision(fixtureId) 278 | CheckFIDCollision(fixtureId, _count) 279 | CheckFIDCollision(fixtureId, _count, _type) 280 | ClassExists(name) 281 | CloseAllOverlays() 282 | CloseUndo(handle) 283 | Cmd(command) 284 | Cmd(command, _undoHandle) 285 | CmdIndirect(command) 286 | CmdIndirect(command, _undoHandle) 287 | CmdIndirect(command, _undoHandle, _handleTarget) 288 | CmdIndirectWait(command) 289 | CmdIndirectWait(command, _undoHandle) 290 | CmdIndirectWait(command, _undoHandle, _handleTarget) 291 | CmdObj() 292 | ConfigTable() 293 | Confirm(title) 294 | Confirm(title, _text) 295 | Confirm(title, _text, _screen) 296 | Confirm(title, _text, _screen, _text) 297 | CreateMultiPatch(fixtureTableHandle, multiPatchAmount) 298 | CreateMultiPatch(fixtureTableHandle, multiPatchAmount, _undoText) 299 | CreateUndo(undoText) 300 | CurrentEnvironment() 301 | CurrentExecPage() 302 | CurrentProfile() 303 | CurrentScreenConfig() 304 | CurrentUser() 305 | 306 | DataPool() 307 | DefaultDisplayPositions() 308 | DelVar(handle, name) 309 | DeskLocked() 310 | DeviceConfiguration() 311 | DirList(path) 312 | DirList(path, _filter) 313 | DrawPointer(displayIndex, position) 314 | DrawPointer(displayIndex, position, _duration) 315 | DumpAllHooks() 316 | 317 | Echo(message) 318 | ErrEcho(message) 319 | ErrPrintf(message) 320 | Export(fileName, exportData) 321 | ExportCSV(fileName, exportData) 322 | ExportJson(fileName, exportData) 323 | 324 | FileExists(fileName) 325 | FindTexture(textureName) 326 | FirstDmxModeFixture(textureName) 327 | FixtureType() 328 | FromAddr(objectString, addressHandle) 329 | 330 | GetApiDescriptor() 331 | GetAttributeByUIChannel(channelIndex) 332 | GetAttributeCount() 333 | GetAttributeIndex(attributeName) 334 | GetButton(Ma3ModuleHandle) 335 | GetChannelFunction(channelIndex, attributeIndex) 336 | GetChannelFunctionIndex(channelIndex, attributeIndex) 337 | GetClassDerivationLevel(channelIndex) 338 | GetCurrentCue() 339 | GetDebugFPS() 340 | GetDisplayByIndex(displayIndex) 341 | GetDisplayCollect() 342 | GetDMXUniverse(universeNumber) 343 | GetDMXUniverse(universe, _isPercent) 344 | GetDMXValue(address) 345 | GetDMXValue(address, _universe) 346 | GetDMXValue(address, _universe, _returnPercent) 347 | GetExecutor(executorNumber) 348 | GetFocus() 349 | GetFocusDisplay() 350 | GetObjApiDescriptor() 351 | GetPath(folderNameOrIndex) 352 | GetPath(folderNameOrIndex, _createIfNotExist) 353 | GetPathOverrideFor(folderNameOrIndex, basePath) 354 | GetPathOverrideFor(folderNameOrIndex, basePath, _createIfNotExist) 355 | GetPathSeparator() 356 | GetPathType(objectHandle) 357 | GetPathType(objectHandle, _pathContentType) 358 | GetPresetData(presetHandle) 359 | GetPresetData(presetHandle, _returnPhaserData, _extract) 360 | GetRTChannel(rtChannelIndex) 361 | GetRTChannelCount() 362 | GetRTChannels(fixtureIndexOrHandle) 363 | GetRTChannels(fixtureIndexOrHandle, _returnHandles) 364 | GetSample(sampleType) 365 | GetScreenContent(screenHandle) 366 | GetSelectedAttribute() 367 | GetShowFileStatus() 368 | GetSubfixture(fixtureIndex) 369 | GetSubfixtureCount() 370 | GetTokenName(shortKeyword) 371 | GetTokenNameByIndex(index) 372 | GetTopModal() 373 | GetTopOverlay() 374 | GetUIChannelCount() 375 | GetUIChannelIndex(patchIndex, attributeIndex) 376 | GetUIChannels(fixtureIndexOrHandle) 377 | GetUIChannels(fixtureIndexOrHandle, _returnHandles) 378 | GetUIObjectAtPosition(displayIndex, positionTable) 379 | GetVar(variableHandle, varName) 380 | GlobalVars() 381 | 382 | HandleToInt(objectHandle) 383 | HandleToStr(objectHandle) 384 | HookObjectChange(functionName, objectHandle, pluginHandle) 385 | HookObjectChange(functionName, objectHandle, pluginHandle, _passedObjectHandle) 386 | HostOS() 387 | HostSubType() 388 | HostType() 389 | 390 | Import(fileName) 391 | IncProgress(progressBarHandle, value) 392 | IntToHandle(handleInteger) 393 | IsClassDerivedFrom(derivedClassName, baseClassName) 394 | IsObjectValid(objectHandle) 395 | 396 | KeyboardObj() 397 | 398 | MasterPool() 399 | MessageBox(objectHandle) 400 | MouseObj() 401 | 402 | NeedShowSave() 403 | 404 | ObjectList(objectListCommand) 405 | ObjectList(objectListCommand, _optionsTable) 406 | 407 | Patch() 408 | Printf(message) 409 | Programmer() 410 | ProgrammerPart() 411 | Pult() 412 | 413 | ReleaseType() 414 | Root() 415 | 416 | SelectedFeature() 417 | SelectedLayout() 418 | SelectedSequence() 419 | SelectedTimecode() 420 | SelectedTimer() 421 | Selection() 422 | SelectionCount() 423 | SelectionFirst() 424 | SelectionNext(fixtureIndex) 425 | SerialNumber() 426 | SetBlockInput(block) 427 | SetLED(moduleHandle, moduleHandle) 428 | SetProgress(progressBarHandle, progress) 429 | SetProgressRange(progressBarHandle, rangeTart, rangeEnd) 430 | SetProgressText(progressBarHandle, text) 431 | SetVar(variableHandle, varName, value) 432 | ShowData() 433 | ShowSettings() 434 | StartProgress(title) 435 | StopProgress(progressBarHandle) 436 | StrToHandle(handleString) 437 | 438 | TextInput() 439 | TextInput(_title) 440 | TextInput(_title, _textGuide) 441 | TextInput(_title, _textGuide, _xPosition) 442 | TextInput(_title, _textGuide, _xPosition, _yPosition) 443 | Time() 444 | Timer(timedFunction, waitSeconds, iterations) 445 | Timer(timedFunction, waitSeconds, iterations, _timerCleanup) 446 | Timer(timedFunction, waitSeconds, iterations, _timerCleanup, _passedObjectHandle) 447 | ToAddr(objectHandle) 448 | ToAddr(objectHandle, _returnType) 449 | TouchObj() 450 | 451 | Unhook(hookId) 452 | UnhookMultiple(functionName, targetObjectHandle, contextObjectHandle) 453 | UserVars() 454 | 455 | Version() 456 | 457 | -- Not documented Object free definition 458 | -- ======================================== 459 | 460 | ColMeasureDeviceDarkCalibrate() 461 | ColMeasureDeviceDoMeasurement() 462 | CreateDirectoryRecursive(path) 463 | 464 | DevMode3d() 465 | 466 | FSExtendedModeHasDots(handle, cell) 467 | FindBestDMXPatchAddr(patch, startingAddress, footprint) 468 | FindBestFocus() 469 | FindBestFocus(handle) 470 | FindNextFocus() 471 | FindNextFocus(_backwards) 472 | FindNextFocus(_backwards, _reason) 473 | 474 | GetAttributeColumnId(handle, attribute) 475 | GetObject(address) 476 | GetProgPhaser(uiChannelIndex, phaserOnly) 477 | GetProgPhaserValue(uiChannelIndex, step) 478 | GetPropertyColumnId(handle, propertyName) 479 | GetRemoteVideoInfo() 480 | GetUIChannel(uiChannelIndex, attributeIndex) 481 | 482 | Keyboard(displayIndex, type) 483 | Keyboard(displayIndex, type, _charOrKeycode) 484 | Keyboard(displayIndex, type, _charOrKeycode, _shift) 485 | Keyboard(displayIndex, type, _charOrKeycode, _shift, _ctrl) 486 | Keyboard(displayIndex, type, _charOrKeycode, _shift, _ctrl, _alt) 487 | Keyboard(displayIndex, type, _charOrKeycode, _shift, _ctrl, _alt, _numlock) 488 | 489 | LoadExecConfig(executor) 490 | 491 | Mouse(displayIndex, type, buttonOrAbsX) 492 | Mouse(displayIndex, type, buttonOrAbsX, _absY) 493 | 494 | OverallDeviceCertificate() 495 | 496 | PluginVars(pluginName) 497 | PopupInput(options) 498 | PrepareWaitObjectChange(handle, changeLevelThreshold) 499 | 500 | RefreshLibrary(handle) 501 | RemoteCommand(ip, command) 502 | 503 | SaveExecConfig(executor) 504 | SelectedDrive() 505 | SelectionComponentX() 506 | SelectionComponentY() 507 | SelectionComponentZ() 508 | SelectionNotifyBegin(context) 509 | SelectionNotifyEnd(context) 510 | SelectionNotifyObject(objectToNotify) 511 | SetColor(colorModel, tripel1, tripel2, tripel3, brightness, quality, constBrightness) 512 | SetProgPhaser(uiChannelIndex, options) 513 | SetProgPhaserValue(uiChannelIndex, step, options) 514 | SyncFS() 515 | 516 | TestPlaybackOutput(expectations) 517 | TestPlaybackOutputSteps(expectations) 518 | Touch(displayIndex, type, touchId, absX, absY) 519 | 520 | WaitModal() 521 | WaitModal(secondsToWait) 522 | WaitObjectDelete(handle) 523 | WaitObjectDelete(handle, _secondsToWait) 524 | end 525 | 526 | return test() -------------------------------------------------------------------------------- /tests/test_2.2.lua: -------------------------------------------------------------------------------- 1 | local function test() 2 | 3 | -- variables declaration 4 | -- ======================================== 5 | 6 | local handle = Handle:new() 7 | local fixtureTable, name, startAddress, fixtureId, type, command, fixtureTableHandle, multiPatchAmount 8 | local undoText, message, fileName, exportData, path, textureName, objectString, addressHandle 9 | local Ma3ModuleHandle, channelIndex, attributeName, displayIndex, universeNumber, folderName, createIfNotExist 10 | local address, universe, executorNumber, screenHandle, patchIndex, attributeIndex, positionTable 11 | local basePath, rtChannelIndex, presetHandle, attribute, uiChannelIndex, phaserOnly, step, footprint 12 | local sampleType, _returnType, _backwards, _reason, _charOrKeycode, _shift, _ctrl, _alt, _numlock, _absY 13 | local variableHandle, varName, functionName, objectHandle, pluginHandle, waitSeconds, iterations, _timerCleanup 14 | local index, position, title, text, _title, _textGuide, _xPosition, _yPosition, timedFunction, startingAddress 15 | local fixtureIndex, shortKeyword,progressBarHandle, value, expectedChildren, secondsToWait, patch, options 16 | local handleInteger, derivedClassName, baseClassName, hookId, targetObjectHandle, contextObjectHandle 17 | local moduleHandle, progress, rangeTart, rangeEnd, handleString, baseLocationHandle, _forceReInit 18 | local folderNameOrIndex, _createIfNotExist, block, filePath, propertyName, childIndex, tokenAndIndex, settingsTable 19 | local parent, callback, appearance, items, targetHandle, changeLevelEnum, destHandle, otherHandle, srcHandle 20 | local searchName, searchClassName, lineNumber, rowId, x, y, columnId, size, cell, valueType, updateOpposite 21 | local objectToCheck, parameterName, parameterValue, nameValue, length, callbackName, propertyIndex, scrollType 22 | local offset, itemIdx, topicName, propertyValue, scrollEntity, _optionsTable, _passedObjectHandle 23 | local executor, buttonOrAbsX, absY, pluginName, changeLevelThreshold, ip, objectListCommand, _returnHandles 24 | local context, objectToNotify, colorModel, tripel1, tripel2, tripel3, _extract, fixtureIndexOrHandle 25 | local brightness, quality, constBrightness, expectations, touchId, absX, _returnPhaserData, _duration 26 | local _baseLocationHandle, _useToAddrIndex, _returnNamesInQuotes, _roleInteger, _filter, channelName 27 | local _class, _undo, _baseHandle, _appearance, _role, _argument, _explicitName, _count, _text, _screen 28 | local _overrideChangeLevel, _recursive, _empty, _enable, _secondsToWait, _type, _undoHandle, _handleTarget 29 | local _focusSearchAllowed, _startingInternalLineNumber, _camelCaseToFileName, _ctx, dmxModeHandle, _breakIndex 30 | local _isPercent, _universe, _returnPercent, _pathContentType, queueName, _samplingPoints, ipOrStation, data 31 | local returnName, _isCueObject, sourcePath, destinationPath, targetObject 32 | 33 | -- Object definition 34 | -- ======================================== 35 | 36 | local displayIndex = Obj.Index() 37 | 38 | handle.dmxInvertPan = true 39 | handle.dmxInvertTilt = true 40 | 41 | handle:Addr() 42 | handle:Addr(baseLocationHandle) 43 | handle:Addr(_baseLocationHandle, _useToAddrIndex, _isCueObject) 44 | handle:AddrNative() 45 | handle:AddrNative(baseLocationHandle) 46 | handle:AddrNative(_baseLocationHandle, _returnNamesInQuotes) 47 | 48 | handle:Children() 49 | handle:Count() 50 | 51 | handle:Dump() 52 | 53 | handle:Export(filePath, fileName) 54 | 55 | handle:Get(propertyName) 56 | handle:Get(propertyName, _roleInteger) 57 | handle:GetChildClass() 58 | handle:GetClass() 59 | handle:GetDependencies() 60 | handle:GetFader(tokenAndIndex) 61 | handle:GetFaderText(tokenAndIndex) 62 | handle:GetReferences() 63 | handle:GetUIEditor() 64 | handle:GetUISettings() 65 | 66 | handle:HasActivePlayback() 67 | 68 | handle:Import(filePath, fileName) 69 | 70 | handle:Ptr(childIndex) 71 | 72 | handle:SetFader(settingsTable) 73 | 74 | handle:ToAddr(returnName) 75 | 76 | -- Not documented Object definition 77 | -- ======================================== 78 | 79 | handle:Acquire() 80 | handle:Acquire(_class) 81 | handle:Acquire(_class, _undo) 82 | handle:AddListChildren(parent) 83 | handle:AddListChildren(parent, _role) 84 | handle:AddListChildrenNames(parent) 85 | handle:AddListChildrenNames(parent, _role) 86 | handle:AddListLuaItem(name, value, callback) 87 | handle:AddListLuaItem(name, value, callback, _argument) 88 | handle:AddListLuaItem(name, value, callback, _argument, _appearance) 89 | handle:AddListLuaItems(items) 90 | handle:AddListNumericItem(name, value) 91 | handle:AddListNumericItem(name, value, _baseHandle) 92 | handle:AddListNumericItem(name, value, _baseHandle, _appearance) 93 | handle:AddListNumericItems(items) 94 | handle:AddListObjectItem(targetObject) 95 | handle:AddListObjectItem(targetObject, _explicitName) 96 | handle:AddListObjectItem(targetObject, _explicitName, _appearance) 97 | handle:AddListPropertyItem(name, value, targetHandle) 98 | handle:AddListPropertyItem(name, value, targetHandle, _appearance) 99 | handle:AddListPropertyItems(items) 100 | handle:AddListRecursiveNames(parent) 101 | handle:AddListRecursiveNames(parent, _role) 102 | handle:AddListStringItem(name, value) 103 | handle:AddListStringItem(name, value, appearance) 104 | handle:AddListStringItems(items) 105 | handle:Append() 106 | handle:Append(_class) 107 | handle:Append(_class, _undo) 108 | handle:Append(_class, _undo, _count) 109 | 110 | handle:Changed(changeLevelEnum) 111 | handle:ClearList() 112 | handle:ClearUIChildren() 113 | handle:CmdlineChildren() 114 | handle:CmdlinePtr(index) 115 | handle:CommandAt() 116 | handle:CommandCall(destHandle) 117 | handle:CommandCall(destHandle, _focusSearchAllowed) 118 | handle:CommandCreateDefaults() 119 | handle:CommandDelete() 120 | handle:CommandStore() 121 | handle:Compare(otherHandle) 122 | handle:Copy(srcHandle) 123 | handle:Copy(srcHandle, _undo) 124 | handle:Create(childIndex) 125 | handle:Create(childIndex, _class) 126 | handle:Create(childIndex, _class, _undo) 127 | handle:CurrentChild() 128 | 129 | handle:Delete(childIndex) 130 | handle:Delete(childIndex, _undo) 131 | 132 | handle:FSExtendedModeHasDots(cell) 133 | handle:Find(searchName) 134 | handle:Find(searchName, searchClassName) 135 | handle:FindListItemByName(value) 136 | handle:FindListItemByValueStr(value) 137 | handle:FindParent(searchClassName) 138 | handle:FindRecursive(searchName) 139 | handle:FindRecursive(searchName, searchClassName) 140 | handle:FindWild(searchName) 141 | 142 | handle:GetAssignedObj() 143 | handle:GetDisplay() 144 | handle:GetDisplayIndex() 145 | handle:GetExportFileName() 146 | handle:GetExportFileName(_camelCaseToFileName) 147 | handle:GetLineAt(lineNumber) 148 | handle:GetLineCount() 149 | handle:GetListItemAppearance(index) 150 | handle:GetListItemButton(index) 151 | handle:GetListItemName(index) 152 | handle:GetListItemValueI64(index) 153 | handle:GetListItemValueStr(index) 154 | handle:GetListItemsCount() 155 | handle:GetListSelectedItemIndex() 156 | handle:GetOverlay() 157 | handle:GetScreen() 158 | handle:GetUIChild(index) 159 | handle:GetUIChildrenCount() 160 | handle:GridCellExists(cell) 161 | handle:GridGetBase() 162 | handle:GridGetCellData(cell) 163 | handle:GridGetCellDimensions(cell) 164 | handle:GridGetData() 165 | handle:GridGetDimensions() 166 | handle:GridGetParentRowId(rowId) 167 | handle:GridGetScrollCell() 168 | handle:GridGetScrollOffset() 169 | handle:GridGetSelectedCells() 170 | handle:GridGetSelection() 171 | handle:GridGetSettings() 172 | handle:GridIsCellReadOnly(cell) 173 | handle:GridIsCellVisible(cell) 174 | handle:GridMoveSelection(x, y) 175 | handle:GridScrollCellIntoView(cell) 176 | handle:GridSetColumnSize(columnId, size) 177 | handle:GridsGetColumnById(columnId) 178 | handle:GridsGetExpandHeaderCell() 179 | handle:GridsGetExpandHeaderCellState() 180 | handle:GridsGetLevelButtonWidth(cell) 181 | handle:GridsGetRowById(rowId) 182 | 183 | handle:HasDependencies() 184 | handle:HasEditSettingUI() 185 | handle:HasEditUI() 186 | handle:HasParent(objectToCheck) 187 | handle:HasReferences() 188 | handle:HookDelete(callback) 189 | handle:HookDelete(callback, _argument) 190 | 191 | handle:Index() 192 | handle:InputCallFunction(functionName) 193 | handle:InputHasFunction(functionName) 194 | handle:InputRun() 195 | handle:InputSetAdditionalParameter(parameterName, parameterValue) 196 | handle:InputSetEditTitle(nameValue) 197 | handle:InputSetMaxLength(length) 198 | handle:InputSetTitle(nameValue) 199 | handle:InputSetValue(value) 200 | handle:Insert(childIndex) 201 | handle:Insert(childIndex, _class) 202 | handle:Insert(childIndex, _class, _undo) 203 | handle:Insert(childIndex, _class, _undo, _count) 204 | handle:IsClass() 205 | handle:IsEmpty() 206 | handle:IsEnabled() 207 | handle:IsListItemEmpty(index) 208 | handle:IsListItemEnabled(index) 209 | handle:IsLocked() 210 | handle:IsValid() 211 | handle:IsVisible() 212 | 213 | handle:Load(filePath, fileName) 214 | 215 | handle:MaxCount() 216 | 217 | handle:OverlaySetCloseCallback(callbackName) 218 | handle:OverlaySetCloseCallback(callbackName, _ctx) 219 | 220 | handle:Parent() 221 | handle:PrepareAccess() 222 | handle:PropertyCount() 223 | handle:PropertyInfo(propertyIndex) 224 | handle:PropertyName(propertyIndex) 225 | handle:PropertyType(propertyIndex) 226 | 227 | handle:Remove(childIndex) 228 | handle:Remove(childIndex, _undo) 229 | handle:RemoveListItem(name) 230 | handle:Resize(size) 231 | 232 | handle:Save(filePath, fileName) 233 | handle:ScrollDo(scrollType, scrollEntity, valueType, value, updateOpposite) 234 | handle:ScrollGetInfo(scrollType) 235 | handle:ScrollGetItemByOffset(scrollType, offset) 236 | handle:ScrollGetItemOffset(scrollType, itemIdx) 237 | handle:ScrollGetItemSize(scrollType, itemIdx) 238 | handle:ScrollIsNeeded(scrollType) 239 | handle:SelectListItemByIndex(index) 240 | handle:SelectListItemByName(nameValue) 241 | handle:SelectListItemByValue(value) 242 | handle:Set(propertyName, propertyValue) 243 | handle:Set(propertyName, propertyValue, _overrideChangeLevel) 244 | handle:SetChildren(propertyName, propertyValue) 245 | handle:SetChildren(propertyName, propertyValue, _recursive) 246 | handle:SetChildrenRecursive(propertyName, propertyValue) 247 | handle:SetChildrenRecursive(propertyName, propertyValue, _recursive) 248 | handle:SetContextSensHelpLink(topicName) 249 | handle:SetEmptyListItem(index) 250 | handle:SetEmptyListItem(index, _empty) 251 | handle:SetEnabledListItem(index) 252 | handle:SetEnabledListItem(index, _enable) 253 | handle:SetListItemAppearance(index, appearance) 254 | handle:SetListItemName(index, name) 255 | handle:SetListItemValueStr(index, value) 256 | handle:SetPositionHint(x, y) 257 | handle:ShowModal(callback) 258 | 259 | handle:UIChildren() 260 | handle:UILGGetColumnAbsXLeft(index) 261 | handle:UILGGetColumnAbsXRight(index) 262 | handle:UILGGetColumnWidth(index) 263 | handle:UILGGetRowAbsYBottom(index) 264 | handle:UILGGetRowAbsYTop(index) 265 | handle:UILGGetRowHeight(index) 266 | 267 | handle:WaitChildren(expectedChildren) 268 | handle:WaitChildren(expectedChildren, secondsToWait) 269 | handle:WaitInit() 270 | handle:WaitInit(secondsToWait) 271 | handle:WaitInit(_secondsToWait, _forceReInit) 272 | 273 | -- Object free definition 274 | -- ======================================== 275 | 276 | AddFixtures(fixtureTable) 277 | AddonVars(name) 278 | 279 | BuildDetails() 280 | 281 | CheckDMXCollision(dmxModeHandle, startAddress) 282 | CheckDMXCollision(dmxModeHandle, startAddress, _count) 283 | CheckDMXCollision(dmxModeHandle, startAddress, _count, _breakIndex) 284 | CheckFIDCollision(fixtureId) 285 | CheckFIDCollision(fixtureId, _count) 286 | CheckFIDCollision(fixtureId, _count, _type) 287 | ClassExists(name) 288 | CloseAllOverlays() 289 | CloseUndo(handle) 290 | Cmd(command) 291 | Cmd(command, _undoHandle) 292 | CmdIndirect(command) 293 | CmdIndirect(command, _undoHandle) 294 | CmdIndirect(command, _undoHandle, _handleTarget) 295 | CmdIndirectWait(command) 296 | CmdIndirectWait(command, _undoHandle) 297 | CmdIndirectWait(command, _undoHandle, _handleTarget) 298 | CmdObj() 299 | ConfigTable() 300 | Confirm(title) 301 | Confirm(title, text) 302 | Confirm(title, _text, _screen) 303 | Confirm(title, _text, _screen, _text) 304 | CreateMultiPatch(fixtureTableHandle, multiPatchAmount) 305 | CreateUndo(undoText) 306 | CurrentEnvironment() 307 | CurrentExecPage() 308 | CurrentProfile() 309 | CurrentScreenConfig() 310 | CurrentUser() 311 | 312 | DataPool() 313 | DefaultDisplayPositions() 314 | DelVar(handle, name) 315 | DeskLocked() 316 | DeviceConfiguration() 317 | DirList(path) 318 | DirList(path, _filter) 319 | DrawPointer(displayIndex, position) 320 | DrawPointer(displayIndex, position, _duration) 321 | DumpAllHooks() 322 | 323 | Echo(message) 324 | ErrEcho(message) 325 | ErrPrintf(message) 326 | Export(fileName, exportData) 327 | ExportCSV(fileName, exportData) 328 | ExportJson(fileName, exportData) 329 | 330 | FileExists(fileName) 331 | FindTexture(textureName) 332 | FirstDmxModeFixture(textureName) 333 | FixtureType() 334 | FromAddr(objectString, addressHandle) 335 | 336 | GetApiDescriptor() 337 | GetAttributeByUIChannel(channelIndex) 338 | GetAttributeCount() 339 | GetAttributeIndex(attributeName) 340 | GetButton(Ma3ModuleHandle) 341 | GetChannelFunction(channelIndex, attributeIndex) 342 | GetChannelFunctionIndex(channelIndex, attributeIndex) 343 | GetClassDerivationLevel(channelIndex) 344 | GetCurrentCue() 345 | GetDebugFPS() 346 | GetDisplayByIndex(displayIndex) 347 | GetDisplayCollect() 348 | GetDMXUniverse(universeNumber) 349 | GetDMXUniverse(universe, _isPercent) 350 | GetDMXValue(address) 351 | GetDMXValue(address, universe) 352 | GetDMXValue(address, _universe, _returnPercent) 353 | GetExecutor(executorNumber) 354 | GetFocus() 355 | GetFocusDisplay() 356 | GetObjApiDescriptor() 357 | GetPath(folderNameOrIndex) 358 | GetPath(folderNameOrIndex, _createIfNotExist) 359 | GetPathOverrideFor(folderName, basePath) 360 | GetPathOverrideFor(folderName, basePath, createIfNotExist) 361 | GetPathSeparator() 362 | GetPathType(objectHandle) 363 | GetPathType(objectHandle, _pathContentType) 364 | GetPresetData(presetHandle) 365 | GetPresetData(presetHandle, _returnPhaserData) 366 | GetPresetData(presetHandle, _returnPhaserData, _extract) 367 | GetRTChannel(rtChannelIndex) 368 | GetRTChannelCount() 369 | GetRTChannels(fixtureIndex) 370 | GetRTChannels(fixtureIndexOrHandle, _returnHandles) 371 | GetSample(sampleType) 372 | GetScreenContent(screenHandle) 373 | GetSelectedAttribute() 374 | GetShowFileStatus() 375 | GetSubfixture(fixtureIndex) 376 | GetSubfixtureCount() 377 | GetTokenName(shortKeyword) 378 | GetTokenNameByIndex(index) 379 | GetTopModal() 380 | GetTopOverlay() 381 | GetUIChannelCount() 382 | GetUIChannelIndex(patchIndex, attributeIndex) 383 | GetUIChannels(fixtureIndex) 384 | GetUIChannels(fixtureIndexOrHandle, _returnHandles) 385 | GetUIObjectAtPosition(displayIndex, positionTable) 386 | GetVar(variableHandle, varName) 387 | GlobalVars() 388 | 389 | HandleToInt(objectHandle) 390 | HandleToStr(objectHandle) 391 | HookObjectChange(functionName, objectHandle, pluginHandle) 392 | HookObjectChange(functionName, objectHandle, pluginHandle, _passedObjectHandle) 393 | HostOS() 394 | HostSubType() 395 | HostType() 396 | 397 | Import(fileName) 398 | IncProgress(progressBarHandle, value) 399 | IntToHandle(handleInteger) 400 | IsClassDerivedFrom(derivedClassName, baseClassName) 401 | IsObjectValid(objectHandle) 402 | 403 | KeyboardObj() 404 | 405 | MasterPool() 406 | MessageBox(objectHandle) 407 | MouseObj() 408 | 409 | NeedShowSave() 410 | 411 | ObjectList(objectListCommand) 412 | ObjectList(objectListCommand, _optionsTable) 413 | 414 | Patch() 415 | Printf(message) 416 | Programmer() 417 | ProgrammerPart() 418 | Pult() 419 | 420 | ReleaseType() 421 | Root() 422 | 423 | SelectedFeature() 424 | SelectedLayout() 425 | SelectedSequence() 426 | SelectedTimecode() 427 | SelectedTimer() 428 | Selection() 429 | SelectionCount() 430 | SelectionFirst() 431 | SelectionNext(fixtureIndex) 432 | SerialNumber() 433 | SetBlockInput(block) 434 | SetLED(moduleHandle, moduleHandle) 435 | SetProgress(progressBarHandle, progress) 436 | SetProgressRange(progressBarHandle, rangeTart, rangeEnd) 437 | SetProgressText(progressBarHandle, text) 438 | SetVar(variableHandle, varName, value) 439 | ShowData() 440 | ShowSettings() 441 | StartProgress(title) 442 | StopProgress(progressBarHandle) 443 | StrToHandle(handleString) 444 | 445 | TextInput() 446 | TextInput(_title) 447 | TextInput(_title, _textGuide) 448 | TextInput(_title, _textGuide, _xPosition) 449 | TextInput(_title, _textGuide, _xPosition, _yPosition) 450 | Time() 451 | Timer(timedFunction, waitSeconds, iterations) 452 | Timer(timedFunction, waitSeconds, iterations, _timerCleanup) 453 | Timer(timedFunction, waitSeconds, iterations, _timerCleanup, _passedObjectHandle) 454 | ToAddr(objectHandle) 455 | ToAddr(objectHandle, _returnType) 456 | TouchObj() 457 | 458 | Unhook(hookId) 459 | UnhookMultiple(functionName, targetObjectHandle, contextObjectHandle) 460 | UserVars() 461 | 462 | Version() 463 | 464 | -- Not documented Object free definition 465 | -- ======================================== 466 | 467 | CloseMessageQueue(queueName) 468 | ColMeasureDeviceDarkCalibrate() 469 | ColMeasureDeviceDoMeasurement() 470 | CopyFile(sourcePath, destinationPath) 471 | CreateDirectoryRecursive(path) 472 | 473 | DevMode3d() 474 | 475 | FSExtendedModeHasDots(handle, cell) 476 | FindBestDMXPatchAddr(patch, startingAddress, footprint) 477 | FindBestFocus() 478 | FindBestFocus(handle) 479 | FindNextFocus() 480 | FindNextFocus(_backwards) 481 | FindNextFocus(_backwards, _reason) 482 | 483 | GetAttributeColumnId(handle, attribute) 484 | GetObject(address) 485 | GetProgPhaser(uiChannelIndex, phaserOnly) 486 | GetProgPhaserValue(uiChannelIndex, step) 487 | GetPropertyColumnId(handle, propertyName) 488 | GetRemoteVideoInfo() 489 | GetTextScreenLine() 490 | GetTextScreenLineCount() 491 | GetTextScreenLineCount(_startingInternalLineNumber) 492 | GetUIChannel(uiChannelIndex, attributeIndex) 493 | 494 | Keyboard(displayIndex, type) 495 | Keyboard(displayIndex, type, _charOrKeycode) 496 | Keyboard(displayIndex, type, _charOrKeycode, _shift) 497 | Keyboard(displayIndex, type, _charOrKeycode, _shift, _ctrl) 498 | Keyboard(displayIndex, type, _charOrKeycode, _shift, _ctrl, _alt) 499 | Keyboard(displayIndex, type, _charOrKeycode, _shift, _ctrl, _alt, _numlock) 500 | 501 | LoadExecConfig(executor) 502 | 503 | Mouse(displayIndex, type, buttonOrAbsX) 504 | Mouse(displayIndex, type, buttonOrAbsX, absY) 505 | 506 | OpenMessageQueue(queueName) 507 | OverallDeviceCertificate() 508 | 509 | PluginVars(pluginName) 510 | PopupInput(options) 511 | PrepareWaitObjectChange(handle, changeLevelThreshold) 512 | 513 | RefreshLibrary(handle) 514 | RemoteCommand(ip, command) 515 | 516 | SampleOutput(_samplingPoints) 517 | SaveExecConfig(executor) 518 | SelectedDrive() 519 | SelectionComponentX() 520 | SelectionComponentY() 521 | SelectionComponentZ() 522 | SelectionNotifyBegin(context) 523 | SelectionNotifyEnd(context) 524 | SelectionNotifyObject(objectToNotify) 525 | SendLuaMessage(ipOrStation, channelName, data) 526 | SetColor(colorModel, tripel1, tripel2, tripel3, brightness, quality, constBrightness) 527 | SetProgPhaser(uiChannelIndex, options) 528 | SetProgPhaserValue(uiChannelIndex, step, options) 529 | SyncFS() 530 | 531 | TestPlaybackOutput(expectations) 532 | TestPlaybackOutputSteps(expectations) 533 | Touch(displayIndex, type, touchId, absX, absY) 534 | 535 | WaitModal() 536 | WaitModal(secondsToWait) 537 | WaitObjectDelete(handle) 538 | WaitObjectDelete(handle, _secondsToWait) 539 | end 540 | 541 | return test() -------------------------------------------------------------------------------- /utils/GenerateEnumsFile/GenerateLuaEnums.py: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | def parse_enums(file_path): 4 | enums = {} 5 | current_enum = None 6 | 7 | with open(file_path, 'r', encoding='utf-8') as file: 8 | for line in file: 9 | enum_match = re.match(r'Enum: \[(.+?)\]', line) 10 | key_value_match = re.match(r'\s*Key: \[(.*?)\] Value: \[(.*?)\]', line) 11 | 12 | if enum_match: 13 | current_enum = enum_match.group(1) 14 | enums[current_enum] = {} 15 | elif key_value_match and current_enum: 16 | key, value = key_value_match.groups() 17 | value = int(value) if value.isdigit() or value.lstrip('-').isdigit() else value 18 | if not key or re.search(r'[^a-zA-Z0-9_]', key) or key[0].isdigit() or key in ['true', 'false']: 19 | key = f'["{key}"]' 20 | enums[current_enum][key] = value 21 | 22 | return enums 23 | 24 | def generate_lua(enums, output_path): 25 | with open(output_path, 'w', encoding='utf-8') as file: 26 | for enum_name, values in enums.items(): 27 | file.write(f"-- @enum {enum_name}\n") 28 | file.write(f"Enums.{enum_name} = {{\n") 29 | 30 | for key, value in values.items(): 31 | file.write(f" {key} = {value},\n") 32 | 33 | file.write("}\n\n") 34 | 35 | def main(): 36 | input_file = "enums_list.txt" 37 | output_file = "enums.lua" 38 | enums = parse_enums(input_file) 39 | generate_lua(enums, output_file) 40 | print(f"Fichier Lua généré : {output_file}") 41 | 42 | if __name__ == "__main__": 43 | main() 44 | -------------------------------------------------------------------------------- /utils/GenerateEnumsFile/exportEnumList.lua: -------------------------------------------------------------------------------- 1 | function ExportEnumsToFile() 2 | Printf("ExportEnumsToFile") 3 | local file = io.open("D:\\Downloads\\enums_list.txt", "w") 4 | if file then 5 | 6 | local enumsNames = {} 7 | 8 | for enum, _ in pairs(Enums) do 9 | table.insert(enumsNames, enum) 10 | end 11 | 12 | table.sort(enumsNames) 13 | 14 | for _, enumName in ipairs(enumsNames) do 15 | file:write("Enum: [" .. enumName .. "]\n") 16 | 17 | local enumKeys = {} 18 | for key, _ in pairs(Enums[enumName]) do 19 | table.insert(enumKeys, key) 20 | end 21 | 22 | table.sort(enumKeys) 23 | 24 | for _, key in ipairs(enumKeys) do 25 | file:write("Key: [" .. key .. "] Value: [" .. tostring(Enums[enumName][key]) .. "]\n") 26 | end 27 | end 28 | 29 | file:close() 30 | Printf("Enums exported to 'enums.txt'") 31 | else 32 | Printf("Failed to open 'enums.txt'") 33 | end 34 | end 35 | 36 | return ExportEnumsToFile 37 | --------------------------------------------------------------------------------