Gtk2HsContentsIndex
System.Glib.Attributes
Portabilityportable
Stabilityexperimental
Maintainergtk2hs-users@lists.sourceforge.net
Contents
Attribute types
Interface for getting, setting and updating attributes
Internal attribute constructors
Description
|
Synopsis
type Attr o a = ReadWriteAttr o a a
type ReadAttr o a = ReadWriteAttr o a ()
type WriteAttr o b = ReadWriteAttr o () b
data ReadWriteAttr o a b
data Prop o
= forall a b . (:=) (ReadWriteAttr o a b) b
| forall a b . (:~) (ReadWriteAttr o a b) (a -> b)
| forall a b . (:=>) (ReadWriteAttr o a b) (IO b)
| forall a b . (:~>) (ReadWriteAttr o a b) (a -> IO b)
| forall a b . (::=) (ReadWriteAttr o a b) (o -> b)
| forall a b . (::~) (ReadWriteAttr o a b) (o -> a -> b)
get :: w -> ReadWriteAttr w a b -> IO a
set :: w -> [Prop w] -> IO ()
newAttr :: (o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
readAttr :: (o -> IO a) -> ReadAttr o a
writeAttr :: (o -> b -> IO ()) -> WriteAttr o b
Attribute types
type Attr o a = ReadWriteAttr o a a
An ordinary attribute. Most attributes have the same get and set types.
type ReadAttr o a = ReadWriteAttr o a ()
A read-only attribute.
type WriteAttr o b = ReadWriteAttr o () b
A write-only attribute.
data ReadWriteAttr o a b
A generalised attribute with independent get and set types.
Interface for getting, setting and updating attributes
data Prop o
A property of a object o is an attribute that is already associated with a value.
Constructors
forall a b . (:=) (ReadWriteAttr o a b) bAssign a value to an attribute.
forall a b . (:~) (ReadWriteAttr o a b) (a -> b)Apply an update function to an attribute.
forall a b . (:=>) (ReadWriteAttr o a b) (IO b)Assign the result of an IO action to an attribute.
forall a b . (:~>) (ReadWriteAttr o a b) (a -> IO b)Apply a IO update function to an attribute.
forall a b . (::=) (ReadWriteAttr o a b) (o -> b)Assign a value to an attribute with the object as an argument.
forall a b . (::~) (ReadWriteAttr o a b) (o -> a -> b)Apply an update function to an attribute with the object as an argument.
get :: w -> ReadWriteAttr w a b -> IO a
Get an Attr of an object.
set :: w -> [Prop w] -> IO ()
Set a number of properties for some object.
Internal attribute constructors
newAttr :: (o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
Create a new attribute with a getter and setter function.
readAttr :: (o -> IO a) -> ReadAttr o a
Create a new read-only attribute.
writeAttr :: (o -> b -> IO ()) -> WriteAttr o b
Create a new write-only attribute.
Produced by Haddock version 0.7