@girs/gtef-2 4.3.0 → 4.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/gtef-2.d.ts CHANGED
@@ -48,11 +48,11 @@ export namespace Gtef {
48
48
  /**
49
49
  * plain text.
50
50
  */
51
- NONE,
51
+ NONE = 0,
52
52
  /**
53
53
  * gzip compression.
54
54
  */
55
- GZIP,
55
+ GZIP = 1,
56
56
  }
57
57
 
58
58
 
@@ -126,16 +126,16 @@ export namespace Gtef {
126
126
  /**
127
127
  * line feed, used on UNIX.
128
128
  */
129
- LF,
129
+ LF = 0,
130
130
  /**
131
131
  * carriage return, used on Mac.
132
132
  */
133
- CR,
133
+ CR = 1,
134
134
  /**
135
135
  * carriage return followed by a line feed, used
136
136
  * on Windows.
137
137
  */
138
- CR_LF,
138
+ CR_LF = 2,
139
139
  }
140
140
 
141
141
 
@@ -154,16 +154,16 @@ export namespace Gtef {
154
154
  /**
155
155
  * No selection.
156
156
  */
157
- NO_SELECTION,
157
+ NO_SELECTION = 0,
158
158
  /**
159
159
  * The start and end selection bounds are on
160
160
  * the same line.
161
161
  */
162
- ON_SAME_LINE,
162
+ ON_SAME_LINE = 1,
163
163
  /**
164
164
  * The selection spans multiple lines.
165
165
  */
166
- MULTIPLE_LINES,
166
+ MULTIPLE_LINES = 2,
167
167
  }
168
168
 
169
169
 
@@ -307,19 +307,19 @@ export namespace Gtef {
307
307
  /**
308
308
  * No flags.
309
309
  */
310
- NONE,
310
+ NONE = 0,
311
311
  /**
312
312
  * Ignore invalid characters.
313
313
  */
314
- IGNORE_INVALID_CHARS,
314
+ IGNORE_INVALID_CHARS = 1,
315
315
  /**
316
316
  * Save file despite external modifications.
317
317
  */
318
- IGNORE_MODIFICATION_TIME,
318
+ IGNORE_MODIFICATION_TIME = 2,
319
319
  /**
320
320
  * Create a backup before saving the file.
321
321
  */
322
- CREATE_BACKUP,
322
+ CREATE_BACKUP = 4,
323
323
  }
324
324
 
325
325
 
@@ -343,25 +343,25 @@ export namespace Gtef {
343
343
  /**
344
344
  * No code folding here.
345
345
  */
346
- NONE,
346
+ NONE = 0,
347
347
  /**
348
348
  * Start of currently folded
349
349
  * fold region.
350
350
  */
351
- START_FOLDED,
351
+ START_FOLDED = 1,
352
352
  /**
353
353
  * Start of currently opened
354
354
  * fold region.
355
355
  */
356
- START_OPENED,
356
+ START_OPENED = 2,
357
357
  /**
358
358
  * Fold region continues.
359
359
  */
360
- CONTINUE,
360
+ CONTINUE = 4,
361
361
  /**
362
362
  * End of fold region.
363
363
  */
364
- END,
364
+ END = 8,
365
365
  }
366
366
 
367
367
 
@@ -407,12 +407,16 @@ export namespace Gtef {
407
407
  emit(signal: string, ...args: any[]): void;
408
408
 
409
409
  // Static methods
410
+ /**
411
+ * @since 2.0
412
+ */
410
413
  static get_instance(): ActionInfoCentralStore;
411
414
 
412
415
  // Methods
413
416
  /**
414
417
  * @param action_name an action name.
415
418
  * @returns the found {@link Gtef.ActionInfo}, or `null`.
419
+ * @since 2.0
416
420
  */
417
421
  lookup(action_name: string): ActionInfo;
418
422
  }
