#  Copyright (C) 2017 The authors of Py-ChemShell
#
#  This file is part of Py-ChemShell.
#
#  Py-ChemShell is free software: you can redistribute it and/or modify
#  it under the terms of the GNU Lesser General Public License as
#  published by the Free Software Foundation, either version 3 of the
#  License, or (at your option) any later version.
#
#  Py-ChemShell is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU Lesser General Public License for more details.
#
#  You should have received a copy of the GNU Lesser General Public
#  License along with Py-ChemShell.  If not, see
#  <http://www.gnu.org/licenses/>.

from ctypes    import CFUNCTYPE, c_long, c_void_p, byref, pointer, POINTER, Structure, addressof
from ..dl_py2f import py2f
from ..objects import fragment

#def setObjGlobal(clusterObj):
#    '''Set clusterObj global, so callback can still access it'''

 #   global clusterGlobal

 #   clusterGlobal = clusterObj

# this is not allowed: http://bugs.python.org/issue5710
#dummyFrag = fragment.Fragment()
#fragCType = POINTER(py2f(dummyFrag).__class__)

# CFUNCTYPE(restype, ...)
Callback = CFUNCTYPE(c_long)

def callback():
    '''Cluster cutting callback'''

    return 0

#callback.argtypes = [ c_long ]
#callback.restype = [ c_void_p ]
