"""
Auto-generated Python stub file from lib.core.Handles.HandlesStruct.py
Module: lib.core.Handles.HandlesStruct
"""


import t, c
from stdint import *
import memhub
import string
import llvmlite
import stdio
import ast
import hashtable

STRUCT_MAX: t.CDefine = 512
FIELD_MAX: t.CDefine = 32
FIELD_NAME_MAX: t.CDefine = 64

@t.NoVTable
class FieldEntry:
    Name: t.CChar | t.CPtr
    Index: int
    Ty: llvmlite.LLVMType | t.CPtr
    DefaultVal: ast.AST | t.CPtr
    AnnotClassName: t.CChar | t.CPtr
@t.NoVTable
class StructEntry:
    Name: t.CChar | t.CPtr
    Ty: llvmlite.LLVMType | t.CPtr
    FieldCount: int
    Fields: FieldEntry | t.CPtr
    IsUnion: int
    IsOOP: int
    HasInit: int
    HasNew: int
    HasVTable: int
    IsNoVTable: int
    ParentName: t.CChar | t.CPtr
    VTableMethodCount: int
    VTableMethods: t.CChar | t.CPtr
    ModuleSha1: t.CChar | t.CPtr

_struct_table: t.CExtern | StructEntry | t.CPtr
_struct_count: t.CExtern | int
_visible_structs: t.CExtern | hashtable.HashTable | t.CPtr
_strict_visibility: t.CExtern | int

def reset_visible_structs(pool: memhub.MemBuddy | t.CPtr, strict: int) -> t.CInt: pass

def add_visible_struct(pool: memhub.MemBuddy | t.CPtr, name: str) -> t.CInt: pass

def is_struct_visible(name: str) -> int: pass

def init_struct_table(pool: memhub.MemBuddy | t.CPtr) -> int: pass

def _get_struct_entry(i: int) -> StructEntry | t.CPtr: pass

def _get_field_entry(struct_entry: StructEntry | t.CPtr, i: int) -> FieldEntry | t.CPtr: pass

def register_struct(pool: memhub.MemBuddy | t.CPtr, name: str, struct_ty: llvmlite.LLVMType | t.CPtr, sha1: str) -> StructEntry | t.CPtr: pass

def set_struct_sha1(pool: memhub.MemBuddy | t.CPtr, class_name: str, sha1: str) -> int: pass

def get_struct_sha1(class_name: str) -> str: pass

def add_field(pool: memhub.MemBuddy | t.CPtr, struct_entry: StructEntry | t.CPtr, field_name: str, field_ty: llvmlite.LLVMType | t.CPtr, default_val: ast.AST | t.CPtr, annot_class_name: t.CChar | t.CPtr) -> int: pass

def find_struct(name: str) -> StructEntry | t.CPtr: pass

def find_struct_by_module(name: str, sha1: str) -> StructEntry | t.CPtr: pass

def find_struct_by_type(struct_ty: llvmlite.LLVMType | t.CPtr) -> StructEntry | t.CPtr: pass

def lookup_field(struct_ty: llvmlite.LLVMType | t.CPtr, field_name: str) -> FieldEntry | t.CPtr: pass

def lookup_field_by_class(class_name: str, field_name: str, sha1: str) -> FieldEntry | t.CPtr: pass

def get_struct_type(class_name: str) -> llvmlite.LLVMType | t.CPtr: pass

def get_field_by_index(class_name: str, idx: int) -> FieldEntry | t.CPtr: pass

def struct_has_defaults(class_name: str) -> int: pass

def _is_struct_type(ty: llvmlite.LLVMType | t.CPtr) -> int: pass

def get_struct_type_from_value(val: llvmlite.Value | t.CPtr) -> llvmlite.LLVMType | t.CPtr: pass

def mark_as_union(name: str) -> int: pass

def is_union_by_name(name: str) -> int: pass

def is_union_by_type(struct_ty: llvmlite.LLVMType | t.CPtr) -> int: pass

def mark_as_oop(name: str) -> int: pass

def is_oop_by_name(name: str) -> int: pass

def mark_has_init(name: str) -> int: pass

def has_init_by_name(name: str) -> int: pass

def mark_has_new(name: str) -> int: pass

def has_new_by_name(name: str) -> int: pass

def get_class_name_by_type(pool: memhub.MemBuddy | t.CPtr, struct_ty: llvmlite.LLVMType | t.CPtr) -> str: pass

def _extract_struct_name(ty: llvmlite.LLVMType | t.CPtr) -> str: pass

def mark_has_vtable(name: str) -> int: pass

def has_vtable_by_name(name: str) -> int: pass

def mark_novtable(name: str) -> int: pass

def is_novtable_by_name(name: str) -> int: pass

def set_parent_name(name: str, parent_name: str) -> int: pass

def get_parent_name(name: str) -> str: pass

def set_vtable_methods(name: str, methods: t.CChar | t.CPtr, count: int) -> int: pass

def get_vtable_method_index(name: str, method_name: str) -> int: pass

def get_vtable_method_count(name: str) -> int: pass

def get_vtable_method_name(name: str, idx: int) -> str: pass

def get_field_count(name: str) -> int: pass

def get_field_name_ptr(fe: FieldEntry | t.CPtr) -> str: pass

def get_field_type_ptr(fe: FieldEntry | t.CPtr) -> llvmlite.LLVMType | t.CPtr: pass

def get_field_default_ptr(fe: FieldEntry | t.CPtr) -> ast.AST | t.CPtr: pass

def get_field_annot_class_name(fe: FieldEntry | t.CPtr) -> str: pass
