You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
|
Jul
(68) |
Aug
(4) |
Sep
|
Oct
(23) |
Nov
(95) |
Dec
(9) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(3) |
Feb
|
Mar
|
Apr
(51) |
May
(81) |
Jun
(2) |
Jul
(86) |
Aug
(143) |
Sep
(3) |
Oct
(31) |
Nov
(63) |
Dec
(90) |
2005 |
Jan
(277) |
Feb
(157) |
Mar
(99) |
Apr
(195) |
May
(151) |
Jun
(148) |
Jul
(98) |
Aug
(123) |
Sep
(20) |
Oct
(174) |
Nov
(155) |
Dec
(26) |
2006 |
Jan
(51) |
Feb
(19) |
Mar
(16) |
Apr
(12) |
May
(5) |
Jun
|
Jul
(11) |
Aug
(7) |
Sep
(10) |
Oct
(31) |
Nov
(174) |
Dec
(56) |
2007 |
Jan
(45) |
Feb
(52) |
Mar
(10) |
Apr
(5) |
May
(47) |
Jun
(16) |
Jul
(80) |
Aug
(29) |
Sep
(14) |
Oct
(59) |
Nov
(46) |
Dec
(16) |
2008 |
Jan
(10) |
Feb
(1) |
Mar
|
Apr
|
May
(49) |
Jun
(26) |
Jul
(8) |
Aug
(4) |
Sep
(25) |
Oct
(53) |
Nov
(9) |
Dec
(1) |
2009 |
Jan
(66) |
Feb
(11) |
Mar
(1) |
Apr
(14) |
May
(8) |
Jun
(1) |
Jul
(2) |
Aug
(2) |
Sep
(9) |
Oct
(23) |
Nov
(35) |
Dec
|
2010 |
Jan
(7) |
Feb
(2) |
Mar
(39) |
Apr
(19) |
May
(161) |
Jun
(19) |
Jul
(32) |
Aug
(65) |
Sep
(113) |
Oct
(120) |
Nov
(2) |
Dec
|
2012 |
Jan
|
Feb
(5) |
Mar
(4) |
Apr
(7) |
May
(9) |
Jun
(14) |
Jul
(1) |
Aug
|
Sep
(1) |
Oct
(1) |
Nov
(12) |
Dec
(2) |
2013 |
Jan
(1) |
Feb
(17) |
Mar
(4) |
Apr
(4) |
May
(9) |
Jun
|
Jul
(8) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: Duncan C. <dun...@us...> - 2004-08-03 04:02:00
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4456 Modified Files: ChangeLog Log Message: Add missing functions. Tidy docs up. Fix type mismatch in ImageMenuItem.chs introduced by c2hs seeing new classes. Remove unneeded toolbar function from Structs.hsc Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.204 retrieving revision 1.205 diff -u -d -r1.204 -r1.205 --- ChangeLog 3 Aug 2004 03:51:42 -0000 1.204 +++ ChangeLog 3 Aug 2004 04:01:52 -0000 1.205 @@ -23,6 +23,15 @@ * tools/hierarchyGen/hierarchy.list: new classes for gtk-2.4, a few old ones that were missing and some more Gdk classes. + * gtk/menuComboToolbar/ImageMenuItem.chs: fix type error introduced by + c2hs being able to 'see' new AccelGroup class. Also fiddle with docs. + + * gtk/menuComboToolbar/Toolbar.chs, gtk/menuComboToolbar/MenuItem.chs + gtk/menuComboToolbar/Menu.chs: add missing functions, including + accelerator-related ones. Also tidy up documentation a bit. + + * gtk/general/Structs.hsc: remove unneeded toolbar function. + 2004-08-1 Duncan Coutts <du...@co...> * gtk/entry/SpinButton.chs, gtk/layout/Table.chs, gtk/layout/Layout.chs |
From: Duncan C. <dun...@us...> - 2004-08-03 03:51:51
|
Update of /cvsroot/gtk2hs/gtk2hs/tools/hierarchyGen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3552/tools/hierarchyGen Modified Files: hierarchy.list Log Message: Updated the marshal list with the one from gtk-2.4. Updated hierarchy.list with new classes for gtk-2.4, a few old ones that were missing and some more Gdk classes. Index: hierarchy.list =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/hierarchyGen/hierarchy.list,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- hierarchy.list 30 Jul 2004 16:32:01 -0000 1.8 +++ hierarchy.list 3 Aug 2004 03:51:42 -0000 1.9 @@ -23,6 +23,8 @@ # GdkWindowImplX11 GdkPixmap GdkColormap + GdkScreen if gtk-2.2 + GdkDisplay if gtk-2.2 GtkSettings GtkTextBuffer GtkSourceBuffer if sourceview @@ -78,6 +80,11 @@ GtkExpander if gtk-2.4 GtkComboBox if gtk-2.4 GtkComboBoxEntry if gtk-2.4 + GtkToolItem if gtk-2.4 + GtkToolButton if gtk-2.4 + GtkToggleToolButton if gtk-2.4 + GtkRadioToolButton if gtk-2.4 + GtkSeparatorToolItem if gtk-2.4 GtkBox GtkButtonBox GtkHButtonBox @@ -157,7 +164,16 @@ GtkListStore GtkTreeModelSort GtkIconFactory + GtkSizeGroup + GtkClipboard + GtkAccelGroup + GtkAccelMap if gtk-2.4 GtkEntryCompletion if gtk-2.4 + GtkAction if gtk-2.4 + GtkToggleAction if gtk-2.4 + GtkRadioAction if gtk-2.4 + GtkActionGroup if gtk-2.4 + GtkUIManager if gtk-2.4 GtkSourceLanguage if sourceview GtkSourceLanguagesManager if sourceview GladeXML as GladeXML, glade_xml_get_type if libglade |
From: Duncan C. <dun...@us...> - 2004-08-03 03:51:51
|
Update of /cvsroot/gtk2hs/gtk2hs/tools/callbackGen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3552/tools/callbackGen Modified Files: gtkmarshal.list Log Message: Updated the marshal list with the one from gtk-2.4. Updated hierarchy.list with new classes for gtk-2.4, a few old ones that were missing and some more Gdk classes. Index: gtkmarshal.list =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/callbackGen/gtkmarshal.list,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- gtkmarshal.list 26 Jul 2004 12:14:47 -0000 1.2 +++ gtkmarshal.list 3 Aug 2004 03:51:42 -0000 1.3 @@ -23,34 +23,47 @@ BOOLEAN:BOXED BOOLEAN:BOXED,BOXED +BOOLEAN:ENUM +BOOLEAN:ENUM,INT +BOOLEAN:OBJECT,UINT,FLAGS BOOLEAN:OBJECT,INT,INT,UINT BOOLEAN:OBJECT,STRING,STRING,BOXED +BOOLEAN:OBJECT,BOXED BOOLEAN:OBJECT,BOXED,BOXED +BOOLEAN:OBJECT,STRING,STRING +BOOLEAN:INT,INT +BOOLEAN:INT,INT,INT +BOOLEAN:UINT BOOLEAN:VOID BOOLEAN:BOOLEAN +BOOLEAN:NONE +BOOLEAN:BOOLEAN,BOOLEAN,BOOLEAN ENUM:ENUM -NONE:ENUM,ENUM INT:POINTER -NONE:BOOL +NONE:BOOLEAN +NONE:ENUM NONE:INT +NONE:INT,BOOL NONE:INT,INT NONE:NONE -NONE:POINTER NONE:STRING,INT,POINTER +STRING:DOUBLE +VOID:DOUBLE VOID:BOOLEAN +VOID:BOOLEAN,BOOLEAN,BOOLEAN VOID:BOXED VOID:BOXED,BOXED -VOID:BOXED,BOXED,BOXED,BOXED VOID:BOXED,BOXED,POINTER -VOID:BOXED,POINTER VOID:BOXED,OBJECT VOID:BOXED,STRING,INT VOID:BOXED,UINT VOID:BOXED,UINT,FLAGS VOID:BOXED,UINT,UINT VOID:ENUM +VOID:ENUM,BOOLEAN +VOID:ENUM,ENUM VOID:ENUM,FLOAT -VOID:ENUM,FLOAT,BOOL +VOID:ENUM,FLOAT,BOOLEAN VOID:ENUM,INT VOID:ENUM,INT,BOOLEAN VOID:INT @@ -66,14 +79,21 @@ VOID:OBJECT,OBJECT VOID:OBJECT,STRING,STRING VOID:OBJECT,UINT +VOID:OBJECT,UINT,FLAGS VOID:POINTER VOID:POINTER,INT +VOID:POINTER,BOOLEAN VOID:POINTER,POINTER,POINTER VOID:POINTER,UINT VOID:STRING +VOID:STRING,STRING VOID:STRING,INT,POINTER -VOID:UINT,BOXED,UINT,FLAGS,FLAGS +VOID:STRING,UINT,FLAGS +VOID:UINT,FLAGS,BOXED +VOID:UINT,UINT VOID:UINT,STRING +VOID:UINT,BOXED,UINT,FLAGS,FLAGS +VOID:UINT,OBJECT,UINT,FLAGS,FLAGS VOID:VOID # This marshaller is necessary to marshal a string with explicit length in a # callback "text-insert" in TextBuffer. |
From: Duncan C. <dun...@us...> - 2004-08-03 03:51:50
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3552 Modified Files: ChangeLog Log Message: Updated the marshal list with the one from gtk-2.4. Updated hierarchy.list with new classes for gtk-2.4, a few old ones that were missing and some more Gdk classes. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.203 retrieving revision 1.204 diff -u -d -r1.203 -r1.204 --- ChangeLog 3 Aug 2004 02:58:25 -0000 1.203 +++ ChangeLog 3 Aug 2004 03:51:42 -0000 1.204 @@ -16,6 +16,13 @@ * gtk/menuComboToolbar/api.ignore: exclude deprecated and internal radio_menu_item and toolbar functions. + * tools/callbackGen/gtkmarshal.list: updated marshal list from gtk-2.4. + It adds several new ones and removes a few which we don't seem to use. + Required for a signal in the Toolbar module. + + * tools/hierarchyGen/hierarchy.list: new classes for gtk-2.4, a few old + ones that were missing and some more Gdk classes. + 2004-08-1 Duncan Coutts <du...@co...> * gtk/entry/SpinButton.chs, gtk/layout/Table.chs, gtk/layout/Layout.chs |
From: Duncan C. <dun...@us...> - 2004-08-03 02:59:05
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/menuComboToolbar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29523/gtk/menuComboToolbar Modified Files: CheckMenuItem.chs RadioMenuItem.chs api.ignore Log Message: Add missing functions. Also tidy up documentation a bit. Exclude deprecated and internal radio_menu_item and toolbar functions. Index: CheckMenuItem.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/menuComboToolbar/CheckMenuItem.chs,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- CheckMenuItem.chs 30 Jul 2004 16:38:54 -0000 1.7 +++ CheckMenuItem.chs 3 Aug 2004 02:58:26 -0000 1.8 @@ -34,6 +34,7 @@ checkMenuItemNewWithMnemonic, checkMenuItemSetActive, checkMenuItemGetActive, + checkMenuItemToggled, checkMenuItemSetInconsistent, checkMenuItemGetInconsistent #if GTK_CHECK_VERSION(2,4,0) @@ -87,6 +88,12 @@ checkMenuItemGetActive mi = liftM toBool $ {#call unsafe check_menu_item_get_active#} (toCheckMenuItem mi) +-- | Emits the toggled signal. +-- +checkMenuItemToggled :: CheckMenuItemClass mi => mi -> IO () +checkMenuItemToggled mi = + {#call check_menu_item_toggled#} (toCheckMenuItem mi) + -- | Set the state of the menu item check to \`inconsistent'. -- checkMenuItemSetInconsistent :: CheckMenuItemClass mi => mi -> Bool -> IO () Index: RadioMenuItem.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/menuComboToolbar/RadioMenuItem.chs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- RadioMenuItem.chs 23 May 2004 16:05:21 -0000 1.4 +++ RadioMenuItem.chs 3 Aug 2004 02:58:26 -0000 1.5 @@ -33,8 +33,15 @@ castToRadioMenuItem, radioMenuItemNew, radioMenuItemNewWithLabel, + radioMenuItemNewWithMnemonic, radioMenuItemNewJoinGroup, - radioMenuItemNewJoinGroupWithLabel + radioMenuItemNewJoinGroupWithLabel, + radioMenuItemNewJoinGroupWithMnemonic, + + -- * Compatibilty aliases + radioMenuItemNewFromWidget, + radioMenuItemNewWithLabelFromWidget, + radioMenuItemNewWithMnemonicFromWidget ) where import Monad (liftM) @@ -54,16 +61,23 @@ radioMenuItemNew = makeNewObject mkRadioMenuItem $ liftM castPtr $ {#call unsafe radio_menu_item_new#} nullPtr --- | Create a new radio menu item with a --- label in it. +-- | Create a new radio menu item with a label in it. -- radioMenuItemNewWithLabel :: String -> IO RadioMenuItem radioMenuItemNewWithLabel label = withUTFString label $ \strPtr -> makeNewObject mkRadioMenuItem $ liftM castPtr $ {#call unsafe radio_menu_item_new_with_label#} nullPtr strPtr --- | Create a new radio button and attach it --- to the group of another radio button. +-- | Create a new radio menu item with a label in it. Underscores in the label +-- string indicate the mnemonic for the menu item. +-- +radioMenuItemNewWithMnemonic :: String -> IO RadioMenuItem +radioMenuItemNewWithMnemonic label = withUTFString label $ \strPtr -> + makeNewObject mkRadioMenuItem $ liftM castPtr $ + {#call unsafe radio_menu_item_new_with_mnemonic#} nullPtr strPtr + +-- | Create a new radio button and attach it to the group of another radio +-- button. -- radioMenuItemNewJoinGroup :: RadioMenuItem -> IO RadioMenuItem radioMenuItemNewJoinGroup rmi = do @@ -71,8 +85,8 @@ makeNewObject mkRadioMenuItem $ liftM castPtr $ {#call unsafe radio_menu_item_new#} groupPtr --- | Create a new radio button with --- a label and attach it to the group of another radio button. +-- | Create a new radio button with a label and attach it to the group of +-- another radio button. -- radioMenuItemNewJoinGroupWithLabel :: RadioMenuItem -> String -> IO RadioMenuItem @@ -82,3 +96,26 @@ makeNewObject mkRadioMenuItem $ liftM castPtr $ {#call unsafe radio_menu_item_new_with_label#} groupPtr strPtr +-- | Create a new radio button with a label and attach it to the group of +-- another radio button. Underscores in the label string indicate the mnemonic +-- for the menu item. +-- +radioMenuItemNewJoinGroupWithMnemonic :: RadioMenuItem -> String -> + IO RadioMenuItem +radioMenuItemNewJoinGroupWithMnemonic rmi label = do + groupPtr <- {#call unsafe radio_menu_item_get_group#} rmi + withUTFString label $ \strPtr -> + makeNewObject mkRadioMenuItem $ liftM castPtr $ + {#call unsafe radio_menu_item_new_with_mnemonic#} groupPtr strPtr + +-- These were added in gtk 2.4, the above Join methods simulate them in earlier +-- versions. These aliases are here for compatibility. + +-- | Alias for 'radioMenuItemNewJoinGroup'. +radioMenuItemNewFromWidget = radioMenuItemNewJoinGroup + +-- | Alias for 'radioMenuItemNewJoinGroupWithLabel'. +radioMenuItemNewWithLabelFromWidget = radioMenuItemNewJoinGroupWithLabel + +-- | Alias for 'radioMenuItemNewJoinGroupWithMnemonic'. +radioMenuItemNewWithMnemonicFromWidget = radioMenuItemNewJoinGroupWithMnemonic Index: api.ignore =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/menuComboToolbar/api.ignore,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- api.ignore 30 Jul 2004 16:46:56 -0000 1.1 +++ api.ignore 3 Aug 2004 02:58:26 -0000 1.2 @@ -2,5 +2,21 @@ #deprecated exclude gtk_check_menu_item_set_show_toggle -#emits the signal, seems internal -exclude gtk_check_menu_item_toggled +#deprecated toolbar stuff +exclude gtk_toolbar_unset_icon_size +exclude gtk_toolbar_set_icon_size +exclude gtk_toolbar_remove_space +exclude gtk_toolbar_(append|prepend|insert)_(item|space|element|widget)$ +exclude gtk_toolbar_insert_stock + +#radio menu item stuff +#this one is not used +exclude gtk_radio_menu_item_set_group + +#these are not bound because they are implemented in Haskell +exclude gtk_radio_menu_item_new_from_widget +exclude gtk_radio_menu_item_new_with_label_from_widget + +#rather internal menu item stuff +exclude gtk_menu_item_toggle_size_request +exclude gtk_menu_item_toggle_size_allocate |
From: Duncan C. <dun...@us...> - 2004-08-03 02:59:05
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/general In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29523/gtk/general Modified Files: IconFactory.chs Log Message: Add missing functions. Also tidy up documentation a bit. Exclude deprecated and internal radio_menu_item and toolbar functions. Index: IconFactory.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/general/IconFactory.chs,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- IconFactory.chs 23 May 2004 15:58:48 -0000 1.6 +++ IconFactory.chs 3 Aug 2004 02:58:26 -0000 1.7 @@ -37,10 +37,15 @@ iconFactoryNew, iconFactoryAdd, iconFactoryAddDefault, + iconFactoryLookup, + iconFactoryLookupDefault, iconFactoryRemoveDefault, IconSet, iconSetNew, + iconSetNewFromPixbuf, iconSetAddSource, + iconSetRenderIcon, + iconSetGetSizes, IconSource, iconSourceNew, TextDirection(..), @@ -49,12 +54,13 @@ iconSourceResetDirection, iconSourceGetFilename, iconSourceSetFilename, + iconSourceGetPixbuf, + iconSourceSetPixbuf, iconSourceGetSize, iconSourceSetSize, iconSourceResetSize, StateType(..), iconSourceGetState, - iconSourceGetState, iconSourceSetState, iconSourceResetState, IconSize, @@ -103,6 +109,33 @@ iconFactoryAddDefault :: IconFactory -> IO () iconFactoryAddDefault = {#call unsafe icon_factory_add_default#} +-- | Looks up the stock id in the icon factory, returning an icon set if found, +-- otherwise Nothing. +-- +-- * For display to the user, you should use 'styleLookupIconSet' on the "Style" +-- for the widget that will display the icon, instead of using this function +-- directly, so that themes are taken into account. +-- +iconFactoryLookup :: IconFactory -> String -> IO (Maybe IconSet) +iconFactoryLookup i stockId = + withUTFString stockId $ \strPtr -> do + iconSetPtr <- {#call unsafe icon_factory_lookup#} i strPtr + if iconSetPtr == nullPtr then return Nothing else liftM (Just . IconSet) $ + newForeignPtr iconSetPtr (icon_set_unref iconSetPtr) + +-- | Looks for an icon in the list of default icon factories. +-- +-- * For display to the user, you should use 'styleLookupIconSet' on the "Style" +-- for the widget that will display the icon, instead of using this function +-- directly, so that themes are taken into account. +-- +iconFactoryLookupDefault :: String -> IO (Maybe IconSet) +iconFactoryLookupDefault stockId = + withUTFString stockId $ \strPtr -> do + iconSetPtr <- {#call unsafe icon_factory_lookup_default#} strPtr + if iconSetPtr == nullPtr then return Nothing else liftM (Just . IconSet) $ + newForeignPtr iconSetPtr (icon_set_unref iconSetPtr) + -- | Create a new IconFactory. -- -- * An application should create a new 'IconFactory' and add all @@ -131,6 +164,17 @@ iconSetAddSource :: IconSet -> IconSource -> IO () iconSetAddSource set source = {#call unsafe icon_set_add_source#} set source +iconSetRenderIcon :: WidgetClass widget => IconSet + -> TextDirection + -> StateType + -> IconSize + -> widget + -> IO Pixbuf +iconSetRenderIcon set dir state size widget = makeNewGObject mkPixbuf $ + {#call icon_set_render_icon#} set (Style nullForeignPtr) + ((fromIntegral.fromEnum) dir) ((fromIntegral.fromEnum) state) + ((fromIntegral.fromEnum) size) (toWidget widget) nullPtr + -- | Create a new IconSet. -- -- * Each icon in an application is contained in an 'IconSet'. The @@ -142,6 +186,29 @@ isPtr <- {#call unsafe icon_set_new#} liftM IconSet $ newForeignPtr isPtr (icon_set_unref isPtr) +-- | Creates a new 'IconSet' with the given pixbuf as the default\/fallback +-- source image. If you don't add any additional "IconSource" to the icon set, +-- all variants of the icon will be created from the pixbuf, using scaling, +-- pixelation, etc. as required to adjust the icon size or make the icon look +-- insensitive\/prelighted. +-- +iconSetNewFromPixbuf :: Pixbuf -> IO IconSet +iconSetNewFromPixbuf pixbuf = do + isPtr <- {#call unsafe icon_set_new_from_pixbuf#} pixbuf + liftM IconSet $ newForeignPtr isPtr (icon_set_unref isPtr) + +-- | Obtains a list of icon sizes this icon set can render. +-- +iconSetGetSizes :: IconSet -> IO [IconSize] +iconSetGetSizes set = + alloca $ \sizesArrPtr -> alloca $ \lenPtr -> do + {#call unsafe icon_set_get_sizes#} set sizesArrPtr lenPtr + len <- peek lenPtr + sizesArr <- peek sizesArrPtr + list <- peekArray (fromIntegral len) sizesArr + {#call unsafe g_free#} (castPtr sizesArr) + return $ map (toEnum.fromIntegral) list + #if __GLASGOW_HASKELL__>=600 foreign import ccall unsafe ">k_icon_set_unref" @@ -301,6 +368,21 @@ iconSourceSetFilename is name = withUTFString name $ {#call unsafe icon_source_set_filename#} is +-- | Retrieves the source pixbuf, or Nothing if none is set. +-- +iconSourceGetPixbuf :: IconSource -> IO (Maybe Pixbuf) +iconSourceGetPixbuf is = do + pixbufPtr <- {#call unsafe icon_source_get_pixbuf#} is + if pixbufPtr==nullPtr then return Nothing else liftM Just $ + makeNewGObject mkPixbuf (return pixbufPtr) + +-- | Sets a pixbuf to use as a base image when creating icon variants for +-- 'IconSet'. +-- +iconSourceSetPixbuf :: IconSource -> Pixbuf -> IO () +iconSourceSetPixbuf is pb = do + {#call icon_source_set_pixbuf#} is pb + -- | Set this 'IconSource' to a specific -- size. -- |
From: Duncan C. <dun...@us...> - 2004-08-03 02:59:05
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/display In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29523/gtk/display Modified Files: AccelLabel.chs Log Message: Add missing functions. Also tidy up documentation a bit. Exclude deprecated and internal radio_menu_item and toolbar functions. Index: AccelLabel.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/display/AccelLabel.chs,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- AccelLabel.chs 23 May 2004 15:50:26 -0000 1.5 +++ AccelLabel.chs 3 Aug 2004 02:58:25 -0000 1.6 @@ -33,7 +33,8 @@ AccelLabelClass, castToAccelLabel, accelLabelNew, - accelLabelSetAccelWidget + accelLabelSetAccelWidget, + accelLabelGetAccelWidget ) where import Monad (liftM) @@ -61,3 +62,11 @@ accelLabelSetAccelWidget acl w = {#call accel_label_set_accel_widget#} (toAccelLabel acl) (toWidget w) +-- | Fetches the widget monitored by this accelerator label, or Nothing if it +-- has not bee set. +-- +accelLabelGetAccelWidget :: AccelLabelClass acl => acl -> IO (Maybe Widget) +accelLabelGetAccelWidget acl = do + wPtr <- {#call unsafe accel_label_get_accel_widget#} (toAccelLabel acl) + if wPtr==nullPtr then return Nothing else liftM Just $ + makeNewObject mkWidget (return wPtr) |
From: Duncan C. <dun...@us...> - 2004-08-03 02:59:04
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/buttons In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29523/gtk/buttons Modified Files: ToggleButton.chs RadioButton.chs Log Message: Add missing functions. Also tidy up documentation a bit. Exclude deprecated and internal radio_menu_item and toolbar functions. Index: RadioButton.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/buttons/RadioButton.chs,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- RadioButton.chs 23 May 2004 15:48:35 -0000 1.5 +++ RadioButton.chs 3 Aug 2004 02:58:25 -0000 1.6 @@ -41,8 +41,15 @@ castToRadioButton, radioButtonNew, radioButtonNewWithLabel, + radioButtonNewWithMnemonic, radioButtonNewJoinGroup, - radioButtonNewJoinGroupWithLabel + radioButtonNewJoinGroupWithLabel, + radioButtonNewJoinGroupWithMnemonic, + + -- * Compatibilty aliases + radioButtonNewFromWidget, + radioButtonNewWithLabelFromWidget, + radioButtonNewWithMnemonicFromWidget ) where import Monad (liftM) @@ -56,23 +63,29 @@ -- methods --- | Create a new RadioButton widget with a new --- group. +-- | Create a new RadioButton widget with a new group. -- radioButtonNew :: IO RadioButton radioButtonNew = makeNewObject mkRadioButton $ liftM castPtr $ {#call unsafe radio_button_new#} nullPtr --- | Like 'RadioButton' but shows a --- label to the right of the button. +-- | Like 'radioButtonNew' but shows a label to the right of the button. -- radioButtonNewWithLabel :: String -> IO RadioButton radioButtonNewWithLabel lbl = withUTFString lbl $ \strPtr -> makeNewObject mkRadioButton $ liftM castPtr $ {#call unsafe radio_button_new_with_label#} nullPtr strPtr --- | Creates a new RadioButton and attaches it --- to the group of another radio button. +-- | Like 'radioButtonNew' but shows a label to the right of the button. +-- Underscores in the label string indicate the mnemonic for the menu item. +-- +radioButtonNewWithMnemonic :: String -> IO RadioButton +radioButtonNewWithMnemonic lbl = withUTFString lbl $ \strPtr -> + makeNewObject mkRadioButton $ liftM castPtr $ + {#call unsafe radio_button_new_with_mnemonic#} nullPtr strPtr + +-- | Creates a new RadioButton and attaches it to the group of another radio +-- button. -- -- * This function corresponds to gtk_radio_button_new_from_widget. The new -- name makes more sense because we do not handle any other grouping @@ -82,11 +95,27 @@ radioButtonNewJoinGroup rb = makeNewObject mkRadioButton $ liftM castPtr $ {#call radio_button_new_from_widget#} rb --- | Create a new RadioButton with a --- label and group. +-- | Create a new RadioButton with a label and group. -- radioButtonNewJoinGroupWithLabel :: RadioButton -> String -> IO RadioButton radioButtonNewJoinGroupWithLabel rb lbl = withUTFString lbl $ \strPtr -> makeNewObject mkRadioButton $ liftM castPtr $ {#call radio_button_new_with_label_from_widget#} rb strPtr +-- | Create a new RadioButton with a label and group. Underscores in the label +-- string indicate the mnemonic for the menu item. +-- +radioButtonNewJoinGroupWithMnemonic :: RadioButton -> String -> IO RadioButton +radioButtonNewJoinGroupWithMnemonic rb lbl = withUTFString lbl $ \strPtr -> + makeNewObject mkRadioButton $ liftM castPtr $ + {#call radio_button_new_with_mnemonic_from_widget#} rb strPtr + + +-- | Alias for 'radioButtonNewJoinGroup'. +radioButtonNewFromWidget = radioButtonNewJoinGroup + +-- | Alias for 'radioButtonNewJoinGroupWithLabel'. +radioButtonNewWithLabelFromWidget = radioButtonNewJoinGroupWithLabel + +-- | Alias for 'radioButtonNewJoinGroupWithMnemonic'. +radioButtonNewWithMnemonicFromWidget = radioButtonNewJoinGroupWithMnemonic Index: ToggleButton.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/buttons/ToggleButton.chs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ToggleButton.chs 23 May 2004 15:48:35 -0000 1.4 +++ ToggleButton.chs 3 Aug 2004 02:58:25 -0000 1.5 @@ -31,7 +31,9 @@ castToToggleButton, toggleButtonNew, toggleButtonNewWithLabel, + toggleButtonNewWithMnemonic, toggleButtonSetMode, + toggleButtonGetMode, toggleButtonToggled, toggleButtonGetActive, toggleButtonSetActive, @@ -59,50 +61,63 @@ {#call unsafe toggle_button_new#} --- | Create a toggleButton with a label in it. +-- | Create a ToggleButton with a label in it. -- toggleButtonNewWithLabel :: String -> IO ToggleButton toggleButtonNewWithLabel lbl = withUTFString lbl (\strPtr -> makeNewObject mkToggleButton $ liftM castPtr $ {#call unsafe toggle_button_new_with_label#} strPtr) +-- | Create a ToggleButton with a label in it. Underscores in label indicate the +-- mnemonic for the button. +-- +toggleButtonNewWithMnemonic :: String -> IO ToggleButton +toggleButtonNewWithMnemonic lbl = withUTFString lbl (\strPtr -> + makeNewObject mkToggleButton $ liftM castPtr $ + {#call unsafe toggle_button_new_with_mnemonic#} strPtr) --- | Determines whether or not the toggle button is --- drawn on screen. Set to True of the button should be invisible. +-- | Sets whether the button is displayed as a separate indicator and label. +-- You can call this function on a "CheckButton" or a "RadioButton" with @False@ +-- to make the button look like a normal button. -- toggleButtonSetMode :: ToggleButtonClass tb => tb -> Bool -> IO () -toggleButtonSetMode tb invisible = - {#call toggle_button_set_mode#} (toToggleButton tb) (fromBool invisible) +toggleButtonSetMode tb mode = + {#call toggle_button_set_mode#} (toToggleButton tb) (fromBool mode) --- | Emit the 'toggled' signal on the --- button. +-- | Retrieves whether the button is displayed as a separate indicator and +-- label. +-- +toggleButtonGetMode :: ToggleButtonClass tb => tb -> IO Bool +toggleButtonGetMode tb = + liftM toBool $ {#call unsafe toggle_button_get_mode#} (toToggleButton tb) + +-- | Emit the 'toggled' signal on the button. -- toggleButtonToggled :: ToggleButtonClass tb => tb -> IO () toggleButtonToggled tb = {#call toggle_button_toggled#} (toToggleButton tb) --- | Retrieve the current state of the button. --- Returns True if the button is depressed. +-- | Retrieve the current state of the button. Returns True if the button is +-- depressed. -- toggleButtonGetActive :: ToggleButtonClass tb => tb -> IO Bool toggleButtonGetActive tb = liftM toBool $ {#call unsafe toggle_button_get_active#} (toToggleButton tb) --- Sets the state of the ToggleButton. True means the button should be --- depressed. (EXPOTED) +-- | Sets the state of the ToggleButton. True means the button should be +-- depressed. -- toggleButtonSetActive :: ToggleButtonClass tb => Bool -> tb -> IO () toggleButtonSetActive active tb = {#call toggle_button_set_active#} (toToggleButton tb) (fromBool active) --- | Retrieve the inconsistent flag of the --- button. An inconsistent state only visually affects the button. It will be --- displayed in an \"in-between\" state. +-- | Retrieve the inconsistent flag of the button. An inconsistent state only +-- visually affects the button. It will be displayed in an \"in-between\" state. -- toggleButtonGetInconsistent :: ToggleButtonClass tb => tb -> IO Bool toggleButtonGetInconsistent tb = liftM toBool $ {#call unsafe toggle_button_get_inconsistent#} (toToggleButton tb) --- Sets the inconsistent flag of the ToggleButton. (EXPOTED) +-- | Sets the inconsistent flag of the ToggleButton. -- toggleButtonSetInconsistent :: ToggleButtonClass tb => Bool -> tb -> IO () toggleButtonSetInconsistent incon tb = @@ -111,8 +126,7 @@ -- signals --- | Whenever the state of the button is changed, the --- toggled signal is emitted. +-- | Whenever the state of the button is changed, the toggled signal is emitted. -- onToggled, afterToggled :: ButtonClass b => b -> IO () -> IO (ConnectId b) onToggled = connect_NONE__NONE "toggled" False |
From: Duncan C. <dun...@us...> - 2004-08-03 02:58:49
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29523 Modified Files: ChangeLog Log Message: Add missing functions. Also tidy up documentation a bit. Exclude deprecated and internal radio_menu_item and toolbar functions. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.202 retrieving revision 1.203 diff -u -d -r1.202 -r1.203 --- ChangeLog 3 Aug 2004 02:40:13 -0000 1.202 +++ ChangeLog 3 Aug 2004 02:58:25 -0000 1.203 @@ -7,6 +7,15 @@ * tools/apicoverage/gtk.ignore: add a few more APIs to ignore. + * gtk/buttons/ToggleButton.chs, gtk/buttons/RadioButton.chs, + gtk/display/AccelLabel.chs, gtk/general/IconFactory.chs, + gtk/menuComboToolbar/CheckMenuItem.chs, + gtk/menuComboToolbar/RadioMenuItem.chs: add missing functions. Also + tidy up documentation a bit. + + * gtk/menuComboToolbar/api.ignore: exclude deprecated and internal + radio_menu_item and toolbar functions. + 2004-08-1 Duncan Coutts <du...@co...> * gtk/entry/SpinButton.chs, gtk/layout/Table.chs, gtk/layout/Layout.chs |
From: Duncan C. <dun...@us...> - 2004-08-03 02:40:22
|
Update of /cvsroot/gtk2hs/gtk2hs/tools/apicoverage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27069/tools/apicoverage Modified Files: Makefile gtk.ignore Log Message: Make the count of unbound gtk functions accurate. Also added a few more APIs to ignore. Index: Makefile =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apicoverage/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Makefile 1 Aug 2004 16:16:50 -0000 1.3 +++ Makefile 3 Aug 2004 02:40:13 -0000 1.4 @@ -1,9 +1,9 @@ # system to help check gtk2hs's api coverage -# which vesion of gtk+ to compare against +# which vesion of gtk+ to compare against, eg 2.0.9, 2.2.4, 2.4.4 GTK_MAJOR_VERSION = 2 -GTK_MINOR_VERSION = 4 -GTK_MICRO_VERSION = 4 +GTK_MINOR_VERSION = 2 +GTK_MICRO_VERSION = 0 GTK_VERSION = $(GTK_MAJOR_VERSION).$(GTK_MINOR_VERSION).$(GTK_MICRO_VERSION) @@ -46,13 +46,14 @@ rm -f gtk.coverage gtk.def.filtered gtk.def gtk.ignore.combined gtk_total=$(shell wc -l < gtk.def.filtered) -gtk2hs_total=$(shell wc -l < gtk.coverage) +gtk2hs_total=$(shell wc -l < gtk.coverage.filtered) +difference=$(shell diff gtk.def.filtered gtk.coverage.filtered | grep -c '<') stats : gtk.def.filtered gtk.coverage.filtered @echo "**** gtk2hs API coverage report (for gtk-$(GTK_VERSION)) ****" @echo " total gtk functions :" $(gtk_total) @echo " total gtk2hs functions :" $(gtk2hs_total) - @echo " difference :" `echo $(gtk_total) - $(gtk2hs_total) | bc` + @echo " unbound gtk functions :" $(difference) @echo @echo "run 'make summary' to get a list of groups of unbound functions" @echo " on 'diff gtk.def.filtered gtk.coverage' to see in detail" Index: gtk.ignore =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apicoverage/gtk.ignore,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- gtk.ignore 1 Aug 2004 16:16:50 -0000 1.2 +++ gtk.ignore 3 Aug 2004 02:40:13 -0000 1.3 @@ -62,6 +62,7 @@ exclude gtk_ruler exclude gtk_hruler exclude gtk_vruler +exclude gtk_input_dialog #low level @@ -106,6 +107,9 @@ exclude gtk_gc exclude gtk_key_snooper exclude gtk_rc +exclude gtk_settings +exclude gtk_selection #docs say low level, use clipboard api instead +exclude gtk_target_list #as above exclude gtk_disable_setlocale exclude gtk_set_locale exclude gtk_parse_args #allows to init gtk without opening an X display |
From: Duncan C. <dun...@us...> - 2004-08-03 02:40:22
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27069 Modified Files: ChangeLog Log Message: Make the count of unbound gtk functions accurate. Also added a few more APIs to ignore. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.201 retrieving revision 1.202 diff -u -d -r1.201 -r1.202 --- ChangeLog 3 Aug 2004 02:36:38 -0000 1.201 +++ ChangeLog 3 Aug 2004 02:40:13 -0000 1.202 @@ -3,6 +3,10 @@ * gtk/abstract/FileChooser.chs, gtk/general/FFI.hs: move a couple of string marshaling functions to a common location. + * tools/apicoverage/Makefile: accurate count of unbound gtk functions. + + * tools/apicoverage/gtk.ignore: add a few more APIs to ignore. + 2004-08-1 Duncan Coutts <du...@co...> * gtk/entry/SpinButton.chs, gtk/layout/Table.chs, gtk/layout/Layout.chs |
From: Duncan C. <dun...@us...> - 2004-08-03 02:36:47
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/general In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26699/gtk/general Modified Files: FFI.hs Log Message: Moved a couple of useful string marshaling functions to a common location. Index: FFI.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/general/FFI.hs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- FFI.hs 23 May 2004 15:58:48 -0000 1.3 +++ FFI.hs 3 Aug 2004 02:36:39 -0000 1.4 @@ -36,6 +36,8 @@ newUTFStringLen, peekUTFString, peekUTFStringLen, + readUTFString, + readCString, newForeignPtr, foreignPtrToPtr, module Foreign, @@ -83,7 +85,7 @@ #endif #if __GLASGOW_HASKELL__>=600 -foreign import ccall unsafe "&free" +foreign import ccall unsafe "&free" --TODO: should we be using g_free? free' :: FinalizerPtr a foreignFree :: Ptr a -> FinalizerPtr a @@ -130,6 +132,22 @@ peekUTFStringLen :: CStringLen -> IO String peekUTFStringLen strPtr = liftM fromUTF $ peekCStringLen strPtr +-- like peekUTFString but then frees the string using g_free +-- +readUTFString :: CString -> IO String +readUTFString strPtr = do + str <- peekUTFString strPtr + free (castPtr strPtr) + return str + +-- like peekCString but then frees the string using g_free +-- +readCString :: CString -> IO String +readCString strPtr = do + str <- peekCString strPtr + free (castPtr strPtr) + return str + -- Convert Unicode characters to UTF-8. -- toUTF :: String -> String |
From: Duncan C. <dun...@us...> - 2004-08-03 02:36:47
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/abstract In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26699/gtk/abstract Modified Files: FileChooser.chs Log Message: Moved a couple of useful string marshaling functions to a common location. Index: FileChooser.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/abstract/FileChooser.chs,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- FileChooser.chs 29 Jul 2004 12:14:23 -0000 1.7 +++ FileChooser.chs 3 Aug 2004 02:36:39 -0000 1.8 @@ -353,13 +353,6 @@ ------------------------------------------------------ -- Utility functions that really ought to go elsewhere --- like peekCString but then frees the string using g_free -readCString :: CString -> IO String -readCString strPtr = do - str <- peekCString strPtr - {# call unsafe g_free #} (castPtr strPtr) - return str - -- convenience functions for GSlists of strings fromStringGSList :: GSList -> IO [String] fromStringGSList strList = do |
From: Duncan C. <dun...@us...> - 2004-08-03 02:36:47
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26699 Modified Files: ChangeLog Log Message: Moved a couple of useful string marshaling functions to a common location. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.200 retrieving revision 1.201 diff -u -d -r1.200 -r1.201 --- ChangeLog 1 Aug 2004 16:16:50 -0000 1.200 +++ ChangeLog 3 Aug 2004 02:36:38 -0000 1.201 @@ -1,3 +1,8 @@ +2004-08-3 Duncan Coutts <du...@co...> + + * gtk/abstract/FileChooser.chs, gtk/general/FFI.hs: move a couple of + string marshaling functions to a common location. + 2004-08-1 Duncan Coutts <du...@co...> * gtk/entry/SpinButton.chs, gtk/layout/Table.chs, gtk/layout/Layout.chs |
From: Duncan C. <dun...@us...> - 2004-08-01 16:16:59
|
Update of /cvsroot/gtk2hs/gtk2hs/tools/apicoverage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19692/tools/apicoverage Modified Files: gtk.ignore Makefile Log Message: Updated api ignore stuff. Some added, some moved elsewhere. New apicvocerage Makefile target 'summary' to list the number of unbound gtk functions, grouped by namespace prefix. Index: Makefile =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apicoverage/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile 30 Jul 2004 16:46:57 -0000 1.2 +++ Makefile 1 Aug 2004 16:16:50 -0000 1.3 @@ -53,8 +53,16 @@ @echo " total gtk functions :" $(gtk_total) @echo " total gtk2hs functions :" $(gtk2hs_total) @echo " difference :" `echo $(gtk_total) - $(gtk2hs_total) | bc` - @echo; echo "run 'diff gtk.def.filtered gtk.coverage' to see in detail" + @echo + @echo "run 'make summary' to get a list of groups of unbound functions" + @echo " on 'diff gtk.def.filtered gtk.coverage' to see in detail" @echo " or 'diff gtk.def.filtered gtk.coverage.filtered' for less noise" +summary : gtk.def.filtered gtk.coverage.filtered + @echo "**** unbound gtk functions by group ****" + @diff gtk.def.filtered gtk.coverage.filtered | \ + awk '$$1 == "<" { print $$2 }' | \ + awk -F _ '{ printf("%s_%s\n", $$1, $$2) }' | uniq -c | sort -n + debug: @echo GTK_IGNORE_FILES = $(GTK_IGNORE_FILES) Index: gtk.ignore =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apicoverage/gtk.ignore,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- gtk.ignore 29 Jul 2004 14:33:18 -0000 1.1 +++ gtk.ignore 1 Aug 2004 16:16:50 -0000 1.2 @@ -19,19 +19,11 @@ exclude gtk_pixmap exclude gtk_item_factory +exclude gtk_item_factories exclude gtk_old_editable exclude gtk_preview exclude gtk_progress -do not exclude gtk_progress_bar_new -do not exclude gtk_progress_bar_pulse -do not exclude gtk_progress_bar_set_text -do not exclude gtk_progress_bar_set_fraction -do not exclude gtk_progress_bar_set_pulse_step -do not exclude gtk_progress_bar_set_orientation -do not exclude gtk_progress_bar_get_text -do not exclude gtk_progress_bar_get_fraction -do not exclude gtk_progress_bar_get_pulse_step -do not exclude gtk_progress_bar_get_orientation +do not exclude gtk_progress_bar exclude gtk_text do not exclude gtk_text_iter @@ -49,11 +41,15 @@ exclude gtk_idle exclude gtk_timeout exclude gtk_input +do not exclude gtk_input_dialog exclude gtk_exit exclude gtk_type exclude gtk_color_selection_set_update_policy +exclude gtk_signal + + #deprecated as of 2.4 exclude gtk_combo do not exclude gtk_combo_box @@ -74,6 +70,10 @@ exclude gtk_true exclude gtk_.*_version exclude gtk_requisition +exclude gtk_main_do_event +exclude gtk_propagate_event +exclude gtk_get_current_event +exclude gtk_get_event_widget #for gtk extensions & widget implementations exclude gtk_draw @@ -87,33 +87,42 @@ exclude gtk_invisible exclude gtk_widget_realize exclude gtk_widget_unrealize +exclude gtk_accessible_connect_widget_destroyed + +#GtkItem abstract base class has no useful methods +exclude gtk_item_select +exclude gtk_item_deselect +exclude gtk_item_toggle #sometimes there are several ways of doing the same thing #so lets ignore the other ways of doing it exclude gtk_init do not exclude gtk_init_check$ +do not exclude gtk_init_add #dont think we need these ? TODO check this exclude gtk_gc exclude gtk_key_snooper exclude gtk_rc +exclude gtk_disable_setlocale +exclude gtk_set_locale +exclude gtk_parse_args #allows to init gtk without opening an X display +exclude stock_add_static #comment in StockItems.hsc says this might be useful #appear to be internal, they're not well documented exclude gtk_binding exclude gtk_debug - -#stuff that we do not call directly, but instead simulate -#usually because the function is varargs -exclude gtk_file_chooser_dialog_new +exclude gtk_rgb_to_hsv +exclude gtk_hsv +exclude gtk_theme_engine #these are sometimes bound if necessary but otherwise we can ignore them always exclude _get_type$ always exclude _valist$ -always exclude _newv$ always exclude _copy$ always exclude _free$ exclude _ref$ |
From: Duncan C. <dun...@us...> - 2004-08-01 16:16:59
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19692 Modified Files: ChangeLog Log Message: Updated api ignore stuff. Some added, some moved elsewhere. New apicvocerage Makefile target 'summary' to list the number of unbound gtk functions, grouped by namespace prefix. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.199 retrieving revision 1.200 diff -u -d -r1.199 -r1.200 --- ChangeLog 1 Aug 2004 16:08:12 -0000 1.199 +++ ChangeLog 1 Aug 2004 16:16:50 -0000 1.200 @@ -11,6 +11,12 @@ gtk/windows/api.ignore, gtk/abstract/api.ignore: updated with more deprecated functions to ignore. + * tools/apicoverage/gtk.ignore: updated api ignore stuff. Some added, + some moved elsewhere. + + * tools/apicoverage/Makefile: new target 'summary' to list the number + of unbound gtk functions, grouped by namespace prefix. + 2004-07-30 Duncan Coutts <du...@co...> * gtk/entry/Editable.chs, gtk/entry/Entry.chs: split off editable |
From: Duncan C. <dun...@us...> - 2004-08-01 16:08:51
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18039 Modified Files: ChangeLog Log Message: Add missing functions. Update api.ignore files with more deprecated functions. Also fix a couple typo bugs and tidy up some documentation. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.198 retrieving revision 1.199 diff -u -d -r1.198 -r1.199 --- ChangeLog 30 Jul 2004 16:46:54 -0000 1.198 +++ ChangeLog 1 Aug 2004 16:08:12 -0000 1.199 @@ -1,3 +1,16 @@ +2004-08-1 Duncan Coutts <du...@co...> + + * gtk/entry/SpinButton.chs, gtk/layout/Table.chs, gtk/layout/Layout.chs + gtk/misc/Viewport.chs, gtk/misc/Tooltips.chs, + gtk/scrolling/ScrolledWindow.chs, gtk/treeList/ListStore.chs, + gtk/display/Label.chs, gtk/abstract/Misc.chs, gtk/abstract/Paned.chs, + gtk/abstract/Range.chs, gtk/abstract/Scale.chs: add missing functions. + Also fix a couple typo bugs and tidy up some documentation. + + * gtk/layout/api.ignore, gtk/misc/api.ignore, gtk/treeList/api.ignore + gtk/windows/api.ignore, gtk/abstract/api.ignore: updated with more + deprecated functions to ignore. + 2004-07-30 Duncan Coutts <du...@co...> * gtk/entry/Editable.chs, gtk/entry/Entry.chs: split off editable @@ -17,7 +30,7 @@ * gtk/general/Structs.hsc: remove unneeded CheckMenuItem function. - * tk/misc/api.ignore, gtk/treeList/api.ignore, gtk/entry/api.ignore + * gtk/misc/api.ignore, gtk/treeList/api.ignore, gtk/entry/api.ignore gtk/abstract/api.ignore, gtk/general/api.ignore, gtk/windows/api.ignore gtk/menuComboToolbar/api.ignore, gtk/layout/api.ignore: new files to mark unbound functions, for use with the api coverage tool. |
From: Duncan C. <dun...@us...> - 2004-08-01 16:08:37
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/display In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18039/gtk/display Modified Files: Label.chs Log Message: Add missing functions. Update api.ignore files with more deprecated functions. Also fix a couple typo bugs and tidy up some documentation. Index: Label.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/display/Label.chs,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Label.chs 23 May 2004 15:50:26 -0000 1.6 +++ Label.chs 1 Aug 2004 16:08:14 -0000 1.7 @@ -30,28 +30,40 @@ labelNew, labelNewWithMnemonic, labelSetText, + labelSetLabel, labelSetTextWithMnemonic, module Markup, labelSetMarkup, labelSetMarkupWithMnemonic, labelSetMnemonicWidget, + labelGetMnemonicWidget, KeyVal, labelGetMnemonicKeyval, + labelSetUseMarkup, + labelGetUseMarkup, + labelSetUseUnderline, + labelGetUseUnderline, labelGetText, + labelGetLabel, -- labelSetAttributes, labelSetPattern, Justification(..), labelSetJustify, + labelGetJustify, + labelGetLayout, labelSetLineWrap, + labelGetLineWrap, labelSetSelectable, labelGetSelectable, labelSelectRegion, + labelGetSelectionBounds, labelGetLayoutOffsets ) where import Monad (liftM) import FFI +import GObject (makeNewGObject) import Object (makeNewObject) {#import Hierarchy#} {#import Signal#} @@ -62,7 +74,7 @@ -- methods --- | create a new label widget +-- | Create a new label widget. -- labelNew :: Maybe String -> IO Label labelNew str = makeNewObject mkLabel $ liftM castPtr $ @@ -70,33 +82,39 @@ Nothing -> {#call label_new#} nullPtr (Just str) -> withUTFString str {#call label_new#} --- | set the text the label widget shows +-- | Set the text the label widget shows. -- labelSetText :: LabelClass l => l -> String -> IO () labelSetText l str = withUTFString str $ {#call label_set_text#} (toLabel l) +-- | The label is interpreted as including embedded underlines and/or Pango +-- markup depending on the markup and underline properties. +-- +labelSetLabel :: LabelClass l => l -> String -> IO () +labelSetLabel l str = + withUTFString str $ {#call label_set_label#} (toLabel l) + {- -- | Set the text attributes. -- -- labelSetAttributes :: LabelClass l => PangoAttrList -> IO () -} --- | set the label to a markup string +-- | Set the label to a markup string. -- labelSetMarkup :: LabelClass l => l -> Markup -> IO () labelSetMarkup l str = withUTFString str $ {#call label_set_markup#} (toLabel l) --- | set the label to a markup string and --- interpret keyboard accelerators +-- | Set the label to a markup string and interpret keyboard accelerators. -- labelSetMarkupWithMnemonic :: LabelClass l => l -> Markup -> IO () labelSetMarkupWithMnemonic l str = withUTFString str $ {#call label_set_markup_with_mnemonic#} (toLabel l) --- | underline parts of the text, odd indices of the --- list represent underlined parts +-- | Underline parts of the text, odd indices of the list represent underlined +-- parts. -- labelSetPattern :: LabelClass l => l -> [Int] -> IO () labelSetPattern l list = @@ -104,18 +122,36 @@ where str = concat $ zipWith replicate list (cycle ['_',' ']) --- | set the justification of the label +-- | Set the justification of the label. -- labelSetJustify :: LabelClass l => l -> Justification -> IO () labelSetJustify l j = {#call label_set_justify#} (toLabel l) ((fromIntegral.fromEnum) j) --- | set wether lines should be wrapped or truncated +-- | Get the justification of the label. +-- +labelGetJustify :: LabelClass l => l -> IO Justification +labelGetJustify l = + liftM (toEnum.fromIntegral) $ {#call unsafe label_get_justify#} (toLabel l) + +-- | Gets the "PangoLayout" used to display the label. +-- +labelGetLayout :: LabelClass l => l -> IO PangoLayout +labelGetLayout l = + makeNewGObject mkPangoLayout $ {#call unsafe label_get_layout#} (toLabel l) + +-- | Set wether lines should be wrapped (@True@) or truncated (@False@). -- labelSetLineWrap :: LabelClass l => l -> Bool -> IO () labelSetLineWrap l w = {#call label_set_line_wrap#} (toLabel l) (fromBool w) --- | get starting cooridinates of text rendering +-- | Returns whether lines in the label are automatically wrapped. +-- +labelGetLineWrap :: LabelClass l => l -> IO Bool +labelGetLineWrap l = liftM toBool $ + {#call unsafe label_get_line_wrap#} (toLabel l) + +-- | Get starting cooridinates of text rendering. -- labelGetLayoutOffsets :: LabelClass l => l -> IO (Int,Int) labelGetLayoutOffsets l = @@ -132,58 +168,112 @@ -- type KeyVal = {#type guint#} --- | get the keyval for the underlined character --- in the label +-- | Get the keyval for the underlined character in the label. -- labelGetMnemonicKeyval :: LabelClass l => l -> IO KeyVal labelGetMnemonicKeyval l = {#call unsafe label_get_mnemonic_keyval#} (toLabel l) --- | is the text selectable? +-- | Get whether the text selectable. -- labelGetSelectable :: LabelClass l => l -> IO Bool labelGetSelectable l = liftM toBool $ {#call unsafe label_get_selectable#} (toLabel l) --- | get the text stored in the label +-- | Sets whether the text of the label contains markup in Pango's text markup +-- language. +-- +labelSetUseMarkup :: LabelClass l => l -> Bool -> IO () +labelSetUseMarkup l useMarkup = + {#call label_set_use_markup#} (toLabel l) (fromBool useMarkup) + +-- | Returns whether the label's text is interpreted as marked up with the +-- Pango text markup language. +-- +labelGetUseMarkup :: LabelClass l => l -> IO Bool +labelGetUseMarkup l = liftM toBool $ + {#call unsafe label_get_use_markup#} (toLabel l) + +-- | If @True@, an underline in the text indicates the next character should +-- be used for the mnemonic accelerator key. +-- +labelSetUseUnderline :: LabelClass l => l -> Bool -> IO () +labelSetUseUnderline l useUnderline = + {#call label_set_use_underline#} (toLabel l) (fromBool useUnderline) + +-- | Returns whether an embedded underline in the label indicates a mnemonic. +-- +labelGetUseUnderline :: LabelClass l => l -> IO Bool +labelGetUseUnderline l = liftM toBool $ + {#call unsafe label_get_use_underline#} (toLabel l) + +-- | Get the text stored in the label. This does not include any embedded +-- underlines indicating mnemonics or Pango markup. -- labelGetText :: LabelClass l => l -> IO String labelGetText l = {#call unsafe label_get_text#} (toLabel l) >>= peekUTFString +-- | Get the text from a label widget including any embedded underlines +-- indicating mnemonics and Pango markup. +-- +labelGetLabel :: LabelClass l => l -> IO String +labelGetLabel l = {#call unsafe label_get_label#} (toLabel l) >>= peekUTFString --- | Create a new label widget with --- accelerator key. +-- | Create a new label widget with accelerator key. -- --- * Each underscore in @str@ is converted into an underlined --- character in the label. Entering this character will activate the label --- widget or any other widget set with 'labelSetMnemonicWidget'. +-- * Each underscore in @str@ is converted into an underlined character in the +-- label. Entering this character will activate the label widget or any other +-- widget set with 'labelSetMnemonicWidget'. -- labelNewWithMnemonic :: String -> IO Label labelNewWithMnemonic str = makeNewObject mkLabel $ liftM castPtr $ withUTFString str {#call label_new_with_mnemonic#} --- | select a region in label +-- | Select a region in the label. -- labelSelectRegion :: LabelClass l => l -> Int -> Int -> IO () labelSelectRegion l start end = {#call label_select_region#} (toLabel l) (fromIntegral start) (fromIntegral end) +-- | Gets the selected range of characters in the label, if any. If there is +-- a range selected the result is the start and end of the selection as +-- character offsets. +-- +labelGetSelectionBounds :: LabelClass l => l -> IO (Maybe (Int, Int)) +labelGetSelectionBounds l = + alloca $ \startPtr -> alloca $ \endPtr -> do + isSelection <- + {#call unsafe label_get_selection_bounds#} (toLabel l) startPtr endPtr + if toBool isSelection + then do start <- peek startPtr + end <- peek endPtr + return $ Just $ (fromIntegral start, fromIntegral end) + else return Nothing --- | set an explicit widget for which to emit --- the mnemonic_activate signal if an underlined character is pressed +-- | Set an explicit widget for which to emit the \"mnemonic_activate\" signal +-- if an underlined character is pressed. -- labelSetMnemonicWidget :: (LabelClass l, WidgetClass w) => l -> w -> IO () labelSetMnemonicWidget l w = {#call unsafe label_set_mnemonic_widget#} (toLabel l) (toWidget w) --- | make a label text selectable +-- | Retrieves the target of the mnemonic (keyboard shortcut) of this label, +-- or Nothing if none has been set and the default algorithm will be used. +-- +labelGetMnemonicWidget :: LabelClass l => l -> IO (Maybe Widget) +labelGetMnemonicWidget l = do + widgetPtr <- {#call unsafe label_get_mnemonic_widget#} (toLabel l) + if widgetPtr == nullPtr + then return Nothing + else liftM Just $ makeNewObject mkWidget (return widgetPtr) + +-- | Make a label text selectable. -- labelSetSelectable :: LabelClass l => l -> Bool -> IO () labelSetSelectable l s = {#call unsafe label_set_selectable#} (toLabel l) (fromBool s) --- | set the label to a markup string and --- interpret keyboard accelerators +-- | Set the label to a markup string and interpret keyboard accelerators. -- labelSetTextWithMnemonic :: LabelClass l => l -> String -> IO () labelSetTextWithMnemonic l str = |
From: Duncan C. <dun...@us...> - 2004-08-01 16:08:37
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/abstract In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18039/gtk/abstract Modified Files: Misc.chs Paned.chs Range.chs Scale.chs api.ignore Log Message: Add missing functions. Update api.ignore files with more deprecated functions. Also fix a couple typo bugs and tidy up some documentation. Index: Range.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/abstract/Range.chs,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Range.chs 23 May 2004 15:46:02 -0000 1.5 +++ Range.chs 1 Aug 2004 16:08:14 -0000 1.6 @@ -31,10 +31,15 @@ rangeGetAdjustment, UpdateType(..), rangeSetUpdatePolicy, + rangeGetUpdatePolicy, rangeSetAdjustment, rangeGetInverted, rangeSetInverted, ScrollType(..), + rangeSetIncrements, + rangeSetRange, + rangeSetValue, + rangeGetValue, onMoveSlider, afterMoveSlider ) where @@ -57,20 +62,24 @@ rangeGetAdjustment r = makeNewObject mkAdjustment $ {#call unsafe range_get_adjustment#} (toRange r) --- | Set how the internal 'Adjustment' --- object is updated. +-- | Set how the internal 'Adjustment' object is updated. -- rangeSetUpdatePolicy :: RangeClass r => r -> UpdateType -> IO () rangeSetUpdatePolicy r up = {#call range_set_update_policy#} (toRange r) ((fromIntegral.fromEnum) up) +-- | Get the update policy for the range widget. +-- +rangeGetUpdatePolicy :: RangeClass r => r -> IO UpdateType +rangeGetUpdatePolicy r = liftM (toEnum.fromIntegral) $ + {#call unsafe range_get_update_policy#} (toRange r) + -- | Insert a new 'Adjustment' object. -- rangeSetAdjustment :: RangeClass r => r -> Adjustment -> IO () rangeSetAdjustment r adj = {#call range_set_adjustment#} (toRange r) adj --- | Get the inverted flag (determines if the range is --- reversed). +-- | Get the inverted flag (determines if the range is reversed). -- rangeGetInverted :: RangeClass r => r -> IO Bool rangeGetInverted r = @@ -81,6 +90,43 @@ rangeSetInverted :: RangeClass r => r -> Bool -> IO () rangeSetInverted r inv = {#call range_set_inverted#} (toRange r) (fromBool inv) +-- | Sets the step and page sizes for the range. The step size is used when the +-- user clicks the "Scrollbar" arrows or moves "Scale" via arrow keys. The +-- page size is used for example when moving via Page Up or Page Down keys. +-- +rangeSetIncrements :: RangeClass r => r + -> Double -- ^ step size + -> Double -- ^ page size + -> IO () +rangeSetIncrements r step page = + {#call range_set_increments#} (toRange r) (realToFrac step) (realToFrac page) + +-- | Sets the allowable values in the 'Range', and clamps the range value to be +-- between min and max. +-- +rangeSetRange :: RangeClass r => r + -> Double -- ^ min + -> Double -- ^ max + -> IO () +rangeSetRange r min max = + {#call range_set_range#} (toRange r) (realToFrac min) (realToFrac max) + +-- | Sets the current value of the range. The range emits the \"value_changed\" +-- signal if the value changes. +-- +-- * If the value is outside the minimum or maximum range values, it will be +-- clamped to fit inside them. +-- +rangeSetValue :: RangeClass r => r -> Double -> IO () +rangeSetValue r value = + {#call range_set_value#} (toRange r) (realToFrac value) + +-- | Gets the current value of the range. +-- +rangeGetValue :: RangeClass r => r -> IO Double +rangeGetValue r = liftM realToFrac $ + {#call unsafe range_get_value#} (toRange r) + -- signals -- | The slide has moved. The arguments give Index: Paned.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/abstract/Paned.chs,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Paned.chs 23 May 2004 15:46:02 -0000 1.5 +++ Paned.chs 1 Aug 2004 16:08:14 -0000 1.6 @@ -1,3 +1,4 @@ +{-# OPTIONS -cpp #-} -- -*-haskell-*- -- GIMP Toolkit (GTK) Widget Paned -- @@ -25,6 +26,7 @@ -- used by the user to divide the given space between two widgets. The two -- concrete implementations are HPaned and VPaned. -- +#include <gtk/gtkversion.h> module Paned( Paned, @@ -36,6 +38,10 @@ panedPack2, panedSetPosition, panedGetPosition +#if GTK_CHECK_VERSION(2,4,0) + ,panedGetChild1, + panedGetChild2 +#endif ) where import Monad (liftM) @@ -51,36 +57,31 @@ -- | Add a widget to the first (top or left) area. -- --- * The widget does not expand if 'Paned' expands. It does not --- shrink either. +-- * The widget does not expand if 'Paned' expands. It does not shrink either. -- panedAdd1 :: (PanedClass p, WidgetClass w) => p -> w -> IO () panedAdd1 p w = {#call paned_add1#} (toPaned p) (toWidget w) -- | Add a widget to the second (bottom or right) area. -- --- * The widget does not expand if 'Paned' expands. But it does --- shrink. +-- * The widget does not expand if 'Paned' expands. But it does shrink. -- panedAdd2 :: (PanedClass p, WidgetClass w) => p -> w -> IO () panedAdd2 p w = {#call paned_add2#} (toPaned p) (toWidget w) --- | Add a widget to the first area and specify its resizing --- behaviour. +-- | Add a widget to the first area and specify its resizing behaviour. -- panedPack1 :: (PanedClass p, WidgetClass w) => p -> w -> Bool -> Bool -> IO () panedPack1 p w expand shrink = {#call paned_pack1#} (toPaned p) (toWidget w) (fromBool expand) (fromBool shrink) --- | Add a widget to the second area and specify its --- resizing behaviour. +-- | Add a widget to the second area and specify its resizing behaviour. -- panedPack2 :: (PanedClass p, WidgetClass w) => p -> w -> Bool -> Bool -> IO () panedPack2 p w expand shrink = {#call paned_pack2#} (toPaned p) (toWidget w) (fromBool expand) (fromBool shrink) --- | Set the gutter to the specified --- @position@ (in pixels). +-- | Set the gutter to the specified @position@ (in pixels). -- panedSetPosition :: PanedClass p => p -> Int -> IO () panedSetPosition p position = @@ -91,3 +92,17 @@ panedGetPosition :: PanedClass p => p -> IO Int panedGetPosition p = liftM fromIntegral $ {#call unsafe paned_get_position#} (toPaned p) + +#if GTK_CHECK_VERSION(2,4,0) +-- | Obtains the first child of the paned widget. +-- +panedGetChild1 :: PanedClass p => p -> IO Widget +panedGetChild1 p = + makeNewObject mkWidget $ {#call unsafe paned_get_child1#} (toPaned p) + +-- | Obtains the second child of the paned widget. +-- +panedGetChild2 :: PanedClass p => p -> IO Widget +panedGetChild2 p = + makeNewObject mkWidget $ {#call unsafe paned_get_child2#} (toPaned p) +#endif Index: Misc.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/abstract/Misc.chs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Misc.chs 23 May 2004 15:46:02 -0000 1.4 +++ Misc.chs 1 Aug 2004 16:08:14 -0000 1.5 @@ -28,7 +28,9 @@ MiscClass, castToMisc, miscSetAlignment, - miscSetPadding + miscGetAlignment, + miscSetPadding, + miscGetPadding ) where import Monad (liftM) @@ -49,10 +51,29 @@ miscSetAlignment misc xalign yalign = {#call misc_set_alignment#} (toMisc misc) (realToFrac xalign) (realToFrac yalign) +-- | Get the alignment of the widget. +-- +miscGetAlignment :: MiscClass m => m -> IO (Double, Double) +miscGetAlignment misc = + alloca $ \xalignPtr -> alloca $ \yalignPtr -> do + {#call unsafe misc_get_alignment#} (toMisc misc) xalignPtr yalignPtr + xalign <- peek xalignPtr + yalign <- peek yalignPtr + return (realToFrac xalign, realToFrac yalign) -- | Set the amount of space to add around the widget. -- miscSetPadding :: MiscClass m => m -> Int -> Int -> IO () miscSetPadding misc xpad ypad = {#call misc_set_padding#} (toMisc misc) (fromIntegral xpad) (fromIntegral ypad) - + +-- | Get the amount of space added around the widget. +-- +miscGetPadding :: MiscClass m => m -> IO (Int, Int) +miscGetPadding misc = + alloca $ \xpadPtr -> alloca $ \ypadPtr -> do + {#call unsafe misc_get_padding#} (toMisc misc) xpadPtr ypadPtr + xpad <- peek xpadPtr + ypad <- peek ypadPtr + return (fromIntegral xpad, fromIntegral ypad) + Index: Scale.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/abstract/Scale.chs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Scale.chs 23 May 2004 15:46:02 -0000 1.4 +++ Scale.chs 1 Aug 2004 16:08:14 -0000 1.5 @@ -30,9 +30,12 @@ ScaleClass, castToScale, scaleSetDigits, + scaleGetDigits, scaleSetDrawValue, + scaleGetDrawValue, PositionType(..), - scaleSetValuePos + scaleSetValuePos, + scaleGetValuePos ) where import Monad (liftM) @@ -53,18 +56,33 @@ scaleSetDigits s prec = {#call scale_set_digits#} (toScale s) (fromIntegral prec) --- | Specify if the current value is to be drawn next --- to the slider. +-- | Get the number of displayed digits after the comma. +-- +scaleGetDigits :: ScaleClass s => s -> IO Int +scaleGetDigits s = + liftM fromIntegral $ {#call unsafe scale_get_digits#} (toScale s) + +-- | Specify if the current value is to be drawn next to the slider. -- scaleSetDrawValue :: ScaleClass s => s -> Bool -> IO () scaleSetDrawValue s draw = {#call scale_set_draw_value#} (toScale s) (fromBool draw) --- | Specify where the value is to be displayed --- (relative to the slider). +-- | Returns whether the current value is drawn next to the slider. +-- +scaleGetDrawValue :: ScaleClass s => s -> IO Bool +scaleGetDrawValue s = + liftM toBool $ {#call unsafe scale_get_draw_value#} (toScale s) + +-- | Specify where the value is to be displayed (relative to the slider). -- scaleSetValuePos :: ScaleClass s => s -> PositionType -> IO () scaleSetValuePos s pos = {#call scale_set_value_pos#} (toScale s) ((fromIntegral.fromEnum) pos) +-- | Gets the position in which the current value is displayed. +-- +scaleGetValuePos :: ScaleClass s => s -> IO PositionType +scaleGetValuePos s = + liftM (toEnum.fromIntegral) $ {#call unsafe scale_get_value_pos#} (toScale s) Index: api.ignore =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/abstract/api.ignore,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- api.ignore 30 Jul 2004 16:46:55 -0000 1.1 +++ api.ignore 1 Aug 2004 16:08:14 -0000 1.2 @@ -18,3 +18,29 @@ #somewhat internal api exclude gtk_container_child do not exclude gtk_container_child_[sg]et_property + +#internal function +exclude gtk_paned_compute_position + +#deprecated widget functions +exclude gtk_widget_set$ +exclude gtk_widget_draw$ +exclude gtk_widget_set_uposition +exclude gtk_widget_set_usize +exclude gtk_widget_queue_clear +exclude gtk_widget_queue_clear_area + +#only for widget implementations +exclude gtk_widget_unparent +exclude gtk_widget_map +exclude gtk_widget_unmap +exclude gtk_widget_realize +exclude gtk_widget_unrealize +exclude gtk_widget_queue_resize +exclude gtk_widget_get_child_requisition +exclude gtk_widget_set_state +exclude gtk_widget_queue_draw_area #TODO: might we want this one? +exclude gtk_widget_child_focus +exclude gtk_widget_get_child_visible +exclude gtk_widget_set_child_visible + |
From: Duncan C. <dun...@us...> - 2004-08-01 16:08:37
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/scrolling In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18039/gtk/scrolling Modified Files: ScrolledWindow.chs Log Message: Add missing functions. Update api.ignore files with more deprecated functions. Also fix a couple typo bugs and tidy up some documentation. Index: ScrolledWindow.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/scrolling/ScrolledWindow.chs,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ScrolledWindow.chs 23 May 2004 16:14:09 -0000 1.7 +++ ScrolledWindow.chs 1 Aug 2004 16:08:14 -0000 1.8 @@ -38,11 +38,14 @@ scrolledWindowGetVAdjustment, PolicyType(..), scrolledWindowSetPolicy, + scrolledWindowGetPolicy, scrolledWindowAddWithViewport, CornerType(..), scrolledWindowSetPlacement, + scrolledWindowGetPlacement, ShadowType(..), scrolledWindowSetShadowType, + scrolledWindowGetShadowType, scrolledWindowSetHAdjustment, scrolledWindowSetVAdjustment, ) where @@ -69,22 +72,20 @@ fromMAdj :: Maybe Adjustment -> Adjustment fromMAdj = fromMaybe $ mkAdjustment nullForeignPtr --- | Retrieve the horizontal --- 'Adjustment' of the 'ScrolledWindow'. +-- | Retrieve the horizontal 'Adjustment' of the 'ScrolledWindow'. -- scrolledWindowGetHAdjustment :: ScrolledWindowClass w => w -> IO Adjustment scrolledWindowGetHAdjustment w = makeNewObject mkAdjustment $ {#call unsafe scrolled_window_get_hadjustment#} (toScrolledWindow w) --- | Retrieve the vertical --- 'Adjustment' of the 'ScrolledWindow'. +-- | Retrieve the vertical 'Adjustment' of the 'ScrolledWindow'. -- scrolledWindowGetVAdjustment :: ScrolledWindowClass w => w -> IO Adjustment scrolledWindowGetVAdjustment w = makeNewObject mkAdjustment $ {#call unsafe scrolled_window_get_vadjustment#} (toScrolledWindow w) --- | Specify if the scrollbars should vanish if --- the child size is sufficiently small. +-- | Specify if the scrollbars should vanish if the child size is sufficiently +-- small. -- scrolledWindowSetPolicy :: ScrolledWindowClass w => w -> PolicyType -> PolicyType -> IO () @@ -92,8 +93,21 @@ (toScrolledWindow w) ((fromIntegral.fromEnum) hPol) ((fromIntegral.fromEnum) vPol) --- | Add a child widget without native --- scrolling support to this 'ScrolledWindow'. +-- | Retrieves the current policy values for the horizontal and vertical +-- scrollbars. +-- +scrolledWindowGetPolicy :: ScrolledWindowClass w => w + -> IO (PolicyType, PolicyType) +scrolledWindowGetPolicy w = + alloca $ \hPolPtr -> alloca $ \vPolPtr -> do + {#call unsafe scrolled_window_get_policy#} (toScrolledWindow w) + hPolPtr vPolPtr + hPol <- liftM (toEnum.fromIntegral) $ peek hPolPtr + vPol <- liftM (toEnum.fromIntegral) $ peek vPolPtr + return (hPol, vPol) + +-- | Add a child widget without native scrolling support to this +-- 'ScrolledWindow'. -- scrolledWindowAddWithViewport :: (ScrolledWindowClass w, WidgetClass wid) => w -> wid -> IO () @@ -101,36 +115,44 @@ {#call scrolled_window_add_with_viewport#} (toScrolledWindow w) (toWidget wid) --- | Specify where the scrollbars should be --- placed. +-- | Specify where the scrollbars should be placed. -- scrolledWindowSetPlacement :: ScrolledWindowClass w => w -> CornerType -> IO () scrolledWindowSetPlacement w ct = {#call scrolled_window_set_placement#} (toScrolledWindow w) ((fromIntegral.fromEnum) ct) --- | Specify if and how an outer frame --- should be drawn around the child. +-- | Gets the placement of the scrollbars for the scrolled window. +-- +scrolledWindowGetPlacement :: ScrolledWindowClass w => w -> IO CornerType +scrolledWindowGetPlacement w = liftM (toEnum.fromIntegral) $ + {#call unsafe scrolled_window_get_placement#} (toScrolledWindow w) + +-- | Specify if and how an outer frame should be drawn around the child. -- scrolledWindowSetShadowType :: ScrolledWindowClass w => w -> ShadowType -> IO () scrolledWindowSetShadowType w st = {#call scrolled_window_set_shadow_type#} (toScrolledWindow w) ((fromIntegral.fromEnum) st) --- | Set the horizontal --- 'Adjustment' of the 'ScrolledWindow'. +-- | Gets the shadow type of the scrolled window. +-- +scrolledWindowGetShadowType :: ScrolledWindowClass w => w -> IO ShadowType +scrolledWindowGetShadowType w = liftM (toEnum.fromIntegral) $ + {#call unsafe scrolled_window_get_shadow_type#} (toScrolledWindow w) + +-- | Set the horizontal 'Adjustment' of the 'ScrolledWindow'. -- scrolledWindowSetHAdjustment :: ScrolledWindowClass w => w -> Adjustment -> IO () scrolledWindowSetHAdjustment w adj = {#call scrolled_window_set_hadjustment#} (toScrolledWindow w) adj --- | Set the vertical 'Adjustment' --- of the 'ScrolledWindow'. +-- | Set the vertical 'Adjustment' of the 'ScrolledWindow'. -- scrolledWindowSetVAdjustment :: ScrolledWindowClass w => w -> Adjustment -> IO () -scrolledWindowSetVAdjustment w adj = {#call scrolled_window_set_hadjustment#} +scrolledWindowSetVAdjustment w adj = {#call scrolled_window_set_vadjustment#} (toScrolledWindow w) adj |
From: Duncan C. <dun...@us...> - 2004-08-01 16:08:37
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/treeList In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18039/gtk/treeList Modified Files: ListStore.chs api.ignore Log Message: Add missing functions. Update api.ignore files with more deprecated functions. Also fix a couple typo bugs and tidy up some documentation. Index: ListStore.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/treeList/ListStore.chs,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- ListStore.chs 23 May 2004 16:16:43 -0000 1.12 +++ ListStore.chs 1 Aug 2004 16:08:14 -0000 1.13 @@ -24,6 +24,7 @@ -- -- The database for simple (non-hierarchical) tables. -- +#include <gtk/gtkversion.h> module ListStore( ListStore, @@ -38,9 +39,15 @@ listStorePrepend, listStoreAppend, listStoreClear +#if GTK_CHECK_VERSION(2,2,0) + ,listStoreReorder, + listStoreSwap, + listStoreMoveBefore, + listStoreMoveAfter +#endif ) where -import Monad (liftM) +import Monad (liftM, when) import Maybe (fromMaybe) import FFI @@ -55,9 +62,6 @@ {# context lib="gtk" prefix="gtk" #} --- Let's hope this file will always only contain macros. -#include<gtk/gtkversion.h> - -- methods -- | Generate a new entity to store tree information. @@ -165,3 +169,57 @@ -- listStoreClear :: (ListStoreClass ts) => ts -> IO () listStoreClear = {#call list_store_clear#}.toListStore + +#if GTK_CHECK_VERSION(2,2,0) +-- | Reorders store to follow the order indicated by the mapping. The list +-- argument should be a mapping from the /new/ positions to the /old/ +-- positions. That is @newOrder !! newPos = oldPos@ +-- +-- * Note that this function only works with unsorted stores. +-- +-- * You must make sure the mapping is the right size for the store, use +-- @'treeModelIterNChildren' store Nothing@ to check. +-- +listStoreReorder :: (ListStoreClass ts) => ts -> [Int] -> IO () +listStoreReorder ts newOrder = do + --check newOrder is the right length or it'll overrun + storeLength <- treeModelIterNChildren ts Nothing + when (storeLength /= length newOrder) + (fail "ListStore.listStoreReorder: mapping wrong length for store") + withArray (map fromIntegral newOrder) $ \newOrderArrPtr -> + {#call list_store_reorder#} (toListStore ts) newOrderArrPtr + +-- | Swaps the two items in the store. +-- +-- * Note that this function only works with unsorted stores. +-- +listStoreSwap :: (ListStoreClass ts) => ts -> TreeIter -> TreeIter -> IO () +listStoreSwap ts a b = + {#call list_store_swap#} (toListStore ts) a b + +-- | Moves the item in the store to before the given position. If the position +-- is @Nothing@ the item will be moved to then end of the list. +-- +-- * Note that this function only works with unsorted stores. +-- +listStoreMoveBefore :: (ListStoreClass ts) => ts + -> TreeIter -- ^ Iter for the item to be moved + -> Maybe TreeIter -- ^ Iter for the position or @Nothing@. + -> IO () +listStoreMoveBefore ts iter maybePosition = + {#call list_store_move_before#} (toListStore ts) iter + (fromMaybe (TreeIter nullForeignPtr) maybePosition) + +-- | Moves the item in the store to after the given position. If the position +-- is @Nothing@ the item will be moved to then start of the list. +-- +-- * Note that this function only works with unsorted stores. +-- +listStoreMoveAfter :: (ListStoreClass ts) => ts + -> TreeIter -- ^ Iter for the item to be moved + -> Maybe TreeIter -- ^ Iter for the position or @Nothing@. + -> IO () +listStoreMoveAfter ts iter maybePosition = + {#call list_store_move_after#} (toListStore ts) iter + (fromMaybe (TreeIter nullForeignPtr) maybePosition) +#endif Index: api.ignore =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/treeList/api.ignore,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- api.ignore 30 Jul 2004 16:46:54 -0000 1.1 +++ api.ignore 1 Aug 2004 16:08:14 -0000 1.2 @@ -20,3 +20,11 @@ #a bit specialised, we dont need it exclude gtk_cell_renderer_text_set_fixed_height_from_font +#vararg constructor func, we use newv instead +always exclude gtk_list_store_new$ + +#vararg set function +always exclude gtk_list_store_set + +#debugging function +always exclude gtk_list_store_iter_is_valid |
From: Duncan C. <dun...@us...> - 2004-08-01 16:08:36
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/windows In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18039/gtk/windows Modified Files: api.ignore Log Message: Add missing functions. Update api.ignore files with more deprecated functions. Also fix a couple typo bugs and tidy up some documentation. Index: api.ignore =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/windows/api.ignore,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- api.ignore 30 Jul 2004 16:46:55 -0000 1.1 +++ api.ignore 1 Aug 2004 16:08:15 -0000 1.2 @@ -9,3 +9,7 @@ #can't bind varargs functions, they are only for convenience anyway exclude gtk_dialog_add_buttons exclude gtk_dialog_new_with_buttons + +#we do not call this directly because it has varargs +#instead we simulate the call +exclude gtk_file_chooser_dialog_new |
From: Duncan C. <dun...@us...> - 2004-08-01 16:08:26
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/entry In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18039/gtk/entry Modified Files: SpinButton.chs Log Message: Add missing functions. Update api.ignore files with more deprecated functions. Also fix a couple typo bugs and tidy up some documentation. Index: SpinButton.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/entry/SpinButton.chs,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- SpinButton.chs 30 Jul 2004 16:32:01 -0000 1.6 +++ SpinButton.chs 1 Aug 2004 16:08:13 -0000 1.7 @@ -21,12 +21,9 @@ -- -- | -- --- * A spin button provides the possiblity to enter a numeric value without --- using the keyboard. --- --- +-- A spin button provides the possiblity to enter a numeric value without using +-- the keyboard. -- --- * TODO module SpinButton( SpinButton, @@ -38,18 +35,25 @@ spinButtonSetAdjustment, spinButtonGetAdjustment, spinButtonSetDigits, + spinButtonGetDigits, spinButtonSetIncrements, + spinButtonGetIncrements, spinButtonSetRange, + spinButtonGetRange, spinButtonGetValue, spinButtonGetValueAsInt, spinButtonSetValue, SpinButtonUpdatePolicy(..), spinButtonSetUpdatePolicy, + spinButtonGetUpdatePolicy, spinButtonSetNumeric, + spinButtonGetNumeric, SpinType(..), spinButtonSpin, spinButtonSetWrap, + spinButtonGetWrap, spinButtonSetSnapToTicks, + spinButtonGetSnapToTicks, spinButtonUpdate, onInput, afterInput, @@ -126,6 +130,12 @@ spinButtonSetDigits sb digits = {#call spin_button_set_digits#} (toSpinButton sb) (fromIntegral digits) +-- | Gets the number of digits shown. +-- +spinButtonGetDigits :: SpinButtonClass sb => sb -> IO Int +spinButtonGetDigits sb = liftM fromIntegral $ + {#call spin_button_get_digits#} (toSpinButton sb) + -- | Sets the increment for up\/down buttons. -- spinButtonSetIncrements :: SpinButtonClass sb => sb -> Double -> Double -> @@ -133,13 +143,32 @@ spinButtonSetIncrements sb step page = {#call spin_button_set_increments#} (toSpinButton sb) (realToFrac step) (realToFrac page) --- | Set the maximal allowable range for the --- spinbutton. +-- | Sets the increment for up\/down buttons. +-- +spinButtonGetIncrements :: SpinButtonClass sb => sb -> IO (Double, Double) +spinButtonGetIncrements sb = + alloca $ \stepPtr -> alloca $ \pagePtr -> do + {#call unsafe spin_button_get_increments#} (toSpinButton sb) stepPtr pagePtr + step <- peek stepPtr + page <- peek pagePtr + return (realToFrac step, realToFrac page) + +-- | Set the maximal allowable range for the spinbutton. -- spinButtonSetRange :: SpinButtonClass sb => sb -> Double -> Double -> IO () spinButtonSetRange sb min max = {#call spin_button_set_range#} (toSpinButton sb) (realToFrac min) (realToFrac max) +-- | Get the maximal allowable range for the spinbutton. +-- +spinButtonGetRange :: SpinButtonClass sb => sb -> IO (Double, Double) +spinButtonGetRange sb = + alloca $ \minPtr -> alloca $ \maxPtr -> do + {#call unsafe spin_button_get_range#} (toSpinButton sb) minPtr maxPtr + min <- peek minPtr + max <- peek maxPtr + return (realToFrac min, realToFrac max) + -- | Retrieve the current value as a floating point -- value. -- @@ -160,45 +189,68 @@ spinButtonSetValue sb value = {#call spin_button_set_value#} (toSpinButton sb) (realToFrac value) --- | Whether the an out-of-range value set by --- 'spinButtonSetValue' is clamped to the limits or simply ignored. +-- | Whether the an out-of-range value set by 'spinButtonSetValue' is clamped to +-- the limits or simply ignored. -- spinButtonSetUpdatePolicy :: SpinButtonClass sb => sb -> SpinButtonUpdatePolicy -> IO () spinButtonSetUpdatePolicy sb up = {#call spin_button_set_update_policy#} (toSpinButton sb) ((fromIntegral.fromEnum) up) --- | Sets the flag that determines if non-numeric --- text can be typed into the spin button. +-- | Gets the update behavior of a spin button. See 'spinButtonSetUpdatePolicy'. +-- +spinButtonGetUpdatePolicy :: SpinButtonClass sb => sb + -> IO SpinButtonUpdatePolicy +spinButtonGetUpdatePolicy sb = liftM (toEnum.fromIntegral) $ + {#call unsafe spin_button_get_update_policy#} (toSpinButton sb) + +-- | Sets the flag that determines if non-numeric text can be typed into the +-- spin button. -- spinButtonSetNumeric :: SpinButtonClass sb => sb -> Bool -> IO () spinButtonSetNumeric sb numeric = {#call spin_button_set_numeric#} (toSpinButton sb) (fromBool numeric) --- | Increment or decrement the current value of the --- SpinButton. +-- | Returns whether non-numeric text can be typed into the spin button. +-- +spinButtonGetNumeric :: SpinButtonClass sb => sb -> IO Bool +spinButtonGetNumeric sb = + liftM toBool $ {#call unsafe spin_button_get_numeric#} (toSpinButton sb) + +-- | Increment or decrement the current value of the SpinButton. -- spinButtonSpin :: SpinButtonClass sb => sb -> SpinType -> Double -> IO () spinButtonSpin sb st offset = {#call spin_button_spin#} (toSpinButton sb) ((fromIntegral.fromEnum) st) (realToFrac offset) --- | Sets the flag that determines if a spin button --- value wraps around to the opposite limit when the upper or lower limit of --- the range is exceeded. +-- | Sets the flag that determines if a spin button value wraps around to the +-- opposite limit when the upper or lower limit of the range is exceeded. -- spinButtonSetWrap :: SpinButtonClass sb => sb -> Bool -> IO () spinButtonSetWrap sb wrap = {#call spin_button_set_wrap#} (toSpinButton sb) (fromBool wrap) --- | Sets the policy as to whether values are --- corrected to the nearest step increment when a spin button is activated --- after providing an invalid value. +-- | Returns whether the spin button's value wraps around to the opposite limit +-- when the upper or lower limit of the range is exceeded. +-- +spinButtonGetWrap :: SpinButtonClass sb => sb -> IO Bool +spinButtonGetWrap sb = + liftM toBool $ {#call spin_button_get_wrap#} (toSpinButton sb) + +-- | Sets the policy as to whether values are corrected to the nearest step +-- increment when a spin button is activated after providing an invalid value. -- spinButtonSetSnapToTicks :: SpinButtonClass sb => sb -> Bool -> IO () spinButtonSetSnapToTicks sb snapToTicks = {#call spin_button_set_snap_to_ticks#} (toSpinButton sb) (fromBool snapToTicks) +-- | Returns whether the values are corrected to the nearest step. +-- +spinButtonGetSnapToTicks :: SpinButtonClass sb => sb -> IO Bool +spinButtonGetSnapToTicks sb = liftM toBool $ + {#call unsafe spin_button_get_snap_to_ticks#} (toSpinButton sb) + -- | Force an update of the SpinButton. -- spinButtonUpdate :: SpinButtonClass sb => sb -> IO () |
From: Duncan C. <dun...@us...> - 2004-08-01 16:08:25
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/layout In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18039/gtk/layout Modified Files: Table.chs Layout.chs api.ignore Log Message: Add missing functions. Update api.ignore files with more deprecated functions. Also fix a couple typo bugs and tidy up some documentation. Index: Layout.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/layout/Layout.chs,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Layout.chs 23 May 2004 16:02:58 -0000 1.6 +++ Layout.chs 1 Aug 2004 16:08:13 -0000 1.7 @@ -32,6 +32,7 @@ layoutPut, layoutMove, layoutSetSize, + layoutGetSize, layoutGetHAdjustment, layoutGetVAdjustment, layoutSetHAdjustment, @@ -80,15 +81,23 @@ layoutSetSize l width height = {#call layout_set_size#} (toLayout l) (fromIntegral width) (fromIntegral height) --- | Retrieve the horizontal 'Adjustment' --- object from the layout. +-- | Get the size of the layout widget. +-- +layoutGetSize :: LayoutClass l => l -> IO (Int, Int) +layoutGetSize l = + alloca $ \widthPtr -> alloca $ \heightPtr -> do + {#call unsafe layout_get_size#} (toLayout l) widthPtr heightPtr + width <-peek widthPtr + height <- peek heightPtr + return (fromIntegral width, fromIntegral height) + +-- | Retrieve the horizontal 'Adjustment' object from the layout. -- layoutGetHAdjustment :: LayoutClass l => l -> IO Adjustment layoutGetHAdjustment l = makeNewObject mkAdjustment $ {#call unsafe layout_get_hadjustment#} (toLayout l) --- | Retrieve the vertical 'Adjustment' --- object from the layout. +-- | Retrieve the vertical 'Adjustment' object from the layout. -- layoutGetVAdjustment :: LayoutClass l => l -> IO Adjustment layoutGetVAdjustment l = makeNewObject mkAdjustment $ Index: api.ignore =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/layout/api.ignore,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- api.ignore 30 Jul 2004 16:46:56 -0000 1.1 +++ api.ignore 1 Aug 2004 16:08:13 -0000 1.2 @@ -2,3 +2,7 @@ #deprecated button box functions exclude gtk_[hv]button_box_[gs]et_spacing_default exclude gtk_[hv]button_box_[gs]et_layout_default + +#deprecated layout functions +exclude gtk_layout_thaw +exclude gtk_layout_freeze Index: Table.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/layout/Table.chs,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Table.chs 23 May 2004 16:02:58 -0000 1.5 +++ Table.chs 1 Aug 2004 16:08:13 -0000 1.6 @@ -34,10 +34,15 @@ tableAttach, tableAttachDefaults, tableSetRowSpacing, + tableGetRowSpacing, tableSetColSpacing, + tableGetColSpacing, tableSetRowSpacings, + tableGetDefaultRowSpacing, tableSetColSpacings, - tableSetHomogeneous + tableGetDefaultColSpacing, + tableSetHomogeneous, + tableGetHomogeneous ) where import Monad (liftM) @@ -66,9 +71,9 @@ tableResize tb rows columns = {#call table_resize#} (toTable tb) (fromIntegral rows) (fromIntegral columns) --- | Put a new widget in the table container. The widget --- should span the cells (leftAttach,topAttach) to (rightAttach,bottomAttach). --- Further formatting options have to be specified. +-- | Put a new widget in the table container. The widget should span the cells +-- (leftAttach,topAttach) to (rightAttach,bottomAttach). Further formatting +-- options have to be specified. -- tableAttach :: (TableClass tb, WidgetClass w) => tb -> w -> Int -> Int -> Int -> Int -> [AttachOptions] -> [AttachOptions] -> Int -> @@ -80,9 +85,8 @@ ((fromIntegral.fromFlags) xoptions) ((fromIntegral.fromFlags) yoptions) (fromIntegral xpadding) (fromIntegral ypadding) --- | Put a new widget in the table container. As --- opposed to 'tableAttach' this function assumes default values --- for the packing options. +-- | Put a new widget in the table container. As opposed to 'tableAttach' this +-- function assumes default values for the packing options. -- tableAttachDefaults :: (TableClass tb, WidgetClass w) => tb -> w -> Int -> Int -> Int -> Int -> IO () @@ -91,36 +95,72 @@ (fromIntegral leftAttach) (fromIntegral rightAttach) (fromIntegral topAttach) (fromIntegral bottomAttach) --- | Set the amount of space (in pixels) between the --- specified @row@ and its neighbours. +-- | Set the amount of space (in pixels) between the specified row and its +-- neighbours. -- -tableSetRowSpacing :: TableClass tb => tb -> Int -> Int -> IO () +tableSetRowSpacing :: TableClass tb => tb + -> Int -- ^ Row number, indexed from 0 + -> Int -- ^ Spacing size in pixels + -> IO () tableSetRowSpacing tb row space = {#call table_set_row_spacing#} (toTable tb) (fromIntegral row) (fromIntegral space) --- | Set the amount of space (in pixels) between the --- specified column @col@ and its neighbours. +-- | Get the amount of space (in pixels) between the specified row and the +-- next row. +-- +tableGetRowSpacing :: TableClass tb => tb -> Int -> IO Int +tableGetRowSpacing tb row = liftM fromIntegral $ + {#call unsafe table_get_row_spacing#} (toTable tb) (fromIntegral row) + +-- | Set the amount of space (in pixels) between the specified column and +-- its neighbours. -- tableSetColSpacing :: TableClass tb => tb -> Int -> Int -> IO () tableSetColSpacing tb col space = {#call table_set_col_spacing#} (toTable tb) (fromIntegral col) (fromIntegral space) +-- | Get the amount of space (in pixels) between the specified column and the +-- next column. +-- +tableGetColSpacing :: TableClass tb => tb -> Int -> IO Int +tableGetColSpacing tb col = liftM fromIntegral $ + {#call unsafe table_get_col_spacing#} (toTable tb) (fromIntegral col) + -- | Set the amount of space between any two rows. -- tableSetRowSpacings :: TableClass tb => tb -> Int -> IO () tableSetRowSpacings tb space = {#call table_set_row_spacings#} (toTable tb) (fromIntegral space) --- | Set the amount of space between any two --- columns. +-- | Gets the default row spacing for the table. This is the spacing that will +-- be used for newly added rows. +-- +tableGetDefaultRowSpacing :: TableClass tb => tb -> IO Int +tableGetDefaultRowSpacing tb = liftM fromIntegral $ + {#call unsafe table_get_default_row_spacing#} (toTable tb) + +-- | Set the amount of space between any two columns. -- tableSetColSpacings :: TableClass tb => tb -> Int -> IO () tableSetColSpacings tb space = {#call table_set_col_spacings#} (toTable tb) (fromIntegral space) +-- | Gets the default column spacing for the table. This is the spacing that +-- will be used for newly added columns. +-- +tableGetDefaultColSpacing :: TableClass tb => tb -> IO Int +tableGetDefaultColSpacing tb = liftM fromIntegral $ + {#call unsafe table_get_default_col_spacing#} (toTable tb) + -- | Make all cells the same size. -- tableSetHomogeneous :: TableClass tb => tb -> Bool -> IO () tableSetHomogeneous tb hom = {#call table_set_homogeneous#} (toTable tb) (fromBool hom) +-- | Returns whether the table cells are all constrained to the same width and +-- height. +-- +tableGetHomogeneous :: TableClass tb => tb -> IO Bool +tableGetHomogeneous tb = + liftM toBool $ {#call unsafe table_get_homogeneous#} (toTable tb) |
From: Duncan C. <dun...@us...> - 2004-08-01 16:08:25
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18039/gtk/misc Modified Files: Viewport.chs Tooltips.chs api.ignore Log Message: Add missing functions. Update api.ignore files with more deprecated functions. Also fix a couple typo bugs and tidy up some documentation. Index: Viewport.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/misc/Viewport.chs,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Viewport.chs 23 May 2004 16:07:53 -0000 1.6 +++ Viewport.chs 1 Aug 2004 16:08:13 -0000 1.7 @@ -42,7 +42,8 @@ viewportSetHAdjustment, viewportSetVAdjustment, ShadowType(..), - viewportSetShadowType + viewportSetShadowType, + viewportGetShadowType ) where import Monad (liftM) @@ -84,20 +85,24 @@ viewportSetHAdjustment v adj = {#call viewport_set_hadjustment#} (toViewport v) adj --- | Set the vertical 'Adjustment' of --- the 'Viewport'. +-- | Set the vertical 'Adjustment' of the 'Viewport'. -- viewportSetVAdjustment :: ViewportClass v => v -> Adjustment -> IO () -viewportSetVAdjustment v adj = {#call viewport_set_hadjustment#} +viewportSetVAdjustment v adj = {#call viewport_set_vadjustment#} (toViewport v) adj --- | Specify if and how an outer frame should be --- drawn around the child. +-- | Specify if and how an outer frame should be drawn around the child. -- viewportSetShadowType :: ViewportClass v => v -> ShadowType -> IO () viewportSetShadowType v st = {#call viewport_set_shadow_type#} (toViewport v) ((fromIntegral.fromEnum) st) +-- | Get the current shadow type of the 'Viewport'. +-- +viewportGetShadowType :: ViewportClass v => v -> IO ShadowType +viewportGetShadowType v = liftM (toEnum.fromIntegral) $ + {#call unsafe viewport_get_shadow_type#} (toViewport v) + -- signals Index: Tooltips.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/misc/Tooltips.chs,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Tooltips.chs 23 May 2004 16:07:53 -0000 1.6 +++ Tooltips.chs 1 Aug 2004 16:08:13 -0000 1.7 @@ -51,7 +51,8 @@ tooltipsEnable, tooltipsDisable, tooltipsSetDelay, - tooltipsSetTip + tooltipsSetTip, + tooltipsDataGet ) where import Monad (liftM) @@ -109,3 +110,20 @@ withUTFString tipText $ \txtPtr -> {#call unsafe tooltips_set_tip#} (toTooltips t) (toWidget w) txtPtr priPtr +{#pointer * TooltipsData#} + +-- | Retrieves any 'Tooltips' previously associated with the given widget. +-- +tooltipsDataGet :: WidgetClass w => w -> IO (Maybe (Tooltips, String, String)) +tooltipsDataGet w = do + tipDataPtr <- {#call unsafe tooltips_data_get#} (toWidget w) + if tipDataPtr == nullPtr + then return Nothing + else do --next line is a hack, tooltips struct member is at offset 0 + tooltips <- makeNewObject mkTooltips (return $ castPtr tipDataPtr) + tipText <- {#get TooltipsData->tip_text#} tipDataPtr + >>= peekUTFString + tipPrivate <- {#get TooltipsData->tip_private#} tipDataPtr + >>= peekUTFString + return $ Just $ (tooltips, tipText, tipPrivate) + Index: api.ignore =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/misc/api.ignore,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- api.ignore 30 Jul 2004 16:46:54 -0000 1.1 +++ api.ignore 1 Aug 2004 16:08:13 -0000 1.2 @@ -8,3 +8,10 @@ #as of 2.4 deprecated exclude gtk_calendar_display_options + +#deprecated +always exclude gtk_drawing_area_size + +#internal +exclude gtk_tooltips_force_window +exclude gtk_tooltips_get_info_from_tip_window |