1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
|
# frozen_string_literal: true
module GObjectIntrospection
# Wraps a IInterfaceInfo struct.
# Represents an interface.
class IInterfaceInfo < IRegisteredTypeInfo
def n_prerequisites
Lib.g_interface_info_get_n_prerequisites self
end
def prerequisite(index)
IBaseInfo.wrap Lib.g_interface_info_get_prerequisite(self, index)
end
##
build_array_method :prerequisites
def n_properties
Lib.g_interface_info_get_n_properties self
end
def property(index)
IPropertyInfo.wrap Lib.g_interface_info_get_property(self, index)
end
##
build_array_method :properties, :property
build_finder_method :find_property, :n_properties
def get_n_methods
Lib.g_interface_info_get_n_methods self
end
def get_method(index)
IFunctionInfo.wrap Lib.g_interface_info_get_method(self, index)
end
##
build_array_method :get_methods
def find_method(name)
IFunctionInfo.wrap Lib.g_interface_info_find_method(self, name.to_s)
end
def n_signals
Lib.g_interface_info_get_n_signals self
end
def signal(index)
ISignalInfo.wrap Lib.g_interface_info_get_signal(self, index)
end
##
build_array_method :signals
build_finder_method :find_signal
def n_vfuncs
Lib.g_interface_info_get_n_vfuncs self
end
def vfunc(index)
IVFuncInfo.wrap Lib.g_interface_info_get_vfunc(self, index)
end
##
build_array_method :vfuncs
def find_vfunc(name)
IVFuncInfo.wrap Lib.g_interface_info_find_vfunc(self, name)
end
def n_constants
Lib.g_interface_info_get_n_constants self
end
def constant(index)
IConstantInfo.wrap Lib.g_interface_info_get_constant(self, index)
end
##
build_array_method :constants
def iface_struct
@iface_struct ||= IStructInfo.wrap Lib.g_interface_info_get_iface_struct(self)
end
end
end
|