# encoding: utf-8
# module traits.ctraits
# from C:\Users\xukai\Downloads\发票\venv\Lib\site-packages\traits\ctraits.cp311-win_amd64.pyd
# by generator 1.147
"""
Fast base classes for HasTraits and CTrait.

The ctraits module defines the CHasTraits and cTrait extension types
that define the core performance-oriented portions of the Traits
package. Users will rarely need to use this module directly. Instead,
they should use the API-complete HasTraits and CTrait subclasses of 
CHasTraits and cTrait (respectively).
"""
# no imports

# Variables with simple values

_CALLABLE_AND_ARGS_DEFAULT_VALUE = 7

_CALLABLE_DEFAULT_VALUE = 8

_CONSTANT_DEFAULT_VALUE = 0

_DICT_COPY_DEFAULT_VALUE = 4

_DISALLOW_DEFAULT_VALUE = 10

_LIST_COPY_DEFAULT_VALUE = 3

_MAXIMUM_DEFAULT_VALUE_TYPE = 10

_MISSING_DEFAULT_VALUE = 1

_OBJECT_DEFAULT_VALUE = 2

_TRAIT_DICT_OBJECT_DEFAULT_VALUE = 6

_TRAIT_LIST_OBJECT_DEFAULT_VALUE = 5

_TRAIT_SET_OBJECT_DEFAULT_VALUE = 9

# functions

def _adapt(adaptation_function): # real signature unknown; restored from __doc__
    """ _adapt(adaptation_function) """
    pass

def _ctrait(CTrait_class): # real signature unknown; restored from __doc__
    """ _ctrait(CTrait_class) """
    pass

def _list_classes(TraitListObject, TraitSetObject, TraitDictObject): # real signature unknown; restored from __doc__
    """ _list_classes(TraitListObject,TraitSetObject,TraitDictObject) """
    pass

# classes

