module Bindings.GObject.BaseObjectType where
import Foreign.Ptr (Ptr,FunPtr,plusPtr)
import Foreign.Ptr (wordPtrToPtr,castPtrToFunPtr)
import Foreign.Storable
import Foreign.C.Types
import Foreign.C.String (CString,CStringLen,CWString,CWStringLen)
import Foreign.Marshal.Alloc (alloca)
import Foreign.Marshal.Array (peekArray,pokeArray)
import Data.Int
import Data.Word
import Bindings.GLib
import Bindings.GObject.TypeInformation
import Bindings.GObject.GParamSpec
import Bindings.GObject.Closures
data C'GObjectClass = C'GObjectClass
data C'GObject = C'GObject
foreign import ccall "inline_G_TYPE_OBJECT" c'G_TYPE_OBJECT
:: C'GType
foreign import ccall "inline_G_OBJECT" c'G_OBJECT
:: Ptr a -> Ptr C'GObject
foreign import ccall "inline_G_IS_OBJECT" c'G_IS_OBJECT
:: Ptr a -> C'gboolean
foreign import ccall "inline_G_OBJECT_CLASS" c'G_OBJECT_CLASS
:: Ptr a -> Ptr C'GObjectClass
foreign import ccall "inline_G_IS_OBJECT_CLASS" c'G_IS_OBJECT_CLASS
:: Ptr a -> C'gboolean
foreign import ccall "inline_G_OBJECT_GET_CLASS" c'G_OBJECT_GET_CLASS
:: Ptr a -> Ptr C'GObjectClass
data C'GObjectConstructParam = C'GObjectConstructParam{
c'GObjectConstructParam'pspec :: Ptr C'GParamSpec
,
c'GObjectConstructParam'value :: Ptr C'GValue
} deriving (Eq,Show)
instance Storable C'GObjectConstructParam where
sizeOf _ = 8
alignment = sizeOf
peek p = do
v0 <- peekByteOff p 0
v1 <- peekByteOff p 4
return $ C'GObjectConstructParam v0 v1
poke p (C'GObjectConstructParam v0 v1) = do
pokeByteOff p 0 v0
pokeByteOff p 4 v1
return ()
type C'GObjectGetPropertyFunc = FunPtr (Ptr C'GObject -> C'guint -> Ptr C'GValue -> Ptr C'GParamSpec -> IO ())
foreign import ccall "wrapper" mk'GObjectGetPropertyFunc
:: (Ptr C'GObject -> C'guint -> Ptr C'GValue -> Ptr C'GParamSpec -> IO ()) -> IO C'GObjectGetPropertyFunc
foreign import ccall "dynamic" mK'GObjectGetPropertyFunc
:: C'GObjectGetPropertyFunc -> (Ptr C'GObject -> C'guint -> Ptr C'GValue -> Ptr C'GParamSpec -> IO ())
type C'GObjectSetPropertyFunc = FunPtr (Ptr C'GObject -> C'guint -> Ptr C'GValue -> Ptr C'GParamSpec -> IO ())
foreign import ccall "wrapper" mk'GObjectSetPropertyFunc
:: (Ptr C'GObject -> C'guint -> Ptr C'GValue -> Ptr C'GParamSpec -> IO ()) -> IO C'GObjectSetPropertyFunc
foreign import ccall "dynamic" mK'GObjectSetPropertyFunc
:: C'GObjectSetPropertyFunc -> (Ptr C'GObject -> C'guint -> Ptr C'GValue -> Ptr C'GParamSpec -> IO ())
type C'GObjectFinalizeFunc = FunPtr (Ptr C'GObject -> IO ())
foreign import ccall "wrapper" mk'GObjectFinalizeFunc
:: (Ptr C'GObject -> IO ()) -> IO C'GObjectFinalizeFunc
foreign import ccall "dynamic" mK'GObjectFinalizeFunc
:: C'GObjectFinalizeFunc -> (Ptr C'GObject -> IO ())
foreign import ccall "inline_G_TYPE_IS_OBJECT" c'G_TYPE_IS_OBJECT
:: C'GType -> C'gboolean
foreign import ccall "inline_G_OBJECT_TYPE" c'G_OBJECT_TYPE
:: Ptr a -> C'GType
foreign import ccall "inline_G_OBJECT_TYPE_NAME" c'G_OBJECT_TYPE_NAME
:: Ptr a -> IO (Ptr C'gchar)
foreign import ccall "inline_G_OBJECT_CLASS_TYPE" c'G_OBJECT_CLASS_TYPE
:: Ptr a -> IO C'GType
foreign import ccall "inline_G_OBJECT_CLASS_NAME" c'G_OBJECT_CLASS_NAME
:: Ptr a -> IO (Ptr C'gchar)
foreign import ccall "g_object_class_install_property" c'g_object_class_install_property
:: Ptr C'GObjectClass -> C'guint -> Ptr C'GParamSpec -> IO ()
foreign import ccall "&g_object_class_install_property" p'g_object_class_install_property
:: FunPtr (Ptr C'GObjectClass -> C'guint -> Ptr C'GParamSpec -> IO ())
foreign import ccall "g_object_class_find_property" c'g_object_class_find_property
:: Ptr C'GObjectClass -> Ptr C'gchar -> IO (Ptr C'GParamSpec)
foreign import ccall "&g_object_class_find_property" p'g_object_class_find_property
:: FunPtr (Ptr C'GObjectClass -> Ptr C'gchar -> IO (Ptr C'GParamSpec))
foreign import ccall "g_object_class_list_properties" c'g_object_class_list_properties
:: Ptr C'GObjectClass -> Ptr C'guint -> IO (Ptr (Ptr C'GParamSpec))
foreign import ccall "&g_object_class_list_properties" p'g_object_class_list_properties
:: FunPtr (Ptr C'GObjectClass -> Ptr C'guint -> IO (Ptr (Ptr C'GParamSpec)))
foreign import ccall "g_object_class_override_property" c'g_object_class_override_property
:: Ptr C'GObjectClass -> C'guint -> Ptr C'gchar -> IO ()
foreign import ccall "&g_object_class_override_property" p'g_object_class_override_property
:: FunPtr (Ptr C'GObjectClass -> C'guint -> Ptr C'gchar -> IO ())
foreign import ccall "g_object_interface_install_property" c'g_object_interface_install_property
:: C'gpointer -> Ptr C'GParamSpec -> IO ()
foreign import ccall "&g_object_interface_install_property" p'g_object_interface_install_property
:: FunPtr (C'gpointer -> Ptr C'GParamSpec -> IO ())
foreign import ccall "g_object_interface_find_property" c'g_object_interface_find_property
:: C'gpointer -> Ptr C'gchar -> IO (Ptr C'GParamSpec)
foreign import ccall "&g_object_interface_find_property" p'g_object_interface_find_property
:: FunPtr (C'gpointer -> Ptr C'gchar -> IO (Ptr C'GParamSpec))
foreign import ccall "g_object_interface_list_properties" c'g_object_interface_list_properties
:: C'gpointer -> Ptr C'guint -> IO (Ptr (Ptr C'GParamSpec))
foreign import ccall "&g_object_interface_list_properties" p'g_object_interface_list_properties
:: FunPtr (C'gpointer -> Ptr C'guint -> IO (Ptr (Ptr C'GParamSpec)))
foreign import ccall "g_object_newv" c'g_object_newv
:: C'GType -> C'guint -> Ptr C'GParameter -> IO C'gpointer
foreign import ccall "&g_object_newv" p'g_object_newv
:: FunPtr (C'GType -> C'guint -> Ptr C'GParameter -> IO C'gpointer)
data C'GParameter = C'GParameter{
c'GParameter'name :: Ptr C'gchar
,
c'GParameter'value :: C'GValue
} deriving (Eq,Show)
instance Storable C'GParameter where
sizeOf _ = 24
alignment = sizeOf
peek p = do
v0 <- peekByteOff p 0
v1 <- peekByteOff p 4
return $ C'GParameter v0 v1
poke p (C'GParameter v0 v1) = do
pokeByteOff p 0 v0
pokeByteOff p 4 v1
return ()
foreign import ccall "g_object_ref" c'g_object_ref
:: C'gpointer -> IO C'gpointer
foreign import ccall "&g_object_ref" p'g_object_ref
:: FunPtr (C'gpointer -> IO C'gpointer)
foreign import ccall "g_object_unref" c'g_object_unref
:: C'gpointer -> IO ()
foreign import ccall "&g_object_unref" p'g_object_unref
:: FunPtr (C'gpointer -> IO ())
foreign import ccall "g_object_ref_sink" c'g_object_ref_sink
:: C'gpointer -> IO C'gpointer
foreign import ccall "&g_object_ref_sink" p'g_object_ref_sink
:: FunPtr (C'gpointer -> IO C'gpointer)
data C'GInitiallyUnowned = C'GInitiallyUnowned{
} deriving (Eq,Show)
instance Storable C'GInitiallyUnowned where
sizeOf _ = 12
alignment = sizeOf
peek p = do
return $ C'GInitiallyUnowned
poke p (C'GInitiallyUnowned) = do
return ()
data C'GInitiallyUnownedClass = C'GInitiallyUnownedClass{
} deriving (Eq,Show)
instance Storable C'GInitiallyUnownedClass where
sizeOf _ = 68
alignment = sizeOf
peek p = do
return $ C'GInitiallyUnownedClass
poke p (C'GInitiallyUnownedClass) = do
return ()
foreign import ccall "inline_G_TYPE_INITIALLY_UNOWNED" c'G_TYPE_INITIALLY_UNOWNED
:: IO C'GType
foreign import ccall "g_object_is_floating" c'g_object_is_floating
:: C'gpointer -> IO C'gboolean
foreign import ccall "&g_object_is_floating" p'g_object_is_floating
:: FunPtr (C'gpointer -> IO C'gboolean)
foreign import ccall "g_object_force_floating" c'g_object_force_floating
:: Ptr C'GObject -> IO ()
foreign import ccall "&g_object_force_floating" p'g_object_force_floating
:: FunPtr (Ptr C'GObject -> IO ())
type C'GWeakNotify = FunPtr (C'gpointer -> Ptr C'GObject -> IO ())
foreign import ccall "wrapper" mk'GWeakNotify
:: (C'gpointer -> Ptr C'GObject -> IO ()) -> IO C'GWeakNotify
foreign import ccall "dynamic" mK'GWeakNotify
:: C'GWeakNotify -> (C'gpointer -> Ptr C'GObject -> IO ())
foreign import ccall "g_object_weak_ref" c'g_object_weak_ref
:: Ptr C'GObject -> C'GWeakNotify -> C'gpointer -> IO ()
foreign import ccall "&g_object_weak_ref" p'g_object_weak_ref
:: FunPtr (Ptr C'GObject -> C'GWeakNotify -> C'gpointer -> IO ())
foreign import ccall "g_object_weak_unref" c'g_object_weak_unref
:: Ptr C'GObject -> C'GWeakNotify -> C'gpointer -> IO ()
foreign import ccall "&g_object_weak_unref" p'g_object_weak_unref
:: FunPtr (Ptr C'GObject -> C'GWeakNotify -> C'gpointer -> IO ())
foreign import ccall "g_object_add_weak_pointer" c'g_object_add_weak_pointer
:: Ptr C'GObject -> Ptr C'gpointer -> IO ()
foreign import ccall "&g_object_add_weak_pointer" p'g_object_add_weak_pointer
:: FunPtr (Ptr C'GObject -> Ptr C'gpointer -> IO ())
foreign import ccall "g_object_remove_weak_pointer" c'g_object_remove_weak_pointer
:: Ptr C'GObject -> Ptr C'gpointer -> IO ()
foreign import ccall "&g_object_remove_weak_pointer" p'g_object_remove_weak_pointer
:: FunPtr (Ptr C'GObject -> Ptr C'gpointer -> IO ())
type C'GToggleNotify = FunPtr (C'gpointer -> Ptr C'GObject -> C'gboolean -> IO ())
foreign import ccall "wrapper" mk'GToggleNotify
:: (C'gpointer -> Ptr C'GObject -> C'gboolean -> IO ()) -> IO C'GToggleNotify
foreign import ccall "dynamic" mK'GToggleNotify
:: C'GToggleNotify -> (C'gpointer -> Ptr C'GObject -> C'gboolean -> IO ())
foreign import ccall "g_object_add_toggle_ref" c'g_object_add_toggle_ref
:: Ptr C'GObject -> C'GToggleNotify -> C'gpointer -> IO ()
foreign import ccall "&g_object_add_toggle_ref" p'g_object_add_toggle_ref
:: FunPtr (Ptr C'GObject -> C'GToggleNotify -> C'gpointer -> IO ())
foreign import ccall "g_object_remove_toggle_ref" c'g_object_remove_toggle_ref
:: Ptr C'GObject -> C'GToggleNotify -> C'gpointer -> IO ()
foreign import ccall "&g_object_remove_toggle_ref" p'g_object_remove_toggle_ref
:: FunPtr (Ptr C'GObject -> C'GToggleNotify -> C'gpointer -> IO ())
foreign import ccall "g_object_notify" c'g_object_notify
:: Ptr C'GObject -> Ptr C'gchar -> IO ()
foreign import ccall "&g_object_notify" p'g_object_notify
:: FunPtr (Ptr C'GObject -> Ptr C'gchar -> IO ())
foreign import ccall "g_object_freeze_notify" c'g_object_freeze_notify
:: Ptr C'GObject -> IO ()
foreign import ccall "&g_object_freeze_notify" p'g_object_freeze_notify
:: FunPtr (Ptr C'GObject -> IO ())
foreign import ccall "g_object_thaw_notify" c'g_object_thaw_notify
:: Ptr C'GObject -> IO ()
foreign import ccall "&g_object_thaw_notify" p'g_object_thaw_notify
:: FunPtr (Ptr C'GObject -> IO ())
foreign import ccall "g_object_get_data" c'g_object_get_data
:: Ptr C'GObject -> Ptr C'gchar -> IO C'gpointer
foreign import ccall "&g_object_get_data" p'g_object_get_data
:: FunPtr (Ptr C'GObject -> Ptr C'gchar -> IO C'gpointer)
foreign import ccall "g_object_set_data" c'g_object_set_data
:: Ptr C'GObject -> Ptr C'gchar -> C'gpointer -> IO ()
foreign import ccall "&g_object_set_data" p'g_object_set_data
:: FunPtr (Ptr C'GObject -> Ptr C'gchar -> C'gpointer -> IO ())
foreign import ccall "g_object_set_data_full" c'g_object_set_data_full
:: Ptr C'GObject -> Ptr C'gchar -> C'gpointer -> C'GDestroyNotify -> IO ()
foreign import ccall "&g_object_set_data_full" p'g_object_set_data_full
:: FunPtr (Ptr C'GObject -> Ptr C'gchar -> C'gpointer -> C'GDestroyNotify -> IO ())
foreign import ccall "g_object_steal_data" c'g_object_steal_data
:: Ptr C'GObject -> Ptr C'gchar -> IO C'gpointer
foreign import ccall "&g_object_steal_data" p'g_object_steal_data
:: FunPtr (Ptr C'GObject -> Ptr C'gchar -> IO C'gpointer)
foreign import ccall "g_object_get_qdata" c'g_object_get_qdata
:: Ptr C'GObject -> C'GQuark -> IO C'gpointer
foreign import ccall "&g_object_get_qdata" p'g_object_get_qdata
:: FunPtr (Ptr C'GObject -> C'GQuark -> IO C'gpointer)
foreign import ccall "g_object_set_qdata" c'g_object_set_qdata
:: Ptr C'GObject -> C'GQuark -> C'gpointer -> IO ()
foreign import ccall "&g_object_set_qdata" p'g_object_set_qdata
:: FunPtr (Ptr C'GObject -> C'GQuark -> C'gpointer -> IO ())
foreign import ccall "g_object_set_qdata_full" c'g_object_set_qdata_full
:: Ptr C'GObject -> C'GQuark -> C'gpointer -> C'GDestroyNotify -> IO ()
foreign import ccall "&g_object_set_qdata_full" p'g_object_set_qdata_full
:: FunPtr (Ptr C'GObject -> C'GQuark -> C'gpointer -> C'GDestroyNotify -> IO ())
foreign import ccall "g_object_steal_qdata" c'g_object_steal_qdata
:: Ptr C'GObject -> C'GQuark -> IO C'gpointer
foreign import ccall "&g_object_steal_qdata" p'g_object_steal_qdata
:: FunPtr (Ptr C'GObject -> C'GQuark -> IO C'gpointer)
foreign import ccall "g_object_set_property" c'g_object_set_property
:: Ptr C'GObject -> Ptr C'gchar -> Ptr C'GValue -> IO ()
foreign import ccall "&g_object_set_property" p'g_object_set_property
:: FunPtr (Ptr C'GObject -> Ptr C'gchar -> Ptr C'GValue -> IO ())
foreign import ccall "g_object_get_property" c'g_object_get_property
:: Ptr C'GObject -> Ptr C'gchar -> Ptr C'GValue -> IO ()
foreign import ccall "&g_object_get_property" p'g_object_get_property
:: FunPtr (Ptr C'GObject -> Ptr C'gchar -> Ptr C'GValue -> IO ())
foreign import ccall "g_object_watch_closure" c'g_object_watch_closure
:: Ptr C'GObject -> Ptr C'GClosure -> IO ()
foreign import ccall "&g_object_watch_closure" p'g_object_watch_closure
:: FunPtr (Ptr C'GObject -> Ptr C'GClosure -> IO ())
foreign import ccall "g_object_run_dispose" c'g_object_run_dispose
:: Ptr C'GObject -> IO ()
foreign import ccall "&g_object_run_dispose" p'g_object_run_dispose
:: FunPtr (Ptr C'GObject -> IO ())
foreign import ccall "inline_G_OBJECT_WARN_INVALID_PROPERTY_ID" c'G_OBJECT_WARN_INVALID_PROPERTY_ID
:: Ptr C'GObject -> C'guint -> Ptr C'GParamSpec -> IO ()