Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Ornaments
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30354/gtk/Graphics/UI/Gtk/Ornaments
Modified Files:
Frame.chs
Log Message:
Add properties.
For the first round, just the easy properties that are implemented in terms
of existing getter/setter functions and where there are no issues with
NULL/Maybe types.
Add Attributes file to glib package and modify Makefile.am accordingly.
Index: Frame.chs
===================================================================
RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Ornaments/Frame.chs,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Frame.chs 25 Feb 2005 01:11:36 -0000 1.3
+++ Frame.chs 13 Mar 2005 19:34:36 -0000 1.4
@@ -64,13 +64,18 @@
frameGetLabelAlign,
ShadowType(..),
frameSetShadowType,
- frameGetShadowType
+ frameGetShadowType,
+
+-- * Properties
+ frameLabel,
+ frameShadowType
) where
import Monad (liftM)
import System.Glib.FFI
import System.Glib.UTFString
+import System.Glib.Attributes (Attr(..))
import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
{#import Graphics.UI.Gtk.Types#}
{#import Graphics.UI.Gtk.Signals#}
@@ -153,6 +158,23 @@
"frameGetLabel: the title of the frame was not a Label widget." $
{#call unsafe frame_get_label#} (toFrame f)
res <- peekUTFString strPtr
- {#call unsafe g_free#} (castPtr strPtr)
return res
+--------------------
+-- Properties
+
+-- | Text of the frame's label.
+--
+frameLabel :: Attr Frame String
+frameLabel = Attr
+ frameGetLabel
+ frameSetLabel
+
+-- | Appearance of the frame border.
+--
+-- Default value: 'ShadowEtchedIn'
+--
+frameShadowType :: Attr Frame ShadowType
+frameShadowType = Attr
+ frameGetShadowType
+ frameSetShadowType
|