You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
|
Jul
(68) |
Aug
(4) |
Sep
|
Oct
(23) |
Nov
(95) |
Dec
(9) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(3) |
Feb
|
Mar
|
Apr
(51) |
May
(81) |
Jun
(2) |
Jul
(86) |
Aug
(143) |
Sep
(3) |
Oct
(31) |
Nov
(63) |
Dec
(90) |
2005 |
Jan
(277) |
Feb
(157) |
Mar
(99) |
Apr
(195) |
May
(151) |
Jun
(148) |
Jul
(98) |
Aug
(123) |
Sep
(20) |
Oct
(174) |
Nov
(155) |
Dec
(26) |
2006 |
Jan
(51) |
Feb
(19) |
Mar
(16) |
Apr
(12) |
May
(5) |
Jun
|
Jul
(11) |
Aug
(7) |
Sep
(10) |
Oct
(31) |
Nov
(174) |
Dec
(56) |
2007 |
Jan
(45) |
Feb
(52) |
Mar
(10) |
Apr
(5) |
May
(47) |
Jun
(16) |
Jul
(80) |
Aug
(29) |
Sep
(14) |
Oct
(59) |
Nov
(46) |
Dec
(16) |
2008 |
Jan
(10) |
Feb
(1) |
Mar
|
Apr
|
May
(49) |
Jun
(26) |
Jul
(8) |
Aug
(4) |
Sep
(25) |
Oct
(53) |
Nov
(9) |
Dec
(1) |
2009 |
Jan
(66) |
Feb
(11) |
Mar
(1) |
Apr
(14) |
May
(8) |
Jun
(1) |
Jul
(2) |
Aug
(2) |
Sep
(9) |
Oct
(23) |
Nov
(35) |
Dec
|
2010 |
Jan
(7) |
Feb
(2) |
Mar
(39) |
Apr
(19) |
May
(161) |
Jun
(19) |
Jul
(32) |
Aug
(65) |
Sep
(113) |
Oct
(120) |
Nov
(2) |
Dec
|
2012 |
Jan
|
Feb
(5) |
Mar
(4) |
Apr
(7) |
May
(9) |
Jun
(14) |
Jul
(1) |
Aug
|
Sep
(1) |
Oct
(1) |
Nov
(12) |
Dec
(2) |
2013 |
Jan
(1) |
Feb
(17) |
Mar
(4) |
Apr
(4) |
May
(9) |
Jun
|
Jul
(8) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: Duncan C. <dun...@us...> - 2004-04-30 20:52:50
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3755/gtk/misc Added Files: FileChooserWidget.chs Log Message: added new FileChooser modules and a working but incomplete demo program --- NEW FILE: FileChooserWidget.chs --- -- -*-haskell-*- -- |GIMP Toolkit (GTK) @entry Widget FileChooserWidget@ -- -- Author : Duncan Coutts -- Created: 24 April 2004 -- -- Copyright (c) 2004 Duncan Coutts -- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Library General Public -- License as published by the Free Software Foundation; either -- version 2 of the License, or (at your option) any later version. -- -- This library is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- Library General Public License for more details. -- --- Description --------------------------------------------------------------- -- -- Language: Haskell 98 Binding Module -- -- The file chooser dialog & widget is a replacement (introduced with gtk+ 2.4) -- for the old and ugly GtkFileSelection dialog. It provides a better user -- interface and an improved API -- -- This is the widget variant of the FileChooser -- module FileChooserWidget ( FileChooserWidgetClass, FileChooserWidget, FileChooserAction, fileChooserWidgetNew, fileChooserWidgetNewWithBackend, ) where import Monad (liftM) import FFI import Object {#import Hierarchy#} {#import FileChooser#} (FileChooserAction) {# context lib="gtk" prefix ="gtk" #} -- The FileChooserWidget implements the FileChooser interface -- which we model in Haskell as another instance decleration instance FileChooserClass FileChooserWidget fileChooserWidgetNew :: FileChooserAction -> IO FileChooserWidget fileChooserWidgetNew action = makeNewObject mkFileChooserWidget $ liftM castPtr $ {# call unsafe gtk_file_chooser_widget_new #} (fromIntegral $ fromEnum action) fileChooserWidgetNewWithBackend :: FileChooserAction -> String -> IO FileChooserWidget fileChooserWidgetNewWithBackend action backend = makeNewObject mkFileChooserWidget $ liftM castPtr $ withCString backend $ \strPtr -> {# call unsafe gtk_file_chooser_widget_new_with_backend #} (fromIntegral $ fromEnum action) strPtr |
From: Duncan C. <dun...@us...> - 2004-04-30 20:52:50
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/windows In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3755/gtk/windows Added Files: FileChooserDialog.chs Log Message: added new FileChooser modules and a working but incomplete demo program --- NEW FILE: FileChooserDialog.chs --- -- -*-haskell-*- -- |GIMP Toolkit (GTK) @entry Widget FileChooserDialog@ -- -- Author : Duncan Coutts -- Created: 24 April 2004 -- -- Copyright (c) 2004 Duncan Coutts -- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Library General Public -- License as published by the Free Software Foundation; either -- version 2 of the License, or (at your option) any later version. -- -- This library is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- Library General Public License for more details. -- --- Description --------------------------------------------------------------- -- -- Language: Haskell 98 Binding Module -- -- The file chooser dialog & widget is a replacement (introduced with gtk+ 2.4) -- for the old and ugly GtkFileSelection dialog. It provides a better user -- interface and an improved API -- -- This is the dialog variant of the FileChooser -- module FileChooserDialog ( FileChooserDialogClass, FileChooserDialog, fileChooserDialogNew, fileChooserDialogNewWithBackend ) where import Monad (liftM, when) import Maybe (isJust, fromJust) import FFI {#import Hierarchy#} {#import FileChooser #} import GObject (objectNew) import Object (makeNewObject) import Window import Dialog import GValue import StoreValue {# context lib="gtk" prefix ="gtk" #} -- The FileChooserDialog implements the FileChooser interface -- which we model in Haskell as another instance decleration instance FileChooserClass FileChooserDialog fileChooserDialogNew :: Maybe String -> -- Title of the dialog (or default) Maybe Window -> -- Transient parent of the dialog (or none) FileChooserAction -> -- Open or save mode for the dialog [(String, ResponseId)] -> -- buttons and their response codes IO FileChooserDialog fileChooserDialogNew title parent action buttons = internalFileChooserDialogNew title parent action buttons Nothing fileChooserDialogNewWithBackend :: Maybe String -> -- Title of the dialog (or default) Maybe Window -> -- Transient parent of the dialog (or none) FileChooserAction -> -- Open or save mode for the dialog [(String, ResponseId)] -> -- buttons and their response codes String -> -- The name of the specific filesystem backend to use IO FileChooserDialog fileChooserDialogNewWithBackend title parent action buttons backend = internalFileChooserDialogNew title parent action buttons (Just backend) -- Annoyingly, the constructor for FileChooserDialog uses varargs so we can't -- call it using the Haskell FFI. The GTK people do not consider this an api -- bug, see http://bugzilla.gnome.org/show_bug.cgi?id=141004 -- The solution is to call objectNew and add the buttons manually. internalFileChooserDialogNew :: Maybe String -> -- Title of the dialog (or default) Maybe Window -> -- Transient parent of the dialog (or none) FileChooserAction -> -- Open or save mode for the dialog [(String, ResponseId)] -> -- buttons and their response codes Maybe String -> -- The name of the backend to use (optional) IO FileChooserDialog internalFileChooserDialogNew title parent action buttons backend = do objType <- {# call unsafe gtk_file_chooser_dialog_get_type #} dialog <-makeNewObject mkFileChooserDialog $ liftM castPtr $ if (isJust backend) then with (GVstring backend) $ \backendGValue -> objectNew objType [("file-system-backend", backendGValue)] else objectNew objType [] when (isJust title) (dialog `windowSetTitle` fromJust title) when (isJust parent) (dialog `windowSetTransientFor` fromJust parent) dialog `fileChooserSetAction` action mapM_ (\(btnName, btnResponse) -> dialogAddButton dialog btnName btnResponse) buttons return dialog |
From: Duncan C. <dun...@us...> - 2004-04-30 20:44:44
|
Update of /cvsroot/gtk2hs/gtk2hs/demo/filechooser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2379/demo/filechooser Log Message: Directory /cvsroot/gtk2hs/gtk2hs/demo/filechooser added to the repository |
From: Duncan C. <dun...@us...> - 2004-04-30 20:32:53
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/general In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32489/gtk/general Modified Files: Structs.hsc Log Message: bug fix for toResponse. Can now get response code back from dialogs ok. Index: Structs.hsc =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/general/Structs.hsc,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- Structs.hsc 9 Jul 2003 22:42:44 -0000 1.20 +++ Structs.hsc 30 Apr 2004 20:32:44 -0000 1.21 @@ -527,17 +527,17 @@ fromResponse (ResponseUser i) | i > 0 = fromIntegral i toResponse :: Integral a => a -> ResponseId -toResponse -1 = ResponseNone -toResponse -2 = ResponseReject -toResponse -3 = ResponseAccept -toResponse -4 = ResponseDeleteEvent -toResponse -5 = ResponseOk -toResponse -6 = ResponseCancel -toResponse -7 = ResponseClose -toResponse -8 = ResponseYes -toResponse -9 = ResponseNo -toResponse -10 = ResponseApply -toResponse -11 = ResponseHelp +toResponse (-1) = ResponseNone +toResponse (-2) = ResponseReject +toResponse (-3) = ResponseAccept +toResponse (-4) = ResponseDeleteEvent +toResponse (-5) = ResponseOk +toResponse (-6) = ResponseCancel +toResponse (-7) = ResponseClose +toResponse (-8) = ResponseYes +toResponse (-9) = ResponseNo +toResponse (-10) = ResponseApply +toResponse (-11) = ResponseHelp toResponse i | i > 0 = ResponseUser $ fromIntegral i -- include<gdk/gdkx.h> |
From: Duncan C. <dun...@us...> - 2004-04-30 20:32:52
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32489 Modified Files: ChangeLog Log Message: bug fix for toResponse. Can now get response code back from dialogs ok. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.136 retrieving revision 1.137 diff -u -d -r1.136 -r1.137 --- ChangeLog 30 Apr 2004 13:45:22 -0000 1.136 +++ ChangeLog 30 Apr 2004 20:32:44 -0000 1.137 @@ -18,6 +18,9 @@ * gtk/general/Gtk.hs: export new modules + * gtk/general/Structs.hsc: bug fix for toResponse. Can now get + response code back from dialogs ok. + 2004-04-27 Duncan Coutts <du...@co...> * gtk/Makefile: use standard $(CPP) variable |
From: Duncan C. <dun...@us...> - 2004-04-30 13:45:41
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/general In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13720/gtk/general Modified Files: Gtk.hs Log Message: add new widgets & demo contributed by Matthew Walton also add Bin abstract class (just for completeness - it's pretty pointless) Index: Gtk.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/general/Gtk.hs,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- Gtk.hs 27 Apr 2004 18:51:16 -0000 1.20 +++ Gtk.hs 30 Apr 2004 13:45:33 -0000 1.21 @@ -35,8 +35,6 @@ -- Item : The only child of this abstract class is MenuItem. The -- three signals Item defines are therefore bound in -- MenuItem. --- Bin : This abstract widget is of no use to the user. We should --- not need the Bin and BinClass entities either. -- Editable : This should be the base class of Entry, but it is not. -- I moved everything into Entry. -- @@ -130,6 +128,7 @@ module Alignment, module AspectFrame, module HBox, + module HButtonBox, -- module Fixed, module HPaned, module Layout, @@ -139,6 +138,7 @@ #endif module Table, module VBox, + module VButtonBox, module VPaned, -- ornaments module Frame, @@ -162,6 +162,7 @@ -- abstract base classes module Box, module Container, + module Bin, module Misc, module Object, module Paned, @@ -278,8 +279,8 @@ import AspectFrame import HBox import VBox ---import HButtonBox ---import VButtonBox +import HButtonBox +import VButtonBox --import Fixed import HPaned import VPaned @@ -313,8 +314,9 @@ --import Accessible -- abstract base classes import Box ---import ButtonBox +import ButtonBox import Container +import Bin import Misc import Object import Paned |
From: Duncan C. <dun...@us...> - 2004-04-30 13:45:41
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/layout In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13720/gtk/layout Added Files: HButtonBox.chs VButtonBox.chs Log Message: add new widgets & demo contributed by Matthew Walton also add Bin abstract class (just for completeness - it's pretty pointless) --- NEW FILE: VButtonBox.chs --- -- -*-haskell-*- -- GIMP Toolkit (GTK) @entry Widget VButtonBox@ -- -- Author : Matthew Walton -- -- Created: 28 April 2004 -- -- Version $Revision: 1.1 $ from $Date: 2004/04/30 13:45:32 $ -- -- Copyright (c) 2004 Matthew Walton -- -- This file is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This file is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- @description@ -------------------------------------------------------------- -- -- -- @documentation@ ------------------------------------------------------------ -- -- -- @todo@ --------------------------------------------------------------------- module VButtonBox ( VButtonBox, VButtonBoxClass, castToVButtonBox, vButtonBoxNew ) where import Monad (liftM) import FFI import Object (makeNewObject) {#import Hierarchy#} {#import Signal#} {# context lib="gtk" prefix="gtk" #} --methods -- @constructor vButtonBoxNew@ -- vButtonBoxNew :: IO VButtonBox vButtonBoxNew = makeNewObject mkVButtonBox $ liftM castPtr {#call unsafe vbutton_box_new#} --- NEW FILE: HButtonBox.chs --- -- -*-haskell-*- -- GIMP Toolkit (GTK) @entry Widget HButtonBox@ -- -- Author : Matthew Walton -- -- Created: 29 April 2004 -- -- Version $Revision: 1.1 $ from $Date: 2004/04/30 13:45:32 $ -- -- Copyright (c) 2004 Matthew Walton -- -- This file is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This file is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- @description@ -------------------------------------------------------------- -- -- -- @documentation@ ------------------------------------------------------------ -- -- -- @todo@ --------------------------------------------------------------------- module HButtonBox( HButtonBox, HButtonBoxClass, castToHButtonBox, hButtonBoxNew ) where import Monad (liftM) import FFI import Object (makeNewObject) {#import Hierarchy#} {#import Signal#} {# context lib="gtk" prefix="gtk" #} --methods -- @constructor hButtonBoxNew@ -- hButtonBoxNew :: IO HButtonBox hButtonBoxNew = makeNewObject mkHButtonBox $ liftM castPtr {#call unsafe hbutton_box_new#} |
From: Duncan C. <dun...@us...> - 2004-04-30 13:45:41
|
Update of /cvsroot/gtk2hs/gtk2hs/demo/buttonbox In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13720/demo/buttonbox Added Files: Makefile ButtonBox.hs Log Message: add new widgets & demo contributed by Matthew Walton also add Bin abstract class (just for completeness - it's pretty pointless) --- NEW FILE: Makefile --- TOP = ../.. include $(TOP)/mk/config.mk MAIN = ButtonBox.hs APPNAME = buttonBox NEEDPACKAGES = lang gtk2 include $(TOP)/mk/common.mk --- NEW FILE: ButtonBox.hs --- module Main (Main.main) where import Gtk main :: IO () main = do initGUI -- Create a new window window <- windowNew -- Here we connect the "destroy" event to a signal handler. -- This event occurs when we call widgetDestroy on the window, -- or if we return FALSE in the "delete_event" callback. window `onDestroy` mainQuit -- Sets the border width of the window. containerSetBorderWidth window 10 hbuttonbox <- hButtonBoxNew containerAdd window hbuttonbox button1 <- buttonNewWithLabel "One" button2 <- buttonNewWithLabel "Two" boxPackStart hbuttonbox button1 PackNatural 0 boxPackStart hbuttonbox button2 PackNatural 0 -- The final step is to display this newly created widgets widgetShowAll window -- and the window -- All GTK applications must have a Gtk.main. Control ends here and -- waits for an event to occur (like a key press or mouse event). mainGUI |
From: Duncan C. <dun...@us...> - 2004-04-30 13:45:41
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13720 Modified Files: ChangeLog AUTHORS Log Message: add new widgets & demo contributed by Matthew Walton also add Bin abstract class (just for completeness - it's pretty pointless) Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.135 retrieving revision 1.136 diff -u -d -r1.135 -r1.136 --- ChangeLog 30 Apr 2004 13:12:55 -0000 1.135 +++ ChangeLog 30 Apr 2004 13:45:22 -0000 1.136 @@ -5,10 +5,18 @@ * glade/Glade.chs: fix lib prefix - * gtk/entry/EntryCompletion.chs, - * gtk/layout/Expander.chs, - * gtk/menuComboToolbar/ComboBoxEntry.chs, - * gtk/menuComboToolbar/ComboBox.chs: fix descriptions in headers + * gtk/entry/EntryCompletion.chs, gtk/layout/Expander.chs, + gtk/menuComboToolbar/ComboBoxEntry.chs, + gtk/menuComboToolbar/ComboBox.chs: fix descriptions in headers + + * gtk/abstract/ButtonBox.chs, gtk/layout/HButtonBox.chs, + gtk/layout/VButtonBox.chs, demo/buttonbox/Makefile, + demo/buttonbox/ButtonBox.hs, AUTHORS: new widgets and demo + contributed by Matthew Walton + + * gtk/abstract/Bin.chs: new (slightly pointless) abstract class + + * gtk/general/Gtk.hs: export new modules 2004-04-27 Duncan Coutts <du...@co...> @@ -18,10 +26,9 @@ * gtk/entry/Entry.chs: added new gtk 2.4 methods - * gtk/entry/EntryCompletion.chs, - * gtk/layout/Expander.chs, - * gtk/menuComboToolbar/ComboBox.chs, - * gtk/menuComboToolbar/ComboBoxEntry.chs: new gtk 2.4 modules + * gtk/entry/EntryCompletion.chs, gtk/layout/Expander.chs, + gtk/menuComboToolbar/ComboBox.chs, + gtk/menuComboToolbar/ComboBoxEntry.chs: new gtk 2.4 modules * gtk/general/Gtk.hs: export new gtk 2.4 modules Index: AUTHORS =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/AUTHORS,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- AUTHORS 7 Jan 2004 09:37:46 -0000 1.6 +++ AUTHORS 30 Apr 2004 13:45:31 -0000 1.7 @@ -9,9 +9,10 @@ (RPMs and tons of other stuff) Duncan Coutts <du...@co...> -(GtkSourceView) +(GtkSourceView, libglade) JP Bernardy <jy...@ya...> Jonas Svensson <d99...@dt...> Vincenzo Ciancia <ci...@cl...> +Matthew Walton <ma...@al...> |
From: Duncan C. <dun...@us...> - 2004-04-30 13:45:40
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/abstract In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13720/gtk/abstract Added Files: Bin.chs ButtonBox.chs Log Message: add new widgets & demo contributed by Matthew Walton also add Bin abstract class (just for completeness - it's pretty pointless) --- NEW FILE: Bin.chs --- -- -*-haskell-*- -- GIMP Toolkit (GTK) @entry Widget Bin@ -- -- Author : Duncan Coutts -- -- Created: 25 April 2004 -- -- Copyright (c) 2004 Duncan Coutts -- -- This file is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This file is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- @description@ -------------------------------------------------------------- -- -- * This abstract widget implements a container with just one child. -- module Bin ( Bin, BinClass, binGetChild ) where import FFI import Object (makeNewObject) {#import Hierarchy#} {# context lib="gtk" prefix="gtk" #} binGetChild :: BinClass bin => bin -> IO Widget binGetChild bin = makeNewObject mkWidget $ {# call gtk_bin_get_child #} (toBin bin) --- NEW FILE: ButtonBox.chs --- -- -*-haskell-*- -- GIMP Toolkit (GTK) @entry Widget ButtonBox@ -- -- Author : Matthew Walton -- -- Created: 28 April 2004 -- -- Version $Revision: 1.1 $ from $Date: 2004/04/30 13:45:32 $ -- -- Copyright (c) 2004 Matthew Walton -- -- This file is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This file is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- @description@ -------------------------------------------------------------- -- -- -- @documentation@ ------------------------------------------------------------ -- -- -- @todo@ --------------------------------------------------------------------- module ButtonBox( ButtonBox, ButtonBoxClass, castToButtonBox, buttonBoxGetLayout, buttonBoxGetChildSecondary, buttonBoxSetLayout, buttonBoxSetChildSecondary ) where import Monad (liftM) import FFI import Object (makeNewObject) {#import Hierarchy#} {#import Signal#} import Enums (ButtonBoxStyle) {# context lib="gtk" prefix="gtk" #} -- methods -- @method buttonBoxGetLayout@ Retrieve the method being used to -- arrange the buttons in the button box -- buttonBoxGetLayout :: ButtonBoxClass b => b -> IO ButtonBoxStyle buttonBoxGetLayout b = liftM (toEnum . fromIntegral) $ {#call gtk_button_box_get_layout#} (toButtonBox b) -- @method buttonBoxGetChildSecondary@ Returns whether child should appear -- in a secondary group of children -- @ref arg child@ -- buttonBoxGetChildSecondary :: (ButtonBoxClass b, WidgetClass w) => b -> w -> IO Bool buttonBoxGetChildSecondary b w = liftM toBool $ {#call gtk_button_box_get_child_secondary#} (toButtonBox b) (toWidget w) -- @method buttonBoxSetLayout@ Changes the way buttons are arranged in their container -- @ref arg layout@ -- buttonBoxSetLayout :: ButtonBoxClass b => b -> ButtonBoxStyle -> IO () buttonBoxSetLayout b l = {#call gtk_button_box_set_layout#} (toButtonBox b) ((fromIntegral . fromEnum) l) -- @method buttonBoxSetChildSecondary@ Sets whether child should appear in a secondary -- group of children. A typical use of a secondary child is the help button in a dialog. -- -- * This group appears after the other children if the style is GTK_BUTTONBOX_START, -- ButtonboxSpread or ButtonboxEdge, and before the the other children if the -- style is ButtonboxEnd. For horizontal button boxes, the definition of before/after -- depends on direction of the widget (see widgetSetDirection). If the style is -- buttonBoxStart or buttonBoxEnd, then the secondary children are aligned at -- the other end of the button box from the main children. For the other styles, -- they appear immediately next to the main children. -- @ref arg widget@ -- @ref arg is_secondary@ -- buttonBoxSetChildSecondary :: (ButtonBoxClass b, WidgetClass w) => b -> w -> Bool -> IO () buttonBoxSetChildSecondary b w s = {#call gtk_button_box_set_child_secondary #} (toButtonBox b) (toWidget w) (fromBool s) |
From: Duncan C. <dun...@us...> - 2004-04-30 13:41:12
|
Update of /cvsroot/gtk2hs/gtk2hs/demo/buttonbox In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13069/demo/buttonbox Log Message: Directory /cvsroot/gtk2hs/gtk2hs/demo/buttonbox added to the repository |
From: Duncan C. <dun...@us...> - 2004-04-30 13:13:06
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/layout In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6077/gtk/layout Modified Files: Expander.chs Log Message: fix descriptions in file headers Index: Expander.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/layout/Expander.chs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Expander.chs 27 Apr 2004 18:51:15 -0000 1.1 +++ Expander.chs 30 Apr 2004 13:12:57 -0000 1.2 @@ -1,5 +1,5 @@ --- |GIMP Toolkit (GTK) Binding for Haskell: binding to GConf -*-haskell-*- --- for storing and retrieving configuartion information +-- -*-haskell-*- +-- |GIMP Toolkit (GTK) @entry Widget Expander@ -- -- Author : Duncan Coutts -- Created: 24 April 2004 |
From: Duncan C. <dun...@us...> - 2004-04-30 13:13:06
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/menuComboToolbar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6077/gtk/menuComboToolbar Modified Files: ComboBox.chs ComboBoxEntry.chs Log Message: fix descriptions in file headers Index: ComboBoxEntry.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/menuComboToolbar/ComboBoxEntry.chs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ComboBoxEntry.chs 27 Apr 2004 18:51:15 -0000 1.1 +++ ComboBoxEntry.chs 30 Apr 2004 13:12:58 -0000 1.2 @@ -1,5 +1,5 @@ --- |GIMP Toolkit (GTK) Binding for Haskell: binding to GConf -*-haskell-*- --- for storing and retrieving configuartion information +-- -*-haskell-*- +-- |GIMP Toolkit (GTK) @entry Widget ComboBoxEntry@ -- -- Author : Duncan Coutts -- Created: 25 April 2004 Index: ComboBox.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/menuComboToolbar/ComboBox.chs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ComboBox.chs 27 Apr 2004 18:51:15 -0000 1.1 +++ ComboBox.chs 30 Apr 2004 13:12:58 -0000 1.2 @@ -1,5 +1,5 @@ --- |GIMP Toolkit (GTK) Binding for Haskell: binding to GConf -*-haskell-*- --- for storing and retrieving configuartion information +-- -*-haskell-*- +-- |GIMP Toolkit (GTK) @entry Widget ComboBox@ -- -- Author : Duncan Coutts -- Created: 25 April 2004 |
From: Duncan C. <dun...@us...> - 2004-04-30 13:13:06
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/entry In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6077/gtk/entry Modified Files: EntryCompletion.chs Log Message: fix descriptions in file headers Index: EntryCompletion.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/entry/EntryCompletion.chs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- EntryCompletion.chs 27 Apr 2004 18:51:14 -0000 1.1 +++ EntryCompletion.chs 30 Apr 2004 13:12:57 -0000 1.2 @@ -1,6 +1,6 @@ {-# OPTIONS -cpp #-} --- |GIMP Toolkit (GTK) Binding for Haskell: binding to GConf -*-haskell-*- --- for storing and retrieving configuartion information +-- -*-haskell-*- +-- |GIMP Toolkit (GTK) @entry Widget EntryCompletion@ -- -- Author : Duncan Coutts -- Created: 24 April 2004 @@ -21,9 +21,9 @@ -- -- Language: Haskell 98 Binding Module -- --- Completion functionality for the Entry widget. +-- Completion functionality for the Entry widget. -- --- Added in GTK+ 2.4 +-- Added in GTK+ 2.4 -- module EntryCompletion ( |
From: Duncan C. <dun...@us...> - 2004-04-30 13:13:06
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6077 Modified Files: ChangeLog Log Message: fix descriptions in file headers Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.134 retrieving revision 1.135 diff -u -d -r1.134 -r1.135 --- ChangeLog 30 Apr 2004 12:50:02 -0000 1.134 +++ ChangeLog 30 Apr 2004 13:12:55 -0000 1.135 @@ -5,6 +5,11 @@ * glade/Glade.chs: fix lib prefix + * gtk/entry/EntryCompletion.chs, + * gtk/layout/Expander.chs, + * gtk/menuComboToolbar/ComboBoxEntry.chs, + * gtk/menuComboToolbar/ComboBox.chs: fix descriptions in headers + 2004-04-27 Duncan Coutts <du...@co...> * gtk/Makefile: use standard $(CPP) variable |
From: Duncan C. <dun...@us...> - 2004-04-30 12:50:43
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1145 Modified Files: ChangeLog Log Message: change the other makefiles to use pre-processor on hierarchy.list minor fix in glade/Glade.chs Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.133 retrieving revision 1.134 diff -u -d -r1.133 -r1.134 --- ChangeLog 28 Apr 2004 13:50:12 -0000 1.133 +++ ChangeLog 30 Apr 2004 12:50:02 -0000 1.134 @@ -1,5 +1,12 @@ 2004-04-27 Duncan Coutts <du...@co...> + * sourceview/Makefile, + * glade/Makefile: added proprocessor pass for hierarchy.list + + * glade/Glade.chs: fix lib prefix + +2004-04-27 Duncan Coutts <du...@co...> + * gtk/Makefile: use standard $(CPP) variable 2004-04-27 Duncan Coutts <du...@co...> |
From: Duncan C. <dun...@us...> - 2004-04-30 12:50:24
|
Update of /cvsroot/gtk2hs/gtk2hs/glade In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1145/glade Modified Files: Makefile Glade.chs Log Message: change the other makefiles to use pre-processor on hierarchy.list minor fix in glade/Glade.chs Index: Makefile =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/glade/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Makefile 18 Apr 2004 18:20:50 -0000 1.3 +++ Makefile 30 Apr 2004 12:50:15 -0000 1.4 @@ -42,8 +42,8 @@ NEEDCHI = GladeType GladeType.chs : ../tools/hierarchyGen/hierarchy.list - $(strip ../tools/hierarchyGen/TypeGenerator \ - ../tools/hierarchyGen/hierarchy.list \ + $(CPP) $(GTK_CFLAGS) - < $(TOP)/tools/hierarchyGen/hierarchy.list | \ + $(strip ../tools/hierarchyGen/TypeGenerator - \ GladeType.chs \ $(addprefix --tag=,$(TYPE_TAGS))) --lib=glade --prefix=glade Index: Glade.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/glade/Glade.chs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Glade.chs 11 Dec 2003 22:48:24 -0000 1.1 +++ Glade.chs 30 Apr 2004 12:50:15 -0000 1.2 @@ -67,7 +67,7 @@ {#import GladeType#} import GList -{#context lib="libglade" prefix ="glade"#} +{#context lib="glade" prefix ="glade"#} -- |Operations |
From: Duncan C. <dun...@us...> - 2004-04-30 12:50:24
|
Update of /cvsroot/gtk2hs/gtk2hs/sourceview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1145/sourceview Modified Files: Makefile Log Message: change the other makefiles to use pre-processor on hierarchy.list minor fix in glade/Glade.chs Index: Makefile =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/sourceview/Makefile,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Makefile 16 Apr 2004 11:53:18 -0000 1.8 +++ Makefile 30 Apr 2004 12:50:03 -0000 1.9 @@ -49,8 +49,8 @@ NEEDCHI = SourceViewType SourceViewType.chs : ../tools/hierarchyGen/hierarchy.list - $(strip ../tools/hierarchyGen/TypeGenerator \ - ../tools/hierarchyGen/hierarchy.list \ + $(CPP) $(GTK_CFLAGS) - < $(TOP)/tools/hierarchyGen/hierarchy.list | \ + $(strip ../tools/hierarchyGen/TypeGenerator - \ SourceViewType.chs \ $(addprefix --tag=,$(TYPE_TAGS))) |
From: Duncan C. <dun...@us...> - 2004-04-28 13:50:57
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15569 Modified Files: ChangeLog Log Message: use standard $(CPP) makefile variable Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.132 retrieving revision 1.133 diff -u -d -r1.132 -r1.133 --- ChangeLog 27 Apr 2004 18:51:16 -0000 1.132 +++ ChangeLog 28 Apr 2004 13:50:12 -0000 1.133 @@ -1,5 +1,9 @@ 2004-04-27 Duncan Coutts <du...@co...> + * gtk/Makefile: use standard $(CPP) variable + +2004-04-27 Duncan Coutts <du...@co...> + * gtk/entry/Entry.chs: added new gtk 2.4 methods * gtk/entry/EntryCompletion.chs, |
From: Duncan C. <dun...@us...> - 2004-04-28 13:50:32
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15569/gtk Modified Files: Makefile Log Message: use standard $(CPP) makefile variable Index: Makefile =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Makefile,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- Makefile 27 Apr 2004 17:59:37 -0000 1.27 +++ Makefile 28 Apr 2004 13:50:17 -0000 1.28 @@ -208,7 +208,7 @@ endif general/Hierarchy.chs : $(TOP)/tools/hierarchyGen/hierarchy.list - cpp $(GTK_CFLAGS) $(TOP)/tools/hierarchyGen/hierarchy.list | \ + $(CPP) $(GTK_CFLAGS) - < $(TOP)/tools/hierarchyGen/hierarchy.list | \ $(strip $(TOP)/tools/hierarchyGen/TypeGenerator - \ general/Hierarchy.chs $(addprefix --tag=,$(CREATE_TYPES))) |
From: Duncan C. <dun...@us...> - 2004-04-27 18:51:25
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5286 Modified Files: ChangeLog Log Message: added new gtk 2.4 modules (Expander, ComboBox, ComboBoxEntry, EntryCompletion) and added new methods for Entry. Also exported new modules from main Gtk.hs Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.131 retrieving revision 1.132 diff -u -d -r1.131 -r1.132 --- ChangeLog 27 Apr 2004 18:07:53 -0000 1.131 +++ ChangeLog 27 Apr 2004 18:51:16 -0000 1.132 @@ -1,5 +1,14 @@ 2004-04-27 Duncan Coutts <du...@co...> + * gtk/entry/Entry.chs: added new gtk 2.4 methods + + * gtk/entry/EntryCompletion.chs, + * gtk/layout/Expander.chs, + * gtk/menuComboToolbar/ComboBox.chs, + * gtk/menuComboToolbar/ComboBoxEntry.chs: new gtk 2.4 modules + + * gtk/general/Gtk.hs: export new gtk 2.4 modules + * gtk/Makefile: added proprocessor pass to hierarchy.list before so we can selectively generate types depending on the gtk version. |
From: Duncan C. <dun...@us...> - 2004-04-27 18:51:25
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/general In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5286/gtk/general Modified Files: Gtk.hs Log Message: added new gtk 2.4 modules (Expander, ComboBox, ComboBoxEntry, EntryCompletion) and added new methods for Entry. Also exported new modules from main Gtk.hs Index: Gtk.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/general/Gtk.hs,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- Gtk.hs 13 Jul 2003 11:34:52 -0000 1.19 +++ Gtk.hs 27 Apr 2004 18:51:16 -0000 1.20 @@ -44,6 +44,8 @@ -- -- * Every module that is commented out and not mentioned above. -- +#include <gtk/gtkversion.h> + module Gtk( -- general things, initialization module General, @@ -74,6 +76,9 @@ module ToggleButton, -- numeric/text data entry module Entry, +#if GTK_CHECK_VERSION(2,4,0) + module EntryCompletion, +#endif module HScale, module VScale, module SpinButton, @@ -101,6 +106,10 @@ -- menus, combo box, toolbar module CheckMenuItem, module Combo, +#if GTK_CHECK_VERSION(2,4,0) + module ComboBox, + module ComboBoxEntry, +#endif module Menu, module MenuBar, module MenuItem, @@ -125,6 +134,9 @@ module HPaned, module Layout, module Notebook, +#if GTK_CHECK_VERSION(2,4,0) + module Expander, +#endif module Table, module VBox, module VPaned, @@ -203,6 +215,9 @@ import ToggleButton -- numeric/text data entry import Entry +#if GTK_CHECK_VERSION(2,4,0) +import EntryCompletion +#endif import HScale import VScale import SpinButton @@ -236,6 +251,10 @@ import TreeStore -- menus, combo box, toolbar import Combo +#if GTK_CHECK_VERSION(2,4,0) +import ComboBox +import ComboBoxEntry +#endif -- import ItemFactory import Menu import MenuBar @@ -266,6 +285,9 @@ import VPaned import Layout import Notebook +#if GTK_CHECK_VERSION(2,4,0) +import Expander +#endif import Table -- ornaments import Frame |
From: Duncan C. <dun...@us...> - 2004-04-27 18:51:24
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/menuComboToolbar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5286/gtk/menuComboToolbar Added Files: ComboBox.chs ComboBoxEntry.chs Log Message: added new gtk 2.4 modules (Expander, ComboBox, ComboBoxEntry, EntryCompletion) and added new methods for Entry. Also exported new modules from main Gtk.hs --- NEW FILE: ComboBoxEntry.chs --- -- |GIMP Toolkit (GTK) Binding for Haskell: binding to GConf -*-haskell-*- -- for storing and retrieving configuartion information -- -- Author : Duncan Coutts -- Created: 25 April 2004 -- -- Copyright (c) 2004 Duncan Coutts -- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Library General Public -- License as published by the Free Software Foundation; either -- version 2 of the License, or (at your option) any later version. -- -- This library is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- Library General Public License for more details. -- --- Description --------------------------------------------------------------- -- -- Language: Haskell 98 Binding Module -- -- ComboBoxEntry - a text entry field with a dropdown list -- -- Added in gtk 2.4 -- module ComboBoxEntry ( ComboBoxEntryClass, ComboBoxEntry, comboBoxEntryNew, comboBoxEntryNewWithModel, comboBoxEntryNewText, comboBoxEntrySetTextColumn, comboBoxEntryGetTextColumn, ) where import Monad (liftM) import FFI import Object (makeNewObject) import GObject (makeNewGObject) {#import Hierarchy#} {#import Signal#} {# context lib="gtk" prefix ="gtk" #} comboBoxEntryNew :: IO ComboBoxEntry comboBoxEntryNew = makeNewObject mkComboBoxEntry $ liftM castPtr $ {# call gtk_combo_box_entry_new #} comboBoxEntryNewWithModel :: TreeModel -> Int -> IO ComboBoxEntry comboBoxEntryNewWithModel model textColumn = makeNewObject mkComboBoxEntry $ liftM castPtr $ {# call gtk_combo_box_entry_new_with_model #} model (fromIntegral textColumn) comboBoxEntryNewText :: IO ComboBoxEntry comboBoxEntryNewText = makeNewObject mkComboBoxEntry $ liftM castPtr $ {# call gtk_combo_box_entry_new_text #} comboBoxEntrySetTextColumn :: ComboBoxEntryClass combo => combo -> Int -> IO () comboBoxEntrySetTextColumn combo textColumn = {# call gtk_combo_box_entry_set_text_column #} (toComboBoxEntry combo) (fromIntegral textColumn) comboBoxEntryGetTextColumn :: ComboBoxEntryClass combo => combo -> IO Int comboBoxEntryGetTextColumn combo = liftM fromIntegral $ {# call gtk_combo_box_entry_get_text_column #} (toComboBoxEntry combo) --- NEW FILE: ComboBox.chs --- -- |GIMP Toolkit (GTK) Binding for Haskell: binding to GConf -*-haskell-*- -- for storing and retrieving configuartion information -- -- Author : Duncan Coutts -- Created: 25 April 2004 -- -- Copyright (c) 2004 Duncan Coutts -- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Library General Public -- License as published by the Free Software Foundation; either -- version 2 of the License, or (at your option) any later version. -- -- This library is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- Library General Public License for more details. -- --- Description --------------------------------------------------------------- -- -- Language: Haskell 98 Binding Module -- -- ComboBox - a widget used to choose from a list of items. -- -- Added in gtk 2.4 -- module ComboBox ( ComboBoxClass, ComboBox, comboBoxNew, comboBoxNewWithModel, comboBoxSetWrapWidth, comboBoxSetRowSpanColumn, comboBoxSetColumnSpanColumn, comboBoxGetActive, comboBoxSetActive, comboBoxGetActiveIter, comboBoxSetActiveIter, comboBoxGetModel, comboBoxSetModel, comboBoxNewText, comboBoxAppendText, comboBoxInsertText, comboBoxPrependText, comboBoxRemoveText, comboBoxPopup, comboBoxPopdown ) where import Monad (liftM) import FFI import Object (makeNewObject) import GObject (makeNewGObject) {#import Hierarchy#} {#import Signal#} {#import TreeModel#} (TreeIter(..), createTreeIter) {# context lib="gtk" prefix ="gtk" #} comboBoxNew :: IO ComboBox comboBoxNew = makeNewObject mkComboBox $ liftM castPtr $ {# call gtk_combo_box_new #} comboBoxNewWithModel :: TreeModel -> IO ComboBox comboBoxNewWithModel model = makeNewObject mkComboBox $ liftM castPtr $ {# call gtk_combo_box_new_with_model #} model comboBoxSetWrapWidth :: ComboBoxClass combo => combo -> Int -> IO () comboBoxSetWrapWidth combo width = {# call gtk_combo_box_set_wrap_width #} (toComboBox combo) (fromIntegral width) comboBoxSetRowSpanColumn :: ComboBoxClass combo => combo -> Int -> IO () comboBoxSetRowSpanColumn combo rowSpan = {# call gtk_combo_box_set_row_span_column #} (toComboBox combo) (fromIntegral rowSpan) comboBoxSetColumnSpanColumn :: ComboBoxClass combo => combo -> Int -> IO () comboBoxSetColumnSpanColumn combo columnSpan = {# call gtk_combo_box_set_column_span_column #} (toComboBox combo) (fromIntegral columnSpan) comboBoxGetActive :: ComboBoxClass combo => combo -> IO (Maybe Int) comboBoxGetActive combo = do index <- {# call gtk_combo_box_get_active #} (toComboBox combo) if index == -1 then return Nothing else return (Just $ fromIntegral index) comboBoxSetActive :: ComboBoxClass combo => combo -> Int -> IO () comboBoxSetActive combo index = {# call gtk_combo_box_set_active #} (toComboBox combo) (fromIntegral index) comboBoxGetActiveIter :: ComboBoxClass combo => combo -> IO (Maybe TreeIter) comboBoxGetActiveIter combo = allocaBytes {# sizeof TreeIter #} $ \iterPtr -> do iter <- createTreeIter iterPtr wasSet <- liftM toBool $ {# call gtk_combo_box_get_active_iter #} (toComboBox combo) iter if wasSet then return (Just iter) else return Nothing comboBoxSetActiveIter :: ComboBoxClass combo => combo -> TreeIter -> IO () comboBoxSetActiveIter combo iter = {# call gtk_combo_box_set_active_iter #} (toComboBox combo) iter comboBoxGetModel :: ComboBoxClass combo => combo -> IO (Maybe TreeModel) comboBoxGetModel combo = do modelPtr <- {# call gtk_combo_box_get_model #} (toComboBox combo) if modelPtr == nullPtr then return Nothing else liftM Just $ makeNewGObject mkTreeModel (return modelPtr) comboBoxSetModel :: ComboBoxClass combo => combo -> TreeModel -> IO () comboBoxSetModel combo model = {# call gtk_combo_box_set_model #} (toComboBox combo) model comboBoxNewText :: IO ComboBox comboBoxNewText = makeNewObject mkComboBox $ liftM castPtr $ {# call gtk_combo_box_new_text #} comboBoxAppendText :: ComboBoxClass combo => combo -> String -> IO () comboBoxAppendText combo text = withUTFString text $ \strPtr -> {# call gtk_combo_box_append_text #} (toComboBox combo) strPtr comboBoxInsertText :: ComboBoxClass combo => combo -> Int -> String -> IO () comboBoxInsertText combo index text = withUTFString text $ \strPtr -> {# call gtk_combo_box_insert_text #} (toComboBox combo) (fromIntegral index) strPtr comboBoxPrependText :: ComboBoxClass combo => combo -> String -> IO () comboBoxPrependText combo text = withUTFString text $ \strPtr -> {# call gtk_combo_box_prepend_text #} (toComboBox combo) strPtr comboBoxRemoveText :: ComboBoxClass combo => combo -> Int -> IO () comboBoxRemoveText combo index = {# call gtk_combo_box_remove_text #} (toComboBox combo) (fromIntegral index) comboBoxPopup :: ComboBoxClass combo => combo -> IO () comboBoxPopup combo = {# call gtk_combo_box_popup #} (toComboBox combo) comboBoxPopdown :: ComboBoxClass combo => combo -> IO () comboBoxPopdown combo = {# call gtk_combo_box_popdown #} (toComboBox combo) |
From: Duncan C. <dun...@us...> - 2004-04-27 18:51:23
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/entry In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5286/gtk/entry Modified Files: Entry.chs Added Files: EntryCompletion.chs Log Message: added new gtk 2.4 modules (Expander, ComboBox, ComboBoxEntry, EntryCompletion) and added new methods for Entry. Also exported new modules from main Gtk.hs --- NEW FILE: EntryCompletion.chs --- {-# OPTIONS -cpp #-} -- |GIMP Toolkit (GTK) Binding for Haskell: binding to GConf -*-haskell-*- -- for storing and retrieving configuartion information -- -- Author : Duncan Coutts -- Created: 24 April 2004 -- -- Copyright (c) 2004 Duncan Coutts -- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Library General Public -- License as published by the Free Software Foundation; either -- version 2 of the License, or (at your option) any later version. -- -- This library is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- Library General Public License for more details. -- --- Description --------------------------------------------------------------- -- -- Language: Haskell 98 Binding Module -- -- Completion functionality for the Entry widget. -- -- Added in GTK+ 2.4 -- module EntryCompletion ( EntryCompletion, EntryCompletionClass, entryCompletionNew, entryCompletionGetEntry, entryCompletionSetModel, entryCompletionGetModel, entryCompletionSetMatchFunc, entryCompletionSetMinimumKeyLength, entryCompletionGetMinimumKeyLength, entryCompletionComplete, entryCompletionInsertActionText, entryCompletionInsertActionMarkup, entryCompletionDeleteAction, entryCompletionSetTextColumn ) where import Monad (liftM) import FFI import LocalData (newIORef, readIORef, writeIORef) import GObject (makeNewGObject) import Object (makeNewObject) {#import Hierarchy#} {#import Signal#} {#import TreeModel#} (TreeIter, createTreeIter) {# context lib="gtk" prefix="gtk" #} entryCompletionNew :: IO EntryCompletion entryCompletionNew = makeNewGObject mkEntryCompletion $ liftM castPtr $ {# call gtk_entry_completion_new #} entryCompletionGetEntry :: EntryCompletion -> IO (Maybe Entry) entryCompletionGetEntry ec = do entryPtr <- {# call gtk_entry_completion_get_entry #} ec if entryPtr == nullPtr then return Nothing else liftM Just $ makeNewObject mkEntry $ return (castPtr entryPtr) entryCompletionSetModel :: EntryCompletion -> TreeModel -> IO () entryCompletionSetModel ec tm = {# call gtk_entry_completion_set_model #} ec tm entryCompletionGetModel :: EntryCompletion -> IO TreeModel entryCompletionGetModel ec = makeNewGObject mkTreeModel $ {# call gtk_entry_completion_get_model #} ec entryCompletionSetMatchFunc :: EntryCompletion -> (String -> TreeIter -> IO ()) -> IO () entryCompletionSetMatchFunc ec handler = connect_GtkEntryCompletionMatchFunc ec handler entryCompletionSetMinimumKeyLength :: EntryCompletion -> Int -> IO () entryCompletionSetMinimumKeyLength ec minLength = {# call gtk_entry_completion_set_minimum_key_length #} ec (fromIntegral minLength) entryCompletionGetMinimumKeyLength :: EntryCompletion -> IO Int entryCompletionGetMinimumKeyLength ec = liftM fromIntegral $ {# call gtk_entry_completion_get_minimum_key_length #} ec entryCompletionComplete :: EntryCompletion -> IO () entryCompletionComplete ec = {# call gtk_entry_completion_complete #} ec entryCompletionInsertActionText :: EntryCompletion -> Int -> String -> IO () entryCompletionInsertActionText ec index text = withUTFString text $ \strPtr -> {# call gtk_entry_completion_insert_action_text #} ec (fromIntegral index) strPtr entryCompletionInsertActionMarkup :: EntryCompletion -> Int -> String -> IO () entryCompletionInsertActionMarkup ec index markup = withUTFString markup $ \strPtr -> {# call gtk_entry_completion_insert_action_markup #} ec (fromIntegral index) strPtr entryCompletionDeleteAction :: EntryCompletion -> Int -> IO () entryCompletionDeleteAction ec index = {# call gtk_entry_completion_delete_action #} ec (fromIntegral index) entryCompletionSetTextColumn :: EntryCompletion -> Int -> IO () entryCompletionSetTextColumn ec column = {# call gtk_entry_completion_set_text_column #} ec (fromIntegral column) ------------------------------------------------- -- Callback stuff for entryCompletionSetMatchFunc -- {#pointer GDestroyNotify#} #if __GLASGOW_HASKELL__>=504 foreign import ccall "wrapper" mkDestructor :: IO () -> IO GDestroyNotify #else foreign export dynamic mkDestructor :: IO () -> IO GDestroyNotify #endif type GtkEntryCompletionMatchFunc = Ptr EntryCompletion -> --GtkEntryCompletion *completion Ptr CChar -> --const gchar *key Ptr TreeIter -> --GtkTreeIter *iter Ptr () -> --gpointer user_data IO () #if __GLASGOW_HASKELL__>=504 foreign import ccall "wrapper" mkHandler_GtkEntryCompletionMatchFunc :: GtkEntryCompletionMatchFunc -> IO (FunPtr GtkEntryCompletionMatchFunc) #else foreign export dynamic mkHandler_GtkEntryCompletionMatchFunc :: GtkEntryCompletionMatchFunc -> IO (FunPtr GtkEntryCompletionMatchFunc) #endif connect_GtkEntryCompletionMatchFunc :: EntryCompletion -> (String -> TreeIter -> IO ()) -> IO () connect_GtkEntryCompletionMatchFunc ec user = do hPtr <- mkHandler_GtkEntryCompletionMatchFunc (\_ keyPtr iterPtr _ -> do key <- peekUTFString keyPtr iter <- createTreeIter iterPtr user key iter) dRef <- newIORef nullFunPtr dPtr <- mkDestructor $ do freeHaskellFunPtr hPtr dPtr <- readIORef dRef freeHaskellFunPtr dPtr writeIORef dRef dPtr {# call gtk_entry_completion_set_match_func #} ec (castFunPtr hPtr) nullPtr dPtr Index: Entry.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/entry/Entry.chs,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Entry.chs 9 Jul 2003 22:42:43 -0000 1.7 +++ Entry.chs 27 Apr 2004 18:51:14 -0000 1.8 @@ -1,3 +1,4 @@ +{-# OPTIONS -cpp #-} -- -*-haskell-*- -- GIMP Toolkit (GTK) @entry Widget Entry@ -- @@ -31,6 +32,8 @@ -- * A couple of signals are not bound because I could not figure out what -- they mean. Some of them do not seem to be emitted at all. -- +#include <gtk/gtkversion.h> + module Entry( Entry, EntryClass, @@ -59,6 +62,10 @@ entrySetHasFrame, entryGetWidthChars, entrySetWidthChars, +#if GTK_CHECK_VERSION(2,4,0) + entrySetCompletion, + entryGetCompletion, +#endif onEntryActivate, afterEntryActivate, onEntryChanged, @@ -81,6 +88,7 @@ import FFI import Object (makeNewObject) +import GObject (makeNewGObject) {#import Hierarchy#} {#import Signal#} import Char (ord) @@ -299,6 +307,28 @@ entrySetWidthChars ec setting = {#call entry_set_width_chars#} (toEntry ec) (fromIntegral setting) +#if GTK_CHECK_VERSION(2,4,0) +-- @method entrySetCompletion@ Sets the auxiliary completion object to use with +-- the entry. All further configuration of the completion mechanism is done on +-- completion using the GtkEntryCompletion API. +-- +-- * Since gtk 2.4 +-- +entrySetCompletion :: EntryClass ec => ec -> EntryCompletion -> IO () +entrySetCompletion ec completion = {#call gtk_entry_set_completion#} + (toEntry ec) completion + +-- @method entryGetCompletion@ Returns the auxiliary completion object currently +-- in use by entry +-- +-- * Since gtk 2.4 +-- +entryGetCompletion :: EntryClass ec => ec -> IO EntryCompletion +entryGetCompletion ec = + makeNewGObject mkEntryCompletion $ + {#call gtk_entry_get_completion#} (toEntry ec) +#endif + -- signals |
From: Duncan C. <dun...@us...> - 2004-04-27 18:51:23
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/layout In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5286/gtk/layout Added Files: Expander.chs Log Message: added new gtk 2.4 modules (Expander, ComboBox, ComboBoxEntry, EntryCompletion) and added new methods for Entry. Also exported new modules from main Gtk.hs --- NEW FILE: Expander.chs --- -- |GIMP Toolkit (GTK) Binding for Haskell: binding to GConf -*-haskell-*- -- for storing and retrieving configuartion information -- -- Author : Duncan Coutts -- Created: 24 April 2004 -- -- Copyright (c) 2004 Duncan Coutts -- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Library General Public -- License as published by the Free Software Foundation; either -- version 2 of the License, or (at your option) any later version. -- -- This library is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- Library General Public License for more details. -- --- Description --------------------------------------------------------------- -- -- Language: Haskell 98 Binding Module -- -- An Expander allows the user to hide or show its child by clicking on an -- expander triangle similar to the triangles used in a TreeView. -- -- Normally you use an expander as you would use any other descendant of GtkBin -- you create the child widget and use containerAdd to add it to the expander. -- When the expander is toggled, it will take care of showing and hiding the -- child automatically. -- -- Added in GTK+ 2.4 -- module Expander ( Expander, ExpanderClass, expanderNew, expanderNewWithMnemonic, expanderSetExpanded, expanderGetExpanded, expanderSetSpacing, expanderGetSpacing, expanderSetLabel, expanderGetLabel, expanderSetUseUnderline, expanderGetUseUnderline, expanderSetUseMarkup, expanderGetUseMarkup, expanderSetLabelWidget, expanderGetLabelWidget, onActivate, afterActivate ) where import Monad (liftM) import FFI import Object {#import Hierarchy#} import Signal {# context lib="gtk" prefix ="gtk" #} expanderNew :: String -> IO Expander expanderNew label = makeNewObject mkExpander $ liftM castPtr $ withUTFString label $ \strPtr -> {# call gtk_expander_new #} strPtr expanderNewWithMnemonic :: String -> IO Expander expanderNewWithMnemonic label = makeNewObject mkExpander $ liftM castPtr $ withUTFString label $ \strPtr -> {# call gtk_expander_new_with_mnemonic #} strPtr expanderSetExpanded :: Expander -> Bool -> IO () expanderSetExpanded expander expanded = {# call gtk_expander_set_expanded #} expander (fromBool expanded) expanderGetExpanded :: Expander -> IO Bool expanderGetExpanded expander = liftM toBool $ {# call gtk_expander_get_expanded #} expander expanderSetSpacing :: Expander -> Int -> IO () expanderSetSpacing expander spacing = {# call gtk_expander_set_spacing #} expander (fromIntegral spacing) expanderGetSpacing :: Expander -> IO Int expanderGetSpacing expander = liftM fromIntegral $ {# call gtk_expander_get_spacing #} expander expanderSetLabel :: Expander -> String -> IO () expanderSetLabel expander label = withUTFString label $ \strPtr -> {# call gtk_expander_set_label #} expander strPtr expanderGetLabel :: Expander -> IO String expanderGetLabel expander = do strPtr <- {# call gtk_expander_get_label #} expander peekUTFString strPtr expanderSetUseUnderline :: Expander -> Bool -> IO () expanderSetUseUnderline expander useUnderline = {# call gtk_expander_set_use_underline #} expander (fromBool useUnderline) expanderGetUseUnderline :: Expander -> IO Bool expanderGetUseUnderline expander = liftM toBool $ {# call gtk_expander_get_use_underline #} expander expanderSetUseMarkup :: Expander -> Bool -> IO () expanderSetUseMarkup expander useMarkup = {# call gtk_expander_set_use_markup #} expander (fromBool useMarkup) expanderGetUseMarkup :: Expander -> IO Bool expanderGetUseMarkup expander = liftM toBool $ {# call gtk_expander_get_use_markup #} expander expanderSetLabelWidget :: WidgetClass widget => Expander -> widget -> IO () expanderSetLabelWidget expander widget = {# call gtk_expander_set_label_widget #} expander (toWidget widget) expanderGetLabelWidget :: Expander -> IO Widget expanderGetLabelWidget expander = makeNewObject mkWidget $ {# call gtk_expander_get_label_widget #} expander onActivate :: Expander -> IO () -> IO (ConnectId Expander) afterActivate :: Expander -> IO () -> IO (ConnectId Expander) onActivate = connect_NONE__NONE "activate" False afterActivate = connect_NONE__NONE "activate" True |