# Path: pyvisa/ctwrapper/cthelper.py
# def define_find_libary():
#     def _findlib_gcc(name):
#     def _findlib_ldconfig(name):
#     def _find_library(name):


import ctypes as _ctypes
from .cthelper import FUNCTYPE
ViConstString = _ctypes.POINTER(ViChar)


# Part Two: Type Assignments for VISA only, see spec table 3.1.2.  The
# difference to the above is of no significance in Python, so I use it here
# only for easier synchronisation with the spec.

ViAccessMode, ViPAccessMode = _type_pair(ViUInt32)
ViBusAddress, ViPBusAddress = _type_pair(ViUInt32)
ViBusAddress64, ViPBusAddress64 = _type_pair(ViUInt64)

ViBusSize = ViUInt32

ViAttrState, ViPAttrState = _type_pair(ViUInt32)

# The following is weird, taken from news:zn2ek2w2.fsf@python.net
ViVAList = _ctypes.POINTER(_ctypes.c_char)

ViEventType, ViPEventType, ViAEventType = _type_triplet(ViUInt32)

ViPAttr = _ctypes.POINTER(ViAttr)
ViAAttr = ViPAttr

ViEventFilter = ViUInt32

ViFindList, ViPFindList = _type_pair(ViObject)
ViEvent, ViPEvent = _type_pair(ViObject)
ViJobId, ViPJobId = _type_pair(ViUInt32)

# Class of callback functions for event handling, first type is result type

# Path: pyvisa/ctwrapper/cthelper.py
# def define_find_libary():
#     def _findlib_gcc(name):
#     def _findlib_ldconfig(name):
#     def _find_library(name):


# Path: pyvisa/ctwrapper/types.py
import ctypes as _ctypes
from .cthelper import FUNCTYPE

ViConstString = _ctypes.POINTER(ViChar)


# Part Two: Type Assignments for VISA only, see spec table 3.1.2.  The
# difference to the above is of no significance in Python, so I use it here
# only for easier synchronisation with the spec.

ViAccessMode, ViPAccessMode = _type_pair(ViUInt32)
ViBusAddress, ViPBusAddress = _type_pair(ViUInt32)
ViBusAddress64, ViPBusAddress64 = _type_pair(ViUInt64)

ViBusSize = ViUInt32

ViAttrState, ViPAttrState = _type_pair(ViUInt32)

# The following is weird, taken from news:zn2ek2w2.fsf@python.net
ViVAList = _ctypes.POINTER(_ctypes.c_char)

ViEventType, ViPEventType, ViAEventType = _type_triplet(ViUInt32)

ViPAttr = _ctypes.POINTER(ViAttr)
ViAAttr = ViPAttr

ViEventFilter = ViUInt32

ViFindList, ViPFindList = _type_pair(ViObject)
ViEvent, ViPEvent = _type_pair(ViObject)
ViJobId, ViPJobId = _type_pair(ViUInt32)

# Class of callback functions for event handling, first type is result type

ViHndlr = FUNCTYPE(ViStatus, ViSession, ViEventType, ViEvent, ViAddr)