140 lines
5.7 KiB
TypeScript
140 lines
5.7 KiB
TypeScript
/// <reference path="./glib-2.0.d.ts" />
|
|
/// <reference path="./gio-2.0.d.ts" />
|
|
/// <reference path="./gobject-2.0.d.ts" />
|
|
/// <reference path="./gmodule-2.0.d.ts" />
|
|
/// <reference path="./unity-7.0.d.ts" />
|
|
|
|
/**
|
|
* Type Definitions for Gjs (https://gjs.guide/)
|
|
*
|
|
* These type definitions are automatically generated, do not edit them by hand.
|
|
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
|
|
*
|
|
* The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
|
|
*/
|
|
|
|
declare module 'gi://UnityExtras?version=7.0' {
|
|
// Module dependencies
|
|
import type GLib from 'gi://GLib?version=2.0';
|
|
import type Gio from 'gi://Gio?version=2.0';
|
|
import type GObject from 'gi://GObject?version=2.0';
|
|
import type GModule from 'gi://GModule?version=2.0';
|
|
import type Unity from 'gi://Unity?version=7.0';
|
|
|
|
export namespace UnityExtras {
|
|
/**
|
|
* UnityExtras-7.0
|
|
*/
|
|
|
|
function show_in_folder(uri: string): Promise<void>;
|
|
function show_in_folder(uri: string, _callback_: Gio.AsyncReadyCallback<string> | null): void;
|
|
function show_in_folder(uri: string, _callback_?: Gio.AsyncReadyCallback<string> | null): Promise<void> | void;
|
|
function show_in_folder_finish(_res_: Gio.AsyncResult): void;
|
|
function dbus_name_has_owner(name: string): boolean;
|
|
function dbus_own_name(name: string, scope_creation_cb: CreateScopeCallback): Gio.Application | null;
|
|
interface CreateScopeCallback {
|
|
(): void;
|
|
}
|
|
module PreviewPlayer {
|
|
// Signal callback interfaces
|
|
|
|
interface Progress {
|
|
(uri: string, state: never, progress: number): void;
|
|
}
|
|
|
|
// Constructor properties interface
|
|
|
|
interface ConstructorProps extends GObject.Object.ConstructorProps {}
|
|
}
|
|
|
|
class PreviewPlayer extends GObject.Object {
|
|
static $gtype: GObject.GType<PreviewPlayer>;
|
|
|
|
// Constructors
|
|
|
|
constructor(properties?: Partial<PreviewPlayer.ConstructorProps>, ...args: any[]);
|
|
|
|
_init(...args: any[]): void;
|
|
|
|
static ['new'](): PreviewPlayer;
|
|
|
|
// Signals
|
|
|
|
connect(id: string, callback: (...args: any[]) => any): number;
|
|
connect_after(id: string, callback: (...args: any[]) => any): number;
|
|
emit(id: string, ...args: any[]): void;
|
|
connect(
|
|
signal: 'progress',
|
|
callback: (_source: this, uri: string, state: never, progress: number) => void,
|
|
): number;
|
|
connect_after(
|
|
signal: 'progress',
|
|
callback: (_source: this, uri: string, state: never, progress: number) => void,
|
|
): number;
|
|
emit(signal: 'progress', uri: string, state: never, progress: number): void;
|
|
|
|
// Methods
|
|
|
|
play(uri: string): Promise<void>;
|
|
play(uri: string, _callback_: Gio.AsyncReadyCallback<this> | null): void;
|
|
play(uri: string, _callback_?: Gio.AsyncReadyCallback<this> | null): Promise<void> | void;
|
|
play_finish(_res_: Gio.AsyncResult): void;
|
|
pause(): Promise<void>;
|
|
pause(_callback_: Gio.AsyncReadyCallback<this> | null): void;
|
|
pause(_callback_?: Gio.AsyncReadyCallback<this> | null): Promise<void> | void;
|
|
pause_finish(_res_: Gio.AsyncResult): void;
|
|
pause_resume(): Promise<void>;
|
|
pause_resume(_callback_: Gio.AsyncReadyCallback<this> | null): void;
|
|
pause_resume(_callback_?: Gio.AsyncReadyCallback<this> | null): Promise<void> | void;
|
|
pause_resume_finish(_res_: Gio.AsyncResult): void;
|
|
resume(): Promise<void>;
|
|
resume(_callback_: Gio.AsyncReadyCallback<this> | null): void;
|
|
resume(_callback_?: Gio.AsyncReadyCallback<this> | null): Promise<void> | void;
|
|
resume_finish(_res_: Gio.AsyncResult): void;
|
|
stop(): Promise<void>;
|
|
stop(_callback_: Gio.AsyncReadyCallback<this> | null): void;
|
|
stop(_callback_?: Gio.AsyncReadyCallback<this> | null): Promise<void> | void;
|
|
stop_finish(_res_: Gio.AsyncResult): void;
|
|
close(): Promise<void>;
|
|
close(_callback_: Gio.AsyncReadyCallback<this> | null): void;
|
|
close(_callback_?: Gio.AsyncReadyCallback<this> | null): Promise<void> | void;
|
|
close_finish(_res_: Gio.AsyncResult): void;
|
|
video_properties(uri: string): Promise<GLib.HashTable<string, GLib.Variant>>;
|
|
video_properties(uri: string, _callback_: Gio.AsyncReadyCallback<this> | null): void;
|
|
video_properties(
|
|
uri: string,
|
|
_callback_?: Gio.AsyncReadyCallback<this> | null,
|
|
): Promise<GLib.HashTable<string, GLib.Variant>> | void;
|
|
video_properties_finish(_res_: Gio.AsyncResult): GLib.HashTable<string, GLib.Variant>;
|
|
}
|
|
|
|
type PreviewPlayerClass = typeof PreviewPlayer;
|
|
abstract class PreviewPlayerPrivate {
|
|
static $gtype: GObject.GType<PreviewPlayerPrivate>;
|
|
|
|
// Constructors
|
|
|
|
_init(...args: any[]): void;
|
|
}
|
|
|
|
/**
|
|
* Name of the imported GIR library
|
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
|
|
*/
|
|
const __name__: string;
|
|
/**
|
|
* Version of the imported GIR library
|
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
|
|
*/
|
|
const __version__: string;
|
|
}
|
|
|
|
export default UnityExtras;
|
|
}
|
|
|
|
declare module 'gi://UnityExtras' {
|
|
import UnityExtras70 from 'gi://UnityExtras?version=7.0';
|
|
export default UnityExtras70;
|
|
}
|
|
// END
|