Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
JoergAtGithub committed Jun 8, 2022
1 parent 92e35a0 commit 573a615
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 32 deletions.
42 changes: 23 additions & 19 deletions res/controllers/console-api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,84 +7,88 @@ declare class QJSEngineConsoleExtension {
/**
* Prints debugging information to the console. (same as console.debug)
*/
public log(message? : any, ...args : any[]) : void;
public log(message?:any, ...args:any[]):void;

/**
* Prints debugging information to the console. (same as console.log)
*/
public debug(message? : any, ...args : any[]) : void;
public debug(message?:any, ...args:any[]):void;

/**
* Prints information to the console.
*/
public info(message? : any, ...args : any[]) : void;
public info(message?:any, ...args:any[]):void;

/**
* Prints a warning message to the console.
*/
public warn(message? : any, ...args : any[]) : void;
public warn(message?:any, ...args:any[]):void;

/**
* Prints an error message to the console.
*/
public error(message? : any, ...args : any[]) : void;
public error(message?:any, ...args:any[]):void;

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

/**
* Starts the time measurement, which will be printed by timeEnd
*
* @param {string} [label] string argument that identifies the measurement.
* @param label string argument that identifies the measurement.
*/
public time(label? : string) : void;
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.
* @param label string argument that identifies the measurement.
*/
public timeEnd(label? : string) : void;
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
* @param message
* @param args
*/
public trace(message? : any, ...args : any[]) : void;
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]
* @param label
*/
public count(label? : string) : void;
public count(label?:string):void;

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

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

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

}
var console = new QJSEngineConsoleExtension;
6 changes: 3 additions & 3 deletions res/controllers/engine-api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ declare class ControllerScriptInterfaceLegacy {
public getValue(group:string, name:string):number;

/**
* Sets a control value
* Sets a control value
* @param group Group of the control e.g. "[Channel1]"
* @param name Name of the control e.g. "play_indicator"
* @param newValue Value to be set (within it's range according Mixxx Controls manual page)
Expand Down Expand Up @@ -103,7 +103,7 @@ declare class ControllerScriptInterfaceLegacy {
* you can also use closures as:
* function() { print("Executed Timer") }
* @param oneShot If true the function is only once,
* if false the function is executed repeatedly
* if false the function is executed repeatedly
* @returns timerId which is needed to stop a timer.
* In case of an error, 0 is returned.
*/
Expand Down Expand Up @@ -203,7 +203,7 @@ declare class ControllerScriptInterfaceLegacy {
* @param deck The deck number to use, e.g: 1
* @param activate Set true to activate, or false to disable
* @param factor Defines how quickly the deck should come to normal playback rate.
* Start with a value of 1 and increase to increase the acceleration.
* Start with a value of 1 and increase to increase the acceleration.
* SoftStart with low factors would take a while until sound is audible.
*/
public softStart(deck:number, activate:boolean, factor:number = 1.0):void;
Expand Down
13 changes: 7 additions & 6 deletions res/controllers/hid-controller-api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,22 @@ declare class HidControllerJSProxy {
* @param dataList Data to send as list of bytes
* @param length Unused optional argument
*/
public send(dataList : number[], length : number=0) : void;
public send(dataList:number[], length:number=0):void;

/** Sends HID OutputReport to HID device
* @param dataList Data to send as list of bytes
* @param length Unused but mandatory argument
* @param reportID 1...255 for HID devices that uses ReportIDs - or 0 for devices, which don't use ReportIDs
* @param resendUnchangedReport If set, the report will also be send, if the data are unchanged since last sending
*/
public send(dataList : number[], length : number, reportID : number, resendUnchangedReport:boolean = false) : void;
public send(dataList:number[], length:number, reportID:number, resendUnchangedReport:boolean = false):void;

/** Sends an OutputReport to HID device
* @param reportID 1...255 for HID devices that uses ReportIDs - or 0 for devices, which don't use ReportIDs
* @param dataArray Data to send as byte array (Javascript type Uint8Array)
* @param resendUnchangedReport If set, the report will also be send, if the data are unchanged since last sending
*/
public sendOutputReport(reportID : number, dataArray : ArrayBuffer, resendUnchangedReport:boolean = false) : void;
public sendOutputReport(reportID:number, dataArray:ArrayBuffer, resendUnchangedReport:boolean = false):void;

/** getInputReport receives an InputReport from the HID device on request.
* @details This can be used on startup to initialize the knob positions in Mixxx
Expand All @@ -28,19 +29,19 @@ declare class HidControllerJSProxy {
* @param reportID 1...255 for HID devices that uses ReportIDs - or 0 for devices, which don't use
* @return Returns report data with ReportID byte as prefix
*/
public getInputReport(reportID : number) : Uint8Array;
public getInputReport(reportID:number):Uint8Array;

/** Sends a FeatureReport to HID device
* @param reportID 1...255 for HID devices that uses ReportIDs - or 0 for devices, which don't use
* @param reportData Data to send as byte array
*/
public sendFeatureReport(reportID : number, reportData : ArrayBuffer) : void;
public sendFeatureReport(reportID:number, reportData:ArrayBuffer):void;

/** getFeatureReport receives a FeatureReport from the HID device on request.
* @param reportID 1...255 for HID devices that uses ReportIDs - or 0 for devices, which don't use
* @return The returned array matches the input format of sendFeatureReport,
* allowing it to be read, modified and sent it back to the controller.
*/
public getFeatureReport(reportID : number) : Uint8Array;
public getFeatureReport(reportID:number):Uint8Array;
}
var controller = new HidControllerJSProxy;
17 changes: 13 additions & 4 deletions res/controllers/midi-controller-api.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@

declare class MidiControllerJSProxy {

public sendShortMsg(status : number, byte1 : number, byte2 : number) : void;
public :ShortMsg(status:number, byte1:number, byte2:number):void;

/** Alias for sendSysexMsg */
public send(dataList : number[], length : number=0) : void;
public sendSysexMsg(dataList : number[], length : number=0) : void;
/**
* Alias for :SysexMsg
* @param dataList
* @param length
*/
public :(dataList:number[], length:number=0):void;
/**
*
* @param dataList
* @param length
*/
public :SysexMsg(dataList:number[], length:number=0):void;

}
var controller = new MidiControllerJSProxy;

0 comments on commit 573a615

Please sign in to comment.