"""
Auto-generated Python stub file from linkedlist.py
Module: linkedlist
"""


import t, c
from stdint import *

@t.NoVTable
class LinkedNode:
    next: 'LinkedNode' | t.CPtr
    prev: 'LinkedNode' | t.CPtr
    child: 'LinkedNode' | t.CPtr
    last_child: 'LinkedNode' | t.CPtr
    parent: 'LinkedNode' | t.CPtr
    child_count: t.CSizeT
    def append(self: LinkedNode, node: 'LinkedNode' | t.CPtr) -> t.CInt: pass
    def prepend(self: LinkedNode, node: 'LinkedNode' | t.CPtr) -> t.CInt: pass
    def insert_before(self: LinkedNode, node: 'LinkedNode' | t.CPtr, new_node: 'LinkedNode' | t.CPtr) -> t.CInt: pass
    def insert_after(self: LinkedNode, node: 'LinkedNode' | t.CPtr, new_node: 'LinkedNode' | t.CPtr) -> t.CInt: pass
    def remove_child(self: LinkedNode, node: 'LinkedNode' | t.CPtr) -> t.CInt: pass
    def detach(self: LinkedNode) -> t.CInt: pass
    def unlink(self: LinkedNode) -> t.CInt: pass
    def has_children(self: LinkedNode) -> t.CInt: pass
    def child_at(self: LinkedNode, index: t.CSizeT) -> 'LinkedNode' | t.CPtr: pass
    def count_children(self: LinkedNode) -> t.CSizeT: pass
    def first_sibling(self: LinkedNode) -> 'LinkedNode' | t.CPtr: pass
    def last_sibling(self: LinkedNode) -> 'LinkedNode' | t.CPtr: pass
@t.NoVTable
class SListNode:
    Next: 'SListNode' | t.CPtr
    def append(self: SListNode, node: 'SListNode' | t.CPtr) -> 'SListNode' | t.CPtr: pass
    def append_after(self: SListNode, node: 'SListNode' | t.CPtr) -> 'SListNode' | t.CPtr: pass
    def count(self: SListNode) -> t.CSizeT: pass
    def at(self: SListNode, index: t.CSizeT) -> 'SListNode' | t.CPtr: pass
    def remove(self: SListNode, node: 'SListNode' | t.CPtr) -> 'SListNode' | t.CPtr: pass
@t.NoVTable
class GSListNode[T]:
    Next: T | t.CPtr
@t.NoVTable
class GSList[T]:
    Head: T | t.CPtr
    Tail: T | t.CPtr
    Count: t.CSizeT
    def __init__(self: GSList) -> t.CInt: pass
    def append(self: GSList, node: T) -> t.CInt: pass
    def count(self: GSList) -> t.CSizeT: pass
    def at(self: GSList, index: t.CSizeT) -> T | t.CPtr: pass
@t.NoVTable
class GTreeNode[T]:
    Next: T | t.CPtr
    Prev: T | t.CPtr
    Child: T | t.CPtr
    LastChild: T | t.CPtr
    Parent: T | t.CPtr
    Count: t.CSizeT
    def append(self: GTreeNode, node: T | t.CPtr) -> t.CInt: pass
    def prepend(self: GTreeNode, node: T | t.CPtr) -> t.CInt: pass
    def detach(self: GTreeNode) -> t.CInt: pass
    def has_children(self: GTreeNode) -> t.CInt: pass
    def child_at(self: GTreeNode, index: t.CSizeT) -> T | t.CPtr: pass
    def count_children(self: GTreeNode) -> t.CSizeT: pass