@@ -2,6 +2,8 @@ import typing
22
33from gi .repository import GObject
44
5+ T = typing .TypeVar ("T" )
6+
57ALLOCATOR_LIST : int = 1
68ALLOCATOR_NODE : int = 3
79ALLOCATOR_SLIST : int = 2
@@ -118,7 +120,7 @@ MAXUINT64: int = 18446744073709551615
118120MAXUINT8 : int = 255
119121MAXULONG : int = 18446744073709551615
120122MAXUSHORT : int = 65535
121- MICRO_VERSION : int = 5
123+ MICRO_VERSION : int = 3
122124MINDOUBLE : float = 2.2250738585072014e-308
123125MINFLOAT : float = 1.1754943508222875e-38
124126MININT : int = - 2147483648
@@ -128,7 +130,7 @@ MININT64: int = -9223372036854775808
128130MININT8 : int = - 128
129131MINLONG : int = - 9223372036854775808
130132MINOFFSET : int = - 9223372036854775808
131- MINOR_VERSION : int = 80
133+ MINOR_VERSION : int = 84
132134MINSHORT : int = - 32768
133135MINSSIZE : int = - 9223372036854775808
134136MODULE_SUFFIX : str = "so"
@@ -179,6 +181,8 @@ SYSDEF_MSG_DONTROUTE: int = 4
179181SYSDEF_MSG_OOB : int = 1
180182SYSDEF_MSG_PEEK : int = 2
181183TEST_OPTION_ISOLATE_DIRS : str = "isolate_dirs"
184+ TEST_OPTION_NONFATAL_ASSERTIONS : str = "nonfatal-assertions"
185+ TEST_OPTION_NO_PRGNAME : str = "no_g_set_prgname"
182186TIME_SPAN_DAY : int = 86400000000
183187TIME_SPAN_HOUR : int = 3600000000
184188TIME_SPAN_MILLISECOND : int = 1000
@@ -206,6 +210,8 @@ _overrides_module = ... # FIXME Constant
206210_version : str = "2.0"
207211glib_version = ... # FIXME Constant
208212macro__has_attribute___noreturn__ : int = 0
213+ macro__has_attribute_ifunc : int = 0
214+ macro__has_attribute_no_sanitize_address : int = 0
209215option = ... # FIXME Constant
210216pyglib_version = ... # FIXME Constant
211217
@@ -280,6 +286,10 @@ def assertion_message_error(
280286 error_domain : int ,
281287 error_code : int ,
282288) -> None : ...
289+ def async_queue_new () -> AsyncQueue : ...
290+ def async_queue_new_full (
291+ item_free_func : typing .Optional [typing .Callable [[None ], None ]] = None ,
292+ ) -> AsyncQueue : ...
283293def atexit (func : typing .Callable [[], None ]) -> None : ...
284294def atomic_int_add (atomic : int , val : int ) -> int : ...
285295def atomic_int_and (atomic : int , val : int ) -> int : ...
@@ -626,8 +636,7 @@ def log_set_handler(
626636 * user_data : typing .Any ,
627637) -> int : ...
628638def log_set_writer_func (
629- func : typing .Optional [typing .Callable [..., LogWriterOutput ]] = None ,
630- * user_data : typing .Any ,
639+ func : typing .Callable [..., LogWriterOutput ], * user_data : typing .Any
631640) -> None : ...
632641def log_structured_array (
633642 log_level : LogLevelFlags , fields : typing .Sequence [LogField ]
@@ -686,7 +695,7 @@ def node_push_allocator(allocator: Allocator) -> None: ...
686695def nullify_pointer (nullify_location : None ) -> None : ...
687696def number_parser_error_quark () -> int : ...
688697def on_error_query (prg_name : str ) -> None : ...
689- def on_error_stack_trace (prg_name : str ) -> None : ...
698+ def on_error_stack_trace (prg_name : typing . Optional [ str ] = None ) -> None : ...
690699def once_init_enter () -> typing .Tuple [bool , None ]: ...
691700def once_init_enter_impl (location : int ) -> bool : ...
692701def once_init_enter_pointer (location : None ) -> bool : ...
@@ -748,6 +757,7 @@ def ref_count_dec(rc: int) -> bool: ...
748757def ref_count_inc (rc : int ) -> None : ...
749758def ref_count_init (rc : int ) -> None : ...
750759def ref_string_acquire (str : str ) -> str : ...
760+ def ref_string_equal (str1 : str , str2 : str ) -> bool : ...
751761def ref_string_length (str : str ) -> int : ...
752762def ref_string_new (str : str ) -> str : ...
753763def ref_string_new_intern (str : str ) -> str : ...
@@ -916,17 +926,21 @@ def strncasecmp(s1: str, s2: str, n: int) -> int: ...
916926def strndup (str : typing .Optional [str ], n : int ) -> typing .Optional [str ]: ...
917927def strnfill (length : int , fill_char : int ) -> str : ...
918928def strreverse (string : str ) -> str : ...
919- def strrstr (haystack : str , needle : str ) -> str : ...
920- def strrstr_len (haystack : str , haystack_len : int , needle : str ) -> str : ...
929+ def strrstr (haystack : str , needle : str ) -> typing .Optional [str ]: ...
930+ def strrstr_len (
931+ haystack : str , haystack_len : int , needle : str
932+ ) -> typing .Optional [str ]: ...
921933def strsignal (signum : int ) -> str : ...
922934def strsplit (string : str , delimiter : str , max_tokens : int ) -> list [str ]: ...
923935def strsplit_set (string : str , delimiters : str , max_tokens : int ) -> list [str ]: ...
924- def strstr_len (haystack : str , haystack_len : int , needle : str ) -> str : ...
936+ def strstr_len (
937+ haystack : str , haystack_len : int , needle : str
938+ ) -> typing .Optional [str ]: ...
925939def strtod (nptr : str ) -> typing .Tuple [float , str ]: ...
926940def strup (string : str ) -> str : ...
927941def strv_contains (strv : typing .Sequence [str ], str : str ) -> bool : ...
928942def strv_equal (strv1 : typing .Sequence [str ], strv2 : typing .Sequence [str ]) -> bool : ...
929- def strv_get_type () -> typing .Type : ...
943+ def strv_get_type () -> typing .Type [ typing . Any ] : ...
930944def strv_length (str_array : typing .Sequence [str ]) -> int : ...
931945def test_add_data_func (
932946 testpath : str , test_data : None , test_func : typing .Callable [..., None ]
@@ -1203,7 +1217,7 @@ def utf8_validate_len(str: typing.Sequence[int]) -> typing.Tuple[bool, str]: ...
12031217def utime (filename : str , utb : None ) -> int : ...
12041218def uuid_string_is_valid (str : str ) -> bool : ...
12051219def uuid_string_random () -> str : ...
1206- def variant_get_gtype () -> typing .Type : ...
1220+ def variant_get_gtype () -> typing .Type [ typing . Any ] : ...
12071221def variant_is_object_path (string : str ) -> bool : ...
12081222def variant_is_signature (string : str ) -> bool : ...
12091223def variant_parse (
@@ -1241,6 +1255,12 @@ class AsyncQueue(GObject.GPointer):
12411255 def length (self ) -> int : ...
12421256 def length_unlocked (self ) -> int : ...
12431257 def lock (self ) -> None : ...
1258+ @staticmethod
1259+ def new () -> AsyncQueue : ...
1260+ @staticmethod
1261+ def new_full (
1262+ item_free_func : typing .Optional [typing .Callable [[None ], None ]] = None ,
1263+ ) -> AsyncQueue : ...
12441264 def pop (self ) -> None : ...
12451265 def pop_unlocked (self ) -> None : ...
12461266 def push (self , data : None ) -> None : ...
@@ -1253,6 +1273,7 @@ class AsyncQueue(GObject.GPointer):
12531273 self , data : None , func : typing .Callable [..., int ], * user_data : typing .Any
12541274 ) -> None : ...
12551275 def push_unlocked (self , data : None ) -> None : ...
1276+ def ref (self ) -> AsyncQueue : ...
12561277 def ref_unlocked (self ) -> None : ...
12571278 def remove (self , item : None ) -> bool : ...
12581279 def remove_unlocked (self , item : None ) -> bool : ...
@@ -2270,6 +2291,7 @@ class MainContext(GObject.GBoxed):
22702291 def pop_thread_default (self ) -> None : ...
22712292 def prepare (self ) -> typing .Tuple [bool , int ]: ...
22722293 def push_thread_default (self ) -> None : ...
2294+ def pusher_new (self ) -> None : ...
22732295 def query (self , max_priority : int ) -> typing .Tuple [int , int , list [PollFD ]]: ...
22742296 def ref (self ) -> MainContext : ...
22752297 @staticmethod
@@ -2312,7 +2334,7 @@ class MappedFile(GObject.GBoxed):
23122334
23132335 def free (self ) -> None : ...
23142336 def get_bytes (self ) -> Bytes : ...
2315- def get_contents (self ) -> str : ...
2337+ def get_contents (self ) -> typing . Optional [ str ] : ...
23162338 def get_length (self ) -> int : ...
23172339 @classmethod
23182340 def new (cls , filename : str , writable : bool ) -> MappedFile : ...
@@ -2483,9 +2505,9 @@ class Once(GObject.GPointer):
24832505
24842506class OptionContext :
24852507 def add_group (self , * args , ** kwargs ): ... # FIXME Function
2486- def get_help_enabled (self , * args , ** kwargs ): ... # FIXME Function
2487- def get_ignore_unknown_options (self , * args , ** kwargs ): ... # FIXME Function
2488- def get_main_group (self , * args , ** kwargs ): ... # FIXME Function
2508+ def get_help_enabled (self , / ): ... # FIXME Function
2509+ def get_ignore_unknown_options (self , / ): ... # FIXME Function
2510+ def get_main_group (self , / ): ... # FIXME Function
24892511 def parse (self , * args , ** kwargs ): ... # FIXME Function
24902512 def set_help_enabled (self , * args , ** kwargs ): ... # FIXME Function
24912513 def set_ignore_unknown_options (self , * args , ** kwargs ): ... # FIXME Function
@@ -2567,8 +2589,8 @@ class Pid:
25672589 def as_integer_ratio (self , / ): ... # FIXME Function
25682590 def bit_count (self , / ): ... # FIXME Function
25692591 def bit_length (self , / ): ... # FIXME Function
2570- def close (self , * args , ** kwargs ): ... # FIXME Function
2571- def conjugate (self , * args , ** kwargs ): ... # FIXME Function
2592+ def close (self , / ): ... # FIXME Function
2593+ def conjugate (self , / ): ... # FIXME Function
25722594 def from_bytes (bytes , byteorder = "big" , * , signed = False ): ... # FIXME Function
25732595 def is_integer (self , / ): ... # FIXME Function
25742596 def to_bytes (
@@ -3109,7 +3131,7 @@ class SourceFuncs(GObject.GPointer):
31093131 SourceFuncs()
31103132 """
31113133
3112- prepare : typing .Callable [[Source , int ], bool ] = ...
3134+ prepare : typing .Callable [[Source ], typing . Tuple [ bool , int ] ] = ...
31133135 check : typing .Callable [[Source ], bool ] = ...
31143136 dispatch : None = ...
31153137 finalize : typing .Callable [[Source ], None ] = ...
@@ -3199,6 +3221,7 @@ class StrvBuilder(GObject.GBoxed):
31993221 def ref (self ) -> StrvBuilder : ...
32003222 def take (self , value : str ) -> None : ...
32013223 def unref (self ) -> None : ...
3224+ def unref_to_strv (self ) -> list [str ]: ...
32023225
32033226class TestCase (GObject .GPointer ):
32043227 def free (self ) -> None : ...
@@ -3273,6 +3296,7 @@ class Thread(GObject.GBoxed):
32733296 def error_quark () -> int : ...
32743297 @staticmethod
32753298 def exit (retval : None ) -> None : ...
3299+ def get_name (self ) -> str : ...
32763300 def join (self ) -> None : ...
32773301 @classmethod
32783302 def new (
@@ -3953,7 +3977,7 @@ class VariantType(GObject.GBoxed):
39533977 def dup_string (self ) -> str : ...
39543978 def element (self ) -> VariantType : ...
39553979 def equal (self , type2 : VariantType ) -> bool : ...
3956- def first (self ) -> VariantType : ...
3980+ def first (self ) -> typing . Optional [ VariantType ] : ...
39573981 def free (self ) -> None : ...
39583982 def get_string_length (self ) -> int : ...
39593983 def hash (self ) -> int : ...
@@ -3978,7 +4002,7 @@ class VariantType(GObject.GBoxed):
39784002 def new_maybe (cls , element : VariantType ) -> VariantType : ...
39794003 @classmethod
39804004 def new_tuple (cls , items : typing .Sequence [VariantType ]) -> VariantType : ...
3981- def next (self ) -> VariantType : ...
4005+ def next (self ) -> typing . Optional [ VariantType ] : ...
39824006 @staticmethod
39834007 def string_get_depth_ (type_string : str ) -> int : ...
39844008 @staticmethod
@@ -4084,6 +4108,7 @@ class MarkupParseFlags(GObject.GFlags):
40844108 TREAT_CDATA_AS_TEXT = 2
40854109
40864110class OptionFlags (GObject .GFlags ):
4111+ DEPRECATED = 128
40874112 FILENAME = 16
40884113 HIDDEN = 1
40894114 IN_MAIN = 2
@@ -4619,6 +4644,7 @@ class UnicodeScript(GObject.GEnum):
46194644 ELBASAN = 106
46204645 ELYMAIC = 149
46214646 ETHIOPIC = 11
4647+ GARAY = 166
46224648 GEORGIAN = 12
46234649 GLAGOLITIC = 56
46244650 GOTHIC = 13
@@ -4627,6 +4653,7 @@ class UnicodeScript(GObject.GEnum):
46274653 GUJARATI = 15
46284654 GUNJALA_GONDI = 143
46294655 GURMUKHI = 16
4656+ GURUNG_KHEMA = 169
46304657 HAN = 17
46314658 HANGUL = 18
46324659 HANIFI_ROHINGYA = 144
@@ -4650,6 +4677,7 @@ class UnicodeScript(GObject.GEnum):
46504677 KHMER = 23
46514678 KHOJKI = 108
46524679 KHUDAWADI = 109
4680+ KIRAT_RAI = 170
46534681 LAO = 24
46544682 LATIN = 25
46554683 LEPCHA = 68
@@ -4697,6 +4725,7 @@ class UnicodeScript(GObject.GEnum):
46974725 OLD_TURKIC = 89
46984726 OLD_UYGHUR = 158
46994727 OL_CHIKI = 73
4728+ OL_ONAL = 171
47004729 ORIYA = 31
47014730 OSAGE = 136
47024731 OSMANYA = 49
@@ -4719,6 +4748,7 @@ class UnicodeScript(GObject.GEnum):
47194748 SORA_SOMPENG = 101
47204749 SOYOMBO = 140
47214750 SUNDANESE = 70
4751+ SUNUWAR = 168
47224752 SYLOTI_NAGRI = 58
47234753 SYRIAC = 34
47244754 TAGALOG = 42
@@ -4736,7 +4766,9 @@ class UnicodeScript(GObject.GEnum):
47364766 TIBETAN = 39
47374767 TIFINAGH = 57
47384768 TIRHUTA = 124
4769+ TODHRI = 165
47394770 TOTO = 160
4771+ TULU_TIGALARI = 167
47404772 UGARITIC = 53
47414773 UNKNOWN = 61
47424774 VAI = 74
0 commit comments