| Maintainer | gtk2hs-users@lists.sourceforge.net |
|---|---|
| Stability | provisional |
| Portability | portable (depends on GHC) |
| Safe Haskell | None |
| Language | Haskell98 |
Graphics.UI.Gtk.Abstract.Object
Description
The base class of the Gtk+ type hierarchy.
- Each widget is a represented as a purely abstract data type. It can only be accessed through and the special access functions that are defined in each widget file.
- makeNewObject :: GObjectClass obj => (ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
- type GWeakNotify = FunPtr (Ptr () -> Ptr GObject -> IO ())
- objectWeakref :: GObjectClass o => o -> IO () -> IO GWeakNotify
- objectWeakunref :: GObjectClass o => o -> GWeakNotify -> IO ()
- objectDestroy :: WidgetClass self => Signal self (IO ())
- notifyProperty :: GObjectClass self => ReadWriteAttr self a b -> Signal self (IO ())
Detail
Object is the base class for all widgets, and for a few non-widget
objects such as Adjustment. Object predates GObject; non-widgets that
derive from Object rather than GObject do so for backward compatibility
reasons.
Object has been removed in Gt3k, but this module still provides useful functions.
Class Hierarchy
|GObject| +----Object | +----Widget| +----Adjustment| +----CellRenderer| +----FileFilter| +----ItemFactory| +----Tooltips| +----TreeViewColumn
Methods
makeNewObject :: GObjectClass obj => (ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj Source #
Weak references
objectWeakref :: GObjectClass o => o -> IO () -> IO GWeakNotify Source #
Attach a callback that will be called after the destroy hooks have been called
objectWeakunref :: GObjectClass o => o -> GWeakNotify -> IO () Source #
Detach a weak destroy callback function
Signals
objectDestroy :: WidgetClass self => Signal self (IO ()) Source #
Signals that all holders of a reference to the Object should release
the reference that they hold. May result in finalization of the object if
all references are released.
notifyProperty :: GObjectClass self => ReadWriteAttr self a b -> Signal self (IO ()) Source #
Register a notify callback that is triggered when the given property has been modified.
- Note that this callback is triggered even if the actual value of the property has not changed.
- Not all attributes are properties. A warning will be generated at runtime if the passed-in attribute is not a property of the class with which it was registered.