@girs/gtef-2 4.3.0 → 4.4.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/README.md +1 -1
- package/gtef-2-surface.d.ts +20 -0
- package/gtef-2-surface.js +6 -0
- package/gtef-2.d.ts +130 -0
- package/package.json +16 -16
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|

|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
GJS TypeScript type definitions for Gtef-2 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.
|
|
8
|
+
GJS TypeScript type definitions for Gtef-2 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.4.0.
|
|
9
9
|
|
|
10
10
|
## Install
|
|
11
11
|
|
package/gtef-2-surface.d.ts
CHANGED
|
@@ -113,6 +113,23 @@ export interface Widgets {
|
|
|
113
113
|
/** Every GType this namespace can create. A consumer derives its own tag map. */
|
|
114
114
|
export type WidgetGType = keyof Widgets;
|
|
115
115
|
|
|
116
|
+
// ---------------------------------------------------------------------------
|
|
117
|
+
// Child holders — the same shape, for objects that CARRY a widget without being one.
|
|
118
|
+
//
|
|
119
|
+
// `GtkListItem`, `GtkListHeader`, `GtkColumnViewCell` and `AdwToggle` descend from
|
|
120
|
+
// `GObject.Object` and hold a widget through `set_child`/`get_child`. A renderer places
|
|
121
|
+
// them exactly like a container, so they belong in the vocabulary; a check asking "is
|
|
122
|
+
// this a widget" must still be able to say no. Hence a sibling table rather than four
|
|
123
|
+
// more rows in `Widgets`: concatenate them when you mean both.
|
|
124
|
+
// ---------------------------------------------------------------------------
|
|
125
|
+
|
|
126
|
+
export interface ChildHolders {
|
|
127
|
+
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/** Every GType this namespace holds a child in without it being a widget. */
|
|
131
|
+
export type ChildHolderGType = keyof ChildHolders;
|
|
132
|
+
|
|
116
133
|
/** The writable, optional, GObject-keyed property surface of one GType. */
|
|
117
134
|
export type PropsOf<G extends WidgetGType> = Widgets[G]['props'];
|
|
118
135
|
|
|
@@ -148,6 +165,9 @@ export const OWN_SIGNALS: Readonly<Record<string, readonly string[]>>;
|
|
|
148
165
|
/** Widget GType -> every declaration its members come from, self first. */
|
|
149
166
|
export const DECLS: Readonly<Record<string, readonly string[]>>;
|
|
150
167
|
|
|
168
|
+
/** The GTypes in `DECLS` that hold a widget without being one — see `ChildHolders`. */
|
|
169
|
+
export const CHILD_HOLDERS: readonly string[];
|
|
170
|
+
|
|
151
171
|
/** Enum GType -> the nicks this surface offers. */
|
|
152
172
|
export const ENUM_NICKS: Readonly<Record<string, readonly string[]>>;
|
|
153
173
|
|
package/gtef-2-surface.js
CHANGED
|
@@ -18,6 +18,12 @@ export const DECLS = {
|
|
|
18
18
|
GtefView: ['GtefView', 'GtkSourceView', 'GtkTextView', 'GtkContainer', 'GtkWidget', 'GtkBuildable', 'GtkScrollable'],
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
+
// The GTypes above that are NOT widgets: they hold one through `set_child`/`get_child`
|
|
22
|
+
// and descend from `GObject.Object`. A renderer places them like a container; a check
|
|
23
|
+
// asking "is this a widget" must not count them. Derived from the accessor pair, never
|
|
24
|
+
// from a list — the count is in the provenance line above.
|
|
25
|
+
export const CHILD_HOLDERS = [];
|
|
26
|
+
|
|
21
27
|
export const ENUM_NICKS = {
|
|
22
28
|
GtefCompressionType: ['none', 'gzip'],
|
|
23
29
|
GtefNewlineType: ['lf', 'cr', 'cr-lf'],
|
package/gtef-2.d.ts
CHANGED
|
@@ -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,19 @@ 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
|
|
1379
1429
|
*/
|
|
1380
1430
|
load_finish(result: Gio.AsyncResult): boolean;
|
|
1381
1431
|
|
|
1382
1432
|
/**
|
|
1383
1433
|
* @param chunk_size the new chunk size.
|
|
1434
|
+
* @since 1.0
|
|
1384
1435
|
*/
|
|
1385
1436
|
set_chunk_size(chunk_size: bigint | number): void;
|
|
1386
1437
|
|
|
1387
1438
|
/**
|
|
1388
1439
|
* @param max_size the new maximum size, or -1 for unlimited.
|
|
1440
|
+
* @since 1.0
|
|
1389
1441
|
*/
|
|
1390
1442
|
set_max_size(max_size: bigint | number): void;
|
|
1391
1443
|
}
|
|
@@ -1451,11 +1503,13 @@ export namespace Gtef {
|
|
|
1451
1503
|
* Gets the value of a metadata stored in the `metadata` object memory.
|
|
1452
1504
|
* @param key the name of the metadata.
|
|
1453
1505
|
* @returns the value of the metadata, or `null` if the metadata doesn't exist. Free with `g_free()`.
|
|
1506
|
+
* @since 1.0
|
|
1454
1507
|
*/
|
|
1455
1508
|
get(key: string): string | null;
|
|
1456
1509
|
|
|
1457
1510
|
/**
|
|
1458
1511
|
* @returns the {@link Gtef.File} that the metadata belong to.
|
|
1512
|
+
* @since 1.0
|
|
1459
1513
|
*/
|
|
1460
1514
|
get_file(): File;
|
|
1461
1515
|
|
|
@@ -1472,6 +1526,7 @@ export namespace Gtef {
|
|
|
1472
1526
|
* If {@link Gtef.File.location} is `null`, `false` is simply returned.
|
|
1473
1527
|
* @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
|
|
1474
1528
|
* @returns whether the metadata was loaded successfully.
|
|
1529
|
+
* @since 1.0
|
|
1475
1530
|
*/
|
|
1476
1531
|
load(cancellable: Gio.Cancellable | null): boolean;
|
|
1477
1532
|
|
|
@@ -1485,6 +1540,7 @@ export namespace Gtef {
|
|
|
1485
1540
|
* See the {@link Gio.AsyncResult} documentation to know how to use this function.
|
|
1486
1541
|
* @param io_priority the I/O priority of the request. E.g. `G_PRIORITY_LOW`, `G_PRIORITY_DEFAULT` or `G_PRIORITY_HIGH`.
|
|
1487
1542
|
* @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
|
|
1543
|
+
* @since 1.0
|
|
1488
1544
|
*/
|
|
1489
1545
|
load_async(io_priority: number, cancellable: Gio.Cancellable | null): globalThis.Promise<boolean>;
|
|
1490
1546
|
|
|
@@ -1499,6 +1555,7 @@ export namespace Gtef {
|
|
|
1499
1555
|
* @param io_priority the I/O priority of the request. E.g. `G_PRIORITY_LOW`, `G_PRIORITY_DEFAULT` or `G_PRIORITY_HIGH`.
|
|
1500
1556
|
* @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
|
|
1501
1557
|
* @param callback a {@link Gio.AsyncReadyCallback} to call when the request is satisfied.
|
|
1558
|
+
* @since 1.0
|
|
1502
1559
|
*/
|
|
1503
1560
|
load_async(io_priority: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void;
|
|
1504
1561
|
|
|
@@ -1513,6 +1570,7 @@ export namespace Gtef {
|
|
|
1513
1570
|
* @param io_priority the I/O priority of the request. E.g. `G_PRIORITY_LOW`, `G_PRIORITY_DEFAULT` or `G_PRIORITY_HIGH`.
|
|
1514
1571
|
* @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
|
|
1515
1572
|
* @param callback a {@link Gio.AsyncReadyCallback} to call when the request is satisfied.
|
|
1573
|
+
* @since 1.0
|
|
1516
1574
|
*/
|
|
1517
1575
|
load_async(io_priority: number, cancellable: Gio.Cancellable | null, callback?: Gio.AsyncReadyCallback<this> | null): globalThis.Promise<boolean> | void;
|
|
1518
1576
|
|
|
@@ -1520,6 +1578,7 @@ export namespace Gtef {
|
|
|
1520
1578
|
* Finishes the metadata loading started with `gtef_file_metadata_load_async()`.
|
|
1521
1579
|
* @param result a {@link Gio.AsyncResult}.
|
|
1522
1580
|
* @returns whether the metadata was loaded successfully.
|
|
1581
|
+
* @since 1.0
|
|
1523
1582
|
*/
|
|
1524
1583
|
load_finish(result: Gio.AsyncResult): boolean;
|
|
1525
1584
|
|
|
@@ -1532,6 +1591,7 @@ export namespace Gtef {
|
|
|
1532
1591
|
* If {@link Gtef.File.location} is `null`, `false` is simply returned.
|
|
1533
1592
|
* @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
|
|
1534
1593
|
* @returns whether the metadata was saved successfully.
|
|
1594
|
+
* @since 1.0
|
|
1535
1595
|
*/
|
|
1536
1596
|
save(cancellable: Gio.Cancellable | null): boolean;
|
|
1537
1597
|
|
|
@@ -1544,6 +1604,7 @@ export namespace Gtef {
|
|
|
1544
1604
|
* See the {@link Gio.AsyncResult} documentation to know how to use this function.
|
|
1545
1605
|
* @param io_priority the I/O priority of the request. E.g. `G_PRIORITY_LOW`, `G_PRIORITY_DEFAULT` or `G_PRIORITY_HIGH`.
|
|
1546
1606
|
* @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
|
|
1607
|
+
* @since 1.0
|
|
1547
1608
|
*/
|
|
1548
1609
|
save_async(io_priority: number, cancellable: Gio.Cancellable | null): globalThis.Promise<boolean>;
|
|
1549
1610
|
|
|
@@ -1557,6 +1618,7 @@ export namespace Gtef {
|
|
|
1557
1618
|
* @param io_priority the I/O priority of the request. E.g. `G_PRIORITY_LOW`, `G_PRIORITY_DEFAULT` or `G_PRIORITY_HIGH`.
|
|
1558
1619
|
* @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
|
|
1559
1620
|
* @param callback a {@link Gio.AsyncReadyCallback} to call when the request is satisfied.
|
|
1621
|
+
* @since 1.0
|
|
1560
1622
|
*/
|
|
1561
1623
|
save_async(io_priority: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void;
|
|
1562
1624
|
|
|
@@ -1570,6 +1632,7 @@ export namespace Gtef {
|
|
|
1570
1632
|
* @param io_priority the I/O priority of the request. E.g. `G_PRIORITY_LOW`, `G_PRIORITY_DEFAULT` or `G_PRIORITY_HIGH`.
|
|
1571
1633
|
* @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
|
|
1572
1634
|
* @param callback a {@link Gio.AsyncReadyCallback} to call when the request is satisfied.
|
|
1635
|
+
* @since 1.0
|
|
1573
1636
|
*/
|
|
1574
1637
|
save_async(io_priority: number, cancellable: Gio.Cancellable | null, callback?: Gio.AsyncReadyCallback<this> | null): globalThis.Promise<boolean> | void;
|
|
1575
1638
|
|
|
@@ -1577,6 +1640,7 @@ export namespace Gtef {
|
|
|
1577
1640
|
* Finishes the metadata saving started with `gtef_file_metadata_save_async()`.
|
|
1578
1641
|
* @param result a {@link Gio.AsyncResult}.
|
|
1579
1642
|
* @returns whether the metadata was saved successfully.
|
|
1643
|
+
* @since 1.0
|
|
1580
1644
|
*/
|
|
1581
1645
|
save_finish(result: Gio.AsyncResult): boolean;
|
|
1582
1646
|
|
|
@@ -1588,6 +1652,7 @@ export namespace Gtef {
|
|
|
1588
1652
|
* memory.
|
|
1589
1653
|
* @param key the name of the metadata.
|
|
1590
1654
|
* @param value the value of the metadata, or `null` to unset.
|
|
1655
|
+
* @since 1.0
|
|
1591
1656
|
*/
|
|
1592
1657
|
set(key: string, value: string | null): void;
|
|
1593
1658
|
|
|
@@ -1735,36 +1800,43 @@ export namespace Gtef {
|
|
|
1735
1800
|
// Methods
|
|
1736
1801
|
/**
|
|
1737
1802
|
* @returns the {@link Gtef.Buffer} to save.
|
|
1803
|
+
* @since 1.0
|
|
1738
1804
|
*/
|
|
1739
1805
|
get_buffer(): Buffer;
|
|
1740
1806
|
|
|
1741
1807
|
/**
|
|
1742
1808
|
* @returns the compression type.
|
|
1809
|
+
* @since 1.0
|
|
1743
1810
|
*/
|
|
1744
1811
|
get_compression_type(): CompressionType;
|
|
1745
1812
|
|
|
1746
1813
|
/**
|
|
1747
1814
|
* @returns the encoding.
|
|
1815
|
+
* @since 1.0
|
|
1748
1816
|
*/
|
|
1749
1817
|
get_encoding(): Encoding;
|
|
1750
1818
|
|
|
1751
1819
|
/**
|
|
1752
1820
|
* @returns the {@link Gtef.File}.
|
|
1821
|
+
* @since 1.0
|
|
1753
1822
|
*/
|
|
1754
1823
|
get_file(): File;
|
|
1755
1824
|
|
|
1756
1825
|
/**
|
|
1757
1826
|
* @returns the flags.
|
|
1827
|
+
* @since 1.0
|
|
1758
1828
|
*/
|
|
1759
1829
|
get_flags(): FileSaverFlags;
|
|
1760
1830
|
|
|
1761
1831
|
/**
|
|
1762
1832
|
* @returns the {@link Gio.File} where to save the buffer to.
|
|
1833
|
+
* @since 1.0
|
|
1763
1834
|
*/
|
|
1764
1835
|
get_location(): Gio.File;
|
|
1765
1836
|
|
|
1766
1837
|
/**
|
|
1767
1838
|
* @returns the newline type.
|
|
1839
|
+
* @since 1.0
|
|
1768
1840
|
*/
|
|
1769
1841
|
get_newline_type(): NewlineType;
|
|
1770
1842
|
|
|
@@ -1774,6 +1846,7 @@ export namespace Gtef {
|
|
|
1774
1846
|
* @param io_priority the I/O priority of the request. E.g. `G_PRIORITY_LOW`, `G_PRIORITY_DEFAULT` or `G_PRIORITY_HIGH`.
|
|
1775
1847
|
* @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
|
|
1776
1848
|
* @param progress_callback function to call back with progress information, or `null` if progress information is not needed.
|
|
1849
|
+
* @since 1.0
|
|
1777
1850
|
*/
|
|
1778
1851
|
save_async(io_priority: number, cancellable: Gio.Cancellable | null, progress_callback: Gio.FileProgressCallback | null): globalThis.Promise<boolean>;
|
|
1779
1852
|
|
|
@@ -1784,6 +1857,7 @@ export namespace Gtef {
|
|
|
1784
1857
|
* @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
|
|
1785
1858
|
* @param progress_callback function to call back with progress information, or `null` if progress information is not needed.
|
|
1786
1859
|
* @param callback a {@link Gio.AsyncReadyCallback} to call when the request is satisfied.
|
|
1860
|
+
* @since 1.0
|
|
1787
1861
|
*/
|
|
1788
1862
|
save_async(io_priority: number, cancellable: Gio.Cancellable | null, progress_callback: Gio.FileProgressCallback | null, callback: Gio.AsyncReadyCallback<this> | null): void;
|
|
1789
1863
|
|
|
@@ -1794,6 +1868,7 @@ export namespace Gtef {
|
|
|
1794
1868
|
* @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
|
|
1795
1869
|
* @param progress_callback function to call back with progress information, or `null` if progress information is not needed.
|
|
1796
1870
|
* @param callback a {@link Gio.AsyncReadyCallback} to call when the request is satisfied.
|
|
1871
|
+
* @since 1.0
|
|
1797
1872
|
*/
|
|
1798
1873
|
save_async(io_priority: number, cancellable: Gio.Cancellable | null, progress_callback: Gio.FileProgressCallback | null, callback?: Gio.AsyncReadyCallback<this> | null): globalThis.Promise<boolean> | void;
|
|
1799
1874
|
|
|
@@ -1808,6 +1883,7 @@ export namespace Gtef {
|
|
|
1808
1883
|
* saved successfully.
|
|
1809
1884
|
* @param result a {@link Gio.AsyncResult}.
|
|
1810
1885
|
* @returns whether the file was saved successfully.
|
|
1886
|
+
* @since 1.0
|
|
1811
1887
|
*/
|
|
1812
1888
|
save_finish(result: Gio.AsyncResult): boolean;
|
|
1813
1889
|
|
|
@@ -1815,6 +1891,7 @@ export namespace Gtef {
|
|
|
1815
1891
|
* Sets the compression type. By default the compression type is taken from the
|
|
1816
1892
|
* {@link Gtef.File}.
|
|
1817
1893
|
* @param compression_type the new compression type.
|
|
1894
|
+
* @since 1.0
|
|
1818
1895
|
*/
|
|
1819
1896
|
set_compression_type(compression_type: CompressionType): void;
|
|
1820
1897
|
|
|
@@ -1822,11 +1899,13 @@ export namespace Gtef {
|
|
|
1822
1899
|
* Sets the encoding. If `encoding` is `null`, the UTF-8 encoding will be set.
|
|
1823
1900
|
* By default the encoding is taken from the {@link Gtef.File}.
|
|
1824
1901
|
* @param encoding the new encoding, or `null` for UTF-8.
|
|
1902
|
+
* @since 1.0
|
|
1825
1903
|
*/
|
|
1826
1904
|
set_encoding(encoding: Encoding | null): void;
|
|
1827
1905
|
|
|
1828
1906
|
/**
|
|
1829
1907
|
* @param flags the new flags.
|
|
1908
|
+
* @since 1.0
|
|
1830
1909
|
*/
|
|
1831
1910
|
set_flags(flags: FileSaverFlags): void;
|
|
1832
1911
|
|
|
@@ -1834,6 +1913,7 @@ export namespace Gtef {
|
|
|
1834
1913
|
* Sets the newline type. By default the newline type is taken from the
|
|
1835
1914
|
* {@link Gtef.File}.
|
|
1836
1915
|
* @param newline_type the new newline type.
|
|
1916
|
+
* @since 1.0
|
|
1837
1917
|
*/
|
|
1838
1918
|
set_newline_type(newline_type: NewlineType): void;
|
|
1839
1919
|
}
|
|
@@ -1908,16 +1988,19 @@ export namespace Gtef {
|
|
|
1908
1988
|
/**
|
|
1909
1989
|
* Obtains iterators pointing to the start and end of the {@link Gtef.FoldRegion}.
|
|
1910
1990
|
* @returns `true` on success, `false` otherwise.
|
|
1991
|
+
* @since 1.0
|
|
1911
1992
|
*/
|
|
1912
1993
|
get_bounds(): [boolean, Gtk.TextIter, Gtk.TextIter];
|
|
1913
1994
|
|
|
1914
1995
|
/**
|
|
1915
1996
|
* @returns the {@link Gtk.TextBuffer} where the fold region is applied.
|
|
1997
|
+
* @since 1.0
|
|
1916
1998
|
*/
|
|
1917
1999
|
get_buffer(): Gtk.TextBuffer | null;
|
|
1918
2000
|
|
|
1919
2001
|
/**
|
|
1920
2002
|
* @returns whether the {@link Gtef.FoldRegion} is folded.
|
|
2003
|
+
* @since 1.0
|
|
1921
2004
|
*/
|
|
1922
2005
|
get_folded(): boolean;
|
|
1923
2006
|
|
|
@@ -1925,12 +2008,14 @@ export namespace Gtef {
|
|
|
1925
2008
|
* Sets the start and end of the {@link Gtef.FoldRegion}.
|
|
1926
2009
|
* @param start a {@link Gtk.TextIter}.
|
|
1927
2010
|
* @param end a {@link Gtk.TextIter}.
|
|
2011
|
+
* @since 1.0
|
|
1928
2012
|
*/
|
|
1929
2013
|
set_bounds(start: Gtk.TextIter, end: Gtk.TextIter): void;
|
|
1930
2014
|
|
|
1931
2015
|
/**
|
|
1932
2016
|
* Folds or unfolds the region.
|
|
1933
2017
|
* @param folded the new value.
|
|
2018
|
+
* @since 1.0
|
|
1934
2019
|
*/
|
|
1935
2020
|
set_folded(folded: boolean): void;
|
|
1936
2021
|
}
|
|
@@ -1998,6 +2083,7 @@ export namespace Gtef {
|
|
|
1998
2083
|
* This function is intended to be called from a subclass' draw method before
|
|
1999
2084
|
* chaining-up to its parent's draw method.
|
|
2000
2085
|
* @param state a {@link Gtef.GutterRendererFoldsState}.
|
|
2086
|
+
* @since 1.0
|
|
2001
2087
|
*/
|
|
2002
2088
|
set_state(state: GutterRendererFoldsState): void;
|
|
2003
2089
|
}
|
|
@@ -2102,6 +2188,7 @@ export namespace Gtef {
|
|
|
2102
2188
|
* Utility function to create a {@link Gtk.Label} suitable for a {@link Gtk.InfoBar}. The
|
|
2103
2189
|
* wrapping and alignment is configured. The label is also set as selectable,
|
|
2104
2190
|
* for example to copy an error message and search an explanation on the web.
|
|
2191
|
+
* @since 1.0
|
|
2105
2192
|
*/
|
|
2106
2193
|
static create_label(): Gtk.Label;
|
|
2107
2194
|
|
|
@@ -2110,6 +2197,7 @@ export namespace Gtef {
|
|
|
2110
2197
|
* Calls `gtk_info_bar_set_show_close_button()`, and additionnally closes the
|
|
2111
2198
|
* `info_bar` when the {@link Gtk.InfoBar.SignalSignatures.response | Gtk.InfoBar::response} signal is received with the
|
|
2112
2199
|
* `response_id` {@link Gtk.ResponseType.CLOSE}.
|
|
2200
|
+
* @since 2.0
|
|
2113
2201
|
*/
|
|
2114
2202
|
add_close_button(): void;
|
|
2115
2203
|
|
|
@@ -2122,6 +2210,7 @@ export namespace Gtef {
|
|
|
2122
2210
|
* {@link Gtef.InfoBar} and you need to add a custom {@link Gtk.Widget}, it is better to use
|
|
2123
2211
|
* this function instead of adding the {@link Gtk.Widget} directly to the content area.
|
|
2124
2212
|
* @param content a {@link Gtk.Widget}.
|
|
2213
|
+
* @since 2.0
|
|
2125
2214
|
*/
|
|
2126
2215
|
add_content_widget(content: Gtk.Widget): void;
|
|
2127
2216
|
|
|
@@ -2131,18 +2220,21 @@ export namespace Gtef {
|
|
|
2131
2220
|
*
|
|
2132
2221
|
* The icon is not updated when the message type changes. Another {@link Gtef.InfoBar}
|
|
2133
2222
|
* must be created in that case.
|
|
2223
|
+
* @since 2.0
|
|
2134
2224
|
*/
|
|
2135
2225
|
add_icon(): void;
|
|
2136
2226
|
|
|
2137
2227
|
/**
|
|
2138
2228
|
* Adds a primary message.
|
|
2139
2229
|
* @param primary_msg a primary message.
|
|
2230
|
+
* @since 2.0
|
|
2140
2231
|
*/
|
|
2141
2232
|
add_primary_message(primary_msg: string): void;
|
|
2142
2233
|
|
|
2143
2234
|
/**
|
|
2144
2235
|
* Adds a secondary message.
|
|
2145
2236
|
* @param secondary_msg a secondary message.
|
|
2237
|
+
* @since 2.0
|
|
2146
2238
|
*/
|
|
2147
2239
|
add_secondary_message(secondary_msg: string): void;
|
|
2148
2240
|
}
|
|
@@ -2232,6 +2324,7 @@ export namespace Gtef {
|
|
|
2232
2324
|
* Returns the {@link Gtef.MenuShell} of `gtk_menu_shell`. The returned object is
|
|
2233
2325
|
* guaranteed to be the same for the lifetime of `gtk_menu_shell`.
|
|
2234
2326
|
* @param gtk_menu_shell a {@link Gtk.MenuShell}.
|
|
2327
|
+
* @since 2.0
|
|
2235
2328
|
*/
|
|
2236
2329
|
static get_from_gtk_menu_shell(gtk_menu_shell: Gtk.MenuShell): MenuShell;
|
|
2237
2330
|
|
|
@@ -2251,6 +2344,7 @@ export namespace Gtef {
|
|
|
2251
2344
|
// Methods
|
|
2252
2345
|
/**
|
|
2253
2346
|
* @returns the {@link Gtk.MenuShell} of `gtef_menu_shell`.
|
|
2347
|
+
* @since 2.0
|
|
2254
2348
|
*/
|
|
2255
2349
|
get_menu_shell(): Gtk.MenuShell;
|
|
2256
2350
|
}
|
|
@@ -2359,6 +2453,7 @@ export namespace Gtef {
|
|
|
2359
2453
|
* one below the first info bar, etc. With the main widget of `tab` at the
|
|
2360
2454
|
* bottom.
|
|
2361
2455
|
* @param info_bar a {@link Gtk.InfoBar}.
|
|
2456
|
+
* @since 1.0
|
|
2362
2457
|
*/
|
|
2363
2458
|
add_info_bar(info_bar: Gtk.InfoBar): void;
|
|
2364
2459
|
|
|
@@ -2374,12 +2469,14 @@ export namespace Gtef {
|
|
|
2374
2469
|
/**
|
|
2375
2470
|
* Retrieves the orientation of the `orientable`.
|
|
2376
2471
|
* @returns the orientation of the `orientable`.
|
|
2472
|
+
* @since 2.16
|
|
2377
2473
|
*/
|
|
2378
2474
|
get_orientation(): Gtk.Orientation;
|
|
2379
2475
|
|
|
2380
2476
|
/**
|
|
2381
2477
|
* Sets the orientation of the `orientable`.
|
|
2382
2478
|
* @param orientation the orientable’s new orientation.
|
|
2479
|
+
* @since 2.16
|
|
2383
2480
|
*/
|
|
2384
2481
|
set_orientation(orientation: Gtk.Orientation): void;
|
|
2385
2482
|
}
|
|
@@ -2511,17 +2608,20 @@ export namespace Gtef {
|
|
|
2511
2608
|
// Methods
|
|
2512
2609
|
/**
|
|
2513
2610
|
* Copies the clipboard.
|
|
2611
|
+
* @since 1.0
|
|
2514
2612
|
*/
|
|
2515
2613
|
copy_clipboard(): void;
|
|
2516
2614
|
|
|
2517
2615
|
/**
|
|
2518
2616
|
* Cuts the clipboard and then scrolls to the cursor position.
|
|
2617
|
+
* @since 1.0
|
|
2519
2618
|
*/
|
|
2520
2619
|
cut_clipboard(): void;
|
|
2521
2620
|
|
|
2522
2621
|
/**
|
|
2523
2622
|
* Deletes the text currently selected in the {@link Gtk.TextBuffer} associated
|
|
2524
2623
|
* to the view and then scrolls to the cursor position.
|
|
2624
|
+
* @since 1.0
|
|
2525
2625
|
*/
|
|
2526
2626
|
delete_selection(): void;
|
|
2527
2627
|
|
|
@@ -2530,6 +2630,7 @@ export namespace Gtef {
|
|
|
2530
2630
|
* `gtk_text_buffer_get_iter_at_line()`, and scrolls to that position.
|
|
2531
2631
|
* @param line a line number, counting from 0.
|
|
2532
2632
|
* @returns `true` if the cursor has been moved exactly to `line`, `false` if that line didn't exist.
|
|
2633
|
+
* @since 2.0
|
|
2533
2634
|
*/
|
|
2534
2635
|
goto_line(line: number): boolean;
|
|
2535
2636
|
|
|
@@ -2539,21 +2640,25 @@ export namespace Gtef {
|
|
|
2539
2640
|
* @param line a line number, counting from 0.
|
|
2540
2641
|
* @param line_offset the line offset, in characters (not bytes).
|
|
2541
2642
|
* @returns `true` if the cursor has been moved exactly to `line` and `line_offset`, `false` if that position didn't exist.
|
|
2643
|
+
* @since 2.0
|
|
2542
2644
|
*/
|
|
2543
2645
|
goto_line_offset(line: number, line_offset: number): boolean;
|
|
2544
2646
|
|
|
2545
2647
|
/**
|
|
2546
2648
|
* Pastes the clipboard and then scrolls to the cursor position.
|
|
2649
|
+
* @since 1.0
|
|
2547
2650
|
*/
|
|
2548
2651
|
paste_clipboard(): void;
|
|
2549
2652
|
|
|
2550
2653
|
/**
|
|
2551
2654
|
* Scrolls the `view` to the cursor position.
|
|
2655
|
+
* @since 1.0
|
|
2552
2656
|
*/
|
|
2553
2657
|
scroll_to_cursor(): void;
|
|
2554
2658
|
|
|
2555
2659
|
/**
|
|
2556
2660
|
* Selects all the text.
|
|
2661
|
+
* @since 1.0
|
|
2557
2662
|
*/
|
|
2558
2663
|
select_all(): void;
|
|
2559
2664
|
|
|
@@ -2565,6 +2670,7 @@ export namespace Gtef {
|
|
|
2565
2670
|
* the place where a warning or error occurred.
|
|
2566
2671
|
* @param start_line start of the region to select.
|
|
2567
2672
|
* @param end_line end of the region to select.
|
|
2673
|
+
* @since 2.0
|
|
2568
2674
|
*/
|
|
2569
2675
|
select_lines(start_line: number, end_line: number): void;
|
|
2570
2676
|
}
|
|
@@ -2586,6 +2692,7 @@ export namespace Gtef {
|
|
|
2586
2692
|
// Methods
|
|
2587
2693
|
/**
|
|
2588
2694
|
* @returns a copy of `info`. The copy will have a reference count of one.
|
|
2695
|
+
* @since 2.0
|
|
2589
2696
|
*/
|
|
2590
2697
|
copy(): ActionInfo;
|
|
2591
2698
|
|
|
@@ -2594,32 +2701,38 @@ export namespace Gtef {
|
|
|
2594
2701
|
* returns a `null`-terminated array, to be suitable for
|
|
2595
2702
|
* `gtk_application_set_accels_for_action()`.
|
|
2596
2703
|
* @returns a `null`-terminated array of accelerators in the format understood by `gtk_accelerator_parse()`.
|
|
2704
|
+
* @since 2.0
|
|
2597
2705
|
*/
|
|
2598
2706
|
get_accels(): string[];
|
|
2599
2707
|
|
|
2600
2708
|
/**
|
|
2601
2709
|
* @returns the action name, or `null`. Example: `"win.save"`.
|
|
2710
|
+
* @since 2.0
|
|
2602
2711
|
*/
|
|
2603
2712
|
get_action_name(): string | null;
|
|
2604
2713
|
|
|
2605
2714
|
/**
|
|
2606
2715
|
* @returns the icon name, or `null`.
|
|
2716
|
+
* @since 2.0
|
|
2607
2717
|
*/
|
|
2608
2718
|
get_icon_name(): string | null;
|
|
2609
2719
|
|
|
2610
2720
|
/**
|
|
2611
2721
|
* @returns the label (i.e. a short description), or `null`.
|
|
2722
|
+
* @since 2.0
|
|
2612
2723
|
*/
|
|
2613
2724
|
get_label(): string | null;
|
|
2614
2725
|
|
|
2615
2726
|
/**
|
|
2616
2727
|
* @returns the tooltip (i.e. a long description), or `null`.
|
|
2728
|
+
* @since 2.0
|
|
2617
2729
|
*/
|
|
2618
2730
|
get_tooltip(): string | null;
|
|
2619
2731
|
|
|
2620
2732
|
/**
|
|
2621
2733
|
* Increments the reference count of `info` by one.
|
|
2622
2734
|
* @returns the passed in `info`.
|
|
2735
|
+
* @since 2.0
|
|
2623
2736
|
*/
|
|
2624
2737
|
ref(): ActionInfo;
|
|
2625
2738
|
|
|
@@ -2629,33 +2742,39 @@ export namespace Gtef {
|
|
|
2629
2742
|
* `accels` must not be `null`, it must be a `null`-terminated array, to be
|
|
2630
2743
|
* consistent with `gtk_application_set_accels_for_action()`.
|
|
2631
2744
|
* @param accels a `null`-terminated array of accelerators in the format understood by `gtk_accelerator_parse()`.
|
|
2745
|
+
* @since 2.0
|
|
2632
2746
|
*/
|
|
2633
2747
|
set_accels(accels: string[]): void;
|
|
2634
2748
|
|
|
2635
2749
|
/**
|
|
2636
2750
|
* Sets the action name, for example `"win.save"`.
|
|
2637
2751
|
* @param action_name the action name.
|
|
2752
|
+
* @since 2.0
|
|
2638
2753
|
*/
|
|
2639
2754
|
set_action_name(action_name: string): void;
|
|
2640
2755
|
|
|
2641
2756
|
/**
|
|
2642
2757
|
* @param icon_name the icon name, or `null`.
|
|
2758
|
+
* @since 2.0
|
|
2643
2759
|
*/
|
|
2644
2760
|
set_icon_name(icon_name: string | null): void;
|
|
2645
2761
|
|
|
2646
2762
|
/**
|
|
2647
2763
|
* @param label the label (i.e. a short description), or `null`.
|
|
2764
|
+
* @since 2.0
|
|
2648
2765
|
*/
|
|
2649
2766
|
set_label(label: string | null): void;
|
|
2650
2767
|
|
|
2651
2768
|
/**
|
|
2652
2769
|
* @param tooltip the tooltip (i.e. a long description), or `null`.
|
|
2770
|
+
* @since 2.0
|
|
2653
2771
|
*/
|
|
2654
2772
|
set_tooltip(tooltip: string | null): void;
|
|
2655
2773
|
|
|
2656
2774
|
/**
|
|
2657
2775
|
* Decrements the reference count of `info` by one. If the reference count drops
|
|
2658
2776
|
* to 0, `info` is freed.
|
|
2777
|
+
* @since 2.0
|
|
2659
2778
|
*/
|
|
2660
2779
|
unref(): void;
|
|
2661
2780
|
}
|
|
@@ -2772,6 +2891,7 @@ export namespace Gtef {
|
|
|
2772
2891
|
// Static methods
|
|
2773
2892
|
/**
|
|
2774
2893
|
* Gets a list of all encodings known by {@link Gtef.Encoding}.
|
|
2894
|
+
* @since 2.0
|
|
2775
2895
|
*/
|
|
2776
2896
|
static get_all(): Encoding[];
|
|
2777
2897
|
|
|
@@ -2782,37 +2902,46 @@ export namespace Gtef {
|
|
|
2782
2902
|
* This function returns a different list depending on the current locale (i.e.
|
|
2783
2903
|
* language, country and default encoding). The UTF-8 encoding and the current
|
|
2784
2904
|
* locale encoding are guaranteed to be present in the returned list.
|
|
2905
|
+
* @since 2.0
|
|
2785
2906
|
*/
|
|
2786
2907
|
static get_default_candidates(): Encoding[];
|
|
2787
2908
|
|
|
2788
2909
|
// Methods
|
|
2789
2910
|
/**
|
|
2790
2911
|
* @returns a copy of `enc`.
|
|
2912
|
+
* @since 2.0
|
|
2791
2913
|
*/
|
|
2792
2914
|
copy(): Encoding;
|
|
2793
2915
|
|
|
2794
2916
|
/**
|
|
2795
2917
|
* @param enc2 a {@link Gtef.Encoding}, or `null`.
|
|
2796
2918
|
* @returns whether `enc1` and `enc2` are equals.
|
|
2919
|
+
* @since 2.0
|
|
2797
2920
|
*/
|
|
2798
2921
|
equals(enc2: Encoding | null): boolean;
|
|
2799
2922
|
|
|
2923
|
+
/**
|
|
2924
|
+
* @since 2.0
|
|
2925
|
+
*/
|
|
2800
2926
|
free(): void;
|
|
2801
2927
|
|
|
2802
2928
|
/**
|
|
2803
2929
|
* Gets the character set of the {@link Gtef.Encoding}, such as "UTF-8" or "ISO-8859-1".
|
|
2804
2930
|
* @returns the character set of the {@link Gtef.Encoding}.
|
|
2931
|
+
* @since 2.0
|
|
2805
2932
|
*/
|
|
2806
2933
|
get_charset(): string;
|
|
2807
2934
|
|
|
2808
2935
|
/**
|
|
2809
2936
|
* Gets the name of the {@link Gtef.Encoding} such as "Unicode" or "Western".
|
|
2810
2937
|
* @returns the name of the {@link Gtef.Encoding}.
|
|
2938
|
+
* @since 2.0
|
|
2811
2939
|
*/
|
|
2812
2940
|
get_name(): string;
|
|
2813
2941
|
|
|
2814
2942
|
/**
|
|
2815
2943
|
* @returns whether `enc` is a UTF-8 encoding.
|
|
2944
|
+
* @since 2.0
|
|
2816
2945
|
*/
|
|
2817
2946
|
is_utf8(): boolean;
|
|
2818
2947
|
|
|
@@ -2820,6 +2949,7 @@ export namespace Gtef {
|
|
|
2820
2949
|
* Returns the encoding name with the charset in parenthesis, for example
|
|
2821
2950
|
* "Unicode (UTF-8)". If the name is unknown, just the charset is returned.
|
|
2822
2951
|
* @returns a string representation. Free with `g_free()` when no longer needed.
|
|
2952
|
+
* @since 2.0
|
|
2823
2953
|
*/
|
|
2824
2954
|
to_string(): string;
|
|
2825
2955
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/gtef-2",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "GJS TypeScript type definitions for Gtef-2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "gtef-2.js",
|
|
@@ -36,21 +36,21 @@
|
|
|
36
36
|
"test": "tsc --project tsconfig.json"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@girs/gjs": "^4.
|
|
40
|
-
"@girs/gtksource-3.0": "^4.
|
|
41
|
-
"@girs/gtk-3.0": "^4.
|
|
42
|
-
"@girs/xlib-2.0": "^4.
|
|
43
|
-
"@girs/gdk-3.0": "^4.
|
|
44
|
-
"@girs/cairo-1.0": "^4.
|
|
45
|
-
"@girs/gobject-2.0": "^4.
|
|
46
|
-
"@girs/glib-2.0": "^4.
|
|
47
|
-
"@girs/pango-1.0": "^4.
|
|
48
|
-
"@girs/harfbuzz-0.0": "^4.
|
|
49
|
-
"@girs/freetype2-2.0": "^4.
|
|
50
|
-
"@girs/gio-2.0": "^4.
|
|
51
|
-
"@girs/gmodule-2.0": "^4.
|
|
52
|
-
"@girs/gdkpixbuf-2.0": "^4.
|
|
53
|
-
"@girs/atk-1.0": "^4.
|
|
39
|
+
"@girs/gjs": "^4.4.0",
|
|
40
|
+
"@girs/gtksource-3.0": "^4.4.0",
|
|
41
|
+
"@girs/gtk-3.0": "^4.4.0",
|
|
42
|
+
"@girs/xlib-2.0": "^4.4.0",
|
|
43
|
+
"@girs/gdk-3.0": "^4.4.0",
|
|
44
|
+
"@girs/cairo-1.0": "^4.4.0",
|
|
45
|
+
"@girs/gobject-2.0": "^4.4.0",
|
|
46
|
+
"@girs/glib-2.0": "^4.4.0",
|
|
47
|
+
"@girs/pango-1.0": "^4.4.0",
|
|
48
|
+
"@girs/harfbuzz-0.0": "^4.4.0",
|
|
49
|
+
"@girs/freetype2-2.0": "^4.4.0",
|
|
50
|
+
"@girs/gio-2.0": "^4.4.0",
|
|
51
|
+
"@girs/gmodule-2.0": "^4.4.0",
|
|
52
|
+
"@girs/gdkpixbuf-2.0": "^4.4.0",
|
|
53
|
+
"@girs/atk-1.0": "^4.4.0" },
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"typescript": "*"
|
|
56
56
|
},
|