-- GENERATED by C->Haskell Compiler, version 0.13.5 (gtk2hs branch) "Bin IO", 13 Nov 2004 (Haskell)-- Edit the ORIGNAL .chs file instead!{-# LINE 1 "./System/Glib/Properties.chs" #-}-- -*-haskell-*--- GIMP Toolkit (GTK) GObject Properties---- Author : Duncan Coutts---- Created: 16 April 2005---- Copyright (C) 2005 Duncan Coutts---- This library 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 2.1 of the License, or (at your option) any later version.---- This library 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.---- |-- Maintainer : gtk2hs-users@lists.sourceforge.net-- Stability : provisional-- Portability : portable (depends on GHC)---- Functions for getting and setting GObject properties--moduleSystem.Glib.Properties(-- * per-type functions for getting and setting GObject propertiesobjectSetPropertyInt,objectGetPropertyInt,objectSetPropertyUInt,objectGetPropertyUInt,objectSetPropertyInt64,objectGetPropertyInt64,objectSetPropertyUInt64,objectGetPropertyUInt64,objectSetPropertyChar,objectGetPropertyChar,objectSetPropertyBool,objectGetPropertyBool,objectSetPropertyEnum,objectGetPropertyEnum,objectSetPropertyFlags,objectGetPropertyFlags,objectSetPropertyFloat,objectGetPropertyFloat,objectSetPropertyDouble,objectGetPropertyDouble,objectSetPropertyString,objectGetPropertyString,objectSetPropertyMaybeString,objectGetPropertyMaybeString,objectSetPropertyBoxedOpaque,objectGetPropertyBoxedOpaque,objectSetPropertyBoxedStorable,objectGetPropertyBoxedStorable,objectSetPropertyGObject,objectGetPropertyGObject,-- * constructors for attributes backed by GObject propertiesnewAttrFromIntProperty,readAttrFromIntProperty,newAttrFromUIntProperty,newAttrFromCharProperty,writeAttrFromUIntProperty,newAttrFromBoolProperty,readAttrFromBoolProperty,newAttrFromFloatProperty,newAttrFromDoubleProperty,newAttrFromEnumProperty,readAttrFromEnumProperty,writeAttrFromEnumProperty,newAttrFromFlagsProperty,newAttrFromStringProperty,readAttrFromStringProperty,writeAttrFromStringProperty,newAttrFromMaybeStringProperty,readAttrFromMaybeStringProperty,writeAttrFromMaybeStringProperty,newAttrFromBoxedOpaqueProperty,readAttrFromBoxedOpaqueProperty,writeAttrFromBoxedOpaqueProperty,newAttrFromBoxedStorableProperty,newAttrFromObjectProperty,writeAttrFromObjectProperty,readAttrFromObjectProperty,newAttrFromMaybeObjectProperty,writeAttrFromMaybeObjectProperty,readAttrFromMaybeObjectProperty,-- TODO: do not export these once we dump the old TreeList API:objectGetPropertyInternal,objectSetPropertyInternal,)whereimportControl.Monad(liftM)importSystem.Glib.FFIimportSystem.Glib.Flags(Flags)importSystem.Glib.Types{-# LINE 100 "./System/Glib/Properties.chs" #-}importSystem.Glib.GValue(GValue(GValue),valueInit,allocaGValue)importqualifiedSystem.Glib.GTypeConstantsasGTypeimportSystem.Glib.GTypeimportSystem.Glib.GValueTypesimportSystem.Glib.Attributes(Attr,ReadAttr,WriteAttr,ReadWriteAttr,newNamedAttr,readNamedAttr,writeNamedAttr){-# LINE 108 "./System/Glib/Properties.chs" #-}objectSetPropertyInternal::GObjectClassgobj=>GType->(GValue->a->IO())->String->gobj->a->IO()objectSetPropertyInternalgtypevalueSetpropobjval=withCStringprop$\propPtr->allocaGValue$\gvalue->dovalueInitgvaluegtypevalueSetgvalueval(\(GObjectarg1)arg2(GValuearg3)->withForeignPtrarg1$\argPtr1->g_object_set_propertyargPtr1arg2arg3){-# LINE 116 "./System/Glib/Properties.chs" #-}(toGObjectobj)propPtrgvalueobjectGetPropertyInternal::GObjectClassgobj=>GType->(GValue->IOa)->String->gobj->IOaobjectGetPropertyInternalgtypevalueGetpropobj=withCStringprop$\propPtr->allocaGValue$\gvalue->dovalueInitgvaluegtype(\(GObjectarg1)arg2(GValuearg3)->withForeignPtrarg1$\argPtr1->g_object_get_propertyargPtr1arg2arg3){-# LINE 126 "./System/Glib/Properties.chs" #-}(toGObjectobj)propPtrgvaluevalueGetgvalueobjectSetPropertyInt::GObjectClassgobj=>String->gobj->Int->IO()objectSetPropertyInt=objectSetPropertyInternalGType.intvalueSetIntobjectGetPropertyInt::GObjectClassgobj=>String->gobj->IOIntobjectGetPropertyInt=objectGetPropertyInternalGType.intvalueGetIntobjectSetPropertyUInt::GObjectClassgobj=>String->gobj->Int->IO()objectSetPropertyUInt=objectSetPropertyInternalGType.uint(\gvv->valueSetUIntgv(fromIntegralv))objectGetPropertyUInt::GObjectClassgobj=>String->gobj->IOIntobjectGetPropertyUInt=objectGetPropertyInternalGType.uint(\gv->liftMfromIntegral$valueGetUIntgv)objectSetPropertyInt64::GObjectClassgobj=>String->gobj->Int64->IO()objectSetPropertyInt64=objectSetPropertyInternalGType.int64valueSetInt64objectGetPropertyInt64::GObjectClassgobj=>String->gobj->IOInt64objectGetPropertyInt64=objectGetPropertyInternalGType.int64valueGetInt64objectSetPropertyUInt64::GObjectClassgobj=>String->gobj->Word64->IO()objectSetPropertyUInt64=objectSetPropertyInternalGType.uint64(\gvv->valueSetUInt64gv(fromIntegralv))objectGetPropertyUInt64::GObjectClassgobj=>String->gobj->IOWord64objectGetPropertyUInt64=objectGetPropertyInternalGType.uint64(\gv->liftMfromIntegral$valueGetUInt64gv)objectSetPropertyChar::GObjectClassgobj=>String->gobj->Char->IO()objectSetPropertyChar=objectSetPropertyInternalGType.uint(\gvv->valueSetUIntgv(fromIntegral(fromEnumv)))objectGetPropertyChar::GObjectClassgobj=>String->gobj->IOCharobjectGetPropertyChar=objectGetPropertyInternalGType.uint(\gv->liftM(toEnum.fromIntegral)$valueGetUIntgv)objectSetPropertyBool::GObjectClassgobj=>String->gobj->Bool->IO()objectSetPropertyBool=objectSetPropertyInternalGType.boolvalueSetBoolobjectGetPropertyBool::GObjectClassgobj=>String->gobj->IOBoolobjectGetPropertyBool=objectGetPropertyInternalGType.boolvalueGetBoolobjectSetPropertyEnum::(GObjectClassgobj,Enumenum)=>GType->String->gobj->enum->IO()objectSetPropertyEnumgtype=objectSetPropertyInternalgtypevalueSetEnumobjectGetPropertyEnum::(GObjectClassgobj,Enumenum)=>GType->String->gobj->IOenumobjectGetPropertyEnumgtype=objectGetPropertyInternalgtypevalueGetEnumobjectSetPropertyFlags::(GObjectClassgobj,Flagsflag)=>GType->String->gobj->[flag]->IO()objectSetPropertyFlagsgtype=objectSetPropertyInternalgtypevalueSetFlagsobjectGetPropertyFlags::(GObjectClassgobj,Flagsflag)=>GType->String->gobj->IO[flag]objectGetPropertyFlagsgtype=objectGetPropertyInternalgtypevalueGetFlagsobjectSetPropertyFloat::GObjectClassgobj=>String->gobj->Float->IO()objectSetPropertyFloat=objectSetPropertyInternalGType.floatvalueSetFloatobjectGetPropertyFloat::GObjectClassgobj=>String->gobj->IOFloatobjectGetPropertyFloat=objectGetPropertyInternalGType.floatvalueGetFloatobjectSetPropertyDouble::GObjectClassgobj=>String->gobj->Double->IO()objectSetPropertyDouble=objectSetPropertyInternalGType.doublevalueSetDoubleobjectGetPropertyDouble::GObjectClassgobj=>String->gobj->IODoubleobjectGetPropertyDouble=objectGetPropertyInternalGType.doublevalueGetDoubleobjectSetPropertyString::GObjectClassgobj=>String->gobj->String->IO()objectSetPropertyString=objectSetPropertyInternalGType.stringvalueSetStringobjectGetPropertyString::GObjectClassgobj=>String->gobj->IOStringobjectGetPropertyString=objectGetPropertyInternalGType.stringvalueGetStringobjectSetPropertyMaybeString::GObjectClassgobj=>String->gobj->MaybeString->IO()objectSetPropertyMaybeString=objectSetPropertyInternalGType.stringvalueSetMaybeStringobjectGetPropertyMaybeString::GObjectClassgobj=>String->gobj->IO(MaybeString)objectGetPropertyMaybeString=objectGetPropertyInternalGType.stringvalueGetMaybeStringobjectSetPropertyBoxedOpaque::GObjectClassgobj=>(boxed->(Ptrboxed->IO())->IO())->GType->String->gobj->boxed->IO()objectSetPropertyBoxedOpaquewithgtype=objectSetPropertyInternalgtype(valueSetBoxedwith)objectGetPropertyBoxedOpaque::GObjectClassgobj=>(Ptrboxed->IOboxed)->GType->String->gobj->IOboxedobjectGetPropertyBoxedOpaquepeekgtype=objectGetPropertyInternalgtype(valueGetBoxedpeek)objectSetPropertyBoxedStorable::(GObjectClassgobj,Storableboxed)=>GType->String->gobj->boxed->IO()objectSetPropertyBoxedStorable=objectSetPropertyBoxedOpaquewithobjectGetPropertyBoxedStorable::(GObjectClassgobj,Storableboxed)=>GType->String->gobj->IOboxedobjectGetPropertyBoxedStorable=objectGetPropertyBoxedOpaquepeekobjectSetPropertyGObject::(GObjectClassgobj,GObjectClassgobj')=>GType->String->gobj->gobj'->IO()objectSetPropertyGObjectgtype=objectSetPropertyInternalgtypevalueSetGObjectobjectGetPropertyGObject::(GObjectClassgobj,GObjectClassgobj')=>GType->String->gobj->IOgobj'objectGetPropertyGObjectgtype=objectGetPropertyInternalgtypevalueGetGObjectobjectSetPropertyMaybeGObject::(GObjectClassgobj,GObjectClassgobj')=>GType->String->gobj->(Maybegobj')->IO()objectSetPropertyMaybeGObjectgtype=objectSetPropertyInternalgtypevalueSetMaybeGObjectobjectGetPropertyMaybeGObject::(GObjectClassgobj,GObjectClassgobj')=>GType->String->gobj->IO(Maybegobj')objectGetPropertyMaybeGObjectgtype=objectGetPropertyInternalgtypevalueGetMaybeGObject-- Convenience functions to make attribute implementations in the other modules-- shorter and more easily extensible.--newAttrFromIntProperty::GObjectClassgobj=>String->AttrgobjIntnewAttrFromIntPropertypropName=newNamedAttrpropName(objectGetPropertyIntpropName)(objectSetPropertyIntpropName)readAttrFromIntProperty::GObjectClassgobj=>String->ReadAttrgobjIntreadAttrFromIntPropertypropName=readNamedAttrpropName(objectGetPropertyIntpropName)newAttrFromUIntProperty::GObjectClassgobj=>String->AttrgobjIntnewAttrFromUIntPropertypropName=newNamedAttrpropName(objectGetPropertyUIntpropName)(objectSetPropertyUIntpropName)newAttrFromCharProperty::GObjectClassgobj=>String->AttrgobjCharnewAttrFromCharPropertypropName=newNamedAttrpropName(objectGetPropertyCharpropName)(objectSetPropertyCharpropName)writeAttrFromUIntProperty::GObjectClassgobj=>String->WriteAttrgobjIntwriteAttrFromUIntPropertypropName=writeNamedAttrpropName(objectSetPropertyUIntpropName)newAttrFromBoolProperty::GObjectClassgobj=>String->AttrgobjBoolnewAttrFromBoolPropertypropName=newNamedAttrpropName(objectGetPropertyBoolpropName)(objectSetPropertyBoolpropName)readAttrFromBoolProperty::GObjectClassgobj=>String->ReadAttrgobjBoolreadAttrFromBoolPropertypropName=readNamedAttrpropName(objectGetPropertyBoolpropName)newAttrFromFloatProperty::GObjectClassgobj=>String->AttrgobjFloatnewAttrFromFloatPropertypropName=newNamedAttrpropName(objectGetPropertyFloatpropName)(objectSetPropertyFloatpropName)newAttrFromDoubleProperty::GObjectClassgobj=>String->AttrgobjDoublenewAttrFromDoublePropertypropName=newNamedAttrpropName(objectGetPropertyDoublepropName)(objectSetPropertyDoublepropName)newAttrFromEnumProperty::(GObjectClassgobj,Enumenum)=>String->GType->AttrgobjenumnewAttrFromEnumPropertypropNamegtype=newNamedAttrpropName(objectGetPropertyEnumgtypepropName)(objectSetPropertyEnumgtypepropName)readAttrFromEnumProperty::(GObjectClassgobj,Enumenum)=>String->GType->ReadAttrgobjenumreadAttrFromEnumPropertypropNamegtype=readNamedAttrpropName(objectGetPropertyEnumgtypepropName)writeAttrFromEnumProperty::(GObjectClassgobj,Enumenum)=>String->GType->WriteAttrgobjenumwriteAttrFromEnumPropertypropNamegtype=writeNamedAttrpropName(objectSetPropertyEnumgtypepropName)newAttrFromFlagsProperty::(GObjectClassgobj,Flagsflag)=>String->GType->Attrgobj[flag]newAttrFromFlagsPropertypropNamegtype=newNamedAttrpropName(objectGetPropertyFlagsgtypepropName)(objectSetPropertyFlagsgtypepropName)newAttrFromStringProperty::GObjectClassgobj=>String->AttrgobjStringnewAttrFromStringPropertypropName=newNamedAttrpropName(objectGetPropertyStringpropName)(objectSetPropertyStringpropName)readAttrFromStringProperty::GObjectClassgobj=>String->ReadAttrgobjStringreadAttrFromStringPropertypropName=readNamedAttrpropName(objectGetPropertyStringpropName)writeAttrFromStringProperty::GObjectClassgobj=>String->WriteAttrgobjStringwriteAttrFromStringPropertypropName=writeNamedAttrpropName(objectSetPropertyStringpropName)newAttrFromMaybeStringProperty::GObjectClassgobj=>String->Attrgobj(MaybeString)newAttrFromMaybeStringPropertypropName=newNamedAttrpropName(objectGetPropertyMaybeStringpropName)(objectSetPropertyMaybeStringpropName)readAttrFromMaybeStringProperty::GObjectClassgobj=>String->ReadAttrgobj(MaybeString)readAttrFromMaybeStringPropertypropName=readNamedAttrpropName(objectGetPropertyMaybeStringpropName)writeAttrFromMaybeStringProperty::GObjectClassgobj=>String->WriteAttrgobj(MaybeString)writeAttrFromMaybeStringPropertypropName=writeNamedAttrpropName(objectSetPropertyMaybeStringpropName)newAttrFromBoxedOpaqueProperty::GObjectClassgobj=>(Ptrboxed->IOboxed)->(boxed->(Ptrboxed->IO())->IO())->String->GType->AttrgobjboxednewAttrFromBoxedOpaquePropertypeekwithpropNamegtype=newNamedAttrpropName(objectGetPropertyBoxedOpaquepeekgtypepropName)(objectSetPropertyBoxedOpaquewithgtypepropName)readAttrFromBoxedOpaqueProperty::GObjectClassgobj=>(Ptrboxed->IOboxed)->String->GType->ReadAttrgobjboxedreadAttrFromBoxedOpaquePropertypeekpropNamegtype=readNamedAttrpropName(objectGetPropertyBoxedOpaquepeekgtypepropName)writeAttrFromBoxedOpaqueProperty::GObjectClassgobj=>(boxed->(Ptrboxed->IO())->IO())->String->GType->WriteAttrgobjboxedwriteAttrFromBoxedOpaquePropertywithpropNamegtype=writeNamedAttrpropName(objectSetPropertyBoxedOpaquewithgtypepropName)newAttrFromBoxedStorableProperty::(GObjectClassgobj,Storableboxed)=>String->GType->AttrgobjboxednewAttrFromBoxedStorablePropertypropNamegtype=newNamedAttrpropName(objectGetPropertyBoxedStorablegtypepropName)(objectSetPropertyBoxedStorablegtypepropName)newAttrFromObjectProperty::(GObjectClassgobj,GObjectClassgobj',GObjectClassgobj'')=>String->GType->ReadWriteAttrgobjgobj'gobj''newAttrFromObjectPropertypropNamegtype=newNamedAttrpropName(objectGetPropertyGObjectgtypepropName)(objectSetPropertyGObjectgtypepropName)writeAttrFromObjectProperty::(GObjectClassgobj,GObjectClassgobj')=>String->GType->WriteAttrgobjgobj'writeAttrFromObjectPropertypropNamegtype=writeNamedAttrpropName(objectSetPropertyGObjectgtypepropName)readAttrFromObjectProperty::(GObjectClassgobj,GObjectClassgobj')=>String->GType->ReadAttrgobjgobj'readAttrFromObjectPropertypropNamegtype=readNamedAttrpropName(objectGetPropertyGObjectgtypepropName)newAttrFromMaybeObjectProperty::(GObjectClassgobj,GObjectClassgobj',GObjectClassgobj'')=>String->GType->ReadWriteAttrgobj(Maybegobj')(Maybegobj'')newAttrFromMaybeObjectPropertypropNamegtype=newNamedAttrpropName(objectGetPropertyMaybeGObjectgtypepropName)(objectSetPropertyMaybeGObjectgtypepropName)writeAttrFromMaybeObjectProperty::(GObjectClassgobj,GObjectClassgobj')=>String->GType->WriteAttrgobj(Maybegobj')writeAttrFromMaybeObjectPropertypropNamegtype=writeNamedAttrpropName(objectSetPropertyMaybeGObjectgtypepropName)readAttrFromMaybeObjectProperty::(GObjectClassgobj,GObjectClassgobj')=>String->GType->ReadAttrgobj(Maybegobj')readAttrFromMaybeObjectPropertypropNamegtype=readNamedAttrpropName(objectGetPropertyMaybeGObjectgtypepropName)foreignimportccallsafe"g_object_set_property"g_object_set_property::((PtrGObject)->((PtrCChar)->((PtrGValue)->(IO()))))foreignimportccallunsafe"g_object_get_property"g_object_get_property::((PtrGObject)->((PtrCChar)->((PtrGValue)->(IO()))))