/
Retro-1.d.ts
1953 lines (1737 loc) · 72.5 KB
/
Retro-1.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// @ts-nocheck
/*
* Type Definitions for node-gtk (https://github.com/romgrk/node-gtk)
*
* These type definitions are automatically generated, do not edit them by hand.
* If you found a bug fix it in ts-for-gir itself or create a bug report on https://github.com/sammydre/ts-for-gjs
*/
/**
* Retro-1
*/
import type Gtk from './Gtk-3.0';
import type xlib from './xlib-2.0';
import type Gdk from './Gdk-3.0';
import type cairo from './cairo-1.0';
import type Pango from './Pango-1.0';
import type HarfBuzz from './HarfBuzz-0.0';
import type GObject from './GObject-2.0';
import type GLib from './GLib-2.0';
import type Gio from './Gio-2.0';
import type GdkPixbuf from './GdkPixbuf-2.0';
import type GModule from './GModule-2.0';
import type Atk from './Atk-1.0';
export namespace Retro {
/**
* Represents the axes of the analog sticks for the Libretro gamepad.
*/
enum AnalogId {
/**
* the X axis of an analog stick
*/
X,
/**
* the Y axis of an analog stick
*/
Y,
}
/**
* Represents the analog sticks for the Libretro gamepad.
*/
enum AnalogIndex {
/**
* the left analog stick
*/
LEFT,
/**
* the right analog stick
*/
RIGHT,
}
/**
* Represents the base types for Libretro controllers.
*/
enum ControllerType {
/**
* no controller
*/
NONE,
/**
* a classic gamepad
*/
JOYPAD,
/**
* a simple mouse
*/
MOUSE,
/**
* a keyboard
*/
KEYBOARD,
/**
* a lightgun
*/
LIGHTGUN,
/**
* a gamepad with analog sticks
*/
ANALOG,
/**
* a screen pointer
*/
POINTER,
/**
* a mask to get the super type of a derived one
*/
TYPE_MASK,
}
/**
* Represents the buttons for the Libretro gamepad. The available buttons are
* the same as the W3C Standard Gamepad, the SDL GameController and many other
* modern standard gamepads, but the name of the buttons may differ. See the
* <ulink url="https://w3c.github.io/gamepad/">W3C Gamepad Specification</ulink>
* and the <ulink url="https://wiki.libsdl.org/CategoryGameController">SDL
* GamepadController definition</ulink> for more information.
*/
enum JoypadId {
/**
* the bottom action button
*/
B,
/**
* the left action button
*/
Y,
/**
* the Select button
*/
SELECT,
/**
* the Start button
*/
START,
/**
* the up directional button
*/
UP,
/**
* the down directional button
*/
DOWN,
/**
* the left directional button
*/
LEFT,
/**
* the right directional button
*/
RIGHT,
/**
* the right action button
*/
A,
/**
* the top action button
*/
X,
/**
* the first left shoulder button
*/
L,
/**
* the first right shoulder button
*/
R,
/**
* the second left shoulder button
*/
L2,
/**
* the second right shoulder button
*/
R2,
/**
* the left thumb button
*/
L3,
/**
* the right thumb button
*/
R3,
}
/**
* Represents the inputs for the Libretro lightgun.
*/
enum LightgunId {
/**
* the X axis of a lightgun
*/
X,
/**
* the Y axis of a lightgun
*/
Y,
/**
* the trigger of a lightgun
*/
TRIGGER,
/**
* the cursor of a lightgun
*/
CURSOR,
/**
* the turbo button of a lightgun
*/
TURBO,
/**
* the pause button of a lightgun
*/
PAUSE,
/**
* the start button of a lightgun
*/
START,
}
/**
* Represents the memory types for the Libretro core.
*/
enum MemoryType {
/**
* the save RAM
*/
SAVE_RAM,
/**
* the real time clock
*/
RTC,
/**
* the system RAM
*/
SYSTEM_RAM,
/**
* the video RAM
*/
VIDEO_RAM,
}
/**
* Represents the inputs for the Libretro mouse.
*/
enum MouseId {
/**
* the X axis of a mouse
*/
X,
/**
* the Y axis of a mouse
*/
Y,
/**
* the left button of a mouse
*/
LEFT,
/**
* the right button of a mouse
*/
RIGHT,
/**
* the up direction of a mouse wheel
*/
WHEELUP,
/**
* the down direction of a mouse wheel
*/
WHEELDOWN,
/**
* the middle button of a mouse
*/
MIDDLE,
/**
* the horizontal up direction of a mouse wheel
*/
HORIZ_WHEELUP,
/**
* the horizontal down direction of a mouse wheel
*/
HORIZ_WHEELDOWN,
/**
* the fourth button of a mouse
*/
BUTTON_4,
/**
* the fifth button of a mouse
*/
BUTTON_5,
}
/**
* Represents the inputs for the Libretro pointer.
*/
enum PointerId {
/**
* the X axis of a pointer
*/
X,
/**
* the Y axis of a pointer
*/
Y,
/**
* the pression of a pointer
*/
PRESSED,
}
/**
* Represents the strength of the rumble effect.
*/
enum RumbleEffect {
/**
* the strong rumble effect
*/
STRONG,
/**
* the weak rumble effect
*/
WEAK,
}
/**
* Represents the filters that can be applied to the video output.
*/
enum VideoFilter {
/**
* a smooth but blurry video filer
*/
SMOOTH,
/**
* a sharp video filter showing every pixel
*/
SHARP,
/**
* a video filter mimicking CRT screens
*/
CRT,
}
function controllerTypeGetIdCount(type: ControllerType): number
function controllerTypeGetIndexCount(type: ControllerType): number
/**
* Logs an error or debugging message.
*
* This is a convenience function to forward the #RetroCore::log signal of
* #RetroCore to g_log(), see it for more information.
* @param sender a #RetroCore
* @param logDomain the log domain, usually #G_LOG_DOMAIN, or %NULL
* @param logLevel the log level, either from #GLogLevelFlags or a user-defined level
* @param message the message to log
*/
function gLog(sender: Core, logDomain: string | null, logLevel: GLib.LogLevelFlags, message: string): void
function gtkGetResource(): Gio.Resource
function joypadIdFromButtonCode(buttonCode: number): JoypadId
function joypadIdToButtonCode(joypadId: JoypadId): number
/**
* Gets the aspect ratio of `pixbuf` by reading the 'aspect-ratio' pixbuf option.
* @param pixbuf a #GdkPixbuf
*/
function pixbufGetAspectRatio(pixbuf: GdkPixbuf.Pixbuf): number
/**
* Sets the aspect ratio of `pixbuf` by setting the 'aspect-ratio' pixbuf option.
* Use retro_pixbuf_get_aspect_ratio() to retrieve it.
* @param pixbuf a #GdkPixbuf
* @param aspectRatio the aspect ratio value
*/
function pixbufSetAspectRatio(pixbuf: GdkPixbuf.Pixbuf, aspectRatio: number): void
/**
* Gets a #RetroVideoFilter from it's name. It defaults to
* RETRO_VIDEO_FILTER_SMOOTH in case of error.
* @param filter a filter name
*/
function videoFilterFromString(filter: string): VideoFilter
interface Controller_ConstructProps extends GObject.Object_ConstructProps {
}
/**
* Signal callback interface for `state-changed`
*/
interface Controller_StateChangedSignalCallback {
(): void
}
interface Controller {
// Owm methods of Retro-1.Retro.Controller
emitStateChanged(): void
/**
* Gets a flag representing the capabilities of `self`. Each bit index matches
* the #RetroControllerType of same number.
*
* For example, if `self` is an analog gamepad, the value would be: (1 <<
* RETRO_CONTROLLER_TYPE_JOYPAD) | (1 << RETRO_CONTROLLER_TYPE_ANALOG).
*/
getCapabilities(): number
/**
* Gets the main type of the controller.
*/
getControllerType(): ControllerType
/**
* Gets the state of an input of `self`.
* @param input a #RetroInput to query `self`
*/
getInputState(input: Input): number
/**
* Gets whether `self` supports rumble effects.
*/
getSupportsRumble(): boolean
/**
* Gets whether `self` has the capability to represent the given controller type.
* @param controllerType a #RetroControllerType
*/
hasCapability(controllerType: ControllerType): boolean
/**
* Sets the rumble state of `self`.
* @param effect the rumble effect
* @param strength the rumble effect strength
*/
setRumbleState(effect: RumbleEffect, strength: number): void
// Own signals of Retro-1.Retro.Controller
connect(sigName: "state-changed", callback: Controller_StateChangedSignalCallback): number
on(sigName: "state-changed", callback: Controller_StateChangedSignalCallback, after?: boolean): NodeJS.EventEmitter
once(sigName: "state-changed", callback: Controller_StateChangedSignalCallback, after?: boolean): NodeJS.EventEmitter
off(sigName: "state-changed", callback: Controller_StateChangedSignalCallback): NodeJS.EventEmitter
emit(sigName: "state-changed", ...args: any[]): void
// Class property signals of Retro-1.Retro.Controller
connect(sigName: string, callback: (...args: any[]) => void): number
on(sigName: string, callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
once(sigName: string, callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
off(sigName: string, callback: (...args: any[]) => void): NodeJS.EventEmitter
emit(sigName: string, ...args: any[]): void
}
class Controller extends GObject.Object {
// Own properties of Retro-1.Retro.Controller
static name: string
static $gtype: GObject.GType<Controller>
// Constructors of Retro-1.Retro.Controller
constructor(config?: Controller_ConstructProps)
_init(config?: Controller_ConstructProps): void
}
interface ControllerIterator_ConstructProps extends GObject.Object_ConstructProps {
}
interface ControllerIterator {
// Owm methods of Retro-1.Retro.ControllerIterator
/**
* Fetch the next #RetroController and the port number it is plugged into.
*/
next(): [ /* returnType */ boolean, /* port */ number, /* controller */ Controller ]
// Class property signals of Retro-1.Retro.ControllerIterator
connect(sigName: string, callback: (...args: any[]) => void): number
on(sigName: string, callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
once(sigName: string, callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
off(sigName: string, callback: (...args: any[]) => void): NodeJS.EventEmitter
emit(sigName: string, ...args: any[]): void
}
class ControllerIterator extends GObject.Object {
// Own properties of Retro-1.Retro.ControllerIterator
static name: string
static $gtype: GObject.GType<ControllerIterator>
// Constructors of Retro-1.Retro.ControllerIterator
constructor(config?: ControllerIterator_ConstructProps)
_init(config?: ControllerIterator_ConstructProps): void
}
interface Core_ConstructProps extends GObject.Object_ConstructProps {
// Own constructor properties of Retro-1.Retro.Core
contentDirectory?: string | null
/**
* The filename of the core.
*/
filename?: string | null
/**
* The number of frames to run ahead of time. This allows to know in advance
* what should happen in the given number of frames, allowing to react in
* advance.
*
* Note that this is resource intensive as the core will be iterated over
* multiple times for each perceived iteration. In order to work, this
* requires the cores to properly support serialization, otherwise the
* behavior is undefined.
*/
runahead?: number | null
/**
* The save directory of the core.
*
* The core will save some data here.
*/
saveDirectory?: string | null
/**
* The speed ratio at wich the core will run.
*/
speedRate?: number | null
/**
* The system directory of the core.
*
* The core will look here for additional data, such as firmware ROMs or
* configuration files.
*/
systemDirectory?: string | null
/**
* The name of the user.
*/
userName?: string | null
}
/**
* Signal callback interface for `crashed`
*/
interface Core_CrashedSignalCallback {
(message: string): void
}
/**
* Signal callback interface for `log`
*/
interface Core_LogSignalCallback {
(logDomain: string, logLevel: GLib.LogLevelFlags, message: string): void
}
/**
* Signal callback interface for `message`
*/
interface Core_MessageSignalCallback {
(message: string, frames: number): void
}
/**
* Signal callback interface for `shutdown`
*/
interface Core_ShutdownSignalCallback {
(): void
}
/**
* Signal callback interface for `video-output`
*/
interface Core_VideoOutputSignalCallback {
(pixdata: Pixdata): void
}
interface Core {
// Own properties of Retro-1.Retro.Core
/**
* The Libretro API version implement by the core.
*/
readonly apiVersion: number
contentDirectory: string
/**
* The filename of the core.
*/
readonly filename: string
/**
* The FPS rate for the core's video output.
*/
readonly framesPerSecond: number
/**
* Whether a game has been loaded.
*/
readonly gameLoaded: boolean
/**
* Whether the core has been initiated.
*/
readonly isInitiated: boolean
/**
* The number of frames to run ahead of time. This allows to know in advance
* what should happen in the given number of frames, allowing to react in
* advance.
*
* Note that this is resource intensive as the core will be iterated over
* multiple times for each perceived iteration. In order to work, this
* requires the cores to properly support serialization, otherwise the
* behavior is undefined.
*/
runahead: number
/**
* The save directory of the core.
*
* The core will save some data here.
*/
saveDirectory: string
/**
* The speed ratio at wich the core will run.
*/
speedRate: number
/**
* Whether the core supports running with no game.
*/
readonly supportNoGame: boolean
/**
* The system directory of the core.
*
* The core will look here for additional data, such as firmware ROMs or
* configuration files.
*/
systemDirectory: string
/**
* The name of the user.
*/
userName: string
// Owm methods of Retro-1.Retro.Core
/**
* This initializes `self,` loads its available options and loads the medias. You
* need to boot `self` before using some of its methods.
*/
boot(): void
/**
* Gets the Libretro API version implement by the core.
*/
getApiVersion(): number
/**
* Gets whether the state of `self` can be accessed.
*/
getCanAccessState(): boolean
getContentDirectory(): string
/**
* Gets the filename of the core.
*/
getFilename(): string
/**
* Gets the FPS rate for the core's video output.
*/
getFramesPerSecond(): number
/**
* Gets whether a game has been loaded.
*/
getGameLoaded(): boolean
/**
* Gets whether the core has been initiated.
*/
getIsInitiated(): boolean
/**
* Gets the size of a memory region of `self`.
* @param memoryType the type of memory
*/
getMemorySize(memoryType: MemoryType): number
/**
* Gets the option for the given key.
* @param key the key of the option
*/
getOption(key: string): Option
getRunahead(): number
/**
* Gets the save directory of the core.
*
* The core will save some data here.
*/
getSaveDirectory(): string
/**
* Gets the speed rate at which to run the core.
*/
getSpeedRate(): number
/**
* Gets whether the core supports running with no game.
*/
getSupportNoGame(): boolean
/**
* Gets the system directory of the core.
*
* The core will look here for additional data, such as firmware ROMs or
* configuration files.
*/
getSystemDirectory(): string
/**
* Gets the name of the user.
*/
getUserName(): string
/**
* Gets whether the core has an option for the given key.
* @param key the key of the option
*/
hasOption(key: string): boolean
/**
* Creates a new #RetroControllerIterator which can be used to iterate through
* the controllers plugged into `self`.
*/
iterateControllers(): ControllerIterator
/**
* Creates a new #RetroOptionIterator which can be used to iterate through the
* options of `self`.
*/
iterateOptions(): OptionIterator
/**
* Iterate `self` for a frame.
*/
iteration(): void
/**
* Loads a memory region of `self`.
* @param memoryType the type of memory
* @param filename a file to load the data from
*/
loadMemory(memoryType: MemoryType, filename: string): void
/**
* Loads the state of the `self`.
* @param filename the file to load the state from
*/
loadState(filename: string): void
/**
* Overrides default value for the option `key`. This can be used to set value
* for a startup-only option.
*
* You can use this before booting the core.
* @param key the key of the option
* @param value the default value
*/
overrideOptionDefault(key: string, value: string): void
/**
* Resets `self`.
*/
reset(): void
/**
* Starts running the core. If the core was stopped, it will restart from this
* moment.
*/
run(): void
/**
* Saves a memory region of `self`.
* @param memoryType the type of memory
* @param filename a file to save the data to
*/
saveMemory(memoryType: MemoryType, filename: string): void
/**
* Saves the state of `self`.
* @param filename the file to save the state to
*/
saveState(filename: string): void
setContentDirectory(contentDirectory: string): void
/**
* Plugs `controller` into the specified port number of `self`.
* @param port the port number
* @param controller a #RetroController
*/
setController(port: number, controller: Controller | null): void
/**
* Sets the current media index.
*
* You can use this after booting the core.
* @param mediaIndex the media index
*/
setCurrentMedia(mediaIndex: number): void
/**
* Uses `controller` as the default controller for the given type. When a port
* has no controller plugged plugged into it, the core will use the default
* controllers instead.
* @param controllerType a #RetroControllerType
* @param controller a #RetroController
*/
setDefaultController(controllerType: ControllerType, controller: Controller | null): void
/**
* Sets the widget whose key events will be forwarded to `self`.
* @param widget a #GtkWidget, or %NULL
*/
setKeyboard(widget: Gtk.Widget | null): void
/**
* Sets the medias to load into the core.
*
* You can use this before booting the core.
* @param uris the URIs
*/
setMedias(uris: string[]): void
setRunahead(runahead: number): void
/**
* Sets the save directory of the core.
*
* The core will save some data here.
* @param saveDirectory the save directory
*/
setSaveDirectory(saveDirectory: string): void
/**
* Sets the speed rate at which to run the core.
* @param speedRate a speed rate
*/
setSpeedRate(speedRate: number): void
/**
* Sets the system directory of the core.
*
* The core will look here for additional data, such as firmware ROMs or
* configuration files.
* @param systemDirectory the system directory
*/
setSystemDirectory(systemDirectory: string): void
/**
* Sets the name of the user.
* @param userName the user name
*/
setUserName(userName: string): void
/**
* Stops running the core.
*/
stop(): void
// Own signals of Retro-1.Retro.Core
connect(sigName: "crashed", callback: Core_CrashedSignalCallback): number
on(sigName: "crashed", callback: Core_CrashedSignalCallback, after?: boolean): NodeJS.EventEmitter
once(sigName: "crashed", callback: Core_CrashedSignalCallback, after?: boolean): NodeJS.EventEmitter
off(sigName: "crashed", callback: Core_CrashedSignalCallback): NodeJS.EventEmitter
emit(sigName: "crashed", ...args: any[]): void
connect(sigName: "log", callback: Core_LogSignalCallback): number
on(sigName: "log", callback: Core_LogSignalCallback, after?: boolean): NodeJS.EventEmitter
once(sigName: "log", callback: Core_LogSignalCallback, after?: boolean): NodeJS.EventEmitter
off(sigName: "log", callback: Core_LogSignalCallback): NodeJS.EventEmitter
emit(sigName: "log", logLevel: GLib.LogLevelFlags, message: string, ...args: any[]): void
connect(sigName: "message", callback: Core_MessageSignalCallback): number
on(sigName: "message", callback: Core_MessageSignalCallback, after?: boolean): NodeJS.EventEmitter
once(sigName: "message", callback: Core_MessageSignalCallback, after?: boolean): NodeJS.EventEmitter
off(sigName: "message", callback: Core_MessageSignalCallback): NodeJS.EventEmitter
emit(sigName: "message", frames: number, ...args: any[]): void
connect(sigName: "shutdown", callback: Core_ShutdownSignalCallback): number
on(sigName: "shutdown", callback: Core_ShutdownSignalCallback, after?: boolean): NodeJS.EventEmitter
once(sigName: "shutdown", callback: Core_ShutdownSignalCallback, after?: boolean): NodeJS.EventEmitter
off(sigName: "shutdown", callback: Core_ShutdownSignalCallback): NodeJS.EventEmitter
emit(sigName: "shutdown", ...args: any[]): void
connect(sigName: "video-output", callback: Core_VideoOutputSignalCallback): number
on(sigName: "video-output", callback: Core_VideoOutputSignalCallback, after?: boolean): NodeJS.EventEmitter
once(sigName: "video-output", callback: Core_VideoOutputSignalCallback, after?: boolean): NodeJS.EventEmitter
off(sigName: "video-output", callback: Core_VideoOutputSignalCallback): NodeJS.EventEmitter
emit(sigName: "video-output", ...args: any[]): void
// Class property signals of Retro-1.Retro.Core
connect(sigName: "notify::api-version", callback: (...args: any[]) => void): number
on(sigName: "notify::api-version", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
once(sigName: "notify::api-version", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
off(sigName: "notify::api-version", callback: (...args: any[]) => void): NodeJS.EventEmitter
emit(sigName: "notify::api-version", ...args: any[]): void
connect(sigName: "notify::content-directory", callback: (...args: any[]) => void): number
on(sigName: "notify::content-directory", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
once(sigName: "notify::content-directory", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
off(sigName: "notify::content-directory", callback: (...args: any[]) => void): NodeJS.EventEmitter
emit(sigName: "notify::content-directory", ...args: any[]): void
connect(sigName: "notify::filename", callback: (...args: any[]) => void): number
on(sigName: "notify::filename", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
once(sigName: "notify::filename", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
off(sigName: "notify::filename", callback: (...args: any[]) => void): NodeJS.EventEmitter
emit(sigName: "notify::filename", ...args: any[]): void
connect(sigName: "notify::frames-per-second", callback: (...args: any[]) => void): number
on(sigName: "notify::frames-per-second", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
once(sigName: "notify::frames-per-second", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
off(sigName: "notify::frames-per-second", callback: (...args: any[]) => void): NodeJS.EventEmitter
emit(sigName: "notify::frames-per-second", ...args: any[]): void
connect(sigName: "notify::game-loaded", callback: (...args: any[]) => void): number
on(sigName: "notify::game-loaded", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
once(sigName: "notify::game-loaded", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
off(sigName: "notify::game-loaded", callback: (...args: any[]) => void): NodeJS.EventEmitter
emit(sigName: "notify::game-loaded", ...args: any[]): void
connect(sigName: "notify::is-initiated", callback: (...args: any[]) => void): number
on(sigName: "notify::is-initiated", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
once(sigName: "notify::is-initiated", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
off(sigName: "notify::is-initiated", callback: (...args: any[]) => void): NodeJS.EventEmitter
emit(sigName: "notify::is-initiated", ...args: any[]): void
connect(sigName: "notify::runahead", callback: (...args: any[]) => void): number
on(sigName: "notify::runahead", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
once(sigName: "notify::runahead", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
off(sigName: "notify::runahead", callback: (...args: any[]) => void): NodeJS.EventEmitter
emit(sigName: "notify::runahead", ...args: any[]): void
connect(sigName: "notify::save-directory", callback: (...args: any[]) => void): number
on(sigName: "notify::save-directory", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
once(sigName: "notify::save-directory", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
off(sigName: "notify::save-directory", callback: (...args: any[]) => void): NodeJS.EventEmitter
emit(sigName: "notify::save-directory", ...args: any[]): void
connect(sigName: "notify::speed-rate", callback: (...args: any[]) => void): number
on(sigName: "notify::speed-rate", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
once(sigName: "notify::speed-rate", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
off(sigName: "notify::speed-rate", callback: (...args: any[]) => void): NodeJS.EventEmitter
emit(sigName: "notify::speed-rate", ...args: any[]): void
connect(sigName: "notify::support-no-game", callback: (...args: any[]) => void): number
on(sigName: "notify::support-no-game", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
once(sigName: "notify::support-no-game", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
off(sigName: "notify::support-no-game", callback: (...args: any[]) => void): NodeJS.EventEmitter
emit(sigName: "notify::support-no-game", ...args: any[]): void
connect(sigName: "notify::system-directory", callback: (...args: any[]) => void): number
on(sigName: "notify::system-directory", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
once(sigName: "notify::system-directory", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
off(sigName: "notify::system-directory", callback: (...args: any[]) => void): NodeJS.EventEmitter
emit(sigName: "notify::system-directory", ...args: any[]): void
connect(sigName: "notify::user-name", callback: (...args: any[]) => void): number
on(sigName: "notify::user-name", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
once(sigName: "notify::user-name", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
off(sigName: "notify::user-name", callback: (...args: any[]) => void): NodeJS.EventEmitter
emit(sigName: "notify::user-name", ...args: any[]): void
connect(sigName: string, callback: (...args: any[]) => void): number
on(sigName: string, callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
once(sigName: string, callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
off(sigName: string, callback: (...args: any[]) => void): NodeJS.EventEmitter
emit(sigName: string, ...args: any[]): void
}
class Core extends GObject.Object {
// Own properties of Retro-1.Retro.Core
static name: string
static $gtype: GObject.GType<Core>
// Constructors of Retro-1.Retro.Core
constructor(config?: Core_ConstructProps)
/**
* Creates a new #RetroCore.
* @constructor
* @param filename the filename of a Libretro core
*/
constructor(filename: string)
/**
* Creates a new #RetroCore.
* @constructor
* @param filename the filename of a Libretro core
*/
static new(filename: string): Core
_init(config?: Core_ConstructProps): void
}
interface CoreDescriptor_ConstructProps extends GObject.Object_ConstructProps {
}
interface CoreDescriptor {
// Owm methods of Retro-1.Retro.CoreDescriptor
/**
* Gets the MD5 fingerprint of the firmware file, or %NULL.
* @param firmware a firmware name
*/
getFirmwareMd5(firmware: string): string | null
/**
* Gets the demanded path to the firmware file, or %NULL.
* @param firmware a firmware name
*/
getFirmwarePath(firmware: string): string | null
/**
* Gets the SHA512 fingerprint of the firmware file, or %NULL.
* @param firmware a firmware name
*/
getFirmwareSha512(firmware: string): string | null
/**
* Gets the list of firmwares used by the core for this platform.
* @param platform a platform name
*/
getFirmwares(platform: string): string[]
/**
* Gets the icon, or %NULL if it doesn't exist.
*/
getIcon(): Gio.Icon | null
/**
* Gets the ID of `self`.
*/
getId(): string
/**
* Gets whether the core is an emulator, and hence need games to be loaded.
*/
getIsEmulator(): boolean
/**
* Gets whether the firmware is mandatory for the core to function.
* @param firmware a firmware name
*/
getIsFirmwareMandatory(firmware: string): boolean
/**
* Gets whether the core is a game, and hence can't load games.
*/
getIsGame(): boolean
/**
* Gets the list of MIME types accepted used by the core for this platform.
* @param platform a platform name
*/
getMimeType(platform: string): string[]
/**
* Gets the module file name, or %NULL if it doesn't exist.
*/
getModule(): string | null
/**
* Gets the module file, or %NULL if it doesn't exist.
*/
getModuleFile(): Gio.File | null
/**
* Gets the name, or %NULL if it doesn't exist.
*/
getName(): string | null
/**
* Gets whether the platform supports all of the given MIME types.
* @param platform a platform name
* @param mimeTypes the MIME types
*/
getPlatformSupportsMimeTypes(platform: string, mimeTypes: string[]): boolean
/**
* Gets the URI of the file of `self`.
*/
getUri(): string
/**
* Gets whether the firmware declares its MD5 fingerprint.
* @param firmware a firmware name
*/
hasFirmwareMd5(firmware: string): boolean
/**
* Gets whether the firmware declares its SHA512 fingerprint.
* @param firmware a firmware name
*/
hasFirmwareSha512(firmware: string): boolean
/**