a
    i‚jR  ã                   @   sF   d Z ddlZejZG dd„ dejƒZG dd„ de e¡ƒZdd„ ZdS )	z"Data-type definitions for EGL/GLESé    Nc                   @   s   e Zd ZdZdS )Ú_Opaquez*An Opaque Structure reference (base class)N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__© r   r   úL/home/ghrups/robot-bench/.venv/lib/python3.9/site-packages/OpenGL/_opaque.pyr      s   r   c                   @   s<   e Zd ZeZedd„ ƒZedd„ ƒZedd„ ƒZ	dd„ Z
d	S )
Ú_opaque_pointerc                 C   s   t  || ¡S ©N)ÚctypesÚcast)ÚclsÚvaluer   r   r   Ú
from_param	   s    z_opaque_pointer.from_paramc                 C   s   t  | j¡S r
   )r   Z	addressofÚcontents©Úselfr   r   r   Úaddress   s    z_opaque_pointer.addressc                 C   s   t  | j¡S r
   )r   Zc_voidpr   r   r   r   r   Úas_voidp   s    z_opaque_pointer.as_voidpc                 C   s   | j S )z7Allow these pointers to be used as keys in dictionaries)r   r   r   r   r   Ú__hash__   s    z_opaque_pointer.__hash__N)r   r   r   r   Ú_type_Úclassmethodr   Úpropertyr   r   r   r   r   r   r   r	      s   


r	   c                 C   s(   t | tfi ƒ}t | d tfd|iƒ}|S )z1Create an Opaque pointer class for the given nameZ_pointerr   )Útyper   r	   )ÚnameÚtypZp_typr   r   r   Úopaque_pointer_cls   s    r   )r   r   ZpointerZ	Structurer   ZPOINTERr	   r   r   r   r   r   Ú<module>   s
   