/* Copyright (C) 2003-2013 Runtime Revolution Ltd.
 
 This file is part of LiveCode.
 
 LiveCode is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License v3 as published by the Free
 Software Foundation.
 
 LiveCode 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 General Public License
 for more details.
 
 You should have received a copy of the GNU General Public License
 along with LiveCode.  If not see <http://www.gnu.org/licenses/>.  */

module com.livecode.foreign

----------------------------------------------------------------
-- Universal types
----------------------------------------------------------------

public foreign type Pointer binds to "kMCPointerTypeInfo"

public foreign type UInt32 binds to "kMCUIntTypeInfo"
public foreign type Int32 binds to "kMCIntTypeInfo"

public foreign type UIntSize binds to "kMCSizeTypeInfo"
public foreign type IntSize binds to "kMCSSizeTypeInfo"

public foreign type Float32 binds to "kMCFloatTypeInfo"
public foreign type Float64 binds to "kMCDoubleTypeInfo"

----------------------------------------------------------------
-- C types
----------------------------------------------------------------

public foreign type CBool binds to "kMCBoolTypeInfo"
public type CInt is Int32
public type CUInt is UInt32
public type CFloat is Float32
public type CDouble is Float64

----------------------------------------------------------------
-- LiveCode engine types
----------------------------------------------------------------

public type LCInt is Int32
public type LCUInt is UInt32
public type LCIndex is Int32
public type LCUIndex is UInt32

----------------------------------------------------------------
-- Nul-terminated string pointer types
----------------------------------------------------------------

public foreign type ZStringNative binds to "kMCNativeCStringTypeInfo"
public foreign type ZStringUTF16 binds to "kMCWStringTypeInfo"

----------------------------------------------------------------
-- Deprecated
----------------------------------------------------------------

public type bool is CBool
public type uint is UInt32
public type int is Int32
public type float is Float32
public type double is Float64

public type NativeCString is ZStringNative

end module
