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...> - 2005-04-07 01:19:47
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6480 Modified Files: ChangeLog Makefile.am Log Message: Remove gcc flag -Wextra since older gcc versions do not understand it. Index: Makefile.am =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/Makefile.am,v retrieving revision 1.66 retrieving revision 1.67 diff -u -d -r1.66 -r1.67 --- Makefile.am 7 Apr 2005 00:58:18 -0000 1.66 +++ Makefile.am 7 Apr 2005 01:19:38 -0000 1.67 @@ -248,7 +248,7 @@ # to #include <Rts.h> from GHC's include directory. glib/System/Glib/hsgclosure.o : glib/System/Glib/hsgclosure.c $(CC) -c $< -o $@ $(GLIB_CFLAGS) -I$(GHC_INCLUDEDIR) \ - -Wall -Wextra -Werror -Wno-unused-parameter + -Wall -Werror -Wno-unused-parameter am_libHSglib_a_OBJECTS = \ $(addsuffix .$(OBJEXT),$(basename $(basename $(libHSglib_a_SOURCES)))) Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.445 retrieving revision 1.446 diff -u -d -r1.445 -r1.446 --- ChangeLog 7 Apr 2005 00:58:18 -0000 1.445 +++ ChangeLog 7 Apr 2005 01:19:37 -0000 1.446 @@ -77,6 +77,9 @@ * Makefile.am: rename several modules to .pp (I swear I committed this before!) + * Makefile.am: remove gcc flag -Wextra since older gcc versions do not + understand it. + 2005-04-6 Duncan Coutts <du...@co...> * tools/callbackGen/gtkmarshal.list: tidy up slightly, and add |
From: Duncan C. <dun...@us...> - 2005-04-07 00:58:27
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28196 Modified Files: ChangeLog Makefile.am Log Message: Rename several modules to .pp (I swear I committed this before!) Index: Makefile.am =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/Makefile.am,v retrieving revision 1.65 retrieving revision 1.66 diff -u -d -r1.65 -r1.66 --- Makefile.am 6 Apr 2005 21:27:39 -0000 1.65 +++ Makefile.am 7 Apr 2005 00:58:18 -0000 1.66 @@ -323,14 +323,14 @@ gtk/Graphics/UI/Gtk/Abstract/Paned.chs.pp \ gtk/Graphics/UI/Gtk/Abstract/Range.chs \ gtk/Graphics/UI/Gtk/Abstract/Scale.chs \ - gtk/Graphics/UI/Gtk/Abstract/Widget.chs \ + gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp \ gtk/Graphics/UI/Gtk/Buttons/Button.chs.pp \ gtk/Graphics/UI/Gtk/Buttons/CheckButton.chs \ gtk/Graphics/UI/Gtk/Buttons/RadioButton.chs \ gtk/Graphics/UI/Gtk/Buttons/ToggleButton.chs \ gtk/Graphics/UI/Gtk/Display/AccelLabel.chs \ gtk/Graphics/UI/Gtk/Display/Image.chs.pp \ - gtk/Graphics/UI/Gtk/Display/Label.chs \ + gtk/Graphics/UI/Gtk/Display/Label.chs.pp \ gtk/Graphics/UI/Gtk/Display/ProgressBar.chs \ gtk/Graphics/UI/Gtk/Display/Statusbar.chs \ gtk/Graphics/UI/Gtk/Entry/Editable.chs.pp \ @@ -364,7 +364,7 @@ gtk/Graphics/UI/Gtk/MenuComboToolbar/Menu.chs.pp \ gtk/Graphics/UI/Gtk/MenuComboToolbar/MenuBar.chs \ gtk/Graphics/UI/Gtk/MenuComboToolbar/MenuItem.chs \ - gtk/Graphics/UI/Gtk/MenuComboToolbar/MenuShell.chs \ + gtk/Graphics/UI/Gtk/MenuComboToolbar/MenuShell.chs.pp \ gtk/Graphics/UI/Gtk/MenuComboToolbar/OptionMenu.chs.pp \ gtk/Graphics/UI/Gtk/MenuComboToolbar/RadioMenuItem.chs \ gtk/Graphics/UI/Gtk/MenuComboToolbar/TearoffMenuItem.chs \ @@ -379,11 +379,11 @@ gtk/Graphics/UI/Gtk/Misc/SizeGroup.chs \ gtk/Graphics/UI/Gtk/Misc/Tooltips.chs.pp \ gtk/Graphics/UI/Gtk/Misc/Viewport.chs \ - gtk/Graphics/UI/Gtk/Multiline/TextBuffer.chs \ + gtk/Graphics/UI/Gtk/Multiline/TextBuffer.chs.pp \ gtk/Graphics/UI/Gtk/Multiline/TextMark.chs \ gtk/Graphics/UI/Gtk/Multiline/TextTag.chs.pp \ gtk/Graphics/UI/Gtk/Multiline/TextTagTable.chs \ - gtk/Graphics/UI/Gtk/Multiline/TextView.chs \ + gtk/Graphics/UI/Gtk/Multiline/TextView.chs.pp \ gtk/Graphics/UI/Gtk/Ornaments/Frame.chs \ gtk/Graphics/UI/Gtk/Ornaments/HSeparator.chs \ gtk/Graphics/UI/Gtk/Ornaments/VSeparator.chs \ Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.444 retrieving revision 1.445 diff -u -d -r1.444 -r1.445 --- ChangeLog 7 Apr 2005 00:53:44 -0000 1.444 +++ ChangeLog 7 Apr 2005 00:58:18 -0000 1.445 @@ -74,6 +74,9 @@ * gtk/Graphics/UI/Gtk/TreeList/CellView.chs.pp: fix bug caused by overlapping patterns. + * Makefile.am: rename several modules to .pp (I swear I committed this + before!) + 2005-04-6 Duncan Coutts <du...@co...> * tools/callbackGen/gtkmarshal.list: tidy up slightly, and add |
From: Duncan C. <dun...@us...> - 2005-04-07 00:54:07
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25721 Modified Files: ChangeLog Log Message: Fix bug caused by overlapping patterns. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.443 retrieving revision 1.444 diff -u -d -r1.443 -r1.444 --- ChangeLog 7 Apr 2005 00:53:01 -0000 1.443 +++ ChangeLog 7 Apr 2005 00:53:44 -0000 1.444 @@ -71,6 +71,9 @@ * gtk/Graphics/UI/Gtk/Selectors/FileChooserButton.chs.pp: add myself as author. + * gtk/Graphics/UI/Gtk/TreeList/CellView.chs.pp: fix bug caused by + overlapping patterns. + 2005-04-6 Duncan Coutts <du...@co...> * tools/callbackGen/gtkmarshal.list: tidy up slightly, and add |
From: Duncan C. <dun...@us...> - 2005-04-07 00:54:07
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/TreeList In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25721/gtk/Graphics/UI/Gtk/TreeList Modified Files: CellView.chs.pp Log Message: Fix bug caused by overlapping patterns. Index: CellView.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/TreeList/CellView.chs.pp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- CellView.chs.pp 5 Apr 2005 18:29:52 -0000 1.1 +++ CellView.chs.pp 7 Apr 2005 00:53:44 -0000 1.2 @@ -158,15 +158,15 @@ cellViewSetDisplayedRow :: CellViewClass self => self -> TreePath -- ^ @path@ - a 'TreePath' or @[]@ to unset. -> IO () +cellViewSetDisplayedRow self [] = + {# call gtk_cell_view_set_displayed_row #} + (toCellView self) + (NativeTreePath nullPtr) cellViewSetDisplayedRow self path = withTreePath path $ \path -> {# call gtk_cell_view_set_displayed_row #} (toCellView self) path -cellViewSetDisplayedRow self [] = - {# call gtk_cell_view_set_displayed_row #} - (toCellView self) - (NativeTreePath nullPtr) -- | -- |
From: Duncan C. <dun...@us...> - 2005-04-07 00:53:14
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25291 Modified Files: ChangeLog Log Message: Add myself as author. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.442 retrieving revision 1.443 diff -u -d -r1.442 -r1.443 --- ChangeLog 7 Apr 2005 00:50:31 -0000 1.442 +++ ChangeLog 7 Apr 2005 00:53:01 -0000 1.443 @@ -68,6 +68,9 @@ * gtk/Graphics/UI/Gtk/Windows/Window.chs.pp: add bindings for another 20 methods. + * gtk/Graphics/UI/Gtk/Selectors/FileChooserButton.chs.pp: add myself + as author. + 2005-04-6 Duncan Coutts <du...@co...> * tools/callbackGen/gtkmarshal.list: tidy up slightly, and add |
From: Duncan C. <dun...@us...> - 2005-04-07 00:53:10
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Selectors In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25291/gtk/Graphics/UI/Gtk/Selectors Modified Files: FileChooserButton.chs.pp Log Message: Add myself as author. Index: FileChooserButton.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Selectors/FileChooserButton.chs.pp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- FileChooserButton.chs.pp 5 Apr 2005 18:29:52 -0000 1.1 +++ FileChooserButton.chs.pp 7 Apr 2005 00:53:01 -0000 1.2 @@ -1,13 +1,13 @@ -- -*-haskell-*- -- GIMP Toolkit (GTK) Widget FileChooserButton -- --- Author : [Insert your full name here] +-- Author : Duncan Coutts -- -- Created: 5 April 2005 -- -- Version $Revision$ from $Date$ -- --- Copyright (C) 2005 [Insert your full name here] +-- Copyright (C) 2005 Duncan Coutts -- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Lesser General Public |
From: Duncan C. <dun...@us...> - 2005-04-07 00:50:43
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Windows In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24160/gtk/Graphics/UI/Gtk/Windows Modified Files: Window.chs.pp Log Message: Add bindings for lots more methods and a few properties. Index: Window.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Windows/Window.chs.pp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Window.chs.pp 27 Mar 2005 11:54:52 -0000 1.6 +++ Window.chs.pp 7 Apr 2005 00:50:32 -0000 1.7 @@ -51,6 +51,7 @@ -- * Methods windowSetTitle, + windowGetTitle, windowSetResizable, windowGetResizable, -- windowAddAccelGroup, @@ -58,14 +59,16 @@ windowActivateFocus, windowActivateDefault, windowSetModal, + windowGetModal, windowSetDefaultSize, --- windowSetGeometryHints, + windowGetDefaultSize, #ifndef DISABLE_DEPRECATED windowSetPolicy, #endif windowSetPosition, WindowPosition(..), windowSetTransientFor, + windowGetTransientFor, windowSetDestroyWithParent, windowGetDestroyWithParent, windowIsActive, @@ -102,10 +105,12 @@ windowGetFocusOnMap, #endif windowSetDecorated, + windowGetDecorated, -- windowSetDecorationsHint, windowSetFrameDimensions, -- windowSetFunctionHint, windowSetRole, + windowGetRole, windowStick, windowUnstick, windowAddAccelGroup, @@ -116,6 +121,25 @@ windowGetIconName, windowSetDefaultIconName, #endif + windowSetGravity, + windowGetGravity, +#if GTK_CHECK_VERSION(2,2,0) + windowSetScreen, + windowGetScreen, +#endif + windowBeginResizeDrag, + windowBeginMoveDrag, + windowSetTypeHint, + windowGetTypeHint, + windowGetIcon, + windowGetPosition, + windowGetSize, + windowMove, + windowResize, +#if GTK_CHECK_VERSION(2,2,0) + windowSetIconFromFile, + windowSetAutoStartupNotification, +#endif -- * Properties windowResizable, @@ -131,12 +155,15 @@ import System.Glib.FFI import System.Glib.UTFString +import System.Glib.GError import System.Glib.Attributes (Attr(..)) -import Graphics.UI.Gtk.General.Enums (WindowType(WindowToplevel), WindowPosition(..)) +import System.Glib.GObject (makeNewGObject) import Graphics.UI.Gtk.Abstract.Object (makeNewObject) +import Graphics.UI.Gtk.General.Enums (WindowType(WindowToplevel), WindowPosition(..)) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} import Graphics.UI.Gtk.Gdk.Events (Event, marshalEvent) +import Graphics.UI.Gtk.Gdk.Enums (WindowEdge(..), WindowTypeHint(..), Gravity(..)) {# context lib="gtk" prefix="gtk" #} @@ -169,6 +196,18 @@ (toWindow self) titlePtr +-- | Retrieves the title of the window. See 'windowSetTitle'. +-- +windowGetTitle :: WindowClass self => self + -> IO String -- ^ returns the title of the window, or {@NULL@, FIXME: this + -- should probably be converted to a Maybe data type} if none has + -- been set explicitely. The returned string is owned by the + -- widget and must not be modified or freed. +windowGetTitle self = + {# call gtk_window_get_title #} + (toWindow self) + >>= peekUTFString + -- | Sets whether the user can resize a window. Windows are user resizable by -- default. -- @@ -238,6 +277,16 @@ (toWindow self) (fromBool modal) +-- | Returns whether the window is modal. See 'windowSetModal'. +-- +windowGetModal :: WindowClass self => self + -> IO Bool -- ^ returns @True@ if the window is set to be modal and + -- establishes a grab when shown +windowGetModal self = + liftM toBool $ + {# call gtk_window_get_modal #} + (toWindow self) + -- | Sets the default size of a window. If the window's \"natural\" size (its -- size request) is larger than the default, the default will be ignored. More -- generally, if the default size does not obey the geometry hints for the @@ -276,6 +325,23 @@ (fromIntegral height) (fromIntegral width) +-- | Gets the default size of the window. A value of -1 for the width or +-- height indicates that a default size has not been explicitly set for that +-- dimension, so the \"natural\" size of the window will be used. +-- +windowGetDefaultSize :: WindowClass self => self + -> IO (Int, Int) -- ^ @(width, height)@ - the default width and height +windowGetDefaultSize self = + alloca $ \widthPtr -> + alloca $ \heightPtr -> do + {# call gtk_window_get_default_size #} + (toWindow self) + widthPtr + heightPtr + width <- peek widthPtr + height <- peek heightPtr + return (fromIntegral width, fromIntegral height) + -- | Sets a position constraint for this window. If the old or new constraint -- is 'WinPosCenterAlways', this will also cause the window to be repositioned -- to satisfy the new constraint. @@ -303,6 +369,17 @@ (toWindow self) (toWindow parent) +-- | Fetches the transient parent for this window. See +-- 'windowSetTransientFor'. +-- +windowGetTransientFor :: WindowClass self => self + -> IO (Maybe Window) -- ^ returns the transient parent for this window, or + -- @Nothing@ if no transient parent has been set. +windowGetTransientFor self = + maybeNull (makeNewObject mkWindow) $ + {# call gtk_window_get_transient_for #} + (toWindow self) + -- | If this setting is @True@, then destroying the transient parent of the -- window will also destroy the window itself. This is useful for dialogs that -- shouldn't persist beyond the lifetime of the main window they\'re associated @@ -333,7 +410,7 @@ -- to draw a widget differently in an active window from a widget in an -- inactive window. See 'windowHasToplevelFocus' -- --- * Available since Gtk version 2.4 +-- * Available since Gtk+ version 2.4 -- windowIsActive :: WindowClass self => self -> IO Bool -- ^ returns @True@ if the window part of the current active @@ -347,7 +424,7 @@ -- toplevel windows, this is identical to 'windowIsActive', but for embedded -- windows, like 'Plug', the results will differ. -- --- * Available since Gtk version 2.4 +-- * Available since Gtk+ version 2.4 -- windowHasToplevelFocus :: WindowClass self => self -> IO Bool -- ^ returns @True@ if the the input focus is within this 'Window' @@ -447,7 +524,7 @@ -- You can track the fullscreen state via the \"window_state_event\" signal -- on 'Widget'. -- --- * Available since Gtk version 2.2 +-- * Available since Gtk+ version 2.2 -- windowFullscreen :: WindowClass self => self -> IO () windowFullscreen self = @@ -464,7 +541,7 @@ -- You can track the fullscreen state via the \"window_state_event\" signal -- on 'Widget'. -- --- * Available since Gtk version 2.2 +-- * Available since Gtk+ version 2.2 -- windowUnfullscreen :: WindowClass self => self -> IO () windowUnfullscreen self = @@ -489,7 +566,7 @@ -- the above state is mainly meant for user preferences and should not be used -- by applications e.g. for drawing attention to their dialogs. -- --- * Available since Gtk version 2.4 +-- * Available since Gtk+ version 2.4 -- windowSetKeepAbove :: WindowClass self => self -> Bool -- ^ @setting@ - whether to keep @window@ above other windows @@ -515,7 +592,7 @@ -- the above state is mainly meant for user preferences and should not be used -- by applications e.g. for drawing attention to their dialogs. -- --- * Available since Gtk version 2.4 +-- * Available since Gtk+ version 2.4 -- windowSetKeepBelow :: WindowClass self => self -> Bool -- ^ @setting@ - whether to keep @window@ below other windows @@ -530,7 +607,7 @@ -- | Windows may set a hint asking the desktop environment not to display the -- window in the task bar. This function sets this hint. -- --- * Available since Gtk version 2.2 +-- * Available since Gtk+ version 2.2 -- windowSetSkipTaskbarHint :: WindowClass self => self -> Bool -- ^ @setting@ - @True@ to keep this window from appearing in the @@ -543,7 +620,7 @@ -- | Gets the value set by 'windowSetSkipTaskbarHint' -- --- * Available since Gtk version 2.2 +-- * Available since Gtk+ version 2.2 -- windowGetSkipTaskbarHint :: WindowClass self => self -> IO Bool -- ^ returns @True@ if window shouldn't be in taskbar @@ -557,7 +634,7 @@ -- desktop navigation tool such as a workspace switcher that displays a -- thumbnail representation of the windows on the screen.) -- --- * Available since Gtk version 2.2 +-- * Available since Gtk+ version 2.2 -- windowSetSkipPagerHint :: WindowClass self => self -> Bool -- ^ @setting@ - @True@ to keep this window from appearing in the @@ -570,7 +647,7 @@ -- | Gets the value set by 'windowSetSkipPagerHint'. -- --- * Available since Gtk version 2.2 +-- * Available since Gtk+ version 2.2 -- windowGetSkipPagerHint :: WindowClass self => self -> IO Bool -- ^ returns @True@ if window shouldn't be in pager @@ -584,7 +661,7 @@ -- | Windows may set a hint asking the desktop environment not to receive the -- input focus. This function sets this hint. -- --- * Available since Gtk version 2.4 +-- * Available since Gtk+ version 2.4 -- windowSetAcceptFocus :: WindowClass self => self -> Bool -- ^ @setting@ - @True@ to let this window receive input focus @@ -596,7 +673,7 @@ -- | Gets the value set by 'windowSetAcceptFocus'. -- --- * Available since Gtk version 2.4 +-- * Available since Gtk+ version 2.4 -- windowGetAcceptFocus :: WindowClass self => self -> IO Bool -- ^ returns @True@ if window should receive the input focus @@ -610,7 +687,7 @@ -- | Windows may set a hint asking the desktop environment not to receive the -- input focus when the window is mapped. This function sets this hint. -- --- * Available since Gtk version 2.6 +-- * Available since Gtk+ version 2.6 -- windowSetFocusOnMap :: WindowClass self => self -> Bool -- ^ @setting@ - @True@ to let this window receive input focus on @@ -623,7 +700,7 @@ -- | Gets the value set by 'windowSetFocusOnMap'. -- --- * Available since Gtk version 2.6 +-- * Available since Gtk+ version 2.6 -- windowGetFocusOnMap :: WindowClass self => self -> IO Bool -- ^ returns @True@ if window should receive the input focus when @@ -634,7 +711,6 @@ (toWindow self) #endif - -- | By default, windows are decorated with a title bar, resize controls, etc. -- Some window managers allow Gtk+ to disable these decorations, creating a -- borderless window. If you set the decorated property to @False@ using this @@ -652,6 +728,16 @@ (toWindow self) (fromBool setting) +-- | Returns whether the window has been set to have decorations such as a +-- title bar via 'windowSetDecorated'. +-- +windowGetDecorated :: WindowClass self => self + -> IO Bool -- ^ returns @True@ if the window has been set to have decorations +windowGetDecorated self = + liftM toBool $ + {# call gtk_window_get_decorated #} + (toWindow self) + -- | (Note: this is a special-purpose function intended for the framebuffer -- port; see 'windowSetHasFrame'. It will have no effect on the window border -- drawn by the window manager, which is the normal case when using the X @@ -696,6 +782,17 @@ (toWindow self) rolePtr +-- | Returns the role of the window. See 'windowSetRole' for further +-- explanation. +-- +windowGetRole :: WindowClass self => self + -> IO (Maybe String) -- ^ returns the role of the window if set, or + -- @Nothing@. +windowGetRole self = + {# call gtk_window_get_role #} + (toWindow self) + >>= maybePeek peekUTFString + -- | Asks to stick @window@, which means that it will appear on all user -- desktops. Note that you shouldn't assume the window is definitely stuck -- afterward, because other entities (e.g. the user or window manager) could @@ -731,23 +828,23 @@ -- 'accelGroupsActivate' on @window@ will activate accelerators in -- @accelGroup@. -- -windowAddAccelGroup :: (WindowClass self, AccelGroupClass accelGroup) => self - -> accelGroup -- ^ @accelGroup@ - a 'AccelGroup' +windowAddAccelGroup :: WindowClass self => self + -> AccelGroup -- ^ @accelGroup@ - a 'AccelGroup' -> IO () windowAddAccelGroup self accelGroup = {# call gtk_window_add_accel_group #} (toWindow self) - (toAccelGroup accelGroup) + accelGroup -- | Reverses the effects of 'windowAddAccelGroup'. -- -windowRemoveAccelGroup :: (WindowClass self, AccelGroupClass accelGroup) => self - -> accelGroup -- ^ @accelGroup@ - a 'AccelGroup' +windowRemoveAccelGroup :: WindowClass self => self + -> AccelGroup -- ^ @accelGroup@ - a 'AccelGroup' -> IO () windowRemoveAccelGroup self accelGroup = {# call gtk_window_remove_accel_group #} (toWindow self) - (toAccelGroup accelGroup) + accelGroup -- | Sets up the icon representing a 'Window'. This icon is used when the -- window is minimized (also known as iconified). Some window managers or @@ -776,6 +873,16 @@ (toWindow self) icon +-- | Gets the value set by 'windowSetIcon' (or if you\'ve called +-- 'windowSetIconList', gets the first icon in the icon list). +-- +windowGetIcon :: WindowClass self => self + -> IO Pixbuf -- ^ returns icon for window +windowGetIcon self = + makeNewGObject mkPixbuf $ + {# call gtk_window_get_icon #} + (toWindow self) + #if GTK_CHECK_VERSION(2,6,0) -- | Sets the icon for the window from a named themed icon. See the docs for -- 'IconTheme' for more details. @@ -783,7 +890,7 @@ -- Note that this has nothing to do with the WM_ICON_NAME property which is -- mentioned in the ICCCM. -- --- * Available since Gtk version 2.6 +-- * Available since Gtk+ version 2.6 -- windowSetIconName :: WindowClass self => self -> String -- ^ @name@ - the name of the themed icon @@ -797,7 +904,7 @@ -- | Returns the name of the themed icon for the window, see -- 'windowSetIconName'. -- --- * Available since Gtk version 2.6 +-- * Available since Gtk+ version 2.6 -- windowGetIconName :: WindowClass self => self -> IO String -- ^ returns the icon name or {@NULL@, FIXME: this should @@ -812,9 +919,9 @@ -- 'windowSetIconList' called on them from a named themed icon, see -- 'windowSetIconName'. -- --- * Available since Gtk version 2.6 +-- * Available since Gtk+ version 2.6 -- -windowSetDefaultIconName :: +windowSetDefaultIconName :: String -- ^ @name@ - the name of the themed icon -> IO () windowSetDefaultIconName name = @@ -823,6 +930,319 @@ namePtr #endif +#if GTK_CHECK_VERSION(2,2,0) +-- | Sets the 'Screen' where the @window@ is displayed; if the window is +-- already mapped, it will be unmapped, and then remapped on the new screen. +-- +-- * Available since Gtk+ version 2.2 +-- +windowSetScreen :: WindowClass self => self + -> Screen -- ^ @screen@ - a 'Screen'. + -> IO () +windowSetScreen self screen = + {# call gtk_window_set_screen #} + (toWindow self) + screen + +-- | Returns the 'Screen' associated with the window. +-- +-- * Available since Gtk+ version 2.2 +-- +windowGetScreen :: WindowClass self => self + -> IO Screen -- ^ returns a 'Screen'. +windowGetScreen self = + makeNewGObject mkScreen $ + {# call gtk_window_get_screen #} + (toWindow self) + +-- | Sets the icon for @window@. +-- +-- This function is equivalent to calling 'windowSetIcon' with a pixbuf +-- created by loading the image from @filename@. +-- +-- * Available since Gtk+ version 2.2 +-- +windowSetIconFromFile :: WindowClass self => self + -> FilePath -- ^ @filename@ - location of icon file + -> IO Bool -- ^ returns @True@ if setting the icon succeeded. +windowSetIconFromFile self filename = + liftM toBool $ + propagateGError $ \errPtr -> + withUTFString filename $ \filenamePtr -> + {# call gtk_window_set_icon_from_file #} + (toWindow self) + filenamePtr + errPtr + +-- | By default, after showing the first 'Window' for each 'Screen', Gtk+ +-- calls 'screenNotifyStartupComplete'. Call this function to disable the +-- automatic startup notification. You might do this if your first window is a +-- splash screen, and you want to delay notification until after your real main +-- window has been shown, for example. +-- +-- In that example, you would disable startup notification temporarily, show +-- your splash screen, then re-enable it so that showing the main window would +-- automatically result in notification. +-- +-- * Available since Gtk+ version 2.2 +-- +windowSetAutoStartupNotification :: + Bool -- ^ @setting@ - @True@ to automatically do startup notification + -> IO () +windowSetAutoStartupNotification setting = + {# call gtk_window_set_auto_startup_notification #} + (fromBool setting) +#endif + +-- | Window gravity defines the meaning of coordinates passed to 'windowMove'. +-- See 'windowMove' and 'Gravity' for more details. +-- +-- The default window gravity is 'GravityNorthWest' which will typically +-- \"do what you mean.\" +-- +windowSetGravity :: WindowClass self => self + -> Gravity -- ^ @gravity@ - window gravity + -> IO () +windowSetGravity self gravity = + {# call gtk_window_set_gravity #} + (toWindow self) + ((fromIntegral . fromEnum) gravity) + +-- | Gets the value set by 'windowSetGravity'. +-- +windowGetGravity :: WindowClass self => self + -> IO Gravity -- ^ returns window gravity +windowGetGravity self = + liftM (toEnum . fromIntegral) $ + {# call gtk_window_get_gravity #} + (toWindow self) + +-- | Asks the window manager to move @window@ to the given position. Window +-- managers are free to ignore this; most window managers ignore requests for +-- initial window positions (instead using a user-defined placement algorithm) +-- and honor requests after the window has already been shown. +-- +-- Note: the position is the position of the gravity-determined reference +-- point for the window. The gravity determines two things: first, the location +-- of the reference point in root window coordinates; and second, which point +-- on the window is positioned at the reference point. +-- +-- By default the gravity is 'GravityNorthWest', so the reference point is +-- simply the @x@, @y@ supplied to 'windowMove'. The top-left corner of the +-- window decorations (aka window frame or border) will be placed at @x@, @y@. +-- Therefore, to position a window at the top left of the screen, you want to +-- use the default gravity (which is 'GravityNorthWest') and move the window to +-- 0,0. +-- +-- To position a window at the bottom right corner of the screen, you would +-- set 'GravitySouthEast', which means that the reference point is at @x@ + the +-- window width and @y@ + the window height, and the bottom-right corner of the +-- window border will be placed at that reference point. So, to place a window +-- in the bottom right corner you would first set gravity to south east, then +-- write: @gtk_window_move (window, gdk_screen_width() - window_width, +-- gdk_screen_height() - window_height)@. +-- +-- The Extended Window Manager Hints specification at +-- http:\/\/www.freedesktop.org\/Standards\/wm-spec has a nice table of +-- gravities in the \"implementation notes\" section. +-- +-- The 'windowGetPosition' documentation may also be relevant. +-- +windowMove :: WindowClass self => self + -> Int -- ^ @x@ - X coordinate to move window to + -> Int -- ^ @y@ - Y coordinate to move window to + -> IO () +windowMove self x y = + {# call gtk_window_move #} + (toWindow self) + (fromIntegral x) + (fromIntegral y) + +-- | Resizes the window as if the user had done so, obeying geometry +-- constraints. The default geometry constraint is that windows may not be +-- smaller than their size request; to override this constraint, call +-- 'widgetSetSizeRequest' to set the window's request to a smaller value. +-- +-- If 'windowResize' is called before showing a window for the first time, +-- it overrides any default size set with 'windowSetDefaultSize'. +-- +-- Windows may not be resized smaller than 1 by 1 pixels. +-- +windowResize :: WindowClass self => self + -> Int -- ^ @width@ - width in pixels to resize the window to + -> Int -- ^ @height@ - height in pixels to resize the window to + -> IO () +windowResize self width height = + {# call gtk_window_resize #} + (toWindow self) + (fromIntegral width) + (fromIntegral height) + +-- | Starts resizing a window. This function is used if an application has +-- window resizing controls. When GDK can support it, the resize will be done +-- using the standard mechanism for the window manager or windowing system. +-- Otherwise, GDK will try to emulate window resizing, potentially not all that +-- well, depending on the windowing system. +-- +windowBeginResizeDrag :: WindowClass self => self + -> WindowEdge -- ^ @edge@ - position of the resize control + -> Int -- ^ @button@ - mouse button that initiated the drag + -> Int -- ^ @rootX@ - X position where the user clicked to initiate + -- the drag, in root window coordinates + -> Int -- ^ @rootY@ - Y position where the user clicked to initiate + -- the drag + -> Word32 -- ^ @timestamp@ - timestamp from the click event that + -- initiated the drag + -> IO () +windowBeginResizeDrag self edge button rootX rootY timestamp = + {# call gtk_window_begin_resize_drag #} + (toWindow self) + ((fromIntegral . fromEnum) edge) + (fromIntegral button) + (fromIntegral rootX) + (fromIntegral rootY) + (fromIntegral timestamp) + +-- | Starts moving a window. This function is used if an application has +-- window movement grips. When GDK can support it, the window movement will be +-- done using the standard mechanism for the window manager or windowing +-- system. Otherwise, GDK will try to emulate window movement, potentially not +-- all that well, depending on the windowing system. +-- +windowBeginMoveDrag :: WindowClass self => self + -> Int -- ^ @button@ - mouse button that initiated the drag + -> Int -- ^ @rootX@ - X position where the user clicked to initiate the + -- drag, in root window coordinates + -> Int -- ^ @rootY@ - Y position where the user clicked to initiate the + -- drag + -> Word32 -- ^ @timestamp@ - timestamp from the click event that initiated + -- the drag + -> IO () +windowBeginMoveDrag self button rootX rootY timestamp = + {# call gtk_window_begin_move_drag #} + (toWindow self) + (fromIntegral button) + (fromIntegral rootX) + (fromIntegral rootY) + (fromIntegral timestamp) + +-- | This function returns the position you need to pass to 'windowMove' to +-- keep @window@ in its current position. This means that the meaning of the +-- returned value varies with window gravity. See 'windowMove' for more +-- details. +-- +-- If you haven't changed the window gravity, its gravity will be +-- 'GravityNorthWest'. This means that 'windowGetPosition' gets the position of +-- the top-left corner of the window manager frame for the window. 'windowMove' +-- sets the position of this same top-left corner. +-- +-- Moreover, nearly all window managers are historically broken with respect +-- to their handling of window gravity. So moving a window to its current +-- position as returned by 'windowGetPosition' tends to result in moving the +-- window slightly. Window managers are slowly getting better over time. +-- +-- If a window has gravity 'GravityStatic' the window manager frame is not +-- relevant, and thus 'windowGetPosition' will always produce accurate results. +-- However you can't use static gravity to do things like place a window in a +-- corner of the screen, because static gravity ignores the window manager +-- decorations. +-- +-- If you are saving and restoring your application's window positions, you +-- should know that it's impossible for applications to do this without getting +-- it somewhat wrong because applications do not have sufficient knowledge of +-- window manager state. The Correct Mechanism is to support the session +-- management protocol (see the \"GnomeClient\" object in the GNOME libraries +-- for example) and allow the window manager to save your window sizes and +-- positions. +-- +windowGetPosition :: WindowClass self => self + -> IO (Int, Int) -- ^ @(rootX, rootY)@ - X and Y coordinate of + -- gravity-determined reference point +windowGetPosition self = + alloca $ \rootXPtr -> + alloca $ \rootYPtr -> do + {# call gtk_window_get_position #} + (toWindow self) + rootXPtr + rootYPtr + rootX <- peek rootXPtr + rootY <- peek rootYPtr + return (fromIntegral rootX, fromIntegral rootY) + +-- | Obtains the current size of the window. If the window is not onscreen, it +-- returns the size Gtk+ will suggest to the window manager for the initial +-- window size (but this is not reliably the same as the size the window +-- manager will actually select). The size obtained by 'windowGetSize' is the +-- last size received in a 'EventConfigure', that is, +-- Gtk+ uses its locally-stored size, rather than querying the X server for the +-- size. As a result, if you call 'windowResize' then immediately call +-- 'windowGetSize', the size won't have taken effect yet. After the window +-- manager processes the resize request, Gtk+ receives notification that the +-- size has changed via a configure event, and the size of the window gets +-- updated. +-- +-- Note 1: Nearly any use of this function creates a race condition, because +-- the size of the window may change between the time that you get the size and +-- the time that you perform some action assuming that size is the current +-- size. To avoid race conditions, connect to \"configure_event\" on the window +-- and adjust your size-dependent state to match the size delivered in the +-- 'EventConfigure'. +-- +-- Note 2: The returned size does /not/ include the size of the window +-- manager decorations (aka the window frame or border). Those are not drawn by +-- Gtk+ and Gtk+ has no reliable method of determining their size. +-- +-- Note 3: If you are getting a window size in order to position the window +-- onscreen, there may be a better way. The preferred way is to simply set the +-- window's semantic type with 'windowSetTypeHint', which allows the window +-- manager to e.g. center dialogs. Also, if you set the transient parent of +-- dialogs with 'windowSetTransientFor' window managers will often center the +-- dialog over its parent window. It's much preferred to let the window manager +-- handle these things rather than doing it yourself, because all apps will +-- behave consistently and according to user prefs if the window manager +-- handles it. Also, the window manager can take the size of the window +-- decorations\/border into account, while your application cannot. +-- +-- In any case, if you insist on application-specified window positioning, +-- there's /still/ a better way than doing it yourself - 'windowSetPosition' +-- will frequently handle the details for you. +-- +windowGetSize :: WindowClass self => self + -> IO (Int, Int) -- ^ @(width, height)@ +windowGetSize self = + alloca $ \widthPtr -> + alloca $ \heightPtr -> do + {# call gtk_window_get_size #} + (toWindow self) + widthPtr + heightPtr + width <- peek widthPtr + height <- peek heightPtr + return (fromIntegral width, fromIntegral height) + +-- | By setting the type hint for the window, you allow the window manager to +-- decorate and handle the window in a way which is suitable to the function of +-- the window in your application. +-- +-- This function should be called before the window becomes visible. +-- +windowSetTypeHint :: WindowClass self => self + -> WindowTypeHint -- ^ @hint@ - the window type + -> IO () +windowSetTypeHint self hint = + {# call gtk_window_set_type_hint #} + (toWindow self) + ((fromIntegral . fromEnum) hint) + +-- | Gets the type hint for this window. See 'windowSetTypeHint'. +-- +windowGetTypeHint :: WindowClass self => self + -> IO WindowTypeHint -- ^ returns the type hint for @window@. +windowGetTypeHint self = + liftM (toEnum . fromIntegral) $ + {# call gtk_window_get_type_hint #} + (toWindow self) + -------------------- -- Properties @@ -835,6 +1255,106 @@ windowGetResizable windowSetResizable +-- | If @True@, the window is modal (other windows are not usable while this +-- one is up). +-- +-- Default value: @False@ +-- +windowModal :: WindowClass self => Attr self Bool +windowModal = Attr + windowGetModal + windowSetModal + +-- | If this window should be destroyed when the parent is destroyed. +-- +-- Default value: @False@ +-- +windowDestroyWithParent :: WindowClass self => Attr self Bool +windowDestroyWithParent = Attr + windowGetDestroyWithParent + windowSetDestroyWithParent + +-- | Icon for this window. +-- +windowIcon :: WindowClass self => Attr self Pixbuf +windowIcon = Attr + windowGetIcon + windowSetIcon + +-- | The screen where this window will be displayed. +-- +windowScreen :: WindowClass self => Attr self Screen +windowScreen = Attr + windowGetScreen + windowSetScreen + +-- | Hint to help the desktop environment understand what kind of window this +-- is and how to treat it. +-- +-- Default value: 'WindowTypeHintNormal' +-- +windowTypeHint :: WindowClass self => Attr self WindowTypeHint +windowTypeHint = Attr + windowGetTypeHint + windowSetTypeHint + +-- | @True@ if the window should not be in the task bar. +-- +-- Default value: @False@ +-- +windowSkipTaskbarHint :: WindowClass self => Attr self Bool +windowSkipTaskbarHint = Attr + windowGetSkipTaskbarHint + windowSetSkipTaskbarHint + +-- | @True@ if the window should not be in the pager. +-- +-- Default value: @False@ +-- +windowSkipPagerHint :: WindowClass self => Attr self Bool +windowSkipPagerHint = Attr + windowGetSkipPagerHint + windowSetSkipPagerHint + +-- | @True@ if the window should receive the input focus. +-- +-- Default value: @True@ +-- +windowAcceptFocus :: WindowClass self => Attr self Bool +windowAcceptFocus = Attr + windowGetAcceptFocus + windowSetAcceptFocus + +-- | @True@ if the window should receive the input focus when mapped. +-- +-- Default value: @True@ +-- +windowFocusOnMap :: WindowClass self => Attr self Bool +windowFocusOnMap = Attr + windowGetFocusOnMap + windowSetFocusOnMap + +#if GTK_CHECK_VERSION(2,4,0) +-- | Whether the window should be decorated by the window manager. +-- +-- Default value: @True@ +-- +windowDecorated :: WindowClass self => Attr self Bool +windowDecorated = Attr + windowGetDecorated + windowSetDecorated + +-- | The window gravity of the window. See 'windowMove' and 'Gravity' for more +-- details about window gravity. +-- +-- Default value: 'GravityNorthWest' +-- +windowGravity :: WindowClass self => Attr self Gravity +windowGravity = Attr + windowGetGravity + windowSetGravity +#endif + -------------------- -- Signals |
From: Duncan C. <dun...@us...> - 2005-04-07 00:50:43
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Multiline In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24160/gtk/Graphics/UI/Gtk/Multiline Modified Files: TextBuffer.chs.pp TextView.chs.pp Log Message: Add bindings for lots more methods and a few properties. Index: TextBuffer.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Multiline/TextBuffer.chs.pp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- TextBuffer.chs.pp 6 Apr 2005 22:20:03 -0000 1.1 +++ TextBuffer.chs.pp 7 Apr 2005 00:50:31 -0000 1.2 @@ -127,8 +127,19 @@ textBufferSetModified, textBufferDeleteSelection, textBufferHasSelection, + textBufferGetSelectionBounds, +#if GTK_CHECK_VERSION(2,4,0) + textBufferSelectRange, +#endif + textBufferGetBounds, textBufferBeginUserAction, textBufferEndUserAction, +#if GTK_CHECK_VERSION(2,6,0) + textBufferBackspace, +#endif + textBufferInsertChildAnchor, + textBufferCreateChildAnchor, + textBufferGetIterAtChildAnchor, -- * Properties textBufferModified, @@ -786,6 +797,22 @@ (TextIter nullForeignPtr) (TextIter nullForeignPtr) +-- | Returns the bounds of the selection (if the selection has length 0, then +-- @start@ and @end@ will be the same). @start@ and @end@ will be in ascending +-- order. +-- +textBufferGetSelectionBounds :: TextBufferClass self => self + -> IO (TextIter, TextIter) -- ^ @(start, end)@ returns the selection start and + -- end iterators +textBufferGetSelectionBounds self = do + start <- makeEmptyTextIter + end <- makeEmptyTextIter + {# call unsafe text_buffer_get_selection_bounds #} + (toTextBuffer self) + start + end + return (start, end) + -- | Called to indicate that the buffer operations between here and a call to -- 'textBufferEndUserAction' are part of a single user-visible operation. The -- operations between 'textBufferBeginUserAction' and 'textBufferEndUserAction' @@ -814,6 +841,115 @@ {# call text_buffer_end_user_action #} (toTextBuffer self) +#if GTK_CHECK_VERSION(2,6,0) +-- | Performs the appropriate action as if the user hit the delete key with +-- the cursor at the position specified by @iter@. In the normal case a single +-- character will be deleted, but when combining accents are involved, more +-- than one character can be deleted, and when precomposed character and accent +-- combinations are involved, less than one character will be deleted. +-- +-- Because the buffer is modified, all outstanding iterators become invalid +-- after calling this function; however, the @iter@ will be re-initialized to +-- point to the location where text was deleted. +-- +-- * Available since Gtk+ version 2.6 +-- +textBufferBackspace :: TextBufferClass self => self + -> TextIter -- ^ @iter@ - a position in @buffer@ + -> Bool -- ^ @interactive@ - whether the deletion is caused by user + -- interaction + -> Bool -- ^ @defaultEditable@ - whether the buffer is editable by + -- default + -> IO Bool -- ^ returns @True@ if the buffer was modified +textBufferBackspace self iter interactive defaultEditable = + liftM toBool $ + {# call gtk_text_buffer_backspace #} + (toTextBuffer self) + iter + (fromBool interactive) + (fromBool defaultEditable) +#endif + +-- | Inserts a child widget anchor into the text buffer at @iter@. The anchor +-- will be counted as one character in character counts, and when obtaining the +-- buffer contents as a string, will be represented by the Unicode \"object +-- replacement character\" @(chr 0xFFFC)@. Note that the \"slice\" variants for +-- obtaining portions of the buffer as a string include this character for +-- child anchors, but the \"text\" variants do not. e.g. see +-- 'textBufferGetSlice' and 'textBufferGetText'. Consider +-- 'textBufferCreateChildAnchor' as a more convenient alternative to this +-- function. +-- +textBufferInsertChildAnchor :: TextBufferClass self => self + -> TextIter -- ^ @iter@ - location to insert the anchor + -> TextChildAnchor -- ^ @anchor@ - a 'TextChildAnchor' + -> IO () +textBufferInsertChildAnchor self iter anchor = + {# call gtk_text_buffer_insert_child_anchor #} + (toTextBuffer self) + iter + anchor + +-- | This is a convenience function which simply creates a child anchor with +-- 'textChildAnchorNew' and inserts it into the buffer with +-- 'textBufferInsertChildAnchor'. +-- +textBufferCreateChildAnchor :: TextBufferClass self => self + -> TextIter -- ^ @iter@ - location in the buffer + -> IO TextChildAnchor -- ^ returns the created child anchor +textBufferCreateChildAnchor self iter = + makeNewGObject mkTextChildAnchor $ + {# call gtk_text_buffer_create_child_anchor #} + (toTextBuffer self) + iter + +#if GTK_CHECK_VERSION(2,4,0) +-- | This function moves the \"insert\" and \"selection_bound\" marks +-- simultaneously. If you move them in two steps with 'textBufferMoveMark', you +-- will temporarily select a region in between their old and new locations, +-- which can be pretty inefficient since the temporarily-selected region will +-- force stuff to be recalculated. This function moves them as a unit, which +-- can be optimized. +-- +-- * Available since Gtk+ version 2.4 +-- +textBufferSelectRange :: TextBufferClass self => self + -> TextIter -- ^ @ins@ - where to put the \"insert\" mark + -> TextIter -- ^ @bound@ - where to put the \"selection_bound\" mark + -> IO () +textBufferSelectRange self ins bound = + {# call gtk_text_buffer_select_range #} + (toTextBuffer self) + ins + bound +#endif + +-- | Obtains the location of @anchor@ within @buffer@. +-- +textBufferGetIterAtChildAnchor :: TextBufferClass self => self + -> TextIter -- ^ @iter@ - an iterator to be initialized + -> TextChildAnchor -- ^ @anchor@ - a child anchor that appears in @buffer@ + -> IO () +textBufferGetIterAtChildAnchor self iter anchor = + {# call gtk_text_buffer_get_iter_at_child_anchor #} + (toTextBuffer self) + iter + anchor + +-- | Retrieves the first and last iterators in the buffer, i.e. the entire +-- buffer lies within the range @[start,end)@. +-- +textBufferGetBounds :: TextBufferClass self => self + -> TextIter -- ^ @start@ - iterator to initialize with first position in the + -- buffer + -> TextIter -- ^ @end@ - iterator to initialize with the end iterator + -> IO () +textBufferGetBounds self start end = + {# call gtk_text_buffer_get_bounds #} + (toTextBuffer self) + start + end + -------------------- -- Properties Index: TextView.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Multiline/TextView.chs.pp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- TextView.chs.pp 6 Apr 2005 22:20:03 -0000 1.1 +++ TextView.chs.pp 7 Apr 2005 00:50:31 -0000 1.2 @@ -124,6 +124,15 @@ textViewSetIndent, textViewGetIndent, textViewGetDefaultAttributes, + textViewGetVisibleRect, + textViewGetIterLocation, + textViewGetIterAtPosition, +#if GTK_CHECK_VERSION(2,4,0) + textViewSetOverwrite, + textViewGetOverwrite, + textViewSetAcceptsTab, + textViewGetAcceptsTab, +#endif -- * Properties textViewPixelsAboveLines, @@ -137,6 +146,10 @@ textViewIndent, textViewCursorVisible, textViewBuffer, +#if GTK_CHECK_VERSION(2,4,0) + textViewOverwrite, + textViewAcceptsTab, +#endif -- * Signals onCopyClipboard, @@ -903,6 +916,91 @@ (toTextView self) >>= makeNewTextAttributes +#if GTK_CHECK_VERSION(2,6,0) +-- | Retrieves the iterator pointing to the character at buffer coordinates +-- @x@ and @y@. Buffer coordinates are coordinates for the entire buffer, not +-- just the currently-displayed portion. If you have coordinates from an event, +-- you have to convert those to buffer coordinates with +-- 'textViewWindowToBufferCoords'. +-- +-- Note that this is diffferent from 'textViewGetIterAtLocation', which +-- returns cursor locations, i.e. positions /between/ characters. +-- +-- * Available since Gtk+ version 2.6 +-- +textViewGetIterAtPosition :: TextViewClass self => self + -> Int -- ^ @x@ - x position, in buffer coordinates + -> Int -- ^ @y@ - y position, in buffer coordinates + -> IO (TextIter, Int) -- ^ @(iter, trailing)@ - returns the iterator and + -- a \"trailing\" value which is sadly undocumented +textViewGetIterAtPosition self x y = + alloca $ \trailingPtr -> do + iter <- makeEmptyTextIter + {# call gtk_text_view_get_iter_at_position #} + (toTextView self) + iter + trailingPtr + (fromIntegral x) + (fromIntegral y) + trailing <- peek trailingPtr + return (iter, fromIntegral trailing) +#endif + +#if GTK_CHECK_VERSION(2,4,0) +-- | Changes the 'TextView' overwrite mode. +-- +-- * Available since Gtk+ version 2.4 +-- +textViewSetOverwrite :: TextViewClass self => self + -> Bool -- ^ @overwrite@ - @True@ to turn on overwrite mode, @False@ to turn + -- it off + -> IO () +textViewSetOverwrite self overwrite = + {# call gtk_text_view_set_overwrite #} + (toTextView self) + (fromBool overwrite) + +-- | Returns whether the 'TextView' is in overwrite mode or not. +-- +-- * Available since Gtk+ version 2.4 +-- +textViewGetOverwrite :: TextViewClass self => self -> IO Bool +textViewGetOverwrite self = + liftM toBool $ + {# call gtk_text_view_get_overwrite #} + (toTextView self) + +-- | Sets the behavior of the text widget when the Tab key is pressed. If +-- @acceptsTab@ is @True@ a tab character is inserted. If @acceptsTab@ is +-- @False@ the keyboard focus is moved to the next widget in the focus chain. +-- +-- * Available since Gtk+ version 2.4 +-- +textViewSetAcceptsTab :: TextViewClass self => self + -> Bool -- ^ @acceptsTab@ - @True@ if pressing the Tab key should insert a + -- tab character, @False@, if pressing the Tab key should move the + -- keyboard focus. + -> IO () +textViewSetAcceptsTab self acceptsTab = + {# call gtk_text_view_set_accepts_tab #} + (toTextView self) + (fromBool acceptsTab) + +-- | Returns whether pressing the Tab key inserts a tab characters. +-- 'textViewSetAcceptsTab'. +-- +-- * Available since Gtk+ version 2.4 +-- +textViewGetAcceptsTab :: TextViewClass self => self + -> IO Bool -- ^ returns @True@ if pressing the Tab key inserts a tab + -- character, @False@ if pressing the Tab key moves the keyboard + -- focus. +textViewGetAcceptsTab self = + liftM toBool $ + {# call gtk_text_view_get_accepts_tab #} + (toTextView self) +#endif + -------------------- -- Properties @@ -1016,6 +1114,26 @@ textViewGetBuffer textViewSetBuffer +#if GTK_CHECK_VERSION(2,4,0) +-- | Whether entered text overwrites existing contents. +-- +-- Default value: @False@ +-- +textViewOverwrite :: TextViewClass self => Attr self Bool +textViewOverwrite = Attr + textViewGetOverwrite + textViewSetOverwrite + +-- | Whether Tab will result in a tab character being entered. +-- +-- Default value: @True@ +-- +textViewAcceptsTab :: TextViewClass self => Attr self Bool +textViewAcceptsTab = Attr + textViewGetAcceptsTab + textViewSetAcceptsTab +#endif + -------------------- -- Signals |
From: Duncan C. <dun...@us...> - 2005-04-07 00:50:43
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24160 Modified Files: ChangeLog Log Message: Add bindings for lots more methods and a few properties. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.441 retrieving revision 1.442 diff -u -d -r1.441 -r1.442 --- ChangeLog 7 Apr 2005 00:41:50 -0000 1.441 +++ ChangeLog 7 Apr 2005 00:50:31 -0000 1.442 @@ -56,6 +56,18 @@ * gtk/Graphics/UI/Gtk/Pango/Enums.chs.pp: add an extra enum needed by new Label methods. + * gtk/Graphics/UI/Gtk/Multiline/TextBuffer.chs.pp: add bindings for a + few more methods. + + * gtk/Graphics/UI/Gtk/Multiline/TextView.chs.pp: add bindings for a + few new methods and a couple properties. + + * gtk/Graphics/UI/Gtk/Selectors/FileChooser.chs.pp: add binding to an + extra proerty and its getter/setter methods. + + * gtk/Graphics/UI/Gtk/Windows/Window.chs.pp: add bindings for another + 20 methods. + 2005-04-6 Duncan Coutts <du...@co...> * tools/callbackGen/gtkmarshal.list: tidy up slightly, and add |
From: Duncan C. <dun...@us...> - 2005-04-07 00:50:42
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Selectors In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24160/gtk/Graphics/UI/Gtk/Selectors Modified Files: FileChooser.chs.pp Log Message: Add bindings for lots more methods and a few properties. Index: FileChooser.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Selectors/FileChooser.chs.pp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- FileChooser.chs.pp 3 Apr 2005 14:15:35 -0000 1.8 +++ FileChooser.chs.pp 7 Apr 2005 00:50:32 -0000 1.9 @@ -172,9 +172,17 @@ fileChooserRemoveShortcutFolderURI, fileChooserListShortcutFolderURIs, fileChooserErrorDomain, + FileChooserError(..), +#if GTK_CHECK_VERSION(2,6,0) + fileChooserSetShowHidden, + fileChooserGetShowHidden, +#endif -- * Properties fileChooserUsePreviewLabel, +#if GTK_CHECK_VERSION(2,6,0) + fileChooserShowHidden, +#endif fileChooserSelectMultiple, fileChooserPreviewWidgetActive, fileChooserLocalOnly, @@ -820,6 +828,33 @@ (toFileChooser self) >>= fromStringGSList +#if GTK_CHECK_VERSION(2,6,0) +-- | Sets whether hidden files and folders are displayed in the file selector. +-- +-- * Available since Gtk+ version 2.6 +-- +fileChooserSetShowHidden :: FileChooserClass self => self + -> Bool -- ^ @showHidden@ - @True@ if hidden files and folders should be + -- displayed. + -> IO () +fileChooserSetShowHidden self showHidden = + {# call gtk_file_chooser_set_show_hidden #} + (toFileChooser self) + (fromBool showHidden) + +-- | Gets whether hidden files and folders are displayed in the file selector. +-- See 'fileChooserSetShowHidden'. +-- +-- * Available since Gtk+ version 2.6 +-- +fileChooserGetShowHidden :: FileChooserClass self => self + -> IO Bool -- ^ returns @True@ if hidden files and folders are displayed. +fileChooserGetShowHidden self = + liftM toBool $ + {# call gtk_file_chooser_get_show_hidden #} + (toFileChooser self) +#endif + -------------------- -- Properties @@ -831,6 +866,16 @@ fileChooserGetUsePreviewLabel fileChooserSetUsePreviewLabel +#if GTK_CHECK_VERSION(2,6,0) +-- | \'showHidden\' property. See 'fileChooserGetShowHidden' and +-- 'fileChooserSetShowHidden' +-- +fileChooserShowHidden :: FileChooserClass self => Attr self Bool +fileChooserShowHidden = Attr + fileChooserGetShowHidden + fileChooserSetShowHidden +#endif + -- | \'selectMultiple\' property. See 'fileChooserGetSelectMultiple' and -- 'fileChooserSetSelectMultiple' -- |
From: Duncan C. <dun...@us...> - 2005-04-07 00:42:00
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19081 Modified Files: ChangeLog Log Message: Add an extra enum needed by new Label methods. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.440 retrieving revision 1.441 diff -u -d -r1.440 -r1.441 --- ChangeLog 7 Apr 2005 00:40:15 -0000 1.440 +++ ChangeLog 7 Apr 2005 00:41:50 -0000 1.441 @@ -53,6 +53,9 @@ gtk/Graphics/UI/Gtk/Misc/EventBox.chs.pp, gtk/Graphics/UI/Gtk/Misc/Viewport.chs: simple documentation changes. + * gtk/Graphics/UI/Gtk/Pango/Enums.chs.pp: add an extra enum needed by + new Label methods. + 2005-04-6 Duncan Coutts <du...@co...> * tools/callbackGen/gtkmarshal.list: tidy up slightly, and add |
From: Duncan C. <dun...@us...> - 2005-04-07 00:42:00
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Pango In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19081/gtk/Graphics/UI/Gtk/Pango Modified Files: Enums.chs.pp Log Message: Add an extra enum needed by new Label methods. Index: Enums.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Pango/Enums.chs.pp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Enums.chs.pp 12 Feb 2005 17:19:24 -0000 1.3 +++ Enums.chs.pp 7 Apr 2005 00:41:51 -0000 1.4 @@ -31,7 +31,8 @@ Weight(..), Variant(..), Stretch(..), - Underline(..) + Underline(..), + EllipsizeMode(..) ) where {# context lib="pango" prefix="pango" #} @@ -99,3 +100,9 @@ showsPrec _ UnderlineError = shows "error" #endif +-- | The 'EllipsizeMode' type describes what sort of (if any) ellipsization +-- should be applied to a line of text. In the ellipsization process characters +-- are removed from the text in order to make it fit to a given width and +-- replaced with an ellipsis. +-- +{# enum EllipsizeMode {underscoreToCase} #} |
From: Duncan C. <dun...@us...> - 2005-04-07 00:40:29
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18263 Modified Files: ChangeLog Log Message: Simple documentation changes. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.439 retrieving revision 1.440 diff -u -d -r1.439 -r1.440 --- ChangeLog 7 Apr 2005 00:38:42 -0000 1.439 +++ ChangeLog 7 Apr 2005 00:40:15 -0000 1.440 @@ -49,6 +49,10 @@ * gtk/Graphics/UI/Gtk/Pango/Types.chs.pp: Remove support for older ghc + * gtk/Graphics/UI/Gtk/Scrolling/ScrolledWindow.chs, + gtk/Graphics/UI/Gtk/Misc/EventBox.chs.pp, + gtk/Graphics/UI/Gtk/Misc/Viewport.chs: simple documentation changes. + 2005-04-6 Duncan Coutts <du...@co...> * tools/callbackGen/gtkmarshal.list: tidy up slightly, and add |
From: Duncan C. <dun...@us...> - 2005-04-07 00:40:28
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Scrolling In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18263/gtk/Graphics/UI/Gtk/Scrolling Modified Files: ScrolledWindow.chs Log Message: Simple documentation changes. Index: ScrolledWindow.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Scrolling/ScrolledWindow.chs,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ScrolledWindow.chs 2 Apr 2005 19:57:13 -0000 1.7 +++ ScrolledWindow.chs 7 Apr 2005 00:40:15 -0000 1.8 @@ -195,10 +195,10 @@ -- child to a viewport, then adding the viewport to the scrolled window. If a -- child has native scrolling, use 'containerAdd' instead of this function. -- --- The viewport scrolls the child by moving its 'Window', and takes the size --- of the child to be the size of its toplevel 'Window'. This will be very --- wrong for most widgets that support native scrolling; for example, if you --- add a widget such as 'TreeView' with a viewport, the whole widget will +-- The viewport scrolls the child by moving its 'DrawWindow', and takes the +-- size of the child to be the size of its toplevel 'DrawWindow'. This will be +-- very wrong for most widgets that support native scrolling; for example, if +-- you add a widget such as 'TreeView' with a viewport, the whole widget will -- scroll, including the column headings. Thus, widgets with native scrolling -- support should not be used with the 'Viewport' proxy. -- |
From: Duncan C. <dun...@us...> - 2005-04-07 00:40:28
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18263/gtk/Graphics/UI/Gtk/Misc Modified Files: EventBox.chs.pp Viewport.chs Log Message: Simple documentation changes. Index: Viewport.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Misc/Viewport.chs,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Viewport.chs 2 Apr 2005 18:55:23 -0000 1.6 +++ Viewport.chs 7 Apr 2005 00:40:16 -0000 1.7 @@ -32,11 +32,14 @@ -- Stability : provisional -- Portability : portable (depends on GHC) -- --- A 'Viewport' a helper widget that adds Adjustment slots to a --- widget, i.e. the widget becomes scrollable. It can then be put into --- 'ScrolledWindow' and will behave as expected. +-- An adapter which makes widgets scrollable -- module Graphics.UI.Gtk.Misc.Viewport ( +-- * Detail +-- +-- | A 'Viewport' is a helper widget that adds Adjustment slots to a +-- widget, i.e. the widget becomes scrollable. It can then be put into +-- 'ScrolledWindow' and will behave as expected. -- * Class Hierarchy -- | Index: EventBox.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Misc/EventBox.chs.pp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- EventBox.chs.pp 2 Apr 2005 18:55:22 -0000 1.6 +++ EventBox.chs.pp 7 Apr 2005 00:40:16 -0000 1.7 @@ -51,11 +51,11 @@ castToEventBox, -- * Constructors - eventBoxNew + eventBoxNew, -- * Methods #if GTK_CHECK_VERSION(2,4,0) - ,eventBoxSetVisibleWindow, + eventBoxSetVisibleWindow, eventBoxGetVisibleWindow, eventBoxSetAboveChild, eventBoxGetAboveChild, @@ -109,7 +109,7 @@ -- The main reason to create a non input-only event box is if you want to -- set the background to a different color or draw on it. -- --- * Available since Gtk version 2.4 +-- * Available since Gtk+ version 2.4 -- eventBoxSetVisibleWindow :: EventBox -> Bool -> IO () eventBoxSetVisibleWindow self visibleWindow = @@ -120,7 +120,7 @@ -- | Returns whether the event box has a visible window. See -- 'eventBoxSetVisibleWindow' for details. -- --- * Available since Gtk version 2.4 +-- * Available since Gtk+ version 2.4 -- eventBoxGetVisibleWindow :: EventBox -> IO Bool eventBoxGetVisibleWindow self = @@ -136,7 +136,7 @@ -- -- The default is to keep the window below the child. -- --- * Available since Gtk version 2.4 +-- * Available since Gtk+ version 2.4 -- eventBoxSetAboveChild :: EventBox -> Bool -> IO () eventBoxSetAboveChild self aboveChild = @@ -147,7 +147,7 @@ -- | Returns whether the event box window is above or below the windows of its -- child. See 'eventBoxSetAboveChild' for details. -- --- * Available since Gtk version 2.4 +-- * Available since Gtk+ version 2.4 -- eventBoxGetAboveChild :: EventBox -> IO Bool eventBoxGetAboveChild self = |
From: Duncan C. <dun...@us...> - 2005-04-07 00:38:54
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Pango In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17594/gtk/Graphics/UI/Gtk/Pango Modified Files: Types.chs.pp Log Message: Remove support for ghc pre 5.04. Index: Types.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Pango/Types.chs.pp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Types.chs.pp 12 Feb 2005 17:19:25 -0000 1.2 +++ Types.chs.pp 7 Apr 2005 00:38:42 -0000 1.3 @@ -60,14 +60,9 @@ layout_iter_free :: Ptr LayoutIter -> FinalizerPtr LayoutIter layout_iter_free _ = layout_iter_free' -#elif __GLASGOW_HASKELL__>=504 - -foreign import ccall unsafe "pango_layout_iter_free" - layout_iter_free :: Ptr LayoutIter -> IO () - #else -foreign import ccall "pango_layout_iter_free" unsafe +foreign import ccall unsafe "pango_layout_iter_free" layout_iter_free :: Ptr LayoutIter -> IO () #endif @@ -89,31 +84,16 @@ pango_layout_line_unref :: Ptr LayoutLine -> FinalizerPtr LayoutLine pango_layout_line_unref _ = pango_layout_line_unref' -#elif __GLASGOW_HASKELL__>=504 - -foreign import ccall unsafe "pango_layout_line_unref" - pango_layout_line_unref :: Ptr LayoutLine -> IO () - #else -foreign import ccall "pango_layout_line_unref" unsafe +foreign import ccall unsafe "pango_layout_line_unref" pango_layout_line_unref :: Ptr LayoutLine -> IO () #endif -#if __GLASGOW_HASKELL__>=504 - foreign import ccall unsafe "pango_layout_line_ref" pango_layout_line_ref :: Ptr LayoutLine -> IO () -#else - -foreign import ccall "pango_layout_line_ref" unsafe - pango_layout_line_ref :: Ptr LayoutLine -> IO () - -#endif - - -- | A possibly partial description of font(s). -- {#pointer *PangoFontDescription as FontDescription foreign newtype #} @@ -132,14 +112,9 @@ FinalizerPtr FontDescription pango_font_description_free _ = pango_font_description_free' -#elif __GLASGOW_HASKELL__>=504 - -foreign import ccall unsafe "pango_font_description_free" - pango_font_description_free :: Ptr FontDescription -> IO () - #else -foreign import ccall "pango_font_description_free" unsafe +foreign import ccall unsafe "pango_font_description_free" pango_font_description_free :: Ptr FontDescription -> IO () #endif |
From: Duncan C. <dun...@us...> - 2005-04-07 00:38:52
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17594 Modified Files: ChangeLog Log Message: Remove support for ghc pre 5.04. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.438 retrieving revision 1.439 diff -u -d -r1.438 -r1.439 --- ChangeLog 7 Apr 2005 00:34:36 -0000 1.438 +++ ChangeLog 7 Apr 2005 00:38:42 -0000 1.439 @@ -47,6 +47,8 @@ * gtk/Graphics/UI/Gtk/Layout/Notebook.chs.pp: export a method that we already bound but not exported. + * gtk/Graphics/UI/Gtk/Pango/Types.chs.pp: Remove support for older ghc + 2005-04-6 Duncan Coutts <du...@co...> * tools/callbackGen/gtkmarshal.list: tidy up slightly, and add |
From: Duncan C. <dun...@us...> - 2005-04-07 00:35:21
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15529 Modified Files: ChangeLog Log Message: Add bindings for new methods, properties and signals. Also some other trivial changes. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.437 retrieving revision 1.438 diff -u -d -r1.437 -r1.438 --- ChangeLog 7 Apr 2005 00:23:26 -0000 1.437 +++ ChangeLog 7 Apr 2005 00:34:36 -0000 1.438 @@ -27,6 +27,26 @@ * gtk/Graphics/UI/Gtk/Gdk/Region.chs.pp: change use of deprecated function 'withObject' to 'with'. Remove support for ghc pre 5.04. + * gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBox.chs.pp: add bindings + for several new methods and properties. + + * gtk/Graphics/UI/Gtk/MenuComboToolbar/Menu.chs.pp: add one extra + method. + + * gtk/Graphics/UI/Gtk/MenuComboToolbar/MenuShell.chs.pp: add a couple + extra methods. + + * gtk/Graphics/UI/Gtk/Entry/EntryCompletion.chs.pp: add bindings for + several new methods, properties and signals. + + * gtk/Graphics/UI/Gtk/Gdk/Enums.chs: add 4 extra enums that are needed + for new Windows methods. + + * gtk/Graphics/UI/Gtk/Layout/Fixed.chs: trivial doc changes. + + * gtk/Graphics/UI/Gtk/Layout/Notebook.chs.pp: export a method that + we already bound but not exported. + 2005-04-6 Duncan Coutts <du...@co...> * tools/callbackGen/gtkmarshal.list: tidy up slightly, and add |
From: Duncan C. <dun...@us...> - 2005-04-07 00:35:05
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Gdk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15529/gtk/Graphics/UI/Gtk/Gdk Modified Files: Enums.chs Log Message: Add bindings for new methods, properties and signals. Also some other trivial changes. Index: Enums.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Gdk/Enums.chs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Enums.chs 17 Feb 2005 00:13:20 -0000 1.3 +++ Enums.chs 7 Apr 2005 00:34:49 -0000 1.4 @@ -44,7 +44,10 @@ SubwindowMode(..), VisibilityState(..), WindowState(..), - Flags(fromFlags,toFlags) + Flags(fromFlags,toFlags), + WindowEdge(..), + WindowTypeHint(..), + Gravity(..) ) where import Data.Bits ((.|.)) @@ -144,3 +147,23 @@ {#enum WindowState {underscoreToCase} deriving (Bounded)#} instance Flags WindowState + +-- | Determines a window edge or corner. +-- +{#enum WindowEdge {underscoreToCase} #} + +-- | These are hints for the window manager that indicate what type of function +-- the window has. The window manager can use this when determining decoration +-- and behaviour of the window. The hint must be set before mapping the window. +-- +-- See the extended window manager hints specification for more details about +-- window types. +-- +{#enum WindowTypeHint {underscoreToCase} #} + +-- | Defines the reference point of a window and the meaning of coordinates +-- passed to 'windowMove'. See 'windowMove' and the "implementation notes" +-- section of the extended window manager hints specification for more details. +-- +{#enum Gravity {underscoreToCase} #} + |
From: Duncan C. <dun...@us...> - 2005-04-07 00:35:05
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Layout In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15529/gtk/Graphics/UI/Gtk/Layout Modified Files: Fixed.chs Notebook.chs.pp Log Message: Add bindings for new methods, properties and signals. Also some other trivial changes. Index: Fixed.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Layout/Fixed.chs,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Fixed.chs 24 Mar 2005 17:30:59 -0000 1.5 +++ Fixed.chs 7 Apr 2005 00:34:49 -0000 1.6 @@ -104,7 +104,7 @@ -------------------- -- Constructors --- | Creates a new 'Fixed' container. +-- | Creates a new 'Fixed'. -- fixedNew :: IO Fixed fixedNew = @@ -145,8 +145,8 @@ -- | Sets whether the 'Fixed' widget is created with a separate 'DrawWindow' for -- its window or not. (By default, it will be created with no separate --- 'DrawWindow'). This function must be called while the 'Fixed' is not realized, --- for instance, immediately after the window is created. +-- 'DrawWindow'). This function must be called while the 'Fixed' is not +-- realized, for instance, immediately after the window is created. -- -- This function was added to provide an easy migration path for older -- applications which may expect 'Fixed' to have a separate window. @@ -157,7 +157,8 @@ (toFixed self) (fromBool hasWindow) --- | Gets whether the 'Fixed' has its own 'DrawWindow'. See 'fixedSetHasWindow'. +-- | Gets whether the 'Fixed' has its own 'DrawWindow'. See +-- 'fixedSetHasWindow'. -- fixedGetHasWindow :: FixedClass self => self -> IO Bool fixedGetHasWindow self = Index: Notebook.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Layout/Notebook.chs.pp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Notebook.chs.pp 2 Apr 2005 19:51:44 -0000 1.6 +++ Notebook.chs.pp 7 Apr 2005 00:34:50 -0000 1.7 @@ -81,6 +81,7 @@ notebookSetShowTabs, notebookGetShowTabs, notebookSetShowBorder, + notebookGetShowBorder, notebookSetScrollable, notebookGetScrollable, #ifndef DISABLE_DEPRECATED |
From: Duncan C. <dun...@us...> - 2005-04-07 00:35:04
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/MenuComboToolbar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15529/gtk/Graphics/UI/Gtk/MenuComboToolbar Modified Files: ComboBox.chs.pp Menu.chs.pp MenuShell.chs.pp Log Message: Add bindings for new methods, properties and signals. Also some other trivial changes. Index: ComboBox.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBox.chs.pp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ComboBox.chs.pp 2 Apr 2005 16:52:49 -0000 1.5 +++ ComboBox.chs.pp 7 Apr 2005 00:34:41 -0000 1.6 @@ -91,6 +91,25 @@ comboBoxRemoveText, comboBoxPopup, comboBoxPopdown, +#if GTK_CHECK_VERSION(2,6,0) + comboBoxGetWrapWidth, + comboBoxGetRowSpanColumn, + comboBoxGetColumnSpanColumn, + comboBoxGetActiveText, + comboBoxSetFocusOnClick, + comboBoxGetFocusOnClick, + comboBoxSetAddTearoffs, +#endif + comboBoxGetAddTearoffs, + +-- * Properties +#if GTK_CHECK_VERSION(2,6,0) + comboBoxWrapWidth, + comboBoxRowSpanColumn, + comboBoxColumnSpanColumn, + comboBoxAddTearoffs, + comboBoxFocusOnClick, +#endif -- * Signals onChanged, @@ -320,6 +339,167 @@ {# call gtk_combo_box_popdown #} (toComboBox self) +#if GTK_CHECK_VERSION(2,6,0) +-- | Returns the wrap width which is used to determine the number of columns +-- for the popup menu. If the wrap width is larger than 1, the combo box is in +-- table mode. +-- +-- * Available since Gtk+ version 2.6 +-- +comboBoxGetWrapWidth :: ComboBoxClass self => self -> IO Int +comboBoxGetWrapWidth self = + liftM fromIntegral $ + {# call gtk_combo_box_get_wrap_width #} + (toComboBox self) + +-- | Returns the column with row span information for @comboBox@. +-- +-- * Available since Gtk+ version 2.6 +-- +comboBoxGetRowSpanColumn :: ComboBoxClass self => self -> IO Int +comboBoxGetRowSpanColumn self = + liftM fromIntegral $ + {# call gtk_combo_box_get_row_span_column #} + (toComboBox self) + +-- | Returns the column with column span information for @comboBox@. +-- +-- * Available since Gtk+ version 2.6 +-- +comboBoxGetColumnSpanColumn :: ComboBoxClass self => self -> IO Int +comboBoxGetColumnSpanColumn self = + liftM fromIntegral $ + {# call gtk_combo_box_get_column_span_column #} + (toComboBox self) + +-- | Returns the currently active string in @comboBox@ or @Nothing@ if none is +-- selected. Note that you can only use this function with combo boxes +-- constructed with 'comboBoxNewText'. +-- +-- * Available since Gtk+ version 2.6 +-- +comboBoxGetActiveText :: ComboBoxClass self => self -> IO (Maybe String) +comboBoxGetActiveText self = + {# call gtk_combo_box_get_active_text #} + (toComboBox self) + >>= maybePeek readUTFString + +-- | Sets whether the popup menu should have a tearoff menu item. +-- +-- * Available since Gtk+ version 2.6 +-- +comboBoxSetAddTearoffs :: ComboBoxClass self => self + -> Bool -- ^ @addTearoffs@ - @True@ to add tearoff menu items + -> IO () +comboBoxSetAddTearoffs self addTearoffs = + {# call gtk_combo_box_set_add_tearoffs #} + (toComboBox self) + (fromBool addTearoffs) +#endif + +-- | Gets the current value of the :add-tearoffs property. +-- +comboBoxGetAddTearoffs :: ComboBoxClass self => self -> IO Bool +comboBoxGetAddTearoffs self = + liftM toBool $ + {# call gtk_combo_box_get_add_tearoffs #} + (toComboBox self) + +#if GTK_CHECK_VERSION(2,6,0) +-- | Sets whether the combo box will grab focus when it is clicked with the +-- mouse. Making mouse clicks not grab focus is useful in places like toolbars +-- where you don't want the keyboard focus removed from the main area of the +-- application. +-- +-- * Available since Gtk+ version 2.6 +-- +comboBoxSetFocusOnClick :: ComboBoxClass self => self + -> Bool -- ^ @focusOnClick@ - whether the combo box grabs focus when clicked + -- with the mouse + -> IO () +comboBoxSetFocusOnClick self focusOnClick = + {# call gtk_combo_box_set_focus_on_click #} + (toComboBox self) + (fromBool focusOnClick) + +-- | Returns whether the combo box grabs focus when it is clicked with the +-- mouse. See 'comboBoxSetFocusOnClick'. +-- +-- * Available since Gtk+ version 2.6 +-- +comboBoxGetFocusOnClick :: ComboBoxClass self => self + -> IO Bool -- ^ returns @True@ if the combo box grabs focus when it is + -- clicked with the mouse. +comboBoxGetFocusOnClick self = + liftM toBool $ + {# call gtk_combo_box_get_focus_on_click #} + (toComboBox self) +#endif + +-------------------- +-- Properties + +#if GTK_CHECK_VERSION(2,6,0) +-- | If wrap-width is set to a positive value, the list will be displayed in +-- multiple columns, the number of columns is determined by wrap-width. +-- +-- Allowed values: >= 0 +-- +-- Default value: 0 +-- +comboBoxWrapWidth :: ComboBoxClass self => Attr self Int +comboBoxWrapWidth = Attr + comboBoxGetWrapWidth + comboBoxSetWrapWidth + +-- | If this is set to a non-negative value, it must be the index of a column +-- of type @G_TYPE_INT@ in the model. +-- +-- The values of that column are used to determine how many rows a value in +-- the list will span. Therefore, the values in the model column pointed to by +-- this property must be greater than zero and not larger than wrap-width. +-- +-- Allowed values: >= -1 +-- +-- Default value: -1 +-- +comboBoxRowSpanColumn :: ComboBoxClass self => Attr self Int +comboBoxRowSpanColumn = Attr + comboBoxGetRowSpanColumn + comboBoxSetRowSpanColumn + +-- | If this is set to a non-negative value, it must be the index of a column +-- of type @G_TYPE_INT@ in the model. +-- +-- The values of that column are used to determine how many columns a value +-- in the list will span. +-- +-- Allowed values: >= -1 +-- +-- Default value: -1 +-- +comboBoxColumnSpanColumn :: ComboBoxClass self => Attr self Int +comboBoxColumnSpanColumn = Attr + comboBoxGetColumnSpanColumn + comboBoxSetColumnSpanColumn + +-- | +-- +comboBoxAddTearoffs :: ComboBoxClass self => Attr self Bool +comboBoxAddTearoffs = Attr + comboBoxGetAddTearoffs + comboBoxSetAddTearoffs + +-- | Whether the combo box grabs focus when it is clicked with the mouse. +-- +-- Default value: @True@ +-- +comboBoxFocusOnClick :: ComboBoxClass self => Attr self Bool +comboBoxFocusOnClick = Attr + comboBoxGetFocusOnClick + comboBoxSetFocusOnClick +#endif + -------------------- -- Signals Index: MenuShell.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/MenuComboToolbar/MenuShell.chs.pp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- MenuShell.chs.pp 6 Apr 2005 22:20:02 -0000 1.1 +++ MenuShell.chs.pp 7 Apr 2005 00:34:49 -0000 1.2 @@ -59,8 +59,15 @@ menuShellPrepend, menuShellInsert, menuShellDeactivate, + menuShellActivateItem, menuShellSelectItem, menuShellDeselect, +#if GTK_CHECK_VERSION(2,2,0) + menuShellSelectFirst, +#endif +#if GTK_CHECK_VERSION(2,4,0) + menuShellCancel, +#endif -- * Signals onActivateCurrent, @@ -162,6 +169,35 @@ {# call menu_shell_deselect #} (toMenuShell self) +#if GTK_CHECK_VERSION(2,2,0) +-- | Select the first visible or selectable child of the menu shell; don't +-- select tearoff items unless the only item is a tearoff item. +-- +-- * Available since Gtk+ version 2.2 +-- +menuShellSelectFirst :: MenuShellClass self => self + -> Bool -- ^ @searchSensitive@ - if @True@, search for the first selectable + -- menu item, otherwise select nothing if the first item isn't + -- sensitive. This should be @False@ if the menu is being popped up + -- initially. + -> IO () +menuShellSelectFirst self searchSensitive = + {# call gtk_menu_shell_select_first #} + (toMenuShell self) + (fromBool searchSensitive) +#endif + +#if GTK_CHECK_VERSION(2,4,0) +-- | Cancels the selection within the menu shell. +-- +-- * Available since Gtk+ version 2.4 +-- +menuShellCancel :: MenuShellClass self => self -> IO () +menuShellCancel self = + {# call gtk_menu_shell_cancel #} + (toMenuShell self) +#endif + -------------------- -- Signals Index: Menu.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/MenuComboToolbar/Menu.chs.pp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Menu.chs.pp 2 Apr 2005 16:52:49 -0000 1.5 +++ Menu.chs.pp 7 Apr 2005 00:34:49 -0000 1.6 @@ -93,6 +93,7 @@ #endif #if GTK_CHECK_VERSION(2,4,0) menuSetMonitor, + menuAttach, #endif -- * Properties @@ -344,6 +345,35 @@ {# call menu_set_monitor #} (toMenu self) (fromIntegral monitorNum) + +-- | Adds a new 'MenuItem' to a (table) menu. The number of \'cells\' that an +-- item will occupy is specified by @leftAttach@, @rightAttach@, @topAttach@ +-- and @bottomAttach@. These each represent the leftmost, rightmost, uppermost +-- and lower column and row numbers of the table. (Columns and rows are indexed +-- from zero). +-- +-- Note that this function is not related to 'menuDetach'. +-- +-- * Available since Gtk+ version 2.4 +-- +menuAttach :: (MenuClass self, MenuItemClass child) => self + -> child -- ^ @child@ - a 'MenuItem'. + -> Int -- ^ @leftAttach@ - The column number to attach the left side of the + -- item to. + -> Int -- ^ @rightAttach@ - The column number to attach the right side of + -- the item to. + -> Int -- ^ @topAttach@ - The row number to attach the top of the item to. + -> Int -- ^ @bottomAttach@ - The row number to attach the bottom of the + -- item to. + -> IO () +menuAttach self child leftAttach rightAttach topAttach bottomAttach = + {# call gtk_menu_attach #} + (toMenu self) + (toWidget child) + (fromIntegral leftAttach) + (fromIntegral rightAttach) + (fromIntegral topAttach) + (fromIntegral bottomAttach) #endif -------------------- |
From: Duncan C. <dun...@us...> - 2005-04-07 00:35:01
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Entry In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15529/gtk/Graphics/UI/Gtk/Entry Modified Files: EntryCompletion.chs.pp Log Message: Add bindings for new methods, properties and signals. Also some other trivial changes. Index: EntryCompletion.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Entry/EntryCompletion.chs.pp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- EntryCompletion.chs.pp 2 Apr 2005 19:22:04 -0000 1.8 +++ EntryCompletion.chs.pp 7 Apr 2005 00:34:49 -0000 1.9 @@ -87,9 +87,34 @@ entryCompletionDeleteAction, entryCompletionSetTextColumn, #endif +#if GTK_CHECK_VERSION(2,6,0) + entryCompletionInsertPrefix, + entryCompletionGetTextColumn, + entryCompletionSetInlineCompletion, + entryCompletionGetInlineCompletion, + entryCompletionSetPopupCompletion, + entryCompletionGetPopupCompletion, +#endif -- * Properties - entryCompletionMinimumKeyLength +#if GTK_CHECK_VERSION(2,4,0) + entryCompletionMinimumKeyLength, +#endif +#if GTK_CHECK_VERSION(2,6,0) + entryCompletionTextColumn, + entryCompletionInlineCompletion, + entryCompletionPopupCompletion, +#endif + +-- * Signals +#if GTK_CHECK_VERSION(2,6,0) + onInsertPrefix, + afterInsertPrefix, +#endif +#if GTK_CHECK_VERSION(2,4,0) + onActionActivated, + afterActionActivated, +#endif ) where import Monad (liftM) @@ -269,7 +294,79 @@ {# call gtk_entry_completion_set_text_column #} self (fromIntegral column) +#endif + +#if GTK_CHECK_VERSION(2,6,0) +-- | Requests a prefix insertion. +-- +-- * Available since Gtk+ version 2.6 +-- +entryCompletionInsertPrefix :: EntryCompletion -> IO () +entryCompletionInsertPrefix self = + {# call gtk_entry_completion_insert_prefix #} + self +-- | Returns the column in the model of the completion to get strings from. +-- +-- * Available since Gtk+ version 2.6 +-- +entryCompletionGetTextColumn :: EntryCompletion + -> IO Int -- ^ returns the column containing the strings +entryCompletionGetTextColumn self = + liftM fromIntegral $ + {# call gtk_entry_completion_get_text_column #} + self + +-- | Sets whether the common prefix of the possible completions should be +-- automatically inserted in the entry. +-- +-- * Available since Gtk+ version 2.6 +-- +entryCompletionSetInlineCompletion :: EntryCompletion + -> Bool -- ^ @inlineCompletion@ - @True@ to do inline completion + -> IO () +entryCompletionSetInlineCompletion self inlineCompletion = + {# call gtk_entry_completion_set_inline_completion #} + self + (fromBool inlineCompletion) + +-- | Returns whether the common prefix of the possible completions should be +-- automatically inserted in the entry. +-- +-- * Available since Gtk+ version 2.6 +-- +entryCompletionGetInlineCompletion :: EntryCompletion + -> IO Bool -- ^ returns @True@ if inline completion is turned on +entryCompletionGetInlineCompletion self = + liftM toBool $ + {# call gtk_entry_completion_get_inline_completion #} + self + +-- | Sets whether the completions should be presented in a popup window. +-- +-- * Available since Gtk+ version 2.6 +-- +entryCompletionSetPopupCompletion :: EntryCompletion + -> Bool -- ^ @popupCompletion@ - @True@ to do popup completion + -> IO () +entryCompletionSetPopupCompletion self popupCompletion = + {# call gtk_entry_completion_set_popup_completion #} + self + (fromBool popupCompletion) + +-- | Returns whether the completions should be presented in a popup window. +-- +-- * Available since Gtk+ version 2.6 +-- +entryCompletionGetPopupCompletion :: EntryCompletion + -> IO Bool -- ^ returns @True@ if popup completion is turned on +entryCompletionGetPopupCompletion self = + liftM toBool $ + {# call gtk_entry_completion_get_popup_completion #} + self +#endif + +#if GTK_CHECK_VERSION(2,4,0) -------------------- -- Properties @@ -284,3 +381,65 @@ entryCompletionGetMinimumKeyLength entryCompletionSetMinimumKeyLength #endif + +#if GTK_CHECK_VERSION(2,6,0) +-- | The column of the model containing the strings. +-- +-- Allowed values: >= -1 +-- +-- Default value: -1 +-- +entryCompletionTextColumn :: Attr EntryCompletion Int +entryCompletionTextColumn = Attr + entryCompletionGetTextColumn + entryCompletionSetTextColumn + +-- | Determines whether the common prefix of the possible completions should +-- be inserted automatically in the entry. +-- +-- Default value: @False@ +-- +entryCompletionInlineCompletion :: Attr EntryCompletion Bool +entryCompletionInlineCompletion = Attr + entryCompletionGetInlineCompletion + entryCompletionSetInlineCompletion + +-- | Determines whether the possible completions should be shown in a popup +-- window. +-- +-- Default value: @True@ +-- +entryCompletionPopupCompletion :: Attr EntryCompletion Bool +entryCompletionPopupCompletion = Attr + entryCompletionGetPopupCompletion + entryCompletionSetPopupCompletion +#endif + +-------------------- +-- Signals + +#if GTK_CHECK_VERSION(2,6,0) +-- | Gets emitted when the inline autocompletion is triggered. The default +-- behaviour is to make the entry display the whole prefix and select the newly +-- inserted part. +-- +-- Applications may connect to this signal in order to insert only a smaller +-- part of the @prefix@ into the entry - e.g. the entry used in the +-- 'FileChooser' inserts only the part of the prefix up to the next \'\/\'. +-- +onInsertPrefix, afterInsertPrefix :: EntryCompletionClass self => self + -> (String -> IO Bool) + -> IO (ConnectId self) +onInsertPrefix = connect_STRING__BOOL "insert_prefix" False +afterInsertPrefix = connect_STRING__BOOL "insert_prefix" True +#endif + +#if GTK_CHECK_VERSION(2,4,0) +-- | Gets emitted when an action is activated. +-- +onActionActivated, afterActionActivated :: EntryCompletionClass self => self + -> (Int -> IO ()) + -> IO (ConnectId self) +onActionActivated = connect_INT__NONE "action_activated" False +afterActionActivated = connect_INT__NONE "action_activated" True +#endif |
From: Duncan C. <dun...@us...> - 2005-04-07 00:23:42
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Gdk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8219/gtk/Graphics/UI/Gtk/Gdk Modified Files: Region.chs.pp Log Message: Change use of deprecated function 'withObject' to 'with'. Remove support for ghc pre 5.04. Index: Region.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Gdk/Region.chs.pp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Region.chs.pp 14 Mar 2005 16:54:24 -0000 1.3 +++ Region.chs.pp 7 Apr 2005 00:23:26 -0000 1.4 @@ -63,7 +63,7 @@ import Graphics.UI.Gtk.General.Structs (Point, Rectangle(..)) import Graphics.UI.Gtk.Gdk.Enums (FillRule(..), OverlapType(..)) -{# context lib="gtk" prefix="gdk" #} +{# context lib="gdk" prefix="gdk" #} {#pointer *GdkRegion as Region foreign newtype #} @@ -82,14 +82,9 @@ region_destroy :: Ptr Region -> FinalizerPtr Region region_destroy _ = region_destroy' -#elif __GLASGOW_HASKELL__>=504 - -foreign import ccall unsafe "gdk_region_destroy" - region_destroy :: Ptr Region -> IO () - #else -foreign import ccall "gdk_region_destroy" unsafe +foreign import ccall unsafe "gdk_region_destroy" region_destroy :: Ptr Region -> IO () #endif @@ -122,7 +117,7 @@ -- | Convert a rectangle to a 'Region'. -- regionRectangle :: Rectangle -> IO Region -regionRectangle rect = withObject rect $ \rectPtr -> do +regionRectangle rect = with rect $ \rectPtr -> do regPtr <- {#call unsafe region_rectangle#} (castPtr rectPtr) makeNewRegion regPtr @@ -169,7 +164,7 @@ -- | Check if a rectangle is within a region. -- regionRectIn :: Region -> Rectangle -> IO OverlapType -regionRectIn reg rect = liftM (toEnum.fromIntegral) $ withObject rect $ +regionRectIn reg rect = liftM (toEnum.fromIntegral) $ with rect $ \rPtr -> {#call unsafe region_rect_in#} reg (castPtr rPtr) -- | Move a region. @@ -189,7 +184,7 @@ -- | Updates the region to include the rectangle. -- regionUnionWithRect :: Region -> Rectangle -> IO () -regionUnionWithRect reg rect = withObject rect $ \rPtr -> +regionUnionWithRect reg rect = with rect $ \rPtr -> {#call unsafe region_union_with_rect#} reg (castPtr rPtr) -- | Intersects one region with another. |
From: Duncan C. <dun...@us...> - 2005-04-07 00:23:37
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8219 Modified Files: ChangeLog Log Message: Change use of deprecated function 'withObject' to 'with'. Remove support for ghc pre 5.04. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.436 retrieving revision 1.437 diff -u -d -r1.436 -r1.437 --- ChangeLog 7 Apr 2005 00:19:02 -0000 1.436 +++ ChangeLog 7 Apr 2005 00:23:26 -0000 1.437 @@ -24,6 +24,9 @@ gtk/Graphics/UI/Gtk/Embedding/Socket.chs: merge from generated modules. Code formatting and documentation changes. + * gtk/Graphics/UI/Gtk/Gdk/Region.chs.pp: change use of deprecated + function 'withObject' to 'with'. Remove support for ghc pre 5.04. + 2005-04-6 Duncan Coutts <du...@co...> * tools/callbackGen/gtkmarshal.list: tidy up slightly, and add |
From: Duncan C. <dun...@us...> - 2005-04-07 00:19:13
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Embedding In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5250/gtk/Graphics/UI/Gtk/Embedding Modified Files: Plug.chs Socket.chs Log Message: Merge from generated modules. Code formatting and documentation changes. Index: Plug.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Embedding/Plug.chs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Plug.chs 25 Feb 2005 01:11:33 -0000 1.3 +++ Plug.chs 7 Apr 2005 00:19:02 -0000 1.4 @@ -24,10 +24,10 @@ -- Stability : provisional -- Portability : portable (depends on GHC) -- --- Toplevel for embedding into other processes. +-- Toplevel for embedding into other processes -- module Graphics.UI.Gtk.Embedding.Plug ( --- * Description +-- * Detail -- -- | Together with 'Socket', 'Plug' provides the ability to embed widgets from -- one process into another process in a fashion that is transparent to the @@ -58,7 +58,11 @@ plugNew, -- * Methods - plugGetId + plugGetId, + +-- * Signals + onEmbedded, + afterEmbedded, ) where import Monad (liftM) @@ -75,36 +79,45 @@ -------------------- -- Constructors --- | Create a new 'Window' to hold another --- application. +-- | Creates a new plug widget inside the 'Socket' identified by @socketId@. +-- If @socketId@ is @Nothing@, the plug is left \"unplugged\" and can later be +-- plugged into a 'Socket' by 'socketAddId'. -- --- * The Plug may be constructed with a 'NativeWindowId'. In this --- the foreign application will immediatly appear in this 'Plug' --- once it is shown. If @Nothing@ is passed for @nmw@ a --- 'NativeWindowId' can be extracted from this 'Plug' --- and be passed to the application which is to be embedded. +-- If a NativeWindowId is supplied the foreign application window will +-- immediatly appear in this 'Plug' once it is shown. If @Nothing@ is passed +-- then a 'NativeWindowId' can be extracted from this 'Plug' using 'plugGetId' +-- and be passed to the application which is to be embedded. -- -plugNew :: Maybe NativeWindowId -> IO Plug -plugNew mnw = makeNewObject mkPlug $ liftM castPtr $ - {#call unsafe plug_new#} (fromIntegral (fromMaybe 0 mnw)) +plugNew :: + Maybe NativeWindowId -- ^ @socketId@ - the window ID of the socket, or + -- @Nothing@. + -> IO Plug +plugNew socketId = + makeNewObject mkPlug $ + liftM (castPtr :: Ptr Widget -> Ptr Plug) $ + {# call unsafe plug_new #} + (fromIntegral (fromMaybe 0 socketId)) -------------------- -- Methods --- | Retrieve the 'NativeWindowId'. --- --- * The result should be passed to the application which is to be embedded. --- See 'plugNew'. +-- | Gets the window ID of a 'Plug' widget, which can then be used to embed +-- this window inside another window, for instance with 'socketAddId'. -- -plugGetId :: PlugClass p => p -> IO NativeWindowId -plugGetId p = liftM fromIntegral $ {#call unsafe plug_get_id#} (toPlug p) +plugGetId :: PlugClass self => self + -> IO NativeWindowId -- ^ returns the window ID for the plug +plugGetId self = + liftM fromIntegral $ + {# call unsafe plug_get_id #} + (toPlug self) -------------------- -- Signals -- | This plug received another application. -- -onEmbedded, afterEmbedded :: PlugClass p => p -> IO () -> IO (ConnectId p) +onEmbedded, afterEmbedded :: PlugClass self => self + -> IO () + -> IO (ConnectId self) onEmbedded = connect_NONE__NONE "embedded" False afterEmbedded = connect_NONE__NONE "embedded" True - Index: Socket.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Embedding/Socket.chs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Socket.chs 25 Feb 2005 01:11:33 -0000 1.3 +++ Socket.chs 7 Apr 2005 00:19:02 -0000 1.4 @@ -24,10 +24,10 @@ -- Stability : provisional -- Portability : portable (depends on GHC) -- --- Container for widgets from other processes. +-- Container for widgets from other processes -- module Graphics.UI.Gtk.Embedding.Socket ( --- * Description +-- * Detail -- -- | Together with 'Plug', 'Socket' provides the ability to embed widgets from -- one process into another process in a fashion that is transparent to the @@ -40,6 +40,19 @@ -- this function, the socket must have been realized, and for hence, have been -- added to its parent. -- +-- * Obtaining the window ID of a socket. +-- +-- > socket <- socketNew +-- > widgetShow socket +-- > containerAdd parent socket +-- > +-- > -- The following call is only necessary if one of +-- > -- the ancestors of the socket is not yet visible. +-- > -- +-- > widgetRealize socket +-- > socketId <- socketGetId socket +-- > putStrLn ("The ID of the sockets window is " ++ show socketId) +-- -- Note that if you pass the window ID of the socket to another process that -- will create a plug in the socket, you must make sure that the socket widget -- is not destroyed until that plug is created. Violating this rule will cause @@ -107,53 +120,68 @@ -------------------- -- Constructors --- | Create a 'Container' for embedding. +-- | Create a new empty 'Socket'. -- --- * 'Socket' is a 'Container' for foreign applications --- that support the XEMBED protocol. To connect two applications the --- 'NativeWindowId' has to be passed either from this socket --- to the other application's 'Plug' or vice versa. +-- 'Socket' is a 'Container' for foreign applications that support the XEMBED +-- protocol. To connect two applications the 'NativeWindowId' has to be passed +-- either from this socket to the other application's 'Plug' or vice versa. -- socketNew :: IO Socket -socketNew = makeNewObject mkSocket $ liftM castPtr {#call unsafe socket_new#} +socketNew = + makeNewObject mkSocket $ + liftM (castPtr :: Ptr Widget -> Ptr Socket) $ + {# call unsafe socket_new #} -------------------- -- Methods --- | Insert another application into this socket. +-- | Adds an XEMBED client, such as a 'Plug', to the 'Socket'. The client may +-- be in the same process or in a different process. -- --- * Inserts the other application into this plug. The --- 'NativeWindowId' comes from the other application. +-- To embed a 'Plug' in a 'Socket', you can either create the 'Plug' with +-- @plugNew Nothing@, call 'plugGetId' to get the window ID of the plug, and +-- then pass that to the 'socketAddId', or you can call 'socketGetId' to get +-- the window ID for the socket, and call 'plugNew' passing in that ID. -- --- * The 'Socket' must have already be added into a toplevel --- window before you can make this call. +-- The 'Socket' must have already be added into a toplevel window before you +-- can make this call. -- -socketAddId :: SocketClass s => s -> NativeWindowId -> IO () -socketAddId soc nwi = {#call unsafe socket_add_id#} (toSocket soc) - (fromIntegral nwi) +socketAddId :: SocketClass self => self + -> NativeWindowId -- ^ @windowId@ - the window ID of a client + -- participating in the XEMBED protocol. + -> IO () +socketAddId self windowId = + {# call unsafe socket_add_id #} + (toSocket self) + (fromIntegral windowId) --- | Prepare to insert this application into another. +-- | Gets the window ID of a 'Socket' widget, which can then be used to create +-- a client embedded inside the socket, for instance with 'plugNew'. -- --- * The extracted 'NativeWindowId' can be passed to another --- application which can then embed this socket 'Container'. +-- The 'Socket' must have already be added into a toplevel window before you +-- can make this call. -- -socketGetId :: SocketClass s => s -> IO NativeWindowId -socketGetId soc = liftM fromIntegral $ - {#call unsafe socket_get_id#} (toSocket soc) +socketGetId :: SocketClass self => self -> IO NativeWindowId +socketGetId self = + liftM fromIntegral $ + {# call unsafe socket_get_id #} + (toSocket self) -------------------- -- Signals --- | This socket was added into another application. +-- | This signal is emitted when a client is successfully added to the socket. -- -onPlugAdded, afterPlugAdded :: SocketClass s => s -> IO () -> IO (ConnectId s) +onPlugAdded, afterPlugAdded :: SocketClass self => self + -> IO () + -> IO (ConnectId self) onPlugAdded = connect_NONE__NONE "plug-added" False afterPlugAdded = connect_NONE__NONE "plug-added" True --- | This socket was removed from another --- application. +-- | This signal is emitted when a client is removed from the socket. -- -onPlugRemoved, afterPlugRemoved :: SocketClass s => s -> IO () -> - IO (ConnectId s) +onPlugRemoved, afterPlugRemoved :: SocketClass self => self + -> IO () + -> IO (ConnectId self) onPlugRemoved = connect_NONE__NONE "plug-removed" False afterPlugRemoved = connect_NONE__NONE "plug-removed" True |