class CHasTraits(object):
    """
    Base class for HasTraits.
    
    The CHasTraits class is not intended to be instantiated directly.
    Instead, it serves as a base class for the HasTraits class.
    
    Parameters
    ----------
    **traits : dict
        Dictionary mapping trait names to trait values.
    """
    def traits_init(self): # real signature unknown; restored from __doc__
        """
        traits_init()
        
        Perform any final object initialization needed.
        
        For the CHasTraits base class, this method currently does nothing.
        """
        pass

    def traits_inited(self): # real signature unknown; restored from __doc__
        """
        traits_inited()
        
        Get the initialization state of this object.
        
        Returns
        -------
        initialized : bool
            True if the object is initialized, else False.
        """
        pass

    def trait_items_event(self, name, event_object, event_trait): # real signature unknown; restored from __doc__
        """
        trait_items_event(name, event_object, event_trait)
        
        Fire an items event for changes to a Traits collection.
        
        Parameters
        ----------
        name : str
            Name of the item trait for which an event is being fired. (The name
            will usually end in '_items'.)
        event_object : object
            Object of type ``TraitListEvent``, ``TraitDictEvent`` or ``TraitSetEvent``
            describing the changes to the underlying collection trait value.
        event_trait : CTrait
            The items trait, of trait type ``Event``.
        """
        pass

    def trait_property_changed(self, name, old_value, new_value=None): # real signature unknown; restored from __doc__
        """
        trait_property_changed(name, old_value[, new_value])
        
        Call notifiers when a trait property value is explicitly changed.
        
        Calls trait and object notifiers for a property value change.
        
        Parameters
        ----------
        name : str
            Name of the trait whose value has changed
        old_value : any
            Old value for this trait.
        new_value : any, optional
            New value for this trait. If the new value is not provided,
            it's looked up on the object.
        """
        pass

    def _class_traits(self, *args, **kwargs): # real signature unknown
        """
        _instance_traits()
        
        Return this object's class traits dictionary.
        
        Returns
        -------
        class_traits : dict
            Dictionary mapping trait names to corresponding CTrait instances.
        """
        pass

    def _instance_traits(self): # real signature unknown; restored from __doc__
        """
        _instance_traits()
        
        Return this object's instance traits dictionary.
        
        The object's instance traits dictionary is created if it doesn't
        already exist.
        
        Returns
        -------
        instance_traits : dict
            Dictionary mapping trait names to corresponding CTrait instances.
        """
        pass

    def _notifiers(self, force_create): # real signature unknown; restored from __doc__
        """
        _notifiers(force_create)
        
        Return (and optionally create) the list of notifiers for this object.
        
        Parameters
        ----------
        force_create : bool
            Whether to automatically create the list of notifiers, if it
            doesn't exist yet.
        
        Returns
        -------
        notifiers : list of callables, or None
            If the trait has no notifiers and *force_create* is false, return
            None. Otherwise, return the list of notifiers for this object,
            creating it first if necessary. Each notifier is a callable
            accepting four arguments (object, trait_name, old, new).
        """
        pass

    def _trait(self, name, instance): # real signature unknown; restored from __doc__
        """
        _trait(name, instance)
        
        Return and optionally create a specified instance or class trait.
        
        Parameters
        ----------
        name : str
            Name of the trait to be retrieved or created.
        instance : int
            An integer determining the action to be taken. One of
            {-2, -1, 0, 1, 2}. The meaning of the values is as follows:
        
            2
                Return an instance trait, creating a new trait if none exists.
            1
                Return an existing instance trait. Do not create a new trait.
            0
                Return an existing instance or class trait. Do not create a
                new trait.
            -1
                Return an instance trait, or create a new class trait if no
                instance trait exists.
            -2
                Return the base trait after resolving delegation.
        """
        pass

    def _trait_change_notify(self, enabled): # real signature unknown; restored from __doc__
        """
        _trait_change_notify(enabled)
        
        Enable or disable trait change notifications for this object.
        
        Parameters
        ----------
        enabled : bool
            If true, enable trait change notifications for this object.
            If false, disable trait change notifications for this object.
        """
        pass

    def _trait_notifications_enabled(self): # real signature unknown; restored from __doc__
        """
        _trait_notifications_enabled()
        
        Report whether trait notifications are enabled for this object.
        
        Notifications can be enabled or disabled using the ``_trait_change_notify``
        method. By default, notifications are enabled.
        
        Returns
        -------
        enabled : bool
            True if notifications are currently enabled for this object, else False.
        """
        pass

    def _trait_notifications_vetoed(self): # real signature unknown; restored from __doc__
        """
        _trait_notifications_vetoed()
        
        Report whether trait notifications are vetoed for this object.
        
        If trait notifications are vetoed for an object, assignment of that object
        to a trait will not generate a notification.
        This setting can be enabled or disabled using the ``_trait_veto_notify``
        method. By default, notifications are not vetoed.
        
        Returns
        -------
        vetoed : bool
            True if notifications are currently vetoed for this object, else False.
        """
        pass

    def _trait_set_inited(self): # real signature unknown; restored from __doc__
        """
        _trait_set_inited()
        
        Declare that this object has been initialized.
        """
        pass

    def _trait_veto_notify(self, vetoed): # real signature unknown; restored from __doc__
        """
        _trait_veto_notify(vetoed)
        
        Enable or disable vetoing of trait change notifications by this object.
        
        Parameters
        ----------
        vetoed : bool
            If true, veto trait change notifications for this object: no
            notifications will be issued when this object is assigned to
            a trait. If false, notifications will be issued as usual.
        """
        pass

    def __delattr__(self, *args, **kwargs): # real signature unknown
        """ Implement delattr(self, name). """
        pass

    def __getattribute__(self, *args, **kwargs): # real signature unknown
        """ Return getattr(self, name). """
        pass

    def __init__(self, *args, **kwargs): # real signature unknown
        pass

    @staticmethod # known case of __new__
    def __new__(*args, **kwargs): # real signature unknown
        """ Create and return a new object.  See help(type) for accurate signature. """
        pass

    def __setattr__(self, *args, **kwargs): # real signature unknown
        """ Implement setattr(self, name, value). """
        pass

    __dict__ = None # (!) real value is "mappingproxy({'__new__': <built-in method __new__ of type object at 0x00007FF86682E940>, '__getattribute__': <slot wrapper '__getattribute__' of 'traits.ctraits.CHasTraits' objects>, '__setattr__': <slot wrapper '__setattr__' of 'traits.ctraits.CHasTraits' objects>, '__delattr__': <slot wrapper '__delattr__' of 'traits.ctraits.CHasTraits' objects>, '__init__': <slot wrapper '__init__' of 'traits.ctraits.CHasTraits' objects>, 'trait_property_changed': <method 'trait_property_changed' of 'traits.ctraits.CHasTraits' objects>, 'trait_items_event': <method 'trait_items_event' of 'traits.ctraits.CHasTraits' objects>, '_trait_change_notify': <method '_trait_change_notify' of 'traits.ctraits.CHasTraits' objects>, '_trait_notifications_enabled': <method '_trait_notifications_enabled' of 'traits.ctraits.CHasTraits' objects>, '_trait_veto_notify': <method '_trait_veto_notify' of 'traits.ctraits.CHasTraits' objects>, '_trait_notifications_vetoed': <method '_trait_notifications_vetoed' of 'traits.ctraits.CHasTraits' objects>, 'traits_init': <method 'traits_init' of 'traits.ctraits.CHasTraits' objects>, 'traits_inited': <method 'traits_inited' of 'traits.ctraits.CHasTraits' objects>, '_trait_set_inited': <method '_trait_set_inited' of 'traits.ctraits.CHasTraits' objects>, '_trait': <method '_trait' of 'traits.ctraits.CHasTraits' objects>, '_instance_traits': <method '_instance_traits' of 'traits.ctraits.CHasTraits' objects>, '_class_traits': <method '_class_traits' of 'traits.ctraits.CHasTraits' objects>, '_notifiers': <method '_notifiers' of 'traits.ctraits.CHasTraits' objects>, '__dict__': <attribute '__dict__' of 'traits.ctraits.CHasTraits' objects>, '__doc__': 'Base class for HasTraits.\\n\\nThe CHasTraits class is not intended to be instantiated directly.\\nInstead, it serves as a base class for the HasTraits class.\\n\\nParameters\\n----------\\n**traits : dict\\n    Dictionary mapping trait names to trait values.\\n'})"


