-- GENERATED by C->Haskell Compiler, version 0.16.3 Crystal Seed, 24 Jan 2009 (Haskell)
-- Edit the ORIGNAL .chs file instead!
{-# LINE 1 ".\\HGamer3D\\Bindings\\CEGUI\\ClassFont.chs" #-}{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE TypeSynonymInstances #-}
-- This source file is part of HGamer3D
-- (A project to enable 3D game development in Haskell)
-- For the latest info, see http://www.althainz.de/HGamer3D.html
--
-- (c) 2011, 2012 Peter Althainz
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
-- ClassFont.chs
--
module HGamer3D.Bindings.CEGUI.ClassFont where
import Foreign
import Foreign.Ptr
import Foreign.C
import HGamer3D.Data.HG3DClass
import HGamer3D.Data.Vector
import HGamer3D.Data.Colour
import HGamer3D.Data.Angle
import HGamer3D.Bindings.CEGUI.Utils
{-# LINE 40 ".\\HGamer3D\\Bindings\\CEGUI\\ClassFont.chs" #-}
import HGamer3D.Bindings.CEGUI.ClassPtr
{-# LINE 41 ".\\HGamer3D\\Bindings\\CEGUI\\ClassFont.chs" #-}
import HGamer3D.Bindings.CEGUI.StructHG3DClass
{-# LINE 42 ".\\HGamer3D\\Bindings\\CEGUI\\ClassFont.chs" #-}
{- function ~Font -}
delete :: HG3DClass -> IO ()
delete a1 =
withHG3DClass a1 $ \a1' ->
delete'_ a1' >>= \res ->
return ()
{-# LINE 47 ".\\HGamer3D\\Bindings\\CEGUI\\ClassFont.chs" #-}
{- function getName -}
getName :: HG3DClass -> IO (String)
getName a1 =
withHG3DClass a1 $ \a1' ->
alloc64k $ \a2' ->
getName'_ a1' a2' >>= \res ->
peekCString a2'>>= \a2'' ->
return (a2'')
{-# LINE 52 ".\\HGamer3D\\Bindings\\CEGUI\\ClassFont.chs" #-}
{- function getTypeName -}
getTypeName :: HG3DClass -> IO (String)
getTypeName a1 =
withHG3DClass a1 $ \a1' ->
alloc64k $ \a2' ->
getTypeName'_ a1' a2' >>= \res ->
peekCString a2'>>= \a2'' ->
return (a2'')
{-# LINE 57 ".\\HGamer3D\\Bindings\\CEGUI\\ClassFont.chs" #-}
{- function isCodepointAvailable -}
isCodepointAvailable :: HG3DClass -> Int -> IO (Bool)
isCodepointAvailable a1 a2 =
withHG3DClass a1 $ \a1' ->
let {a2' = fromIntegral a2} in
alloca $ \a3' ->
isCodepointAvailable'_ a1' a2' a3' >>= \res ->
peekBoolUtil a3'>>= \a3'' ->
return (a3'')
{-# LINE 63 ".\\HGamer3D\\Bindings\\CEGUI\\ClassFont.chs" #-}
{- function setAutoScaled -}
setAutoScaled :: HG3DClass -> Bool -> IO ()
setAutoScaled a1 a2 =
withHG3DClass a1 $ \a1' ->
let {a2' = fromBool a2} in
setAutoScaled'_ a1' a2' >>= \res ->
return ()
{-# LINE 68 ".\\HGamer3D\\Bindings\\CEGUI\\ClassFont.chs" #-}
{- function isAutoScaled -}
isAutoScaled :: HG3DClass -> IO (Bool)
isAutoScaled a1 =
withHG3DClass a1 $ \a1' ->
alloca $ \a2' ->
isAutoScaled'_ a1' a2' >>= \res ->
peekBoolUtil a2'>>= \a2'' ->
return (a2'')
{-# LINE 73 ".\\HGamer3D\\Bindings\\CEGUI\\ClassFont.chs" #-}
{- function getLineSpacing -}
getLineSpacing :: HG3DClass -> Float -> IO (Float)
getLineSpacing a1 a2 =
withHG3DClass a1 $ \a1' ->
let {a2' = realToFrac a2} in
alloca $ \a3' ->
getLineSpacing'_ a1' a2' a3' >>= \res ->
peekFloatConv a3'>>= \a3'' ->
return (a3'')
{-# LINE 79 ".\\HGamer3D\\Bindings\\CEGUI\\ClassFont.chs" #-}
{- function getFontHeight -}
getFontHeight :: HG3DClass -> Float -> IO (Float)
getFontHeight a1 a2 =
withHG3DClass a1 $ \a1' ->
let {a2' = realToFrac a2} in
alloca $ \a3' ->
getFontHeight'_ a1' a2' a3' >>= \res ->
peekFloatConv a3'>>= \a3'' ->
return (a3'')
{-# LINE 85 ".\\HGamer3D\\Bindings\\CEGUI\\ClassFont.chs" #-}
{- function getBaseline -}
getBaseline :: HG3DClass -> Float -> IO (Float)
getBaseline a1 a2 =
withHG3DClass a1 $ \a1' ->
let {a2' = realToFrac a2} in
alloca $ \a3' ->
getBaseline'_ a1' a2' a3' >>= \res ->
peekFloatConv a3'>>= \a3'' ->
return (a3'')
{-# LINE 91 ".\\HGamer3D\\Bindings\\CEGUI\\ClassFont.chs" #-}
{- function getTextExtent -}
getTextExtent :: HG3DClass -> String -> Float -> IO (Float)
getTextExtent a1 a2 a3 =
withHG3DClass a1 $ \a1' ->
withCString a2 $ \a2' ->
let {a3' = realToFrac a3} in
alloca $ \a4' ->
getTextExtent'_ a1' a2' a3' a4' >>= \res ->
peekFloatConv a4'>>= \a4'' ->
return (a4'')
{-# LINE 98 ".\\HGamer3D\\Bindings\\CEGUI\\ClassFont.chs" #-}
{- function getCharAtPixel -}
getCharAtPixel :: HG3DClass -> String -> Float -> Float -> IO (Int)
getCharAtPixel a1 a2 a3 a4 =
withHG3DClass a1 $ \a1' ->
withCString a2 $ \a2' ->
let {a3' = realToFrac a3} in
let {a4' = realToFrac a4} in
alloca $ \a5' ->
getCharAtPixel'_ a1' a2' a3' a4' a5' >>= \res ->
peekIntConv a5'>>= \a5'' ->
return (a5'')
{-# LINE 106 ".\\HGamer3D\\Bindings\\CEGUI\\ClassFont.chs" #-}
{- function getCharAtPixel2 -}
getCharAtPixel2 :: HG3DClass -> String -> Int -> Float -> Float -> IO (Int)
getCharAtPixel2 a1 a2 a3 a4 a5 =
withHG3DClass a1 $ \a1' ->
withCString a2 $ \a2' ->
let {a3' = fromIntegral a3} in
let {a4' = realToFrac a4} in
let {a5' = realToFrac a5} in
alloca $ \a6' ->
getCharAtPixel2'_ a1' a2' a3' a4' a5' a6' >>= \res ->
peekIntConv a6'>>= \a6'' ->
return (a6'')
{-# LINE 115 ".\\HGamer3D\\Bindings\\CEGUI\\ClassFont.chs" #-}
{- function setDefaultResourceGroup -}
setDefaultResourceGroup :: String -> IO ()
setDefaultResourceGroup a1 =
withCString a1 $ \a1' ->
setDefaultResourceGroup'_ a1' >>= \res ->
return ()
{-# LINE 119 ".\\HGamer3D\\Bindings\\CEGUI\\ClassFont.chs" #-}
{- function getDefaultResourceGroup -}
getDefaultResourceGroup :: IO (String)
getDefaultResourceGroup =
alloc64k $ \a1' ->
getDefaultResourceGroup'_ a1' >>= \res ->
peekCString a1'>>= \a1'' ->
return (a1'')
{-# LINE 123 ".\\HGamer3D\\Bindings\\CEGUI\\ClassFont.chs" #-}
foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassFont.chs.h cegui_fnt_destruct"
delete'_ :: ((HG3DClassPtr) -> (IO ()))
foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassFont.chs.h cegui_fnt_getName"
getName'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassFont.chs.h cegui_fnt_getTypeName"
getTypeName'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassFont.chs.h cegui_fnt_isCodepointAvailable"
isCodepointAvailable'_ :: ((HG3DClassPtr) -> (CInt -> ((Ptr CInt) -> (IO ()))))
foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassFont.chs.h cegui_fnt_setAutoScaled"
setAutoScaled'_ :: ((HG3DClassPtr) -> (CInt -> (IO ())))
foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassFont.chs.h cegui_fnt_isAutoScaled"
isAutoScaled'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ())))
foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassFont.chs.h cegui_fnt_getLineSpacing"
getLineSpacing'_ :: ((HG3DClassPtr) -> (CFloat -> ((Ptr CFloat) -> (IO ()))))
foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassFont.chs.h cegui_fnt_getFontHeight"
getFontHeight'_ :: ((HG3DClassPtr) -> (CFloat -> ((Ptr CFloat) -> (IO ()))))
foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassFont.chs.h cegui_fnt_getBaseline"
getBaseline'_ :: ((HG3DClassPtr) -> (CFloat -> ((Ptr CFloat) -> (IO ()))))
foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassFont.chs.h cegui_fnt_getTextExtent"
getTextExtent'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> (CFloat -> ((Ptr CFloat) -> (IO ())))))
foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassFont.chs.h cegui_fnt_getCharAtPixel"
getCharAtPixel'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> (CFloat -> (CFloat -> ((Ptr CInt) -> (IO ()))))))
foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassFont.chs.h cegui_fnt_getCharAtPixel2"
getCharAtPixel2'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> (CInt -> (CFloat -> (CFloat -> ((Ptr CInt) -> (IO ())))))))
foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassFont.chs.h cegui_fnt_setDefaultResourceGroup"
setDefaultResourceGroup'_ :: ((Ptr CChar) -> (IO ()))
foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassFont.chs.h cegui_fnt_getDefaultResourceGroup"
getDefaultResourceGroup'_ :: ((Ptr CChar) -> (IO ()))