Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Declarations for engine and controller scripting API #4759

Merged
merged 36 commits into from
May 13, 2023
Merged
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
8a9d07b
Declarations for engine and controller scripting API
JoergAtGithub May 12, 2022
b9310a5
Merge remote-tracking branch 'upstream/Main' into controllerApiDeclar…
JoergAtGithub Jun 6, 2022
b1d689c
Added missing declarations for QJSEngine::ConsoleExtension
JoergAtGithub Jun 6, 2022
3b146e9
Added/Improved documentation
JoergAtGithub Jun 7, 2022
9397e8a
Documented controlCallback functions
JoergAtGithub Jun 7, 2022
f7bf179
Marked engine.log as deprecated
JoergAtGithub Jun 7, 2022
92e35a0
Documented engine API functions
JoergAtGithub Jun 8, 2022
573a615
Formatting
JoergAtGithub Jun 8, 2022
a743f33
Documented MIDI API and corrected console command docu
JoergAtGithub Jun 9, 2022
fb8a3b6
--controllerDebug => --controller-debug
JoergAtGithub Jun 12, 2022
5fc2ca1
Changed text why console.profiling functions are not usable for mappi…
JoergAtGithub Jun 12, 2022
8d6edaf
Fixed typo
JoergAtGithub Jun 12, 2022
07abdf4
Add hyperlink for alias
JoergAtGithub Jun 26, 2022
039cf93
Added information about the 20ms minimum interval of JS timers
JoergAtGithub Jun 26, 2022
98502bf
Replaced declare class with declare namespace
JoergAtGithub Jun 26, 2022
28b9e1a
Added declaration for ColorMapper class
JoergAtGithub Jan 22, 2023
480205b
Merge remote-tracking branch 'upstream/2.4' into controllerApiDeclara…
JoergAtGithub Apr 4, 2023
fb18a2c
Improved console-api.d.ts
JoergAtGithub Apr 7, 2023
8deaaea
Adjusted spacing to the style used in the typescript docs
JoergAtGithub Apr 7, 2023
989619b
Removed wrong text "Javascript type Uint8Array"
JoergAtGithub Apr 7, 2023
a6fa34d
Added ScriptConnection class which is returned by makeConnection etc.…
JoergAtGithub Apr 7, 2023
ab94500
Added @typescript-eslint to pre-commit
JoergAtGithub Apr 7, 2023
a04280b
Fix pre-commit/eslint issues
JoergAtGithub Apr 7, 2023
8e9bb3b
Added type for timerId
JoergAtGithub Apr 7, 2023
95f06c9
Fixed codespell setup
JoergAtGithub Apr 7, 2023
5f937fa
Corrected return type of getInputReport and getFeatureReport
JoergAtGithub May 1, 2023
7ae4f68
Fixed typos an other textual review suggestions
JoergAtGithub May 2, 2023
f16c964
Fixed regexp to distinguish translation files from TypeScript files
JoergAtGithub May 13, 2023
b780d59
Declare ScriptConnection as interface, instead as class, which preven…
JoergAtGithub May 13, 2023
3b6b5b2
Fixed wrong namespace from controller to midi
JoergAtGithub May 13, 2023
29305e9
Added hyperlinks to Mixxx Controls manual page
JoergAtGithub May 13, 2023
992a7f9
Rewrote documentation for ColorMapper class
JoergAtGithub May 13, 2023
7c5130f
Adjusted indentation
JoergAtGithub May 13, 2023
3e28b75
Corrected English
JoergAtGithub May 13, 2023
e18c992
Adjusted indentation for GetInputReport
JoergAtGithub May 13, 2023
bda69bc
Adjusted indentation
JoergAtGithub May 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added missing declarations for QJSEngine::ConsoleExtension
JoergAtGithub committed Jun 6, 2022
commit b1d689c3bde1a0956ec484f2d59cdcae302d69fe
73 changes: 73 additions & 0 deletions res/controllers/console-api.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@

/** Mixxx installs the QJSEngine::ConsoleExtension for the use in controller mapping scripts.
See also: https://doc.qt.io/qt-5/qtquick-debugging.html#console-api
*/

declare class QJSEngineConsoleExtension {
JoergAtGithub marked this conversation as resolved.
Show resolved Hide resolved
/**
* Prints debugging information to the console.
*/
public log(message? : any, ...args : any[]) : void;
public debug(message? : any, ...args : any[]) : void;
public info(message? : any, ...args : any[]) : void;
public warn(message? : any, ...args : any[]) : void;
public error(message? : any, ...args : any[]) : void;

/**
* Tests that an expression is true.
* If not, it writes an optional message to the console and prints the stack trace.
*/
public assert(value: any, message? : string, ...args: any[]) : void;

/**
* Starts the time measurement, which will be printed by timeEnd
*
* @param {string} [label] string argument that identifies the measurement.
*/
public time(label? : string) : void;
/**
* Logs the time (in milliseconds) that was spent since the call of the time method.
*
* @param {string} [label] string argument that identifies the measurement.
*/
public timeEnd(label? : string) : void;

/**
* Prints the stack trace of the JavaScript execution at the point where it was called.
* This stack trace information contains the function name, file name, line number, and column number.
* The stack trace is limited to last 10 stack frames.
*
* @param {*} [message]
* @param {...any[]} args
*/
public trace(message? : any, ...args : any[]) : void;

/**
* Prints the current number of times a particular piece of code has run, along with a message.
*
* @param {string} [label]
*/
public count(label? : string) : void;

/**
* Turns on the JavaScript profiler.
* @deprecated Not usable for mappings, because JavaScript profile does only workin GUI thread: https://bugreports.qt.io/browse/QTBUG-65419
*
*/
public profile(label? : string) : void;

/**
* Turns off the JavaScript profiler.
* @deprecated Not usable for mappings, because JavaScript profile does only workin GUI thread: https://bugreports.qt.io/browse/QTBUG-65419
*
*/
public profileEnd(label? : string) : void;

/**
* Prints an error message together with the stack trace of JavaScript execution at the point where it is called.
*
*/
public exception(message? : any, ...args : any[]) : void;

}
var console = new QJSEngineConsoleExtension;
1 change: 0 additions & 1 deletion res/controllers/engine-api.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

declare var print = function(message : string) {};

declare class ControllerScriptInterfaceLegacy {
public getValue(group : string, name : string) : number;