From 903a00b56fa1995fd797344395730a63a0977142 Mon Sep 17 00:00:00 2001 From: wurstsalat Date: Thu, 31 Oct 2024 18:03:24 +0100 Subject: [PATCH] typing: GIRepository: Update to 1.80.1 --- src/gi-stubs/repository/GIRepository.pyi | 718 +++++++++++++---------- 1 file changed, 406 insertions(+), 312 deletions(-) diff --git a/src/gi-stubs/repository/GIRepository.pyi b/src/gi-stubs/repository/GIRepository.pyi index e65dde5b..3ae7bc61 100644 --- a/src/gi-stubs/repository/GIRepository.pyi +++ b/src/gi-stubs/repository/GIRepository.pyi @@ -1,347 +1,441 @@ from typing import Any +from typing import Callable from typing import Literal from typing import Optional -from typing import Union +from typing import Sequence +from typing import Tuple +from typing import Type +from typing import TypeVar +from gi.repository import GLib from gi.repository import GObject -MAJOR_VERSION: int = ... -MICRO_VERSION: int = ... -MINOR_VERSION: int = ... -TYPE_TAG_N_TYPES: int = ... -_namespace: str = ... -_version: str = ... - -def arg_info_get_closure(*args, **kwargs): ... -def arg_info_get_destroy(*args, **kwargs): ... -def arg_info_get_direction(*args, **kwargs): ... -def arg_info_get_ownership_transfer(*args, **kwargs): ... -def arg_info_get_scope(*args, **kwargs): ... -def arg_info_get_type(*args, **kwargs): ... -def arg_info_is_caller_allocates(*args, **kwargs): ... -def arg_info_is_optional(*args, **kwargs): ... -def arg_info_is_return_value(*args, **kwargs): ... -def arg_info_is_skip(*args, **kwargs): ... -def arg_info_load_type(*args, **kwargs): ... -def arg_info_may_be_null(*args, **kwargs): ... -def callable_info_can_throw_gerror(*args, **kwargs): ... -def callable_info_get_arg(*args, **kwargs): ... -def callable_info_get_caller_owns(*args, **kwargs): ... -def callable_info_get_instance_ownership_transfer(*args, **kwargs): ... -def callable_info_get_n_args(*args, **kwargs): ... -def callable_info_get_return_attribute(*args, **kwargs): ... -def callable_info_get_return_type(*args, **kwargs): ... -def callable_info_invoke(*args, **kwargs): ... -def callable_info_is_method(*args, **kwargs): ... -def callable_info_iterate_return_attributes(*args, **kwargs): ... -def callable_info_load_arg(*args, **kwargs): ... -def callable_info_load_return_type(*args, **kwargs): ... -def callable_info_may_return_null(*args, **kwargs): ... -def callable_info_skip_return(*args, **kwargs): ... -def cclosure_marshal_generic(*args, **kwargs): ... -def constant_info_get_type(*args, **kwargs): ... -def enum_info_get_error_domain(*args, **kwargs): ... -def enum_info_get_method(*args, **kwargs): ... -def enum_info_get_n_methods(*args, **kwargs): ... -def enum_info_get_n_values(*args, **kwargs): ... -def enum_info_get_storage_type(*args, **kwargs): ... -def enum_info_get_value(*args, **kwargs): ... -def field_info_get_flags(*args, **kwargs): ... -def field_info_get_offset(*args, **kwargs): ... -def field_info_get_size(*args, **kwargs): ... -def field_info_get_type(*args, **kwargs): ... -def function_info_get_flags(*args, **kwargs): ... -def function_info_get_property(*args, **kwargs): ... -def function_info_get_symbol(*args, **kwargs): ... -def function_info_get_vfunc(*args, **kwargs): ... -def get_major_version(*args, **kwargs): ... -def get_micro_version(*args, **kwargs): ... -def get_minor_version(*args, **kwargs): ... -def info_new(*args, **kwargs): ... -def info_type_to_string(*args, **kwargs): ... -def interface_info_find_method(*args, **kwargs): ... -def interface_info_find_signal(*args, **kwargs): ... -def interface_info_find_vfunc(*args, **kwargs): ... -def interface_info_get_constant(*args, **kwargs): ... -def interface_info_get_iface_struct(*args, **kwargs): ... -def interface_info_get_method(*args, **kwargs): ... -def interface_info_get_n_constants(*args, **kwargs): ... -def interface_info_get_n_methods(*args, **kwargs): ... -def interface_info_get_n_prerequisites(*args, **kwargs): ... -def interface_info_get_n_properties(*args, **kwargs): ... -def interface_info_get_n_signals(*args, **kwargs): ... -def interface_info_get_n_vfuncs(*args, **kwargs): ... -def interface_info_get_prerequisite(*args, **kwargs): ... -def interface_info_get_property(*args, **kwargs): ... -def interface_info_get_signal(*args, **kwargs): ... -def interface_info_get_vfunc(*args, **kwargs): ... -def invoke_error_quark(*args, **kwargs): ... -def object_info_find_method(*args, **kwargs): ... -def object_info_find_method_using_interfaces(*args, **kwargs): ... -def object_info_find_signal(*args, **kwargs): ... -def object_info_find_vfunc(*args, **kwargs): ... -def object_info_find_vfunc_using_interfaces(*args, **kwargs): ... -def object_info_get_abstract(*args, **kwargs): ... -def object_info_get_class_struct(*args, **kwargs): ... -def object_info_get_constant(*args, **kwargs): ... -def object_info_get_field(*args, **kwargs): ... -def object_info_get_fundamental(*args, **kwargs): ... -def object_info_get_get_value_function(*args, **kwargs): ... -def object_info_get_interface(*args, **kwargs): ... -def object_info_get_method(*args, **kwargs): ... -def object_info_get_n_constants(*args, **kwargs): ... -def object_info_get_n_fields(*args, **kwargs): ... -def object_info_get_n_interfaces(*args, **kwargs): ... -def object_info_get_n_methods(*args, **kwargs): ... -def object_info_get_n_properties(*args, **kwargs): ... -def object_info_get_n_signals(*args, **kwargs): ... -def object_info_get_n_vfuncs(*args, **kwargs): ... -def object_info_get_parent(*args, **kwargs): ... -def object_info_get_property(*args, **kwargs): ... -def object_info_get_ref_function(*args, **kwargs): ... -def object_info_get_set_value_function(*args, **kwargs): ... -def object_info_get_signal(*args, **kwargs): ... -def object_info_get_type_init(*args, **kwargs): ... -def object_info_get_type_name(*args, **kwargs): ... -def object_info_get_unref_function(*args, **kwargs): ... -def object_info_get_vfunc(*args, **kwargs): ... -def property_info_get_flags(*args, **kwargs): ... -def property_info_get_ownership_transfer(*args, **kwargs): ... -def property_info_get_type(*args, **kwargs): ... -def registered_type_info_get_g_type(*args, **kwargs): ... -def registered_type_info_get_type_init(*args, **kwargs): ... -def registered_type_info_get_type_name(*args, **kwargs): ... -def signal_info_get_class_closure(*args, **kwargs): ... -def signal_info_get_flags(*args, **kwargs): ... -def signal_info_true_stops_emit(*args, **kwargs): ... -def struct_info_find_field(*args, **kwargs): ... -def struct_info_find_method(*args, **kwargs): ... -def struct_info_get_alignment(*args, **kwargs): ... -def struct_info_get_field(*args, **kwargs): ... -def struct_info_get_method(*args, **kwargs): ... -def struct_info_get_n_fields(*args, **kwargs): ... -def struct_info_get_n_methods(*args, **kwargs): ... -def struct_info_get_size(*args, **kwargs): ... -def struct_info_is_foreign(*args, **kwargs): ... -def struct_info_is_gtype_struct(*args, **kwargs): ... -def type_info_argument_from_hash_pointer(*args, **kwargs): ... -def type_info_get_array_fixed_size(*args, **kwargs): ... -def type_info_get_array_length(*args, **kwargs): ... -def type_info_get_array_type(*args, **kwargs): ... -def type_info_get_interface(*args, **kwargs): ... -def type_info_get_param_type(*args, **kwargs): ... -def type_info_get_storage_type(*args, **kwargs): ... -def type_info_get_tag(*args, **kwargs): ... -def type_info_hash_pointer_from_argument(*args, **kwargs): ... -def type_info_is_pointer(*args, **kwargs): ... -def type_info_is_zero_terminated(*args, **kwargs): ... -def type_tag_to_string(*args, **kwargs): ... -def union_info_find_method(*args, **kwargs): ... -def union_info_get_alignment(*args, **kwargs): ... -def union_info_get_discriminator(*args, **kwargs): ... -def union_info_get_discriminator_offset(*args, **kwargs): ... -def union_info_get_discriminator_type(*args, **kwargs): ... -def union_info_get_field(*args, **kwargs): ... -def union_info_get_method(*args, **kwargs): ... -def union_info_get_n_fields(*args, **kwargs): ... -def union_info_get_n_methods(*args, **kwargs): ... -def union_info_get_size(*args, **kwargs): ... -def union_info_is_discriminated(*args, **kwargs): ... -def value_info_get_value(*args, **kwargs): ... -def vfunc_info_get_address(*args, **kwargs): ... -def vfunc_info_get_flags(*args, **kwargs): ... -def vfunc_info_get_invoker(*args, **kwargs): ... -def vfunc_info_get_offset(*args, **kwargs): ... -def vfunc_info_get_signal(*args, **kwargs): ... - -class Argument: - v_boolean = ... - v_double = ... - v_float = ... - v_int = ... - v_int16 = ... - v_int32 = ... - v_int64 = ... - v_int8 = ... - v_long = ... - v_pointer = ... - v_short = ... - v_size = ... - v_ssize = ... - v_string = ... - v_uint = ... - v_uint16 = ... - v_uint32 = ... - v_uint64 = ... - v_uint8 = ... - v_ulong = ... - v_ushort = ... - -class AttributeIter: - data = ... - data2 = ... - data3 = ... - data4 = ... - -class BaseInfo: - dummy1 = ... - dummy2 = ... - dummy3 = ... - dummy4 = ... - dummy5 = ... - dummy6 = ... - dummy7 = ... - padding = ... - - def equal(*args, **kwargs): ... - def get_attribute(*args, **kwargs): ... - def get_container(*args, **kwargs): ... - def get_name(*args, **kwargs): ... - def get_namespace(*args, **kwargs): ... - def get_type(*args, **kwargs): ... - def get_typelib(*args, **kwargs): ... - def is_deprecated(*args, **kwargs): ... - def iterate_attributes(*args, **kwargs): ... - -class Repository: - parent = ... - priv = ... - - def dump(*args, **kwargs): ... - def enumerate_versions(*args, **kwargs): ... - def error_quark(*args, **kwargs): ... - def find_by_error_domain(*args, **kwargs): ... - def find_by_gtype(*args, **kwargs): ... - def find_by_name(*args, **kwargs): ... - def get_c_prefix(*args, **kwargs): ... - def get_default(*args, **kwargs): ... - def get_dependencies(*args, **kwargs): ... - def get_immediate_dependencies(*args, **kwargs): ... - def get_info(*args, **kwargs): ... - def get_loaded_namespaces(*args, **kwargs): ... - def get_n_infos(*args, **kwargs): ... - def get_object_gtype_interfaces(*args, **kwargs): ... - def get_option_group(*args, **kwargs): ... - @classmethod - def get_search_path(cls) -> list[str]: ... - def get_shared_library(self, namespace: str) -> Optional[str]: ... - def get_typelib_path(*args, **kwargs): ... - def get_version(*args, **kwargs): ... - def is_registered(*args, **kwargs): ... - def load_typelib(*args, **kwargs): ... - def prepend_library_path(*args, **kwargs): ... - def prepend_search_path(*args, **kwargs): ... +MAJOR_VERSION: int = 1 +MICRO_VERSION: int = 1 +MINOR_VERSION: int = 80 +TYPE_TAG_N_TYPES: int = 22 +_lock = ... # FIXME Constant +_namespace: str = "GIRepository" +_version: str = "2.0" + +def arg_info_get_closure(info: BaseInfo) -> int: ... +def arg_info_get_destroy(info: BaseInfo) -> int: ... +def arg_info_get_direction(info: BaseInfo) -> Direction: ... +def arg_info_get_ownership_transfer(info: BaseInfo) -> Transfer: ... +def arg_info_get_scope(info: BaseInfo) -> ScopeType: ... +def arg_info_get_type(info: BaseInfo) -> BaseInfo: ... +def arg_info_is_caller_allocates(info: BaseInfo) -> bool: ... +def arg_info_is_optional(info: BaseInfo) -> bool: ... +def arg_info_is_return_value(info: BaseInfo) -> bool: ... +def arg_info_is_skip(info: BaseInfo) -> bool: ... +def arg_info_load_type(info: BaseInfo) -> BaseInfo: ... +def arg_info_may_be_null(info: BaseInfo) -> bool: ... +def callable_info_can_throw_gerror(info: BaseInfo) -> bool: ... +def callable_info_get_arg(info: BaseInfo, n: int) -> BaseInfo: ... +def callable_info_get_caller_owns(info: BaseInfo) -> Transfer: ... +def callable_info_get_instance_ownership_transfer(info: BaseInfo) -> Transfer: ... +def callable_info_get_n_args(info: BaseInfo) -> int: ... +def callable_info_get_return_attribute(info: BaseInfo, name: str) -> str: ... +def callable_info_get_return_type(info: BaseInfo) -> BaseInfo: ... +def callable_info_invoke( + info: BaseInfo, + function: None, + in_args: Sequence[Argument], + out_args: Sequence[Argument], + return_value: Argument, + is_method: bool, + throws: bool, +) -> bool: ... +def callable_info_is_method(info: BaseInfo) -> bool: ... +def callable_info_iterate_return_attributes( + info: BaseInfo, +) -> Tuple[bool, AttributeIter, str, str]: ... +def callable_info_load_arg(info: BaseInfo, n: int) -> BaseInfo: ... +def callable_info_load_return_type(info: BaseInfo) -> BaseInfo: ... +def callable_info_may_return_null(info: BaseInfo) -> bool: ... +def callable_info_skip_return(info: BaseInfo) -> bool: ... +def cclosure_marshal_generic( + closure: Callable[..., Any], + return_gvalue: Any, + n_param_values: int, + param_values: Any, + invocation_hint: None, + marshal_data: None, +) -> None: ... +def constant_info_get_type(info: BaseInfo) -> BaseInfo: ... +def enum_info_get_error_domain(info: BaseInfo) -> str: ... +def enum_info_get_method(info: BaseInfo, n: int) -> BaseInfo: ... +def enum_info_get_n_methods(info: BaseInfo) -> int: ... +def enum_info_get_n_values(info: BaseInfo) -> int: ... +def enum_info_get_storage_type(info: BaseInfo) -> TypeTag: ... +def enum_info_get_value(info: BaseInfo, n: int) -> BaseInfo: ... +def field_info_get_flags(info: BaseInfo) -> FieldInfoFlags: ... +def field_info_get_offset(info: BaseInfo) -> int: ... +def field_info_get_size(info: BaseInfo) -> int: ... +def field_info_get_type(info: BaseInfo) -> BaseInfo: ... +def function_info_get_flags(info: BaseInfo) -> FunctionInfoFlags: ... +def function_info_get_property(info: BaseInfo) -> BaseInfo: ... +def function_info_get_symbol(info: BaseInfo) -> str: ... +def function_info_get_vfunc(info: BaseInfo) -> BaseInfo: ... +def get_major_version() -> int: ... +def get_micro_version() -> int: ... +def get_minor_version() -> int: ... +def info_new( + type: InfoType, container: BaseInfo, typelib: Typelib, offset: int +) -> BaseInfo: ... +def info_type_to_string(type: InfoType) -> str: ... +def interface_info_find_method(info: BaseInfo, name: str) -> BaseInfo: ... +def interface_info_find_signal(info: BaseInfo, name: str) -> BaseInfo: ... +def interface_info_find_vfunc(info: BaseInfo, name: str) -> BaseInfo: ... +def interface_info_get_constant(info: BaseInfo, n: int) -> BaseInfo: ... +def interface_info_get_iface_struct(info: BaseInfo) -> BaseInfo: ... +def interface_info_get_method(info: BaseInfo, n: int) -> BaseInfo: ... +def interface_info_get_n_constants(info: BaseInfo) -> int: ... +def interface_info_get_n_methods(info: BaseInfo) -> int: ... +def interface_info_get_n_prerequisites(info: BaseInfo) -> int: ... +def interface_info_get_n_properties(info: BaseInfo) -> int: ... +def interface_info_get_n_signals(info: BaseInfo) -> int: ... +def interface_info_get_n_vfuncs(info: BaseInfo) -> int: ... +def interface_info_get_prerequisite(info: BaseInfo, n: int) -> BaseInfo: ... +def interface_info_get_property(info: BaseInfo, n: int) -> BaseInfo: ... +def interface_info_get_signal(info: BaseInfo, n: int) -> BaseInfo: ... +def interface_info_get_vfunc(info: BaseInfo, n: int) -> BaseInfo: ... +def invoke_error_quark() -> int: ... +def object_info_find_method(info: BaseInfo, name: str) -> Optional[BaseInfo]: ... +def object_info_find_method_using_interfaces( + info: BaseInfo, name: str +) -> Tuple[Optional[BaseInfo], BaseInfo]: ... +def object_info_find_signal(info: BaseInfo, name: str) -> Optional[BaseInfo]: ... +def object_info_find_vfunc(info: BaseInfo, name: str) -> Optional[BaseInfo]: ... +def object_info_find_vfunc_using_interfaces( + info: BaseInfo, name: str +) -> Tuple[Optional[BaseInfo], BaseInfo]: ... +def object_info_get_abstract(info: BaseInfo) -> bool: ... +def object_info_get_class_struct(info: BaseInfo) -> Optional[BaseInfo]: ... +def object_info_get_constant(info: BaseInfo, n: int) -> BaseInfo: ... +def object_info_get_field(info: BaseInfo, n: int) -> BaseInfo: ... +def object_info_get_final(info: BaseInfo) -> bool: ... +def object_info_get_fundamental(info: BaseInfo) -> bool: ... +def object_info_get_get_value_function(info: BaseInfo) -> Optional[str]: ... +def object_info_get_interface(info: BaseInfo, n: int) -> BaseInfo: ... +def object_info_get_method(info: BaseInfo, n: int) -> BaseInfo: ... +def object_info_get_n_constants(info: BaseInfo) -> int: ... +def object_info_get_n_fields(info: BaseInfo) -> int: ... +def object_info_get_n_interfaces(info: BaseInfo) -> int: ... +def object_info_get_n_methods(info: BaseInfo) -> int: ... +def object_info_get_n_properties(info: BaseInfo) -> int: ... +def object_info_get_n_signals(info: BaseInfo) -> int: ... +def object_info_get_n_vfuncs(info: BaseInfo) -> int: ... +def object_info_get_parent(info: BaseInfo) -> Optional[BaseInfo]: ... +def object_info_get_property(info: BaseInfo, n: int) -> BaseInfo: ... +def object_info_get_ref_function(info: BaseInfo) -> Optional[str]: ... +def object_info_get_set_value_function(info: BaseInfo) -> Optional[str]: ... +def object_info_get_signal(info: BaseInfo, n: int) -> BaseInfo: ... +def object_info_get_type_init(info: BaseInfo) -> str: ... +def object_info_get_type_name(info: BaseInfo) -> str: ... +def object_info_get_unref_function(info: BaseInfo) -> Optional[str]: ... +def object_info_get_vfunc(info: BaseInfo, n: int) -> BaseInfo: ... +def property_info_get_flags(info: BaseInfo) -> GObject.ParamFlags: ... +def property_info_get_getter(info: BaseInfo) -> Optional[BaseInfo]: ... +def property_info_get_ownership_transfer(info: BaseInfo) -> Transfer: ... +def property_info_get_setter(info: BaseInfo) -> Optional[BaseInfo]: ... +def property_info_get_type(info: BaseInfo) -> BaseInfo: ... +def registered_type_info_get_g_type(info: BaseInfo) -> Type: ... +def registered_type_info_get_type_init(info: BaseInfo) -> str: ... +def registered_type_info_get_type_name(info: BaseInfo) -> str: ... +def signal_info_get_class_closure(info: BaseInfo) -> BaseInfo: ... +def signal_info_get_flags(info: BaseInfo) -> GObject.SignalFlags: ... +def signal_info_true_stops_emit(info: BaseInfo) -> bool: ... +def struct_info_find_field(info: BaseInfo, name: str) -> BaseInfo: ... +def struct_info_find_method(info: BaseInfo, name: str) -> BaseInfo: ... +def struct_info_get_alignment(info: BaseInfo) -> int: ... +def struct_info_get_copy_function(info: BaseInfo) -> Optional[str]: ... +def struct_info_get_field(info: BaseInfo, n: int) -> BaseInfo: ... +def struct_info_get_free_function(info: BaseInfo) -> Optional[str]: ... +def struct_info_get_method(info: BaseInfo, n: int) -> BaseInfo: ... +def struct_info_get_n_fields(info: BaseInfo) -> int: ... +def struct_info_get_n_methods(info: BaseInfo) -> int: ... +def struct_info_get_size(info: BaseInfo) -> int: ... +def struct_info_is_foreign(info: BaseInfo) -> bool: ... +def struct_info_is_gtype_struct(info: BaseInfo) -> bool: ... +def type_info_argument_from_hash_pointer( + info: BaseInfo, hash_pointer: None, arg: Argument +) -> None: ... +def type_info_get_array_fixed_size(info: BaseInfo) -> int: ... +def type_info_get_array_length(info: BaseInfo) -> int: ... +def type_info_get_array_type(info: BaseInfo) -> ArrayType: ... +def type_info_get_interface(info: BaseInfo) -> BaseInfo: ... +def type_info_get_param_type(info: BaseInfo, n: int) -> BaseInfo: ... +def type_info_get_storage_type(info: BaseInfo) -> TypeTag: ... +def type_info_get_tag(info: BaseInfo) -> TypeTag: ... +def type_info_hash_pointer_from_argument(info: BaseInfo, arg: Argument) -> None: ... +def type_info_is_pointer(info: BaseInfo) -> bool: ... +def type_info_is_zero_terminated(info: BaseInfo) -> bool: ... +def type_tag_argument_from_hash_pointer( + storage_type: TypeTag, hash_pointer: None, arg: Argument +) -> None: ... +def type_tag_hash_pointer_from_argument( + storage_type: TypeTag, arg: Argument +) -> None: ... +def type_tag_to_string(type: TypeTag) -> str: ... +def union_info_find_method(info: BaseInfo, name: str) -> BaseInfo: ... +def union_info_get_alignment(info: BaseInfo) -> int: ... +def union_info_get_copy_function(info: BaseInfo) -> Optional[str]: ... +def union_info_get_discriminator(info: BaseInfo, n: int) -> BaseInfo: ... +def union_info_get_discriminator_offset(info: BaseInfo) -> int: ... +def union_info_get_discriminator_type(info: BaseInfo) -> BaseInfo: ... +def union_info_get_field(info: BaseInfo, n: int) -> BaseInfo: ... +def union_info_get_free_function(info: BaseInfo) -> Optional[str]: ... +def union_info_get_method(info: BaseInfo, n: int) -> BaseInfo: ... +def union_info_get_n_fields(info: BaseInfo) -> int: ... +def union_info_get_n_methods(info: BaseInfo) -> int: ... +def union_info_get_size(info: BaseInfo) -> int: ... +def union_info_is_discriminated(info: BaseInfo) -> bool: ... +def value_info_get_value(info: BaseInfo) -> int: ... +def vfunc_info_get_address(info: BaseInfo, implementor_gtype: Type) -> None: ... +def vfunc_info_get_flags(info: BaseInfo) -> VFuncInfoFlags: ... +def vfunc_info_get_invoker(info: BaseInfo) -> BaseInfo: ... +def vfunc_info_get_offset(info: BaseInfo) -> int: ... +def vfunc_info_get_signal(info: BaseInfo) -> BaseInfo: ... + +class Argument(GObject.GPointer): + v_boolean = ... # FIXME Constant + v_double = ... # FIXME Constant + v_float = ... # FIXME Constant + v_int = ... # FIXME Constant + v_int16 = ... # FIXME Constant + v_int32 = ... # FIXME Constant + v_int64 = ... # FIXME Constant + v_int8 = ... # FIXME Constant + v_long = ... # FIXME Constant + v_pointer = ... # FIXME Constant + v_short = ... # FIXME Constant + v_size = ... # FIXME Constant + v_ssize = ... # FIXME Constant + v_string = ... # FIXME Constant + v_uint = ... # FIXME Constant + v_uint16 = ... # FIXME Constant + v_uint32 = ... # FIXME Constant + v_uint64 = ... # FIXME Constant + v_uint8 = ... # FIXME Constant + v_ulong = ... # FIXME Constant + v_ushort = ... # FIXME Constant + +class AttributeIter(GObject.GPointer): + """ + :Constructors: + + :: + + AttributeIter() + """ + + data: None = ... + data2: None = ... + data3: None = ... + data4: None = ... + +class BaseInfo(GObject.GBoxed): + """ + :Constructors: + + :: + + BaseInfo() + """ + + dummy1: int = ... + dummy2: int = ... + dummy3: None = ... + dummy4: None = ... + dummy5: None = ... + dummy6: int = ... + dummy7: int = ... + padding: list[None] = ... + def equal(self, info2: BaseInfo) -> bool: ... + def get_attribute(self, name: str) -> str: ... + def get_container(self) -> BaseInfo: ... + def get_name(self) -> str: ... + def get_namespace(self) -> str: ... + def get_type(self) -> InfoType: ... + def get_typelib(self) -> Typelib: ... + def is_deprecated(self) -> bool: ... + def iterate_attributes(self) -> Tuple[bool, AttributeIter, str, str]: ... + +class Repository(GObject.Object): + """ + :Constructors: + + :: + + Repository(**properties) + + Object GIRepository + + Signals from GObject: + notify (GParam) + """ + + parent: GObject.Object = ... + priv: RepositoryPrivate = ... + @staticmethod + def dump(arg: str) -> bool: ... + def enumerate_versions(self, namespace_: str) -> list[str]: ... + @staticmethod + def error_quark() -> int: ... + def find_by_error_domain(self, domain: int) -> BaseInfo: ... + def find_by_gtype(self, gtype: Type) -> BaseInfo: ... + def find_by_name(self, namespace_: str, name: str) -> BaseInfo: ... + def get_c_prefix(self, namespace_: str) -> str: ... + @staticmethod + def get_default() -> Repository: ... + def get_dependencies(self, namespace_: str) -> list[str]: ... + def get_immediate_dependencies(self, namespace_: str) -> list[str]: ... + def get_info(self, namespace_: str, index: int) -> BaseInfo: ... + def get_loaded_namespaces(self) -> list[str]: ... + def get_n_infos(self, namespace_: str) -> int: ... + def get_object_gtype_interfaces(self, gtype: Type) -> list[BaseInfo]: ... + @staticmethod + def get_option_group() -> GLib.OptionGroup: ... + @staticmethod + def get_search_path() -> list[str]: ... + def get_shared_library(self, namespace_: str) -> Optional[str]: ... + def get_typelib_path(self, namespace_: str) -> str: ... + def get_version(self, namespace_: str) -> str: ... + def is_registered(self, namespace_: str, version: Optional[str] = None) -> bool: ... + def load_typelib(self, typelib: Typelib, flags: RepositoryLoadFlags) -> str: ... + @staticmethod + def prepend_library_path(directory: str) -> None: ... + @staticmethod + def prepend_search_path(directory: str) -> None: ... def require( + self, namespace_: str, version: Optional[str], flags: RepositoryLoadFlags + ) -> Typelib: ... + def require_private( self, - namespace: str, + typelib_dir: str, + namespace_: str, version: Optional[str], - flags: Union[RepositoryLoadFlags, Literal[0]], - ) -> Any: ... - def require_private(*args, **kwargs): ... + flags: RepositoryLoadFlags, + ) -> Typelib: ... + +class RepositoryClass(GObject.GPointer): + """ + :Constructors: + + :: + + RepositoryClass() + """ + + parent: GObject.ObjectClass = ... + +class RepositoryPrivate(GObject.GPointer): ... -class Typelib: - def free(*args, **kwargs): ... - def get_namespace(*args, **kwargs): ... - def symbol(*args, **kwargs): ... +class Typelib(GObject.GPointer): + def free(self) -> None: ... + def get_namespace(self) -> str: ... + def symbol(self, symbol_name: str, symbol: None) -> bool: ... -class UnresolvedInfo: ... +class UnresolvedInfo(GObject.GPointer): ... class FieldInfoFlags(GObject.GFlags): - READABLE = ... - WRITABLE = ... + READABLE = 1 + WRITABLE = 2 class FunctionInfoFlags(GObject.GFlags): - IS_CONSTRUCTOR = ... - IS_GETTER = ... - IS_METHOD = ... - IS_SETTER = ... - THROWS = ... - WRAPS_VFUNC = ... + IS_CONSTRUCTOR = 2 + IS_GETTER = 4 + IS_METHOD = 1 + IS_SETTER = 8 + THROWS = 32 + WRAPS_VFUNC = 16 class RepositoryLoadFlags(GObject.GFlags): - IREPOSITORY_LOAD_FLAG_LAZY = ... + IREPOSITORY_LOAD_FLAG_LAZY = 1 class VFuncInfoFlags(GObject.GFlags): - MUST_CHAIN_UP = ... - MUST_NOT_OVERRIDE = ... - MUST_OVERRIDE = ... - THROWS = ... + MUST_CHAIN_UP = 1 + MUST_NOT_OVERRIDE = 4 + MUST_OVERRIDE = 2 + THROWS = 8 class ArrayType(GObject.GEnum): - ARRAY = ... - BYTE_ARRAY = ... - C = ... - PTR_ARRAY = ... + ARRAY = 1 + BYTE_ARRAY = 3 + C = 0 + PTR_ARRAY = 2 class Direction(GObject.GEnum): - IN = ... - INOUT = ... - OUT = ... + IN = 0 + INOUT = 2 + OUT = 1 class InfoType(GObject.GEnum): - ARG = ... - BOXED = ... - CALLBACK = ... - CONSTANT = ... - ENUM = ... - FIELD = ... - FLAGS = ... - FUNCTION = ... - INTERFACE = ... - INVALID = ... - INVALID_0 = ... - OBJECT = ... - PROPERTY = ... - SIGNAL = ... - STRUCT = ... - TYPE = ... - UNION = ... - UNRESOLVED = ... - VALUE = ... - VFUNC = ... + ARG = 17 + BOXED = 4 + CALLBACK = 2 + CONSTANT = 9 + ENUM = 5 + FIELD = 16 + FLAGS = 6 + FUNCTION = 1 + INTERFACE = 8 + INVALID = 0 + INVALID_0 = 10 + OBJECT = 7 + PROPERTY = 15 + SIGNAL = 13 + STRUCT = 3 + TYPE = 18 + UNION = 11 + UNRESOLVED = 19 + VALUE = 12 + VFUNC = 14 class RepositoryError(GObject.GEnum): - LIBRARY_NOT_FOUND = ... - NAMESPACE_MISMATCH = ... - NAMESPACE_VERSION_CONFLICT = ... - TYPELIB_NOT_FOUND = ... + LIBRARY_NOT_FOUND = 3 + NAMESPACE_MISMATCH = 1 + NAMESPACE_VERSION_CONFLICT = 2 + TYPELIB_NOT_FOUND = 0 class ScopeType(GObject.GEnum): - ASYNC = ... - CALL = ... - INVALID = ... - NOTIFIED = ... + ASYNC = 2 + CALL = 1 + FOREVER = 4 + INVALID = 0 + NOTIFIED = 3 class Transfer(GObject.GEnum): - CONTAINER = ... - EVERYTHING = ... - NOTHING = ... + CONTAINER = 1 + EVERYTHING = 2 + NOTHING = 0 class TypeTag(GObject.GEnum): - ARRAY = ... - BOOLEAN = ... - DOUBLE = ... - ERROR = ... - FILENAME = ... - FLOAT = ... - GHASH = ... - GLIST = ... - GSLIST = ... - GTYPE = ... - INT16 = ... - INT32 = ... - INT64 = ... - INT8 = ... - INTERFACE = ... - UINT16 = ... - UINT32 = ... - UINT64 = ... - UINT8 = ... - UNICHAR = ... - UTF8 = ... - VOID = ... + ARRAY = 15 + BOOLEAN = 1 + DOUBLE = 11 + ERROR = 20 + FILENAME = 14 + FLOAT = 10 + GHASH = 19 + GLIST = 17 + GSLIST = 18 + GTYPE = 12 + INT16 = 4 + INT32 = 6 + INT64 = 8 + INT8 = 2 + INTERFACE = 16 + UINT16 = 5 + UINT32 = 7 + UINT64 = 9 + UINT8 = 3 + UNICHAR = 21 + UTF8 = 13 + VOID = 0 class nvokeError(GObject.GEnum): - ARGUMENT_MISMATCH = ... - FAILED = ... - SYMBOL_NOT_FOUND = ... + ARGUMENT_MISMATCH = 2 + FAILED = 0 + SYMBOL_NOT_FOUND = 1