class cTrait(object):
    """
    Base class for CTrait.
    
    The cTrait class is not intended to be instantiated directly.
    Instead, it serves as a base class for CTrait.
    
    Parameters
    ----------
    kind : int, optional
        Integer between 0 and 8 representing the kind of this trait, with
        the default value being 0. The kind determines how attribute get
        and set operations behave for attributes using this trait. The
        values for *kind* correspond to the members of the ``TraitKind``
        enumeration type.
    """
    def clone(self, source): # real signature unknown; restored from __doc__
        """
        clone(source)
        
        Clone state of another trait into this one.
        
        This method copies all of the state of the *source* trait into
        this trait, with the exception of the trait notifiers and the
        trait __dict__. The copy is a simple shallow copy: for example,
        after the copy, the handler for this trait will be the same
        object as the handler for the *source* trait.
        
        Parameters
        ----------
        source : CTrait
            The source trait.
        """
        pass

    def default_value(self): # real signature unknown; restored from __doc__
        """
        default_value()
        
        Return tuple giving default value information for this trait.
        
        Returns
        -------
        default_value_type : int
            An integer representing the kind of the default value
        default_value : value
            A value or callable providing the default
        """
        pass

    def default_value_for(self, p_object, name): # real signature unknown; restored from __doc__
        """
        default_value_for(object, name)
        
        Return the default value of this CTrait instance for a specified object
        and trait name.
        
        Parameters
        ----------
        object : HasTraits
            The object the trait is attached to.
        name : str
            The name of the trait.
        
        Returns
        -------
        default_value : value
            The default value for the given object and name.
        """
        pass

    def delegate(self, delegate_name, prefix, prefix_type, modify_delegate): # real signature unknown; restored from __doc__
        """
        delegate(delegate_name, prefix, prefix_type, modify_delegate)
        
        Set another trait as the delegate of this trait.
        
        Parameters
        ----------
        delegate_name : str
            Name of an attribute on the current object with references the
            object that is the trait's delegate.
        delegate_prefix : str
            A prefix or substitution applied to the original attribute when
            looking up the delegated attribute.
        prefix_type : int
            An integer between 0 and 3, inclusive. This controls how the
            delegator attribute name is mapped to an attribute name on the
            delegate object. The meanings of the values are as follows:
        
            0
                The delegation is to an attribute on the delegate object with
                the same name as the delegator attribute. *delegate_prefix*
                is unused.
            1
                The delegation is to an attribute with name given directly by
                *delegate_prefix*.
            2
                The delegation is to an attribute whose name is the value of
                *delegate_prefix*, prepended to the delegator attribute name.
            3
                The delegation is to an attribute whose name is the value of
                the delegator object's ``__prefix__`` attribute, prepended to
                the delegator attribute name.
        modify_delegate : bool
            Whether to modify the delegate when the value of this trait
            is modified.
        """
        pass

    def get_validate(self): # real signature unknown; restored from __doc__
        """
        get_validate()
        
        Return the validator of a CTrait instance.
        
        Returns the current validator for a CTrait instance, or None
        if the trait has no validator. See also the set_validate
        method.
        
        Returns
        -------
        validator : tuple, callable, or None
        """
        pass

    def set_default_value(self, default_value_type, default_value): # real signature unknown; restored from __doc__
        """
        set_default_value(default_value_type, default_value)
        
        Set the default value information for this trait.
        
        Parameters
        ----------
        default_value_type : int
            An integer representing the kind of the default value
        default_value : value
            A value or callable providing the default
        """
        pass

    def set_validate(self, validator): # real signature unknown; restored from __doc__
        """
        set_validate(validator)
        
        Set the validator of a CTrait instance
        
        Parameters
        ----------
        validator : callable or tuple
            Either a callable used for validation, or a tuple representing
            validation information.
        
            A callable used for validation should have signature
            validator(obj, name, value) -> value, and should return the
            validated (and possibly transformed) value. It should raise
            TraitError on failure to validate.
        
            If the validator is a tuple, its first entry will be an integer
            specifying the type of validation, and the remaining entries
            in the tuple (if any) provide additional information specific
            to the validation type
        
        Raises
        ------
        ValueError
            If the given tuple does not have any of the expected forms.
        """
        pass

    def validate(self, p_object, name, value): # real signature unknown; restored from __doc__
        """
        validate(object, name, value)
        
        Perform validation and appropriate conversions on a value for this trait.
        
        Parameters
        ----------
        object : HasTraits
            The HasTraits object that validation is being performed for.
        name : str
            The name of the trait.
        value : object
            The value to be validated.
        
        Returns
        -------
        The validated, converted value.
        
        Raises
        ------
        TraitError
            If the given value is invalid for this trait.
        """
        pass

    def _get_property(self): # real signature unknown; restored from __doc__
        """
        _trait_get_property()
        
        Get the property fields for this trait.
        
        This method returns a tuple (get, set, validate) of length 3 containing
        the getter, setter and validator for this property trait.
        
        When called on a non-property trait, this method returns *None*.
        """
        pass

    def _notifiers(self, force_create): # real signature unknown; restored from __doc__
        """
        _notifiers(force_create)
        
        Return (and optionally create) the list of notifiers for this trait.
        
        Parameters
        ----------
        force_create : bool
            Whether to automatically create the list of notifiers, if it
            doesn't exist yet.
        
        Returns
        -------
        notifiers : list of callables, or None
            If the trait has no notifiers, and *force_create* is false, return None.
            Otherwise, return the list of notifiers for this trait, creating it 
            first if necessary. Each notifier is a
            callable accepting four arguments (object, trait_name, old, new).
        """
        pass

    def _set_property(self, get, get_n, set, set_n, validate, validate_n): # real signature unknown; restored from __doc__
        """
        _trait_set_property(get, get_n, set, set_n, validate, validate_n)
        
        This method expects six arguments, and uses these arguments to set the
        get, set and validation for the trait. It also sets the property flag 
        on the trait.
        
        Parameters
        ----------
        get : callable
            Function called when getting the value of this property trait.
            This function will be called with one of the following argument
            combinations, depending on the value of *get_n*.
        
            - no arguments
            - a single argument ``obj``
            - a pair of arguments ``obj, name``
            - a triple of arguments ``obj, name, trait``
        
        get_n : int
            Number of arguments to supply to the getter. This should be
            between 0 and 3, inclusive.
        set : callable
            Function called when setting the value of this property trait.
            This function will be called with one of the following argument
            combinations, depending on the value of *set_n*.
        
            - no arguments
            - a single argument ``value``
            - a pair of arguments ``obj, value``
            - a triple of arguments ``obj, name, value``
        
        set_n : int
            Number of arguments to supply to the setter. This should be
            between 0 and 3, inclusive.
        validate : callable or None
            Function called for validation. This function will be called
            with one of the following argument combinations, depending on
            the value of *validate_n*.
        
            - no arguments
            - a single argument ``value``
            - a pair of arguments ``obj, value``
            - a triple of arguments ``obj, name, value``
        
        validate_n : int
            Number of arguments to supply to the validator. This should be
            between 0 and 3, inclusive.
        """
        pass

    def __getattribute__(self, *args, **kwargs): # real signature unknown
        """ Return getattr(self, name). """
        pass

    def __getstate__(self): # real signature unknown; restored from __doc__
        """ __getstate__() """
        pass

    def __init__(self, *args, **kwargs): # real signature unknown
        pass

    @staticmethod # known case of __new__
    def __new__(*args, **kwargs): # real signature unknown
        """ Create and return a new object.  See help(type) for accurate signature. """
        pass

    def __setstate__(self, state): # real signature unknown; restored from __doc__
        """ __setstate__(state) """
        pass

    comparison_mode = property(lambda self: object(), lambda self, v: None, lambda self: None)  # default
    """Integer constant indicating when notifiers are executed.

The value of this constant is the integer corresponding to a member
of the :data:`~traits.constants.ComparisonMode` enumeration.
"""

    handler = property(lambda self: object(), lambda self, v: None, lambda self: None)  # default
    """The trait handler underlying this trait.

The value of this property should be an instance of
``BaseTraitHandler``.
"""

    is_mapped = property(lambda self: object(), lambda self, v: None, lambda self: None)  # default
    """True if this is a mapped trait, else False.
"""

    is_property = property(lambda self: object(), lambda self, v: None, lambda self: None)  # default
    """True if this trait is a property trait, else False.

This property is read-only.
"""

    modify_delegate = property(lambda self: object(), lambda self, v: None, lambda self: None)  # default
    """Indicate whether modifications affect the delegate.

For delegated traits, this is a boolean indicating whether
modifications to this trait also modify the delegated trait.
"""

    post_setattr = property(lambda self: object(), lambda self, v: None, lambda self: None)  # default
    """Callable called after a successful value assignment to this trait.

The value of this property is either a callable or *None*.
If the value is a callable, this callable allows the trait to do
additional processing after a value has successfully been assigned.
The callable is called with arguments (object, name, value), and the
return value of the callable is ignored.
"""

    post_setattr_original_value = property(lambda self: object(), lambda self, v: None, lambda self: None)  # default
    """Whether post_setattr receives the original or the validated value.

If true, the post_setattr callable for this trait (if defined)
receives the original, unvalidated value assigned to the trait.
If false, the validated value is provided to post_setattr.
"""

    setattr_original_value = property(lambda self: object(), lambda self, v: None, lambda self: None)  # default
    """Whether setattr stores the original or the validated value.

If true, setattr will store the original, unvalidated, value set on
the trait to the object's dictionary. If false, the value returned
from the validator will be stored.
"""


    __dict__ = None # (!) real value is "mappingproxy({'__new__': <built-in method __new__ of type object at 0x00007FF86682E620>, '__getattribute__': <slot wrapper '__getattribute__' of 'traits.ctraits.cTrait' objects>, '__getstate__': <method '__getstate__' of 'traits.ctraits.cTrait' objects>, '__setstate__': <method '__setstate__' of 'traits.ctraits.cTrait' objects>, 'default_value': <method 'default_value' of 'traits.ctraits.cTrait' objects>, 'set_default_value': <method 'set_default_value' of 'traits.ctraits.cTrait' objects>, 'default_value_for': <method 'default_value_for' of 'traits.ctraits.cTrait' objects>, 'set_validate': <method 'set_validate' of 'traits.ctraits.cTrait' objects>, 'get_validate': <method 'get_validate' of 'traits.ctraits.cTrait' objects>, 'validate': <method 'validate' of 'traits.ctraits.cTrait' objects>, 'delegate': <method 'delegate' of 'traits.ctraits.cTrait' objects>, '_get_property': <method '_get_property' of 'traits.ctraits.cTrait' objects>, '_set_property': <method '_set_property' of 'traits.ctraits.cTrait' objects>, 'clone': <method 'clone' of 'traits.ctraits.cTrait' objects>, '_notifiers': <method '_notifiers' of 'traits.ctraits.cTrait' objects>, '__dict__': <attribute '__dict__' of 'traits.ctraits.cTrait' objects>, 'handler': <attribute 'handler' of 'traits.ctraits.cTrait' objects>, 'post_setattr': <attribute 'post_setattr' of 'traits.ctraits.cTrait' objects>, 'is_property': <attribute 'is_property' of 'traits.ctraits.cTrait' objects>, 'modify_delegate': <attribute 'modify_delegate' of 'traits.ctraits.cTrait' objects>, 'setattr_original_value': <attribute 'setattr_original_value' of 'traits.ctraits.cTrait' objects>, 'post_setattr_original_value': <attribute 'post_setattr_original_value' of 'traits.ctraits.cTrait' objects>, 'is_mapped': <attribute 'is_mapped' of 'traits.ctraits.cTrait' objects>, 'comparison_mode': <attribute 'comparison_mode' of 'traits.ctraits.cTrait' objects>, '__doc__': 'Base class for CTrait.\\n\\nThe cTrait class is not intended to be instantiated directly.\\nInstead, it serves as a base class for CTrait.\\n\\nParameters\\n----------\\nkind : int, optional\\n    Integer between 0 and 8 representing the kind of this trait, with\\n    the default value being 0. The kind determines how attribute get\\n    and set operations behave for attributes using this trait. The\\n    values for *kind* correspond to the members of the ``TraitKind``\\n    enumeration type.\\n'})"


# variables with complex values

__loader__ = None # (!) real value is '<_frozen_importlib_external.ExtensionFileLoader object at 0x000001CA03FBDA10>'

__spec__ = None # (!) real value is "ModuleSpec(name='traits.ctraits', loader=<_frozen_importlib_external.ExtensionFileLoader object at 0x000001CA03FBDA10>, origin='C:\\\\Users\\\\xukai\\\\Downloads\\\\??\\\\venv\\\\Lib\\\\site-packages\\\\traits\\\\ctraits.cp311-win_amd64.pyd')"

