@plugify-plugins/dyncall-types
Version:
generated typescript types to write plugins on plugify
519 lines (457 loc) • 21.7 kB
TypeScript
declare module ":plugify-plugin-dyncall" {
/**
* @description Character codes representing dyncall signature types.
*/
export enum SigChar {
/**
* @description Void type.
* */
Void = 118,
/**
* @description Boolean type.
* */
Bool = 66,
/**
* @description Signed char.
* */
Char = 99,
/**
* @description Unsigned char.
* */
UChar = 67,
/**
* @description Signed short.
* */
Short = 115,
/**
* @description Unsigned short.
* */
UShort = 83,
/**
* @description Signed int.
* */
Int = 105,
/**
* @description Unsigned int.
* */
UInt = 73,
/**
* @description Signed long.
* */
Long = 106,
/**
* @description Unsigned long.
* */
ULong = 74,
/**
* @description Signed long long.
* */
LongLong = 108,
/**
* @description Unsigned long long.
* */
ULongLong = 76,
/**
* @description Float type.
* */
Float = 102,
/**
* @description Double type.
* */
Double = 100,
/**
* @description Pointer type, also used for arrays.
* */
Pointer = 112,
/**
* @description String pointer, distinct from generic pointer.
* */
String = 90,
/**
* @description Struct or union described out-of-band.
* */
Aggregate = 65,
/**
* @description Marks end of argument list.
* */
EndArg = 41
}
namespace Callbacks {
}
/**
* @description Creates a new virtual machine (VM) instance with the specified size.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-NewVM|Docs}
*
* @param size The size of the virtual machine to be created.
*/
export function NewVM(size: number): number;
/**
* @description Frees the memory allocated for the specified virtual machine.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-Free|Docs}
*
* @param vm A pointer to the virtual machine to be freed.
*/
export function Free(vm: number): void;
/**
* @description Resets the specified virtual machine to its initial state.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-Reset|Docs}
*
* @param vm A pointer to the virtual machine to be reset.
*/
export function Reset(vm: number): void;
/**
* @description Sets the mode of the specified virtual machine.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-Mode|Docs}
*
* @param vm A pointer to the virtual machine.
* @param mode The mode to set for the virtual machine.
*/
export function Mode(vm: number, mode: number): void;
/**
* @description Adds a boolean argument to the virtual machine's call stack.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-ArgBool|Docs}
*
* @param vm A pointer to the virtual machine.
* @param value The boolean value to be added as an argument.
*/
export function ArgBool(vm: number, value: boolean): void;
/**
* @description Adds a character argument to the virtual machine's call stack.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-ArgChar|Docs}
*
* @param vm A pointer to the virtual machine.
* @param value The character value to be added as an argument.
*/
export function ArgChar(vm: number, value: boolean): void;
/**
* @description Adds an 8-bit integer argument to the virtual machine's call stack.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-ArgInt8|Docs}
*
* @param vm A pointer to the virtual machine.
* @param value The 8-bit integer value to be added as an argument.
*/
export function ArgInt8(vm: number, value: number): void;
/**
* @description Adds an unsigned 8-bit integer argument to the virtual machine's call stack.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-ArgUInt8|Docs}
*
* @param vm A pointer to the virtual machine.
* @param value The unsigned 8-bit integer value to be added as an argument.
*/
export function ArgUInt8(vm: number, value: number): void;
/**
* @description Adds a 16-bit integer argument to the virtual machine's call stack.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-ArgInt16|Docs}
*
* @param vm A pointer to the virtual machine.
* @param value The 16-bit integer value to be added as an argument.
*/
export function ArgInt16(vm: number, value: number): void;
/**
* @description Adds an unsigned 16-bit integer argument to the virtual machine's call stack.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-ArgUInt16|Docs}
*
* @param vm A pointer to the virtual machine.
* @param value The unsigned 16-bit integer value to be added as an argument.
*/
export function ArgUInt16(vm: number, value: number): void;
/**
* @description Adds a 32-bit integer argument to the virtual machine's call stack.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-ArgInt32|Docs}
*
* @param vm A pointer to the virtual machine.
* @param value The 32-bit integer value to be added as an argument.
*/
export function ArgInt32(vm: number, value: number): void;
/**
* @description Adds an unsigned 32-bit integer argument to the virtual machine's call stack.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-ArgUInt32|Docs}
*
* @param vm A pointer to the virtual machine.
* @param value The unsigned 32-bit integer value to be added as an argument.
*/
export function ArgUInt32(vm: number, value: number): void;
/**
* @description Adds a 64-bit integer argument to the virtual machine's call stack.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-ArgInt64|Docs}
*
* @param vm A pointer to the virtual machine.
* @param value The 64-bit integer value to be added as an argument.
*/
export function ArgInt64(vm: number, value: number): void;
/**
* @description Adds an unsigned 64-bit integer argument to the virtual machine's call stack.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-ArgUInt64|Docs}
*
* @param vm A pointer to the virtual machine.
* @param value The unsigned 64-bit integer value to be added as an argument.
*/
export function ArgUInt64(vm: number, value: number): void;
/**
* @description Adds a floating-point argument to the virtual machine's call stack.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-ArgFloat|Docs}
*
* @param vm A pointer to the virtual machine.
* @param value The floating-point value to be added as an argument.
*/
export function ArgFloat(vm: number, value: number): void;
/**
* @description Adds a double-precision floating-point argument to the virtual machine's call stack.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-ArgDouble|Docs}
*
* @param vm A pointer to the virtual machine.
* @param value The double-precision floating-point value to be added as an argument.
*/
export function ArgDouble(vm: number, value: number): void;
/**
* @description Adds a pointer argument to the virtual machine's call stack.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-ArgPointer|Docs}
*
* @param vm A pointer to the virtual machine.
* @param value The pointer value to be added as an argument.
*/
export function ArgPointer(vm: number, value: number): void;
/**
* @description Adds a string argument to the virtual machine's call stack.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-ArgString|Docs}
*
* @param vm A pointer to the virtual machine.
* @param value The string value to be added as an argument.
*/
export function ArgString(vm: number, value: string): void;
/**
* @description Adds an aggregate (struct/array) argument to the virtual machine's call stack.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-ArgAggr|Docs}
*
* @param vm A pointer to the virtual machine.
* @param aggrptr A pointer to the aggregate structure.
* @param value The value to be added as an aggregate argument.
*/
export function ArgAggr(vm: number, aggrptr: number, value: number): void;
/**
* @description Calls a function with no type using the specified virtual machine.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-CallVoid|Docs}
*
* @param vm A pointer to the virtual machine.
* @param funcptr A pointer to the function to be called.
*/
export function CallVoid(vm: number, funcptr: number): void;
/**
* @description Calls a function with a boolean return type using the specified virtual machine.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-CallBool|Docs}
*
* @param vm A pointer to the virtual machine.
* @param funcptr A pointer to the function to be called.
*/
export function CallBool(vm: number, funcptr: number): boolean;
/**
* @description Calls a function with a character return type using the specified virtual machine.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-CallChar|Docs}
*
* @param vm A pointer to the virtual machine.
* @param funcptr A pointer to the function to be called.
*/
export function CallChar(vm: number, funcptr: number): string;
/**
* @description Calls a function with an 8-bit integer return type using the specified virtual machine.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-CallInt8|Docs}
*
* @param vm A pointer to the virtual machine.
* @param funcptr A pointer to the function to be called.
*/
export function CallInt8(vm: number, funcptr: number): number;
/**
* @description Calls a function with an unsigned 8-bit integer return type using the specified virtual machine.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-CallUInt8|Docs}
*
* @param vm A pointer to the virtual machine.
* @param funcptr A pointer to the function to be called.
*/
export function CallUInt8(vm: number, funcptr: number): number;
/**
* @description Calls a function with a 16-bit integer return type using the specified virtual machine.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-CallInt16|Docs}
*
* @param vm A pointer to the virtual machine.
* @param funcptr A pointer to the function to be called.
*/
export function CallInt16(vm: number, funcptr: number): number;
/**
* @description Calls a function with an unsigned 16-bit integer return type using the specified virtual machine.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-CallUInt16|Docs}
*
* @param vm A pointer to the virtual machine.
* @param funcptr A pointer to the function to be called.
*/
export function CallUInt16(vm: number, funcptr: number): number;
/**
* @description Calls a function with a 32-bit integer return type using the specified virtual machine.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-CallInt32|Docs}
*
* @param vm A pointer to the virtual machine.
* @param funcptr A pointer to the function to be called.
*/
export function CallInt32(vm: number, funcptr: number): number;
/**
* @description Calls a function with an unsigned 32-bit integer return type using the specified virtual machine.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-CallUInt32|Docs}
*
* @param vm A pointer to the virtual machine.
* @param funcptr A pointer to the function to be called.
*/
export function CallUInt32(vm: number, funcptr: number): number;
/**
* @description Calls a function with a 64-bit integer return type using the specified virtual machine.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-CallInt64|Docs}
*
* @param vm A pointer to the virtual machine.
* @param funcptr A pointer to the function to be called.
*/
export function CallInt64(vm: number, funcptr: number): number;
/**
* @description Calls a function with an unsigned 64-bit integer return type using the specified virtual machine.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-CallUInt64|Docs}
*
* @param vm A pointer to the virtual machine.
* @param funcptr A pointer to the function to be called.
*/
export function CallUInt64(vm: number, funcptr: number): number;
/**
* @description Calls a function with a floating-point return type using the specified virtual machine.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-CallFloat|Docs}
*
* @param vm A pointer to the virtual machine.
* @param funcptr A pointer to the function to be called.
*/
export function CallFloat(vm: number, funcptr: number): number;
/**
* @description Calls a function with a double-precision floating-point return type using the specified virtual machine.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-CallDouble|Docs}
*
* @param vm A pointer to the virtual machine.
* @param funcptr A pointer to the function to be called.
*/
export function CallDouble(vm: number, funcptr: number): number;
/**
* @description Calls a function with a pointer return type using the specified virtual machine.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-CallPointer|Docs}
*
* @param vm A pointer to the virtual machine.
* @param funcptr A pointer to the function to be called.
*/
export function CallPointer(vm: number, funcptr: number): number;
/**
* @description Calls a function with a string return type using the specified virtual machine.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-CallString|Docs}
*
* @param vm A pointer to the virtual machine.
* @param funcptr A pointer to the function to be called.
*/
export function CallString(vm: number, funcptr: number): string;
/**
* @description Calls a function with an aggregate (struct/array) return type using the specified virtual machine.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-CallAggr|Docs}
*
* @param vm A pointer to the virtual machine.
* @param funcptr A pointer to the function to be called.
* @param aggrptr A pointer to the aggregate structure.
* @param returnValue A pointer to store the return value of the function call.
*/
export function CallAggr(vm: number, funcptr: number, aggrptr: number, returnValue: number): void;
/**
* @description Begins a function call with an aggregate (struct/array) argument using the specified virtual machine.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-BeginCallAggr|Docs}
*
* @param vm A pointer to the virtual machine.
* @param aggrptr A pointer to the aggregate structure.
*/
export function BeginCallAggr(vm: number, aggrptr: number): void;
/**
* @description Retrieves the error code from the specified virtual machine.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-GetError|Docs}
*
* @param vm A pointer to the virtual machine.
*/
export function GetError(vm: number): number;
/**
* @description Creates a new aggregate (struct/array) with the specified field count and size.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-NewAggr|Docs}
*
* @param fieldCount The number of fields in the aggregate.
* @param size The size of the aggregate in bytes.
*/
export function NewAggr(fieldCount: number, size: number): number;
/**
* @description Adds a field to the specified aggregate structure.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-AggrField|Docs}
*
* @param Aggrptr A pointer to the aggregate structure.
* @param type The type of the field to be added.
* @param offset The offset of the field within the aggregate.
* @param arrayLength The length of the array if the field is an array.
*/
export function AggrField(Aggrptr: number, type: SigChar, offset: number, arrayLength: number): void;
/**
* @description Finalizes the creation of the specified aggregate structure.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-CloseAggr|Docs}
*
* @param Aggrptr A pointer to the aggregate structure.
*/
export function CloseAggr(Aggrptr: number): void;
/**
* @description Frees the memory allocated for the specified aggregate structure.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-FreeAggr|Docs}
*
* @param Aggrptr A pointer to the aggregate structure to be freed.
*/
export function FreeAggr(Aggrptr: number): void;
/**
* @description Retrieves the mode corresponding to the specified calling convention signature character.
*
* {@link https://untrustedmodders.github.io/plugify-generator/?file=undefined/blob/main/plugify-plugin-dyncall.pplugin.in#item-GetModeFromCCSigChar|Docs}
*
* @param sigChar The calling convention signature character.
*/
export function GetModeFromCCSigChar(sigChar: string): number;
}