@girs/gobject-2.0 2.76.1-3.2.3 → 2.77.0-3.2.8
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 +14 -1
- package/gobject-2.0-ambient.d.ts +0 -1
- package/gobject-2.0-ambient.js +2 -0
- package/gobject-2.0-import.d.ts +0 -1
- package/gobject-2.0-import.js +3 -0
- package/gobject-2.0.d.cts +383 -117
- package/gobject-2.0.d.ts +383 -117
- package/package.json +13 -7
package/gobject-2.0.d.ts
CHANGED
|
@@ -240,7 +240,7 @@ enum SignalMatchType {
|
|
|
240
240
|
* These flags used to be passed to g_type_init_with_debug_flags() which
|
|
241
241
|
* is now deprecated.
|
|
242
242
|
*
|
|
243
|
-
* If you need to enable debugging features, use the GOBJECT_DEBUG
|
|
243
|
+
* If you need to enable debugging features, use the `GOBJECT_DEBUG`
|
|
244
244
|
* environment variable.
|
|
245
245
|
* @bitfield
|
|
246
246
|
*/
|
|
@@ -723,14 +723,14 @@ function enum_get_value(enum_class: EnumClass, value: number): EnumValue | null
|
|
|
723
723
|
* @param name the name to look up
|
|
724
724
|
* @returns the #GEnumValue with name @name, or %NULL if the enumeration doesn't have a member with that name
|
|
725
725
|
*/
|
|
726
|
-
function enum_get_value_by_name(enum_class: EnumClass, name: string
|
|
726
|
+
function enum_get_value_by_name(enum_class: EnumClass, name: string): EnumValue | null
|
|
727
727
|
/**
|
|
728
728
|
* Looks up a #GEnumValue by nickname.
|
|
729
729
|
* @param enum_class a #GEnumClass
|
|
730
730
|
* @param nick the nickname to look up
|
|
731
731
|
* @returns the #GEnumValue with nickname @nick, or %NULL if the enumeration doesn't have a member with that nickname
|
|
732
732
|
*/
|
|
733
|
-
function enum_get_value_by_nick(enum_class: EnumClass, nick: string
|
|
733
|
+
function enum_get_value_by_nick(enum_class: EnumClass, nick: string): EnumValue | null
|
|
734
734
|
/**
|
|
735
735
|
* Registers a new static enumeration type with the name `name`.
|
|
736
736
|
*
|
|
@@ -741,7 +741,7 @@ function enum_get_value_by_nick(enum_class: EnumClass, nick: string | null): Enu
|
|
|
741
741
|
* @param const_static_values An array of #GEnumValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0. GObject keeps a reference to the data, so it cannot be stack-allocated.
|
|
742
742
|
* @returns The new type identifier.
|
|
743
743
|
*/
|
|
744
|
-
function enum_register_static(name: string
|
|
744
|
+
function enum_register_static(name: string, const_static_values: EnumValue): GType
|
|
745
745
|
/**
|
|
746
746
|
* Pretty-prints `value` in the form of the enum’s name.
|
|
747
747
|
*
|
|
@@ -773,14 +773,14 @@ function flags_get_first_value(flags_class: FlagsClass, value: number): FlagsVal
|
|
|
773
773
|
* @param name the name to look up
|
|
774
774
|
* @returns the #GFlagsValue with name @name, or %NULL if there is no flag with that name
|
|
775
775
|
*/
|
|
776
|
-
function flags_get_value_by_name(flags_class: FlagsClass, name: string
|
|
776
|
+
function flags_get_value_by_name(flags_class: FlagsClass, name: string): FlagsValue | null
|
|
777
777
|
/**
|
|
778
778
|
* Looks up a #GFlagsValue by nickname.
|
|
779
779
|
* @param flags_class a #GFlagsClass
|
|
780
780
|
* @param nick the nickname to look up
|
|
781
781
|
* @returns the #GFlagsValue with nickname @nick, or %NULL if there is no flag with that nickname
|
|
782
782
|
*/
|
|
783
|
-
function flags_get_value_by_nick(flags_class: FlagsClass, nick: string
|
|
783
|
+
function flags_get_value_by_nick(flags_class: FlagsClass, nick: string): FlagsValue | null
|
|
784
784
|
/**
|
|
785
785
|
* Registers a new static flags type with the name `name`.
|
|
786
786
|
*
|
|
@@ -791,7 +791,7 @@ function flags_get_value_by_nick(flags_class: FlagsClass, nick: string | null):
|
|
|
791
791
|
* @param const_static_values An array of #GFlagsValue structs for the possible flags values. The array is terminated by a struct with all members being 0. GObject keeps a reference to the data, so it cannot be stack-allocated.
|
|
792
792
|
* @returns The new type identifier.
|
|
793
793
|
*/
|
|
794
|
-
function flags_register_static(name: string
|
|
794
|
+
function flags_register_static(name: string, const_static_values: FlagsValue): GType
|
|
795
795
|
/**
|
|
796
796
|
* Pretty-prints `value` in the form of the flag names separated by ` | ` and
|
|
797
797
|
* sorted. Any extra bits will be shown at the end as a hexadecimal number.
|
|
@@ -819,7 +819,7 @@ function gtype_get_type(): GType
|
|
|
819
819
|
* @param flags flags for the property specified
|
|
820
820
|
* @returns a newly created parameter specification
|
|
821
821
|
*/
|
|
822
|
-
function param_spec_boolean(name: string
|
|
822
|
+
function param_spec_boolean(name: string, nick: string | null, blurb: string | null, default_value: boolean, flags: ParamFlags): ParamSpec
|
|
823
823
|
/**
|
|
824
824
|
* Creates a new #GParamSpecBoxed instance specifying a %G_TYPE_BOXED
|
|
825
825
|
* derived property.
|
|
@@ -832,7 +832,7 @@ function param_spec_boolean(name: string | null, nick: string | null, blurb: str
|
|
|
832
832
|
* @param flags flags for the property specified
|
|
833
833
|
* @returns a newly created parameter specification
|
|
834
834
|
*/
|
|
835
|
-
function param_spec_boxed(name: string
|
|
835
|
+
function param_spec_boxed(name: string, nick: string | null, blurb: string | null, boxed_type: GType, flags: ParamFlags): ParamSpec
|
|
836
836
|
/**
|
|
837
837
|
* Creates a new #GParamSpecChar instance specifying a %G_TYPE_CHAR property.
|
|
838
838
|
* @param name canonical name of the property specified
|
|
@@ -844,7 +844,7 @@ function param_spec_boxed(name: string | null, nick: string | null, blurb: strin
|
|
|
844
844
|
* @param flags flags for the property specified
|
|
845
845
|
* @returns a newly created parameter specification
|
|
846
846
|
*/
|
|
847
|
-
function param_spec_char(name: string
|
|
847
|
+
function param_spec_char(name: string, nick: string | null, blurb: string | null, minimum: number, maximum: number, default_value: number, flags: ParamFlags): ParamSpec
|
|
848
848
|
/**
|
|
849
849
|
* Creates a new #GParamSpecDouble instance specifying a %G_TYPE_DOUBLE
|
|
850
850
|
* property.
|
|
@@ -859,7 +859,7 @@ function param_spec_char(name: string | null, nick: string | null, blurb: string
|
|
|
859
859
|
* @param flags flags for the property specified
|
|
860
860
|
* @returns a newly created parameter specification
|
|
861
861
|
*/
|
|
862
|
-
function param_spec_double(name: string
|
|
862
|
+
function param_spec_double(name: string, nick: string | null, blurb: string | null, minimum: number, maximum: number, default_value: number, flags: ParamFlags): ParamSpec
|
|
863
863
|
/**
|
|
864
864
|
* Creates a new #GParamSpecEnum instance specifying a %G_TYPE_ENUM
|
|
865
865
|
* property.
|
|
@@ -873,7 +873,7 @@ function param_spec_double(name: string | null, nick: string | null, blurb: stri
|
|
|
873
873
|
* @param flags flags for the property specified
|
|
874
874
|
* @returns a newly created parameter specification
|
|
875
875
|
*/
|
|
876
|
-
function param_spec_enum(name: string
|
|
876
|
+
function param_spec_enum(name: string, nick: string | null, blurb: string | null, enum_type: GType, default_value: number, flags: ParamFlags): ParamSpec
|
|
877
877
|
/**
|
|
878
878
|
* Creates a new #GParamSpecFlags instance specifying a %G_TYPE_FLAGS
|
|
879
879
|
* property.
|
|
@@ -887,7 +887,7 @@ function param_spec_enum(name: string | null, nick: string | null, blurb: string
|
|
|
887
887
|
* @param flags flags for the property specified
|
|
888
888
|
* @returns a newly created parameter specification
|
|
889
889
|
*/
|
|
890
|
-
function param_spec_flags(name: string
|
|
890
|
+
function param_spec_flags(name: string, nick: string | null, blurb: string | null, flags_type: GType, default_value: number, flags: ParamFlags): ParamSpec
|
|
891
891
|
/**
|
|
892
892
|
* Creates a new #GParamSpecFloat instance specifying a %G_TYPE_FLOAT property.
|
|
893
893
|
*
|
|
@@ -901,7 +901,7 @@ function param_spec_flags(name: string | null, nick: string | null, blurb: strin
|
|
|
901
901
|
* @param flags flags for the property specified
|
|
902
902
|
* @returns a newly created parameter specification
|
|
903
903
|
*/
|
|
904
|
-
function param_spec_float(name: string
|
|
904
|
+
function param_spec_float(name: string, nick: string | null, blurb: string | null, minimum: number, maximum: number, default_value: number, flags: ParamFlags): ParamSpec
|
|
905
905
|
/**
|
|
906
906
|
* Creates a new #GParamSpecGType instance specifying a
|
|
907
907
|
* %G_TYPE_GTYPE property.
|
|
@@ -914,7 +914,7 @@ function param_spec_float(name: string | null, nick: string | null, blurb: strin
|
|
|
914
914
|
* @param flags flags for the property specified
|
|
915
915
|
* @returns a newly created parameter specification
|
|
916
916
|
*/
|
|
917
|
-
function param_spec_gtype(name: string
|
|
917
|
+
function param_spec_gtype(name: string, nick: string | null, blurb: string | null, is_a_type: GType, flags: ParamFlags): ParamSpec
|
|
918
918
|
/**
|
|
919
919
|
* Creates a new #GParamSpecInt instance specifying a %G_TYPE_INT property.
|
|
920
920
|
*
|
|
@@ -928,7 +928,7 @@ function param_spec_gtype(name: string | null, nick: string | null, blurb: strin
|
|
|
928
928
|
* @param flags flags for the property specified
|
|
929
929
|
* @returns a newly created parameter specification
|
|
930
930
|
*/
|
|
931
|
-
function param_spec_int(name: string
|
|
931
|
+
function param_spec_int(name: string, nick: string | null, blurb: string | null, minimum: number, maximum: number, default_value: number, flags: ParamFlags): ParamSpec
|
|
932
932
|
/**
|
|
933
933
|
* Creates a new #GParamSpecInt64 instance specifying a %G_TYPE_INT64 property.
|
|
934
934
|
*
|
|
@@ -942,7 +942,7 @@ function param_spec_int(name: string | null, nick: string | null, blurb: string
|
|
|
942
942
|
* @param flags flags for the property specified
|
|
943
943
|
* @returns a newly created parameter specification
|
|
944
944
|
*/
|
|
945
|
-
function param_spec_int64(name: string
|
|
945
|
+
function param_spec_int64(name: string, nick: string | null, blurb: string | null, minimum: number, maximum: number, default_value: number, flags: ParamFlags): ParamSpec
|
|
946
946
|
/**
|
|
947
947
|
* Creates a new #GParamSpecLong instance specifying a %G_TYPE_LONG property.
|
|
948
948
|
*
|
|
@@ -956,7 +956,7 @@ function param_spec_int64(name: string | null, nick: string | null, blurb: strin
|
|
|
956
956
|
* @param flags flags for the property specified
|
|
957
957
|
* @returns a newly created parameter specification
|
|
958
958
|
*/
|
|
959
|
-
function param_spec_long(name: string
|
|
959
|
+
function param_spec_long(name: string, nick: string | null, blurb: string | null, minimum: number, maximum: number, default_value: number, flags: ParamFlags): ParamSpec
|
|
960
960
|
/**
|
|
961
961
|
* Creates a new #GParamSpecBoxed instance specifying a %G_TYPE_OBJECT
|
|
962
962
|
* derived property.
|
|
@@ -969,7 +969,7 @@ function param_spec_long(name: string | null, nick: string | null, blurb: string
|
|
|
969
969
|
* @param flags flags for the property specified
|
|
970
970
|
* @returns a newly created parameter specification
|
|
971
971
|
*/
|
|
972
|
-
function param_spec_object(name: string
|
|
972
|
+
function param_spec_object(name: string, nick: string | null, blurb: string | null, object_type: GType, flags: ParamFlags): ParamSpec
|
|
973
973
|
/**
|
|
974
974
|
* Creates a new #GParamSpecParam instance specifying a %G_TYPE_PARAM
|
|
975
975
|
* property.
|
|
@@ -982,7 +982,7 @@ function param_spec_object(name: string | null, nick: string | null, blurb: stri
|
|
|
982
982
|
* @param flags flags for the property specified
|
|
983
983
|
* @returns a newly created parameter specification
|
|
984
984
|
*/
|
|
985
|
-
function param_spec_param(name: string
|
|
985
|
+
function param_spec_param(name: string, nick: string | null, blurb: string | null, param_type: GType, flags: ParamFlags): ParamSpec
|
|
986
986
|
/**
|
|
987
987
|
* Creates a new #GParamSpecPointer instance specifying a pointer property.
|
|
988
988
|
* Where possible, it is better to use g_param_spec_object() or
|
|
@@ -995,7 +995,7 @@ function param_spec_param(name: string | null, nick: string | null, blurb: strin
|
|
|
995
995
|
* @param flags flags for the property specified
|
|
996
996
|
* @returns a newly created parameter specification
|
|
997
997
|
*/
|
|
998
|
-
function param_spec_pointer(name: string
|
|
998
|
+
function param_spec_pointer(name: string, nick: string | null, blurb: string | null, flags: ParamFlags): ParamSpec
|
|
999
999
|
/**
|
|
1000
1000
|
* Creates a new #GParamSpecString instance.
|
|
1001
1001
|
*
|
|
@@ -1007,7 +1007,7 @@ function param_spec_pointer(name: string | null, nick: string | null, blurb: str
|
|
|
1007
1007
|
* @param flags flags for the property specified
|
|
1008
1008
|
* @returns a newly created parameter specification
|
|
1009
1009
|
*/
|
|
1010
|
-
function param_spec_string(name: string
|
|
1010
|
+
function param_spec_string(name: string, nick: string | null, blurb: string | null, default_value: string | null, flags: ParamFlags): ParamSpec
|
|
1011
1011
|
/**
|
|
1012
1012
|
* Creates a new #GParamSpecUChar instance specifying a %G_TYPE_UCHAR property.
|
|
1013
1013
|
* @param name canonical name of the property specified
|
|
@@ -1019,7 +1019,7 @@ function param_spec_string(name: string | null, nick: string | null, blurb: stri
|
|
|
1019
1019
|
* @param flags flags for the property specified
|
|
1020
1020
|
* @returns a newly created parameter specification
|
|
1021
1021
|
*/
|
|
1022
|
-
function param_spec_uchar(name: string
|
|
1022
|
+
function param_spec_uchar(name: string, nick: string | null, blurb: string | null, minimum: number, maximum: number, default_value: number, flags: ParamFlags): ParamSpec
|
|
1023
1023
|
/**
|
|
1024
1024
|
* Creates a new #GParamSpecUInt instance specifying a %G_TYPE_UINT property.
|
|
1025
1025
|
*
|
|
@@ -1033,7 +1033,7 @@ function param_spec_uchar(name: string | null, nick: string | null, blurb: strin
|
|
|
1033
1033
|
* @param flags flags for the property specified
|
|
1034
1034
|
* @returns a newly created parameter specification
|
|
1035
1035
|
*/
|
|
1036
|
-
function param_spec_uint(name: string
|
|
1036
|
+
function param_spec_uint(name: string, nick: string | null, blurb: string | null, minimum: number, maximum: number, default_value: number, flags: ParamFlags): ParamSpec
|
|
1037
1037
|
/**
|
|
1038
1038
|
* Creates a new #GParamSpecUInt64 instance specifying a %G_TYPE_UINT64
|
|
1039
1039
|
* property.
|
|
@@ -1048,7 +1048,7 @@ function param_spec_uint(name: string | null, nick: string | null, blurb: string
|
|
|
1048
1048
|
* @param flags flags for the property specified
|
|
1049
1049
|
* @returns a newly created parameter specification
|
|
1050
1050
|
*/
|
|
1051
|
-
function param_spec_uint64(name: string
|
|
1051
|
+
function param_spec_uint64(name: string, nick: string | null, blurb: string | null, minimum: number, maximum: number, default_value: number, flags: ParamFlags): ParamSpec
|
|
1052
1052
|
/**
|
|
1053
1053
|
* Creates a new #GParamSpecULong instance specifying a %G_TYPE_ULONG
|
|
1054
1054
|
* property.
|
|
@@ -1063,7 +1063,7 @@ function param_spec_uint64(name: string | null, nick: string | null, blurb: stri
|
|
|
1063
1063
|
* @param flags flags for the property specified
|
|
1064
1064
|
* @returns a newly created parameter specification
|
|
1065
1065
|
*/
|
|
1066
|
-
function param_spec_ulong(name: string
|
|
1066
|
+
function param_spec_ulong(name: string, nick: string | null, blurb: string | null, minimum: number, maximum: number, default_value: number, flags: ParamFlags): ParamSpec
|
|
1067
1067
|
/**
|
|
1068
1068
|
* Creates a new #GParamSpecUnichar instance specifying a %G_TYPE_UINT
|
|
1069
1069
|
* property. #GValue structures for this property can be accessed with
|
|
@@ -1077,7 +1077,7 @@ function param_spec_ulong(name: string | null, nick: string | null, blurb: strin
|
|
|
1077
1077
|
* @param flags flags for the property specified
|
|
1078
1078
|
* @returns a newly created parameter specification
|
|
1079
1079
|
*/
|
|
1080
|
-
function param_spec_unichar(name: string
|
|
1080
|
+
function param_spec_unichar(name: string, nick: string | null, blurb: string | null, default_value: string, flags: ParamFlags): ParamSpec
|
|
1081
1081
|
/**
|
|
1082
1082
|
* Creates a new #GParamSpecVariant instance specifying a #GVariant
|
|
1083
1083
|
* property.
|
|
@@ -1093,7 +1093,7 @@ function param_spec_unichar(name: string | null, nick: string | null, blurb: str
|
|
|
1093
1093
|
* @param flags flags for the property specified
|
|
1094
1094
|
* @returns the newly created #GParamSpec
|
|
1095
1095
|
*/
|
|
1096
|
-
function param_spec_variant(name: string
|
|
1096
|
+
function param_spec_variant(name: string, nick: string | null, blurb: string | null, type: GLib.VariantType, default_value: GLib.Variant | null, flags: ParamFlags): ParamSpec
|
|
1097
1097
|
/**
|
|
1098
1098
|
* Registers `name` as the name of a new static type derived
|
|
1099
1099
|
* from %G_TYPE_PARAM.
|
|
@@ -1105,7 +1105,7 @@ function param_spec_variant(name: string | null, nick: string | null, blurb: str
|
|
|
1105
1105
|
* @param pspec_info The #GParamSpecTypeInfo for this #GParamSpec type.
|
|
1106
1106
|
* @returns The new type identifier.
|
|
1107
1107
|
*/
|
|
1108
|
-
function param_type_register_static(name: string
|
|
1108
|
+
function param_type_register_static(name: string, pspec_info: ParamSpecTypeInfo): GType
|
|
1109
1109
|
/**
|
|
1110
1110
|
* Transforms `src_value` into `dest_value` if possible, and then
|
|
1111
1111
|
* validates `dest_value,` in order for it to conform to `pspec`. If
|
|
@@ -1170,7 +1170,7 @@ function param_values_cmp(pspec: ParamSpec, value1: any, value2: any): number
|
|
|
1170
1170
|
* @param name the name of the new pointer type.
|
|
1171
1171
|
* @returns a new %G_TYPE_POINTER derived type id for @name.
|
|
1172
1172
|
*/
|
|
1173
|
-
function pointer_type_register_static(name: string
|
|
1173
|
+
function pointer_type_register_static(name: string): GType
|
|
1174
1174
|
/**
|
|
1175
1175
|
* A predefined #GSignalAccumulator for signals intended to be used as a
|
|
1176
1176
|
* hook for application code to provide a particular value. Usually
|
|
@@ -1233,7 +1233,7 @@ function signal_chain_from_overridden(instance_and_params: any[], return_value:
|
|
|
1233
1233
|
* @param after whether the handler should be called before or after the default handler of the signal.
|
|
1234
1234
|
* @returns the handler ID (always greater than 0 for successful connections)
|
|
1235
1235
|
*/
|
|
1236
|
-
function signal_connect_closure(instance: Object, detailed_signal: string
|
|
1236
|
+
function signal_connect_closure(instance: Object, detailed_signal: string, closure: TClosure, after: boolean): number
|
|
1237
1237
|
/**
|
|
1238
1238
|
* Connects a closure to a signal for a particular object.
|
|
1239
1239
|
*
|
|
@@ -1331,12 +1331,18 @@ function signal_handler_is_connected(instance: Object, handler_id: number): bool
|
|
|
1331
1331
|
function signal_handler_unblock(instance: Object, handler_id: number): void
|
|
1332
1332
|
/**
|
|
1333
1333
|
* Blocks all handlers on an instance that match a certain selection criteria.
|
|
1334
|
-
*
|
|
1335
|
-
*
|
|
1336
|
-
*
|
|
1334
|
+
*
|
|
1335
|
+
* The criteria mask is passed as a combination of #GSignalMatchType flags, and
|
|
1336
|
+
* the criteria values are passed as arguments. A handler must match on all
|
|
1337
|
+
* flags set in `mask` to be blocked (i.e. the match is conjunctive).
|
|
1338
|
+
*
|
|
1339
|
+
* Passing at least one of the %G_SIGNAL_MATCH_ID, %G_SIGNAL_MATCH_CLOSURE,
|
|
1340
|
+
* %G_SIGNAL_MATCH_FUNC
|
|
1337
1341
|
* or %G_SIGNAL_MATCH_DATA match flags is required for successful matches.
|
|
1338
1342
|
* If no handlers were found, 0 is returned, the number of blocked handlers
|
|
1339
1343
|
* otherwise.
|
|
1344
|
+
*
|
|
1345
|
+
* Support for %G_SIGNAL_MATCH_ID was added in GLib 2.78.
|
|
1340
1346
|
* @param instance The instance to block handlers from.
|
|
1341
1347
|
* @param mask Mask indicating which of `signal_id,` `detail,` `closure,` `func` and/or `data` the handlers have to match.
|
|
1342
1348
|
* @param signal_id Signal the handlers have to be connected to.
|
|
@@ -1355,13 +1361,19 @@ function signal_handlers_block_matched(instance: Object, mask: SignalMatchType,
|
|
|
1355
1361
|
function signal_handlers_destroy(instance: Object): void
|
|
1356
1362
|
/**
|
|
1357
1363
|
* Disconnects all handlers on an instance that match a certain
|
|
1358
|
-
* selection criteria.
|
|
1359
|
-
*
|
|
1360
|
-
* passed as
|
|
1361
|
-
*
|
|
1364
|
+
* selection criteria.
|
|
1365
|
+
*
|
|
1366
|
+
* The criteria mask is passed as a combination of #GSignalMatchType flags, and
|
|
1367
|
+
* the criteria values are passed as arguments. A handler must match on all
|
|
1368
|
+
* flags set in `mask` to be disconnected (i.e. the match is conjunctive).
|
|
1369
|
+
*
|
|
1370
|
+
* Passing at least one of the %G_SIGNAL_MATCH_ID, %G_SIGNAL_MATCH_CLOSURE,
|
|
1371
|
+
* %G_SIGNAL_MATCH_FUNC or
|
|
1362
1372
|
* %G_SIGNAL_MATCH_DATA match flags is required for successful
|
|
1363
1373
|
* matches. If no handlers were found, 0 is returned, the number of
|
|
1364
1374
|
* disconnected handlers otherwise.
|
|
1375
|
+
*
|
|
1376
|
+
* Support for %G_SIGNAL_MATCH_ID was added in GLib 2.78.
|
|
1365
1377
|
* @param instance The instance to remove handlers from.
|
|
1366
1378
|
* @param mask Mask indicating which of `signal_id,` `detail,` `closure,` `func` and/or `data` the handlers have to match.
|
|
1367
1379
|
* @param signal_id Signal the handlers have to be connected to.
|
|
@@ -1373,13 +1385,20 @@ function signal_handlers_destroy(instance: Object): void
|
|
|
1373
1385
|
function signal_handlers_disconnect_matched(instance: Object, mask: SignalMatchType, signal_id: number, detail: GLib.Quark, func: any | null, data: any | null): number
|
|
1374
1386
|
/**
|
|
1375
1387
|
* Unblocks all handlers on an instance that match a certain selection
|
|
1376
|
-
* criteria.
|
|
1377
|
-
*
|
|
1378
|
-
*
|
|
1388
|
+
* criteria.
|
|
1389
|
+
*
|
|
1390
|
+
* The criteria mask is passed as a combination of #GSignalMatchType flags, and
|
|
1391
|
+
* the criteria values are passed as arguments. A handler must match on all
|
|
1392
|
+
* flags set in `mask` to be unblocked (i.e. the match is conjunctive).
|
|
1393
|
+
*
|
|
1394
|
+
* Passing at least one of the %G_SIGNAL_MATCH_ID, %G_SIGNAL_MATCH_CLOSURE,
|
|
1395
|
+
* %G_SIGNAL_MATCH_FUNC
|
|
1379
1396
|
* or %G_SIGNAL_MATCH_DATA match flags is required for successful matches.
|
|
1380
1397
|
* If no handlers were found, 0 is returned, the number of unblocked handlers
|
|
1381
1398
|
* otherwise. The match criteria should not apply to any handlers that are
|
|
1382
1399
|
* not currently blocked.
|
|
1400
|
+
*
|
|
1401
|
+
* Support for %G_SIGNAL_MATCH_ID was added in GLib 2.78.
|
|
1383
1402
|
* @param instance The instance to unblock handlers from.
|
|
1384
1403
|
* @param mask Mask indicating which of `signal_id,` `detail,` `closure,` `func` and/or `data` the handlers have to match.
|
|
1385
1404
|
* @param signal_id Signal the handlers have to be connected to.
|
|
@@ -1423,7 +1442,7 @@ function signal_has_handler_pending(instance: Object, signal_id: number, detail:
|
|
|
1423
1442
|
* @param name the canonical name of the signal
|
|
1424
1443
|
* @returns %TRUE if @name is a valid signal name, %FALSE otherwise.
|
|
1425
1444
|
*/
|
|
1426
|
-
function signal_is_valid_name(name: string
|
|
1445
|
+
function signal_is_valid_name(name: string): boolean
|
|
1427
1446
|
/**
|
|
1428
1447
|
* Lists the signals by id that a certain instance or interface type
|
|
1429
1448
|
* created. Further information about the signals can be acquired through
|
|
@@ -1448,7 +1467,7 @@ function signal_list_ids(itype: GType): number[]
|
|
|
1448
1467
|
* @param itype the type that the signal operates on.
|
|
1449
1468
|
* @returns the signal's identifying number, or 0 if no signal was found.
|
|
1450
1469
|
*/
|
|
1451
|
-
function signal_lookup(name: string
|
|
1470
|
+
function signal_lookup(name: string, itype: GType): number
|
|
1452
1471
|
/**
|
|
1453
1472
|
* Given the signal's identifier, finds its name.
|
|
1454
1473
|
*
|
|
@@ -1478,7 +1497,7 @@ function signal_override_class_closure(signal_id: number, instance_type: GType,
|
|
|
1478
1497
|
* @param force_detail_quark %TRUE forces creation of a #GQuark for the detail.
|
|
1479
1498
|
* @returns Whether the signal name could successfully be parsed and @signal_id_p and @detail_p contain valid return values.
|
|
1480
1499
|
*/
|
|
1481
|
-
function signal_parse_name(detailed_signal: string
|
|
1500
|
+
function signal_parse_name(detailed_signal: string, itype: GType, force_detail_quark: boolean): [ /* returnType */ boolean, /* signal_id_p */ number, /* detail_p */ GLib.Quark ]
|
|
1482
1501
|
/**
|
|
1483
1502
|
* Queries the signal system for in-depth information about a
|
|
1484
1503
|
* specific signal. This function will fill in a user-provided
|
|
@@ -1526,7 +1545,7 @@ function signal_stop_emission(instance: Object, signal_id: number, detail: GLib.
|
|
|
1526
1545
|
* @param instance the object whose signal handlers you wish to stop.
|
|
1527
1546
|
* @param detailed_signal a string of the form "signal-name::detail".
|
|
1528
1547
|
*/
|
|
1529
|
-
function signal_stop_emission_by_name(instance: Object, detailed_signal: string
|
|
1548
|
+
function signal_stop_emission_by_name(instance: Object, detailed_signal: string): void
|
|
1530
1549
|
/**
|
|
1531
1550
|
* Creates a new closure which invokes the function found at the offset
|
|
1532
1551
|
* `struct_offset` in the class structure of the interface or classed type
|
|
@@ -1720,7 +1739,7 @@ function type_free_instance(instance: TypeInstance): void
|
|
|
1720
1739
|
* @param name type name to look up
|
|
1721
1740
|
* @returns corresponding type ID or 0
|
|
1722
1741
|
*/
|
|
1723
|
-
function type_from_name(name: string
|
|
1742
|
+
function type_from_name(name: string): GType
|
|
1724
1743
|
/**
|
|
1725
1744
|
* Internal function, used to extract the fundamental type ID portion.
|
|
1726
1745
|
* Use G_TYPE_FUNDAMENTAL() instead.
|
|
@@ -1739,8 +1758,8 @@ function type_fundamental_next(): GType
|
|
|
1739
1758
|
/**
|
|
1740
1759
|
* Returns the number of instances allocated of the particular type;
|
|
1741
1760
|
* this is only available if GLib is built with debugging support and
|
|
1742
|
-
* the
|
|
1743
|
-
* variable to include instance-count).
|
|
1761
|
+
* the `instance-count` debug flag is set (by setting the `GOBJECT_DEBUG`
|
|
1762
|
+
* variable to include `instance-count`).
|
|
1744
1763
|
* @param type a #GType
|
|
1745
1764
|
* @returns the number of instances allocated of the given type; if instance counts are not available, returns 0.
|
|
1746
1765
|
*/
|
|
@@ -1783,7 +1802,7 @@ function type_init(): void
|
|
|
1783
1802
|
* flags. Since GLib 2.36, the type system is initialised automatically
|
|
1784
1803
|
* and this function does nothing.
|
|
1785
1804
|
*
|
|
1786
|
-
* If you need to enable debugging features, use the GOBJECT_DEBUG
|
|
1805
|
+
* If you need to enable debugging features, use the `GOBJECT_DEBUG`
|
|
1787
1806
|
* environment variable.
|
|
1788
1807
|
* @param debug_flags bitwise combination of #GTypeDebugFlags values for debugging purposes
|
|
1789
1808
|
*/
|
|
@@ -1859,8 +1878,8 @@ function type_is_a(type: GType, is_a_type: GType): boolean
|
|
|
1859
1878
|
* @returns static type name or %NULL
|
|
1860
1879
|
*/
|
|
1861
1880
|
function type_name(type: GType): string | null
|
|
1862
|
-
function type_name_from_class(g_class: TypeClass): string
|
|
1863
|
-
function type_name_from_instance(instance: TypeInstance): string
|
|
1881
|
+
function type_name_from_class(g_class: TypeClass): string
|
|
1882
|
+
function type_name_from_instance(instance: TypeInstance): string
|
|
1864
1883
|
/**
|
|
1865
1884
|
* Given a `leaf_type` and a `root_type` which is contained in its
|
|
1866
1885
|
* ancestry, return the type that `root_type` is the immediate parent
|
|
@@ -1909,7 +1928,7 @@ function type_query(type: GType): /* query */ TypeQuery
|
|
|
1909
1928
|
* @param flags bitwise combination of #GTypeFlags values
|
|
1910
1929
|
* @returns the new type identifier or %G_TYPE_INVALID if registration failed
|
|
1911
1930
|
*/
|
|
1912
|
-
function type_register_dynamic(parent_type: GType, type_name: string
|
|
1931
|
+
function type_register_dynamic(parent_type: GType, type_name: string, plugin: TypePlugin, flags: TypeFlags): GType
|
|
1913
1932
|
/**
|
|
1914
1933
|
* Registers `type_id` as the predefined identifier and `type_name` as the
|
|
1915
1934
|
* name of a fundamental type. If `type_id` is already registered, or a
|
|
@@ -1925,7 +1944,7 @@ function type_register_dynamic(parent_type: GType, type_name: string | null, plu
|
|
|
1925
1944
|
* @param flags bitwise combination of #GTypeFlags values
|
|
1926
1945
|
* @returns the predefined type identifier
|
|
1927
1946
|
*/
|
|
1928
|
-
function type_register_fundamental(type_id: GType, type_name: string
|
|
1947
|
+
function type_register_fundamental(type_id: GType, type_name: string, info: TypeInfo, finfo: TypeFundamentalInfo, flags: TypeFlags): GType
|
|
1929
1948
|
/**
|
|
1930
1949
|
* Registers `type_name` as the name of a new static type derived from
|
|
1931
1950
|
* `parent_type`. The type system uses the information contained in the
|
|
@@ -1938,7 +1957,7 @@ function type_register_fundamental(type_id: GType, type_name: string | null, inf
|
|
|
1938
1957
|
* @param flags bitwise combination of #GTypeFlags values
|
|
1939
1958
|
* @returns the new type identifier
|
|
1940
1959
|
*/
|
|
1941
|
-
function type_register_static(parent_type: GType, type_name: string
|
|
1960
|
+
function type_register_static(parent_type: GType, type_name: string, info: TypeInfo, flags: TypeFlags): GType
|
|
1942
1961
|
/**
|
|
1943
1962
|
* Attaches arbitrary data to a type.
|
|
1944
1963
|
* @param type a #GType
|
|
@@ -2390,6 +2409,226 @@ interface TypePluginUnuse {
|
|
|
2390
2409
|
interface TypePluginUse {
|
|
2391
2410
|
(plugin: TypePlugin): void
|
|
2392
2411
|
}
|
|
2412
|
+
/**
|
|
2413
|
+
* This function is responsible for converting the values collected from
|
|
2414
|
+
* a variadic argument list into contents suitable for storage in a #GValue.
|
|
2415
|
+
*
|
|
2416
|
+
* This function should setup `value` similar to #GTypeValueInitFunc; e.g.
|
|
2417
|
+
* for a string value that does not allow `NULL` pointers, it needs to either
|
|
2418
|
+
* emit an error, or do an implicit conversion by storing an empty string.
|
|
2419
|
+
*
|
|
2420
|
+
* The `value` passed in to this function has a zero-filled data array, so
|
|
2421
|
+
* just like for #GTypeValueInitFunc it is guaranteed to not contain any old
|
|
2422
|
+
* contents that might need freeing.
|
|
2423
|
+
*
|
|
2424
|
+
* The `n_collect_values` argument is the string length of the `collect_format`
|
|
2425
|
+
* field of #GTypeValueTable, and `collect_values` is an array of #GTypeCValue
|
|
2426
|
+
* with length of `n_collect_values,` containing the collected values according
|
|
2427
|
+
* to `collect_format`.
|
|
2428
|
+
*
|
|
2429
|
+
* The `collect_flags` argument provided as a hint by the caller. It may
|
|
2430
|
+
* contain the flag %G_VALUE_NOCOPY_CONTENTS indicating that the collected
|
|
2431
|
+
* value contents may be considered ‘static’ for the duration of the `value`
|
|
2432
|
+
* lifetime. Thus an extra copy of the contents stored in `collect_values` is
|
|
2433
|
+
* not required for assignment to `value`.
|
|
2434
|
+
*
|
|
2435
|
+
* For our above string example, we continue with:
|
|
2436
|
+
*
|
|
2437
|
+
*
|
|
2438
|
+
* ```c
|
|
2439
|
+
* if (!collect_values[0].v_pointer)
|
|
2440
|
+
* value->data[0].v_pointer = g_strdup ("");
|
|
2441
|
+
* else if (collect_flags & G_VALUE_NOCOPY_CONTENTS)
|
|
2442
|
+
* {
|
|
2443
|
+
* value->data[0].v_pointer = collect_values[0].v_pointer;
|
|
2444
|
+
* // keep a flag for the value_free() implementation to not free this string
|
|
2445
|
+
* value->data[1].v_uint = G_VALUE_NOCOPY_CONTENTS;
|
|
2446
|
+
* }
|
|
2447
|
+
* else
|
|
2448
|
+
* value->data[0].v_pointer = g_strdup (collect_values[0].v_pointer);
|
|
2449
|
+
* return NULL;
|
|
2450
|
+
* ```
|
|
2451
|
+
*
|
|
2452
|
+
*
|
|
2453
|
+
* It should be noted, that it is generally a bad idea to follow the
|
|
2454
|
+
* %G_VALUE_NOCOPY_CONTENTS hint for reference counted types. Due to
|
|
2455
|
+
* reentrancy requirements and reference count assertions performed
|
|
2456
|
+
* by the signal emission code, reference counts should always be
|
|
2457
|
+
* incremented for reference counted contents stored in the `value->data`
|
|
2458
|
+
* array. To deviate from our string example for a moment, and taking
|
|
2459
|
+
* a look at an exemplary implementation for `GTypeValueTable.collect_value()`
|
|
2460
|
+
* of `GObject`:
|
|
2461
|
+
*
|
|
2462
|
+
*
|
|
2463
|
+
* ```c
|
|
2464
|
+
* GObject *object = G_OBJECT (collect_values[0].v_pointer);
|
|
2465
|
+
* g_return_val_if_fail (object != NULL,
|
|
2466
|
+
* g_strdup_printf ("Object %p passed as invalid NULL pointer", object));
|
|
2467
|
+
* // never honour G_VALUE_NOCOPY_CONTENTS for ref-counted types
|
|
2468
|
+
* value->data[0].v_pointer = g_object_ref (object);
|
|
2469
|
+
* return NULL;
|
|
2470
|
+
* ```
|
|
2471
|
+
*
|
|
2472
|
+
*
|
|
2473
|
+
* The reference count for valid objects is always incremented, regardless
|
|
2474
|
+
* of `collect_flags`. For invalid objects, the example returns a newly
|
|
2475
|
+
* allocated string without altering `value`.
|
|
2476
|
+
*
|
|
2477
|
+
* Upon success, `collect_value()` needs to return `NULL`. If, however,
|
|
2478
|
+
* an error condition occurred, `collect_value()` should return a newly
|
|
2479
|
+
* allocated string containing an error diagnostic.
|
|
2480
|
+
*
|
|
2481
|
+
* The calling code makes no assumptions about the `value` contents being
|
|
2482
|
+
* valid upon error returns, `value` is simply thrown away without further
|
|
2483
|
+
* freeing. As such, it is a good idea to not allocate `GValue` contents
|
|
2484
|
+
* prior to returning an error; however, `collect_values()` is not obliged
|
|
2485
|
+
* to return a correctly setup `value` for error returns, simply because
|
|
2486
|
+
* any non-`NULL` return is considered a fatal programming error, and
|
|
2487
|
+
* further program behaviour is undefined.
|
|
2488
|
+
* @callback
|
|
2489
|
+
* @param value the value to initialize
|
|
2490
|
+
* @param collect_values the collected values
|
|
2491
|
+
* @param collect_flags optional flags
|
|
2492
|
+
* @returns `NULL` on success, otherwise a newly allocated error string on failure
|
|
2493
|
+
*/
|
|
2494
|
+
interface TypeValueCollectFunc {
|
|
2495
|
+
(value: any, collect_values: TypeCValue[], collect_flags: number): string | null
|
|
2496
|
+
}
|
|
2497
|
+
/**
|
|
2498
|
+
* Copies the content of a #GValue into another.
|
|
2499
|
+
*
|
|
2500
|
+
* The `dest_value` is a #GValue with zero-filled data section and `src_value`
|
|
2501
|
+
* is a properly initialized #GValue of same type, or derived type.
|
|
2502
|
+
*
|
|
2503
|
+
* The purpose of this function is to copy the contents of `src_value`
|
|
2504
|
+
* into `dest_value` in a way, that even after `src_value` has been freed, the
|
|
2505
|
+
* contents of `dest_value` remain valid. String type example:
|
|
2506
|
+
*
|
|
2507
|
+
*
|
|
2508
|
+
* ```c
|
|
2509
|
+
* dest_value->data[0].v_pointer = g_strdup (src_value->data[0].v_pointer);
|
|
2510
|
+
* ```
|
|
2511
|
+
*
|
|
2512
|
+
* @callback
|
|
2513
|
+
* @param src_value the value to copy
|
|
2514
|
+
*/
|
|
2515
|
+
interface TypeValueCopyFunc {
|
|
2516
|
+
(src_value: any): void
|
|
2517
|
+
}
|
|
2518
|
+
/**
|
|
2519
|
+
* Frees any old contents that might be left in the `value->data` array of
|
|
2520
|
+
* the given value.
|
|
2521
|
+
*
|
|
2522
|
+
* No resources may remain allocated through the #GValue contents after this
|
|
2523
|
+
* function returns. E.g. for our above string type:
|
|
2524
|
+
*
|
|
2525
|
+
*
|
|
2526
|
+
* ```c
|
|
2527
|
+
* // only free strings without a specific flag for static storage
|
|
2528
|
+
* if (!(value->data[1].v_uint & G_VALUE_NOCOPY_CONTENTS))
|
|
2529
|
+
* g_free (value->data[0].v_pointer);
|
|
2530
|
+
* ```
|
|
2531
|
+
*
|
|
2532
|
+
* @callback
|
|
2533
|
+
* @param value the value to free
|
|
2534
|
+
*/
|
|
2535
|
+
interface TypeValueFreeFunc {
|
|
2536
|
+
(value: any): void
|
|
2537
|
+
}
|
|
2538
|
+
/**
|
|
2539
|
+
* Initializes the value contents by setting the fields of the `value->data`
|
|
2540
|
+
* array.
|
|
2541
|
+
*
|
|
2542
|
+
* The data array of the #GValue passed into this function was zero-filled
|
|
2543
|
+
* with `memset()`, so no care has to be taken to free any old contents.
|
|
2544
|
+
* For example, in the case of a string value that may never be %NULL, the
|
|
2545
|
+
* implementation might look like:
|
|
2546
|
+
*
|
|
2547
|
+
*
|
|
2548
|
+
* ```c
|
|
2549
|
+
* value->data[0].v_pointer = g_strdup ("");
|
|
2550
|
+
* ```
|
|
2551
|
+
*
|
|
2552
|
+
* @callback
|
|
2553
|
+
* @param value the value to initialize
|
|
2554
|
+
*/
|
|
2555
|
+
interface TypeValueInitFunc {
|
|
2556
|
+
(value: any): void
|
|
2557
|
+
}
|
|
2558
|
+
/**
|
|
2559
|
+
* This function is responsible for storing the `value`
|
|
2560
|
+
* contents into arguments passed through a variadic argument list which
|
|
2561
|
+
* got collected into `collect_values` according to `lcopy_format`.
|
|
2562
|
+
*
|
|
2563
|
+
* The `n_collect_values` argument equals the string length of
|
|
2564
|
+
* `lcopy_format`, and `collect_flags` may contain %G_VALUE_NOCOPY_CONTENTS.
|
|
2565
|
+
*
|
|
2566
|
+
* In contrast to #GTypeValueCollectFunc, this function is obliged to always
|
|
2567
|
+
* properly support %G_VALUE_NOCOPY_CONTENTS.
|
|
2568
|
+
*
|
|
2569
|
+
* Similar to #GTypeValueCollectFunc the function may prematurely abort by
|
|
2570
|
+
* returning a newly allocated string describing an error condition. To
|
|
2571
|
+
* complete the string example:
|
|
2572
|
+
*
|
|
2573
|
+
*
|
|
2574
|
+
* ```c
|
|
2575
|
+
* gchar **string_p = collect_values[0].v_pointer;
|
|
2576
|
+
* g_return_val_if_fail (string_p != NULL,
|
|
2577
|
+
* g_strdup ("string location passed as NULL"));
|
|
2578
|
+
*
|
|
2579
|
+
* if (collect_flags & G_VALUE_NOCOPY_CONTENTS)
|
|
2580
|
+
* *string_p = value->data[0].v_pointer;
|
|
2581
|
+
* else
|
|
2582
|
+
* *string_p = g_strdup (value->data[0].v_pointer);
|
|
2583
|
+
* ```
|
|
2584
|
+
*
|
|
2585
|
+
*
|
|
2586
|
+
* And an illustrative version of this function for reference-counted
|
|
2587
|
+
* types:
|
|
2588
|
+
*
|
|
2589
|
+
*
|
|
2590
|
+
* ```c
|
|
2591
|
+
* GObject **object_p = collect_values[0].v_pointer;
|
|
2592
|
+
* g_return_val_if_fail (object_p != NULL,
|
|
2593
|
+
* g_strdup ("object location passed as NULL"));
|
|
2594
|
+
*
|
|
2595
|
+
* if (value->data[0].v_pointer == NULL)
|
|
2596
|
+
* *object_p = NULL;
|
|
2597
|
+
* else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) // always honour
|
|
2598
|
+
* *object_p = value->data[0].v_pointer;
|
|
2599
|
+
* else
|
|
2600
|
+
* *object_p = g_object_ref (value->data[0].v_pointer);
|
|
2601
|
+
*
|
|
2602
|
+
* return NULL;
|
|
2603
|
+
* ```
|
|
2604
|
+
*
|
|
2605
|
+
* @callback
|
|
2606
|
+
* @param value the value to lcopy
|
|
2607
|
+
* @param collect_values the collected locations for storage
|
|
2608
|
+
* @param collect_flags optional flags
|
|
2609
|
+
* @returns `NULL` on success, otherwise a newly allocated error string on failure
|
|
2610
|
+
*/
|
|
2611
|
+
interface TypeValueLCopyFunc {
|
|
2612
|
+
(value: any, collect_values: TypeCValue[], collect_flags: number): string | null
|
|
2613
|
+
}
|
|
2614
|
+
/**
|
|
2615
|
+
* If the value contents fit into a pointer, such as objects or strings,
|
|
2616
|
+
* return this pointer, so the caller can peek at the current contents.
|
|
2617
|
+
*
|
|
2618
|
+
* To extend on our above string example:
|
|
2619
|
+
*
|
|
2620
|
+
*
|
|
2621
|
+
* ```c
|
|
2622
|
+
* return value->data[0].v_pointer;
|
|
2623
|
+
* ```
|
|
2624
|
+
*
|
|
2625
|
+
* @callback
|
|
2626
|
+
* @param value the value to peek
|
|
2627
|
+
* @returns a pointer to the value contents
|
|
2628
|
+
*/
|
|
2629
|
+
interface TypeValuePeekPointerFunc {
|
|
2630
|
+
(value: any): any | null
|
|
2631
|
+
}
|
|
2393
2632
|
/**
|
|
2394
2633
|
* The type of value transformation functions which can be registered with
|
|
2395
2634
|
* g_value_register_transform_func().
|
|
@@ -2801,7 +3040,7 @@ module Binding {
|
|
|
2801
3040
|
* This should be in [canonical form][canonical-parameter-names] to get the
|
|
2802
3041
|
* best performance.
|
|
2803
3042
|
*/
|
|
2804
|
-
|
|
3043
|
+
sourceProperty?: string | null
|
|
2805
3044
|
/**
|
|
2806
3045
|
* The #GObject that should be used as the target of the binding
|
|
2807
3046
|
*/
|
|
@@ -2813,7 +3052,7 @@ module Binding {
|
|
|
2813
3052
|
* This should be in [canonical form][canonical-parameter-names] to get the
|
|
2814
3053
|
* best performance.
|
|
2815
3054
|
*/
|
|
2816
|
-
|
|
3055
|
+
targetProperty?: string | null
|
|
2817
3056
|
}
|
|
2818
3057
|
|
|
2819
3058
|
}
|
|
@@ -2837,7 +3076,7 @@ interface Binding {
|
|
|
2837
3076
|
* This should be in [canonical form][canonical-parameter-names] to get the
|
|
2838
3077
|
* best performance.
|
|
2839
3078
|
*/
|
|
2840
|
-
readonly
|
|
3079
|
+
readonly sourceProperty: string | null
|
|
2841
3080
|
/**
|
|
2842
3081
|
* The #GObject that should be used as the target of the binding
|
|
2843
3082
|
*/
|
|
@@ -2849,7 +3088,7 @@ interface Binding {
|
|
|
2849
3088
|
* This should be in [canonical form][canonical-parameter-names] to get the
|
|
2850
3089
|
* best performance.
|
|
2851
3090
|
*/
|
|
2852
|
-
readonly
|
|
3091
|
+
readonly targetProperty: string | null
|
|
2853
3092
|
|
|
2854
3093
|
// Owm methods of GObject-2.0.GObject.Binding
|
|
2855
3094
|
|
|
@@ -2894,7 +3133,7 @@ interface Binding {
|
|
|
2894
3133
|
* of the binding.
|
|
2895
3134
|
* @returns the name of the source property
|
|
2896
3135
|
*/
|
|
2897
|
-
get_source_property(): string
|
|
3136
|
+
get_source_property(): string
|
|
2898
3137
|
/**
|
|
2899
3138
|
* Retrieves the #GObject instance used as the target of the binding.
|
|
2900
3139
|
*
|
|
@@ -2913,7 +3152,7 @@ interface Binding {
|
|
|
2913
3152
|
* of the binding.
|
|
2914
3153
|
* @returns the name of the target property
|
|
2915
3154
|
*/
|
|
2916
|
-
get_target_property(): string
|
|
3155
|
+
get_target_property(): string
|
|
2917
3156
|
/**
|
|
2918
3157
|
* Explicitly releases the binding between the source and the target
|
|
2919
3158
|
* property expressed by `binding`.
|
|
@@ -3093,7 +3332,7 @@ interface BindingGroup {
|
|
|
3093
3332
|
* @param target_property the property on `target` to bind
|
|
3094
3333
|
* @param flags the flags used to create the #GBinding
|
|
3095
3334
|
*/
|
|
3096
|
-
bind(source_property: string
|
|
3335
|
+
bind(source_property: string, target: Object, target_property: string, flags: BindingFlags): void
|
|
3097
3336
|
/**
|
|
3098
3337
|
* Creates a binding between `source_property` on the source object and
|
|
3099
3338
|
* `target_property` on `target,` allowing you to set the transformation
|
|
@@ -3112,7 +3351,7 @@ interface BindingGroup {
|
|
|
3112
3351
|
* @param transform_to a #GClosure wrapping the transformation function from the source object to the `target,` or %NULL to use the default
|
|
3113
3352
|
* @param transform_from a #GClosure wrapping the transformation function from the `target` to the source object, or %NULL to use the default
|
|
3114
3353
|
*/
|
|
3115
|
-
bind_full(source_property: string
|
|
3354
|
+
bind_full(source_property: string, target: Object, target_property: string, flags: BindingFlags, transform_to: TClosure | null, transform_from: TClosure | null): void
|
|
3116
3355
|
/**
|
|
3117
3356
|
* Gets the source object used for binding properties.
|
|
3118
3357
|
* @returns a #GObject or %NULL.
|
|
@@ -3284,7 +3523,7 @@ interface Object {
|
|
|
3284
3523
|
* @param flags flags to pass to #GBinding
|
|
3285
3524
|
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
|
|
3286
3525
|
*/
|
|
3287
|
-
bind_property(source_property: string
|
|
3526
|
+
bind_property(source_property: string, target: Object, target_property: string, flags: BindingFlags): Binding
|
|
3288
3527
|
/**
|
|
3289
3528
|
* Creates a binding between `source_property` on `source` and `target_property`
|
|
3290
3529
|
* on `target,` allowing you to set the transformation functions to be used by
|
|
@@ -3301,7 +3540,7 @@ interface Object {
|
|
|
3301
3540
|
* @param transform_from a #GClosure wrapping the transformation function from the `target` to the `source,` or %NULL to use the default
|
|
3302
3541
|
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
|
|
3303
3542
|
*/
|
|
3304
|
-
bind_property_full(source_property: string
|
|
3543
|
+
bind_property_full(source_property: string, target: Object, target_property: string, flags: BindingFlags, transform_to: TClosure, transform_from: TClosure): Binding
|
|
3305
3544
|
/**
|
|
3306
3545
|
* This function is intended for #GObject implementations to re-enforce
|
|
3307
3546
|
* a [floating][floating-ref] object reference. Doing this is seldom
|
|
@@ -3326,7 +3565,7 @@ interface Object {
|
|
|
3326
3565
|
* @param key name of the key for that association
|
|
3327
3566
|
* @returns the data if found, or %NULL if no such data exists.
|
|
3328
3567
|
*/
|
|
3329
|
-
get_data(key: string
|
|
3568
|
+
get_data(key: string): any | null
|
|
3330
3569
|
/**
|
|
3331
3570
|
* Gets a property of an object.
|
|
3332
3571
|
*
|
|
@@ -3347,7 +3586,7 @@ interface Object {
|
|
|
3347
3586
|
* @param property_name the name of the property to get
|
|
3348
3587
|
* @param value return location for the property value
|
|
3349
3588
|
*/
|
|
3350
|
-
get_property(property_name: string
|
|
3589
|
+
get_property(property_name: string, value: any): void
|
|
3351
3590
|
/**
|
|
3352
3591
|
* This function gets back user data pointers stored via
|
|
3353
3592
|
* g_object_set_qdata().
|
|
@@ -3382,7 +3621,7 @@ interface Object {
|
|
|
3382
3621
|
* called.
|
|
3383
3622
|
* @param property_name the name of a property installed on the class of `object`.
|
|
3384
3623
|
*/
|
|
3385
|
-
notify(property_name: string
|
|
3624
|
+
notify(property_name: string): void
|
|
3386
3625
|
/**
|
|
3387
3626
|
* Emits a "notify" signal for the property specified by `pspec` on `object`.
|
|
3388
3627
|
*
|
|
@@ -3474,20 +3713,20 @@ interface Object {
|
|
|
3474
3713
|
* @param key name of the key
|
|
3475
3714
|
* @param data data to associate with that key
|
|
3476
3715
|
*/
|
|
3477
|
-
set_data(key: string
|
|
3716
|
+
set_data(key: string, data: any | null): void
|
|
3478
3717
|
/**
|
|
3479
3718
|
* Sets a property on an object.
|
|
3480
3719
|
* @param property_name the name of the property to set
|
|
3481
3720
|
* @param value the value
|
|
3482
3721
|
*/
|
|
3483
|
-
set_property(property_name: string
|
|
3722
|
+
set_property(property_name: string, value: any): void
|
|
3484
3723
|
/**
|
|
3485
3724
|
* Remove a specified datum from the object's data associations,
|
|
3486
3725
|
* without invoking the association's destroy handler.
|
|
3487
3726
|
* @param key name of the key
|
|
3488
3727
|
* @returns the data if found, or %NULL if no such data exists.
|
|
3489
3728
|
*/
|
|
3490
|
-
steal_data(key: string
|
|
3729
|
+
steal_data(key: string): any | null
|
|
3491
3730
|
/**
|
|
3492
3731
|
* This function gets back user data pointers stored via
|
|
3493
3732
|
* g_object_set_qdata() and removes the `data` from object
|
|
@@ -3652,7 +3891,7 @@ class Object {
|
|
|
3652
3891
|
* @param property_name name of a property to look up.
|
|
3653
3892
|
* @returns the #GParamSpec for the property of the interface with the name @property_name, or %NULL if no such property exists.
|
|
3654
3893
|
*/
|
|
3655
|
-
static interface_find_property(g_iface: TypeInterface, property_name: string
|
|
3894
|
+
static interface_find_property(g_iface: TypeInterface, property_name: string): ParamSpec
|
|
3656
3895
|
/**
|
|
3657
3896
|
* Add a property to an interface; this is only useful for interfaces
|
|
3658
3897
|
* that are added to GObject-derived types. Adding a property to an
|
|
@@ -3698,7 +3937,7 @@ interface ParamSpec {
|
|
|
3698
3937
|
* name of this parameter: always an interned string
|
|
3699
3938
|
* @field
|
|
3700
3939
|
*/
|
|
3701
|
-
name: string
|
|
3940
|
+
name: string
|
|
3702
3941
|
/**
|
|
3703
3942
|
* #GParamFlags flags for this parameter
|
|
3704
3943
|
* @field
|
|
@@ -3736,7 +3975,7 @@ interface ParamSpec {
|
|
|
3736
3975
|
* This allows for pointer-value comparisons.
|
|
3737
3976
|
* @returns the name of @pspec.
|
|
3738
3977
|
*/
|
|
3739
|
-
get_name(): string
|
|
3978
|
+
get_name(): string
|
|
3740
3979
|
/**
|
|
3741
3980
|
* Gets the GQuark for the name.
|
|
3742
3981
|
* @returns the GQuark for @pspec->name.
|
|
@@ -3746,7 +3985,7 @@ interface ParamSpec {
|
|
|
3746
3985
|
* Get the nickname of a #GParamSpec.
|
|
3747
3986
|
* @returns the nickname of @pspec.
|
|
3748
3987
|
*/
|
|
3749
|
-
get_nick(): string
|
|
3988
|
+
get_nick(): string
|
|
3750
3989
|
/**
|
|
3751
3990
|
* Gets back user data pointers stored via g_param_spec_set_qdata().
|
|
3752
3991
|
* @param quark a #GQuark, naming the user data pointer
|
|
@@ -3838,7 +4077,7 @@ class ParamSpec {
|
|
|
3838
4077
|
* @param name the canonical name of the property
|
|
3839
4078
|
* @returns %TRUE if @name is a valid property name, %FALSE otherwise.
|
|
3840
4079
|
*/
|
|
3841
|
-
static is_valid_name(name: string
|
|
4080
|
+
static is_valid_name(name: string): boolean
|
|
3842
4081
|
static char(name: string, nick: string, blurb: string, flags: ParamFlags, minimum: number, maximum: number, defaultValue: number): ParamSpecChar
|
|
3843
4082
|
static uchar(name: string, nick: string, blurb: string, flags: ParamFlags, minimum: number, maximum: number, defaultValue: number): ParamSpecUChar
|
|
3844
4083
|
static int(name: string, nick: string, blurb: string, flags: ParamFlags, minimum: number, maximum: number, defaultValue: number): ParamSpecInt
|
|
@@ -4657,7 +4896,7 @@ module SignalGroup {
|
|
|
4657
4896
|
/**
|
|
4658
4897
|
* The #GType of the target property.
|
|
4659
4898
|
*/
|
|
4660
|
-
|
|
4899
|
+
targetType?: GType | null
|
|
4661
4900
|
}
|
|
4662
4901
|
|
|
4663
4902
|
}
|
|
@@ -4673,7 +4912,7 @@ interface SignalGroup {
|
|
|
4673
4912
|
/**
|
|
4674
4913
|
* The #GType of the target property.
|
|
4675
4914
|
*/
|
|
4676
|
-
readonly
|
|
4915
|
+
readonly targetType: GType
|
|
4677
4916
|
|
|
4678
4917
|
// Owm methods of GObject-2.0.GObject.SignalGroup
|
|
4679
4918
|
|
|
@@ -4693,7 +4932,7 @@ interface SignalGroup {
|
|
|
4693
4932
|
* @param closure the closure to connect.
|
|
4694
4933
|
* @param after whether the handler should be called before or after the default handler of the signal.
|
|
4695
4934
|
*/
|
|
4696
|
-
connect_closure(detailed_signal: string
|
|
4935
|
+
connect_closure(detailed_signal: string, closure: TClosure, after: boolean): void
|
|
4697
4936
|
/**
|
|
4698
4937
|
* Connects `c_handler` to the signal `detailed_signal`
|
|
4699
4938
|
* on the target instance of `self`.
|
|
@@ -4703,7 +4942,7 @@ interface SignalGroup {
|
|
|
4703
4942
|
* @param c_handler the #GCallback to connect
|
|
4704
4943
|
* @param flags the flags used to create the signal connection
|
|
4705
4944
|
*/
|
|
4706
|
-
connect_data(detailed_signal: string
|
|
4945
|
+
connect_data(detailed_signal: string, c_handler: Callback, flags: ConnectFlags): void
|
|
4707
4946
|
/**
|
|
4708
4947
|
* Connects `c_handler` to the signal `detailed_signal`
|
|
4709
4948
|
* on the target instance of `self`.
|
|
@@ -4715,7 +4954,7 @@ interface SignalGroup {
|
|
|
4715
4954
|
* @param detailed_signal a string of the form "signal-name::detail"
|
|
4716
4955
|
* @param c_handler the #GCallback to connect
|
|
4717
4956
|
*/
|
|
4718
|
-
connect_swapped(detailed_signal: string
|
|
4957
|
+
connect_swapped(detailed_signal: string, c_handler: Callback): void
|
|
4719
4958
|
/**
|
|
4720
4959
|
* Gets the target instance used when connecting signals.
|
|
4721
4960
|
* @returns The target instance
|
|
@@ -4865,7 +5104,7 @@ interface TypeModule extends TypePlugin {
|
|
|
4865
5104
|
* @param const_static_values an array of #GEnumValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0.
|
|
4866
5105
|
* @returns the new or existing type ID
|
|
4867
5106
|
*/
|
|
4868
|
-
register_enum(name: string
|
|
5107
|
+
register_enum(name: string, const_static_values: EnumValue): GType
|
|
4869
5108
|
/**
|
|
4870
5109
|
* Looks up or registers a flags type that is implemented with a particular
|
|
4871
5110
|
* type plugin. If a type with name `type_name` was previously registered,
|
|
@@ -4881,7 +5120,7 @@ interface TypeModule extends TypePlugin {
|
|
|
4881
5120
|
* @param const_static_values an array of #GFlagsValue structs for the possible flags values. The array is terminated by a struct with all members being 0.
|
|
4882
5121
|
* @returns the new or existing type ID
|
|
4883
5122
|
*/
|
|
4884
|
-
register_flags(name: string
|
|
5123
|
+
register_flags(name: string, const_static_values: FlagsValue): GType
|
|
4885
5124
|
/**
|
|
4886
5125
|
* Looks up or registers a type that is implemented with a particular
|
|
4887
5126
|
* type plugin. If a type with name `type_name` was previously registered,
|
|
@@ -4903,12 +5142,12 @@ interface TypeModule extends TypePlugin {
|
|
|
4903
5142
|
* @param flags flags field providing details about the type
|
|
4904
5143
|
* @returns the new or existing type ID
|
|
4905
5144
|
*/
|
|
4906
|
-
register_type(parent_type: GType, type_name: string
|
|
5145
|
+
register_type(parent_type: GType, type_name: string, type_info: TypeInfo, flags: TypeFlags): GType
|
|
4907
5146
|
/**
|
|
4908
5147
|
* Sets the name for a #GTypeModule
|
|
4909
5148
|
* @param name a human-readable name to use in error messages.
|
|
4910
5149
|
*/
|
|
4911
|
-
set_name(name: string
|
|
5150
|
+
set_name(name: string): void
|
|
4912
5151
|
/**
|
|
4913
5152
|
* Decreases the use count of a #GTypeModule by one. If the
|
|
4914
5153
|
* result is zero, the module will be unloaded. (However, the
|
|
@@ -5585,12 +5824,12 @@ interface EnumValue {
|
|
|
5585
5824
|
* the name of the value
|
|
5586
5825
|
* @field
|
|
5587
5826
|
*/
|
|
5588
|
-
value_name: string
|
|
5827
|
+
value_name: string
|
|
5589
5828
|
/**
|
|
5590
5829
|
* the nickname of the value
|
|
5591
5830
|
* @field
|
|
5592
5831
|
*/
|
|
5593
|
-
value_nick: string
|
|
5832
|
+
value_nick: string
|
|
5594
5833
|
}
|
|
5595
5834
|
|
|
5596
5835
|
/**
|
|
@@ -5657,12 +5896,12 @@ interface FlagsValue {
|
|
|
5657
5896
|
* the name of the value
|
|
5658
5897
|
* @field
|
|
5659
5898
|
*/
|
|
5660
|
-
value_name: string
|
|
5899
|
+
value_name: string
|
|
5661
5900
|
/**
|
|
5662
5901
|
* the nickname of the value
|
|
5663
5902
|
* @field
|
|
5664
5903
|
*/
|
|
5665
|
-
value_nick: string
|
|
5904
|
+
value_nick: string
|
|
5666
5905
|
}
|
|
5667
5906
|
|
|
5668
5907
|
/**
|
|
@@ -5763,7 +6002,7 @@ interface ObjectClass {
|
|
|
5763
6002
|
* @param property_name the name of the property to look up
|
|
5764
6003
|
* @returns the #GParamSpec for the property, or %NULL if the class doesn't have a property of that name
|
|
5765
6004
|
*/
|
|
5766
|
-
find_property(oclass: Object | Function | GType, property_name: string
|
|
6005
|
+
find_property(oclass: Object | Function | GType, property_name: string): ParamSpec
|
|
5767
6006
|
/**
|
|
5768
6007
|
* Installs new properties from an array of #GParamSpecs.
|
|
5769
6008
|
*
|
|
@@ -5875,7 +6114,7 @@ interface ObjectClass {
|
|
|
5875
6114
|
* @param property_id the new property ID
|
|
5876
6115
|
* @param name the name of a property registered in a parent class or in an interface of this class.
|
|
5877
6116
|
*/
|
|
5878
|
-
override_property(oclass: Object | Function | GType, property_id: number, name: string
|
|
6117
|
+
override_property(oclass: Object | Function | GType, property_id: number, name: string): void
|
|
5879
6118
|
}
|
|
5880
6119
|
|
|
5881
6120
|
/**
|
|
@@ -6009,7 +6248,7 @@ interface ParamSpecPool {
|
|
|
6009
6248
|
* @param walk_ancestors If %TRUE, also try to find a #GParamSpec with `param_name` owned by an ancestor of `owner_type`.
|
|
6010
6249
|
* @returns The found #GParamSpec, or %NULL if no matching #GParamSpec was found.
|
|
6011
6250
|
*/
|
|
6012
|
-
lookup(param_name: string
|
|
6251
|
+
lookup(param_name: string, owner_type: GType, walk_ancestors: boolean): ParamSpec | null
|
|
6013
6252
|
/**
|
|
6014
6253
|
* Removes a #GParamSpec from the pool.
|
|
6015
6254
|
* @param pspec the #GParamSpec to remove
|
|
@@ -6084,7 +6323,7 @@ interface Parameter {
|
|
|
6084
6323
|
* the parameter name
|
|
6085
6324
|
* @field
|
|
6086
6325
|
*/
|
|
6087
|
-
name: string
|
|
6326
|
+
name: string
|
|
6088
6327
|
/**
|
|
6089
6328
|
* the parameter value
|
|
6090
6329
|
* @field
|
|
@@ -6155,7 +6394,7 @@ interface SignalQuery {
|
|
|
6155
6394
|
* The signal name.
|
|
6156
6395
|
* @field
|
|
6157
6396
|
*/
|
|
6158
|
-
signal_name: string
|
|
6397
|
+
signal_name: string
|
|
6159
6398
|
/**
|
|
6160
6399
|
* The interface/instance type that this signal can be emitted for.
|
|
6161
6400
|
* @field
|
|
@@ -6619,7 +6858,7 @@ interface TypeQuery {
|
|
|
6619
6858
|
* the name of the type
|
|
6620
6859
|
* @field
|
|
6621
6860
|
*/
|
|
6622
|
-
type_name: string
|
|
6861
|
+
type_name: string
|
|
6623
6862
|
/**
|
|
6624
6863
|
* the size of the class structure
|
|
6625
6864
|
* @field
|
|
@@ -6649,35 +6888,62 @@ interface TypeValueTable {
|
|
|
6649
6888
|
|
|
6650
6889
|
// Own fields of GObject-2.0.GObject.TypeValueTable
|
|
6651
6890
|
|
|
6652
|
-
|
|
6653
|
-
|
|
6654
|
-
|
|
6655
|
-
|
|
6891
|
+
/**
|
|
6892
|
+
* Function to initialize a GValue
|
|
6893
|
+
* @field
|
|
6894
|
+
*/
|
|
6895
|
+
value_init: TypeValueInitFunc
|
|
6896
|
+
/**
|
|
6897
|
+
* Function to free a GValue
|
|
6898
|
+
* @field
|
|
6899
|
+
*/
|
|
6900
|
+
value_free: TypeValueFreeFunc
|
|
6901
|
+
/**
|
|
6902
|
+
* Function to copy a GValue
|
|
6903
|
+
* @field
|
|
6904
|
+
*/
|
|
6905
|
+
value_copy: TypeValueCopyFunc
|
|
6906
|
+
/**
|
|
6907
|
+
* Function to peek the contents of a GValue if they fit
|
|
6908
|
+
* into a pointer
|
|
6909
|
+
* @field
|
|
6910
|
+
*/
|
|
6911
|
+
value_peek_pointer: TypeValuePeekPointerFunc
|
|
6656
6912
|
/**
|
|
6657
6913
|
* A string format describing how to collect the contents of
|
|
6658
|
-
*
|
|
6659
|
-
*
|
|
6660
|
-
*
|
|
6661
|
-
*
|
|
6662
|
-
*
|
|
6663
|
-
*
|
|
6664
|
-
*
|
|
6665
|
-
*
|
|
6666
|
-
*
|
|
6667
|
-
*
|
|
6668
|
-
*
|
|
6669
|
-
* @field
|
|
6670
|
-
*/
|
|
6671
|
-
collect_format: string
|
|
6672
|
-
|
|
6914
|
+
* this value bit-by-bit. Each character in the format represents
|
|
6915
|
+
* an argument to be collected, and the characters themselves indicate
|
|
6916
|
+
* the type of the argument. Currently supported arguments are:
|
|
6917
|
+
* - `'i'`: Integers, passed as `collect_values[].v_int`
|
|
6918
|
+
* - `'l'`: Longs, passed as `collect_values[].v_long`
|
|
6919
|
+
* - `'d'`: Doubles, passed as `collect_values[].v_double`
|
|
6920
|
+
* - `'p'`: Pointers, passed as `collect_values[].v_pointer`
|
|
6921
|
+
* It should be noted that for variable argument list construction,
|
|
6922
|
+
* ANSI C promotes every type smaller than an integer to an int, and
|
|
6923
|
+
* floats to doubles. So for collection of short int or char, `'i'`
|
|
6924
|
+
* needs to be used, and for collection of floats `'d'`.
|
|
6925
|
+
* @field
|
|
6926
|
+
*/
|
|
6927
|
+
collect_format: string
|
|
6928
|
+
/**
|
|
6929
|
+
* Function to initialize a GValue from the values
|
|
6930
|
+
* collected from variadic arguments
|
|
6931
|
+
* @field
|
|
6932
|
+
*/
|
|
6933
|
+
collect_value: TypeValueCollectFunc
|
|
6673
6934
|
/**
|
|
6674
6935
|
* Format description of the arguments to collect for `lcopy_value,`
|
|
6675
|
-
*
|
|
6676
|
-
*
|
|
6936
|
+
* analogous to `collect_format`. Usually, `lcopy_format` string consists
|
|
6937
|
+
* only of `'p'`s to provide lcopy_value() with pointers to storage locations.
|
|
6938
|
+
* @field
|
|
6939
|
+
*/
|
|
6940
|
+
lcopy_format: string
|
|
6941
|
+
/**
|
|
6942
|
+
* Function to store the contents of a value into the
|
|
6943
|
+
* locations collected from variadic arguments
|
|
6677
6944
|
* @field
|
|
6678
6945
|
*/
|
|
6679
|
-
|
|
6680
|
-
lcopy_value: (value: any, n_collect_values: number, collect_values: TypeCValue, collect_flags: number) => string | null
|
|
6946
|
+
lcopy_value: TypeValueLCopyFunc
|
|
6681
6947
|
}
|
|
6682
6948
|
|
|
6683
6949
|
/**
|