@@ -481,6 +485,7 @@ export namespace Gtef {
481
485
  * {@link Gtef.ActionInfo} with the same action name. The stores take their own
482
486
  * reference on `info`.
483
487
  * @param info a {@link Gtef.ActionInfo}.
488
+ * @since 2.0
484
489
  */
485
490
  add(info: ActionInfo): void;
486
491
 
@@ -493,6 +498,7 @@ export namespace Gtef {
493
498
  * An API similar to `g_action_map_add_action_entries()`.
494
499
  * @param entries a pointer to the first item in an array of {@link Gtef.ActionInfoEntry} structs.
495
500
  * @param translation_domain a gettext domain, or `null`.
501
+ * @since 2.0
496
502
  */
497
503
  add_entries(entries: ActionInfoEntry[], translation_domain: string | null): void;
498
504
 
@@ -504,6 +510,7 @@ export namespace Gtef {
504
510
  * You probably want to call this function on the store returned by
505
511
  * `gtef_application_get_app_action_info_store()`. But it can also be useful for a
506
512
  * store provided by a library, to easily see which actions you don't use.
513
+ * @since 2.0
507
514
  */
508
515
  check_all_used(): void;
509
516
 
@@ -523,6 +530,7 @@ export namespace Gtef {
523
530
  * for that action, if any).
524
531
  * @param action_name an action name.
525
532
  * @returns a new {@link Gtk.MenuItem} for `action_name`.
533
+ * @since 2.0
526
534
  */
527
535
  create_menu_item(action_name: string): Gtk.Widget;
528
536
 
@@ -534,6 +542,7 @@ export namespace Gtef {
534
542
  /**
535
543
  * @param action_name an action name.
536
544
  * @returns the found {@link Gtef.ActionInfo}, or `null`.
545
+ * @since 2.0
537
546
  */
538
547
  lookup(action_name: string): ActionInfo;
539
548
  }
@@ -597,6 +606,7 @@ export namespace Gtef {
597
606
  * Convenience function that calls `g_application_get_default()` followed by
598
607
  * `gtef_application_get_from_gtk_application()`. The object returned by
599
608
  * `g_application_get_default()` must be a {@link Gtk.Application}.
609
+ * @since 2.0
600
610
  */
601
611
  static get_default(): Application;
602
612
 
@@ -604,6 +614,7 @@ export namespace Gtef {
604
614
  * Returns the {@link Gtef.Application} of `gtk_app`. The returned object is guaranteed
605
615
  * to be the same for the lifetime of `gtk_app`.
606
616
  * @param gtk_app a {@link Gtk.Application}.
617
+ * @since 2.0
607
618
  */
608
619
  static get_from_gtk_application(gtk_app: Gtk.Application): Application;
609
620
 
@@ -614,17 +625,20 @@ export namespace Gtef {
614
625
  * this store. Libraries should provide their own store if they want to share
615
626
  * {@link Gtef.ActionInfo}'s.
616
627
  * @returns the {@link Gtef.ActionInfoStore} reserved for the application.
628
+ * @since 2.0
617
629
  */
618
630
  get_app_action_info_store(): ActionInfoStore;
619
631
 
620
632
  /**
621
633
  * @returns the {@link Gtk.Application} of `gtef_app`.
634
+ * @since 2.0
622
635
  */
623
636
  get_application(): Gtk.Application;
624
637
 
625
638
  /**
626
639
  * Calls `g_application_open()` with a single file and an empty hint.
627
640
  * @param file a {@link Gio.File}.
641
+ * @since 2.0
628
642
  */
629
643
  open_simple(file: Gio.File): void;
630
644
  }
@@ -705,6 +719,7 @@ export namespace Gtef {
705
719
  * Returns the {@link Gtef.ApplicationWindow} of `gtk_window`. The returned object is
706
720
  * guaranteed to be the same for the lifetime of `gtk_window`.
707
721
  * @param gtk_window a {@link Gtk.ApplicationWindow}.
722
+ * @since 2.0
708
723
  */
709
724
  static get_from_gtk_application_window(gtk_window: Gtk.ApplicationWindow): ApplicationWindow;
710
725
 
@@ -720,6 +735,7 @@ export namespace Gtef {
720
735
  * case if the {@link Gtk.MenuItem} has been created with the functions available in
721
736
  * {@link Gtef.ActionInfoStore}.
722
737
  * @param gtef_menu_shell a {@link Gtef.MenuShell}.
738
+ * @since 2.0
723
739
  */
724
740
  connect_menu_to_statusbar(gtef_menu_shell: MenuShell): void;
725
741
 
@@ -731,6 +747,7 @@ export namespace Gtef {
731
747
  * The full path is retrieved with
732
748
  * `gtef_utils_recent_chooser_menu_get_item_uri()`.
733
749
  * @param menu a {@link Gtk.RecentChooserMenu}.
750
+ * @since 2.0
734
751
  */
735
752
  connect_recent_chooser_menu_to_statusbar(menu: Gtk.RecentChooserMenu): void;
736
753
 
@@ -751,22 +768,26 @@ export namespace Gtef {
751
768
  * `gtef_application_open_simple()` is called, so the {@link Gio.Application} must have the
752
769
  * {@link Gio.ApplicationFlags.HANDLES_OPEN} flag set.
753
770
  * @returns a new {@link Gtk.MenuItem}.
771
+ * @since 2.0
754
772
  */
755
773
  create_open_recent_menu_item(): Gtk.Widget;
756
774
 
757
775
  /**
758
776
  * @returns the {@link Gtk.ApplicationWindow} of `gtef_window`.
777
+ * @since 2.0
759
778
  */
760
779
  get_application_window(): Gtk.ApplicationWindow;
761
780
 
762
781
  /**
763
782
  * @returns the {@link Gtef.ApplicationWindow.statusbar}.
783
+ * @since 2.0
764
784
  */
765
785
  get_statusbar(): Gtk.Statusbar | null;
766
786
 
767
787
  /**
768
788
  * Sets the {@link Gtef.ApplicationWindow.statusbar} property.
769
789
  * @param statusbar a {@link Gtk.Statusbar}, or `null`.
790
+ * @since 2.0
770
791
  */
771
792
  set_statusbar(statusbar: Gtk.Statusbar | null): void;
772
793
  }
@@ -897,16 +918,19 @@ export namespace Gtef {
897
918
  * Returns the {@link Gtef.File} of `buffer`. The returned object is guaranteed to be the
898
919
  * same for the lifetime of `buffer`.
899
920
  * @returns the associated {@link Gtef.File}.
921
+ * @since 1.0
900
922
  */
901
923
  get_file(): File;
902
924
 
903
925
  /**
904
926
  * @returns the current {@link Gtef.SelectionType}.
927
+ * @since 1.0
905
928
  */
906
929
  get_selection_type(): SelectionType;
907
930
 
908
931
  /**
909
932
  * @returns the {@link Gtef.Buffer.gtef_style_scheme_id}. Free with `g_free()`.
933
+ * @since 2.0
910
934
  */
911
935
  get_style_scheme_id(): string;
912
936
 
@@ -917,6 +941,7 @@ export namespace Gtef {
917
941
  * - the directory path in parenthesis if the {@link Gtef.File.location} isn't
918
942
  * `null`.
919
943
  * @returns the `buffer` title. Free the return value with `g_free()` when no longer needed.
944
+ * @since 1.0
920
945
  */
921
946
  get_title(): string;
922
947
 
@@ -930,6 +955,7 @@ export namespace Gtef {
930
955
  * the undo/redo {@link GtkSource.Buffer} history must be empty, and the
931
956
  * {@link Gtef.File.location} must be `null`.
932
957
  * @returns `true` if `buffer` has not been touched, `false` otherwise.
958
+ * @since 1.0
933
959
  */
934
960
  is_untouched(): boolean;
935
961
 
@@ -940,6 +966,7 @@ export namespace Gtef {
940
966
  * {@link GtkSource.StyleSchemeManager} as returned by
941
967
  * `gtk_source_style_scheme_manager_get_default()`.
942
968
  * @param style_scheme_id the new value.
969
+ * @since 2.0
943
970
  */
944
971
  set_style_scheme_id(style_scheme_id: string): void;
945
972
  }
@@ -1091,11 +1118,13 @@ export namespace Gtef {
1091
1118
  *
1092
1119
  * Since this function is synchronous, it is advised to call it only on local
1093
1120
  * files. See `gtef_file_is_local()`.
1121
+ * @since 1.0
1094
1122
  */
1095
1123
  check_file_on_disk(): void;
1096
1124
 
1097
1125
  /**
1098
1126
  * @returns the compression type.
1127
+ * @since 1.0
1099
1128
  */
1100
1129
  get_compression_type(): CompressionType;
1101
1130
 
@@ -1103,21 +1132,25 @@ export namespace Gtef {
1103
1132
  * The encoding is initially `null`. After a successful file loading or saving
1104
1133
  * operation, the encoding is non-`null`.
1105
1134
  * @returns the character encoding.
1135
+ * @since 1.0
1106
1136
  */
1107
1137
  get_encoding(): Encoding;
1108
1138
 
1109
1139
  /**
1110
1140
  * @returns the associated {@link Gtef.FileMetadata}.
1141
+ * @since 1.0
1111
1142
  */
1112
1143
  get_file_metadata(): FileMetadata;
1113
1144
 
1114
1145
  /**
1115
1146
  * @returns the {@link Gio.File}.
1147
+ * @since 1.0
1116
1148
  */
1117
1149
  get_location(): Gio.File;
1118
1150
 
1119
1151
  /**
1120
1152
  * @returns the newline type.
1153
+ * @since 1.0
1121
1154
  */
1122
1155
  get_newline_type(): NewlineType;
1123
1156
 
@@ -1128,6 +1161,7 @@ export namespace Gtef {
1128
1161
  * application, starting at 1. When an untitled file is closed, its number is
1129
1162
  * released and can be used by a later untitled file.
1130
1163
  * @returns the `file` short name.
1164
+ * @since 1.0
1131
1165
  */
1132
1166
  get_short_name(): string;
1133
1167
 
@@ -1138,6 +1172,7 @@ export namespace Gtef {
1138
1172
  * To have an up-to-date value, you must first call
1139
1173
  * `gtef_file_check_file_on_disk()`.
1140
1174
  * @returns whether the file has been deleted.
1175
+ * @since 1.0
1141
1176
  */
1142
1177
  is_deleted(): boolean;
1143
1178
 
@@ -1148,6 +1183,7 @@ export namespace Gtef {
1148
1183
  * To have an up-to-date value, you must first call
1149
1184
  * `gtef_file_check_file_on_disk()`.
1150
1185
  * @returns whether the file is externally modified.
1186
+ * @since 1.0
1151
1187
  */
1152
1188
  is_externally_modified(): boolean;
1153
1189
 
@@ -1155,6 +1191,7 @@ export namespace Gtef {
1155
1191
  * Returns whether the file is local. If the {@link Gtef.File.location} is `null`,
1156
1192
  * returns `false`.
1157
1193
  * @returns whether the file is local.
1194
+ * @since 1.0
1158
1195
  */
1159
1196
  is_local(): boolean;
1160
1197
 
@@ -1165,12 +1202,14 @@ export namespace Gtef {
1165
1202
  * To have an up-to-date value, you must first call
1166
1203
  * `gtef_file_check_file_on_disk()`.
1167
1204
  * @returns whether the file is read-only.
1205
+ * @since 1.0
1168
1206
  */
1169
1207
  is_readonly(): boolean;
1170
1208
 
1171
1209
  /**
1172
1210
  * Sets the location.
1173
1211
  * @param location the new {@link Gio.File}, or `null`.
1212
+ * @since 1.0
1174
1213
  */
1175
1214
  set_location(location: Gio.File | null): void;
1176
1215
  }
@@ -1307,36 +1346,43 @@ export namespace Gtef {
1307
1346
  // Methods
1308
1347
  /**
1309
1348
  * @returns the {@link Gtef.Buffer} to load the content into.
1349
+ * @since 1.0
1310
1350
  */
1311
1351
  get_buffer(): Buffer | null;
1312
1352
 
1313
1353
  /**
1314
1354
  * @returns the chunk size.
1355
+ * @since 1.0
1315
1356
  */
1316
1357
  get_chunk_size(): number;
1317
1358
 
1318
1359
  /**
1319
1360
  * @returns the detected file encoding, or `null`.
1361
+ * @since 2.0
1320
1362
  */
1321
1363
  get_encoding(): Encoding | null;
1322
1364
 
1323
1365
  /**
1324
1366
  * @returns the {@link Gtef.File}.
1367
+ * @since 1.0
1325
1368
  */
1326
1369
  get_file(): File | null;
1327
1370
 
1328
1371
  /**
1329
1372
  * @returns the {@link Gio.File} to load.
1373
+ * @since 1.0
1330
1374
  */
1331
1375
  get_location(): Gio.File | null;
1332
1376
 
1333
1377
  /**
1334
1378
  * @returns the maximum content size, or -1 for unlimited.
1379
+ * @since 1.0
1335
1380
  */
1336
1381
  get_max_size(): number;
1337
1382
 
1338
1383
  /**
1339
1384
  * @returns the detected newline type.
1385
+ * @since 2.0
1340
1386
  */
1341
1387
  get_newline_type(): NewlineType;
1342
1388
 
@@ -1347,6 +1393,7 @@ export namespace Gtef {
1347
1393
  * @param io_priority the I/O priority of the request. E.g. `G_PRIORITY_LOW`, `G_PRIORITY_DEFAULT` or `G_PRIORITY_HIGH`.
1348
1394
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
1349
1395
  * @param progress_callback function to call back with progress information, or `null` if progress information is not needed.
1396
+ * @since 1.0
1350
1397
  */
1351
1398
  load_async(io_priority: number, cancellable: Gio.Cancellable | null, progress_callback: Gio.FileProgressCallback | null): globalThis.Promise<boolean>;
1352
1399
 
@@ -1358,6 +1405,7 @@ export namespace Gtef {
1358
1405
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
1359
1406
  * @param progress_callback function to call back with progress information, or `null` if progress information is not needed.
1360
1407
  * @param callback a {@link Gio.AsyncReadyCallback} to call when the request is satisfied.
1408
+ * @since 1.0
1361
1409
  */
1362
1410
  load_async(io_priority: number, cancellable: Gio.Cancellable | null, progress_callback: Gio.FileProgressCallback | null, callback: Gio.AsyncReadyCallback<this> | null): void;
1363
1411
 
@@ -1369,6 +1417,7 @@ export namespace Gtef {
1369
1417
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
1370
1418
  * @param progress_callback function to call back with progress information, or `null` if progress information is not needed.
1371
1419
  * @param callback a {@link Gio.AsyncReadyCallback} to call when the request is satisfied.
1420
+ * @since 1.0
1372
1421
  */
1373
1422
  load_async(io_priority: number, cancellable: Gio.Cancellable | null, progress_callback: Gio.FileProgressCallback | null, callback?: Gio.AsyncReadyCallback<this> | null): globalThis.Promise<boolean> | void;
1374
1423
 
@@ -1376,16 +1425,20 @@ export namespace Gtef {
1376
1425
  * Finishes a file loading started with `gtef_file_loader_load_async()`.
1377
1426
  * @param result a {@link Gio.AsyncResult}.
1378
1427
  * @returns whether the content has been loaded successfully.
1428
+ * @since 1.0
1429
+ * @throws GLib.Error
1379
1430
  */
1380
1431
  load_finish(result: Gio.AsyncResult): boolean;
1381
1432
 
1382
1433
  /**
1383
1434
  * @param chunk_size the new chunk size.
1435
+ * @since 1.0
1384
1436
  */
1385
1437
  set_chunk_size(chunk_size: bigint | number): void;
1386
1438
 
1387
1439
  /**
1388
1440
  * @param max_size the new maximum size, or -1 for unlimited.
1441
+ * @since 1.0
1389
1442
  */
1390
1443
  set_max_size(max_size: bigint | number): void;
1391
1444
  }
@@ -1451,11 +1504,13 @@ export namespace Gtef {
1451
1504
  * Gets the value of a metadata stored in the `metadata` object memory.
1452
1505
  * @param key the name of the metadata.
1453
1506
  * @returns the value of the metadata, or `null` if the metadata doesn't exist. Free with `g_free()`.
1507
+ * @since 1.0
1454
1508
  */
1455
1509
  get(key: string): string | null;
1456
1510
 
1457
1511
  /**
1458
1512
  * @returns the {@link Gtef.File} that the metadata belong to.
1513
+ * @since 1.0
1459
1514
  */
1460
1515
  get_file(): File;
1461
1516
 
@@ -1472,6 +1527,8 @@ export namespace Gtef {
1472
1527
  * If {@link Gtef.File.location} is `null`, `false` is simply returned.
1473
1528
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
1474
1529
  * @returns whether the metadata was loaded successfully.
1530
+ * @since 1.0
1531
+ * @throws GLib.Error
1475
1532
  */
1476
1533
  load(cancellable: Gio.Cancellable | null): boolean;
1477
1534
 
@@ -1485,6 +1542,7 @@ export namespace Gtef {
1485
1542
  * See the {@link Gio.AsyncResult} documentation to know how to use this function.
1486
1543
  * @param io_priority the I/O priority of the request. E.g. `G_PRIORITY_LOW`, `G_PRIORITY_DEFAULT` or `G_PRIORITY_HIGH`.
1487
1544
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
1545
+ * @since 1.0
1488
1546
  */
1489
1547
  load_async(io_priority: number, cancellable: Gio.Cancellable | null): globalThis.Promise<boolean>;
1490
1548
 
@@ -1499,6 +1557,7 @@ export namespace Gtef {
1499
1557
  * @param io_priority the I/O priority of the request. E.g. `G_PRIORITY_LOW`, `G_PRIORITY_DEFAULT` or `G_PRIORITY_HIGH`.
1500
1558
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
1501
1559
  * @param callback a {@link Gio.AsyncReadyCallback} to call when the request is satisfied.
1560
+ * @since 1.0
1502
1561
  */
1503
1562
  load_async(io_priority: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void;
1504
1563
 
@@ -1513,6 +1572,7 @@ export namespace Gtef {
1513
1572
  * @param io_priority the I/O priority of the request. E.g. `G_PRIORITY_LOW`, `G_PRIORITY_DEFAULT` or `G_PRIORITY_HIGH`.
1514
1573
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
1515
1574
  * @param callback a {@link Gio.AsyncReadyCallback} to call when the request is satisfied.
1575
+ * @since 1.0
1516
1576
  */
1517
1577
  load_async(io_priority: number, cancellable: Gio.Cancellable | null, callback?: Gio.AsyncReadyCallback<this> | null): globalThis.Promise<boolean> | void;
1518
1578
 
@@ -1520,6 +1580,8 @@ export namespace Gtef {
1520
1580
  * Finishes the metadata loading started with `gtef_file_metadata_load_async()`.
1521
1581
  * @param result a {@link Gio.AsyncResult}.
1522
1582
  * @returns whether the metadata was loaded successfully.
1583
+ * @since 1.0
1584
+ * @throws GLib.Error
1523
1585
  */
1524
1586
  load_finish(result: Gio.AsyncResult): boolean;
1525
1587
 
@@ -1532,6 +1594,8 @@ export namespace Gtef {
1532
1594
  * If {@link Gtef.File.location} is `null`, `false` is simply returned.
1533
1595
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
1534
1596
  * @returns whether the metadata was saved successfully.
1597
+ * @since 1.0
1598
+ * @throws GLib.Error
1535
1599
  */
1536
1600
  save(cancellable: Gio.Cancellable | null): boolean;
1537
1601
 
@@ -1544,6 +1608,7 @@ export namespace Gtef {
1544
1608
  * See the {@link Gio.AsyncResult} documentation to know how to use this function.
1545
1609
  * @param io_priority the I/O priority of the request. E.g. `G_PRIORITY_LOW`, `G_PRIORITY_DEFAULT` or `G_PRIORITY_HIGH`.
1546
1610
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
1611
+ * @since 1.0
1547
1612
  */
1548
1613
  save_async(io_priority: number, cancellable: Gio.Cancellable | null): globalThis.Promise<boolean>;
1549
1614
 
@@ -1557,6 +1622,7 @@ export namespace Gtef {
1557
1622
  * @param io_priority the I/O priority of the request. E.g. `G_PRIORITY_LOW`, `G_PRIORITY_DEFAULT` or `G_PRIORITY_HIGH`.
1558
1623
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
1559
1624
  * @param callback a {@link Gio.AsyncReadyCallback} to call when the request is satisfied.
1625
+ * @since 1.0
1560
1626
  */
1561
1627
  save_async(io_priority: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void;
1562
1628
 
@@ -1570,6 +1636,7 @@ export namespace Gtef {
1570
1636
  * @param io_priority the I/O priority of the request. E.g. `G_PRIORITY_LOW`, `G_PRIORITY_DEFAULT` or `G_PRIORITY_HIGH`.
1571
1637
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
1572
1638
  * @param callback a {@link Gio.AsyncReadyCallback} to call when the request is satisfied.
1639
+ * @since 1.0
1573
1640
  */
1574
1641
  save_async(io_priority: number, cancellable: Gio.Cancellable | null, callback?: Gio.AsyncReadyCallback<this> | null): globalThis.Promise<boolean> | void;
1575
1642
 
@@ -1577,6 +1644,8 @@ export namespace Gtef {
1577
1644
  * Finishes the metadata saving started with `gtef_file_metadata_save_async()`.
1578
1645
  * @param result a {@link Gio.AsyncResult}.
1579
1646
  * @returns whether the metadata was saved successfully.
1647
+ * @since 1.0
1648
+ * @throws GLib.Error
1580
1649
  */
1581
1650
  save_finish(result: Gio.AsyncResult): boolean;
1582
1651
 
@@ -1588,6 +1657,7 @@ export namespace Gtef {
1588
1657
  * memory.
1589
1658
  * @param key the name of the metadata.
1590
1659
  * @param value the value of the metadata, or `null` to unset.
1660
+ * @since 1.0
1591
1661
  */
1592
1662
  set(key: string, value: string | null): void;
1593
1663
 
@@ -1735,36 +1805,43 @@ export namespace Gtef {
1735
1805
  // Methods
1736
1806
  /**
1737
1807
  * @returns the {@link Gtef.Buffer} to save.
1808
+ * @since 1.0
1738
1809
  */
1739
1810
  get_buffer(): Buffer;
1740
1811
 
1741
1812
  /**
1742
1813
  * @returns the compression type.
1814
+ * @since 1.0
1743
1815
  */
1744
1816
  get_compression_type(): CompressionType;
1745
1817
 
1746
1818
  /**
1747
1819
  * @returns the encoding.
1820
+ * @since 1.0
1748
1821
  */
1749
1822
  get_encoding(): Encoding;
1750
1823
 
1751
1824
  /**
1752
1825
  * @returns the {@link Gtef.File}.
1826
+ * @since 1.0
1753
1827
  */
1754
1828
  get_file(): File;
1755
1829
 
1756
1830
  /**
1757
1831
  * @returns the flags.
1832
+ * @since 1.0
1758
1833
  */
1759
1834
  get_flags(): FileSaverFlags;
1760
1835
 
1761
1836
  /**
1762
1837
  * @returns the {@link Gio.File} where to save the buffer to.
1838
+ * @since 1.0
1763
1839
  */
1764
1840
  get_location(): Gio.File;
1765
1841
 
1766
1842
  /**
1767
1843
  * @returns the newline type.
1844
+ * @since 1.0
1768
1845
  */
1769
1846
  get_newline_type(): NewlineType;
1770
1847
 
@@ -1774,6 +1851,7 @@ export namespace Gtef {
1774
1851
  * @param io_priority the I/O priority of the request. E.g. `G_PRIORITY_LOW`, `G_PRIORITY_DEFAULT` or `G_PRIORITY_HIGH`.
1775
1852
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
1776
1853
  * @param progress_callback function to call back with progress information, or `null` if progress information is not needed.
1854
+ * @since 1.0
1777
1855
  */
1778
1856
  save_async(io_priority: number, cancellable: Gio.Cancellable | null, progress_callback: Gio.FileProgressCallback | null): globalThis.Promise<boolean>;
1779
1857
 
@@ -1784,6 +1862,7 @@ export namespace Gtef {
1784
1862
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
1785
1863
  * @param progress_callback function to call back with progress information, or `null` if progress information is not needed.
1786
1864
  * @param callback a {@link Gio.AsyncReadyCallback} to call when the request is satisfied.
1865
+ * @since 1.0
1787
1866
  */
1788
1867
  save_async(io_priority: number, cancellable: Gio.Cancellable | null, progress_callback: Gio.FileProgressCallback | null, callback: Gio.AsyncReadyCallback<this> | null): void;
1789
1868
 
@@ -1794,6 +1873,7 @@ export namespace Gtef {
1794
1873
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
1795
1874
  * @param progress_callback function to call back with progress information, or `null` if progress information is not needed.
1796
1875
  * @param callback a {@link Gio.AsyncReadyCallback} to call when the request is satisfied.
1876
+ * @since 1.0
1797
1877
  */
1798
1878
  save_async(io_priority: number, cancellable: Gio.Cancellable | null, progress_callback: Gio.FileProgressCallback | null, callback?: Gio.AsyncReadyCallback<this> | null): globalThis.Promise<boolean> | void;
1799
1879
 
@@ -1808,6 +1888,8 @@ export namespace Gtef {
1808
1888
  * saved successfully.
1809
1889
  * @param result a {@link Gio.AsyncResult}.
1810
1890
  * @returns whether the file was saved successfully.
1891
+ * @since 1.0
1892
+ * @throws GLib.Error
1811
1893
  */
1812
1894
  save_finish(result: Gio.AsyncResult): boolean;
1813
1895
 
@@ -1815,6 +1897,7 @@ export namespace Gtef {
1815
1897
  * Sets the compression type. By default the compression type is taken from the
1816
1898
  * {@link Gtef.File}.
1817
1899
  * @param compression_type the new compression type.
1900
+ * @since 1.0
1818
1901
  */
1819
1902
  set_compression_type(compression_type: CompressionType): void;
1820
1903
 
@@ -1822,11 +1905,13 @@ export namespace Gtef {
1822
1905
  * Sets the encoding. If `encoding` is `null`, the UTF-8 encoding will be set.
1823
1906
  * By default the encoding is taken from the {@link Gtef.File}.
1824
1907
  * @param encoding the new encoding, or `null` for UTF-8.
1908
+ * @since 1.0
1825
1909
  */
1826
1910
  set_encoding(encoding: Encoding | null): void;
1827
1911
 
1828
1912
  /**
1829
1913
  * @param flags the new flags.
1914
+ * @since 1.0
1830
1915
  */
1831
1916
  set_flags(flags: FileSaverFlags): void;
1832
1917
 
@@ -1834,6 +1919,7 @@ export namespace Gtef {
1834
1919
  * Sets the newline type. By default the newline type is taken from the
1835
1920
  * {@link Gtef.File}.
1836
1921
  * @param newline_type the new newline type.
1922
+ * @since 1.0
1837
1923
  */
1838
1924
  set_newline_type(newline_type: NewlineType): void;
1839
1925
  }
@@ -1908,16 +1994,19 @@ export namespace Gtef {
1908
1994
  /**
1909
1995
  * Obtains iterators pointing to the start and end of the {@link Gtef.FoldRegion}.
1910
1996
  * @returns `true` on success, `false` otherwise.
1997
+ * @since 1.0
1911
1998
  */
1912
1999
  get_bounds(): [boolean, Gtk.TextIter, Gtk.TextIter];
1913
2000
 
1914
2001
  /**
1915
2002
  * @returns the {@link Gtk.TextBuffer} where the fold region is applied.
2003
+ * @since 1.0
1916
2004
  */
1917
2005
  get_buffer(): Gtk.TextBuffer | null;
1918
2006
 
1919
2007
  /**
1920
2008
  * @returns whether the {@link Gtef.FoldRegion} is folded.
2009
+ * @since 1.0
1921
2010
  */
1922
2011
  get_folded(): boolean;
1923
2012
 
@@ -1925,12 +2014,14 @@ export namespace Gtef {
1925
2014
  * Sets the start and end of the {@link Gtef.FoldRegion}.
1926
2015
  * @param start a {@link Gtk.TextIter}.
1927
2016
  * @param end a {@link Gtk.TextIter}.
2017
+ * @since 1.0
1928
2018
  */
1929
2019
  set_bounds(start: Gtk.TextIter, end: Gtk.TextIter): void;
1930
2020
 
1931
2021
  /**
1932
2022
  * Folds or unfolds the region.
1933
2023
  * @param folded the new value.
2024
+ * @since 1.0
1934
2025
  */
1935
2026
  set_folded(folded: boolean): void;
1936
2027
  }
@@ -1998,6 +2089,7 @@ export namespace Gtef {
1998
2089
  * This function is intended to be called from a subclass' draw method before
1999
2090
  * chaining-up to its parent's draw method.
2000
2091
  * @param state a {@link Gtef.GutterRendererFoldsState}.
2092
+ * @since 1.0
2001
2093
  */
2002
2094
  set_state(state: GutterRendererFoldsState): void;
2003
2095
  }
@@ -2102,6 +2194,7 @@ export namespace Gtef {
2102
2194
  * Utility function to create a {@link Gtk.Label} suitable for a {@link Gtk.InfoBar}. The
2103
2195
  * wrapping and alignment is configured. The label is also set as selectable,
2104
2196
  * for example to copy an error message and search an explanation on the web.
2197
+ * @since 1.0
2105
2198
  */
2106
2199
  static create_label(): Gtk.Label;
2107
2200
 
@@ -2110,6 +2203,7 @@ export namespace Gtef {
2110
2203
  * Calls `gtk_info_bar_set_show_close_button()`, and additionnally closes the
2111
2204
  * `info_bar` when the {@link Gtk.InfoBar.SignalSignatures.response | Gtk.InfoBar::response} signal is received with the
2112
2205
  * `response_id` {@link Gtk.ResponseType.CLOSE}.
2206
+ * @since 2.0
2113
2207
  */
2114
2208
  add_close_button(): void;
2115
2209
 
@@ -2122,6 +2216,7 @@ export namespace Gtef {
2122
2216
  * {@link Gtef.InfoBar} and you need to add a custom {@link Gtk.Widget}, it is better to use
2123
2217
  * this function instead of adding the {@link Gtk.Widget} directly to the content area.
2124
2218
  * @param content a {@link Gtk.Widget}.
2219
+ * @since 2.0
2125
2220
  */
2126
2221
  add_content_widget(content: Gtk.Widget): void;
2127
2222
 
@@ -2131,18 +2226,21 @@ export namespace Gtef {
2131
2226
  *
2132
2227
  * The icon is not updated when the message type changes. Another {@link Gtef.InfoBar}
2133
2228
  * must be created in that case.
2229
+ * @since 2.0
2134
2230
  */
2135
2231
  add_icon(): void;
2136
2232
 
2137
2233
  /**
2138
2234
  * Adds a primary message.
2139
2235
  * @param primary_msg a primary message.
2236
+ * @since 2.0
2140
2237
  */
2141
2238
  add_primary_message(primary_msg: string): void;
2142
2239
 
2143
2240
  /**
2144
2241
  * Adds a secondary message.
2145
2242
  * @param secondary_msg a secondary message.
2243
+ * @since 2.0
2146
2244
  */
2147
2245
  add_secondary_message(secondary_msg: string): void;
2148
2246
  }
@@ -2159,7 +2257,7 @@ export namespace Gtef {
2159
2257
  * @since 2.0
2160
2258
  * @run-first
2161
2259
  */
2162
- "menu-item-deselected": (arg0: Gtk.MenuItem) => void;
2260
+ "menu-item-deselected": (menu_item: Gtk.MenuItem) => void;
2163
2261
  /**
2164
2262
  * The ::menu-item-selected signal is emitted when the
2165
2263
  * {@link Gtk.MenuItem.SignalSignatures.select | Gtk.MenuItem::select} signal is emitted on a {@link Gtk.MenuItem} belonging
@@ -2168,7 +2266,7 @@ export namespace Gtef {
2168
2266
  * @since 2.0
2169
2267
  * @run-first
2170
2268
  */
2171
- "menu-item-selected": (arg0: Gtk.MenuItem) => void;
2269
+ "menu-item-selected": (menu_item: Gtk.MenuItem) => void;
2172
2270
  "notify::menu-shell": (pspec: GObject.ParamSpec) => void;
2173
2271
  }
2174
2272
 
@@ -2232,6 +2330,7 @@ export namespace Gtef {
2232
2330
  * Returns the {@link Gtef.MenuShell} of `gtk_menu_shell`. The returned object is
2233
2331
  * guaranteed to be the same for the lifetime of `gtk_menu_shell`.
2234
2332
  * @param gtk_menu_shell a {@link Gtk.MenuShell}.
2333
+ * @since 2.0
2235
2334
  */
2236
2335
  static get_from_gtk_menu_shell(gtk_menu_shell: Gtk.MenuShell): MenuShell;
2237
2336
 
@@ -2251,6 +2350,7 @@ export namespace Gtef {
2251
2350
  // Methods
2252
2351
  /**
2253
2352
  * @returns the {@link Gtk.MenuShell} of `gtef_menu_shell`.
2353
+ * @since 2.0
2254
2354
  */
2255
2355
  get_menu_shell(): Gtk.MenuShell;
2256
2356
  }
@@ -2359,6 +2459,7 @@ export namespace Gtef {
2359
2459
  * one below the first info bar, etc. With the main widget of `tab` at the
2360
2460
  * bottom.
2361
2461
  * @param info_bar a {@link Gtk.InfoBar}.
2462
+ * @since 1.0
2362
2463
  */
2363
2464
  add_info_bar(info_bar: Gtk.InfoBar): void;
2364
2465
 
@@ -2374,12 +2475,14 @@ export namespace Gtef {
2374
2475
  /**
2375
2476
  * Retrieves the orientation of the `orientable`.
2376
2477
  * @returns the orientation of the `orientable`.
2478
+ * @since 2.16
2377
2479
  */
2378
2480
  get_orientation(): Gtk.Orientation;
2379
2481
 
2380
2482
  /**
2381
2483
  * Sets the orientation of the `orientable`.
2382
2484
  * @param orientation the orientable’s new orientation.
2485
+ * @since 2.16
2383
2486
  */
2384
2487
  set_orientation(orientation: Gtk.Orientation): void;
2385
2488
  }
@@ -2511,17 +2614,20 @@ export namespace Gtef {
2511
2614
  // Methods
2512
2615
  /**
2513
2616
  * Copies the clipboard.
2617
+ * @since 1.0
2514
2618
  */
2515
2619
  copy_clipboard(): void;
2516
2620
 
2517
2621
  /**
2518
2622
  * Cuts the clipboard and then scrolls to the cursor position.
2623
+ * @since 1.0
2519
2624
  */
2520
2625
  cut_clipboard(): void;
2521
2626
 
2522
2627
  /**
2523
2628
  * Deletes the text currently selected in the {@link Gtk.TextBuffer} associated
2524
2629
  * to the view and then scrolls to the cursor position.
2630
+ * @since 1.0
2525
2631
  */
2526
2632
  delete_selection(): void;
2527
2633
 
@@ -2530,6 +2636,7 @@ export namespace Gtef {
2530
2636
  * `gtk_text_buffer_get_iter_at_line()`, and scrolls to that position.
2531
2637
  * @param line a line number, counting from 0.
2532
2638
  * @returns `true` if the cursor has been moved exactly to `line`, `false` if that line didn't exist.
2639
+ * @since 2.0
2533
2640
  */
2534
2641
  goto_line(line: number): boolean;
2535
2642
 
@@ -2539,21 +2646,25 @@ export namespace Gtef {
2539
2646
  * @param line a line number, counting from 0.
2540
2647
  * @param line_offset the line offset, in characters (not bytes).
2541
2648
  * @returns `true` if the cursor has been moved exactly to `line` and `line_offset`, `false` if that position didn't exist.
2649
+ * @since 2.0
2542
2650
  */
2543
2651
  goto_line_offset(line: number, line_offset: number): boolean;
2544
2652
 
2545
2653
  /**
2546
2654
  * Pastes the clipboard and then scrolls to the cursor position.
2655
+ * @since 1.0
2547
2656
  */
2548
2657
  paste_clipboard(): void;
2549
2658
 
2550
2659
  /**
2551
2660
  * Scrolls the `view` to the cursor position.
2661
+ * @since 1.0
2552
2662
  */
2553
2663
  scroll_to_cursor(): void;
2554
2664
 
2555
2665
  /**
2556
2666
  * Selects all the text.
2667
+ * @since 1.0
2557
2668
  */
2558
2669
  select_all(): void;
2559
2670
 
@@ -2565,6 +2676,7 @@ export namespace Gtef {
2565
2676
  * the place where a warning or error occurred.
2566
2677
  * @param start_line start of the region to select.
2567
2678
  * @param end_line end of the region to select.
2679
+ * @since 2.0
2568
2680
  */
2569
2681
  select_lines(start_line: number, end_line: number): void;
2570
2682
  }
@@ -2586,6 +2698,7 @@ export namespace Gtef {
2586
2698
  // Methods
2587
2699
  /**
2588
2700
  * @returns a copy of `info`. The copy will have a reference count of one.
2701
+ * @since 2.0
2589
2702
  */
2590
2703
  copy(): ActionInfo;
2591
2704
 
@@ -2594,32 +2707,38 @@ export namespace Gtef {
2594
2707
  * returns a `null`-terminated array, to be suitable for
2595
2708
  * `gtk_application_set_accels_for_action()`.
2596
2709
  * @returns a `null`-terminated array of accelerators in the format understood by `gtk_accelerator_parse()`.
2710
+ * @since 2.0
2597
2711
  */
2598
2712
  get_accels(): string[];
2599
2713
 
2600
2714
  /**
2601
2715
  * @returns the action name, or `null`. Example: `"win.save"`.
2716
+ * @since 2.0
2602
2717
  */
2603
2718
  get_action_name(): string | null;
2604
2719
 
2605
2720
  /**
2606
2721
  * @returns the icon name, or `null`.
2722
+ * @since 2.0
2607
2723
  */
2608
2724
  get_icon_name(): string | null;
2609
2725
 
2610
2726
  /**
2611
2727
  * @returns the label (i.e. a short description), or `null`.
2728
+ * @since 2.0
2612
2729
  */
2613
2730
  get_label(): string | null;
2614
2731
 
2615
2732
  /**
2616
2733
  * @returns the tooltip (i.e. a long description), or `null`.
2734
+ * @since 2.0
2617
2735
  */
2618
2736
  get_tooltip(): string | null;
2619
2737
 
2620
2738
  /**
2621
2739
  * Increments the reference count of `info` by one.
2622
2740
  * @returns the passed in `info`.
2741
+ * @since 2.0
2623
2742
  */
2624
2743
  ref(): ActionInfo;
2625
2744
 
@@ -2629,33 +2748,39 @@ export namespace Gtef {
2629
2748
  * `accels` must not be `null`, it must be a `null`-terminated array, to be
2630
2749
  * consistent with `gtk_application_set_accels_for_action()`.
2631
2750
  * @param accels a `null`-terminated array of accelerators in the format understood by `gtk_accelerator_parse()`.
2751
+ * @since 2.0
2632
2752
  */
2633
2753
  set_accels(accels: string[]): void;
2634
2754
 
2635
2755
  /**
2636
2756
  * Sets the action name, for example `"win.save"`.
2637
2757
  * @param action_name the action name.
2758
+ * @since 2.0
2638
2759
  */
2639
2760
  set_action_name(action_name: string): void;
2640
2761
 
2641
2762
  /**
2642
2763
  * @param icon_name the icon name, or `null`.
2764
+ * @since 2.0
2643
2765
  */
2644
2766
  set_icon_name(icon_name: string | null): void;
2645
2767
 
2646
2768
  /**
2647
2769
  * @param label the label (i.e. a short description), or `null`.
2770
+ * @since 2.0
2648
2771
  */
2649
2772
  set_label(label: string | null): void;
2650
2773
 
2651
2774
  /**
2652
2775
  * @param tooltip the tooltip (i.e. a long description), or `null`.
2776
+ * @since 2.0
2653
2777
  */
2654
2778
  set_tooltip(tooltip: string | null): void;
2655
2779
 
2656
2780
  /**
2657
2781
  * Decrements the reference count of `info` by one. If the reference count drops
2658
2782
  * to 0, `info` is freed.
2783
+ * @since 2.0
2659
2784
  */
2660
2785
  unref(): void;
2661
2786
  }
@@ -2772,6 +2897,7 @@ export namespace Gtef {
2772
2897
  // Static methods
2773
2898
  /**
2774
2899
  * Gets a list of all encodings known by {@link Gtef.Encoding}.
2900
+ * @since 2.0
2775
2901
  */
2776
2902
  static get_all(): Encoding[];
2777
2903
 
@@ -2782,37 +2908,46 @@ export namespace Gtef {
2782
2908
  * This function returns a different list depending on the current locale (i.e.
2783
2909
  * language, country and default encoding). The UTF-8 encoding and the current
2784
2910
  * locale encoding are guaranteed to be present in the returned list.
2911
+ * @since 2.0
2785
2912
  */
2786
2913
  static get_default_candidates(): Encoding[];
2787
2914
 
2788
2915
  // Methods
2789
2916
  /**
2790
2917
  * @returns a copy of `enc`.
2918
+ * @since 2.0
2791
2919
  */
2792
2920
  copy(): Encoding;
2793
2921
 
2794
2922
  /**
2795
2923
  * @param enc2 a {@link Gtef.Encoding}, or `null`.
2796
2924
  * @returns whether `enc1` and `enc2` are equals.
2925
+ * @since 2.0
2797
2926
  */
2798
2927
  equals(enc2: Encoding | null): boolean;
2799
2928
 
2929
+ /**
2930
+ * @since 2.0
2931
+ */
2800
2932
  free(): void;
2801
2933
 
2802
2934
  /**
2803
2935
  * Gets the character set of the {@link Gtef.Encoding}, such as "UTF-8" or "ISO-8859-1".
2804
2936
  * @returns the character set of the {@link Gtef.Encoding}.
2937
+ * @since 2.0
2805
2938
  */
2806
2939
  get_charset(): string;
2807
2940
 
2808
2941
  /**
2809
2942
  * Gets the name of the {@link Gtef.Encoding} such as "Unicode" or "Western".
2810
2943
  * @returns the name of the {@link Gtef.Encoding}.
2944
+ * @since 2.0
2811
2945
  */
2812
2946
  get_name(): string;
2813
2947
 
2814
2948
  /**
2815
2949
  * @returns whether `enc` is a UTF-8 encoding.
2950
+ * @since 2.0
2816
2951
  */
2817
2952
  is_utf8(): boolean;
2818
2953
 
@@ -2820,6 +2955,7 @@ export namespace Gtef {
2820
2955
  * Returns the encoding name with the charset in parenthesis, for example
2821
2956
  * "Unicode (UTF-8)". If the name is unknown, just the charset is returned.
2822
2957
  * @returns a string representation. Free with `g_free()` when no longer needed.
2958
+ * @since 2.0
2823
2959
  */
2824
2960
  to_string(): string;
2825
2961
  }