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-07-24 02:31:14
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/abstract In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9436/gtk/abstract Modified Files: FileChooser.chs Log Message: spelling fix Index: FileChooser.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/abstract/FileChooser.chs,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- FileChooser.chs 16 Jul 2004 15:13:00 -0000 1.5 +++ FileChooser.chs 24 Jul 2004 02:31:05 -0000 1.6 @@ -93,7 +93,7 @@ import Object (makeNewObject) import Signal {#import GList#} -import GError (propogateGError) +import GError (propagateGError) {# context lib="gtk" prefix ="gtk" #} @@ -285,7 +285,7 @@ fileChooserAddShortcutFolder :: FileChooserClass chooser => chooser -> String -> IO () fileChooserAddShortcutFolder chooser foldername = - propogateGError $ \gerrorPtr -> + propagateGError $ \gerrorPtr -> withCString foldername $ \strPtr -> do {# call gtk_file_chooser_add_shortcut_folder #} (toFileChooser chooser) strPtr gerrorPtr @@ -293,7 +293,7 @@ fileChooserRemoveShortcutFolder :: FileChooserClass chooser => chooser -> String -> IO () fileChooserRemoveShortcutFolder chooser foldername = - propogateGError $ \gerrorPtr -> + propagateGError $ \gerrorPtr -> withCString foldername $ \strPtr -> do {# call gtk_file_chooser_remove_shortcut_folder #} (toFileChooser chooser) strPtr gerrorPtr @@ -307,7 +307,7 @@ fileChooserAddShortcutFolderURI :: FileChooserClass chooser => chooser -> String -> IO () fileChooserAddShortcutFolderURI chooser folderuri = - propogateGError $ \gerrorPtr -> + propagateGError $ \gerrorPtr -> withCString folderuri $ \strPtr -> do {# call gtk_file_chooser_add_shortcut_folder_uri #} (toFileChooser chooser) strPtr gerrorPtr @@ -315,7 +315,7 @@ fileChooserRemoveShortcutFolderURI :: FileChooserClass chooser => chooser -> String -> IO () fileChooserRemoveShortcutFolderURI chooser folderuri = - propogateGError $ \gerrorPtr -> + propagateGError $ \gerrorPtr -> withCString folderuri $ \strPtr -> do {# call gtk_file_chooser_remove_shortcut_folder_uri #} (toFileChooser chooser) strPtr gerrorPtr |
From: Duncan C. <dun...@us...> - 2004-07-17 04:05:22
|
Update of /cvsroot/gtk2hs/gtk2hs/tools/callbackGen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31965/tools/callbackGen Modified Files: Signal.chs-boot2 Log Message: import GError Index: Signal.chs-boot2 =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/callbackGen/Signal.chs-boot2,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Signal.chs-boot2 15 Nov 2003 09:46:20 -0000 1.1 +++ Signal.chs-boot2 17 Jul 2004 04:05:13 -0000 1.2 @@ -8,6 +8,7 @@ import FFI import LocalData import GObject (objectRef, objectUnref) +import GError (failOnGError) {#import Hierarchy#} {#context lib="gtk" prefix="gtk" #} |
From: Duncan C. <dun...@us...> - 2004-07-17 04:05:22
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31965 Modified Files: ChangeLog Log Message: import GError Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.179 retrieving revision 1.180 diff -u -d -r1.179 -r1.180 --- ChangeLog 17 Jul 2004 04:01:57 -0000 1.179 +++ ChangeLog 17 Jul 2004 04:05:13 -0000 1.180 @@ -6,6 +6,8 @@ * tools/callbackGen/HookGenerator.hs: wrap callbacks in GError exception handler. + * tools/callbackGen/Signal.chs-boot2: import GError + 2004-07-16 Duncan Coutts <du...@co...> * gtk/glib/GError.chs: new module for dealing with GErrors |
From: Duncan C. <dun...@us...> - 2004-07-17 04:02:07
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31461 Modified Files: ChangeLog Log Message: added extra function for converting GError exceptions to ordinary user errors and use it in the callback generator to wrap callbacks in GError exception handler. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.178 retrieving revision 1.179 diff -u -d -r1.178 -r1.179 --- ChangeLog 16 Jul 2004 15:12:59 -0000 1.178 +++ ChangeLog 17 Jul 2004 04:01:57 -0000 1.179 @@ -1,3 +1,11 @@ +2004-07-17 Duncan Coutts <du...@co...> + + * gtk/glib/GError.chs: extra function for converting GError exceptions + to ordinary user errors. + + * tools/callbackGen/HookGenerator.hs: wrap callbacks in GError + exception handler. + 2004-07-16 Duncan Coutts <du...@co...> * gtk/glib/GError.chs: new module for dealing with GErrors |
From: Duncan C. <dun...@us...> - 2004-07-17 04:02:07
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/glib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31461/gtk/glib Modified Files: GError.chs Log Message: added extra function for converting GError exceptions to ordinary user errors and use it in the callback generator to wrap callbacks in GError exception handler. Index: GError.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/glib/GError.chs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- GError.chs 16 Jul 2004 15:14:47 -0000 1.1 +++ GError.chs 17 Jul 2004 04:01:57 -0000 1.2 @@ -59,6 +59,7 @@ handleGErrorJust, handleGErrorJustDomain, + failOnGError, throwGError, -- * Checking for GErrors returned by glib\/gtk functions @@ -271,3 +272,7 @@ -- | A verson of 'handleGErrorJustDomain' with the arguments swapped around. handleGErrorJustDomain :: GErrorClass err => (err -> GErrorMessage -> IO a) -> IO a -> IO a handleGErrorJustDomain = flip catchGErrorJustDomain + +-- | Catch all GError exceptions and convert them into a general failure. +failOnGError :: IO a -> IO a +failOnGError action = catchGError action (\(GError dom code msg) -> fail msg) |
From: Duncan C. <dun...@us...> - 2004-07-17 04:02:06
|
Update of /cvsroot/gtk2hs/gtk2hs/tools/callbackGen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31461/tools/callbackGen Modified Files: HookGenerator.hs Log Message: added extra function for converting GError exceptions to ordinary user errors and use it in the callback generator to wrap callbacks in GError exception handler. Index: HookGenerator.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/callbackGen/HookGenerator.hs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- HookGenerator.hs 15 Nov 2003 09:46:20 -0000 1.1 +++ HookGenerator.hs 17 Jul 2004 04:01:58 -0000 1.2 @@ -463,7 +463,7 @@ indent 1.ss "after obj user =". indent 1.ss "do". indent 2.ss "hPtr <- mkHandler_".ident. - indent 3.ss "(\\_ ".mkLambdaArgs sig.ss "-> do". + indent 3.ss "(\\_ ".mkLambdaArgs sig.ss "-> failOnGError $ do". mkMarshExec sig. indent 4.ss "liftM ".mkMarshRet sig.ss " $". indent 5.ss "user".mkFuncArgs sig. |
From: Duncan C. <dun...@us...> - 2004-07-16 15:14:55
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/glib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32342/gtk/glib Added Files: GError.chs Log Message: new module for dealing with GErrors (oops this should have been comitted before the other patches) --- NEW FILE: GError.chs --- -- -*-haskell-*- -- GIMP Toolkit (GTK) GError API -- -- Author : Duncan Coutts -- Created: 2 July 2004 -- -- Copyright (c) 2004 Duncan Coutts -- parts derived from Structs.hsc Copyright (c) 1999..2002 Axel Simon -- -- 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. -- -- | -- -- Error Reporting, glib's system for reporting errors. -- -- 'GError's are used by glib to report recoverable runtime errors. -- -- This module provides functions for checking glib\/gtk functions that report -- 'GError's. It also provides functions for throwing and catching 'GError's as -- Haskell exceptions. -- module GError ( -- * Data types -- GError(..), GErrorDomain, GErrorCode, GErrorMessage, -- * Catching GError exceptions -- | To catch GError exceptions thrown by gtk2hs functions use the catchGError* -- or handleGError* functions. They work in a similar way to the standard -- 'Control.Exception.catch' and 'Control.Exception.handle' functions. -- -- 'catchGError'\/'handleGError' catches all GError exceptions, you provide a -- handler function that gets given the GError if an exception was thrown. This -- is the most general but is probably not what you want most of the time. It -- just gives you the raw error code rather than a Haskell enumeration of the -- error codes. Most of the time you will only want to catch a specific error -- or any error from a specific error domain. To catch just a single specific -- error use 'catchGErrorJust'\/'handleGErrorJust'. To catch any error in a -- particular error domain use 'catchGErrorJustDomain'\/'handleGErrorJustDomain' -- catchGError, catchGErrorJust, catchGErrorJustDomain, handleGError, handleGErrorJust, handleGErrorJustDomain, throwGError, -- * Checking for GErrors returned by glib\/gtk functions -- | * Note, these functions are only useful to implementors -- -- If you are wrapping a new API that reports 'GError's you should probably use -- 'propogateGError' to convert the GError into an exception. You should also -- note in the documentation for the function that it throws GError exceptions -- and the Haskell enumeration for the expected glib GError domain(s), so that -- users know what exceptions they might want to catch. -- -- If you think it is more appropriate to use an alternate return value (eg -- Either\/Maybe) then you should use 'checkGError' or 'checkGErrorWithCont'. GErrorClass(..), propogateGError, checkGError, checkGErrorWithCont ) where import FFI import Monad (when) import Control.Exception import Data.Dynamic import Data.Typeable {# context lib="gtk" prefix ="gtk" #} -- | A GError consists of a domain, code and a human readable message. data GError = GError !GErrorDomain !GErrorCode !GErrorMessage deriving Typeable type GQuark = {#type GQuark #} -- | A code used to identify the \'namespace\' of the error. Within each error -- domain all the error codes are defined in an enumeration. Each gtk\/gnome -- module that uses GErrors has its own error domain. The rationale behind -- using error domains is so that each module can organise its own error codes -- without having to coordinate on a global error code list. type GErrorDomain = GQuark -- | A code to identify a specific error within a given 'GErrorDomain'. Most of -- time you will not need to deal with this raw code since there is an -- enumeration type for each error domain. Of course which enumeraton to use -- depends on the error domain, but if you use 'catchGErrorJustDomain' or -- 'handleGErrorJustDomain', this is worked out for you automatically. type GErrorCode = Int -- | A human readable error message. type GErrorMessage = String instance Storable GError where sizeOf _ = {#sizeof GError #} alignment _ = alignment (undefined:: GQuark) peek ptr = do (domain :: GQuark) <- {#get GError->domain #} ptr (code :: {#type gint #}) <- {#get GError->code #} ptr (msgPtr :: CString) <- {#get GError->message #} ptr msg <- peekUTFString msgPtr return $ GError (fromIntegral domain) (fromIntegral code) msg poke _ = error "GError::poke: not implemented" -- | Each error domain's error enumeration type should be an instance of this -- class. This class helps to hide the raw error and domain codes from the -- user. This interface should be implemented by calling the approrpiate -- @{error_domain}_error_quark@. It is safe to use 'unsafePerformIO' for this. -- -- Example for 'PixbufError': -- -- > instance GErrorClass PixbufError where -- > gerrorDomain _ = unsafePerformIO {#call unsafe pixbuf_error_quark#} -- class Enum err => GErrorClass err where gerrorDomain :: err -> GErrorDomain -- ^ This must not use the value of its parameter -- so that it is safe to pass 'undefined'. -- | Glib functions which report 'GError's take as a parameter a @GError **error@. -- Use this function to supply such a parameter. It checks if an error was -- reported and if so throws it as a Haskell exception. -- -- Example of use: -- -- > propogateGError $ \gerrorPtr -> -- > {# call g_some_function_that_might_return_an_error #} a b gerrorPtr -- propogateGError :: (Ptr (Ptr ()) -> IO a) -> IO a propogateGError action = checkGError action throwGError -- | Like 'propogateGError' but instead of throwing the GError as an exception -- handles the error immediately using the supplied error handler. -- -- Example of use: -- -- > checkGError -- > (\gerrorPtr -> {# call g_some_function_that_might_return_an_error #} a b gerrorPtr) -- > (\(GError domain code msg) -> ...) -- checkGError :: (Ptr (Ptr ()) -> IO a) -> (GError -> IO a) -> IO a checkGError action handler = alloca $ \(errPtrPtr :: Ptr (Ptr GError)) -> do poke errPtrPtr nullPtr result <- action (castPtr errPtrPtr) errPtr <- peek errPtrPtr if errPtr == nullPtr then return result else do gerror <- peek errPtr {# call unsafe g_error_free #} (castPtr errPtr) handler gerror -- | Like 'checkGError' but with an extra continuation applied to the result. -- This can be useful when something needs to be done after making the call -- to the function that can raise an error but is should only be done if there -- was no error. -- -- Example of use: -- -- > checkGErrorWithCont (\gerrorPtr -> -- > {# call g_some_function_that_might_return_an_error #} a b gerrorPtr) -- > (\(GError domain code msg) -> ...) -- what to do in case of error -- > (\result -> ...) -- what to do after if no error -- checkGErrorWithCont :: (Ptr (Ptr ()) -> IO b) -> (GError -> IO a) -> (b -> IO a) -> IO a checkGErrorWithCont action handler cont = alloca $ \(errPtrPtr :: Ptr (Ptr GError)) -> do poke errPtrPtr nullPtr result <- action (castPtr errPtrPtr) errPtr <- peek errPtrPtr if errPtr == nullPtr then cont result else do gerror <- peek errPtr {# call unsafe g_error_free #} (castPtr errPtr) handler gerror -- | Use this if you need to explicitly throw a GError or re-throw an existing -- GError that you do not wish to handle. throwGError :: GError -> IO a throwGError gerror = throwIO (DynException (toDyn gerror)) -- | This will catch any GError exception. The handler function will receive the -- raw GError. This is probably only useful when you want to take some action -- that does not depend on which GError exception has occured, otherwise it -- would be better to use either 'catchGErrorJust' or 'catchGErrorJustDomain'. -- For example: -- -- > catchGError -- > (do ... -- > ...) -- > (\(GError dom code msg) -> fail msg) -- catchGError :: IO a -- ^ The computation to run -> (GError -> IO a) -- ^ Handler to invoke if an exception is raised -> IO a catchGError action handler = catchDyn action handler -- | This will catch just a specific GError exception. If you need to catch a -- range of related errors, 'catchGErrorJustDomain' is probably more -- appropriate. Example: -- -- > do image <- catchGErrorJust PixbufErrorCorruptImage -- > loadImage -- > (\errorMessage -> do log errorMessage -- > return mssingImagePlaceholder) -- catchGErrorJust :: GErrorClass err => err -- ^ The error to catch -> IO a -- ^ The computation to run -> (GErrorMessage -> IO a) -- ^ Handler to invoke if an exception is raised -> IO a catchGErrorJust code action handler = catchGError action handler' where handler' gerror@(GError domain code' msg) | fromIntegral domain == gerrorDomain code && code' == fromEnum code = handler msg | otherwise = throwGError gerror -- | Catch all GErrors from a particular error domain. The handler function -- should just deal with one error enumeration type. If you need to catch -- errors from more than one error domain, use this function twice with an -- appropriate handler functions for each. -- -- > catchGErrorJustDomain -- > loadImage -- > (\err message -> case err of -- > PixbufErrorCorruptImage -> ... -- > PixbufErrorInsufficientMemory -> ... -- > PixbufErrorUnknownType -> ... -- > _ -> ...) -- catchGErrorJustDomain :: GErrorClass err => IO a -- ^ The computation to run -> (err -> GErrorMessage -> IO a) -- ^ Handler to invoke if an exception is raised -> IO a catchGErrorJustDomain action (handler :: err -> GErrorMessage -> IO a) = catchGError action handler' where handler' gerror@(GError domain code msg) | fromIntegral domain == gerrorDomain (undefined::err) = handler (toEnum code) msg | otherwise = throwGError gerror -- | A verson of 'catchGError' with the arguments swapped around. -- -- > handleGError (\(GError dom code msg) -> ...) $ -- > ... -- handleGError :: (GError -> IO a) -> IO a -> IO a handleGError = flip catchGError -- | A verson of 'handleGErrorJust' with the arguments swapped around. handleGErrorJust :: GErrorClass err => err -> (GErrorMessage -> IO a) -> IO a -> IO a handleGErrorJust code = flip (catchGErrorJust code) -- | A verson of 'handleGErrorJustDomain' with the arguments swapped around. handleGErrorJustDomain :: GErrorClass err => (err -> GErrorMessage -> IO a) -> IO a -> IO a handleGErrorJustDomain = flip catchGErrorJustDomain |
From: Duncan C. <dun...@us...> - 2004-07-16 15:13:09
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/gdk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31896/gtk/gdk Modified Files: Pixbuf.chs Log Message: changed a couple of modules to use the new GError module also fixed some documentation FIXMEs Index: Pixbuf.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/gdk/Pixbuf.chs,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Pixbuf.chs 23 May 2004 15:55:36 -0000 1.7 +++ Pixbuf.chs 16 Jul 2004 15:13:00 -0000 1.8 @@ -86,7 +86,9 @@ import GObject import Monad -import Structs (GError(..), GQuark, Rectangle(..)) +import Structs (Rectangle(..)) +import GError (GError(..), GErrorClass(..), GErrorDomain, + checkGError, checkGErrorWithCont) import LocalData (unsafePerformIO) import Exception (bracket) import LocalData ((.|.), shiftL) @@ -165,10 +167,19 @@ if (resPtr==nullPtr) then return Nothing else liftM Just $ peekUTFString resPtr --- pixbufErrorDomain -- helper function -pixbufErrorDomain :: GQuark +-- helper functions +pixbufErrorDomain :: GErrorDomain pixbufErrorDomain = unsafePerformIO {#call unsafe pixbuf_error_quark#} +instance GErrorClass PixbufError where + gerrorDomain _ = pixbufErrorDomain + +handlePixbufError :: GError -> IO (PixbufError,String) +handlePixbufError (GError dom code msg) + | dom == pixbufErrorDomain = return (toEnum code, msg) + | otherwise = fail msg + + -- | Load an image synchonously. -- -- * Use this function to load only small images as this call will block. @@ -179,17 +190,13 @@ -- those in 'PixbufError', an exception is thrown. -- pixbufNewFromFile :: FilePath -> IO (Either (PixbufError,String) Pixbuf) -pixbufNewFromFile fname = withUTFString fname $ \strPtr -> - alloca $ \errPtrPtr -> do - pbPtr <- {#call unsafe pixbuf_new_from_file#} strPtr (castPtr errPtrPtr) - if pbPtr/=nullPtr then liftM Right $ makeNewGObject mkPixbuf (return pbPtr) - else do - errPtr <- peek errPtrPtr - (GError dom code msg) <- peek errPtr - if dom==pixbufErrorDomain then - return (Left (toEnum (fromIntegral code), msg)) - else - error msg +pixbufNewFromFile fname = + checkGErrorWithCont + (\errPtrPtr -> + withUTFString fname $ \strPtr -> + {#call unsafe pixbuf_new_from_file#} strPtr errPtrPtr) + (\gerror -> liftM Left $ handlePixbufError gerror) + (\pbPtr -> liftM Right $ makeNewGObject mkPixbuf (return pbPtr)) -- | A string representing an image file format. -- @@ -222,26 +229,20 @@ pixbufSave pb fname iType options = let (keys, values) = unzip options in let optLen = length keys in - withUTFString fname $ \fnPtr -> - withUTFString iType $ \tyPtr -> - allocaArray0 optLen $ \keysPtr -> - allocaArray optLen $ \valuesPtr -> - alloca $ \errPtrPtr -> do - keyPtrs <- mapM newUTFString keys - valuePtrs <- mapM newUTFString values - pokeArray keysPtr keyPtrs - pokeArray valuesPtr valuePtrs - res <- {#call unsafe pixbuf_savev#} pb fnPtr tyPtr keysPtr valuesPtr - (castPtr errPtrPtr) - mapM_ free keyPtrs - mapM_ free valuePtrs - if not (toBool res) then return Nothing else do - errPtr <- peek errPtrPtr - (GError dom code msg) <- peek errPtr - if dom==pixbufErrorDomain then - return (Just (toEnum (fromIntegral code), msg)) - else - error msg + checkGError (\errPtrPtr -> + withUTFString fname $ \fnPtr -> + withUTFString iType $ \tyPtr -> + allocaArray0 optLen $ \keysPtr -> + allocaArray optLen $ \valuesPtr -> do + keyPtrs <- mapM newUTFString keys + valuePtrs <- mapM newUTFString values + pokeArray keysPtr keyPtrs + pokeArray valuesPtr valuePtrs + {#call unsafe pixbuf_savev#} pb fnPtr tyPtr keysPtr valuesPtr errPtrPtr + mapM_ free keyPtrs + mapM_ free valuePtrs + return Nothing) + (\gerror -> liftM Just $ handlePixbufError gerror) -- | Create a new image in memory. -- @@ -335,24 +336,23 @@ -- | How an image is scaled. -- --- --- * DOCFIXME(constructor): InterpNearest Nearest neighbor sampling; this is the +-- [@InterpNearest@] Nearest neighbor sampling; this is the -- fastest and lowest quality mode. Quality is normally unacceptable when -- scaling down, but may be OK when scaling up. -- --- * DOCFIXME(constructor): InterpTiles This is an accurate simulation of the +-- [@InterpTiles@] This is an accurate simulation of the -- PostScript image operator without any interpolation enabled. Each -- pixel is rendered as a tiny parallelogram of solid color, the edges of -- which are implemented with antialiasing. It resembles nearest neighbor -- for enlargement, and bilinear for reduction. -- --- * DOCFIXME(constructor): InterpBilinear Best quality\/speed balance; use this +-- [@InterpBilinear@] Best quality\/speed balance; use this -- mode by default. Bilinear interpolation. For enlargement, it is -- equivalent to point-sampling the ideal bilinear-interpolated -- image. For reduction, it is equivalent to laying down small tiles and -- integrating over the coverage area. -- --- * DOCFIXME(constructor): InterpHyper This is the slowest and highest quality +-- [@InterpHyper@] This is the slowest and highest quality -- reconstruction function. It is derived from the hyperbolic filters in -- Wolberg's \"Digital Image Warping\", and is formally defined as the -- hyperbolic-filter sampling the ideal hyperbolic-filter interpolated @@ -367,10 +367,9 @@ -- unaffected. -- -- * @interp@ affects the quality and speed of the scaling function. --- DOCFIXME(constructor): InterpNearest is the fastest option but yields very poor --- quality when scaling down. DOCFIXME(constructor): InterpBilinear is a good --- trade-off between speed and quality and should thus be used as a --- default. +-- 'InterpNearest' is the fastest option but yields very poor quality +-- when scaling down. 'InterpBilinear' is a good trade-off between +-- speed and quality and should thus be used as a default. -- pixbufScaleSimple :: Pixbuf -> Int -> Int -> InterpType -> IO Pixbuf pixbufScaleSimple pb width height interp = |
From: Duncan C. <dun...@us...> - 2004-07-16 15:13:09
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/general In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31896/gtk/general Modified Files: Structs.hsc Log Message: changed a couple of modules to use the new GError module also fixed some documentation FIXMEs Index: Structs.hsc =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/general/Structs.hsc,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- Structs.hsc 23 May 2004 15:58:48 -0000 1.23 +++ Structs.hsc 16 Jul 2004 15:12:59 -0000 1.24 @@ -90,8 +90,6 @@ styleGetText, styleGetBase, styleGetAntiAliasing, - GQuark, - GError(..) ) where import Monad (liftM) @@ -459,50 +457,59 @@ -- | Some constructors that can be used as response -- numbers for dialogs. -- --- DOCFIXME(constructor): ResponseNone GTK returns this if a response widget has no --- response_id, or if the dialog gets programmatically hidden or destroyed. --- --- DOCFIXME(constructor): ResponseReject GTK won't return these unless you pass them in as --- the response for an action widget. They are for your convenience. --- --- DOCFIXME(constructor): ResponseDeleteEvent If the dialog is deleted. --- --- DOCFIXME(constructor): ResponseOk \"Ok\" was pressed. --- --- * This value is returned from the \"Ok\" stock dialog button. --- --- DOCFIXME(constructor): ResponseCancel \"Cancel\" was pressed. --- --- * These value is returned from the \"Cancel\" stock dialog button. --- --- DOCFIXME(constructor): ResponseClose \"Close\" was pressed. --- --- * This value is returned from the \"Close\" stock dialog button. --- --- DOCFIXME(constructor): ResponseYes \"Yes\" was pressed. --- --- * This value is returned from the \"Yes\" stock dialog button. --- --- DOCFIXME(constructor): ResponseNo \"No\" was pressed. --- --- * This value is returned from the \"No\" stock dialog button. --- --- DOCFIXME(constructor): ResponseApply \"Apply\" was pressed. --- --- * This value is returned from the \"Apply\" stock dialog button. --- --- DOCFIXME(constructor): ResponseHelp \"Help\" was pressed. --- --- * This value is returned from the \"Help\" stock dialog button. --- --- DOCFIXME(constructor): ResponseUser A user-defined response --- --- * This value is returned from a user defined button --- -data ResponseId = ResponseNone | ResponseReject | ResponseAccept - | ResponseDeleteEvent | ResponseOk | ResponseCancel - | ResponseClose | ResponseYes | ResponseNo - | ResponseApply | ResponseHelp | ResponseUser Int +data ResponseId + + -- | GTK returns this if a response widget has no @response_id@, + -- or if the dialog gets programmatically hidden or destroyed. + = ResponseNone + + -- | GTK won't return these unless you pass them in as + -- the response for an action widget. They are for your convenience. + | ResponseReject + | ResponseAccept -- ^ (as above) + + -- | If the dialog is deleted. + | ResponseDeleteEvent + + -- | \"Ok\" was pressed. + -- + -- * This value is returned from the \"Ok\" stock dialog button. + | ResponseOk + + -- | \"Cancel\" was pressed. + -- + -- * These value is returned from the \"Cancel\" stock dialog button. + | ResponseCancel + + -- | \"Close\" was pressed. + -- + -- * This value is returned from the \"Close\" stock dialog button. + | ResponseClose + + -- | \"Yes\" was pressed. + -- + -- * This value is returned from the \"Yes\" stock dialog button. + | ResponseYes + + -- | \"No\" was pressed. + -- + -- * This value is returned from the \"No\" stock dialog button. + | ResponseNo + + -- | \"Apply\" was pressed. + -- + -- * This value is returned from the \"Apply\" stock dialog button. + | ResponseApply + + -- | \"Help\" was pressed. + -- + -- * This value is returned from the \"Help\" stock dialog button. + | ResponseHelp + + -- | A user-defined response + -- + -- * This value is returned from a user defined button + | ResponseUser Int deriving Show fromResponse :: Integral a => ResponseId -> a @@ -789,20 +796,3 @@ styleGetAntiAliasing :: StateType -> Style -> IO GC styleGetAntiAliasing ty st = withForeignPtr (unStyle st) $ \stPtr -> makeNewGObject mkGC (index (fromEnum ty) (#{ptr GtkStyle, text_aa_gc} stPtr)) - --- Error handling - -type GQuark = CUInt -- again, c2hs and hsc2hs don't comply on types - -data GError = GError GQuark #{type gint} String - -instance Storable GError where - sizeOf _ = #{const sizeof(GError)} - alignment _ = alignment (undefined:: GQuark) - peek ptr = do - (domain :: GQuark) <- #{peek GError, domain} ptr - (code :: #{type gint}) <- #{peek GError, code} ptr - (msgPtr :: CString) <- #{peek GError, message} ptr - msg <- peekUTFString msgPtr - return $ GError domain code msg - poke _ = error "GError::poke: not implemented" |
From: Duncan C. <dun...@us...> - 2004-07-16 15:13:09
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/abstract In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31896/gtk/abstract Modified Files: FileChooser.chs Log Message: changed a couple of modules to use the new GError module also fixed some documentation FIXMEs Index: FileChooser.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/abstract/FileChooser.chs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- FileChooser.chs 23 May 2004 15:46:02 -0000 1.4 +++ FileChooser.chs 16 Jul 2004 15:13:00 -0000 1.5 @@ -93,7 +93,7 @@ import Object (makeNewObject) import Signal {#import GList#} -import Structs (GError(..)) +import GError (propogateGError) {# context lib="gtk" prefix ="gtk" #} @@ -364,14 +364,3 @@ toStringGSList strs = do strPtrs <- mapM newCString strs toGSList strPtrs - -propogateGError :: (Ptr (Ptr ()) -> IO a) -> IO a -propogateGError action = - alloca $ \(errPtrPtr :: Ptr (Ptr GError)) -> do - result <- action (castPtr errPtrPtr) - errPtr <- peek errPtrPtr - when (errPtr /= nullPtr) - (do (GError dom code msg) <- peek errPtr - {# call unsafe g_error_free #} (castPtr errPtr) - fail msg) --TODO perhaps we should throw the GError itself? - return result |
From: Duncan C. <dun...@us...> - 2004-07-16 15:13:08
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31896 Modified Files: ChangeLog Log Message: changed a couple of modules to use the new GError module also fixed some documentation FIXMEs Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.177 retrieving revision 1.178 diff -u -d -r1.177 -r1.178 --- ChangeLog 4 Jun 2004 16:30:59 -0000 1.177 +++ ChangeLog 16 Jul 2004 15:12:59 -0000 1.178 @@ -1,3 +1,15 @@ +2004-07-16 Duncan Coutts <du...@co...> + + * gtk/glib/GError.chs: new module for dealing with GErrors + + * gtk/general/Structs.hsc: removed GError definition, also + documentation fixes. + + * gtk/abstract/FileChooser.chs: use new GError module, remove own + definition of propogateGError + + * gtk/gdk/Pixbuf.chs: use new GError module, also documentation fixes + 2004-06-04 Axel Simon <A....@ke...> * gtk/gdk/Drawable.chs: fixed typo in drawLine. Thanks to Mats-Ola |
From: Axel S. <as...@us...> - 2004-06-04 16:31:43
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21401 Modified Files: ChangeLog Log Message: Fixed typo in drawLine. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.176 retrieving revision 1.177 diff -u -d -r1.176 -r1.177 --- ChangeLog 27 May 2004 04:21:21 -0000 1.176 +++ ChangeLog 4 Jun 2004 16:30:59 -0000 1.177 @@ -1,3 +1,8 @@ +2004-06-04 Axel Simon <A....@ke...> + + * gtk/gdk/Drawable.chs: fixed typo in drawLine. Thanks to Mats-Ola + Persson. + 2004-05-27 Duncan Coutts <du...@co...> * gtk/pango/Markup.hs, gtk/pango/PangoLayout.chs, |
From: Axel S. <as...@us...> - 2004-06-04 16:31:18
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/gdk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21401/gtk/gdk Modified Files: Drawable.chs Log Message: Fixed typo in drawLine. Index: Drawable.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/gdk/Drawable.chs,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Drawable.chs 23 May 2004 15:55:36 -0000 1.8 +++ Drawable.chs 4 Jun 2004 16:31:00 -0000 1.9 @@ -154,7 +154,7 @@ drawLine :: DrawableClass d => d -> GC -> Point -> Point -> IO () drawLine d gc (x1,y1) (x2,y2) = {#call unsafe draw_line#} (toDrawable d) (toGC gc) (fromIntegral x1) (fromIntegral y1) (fromIntegral x2) - (fromIntegral x2) + (fromIntegral y2) -- | Draw several lines. -- |
From: Duncan C. <dun...@us...> - 2004-05-27 04:21:34
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3344 Modified Files: ChangeLog Log Message: fix DOCFIXMEs also fix a constructor spelling typo Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.175 retrieving revision 1.176 diff -u -d -r1.175 -r1.176 --- ChangeLog 25 May 2004 02:05:10 -0000 1.175 +++ ChangeLog 27 May 2004 04:21:21 -0000 1.176 @@ -1,3 +1,9 @@ +2004-05-27 Duncan Coutts <du...@co...> + + * gtk/pango/Markup.hs, gtk/pango/PangoLayout.chs, + gtk/general/Structs.hsc, gtk/gdk/Pixbuf.chs: fix DOCFIXMEs + fix also a constructor spelling typo (FUdoulbe -> FUdouble) + 2004-05-25 Duncan Coutts <du...@co...> * mogul/GetWidget.hs, mogul/MDialog.hs, mogul/Mogul.hs, |
From: Duncan C. <dun...@us...> - 2004-05-27 04:21:34
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/pango In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3344/gtk/pango Modified Files: Markup.hs PangoLayout.chs Log Message: fix DOCFIXMEs also fix a constructor spelling typo Index: Markup.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/pango/Markup.hs,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Markup.hs 23 May 2004 16:12:20 -0000 1.6 +++ Markup.hs 27 May 2004 04:21:21 -0000 1.7 @@ -47,81 +47,76 @@ -- type Markup = String --- | These are all the attributes the --- 'markSpan' function can express. --- --- DOCFIXME(constructor): FontDescr Choose a font by textual description. --- --- * Takes a --- string to completely describe the font, example: 'FontDescr' --- @"Sans Italic 12"@ --- --- DOCFIXME(constructor): FontFamily Specify the family of font to use. --- --- * Example: 'FontFamily' @"Sans"@ --- --- DOCFIXME(constructor): FontSize Change the size of the current font. --- --- * The constuctor takes the size in points (pt) or as predefined --- sizes. Setting the absolute size 12.5pt can be achieved by passing --- 'FontSize' @('FSPoint' --- @12.5)@ to 'markSpan'. Next to predefined absolute --- sizes such as 'FSsmall' the size can be changed by asking for --- the next larger or smaller front with 'FSlarger' and --- 'FSsmaller', respectively. --- --- DOCFIXME(constructor): FontStyle Change the slant of the current font. --- --- * The constructor takes one of three styles: 'FYnormal', --- 'FYoblique' or 'FYitalic'. --- --- DOCFIXME(constructor): FontWeight Change the thickness of the current font. --- --- * The constructor takes one of the six predefined weights. Most likely to --- be supported: 'FWbold'. --- --- DOCFIXME(constructor): FontVariant Choosing an alternative rendering for lower case --- letters. --- --- * The argument 'FVsmallcaps' will display lower case letters --- as smaller upper case letters, if this option is available. --- --- DOCFIXME(constructor): FontStretch Choose a different width. --- --- * Takes one of nine font widths, e.g. 'FTcondensed' or --- 'FTexpanded'. --- --- DOCFIXME(constructor): FontForeground Foreground color. --- --- * This constructor and 'FontBackground' take both a description --- of the color to be used for rendering. --- --- DOCFIXME(constructor): FontBackground Background color. --- --- DOCFIXME(constructor): FontUnderline Specify underlining of text. --- --- * 'FUnone', 'FUsingle', 'FUdouble' or --- 'FUlow' are possible choices. --- --- DOCFIXME(constructor): FontRise Specify a vertical displacement. --- --- * Takes the vertical displacement in em (the width of the \'m\' character --- in the current font). --- --- DOCFIXME(constructor): FontLang Give a hint about the language to be displayed. +-- | These are all the attributes the 'markSpan' function can express. -- data SpanAttribute + -- | Choose a font by textual description. + -- + -- * Takes a string to completely describe the font, example: + -- @FontDescr \"Sans Italic 12\"@ = FontDescr String + + -- | Specify the family of font to use. + -- + -- * Example: @FontFamily \"Sans\"@ | FontFamily String + + -- | Change the size of the current font. + -- + -- * The constuctor takes the size in points (pt) or as predefined + -- sizes. Setting the absolute size 12.5pt can be achieved by passing + -- @FontSize ('FSPoint' 12.5)@ to 'markSpan'. Next to predefined + -- absolute sizes such as 'FSsmall' the size can be changed by asking + -- for the next larger or smaller front with 'FSlarger' and + -- 'FSsmaller', respectively. | FontSize FontSizeDef + + -- | Change the slant of the current font. + -- + -- * The constructor takes one of three styles: 'FYnormal', + -- 'FYoblique' or 'FYitalic'. | FontStyle FontStyleDef + + -- | Change the thickness of the current font. + -- + -- * The constructor takes one of the six predefined weights. Most likely to + -- be supported: 'FWbold'. | FontWeight FontWeightDef + + -- | Choosing an alternative rendering for lower case letters. + -- + -- * The argument 'FVsmallcaps' will display lower case letters + -- as smaller upper case letters, if this option is available. | FontVariant FontVariantDef + + -- | Choose a different width. + -- + -- * Takes one of nine font widths, e.g. 'FTcondensed' or + -- 'FTexpanded'. | FontStretch FontStretchDef + + -- | Foreground color. + -- + -- * This constructor and 'FontBackground' take both a description + -- of the color to be used for rendering. | FontForeground String -- FIXME: should be ColorName from GDK or so + + -- | Background color. | FontBackground String + + -- | Specify underlining of text. + -- + -- * 'FUnone', 'FUsingle', 'FUdouble' or + -- 'FUlow' are possible choices. | FontUnderline FontUnderlineDef + + -- | Specify a vertical displacement. + -- + -- * Takes the vertical displacement in em (the width of the \'m\' character + -- in the current font). | FontRise Double + + -- | Give a hint about the language to be displayed. | FontLang String -- FIXME: enumeration? what's the use anyway? instance Show SpanAttribute where @@ -233,13 +228,13 @@ -- data FontUnderlineDef = FUsingle - | FUdoulbe + | FUdouble | FUlow | FUnone instance Show FontUnderlineDef where showsPrec _ FUsingle = shows "single" - showsPrec _ FUdoulbe = shows "doulbe" + showsPrec _ FUdouble = shows "double" showsPrec _ FUlow = shows "low" showsPrec _ FUnone = shows "none" Index: PangoLayout.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/pango/PangoLayout.chs,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- PangoLayout.chs 23 May 2004 16:12:20 -0000 1.7 +++ PangoLayout.chs 27 May 2004 04:21:21 -0000 1.8 @@ -194,15 +194,15 @@ -- | Enumerates how a line can be wrapped. -- --- DOCFIXME(constructor): WrapWholeWords Breaks lines only between words. +-- [@WrapWholeWords@] Breaks lines only between words. -- -- * This variant does not guarantee that the requested width is not -- exceeded. A word that is longer than the paragraph width is not -- split. - --- DOCFIXME(constructor): WrapAnywhere Break lines anywhere. -- --- DOCFIXME(constructor): WrapPartialWords Wrap within a word if it is the only one on +-- [@WrapAnywhere@] Break lines anywhere. +-- +-- [@WrapPartialWords@] Wrap within a word if it is the only one on -- this line. -- -- * This option acts like 'WrapWholeWords' but will split |
From: Duncan C. <dun...@us...> - 2004-05-25 02:05:20
|
Update of /cvsroot/gtk2hs/gtk2hs/tools/hierarchyGen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13435/tools/hierarchyGen Modified Files: TypeGen.hs Log Message: make code generator tools produce haddock compatible documentation Index: TypeGen.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/hierarchyGen/TypeGen.hs,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- TypeGen.hs 5 May 2004 17:11:54 -0000 1.6 +++ TypeGen.hs 25 May 2004 02:05:10 -0000 1.7 @@ -139,7 +139,7 @@ (maximum (map (length.head) objs)-length str) ' ' in ss "-- -*-haskell-*-". - indent 0.ss "-- ******************** automatically generated file - do not edit **********". + indent 0.ss "-- -------------------- automatically generated file - do not edit ----------". indent 0.ss "-- Object hierarchy for the GIMP Toolkit (GTK) Binding for Haskell". indent 0.ss "--". indent 0.ss "-- Author : Axel Simon". @@ -156,18 +156,12 @@ indent 0.ss "-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the". indent 0.ss "-- GNU General Public License for more details.". indent 0.ss "--". - indent 0.ss "--- @description@ -------------------------------------------------------------". - indent 0.ss "--". - indent 0.ss "-- * This file reflects the Gtk object hierarchy in terms of Haskell classes.". - indent 0.ss "--". - indent 0.ss "--- @documentation@ -----------------------------------------------------------". - indent 0.ss "--". - indent 0.ss "--". - indent 0.ss "--- @todo@ --------------------------------------------------------------------". - indent 0.ss "--". + indent 0.ss "-- |". + indent 0.ss "-- This file reflects the Gtk object hierarchy in terms of Haskell classes.". indent 0.ss "--". indent 0.ss "module ".ss fname.sc '('. -- indent 1.ss "ObjectTag(..)". + tail. foldl (\s1 s2 -> s1.ss ", ".s2) id (map (\(n:_) -> indent 1.ss n.ss "(".ss n.ss "), ".ss n.ss "Class,". indent 1.ss "to".ss n.ss ", ". |
From: Duncan C. <dun...@us...> - 2004-05-25 02:05:20
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13435 Modified Files: ChangeLog Log Message: make code generator tools produce haddock compatible documentation Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.174 retrieving revision 1.175 diff -u -d -r1.174 -r1.175 --- ChangeLog 25 May 2004 00:50:41 -0000 1.174 +++ ChangeLog 25 May 2004 02:05:10 -0000 1.175 @@ -14,6 +14,12 @@ sourceview/SourceTagTable.chs, sourceview/SourceView.chs: initial haddockification + * tools/hierarchyGen/TypeGen.hs: make prog generator produce + haddock compatible documentation + + * tools/callbackGen/Signal.chs-boot1: make signals module header + haddock compatible + 2004-05-23 Duncan Coutts <du...@co...> * gtk/abstract/Bin.chs, gtk/abstract/Box.chs, |
From: Duncan C. <dun...@us...> - 2004-05-25 02:05:20
|
Update of /cvsroot/gtk2hs/gtk2hs/tools/callbackGen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13435/tools/callbackGen Modified Files: Signal.chs-boot1 Log Message: make code generator tools produce haddock compatible documentation Index: Signal.chs-boot1 =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/callbackGen/Signal.chs-boot1,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Signal.chs-boot1 15 Nov 2003 09:46:20 -0000 1.1 +++ Signal.chs-boot1 25 May 2004 02:05:10 -0000 1.2 @@ -1,6 +1,6 @@ {-# OPTIONS -cpp #-} -- -*-haskell-*- --- ******************** automatically generated file - do not edit ************ +-- -------------------- automatically generated file - do not edit ------------ -- Callback installers for the GIMP Toolkit (GTK) Binding for Haskell -- -- Author : Axel Simon @@ -21,15 +21,12 @@ -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- ---- DESCRIPTION --------------------------------------------------------------- --- --- * These functions are used to connect signals to widgets. They are auto- +-- | +-- These functions are used to connect signals to widgets. They are auto- -- matically created through HookGenerator.hs which takes a list of possible -- function signatures that are included in the GTK sources -- (gtkmarshal.list). -- ---- DOCU ---------------------------------------------------------------------- --- -- * The object system in the second version of GTK is based on GObject from -- GLIB. This base class is rather primitive in that it only implements -- ref and unref methods (and others that are not interesting to us). If @@ -42,9 +39,9 @@ -- user function directly. The latter is needed if a signal delivers a -- pointer to a string and its length in a separate integer. -- ---- TODO ---------------------------------------------------------------------- +-- TODO -- -- * Check if we need all prototypes mentioned in gtkmarshal.list. -- module Signal( - \ No newline at end of file + |
From: Duncan C. <dun...@us...> - 2004-05-25 00:50:55
|
Update of /cvsroot/gtk2hs/gtk2hs/sourceview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1422/sourceview Modified Files: SourceBuffer.chs SourceIter.chs SourceLanguage.chs SourceLanguagesManager.chs SourceMarker.chs SourceStyleScheme.chs SourceTag.chs SourceTagStyle.hsc SourceTagTable.chs SourceView.chs Log Message: initial haddockification Index: SourceTagStyle.hsc =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/sourceview/SourceTagStyle.hsc,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- SourceTagStyle.hsc 26 Oct 2003 22:29:51 -0000 1.1 +++ SourceTagStyle.hsc 25 May 2004 00:50:41 -0000 1.2 @@ -1,5 +1,5 @@ -- -*-haskell-*- --- GIMP Toolkit (GTK) @entry SourceTagStyle@ +-- GIMP Toolkit (GTK) SourceTagStyle -- -- Author : Duncan Coutts -- derived from GtkTextView bindings by Axel Simon @@ -16,14 +16,7 @@ -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- --- @description@ -------------------------------------------------------------- --- --- --- @documentation@ ------------------------------------------------------------ --- --- --- @todo@ --------------------------------------------------------------------- --- +-- | -- module SourceTagStyle ( SourceTagStyle(..), Index: SourceMarker.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/sourceview/SourceMarker.chs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- SourceMarker.chs 19 Nov 2003 19:33:55 -0000 1.1 +++ SourceMarker.chs 25 May 2004 00:50:41 -0000 1.2 @@ -1,5 +1,5 @@ -- -*-haskell-*- --- GIMP Toolkit (GTK) @entry SourceMarker@ +-- GIMP Toolkit (GTK) SourceMarker -- -- Author : Duncan Coutts -- derived from GtkTextView bindings by Axel Simon @@ -16,14 +16,7 @@ -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- --- @description@ -------------------------------------------------------------- --- --- --- @documentation@ ------------------------------------------------------------ --- --- --- @todo@ --------------------------------------------------------------------- --- +-- | -- module SourceMarker ( SourceMarker, @@ -46,14 +39,14 @@ -- methods --- @method sourceMarkerSetMarkerType@ +-- | -- sourceMarkerSetMarkerType :: SourceMarker -> String -> IO () sourceMarkerSetMarkerType mark markType = withCString markType $ \strPtr1 -> {#call unsafe source_marker_set_marker_type#} mark strPtr1 --- @method sourceMarkerGetMarkerType@ +-- | -- sourceMarkerGetMarkerType :: SourceMarker -> IO String sourceMarkerGetMarkerType mark = do @@ -62,31 +55,31 @@ {#call unsafe g_free#} (castPtr strPtr) return markType --- @method sourceMarkerGetLine@ +-- | -- sourceMarkerGetLine :: SourceMarker -> IO Int sourceMarkerGetLine mark = liftM fromIntegral $ {#call unsafe source_marker_get_line#} mark --- @method sourceMarkerGetName@ +-- | -- sourceMarkerGetName :: SourceMarker -> IO String sourceMarkerGetName mark = {#call unsafe source_marker_get_name#} mark >>= peekUTFString --- @method sourceMarkerGetBuffer@ +-- | -- sourceMarkerGetBuffer :: SourceMarker -> IO SourceBuffer sourceMarkerGetBuffer mark = makeNewGObject mkSourceBuffer $ {#call unsafe source_marker_get_buffer#} mark --- @method sourceMarkerNext@ +-- | -- sourceMarkerNext :: SourceMarker -> IO SourceMarker sourceMarkerNext mark = makeNewGObject mkSourceMarker $ {#call unsafe source_marker_next#} mark --- @method sourceMarkerPrev@ +-- | -- sourceMarkerPrev :: SourceMarker -> IO SourceMarker sourceMarkerPrev mark = makeNewGObject mkSourceMarker $ Index: SourceStyleScheme.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/sourceview/SourceStyleScheme.chs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- SourceStyleScheme.chs 19 Nov 2003 19:33:55 -0000 1.2 +++ SourceStyleScheme.chs 25 May 2004 00:50:41 -0000 1.3 @@ -1,5 +1,5 @@ -- -*-haskell-*- --- GIMP Toolkit (GTK) @entry SourceStyleScheme@ +-- GIMP Toolkit (GTK) SourceStyleScheme -- -- Author : Duncan Coutts -- derived from the GtkTextView bindings by Axel Simon @@ -16,14 +16,7 @@ -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- --- @description@ -------------------------------------------------------------- --- --- --- @documentation@ ------------------------------------------------------------ --- --- --- @todo@ --------------------------------------------------------------------- --- +-- | -- module SourceStyleScheme ( SourceStyleScheme, @@ -43,7 +36,7 @@ -- methods --- @method sourceStyleSchemeGetTagStyle@ +-- | -- sourceStyleSchemeGetTagStyle :: SourceStyleScheme -> String -> IO SourceTagStyle sourceStyleSchemeGetTagStyle ss styleName = @@ -53,13 +46,13 @@ {#call unsafe g_free#} tsPtr return ts --- @method sourceStyleSchemeGetName@ +-- | -- sourceStyleSchemeGetName :: SourceStyleScheme -> IO String sourceStyleSchemeGetName ss = {#call source_style_scheme_get_name#} ss >>= peekUTFString --- @method sourceStyleSchemeGetDefault@ +-- | -- sourceStyleSchemeGetDefault :: IO SourceStyleScheme sourceStyleSchemeGetDefault = Index: SourceLanguage.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/sourceview/SourceLanguage.chs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- SourceLanguage.chs 19 Nov 2003 19:33:55 -0000 1.2 +++ SourceLanguage.chs 25 May 2004 00:50:41 -0000 1.3 @@ -1,5 +1,5 @@ -- -*-haskell-*- --- GIMP Toolkit (GTK) @entry Widget SourceView@ +-- GIMP Toolkit (GTK) Widget SourceView -- -- Author : Duncan Coutts -- derived from GtkTextView bindings by Axel Simon @@ -16,14 +16,7 @@ -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- --- @description@ -------------------------------------------------------------- --- --- --- @documentation@ ------------------------------------------------------------ --- --- --- @todo@ --------------------------------------------------------------------- --- +-- | -- module SourceLanguage ( SourceLanguage, @@ -56,19 +49,19 @@ -- methods --- @method sourceLanguageGetName@ +-- | -- sourceLanguageGetName :: SourceLanguage -> IO String sourceLanguageGetName sl = {#call unsafe source_language_get_name#} sl >>= peekUTFString --- @method sourceLanguageGetSection@ +-- | -- sourceLanguageGetSection :: SourceLanguage -> IO String sourceLanguageGetSection sl = {#call unsafe source_language_get_section#} sl >>= peekUTFString --- @method sourceLanguageGetTags@ +-- | -- sourceLanguageGetTags :: SourceLanguage -> IO [SourceTag] sourceLanguageGetTags sl = do @@ -76,7 +69,7 @@ wList <- fromGSList gList mapM (makeNewGObject mkSourceTag) (map return wList) --- @method sourceLanguageGetEscapeChar@ +-- | -- sourceLanguageGetEscapeChar :: SourceLanguage -> IO Char sourceLanguageGetEscapeChar sl = liftM (toEnum . fromEnum) $ @@ -95,19 +88,19 @@ {#call unsafe source_language_set_mime_types#} sl mimeTypesList {#call unsafe g_slist_free#} mimeTypesList --- @method sourceLanguageGetStyleScheme@ +-- | -- sourceLanguageGetStyleScheme :: SourceLanguage -> IO SourceStyleScheme sourceLanguageGetStyleScheme sl = makeNewGObject mkSourceStyleScheme $ {#call unsafe source_language_get_style_scheme#} sl --- @method sourceLanguageSetStyleScheme@ +-- | -- sourceLanguageSetStyleScheme :: SourceLanguage -> SourceStyleScheme -> IO () sourceLanguageSetStyleScheme sl ss = {#call unsafe source_language_set_style_scheme#} sl ss --- @method sourceLanguageGetTagStyle@ +-- | -- sourceLanguageGetTagStyle :: SourceLanguage -> String -> IO SourceTagStyle sourceLanguageGetTagStyle sl tag = @@ -115,7 +108,7 @@ sts <- {#call unsafe source_language_get_tag_style#} sl strPtr1 peek (castPtr sts) --- @method sourceLanguageSetTagStyle@ +-- | -- sourceLanguageSetTagStyle :: SourceLanguage -> String -> SourceTagStyle -> IO () sourceLanguageSetTagStyle sl tag sts = @@ -124,7 +117,7 @@ poke sts' sts {#call unsafe source_language_set_tag_style#} sl strPtr1 (castPtr sts') --- @method sourceLanguageGetTagDefaultStyle@ +-- | -- sourceLanguageGetTagDefaultStyle :: SourceLanguage -> String -> IO SourceTagStyle sourceLanguageGetTagDefaultStyle sl tag = Index: SourceBuffer.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/sourceview/SourceBuffer.chs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- SourceBuffer.chs 19 Nov 2003 19:33:55 -0000 1.3 +++ SourceBuffer.chs 25 May 2004 00:50:41 -0000 1.4 @@ -1,5 +1,5 @@ -- -*-haskell-*- --- GIMP Toolkit (GTK) @entry SourceBuffer@ +-- GIMP Toolkit (GTK) SourceBuffer -- -- Author : Duncan Coutts -- derived from GtkTextView bindings by Axel Simon @@ -16,14 +16,7 @@ -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- --- @description@ -------------------------------------------------------------- --- --- --- @documentation@ ------------------------------------------------------------ --- --- --- @todo@ --------------------------------------------------------------------- --- +-- | -- module SourceBuffer ( SourceBuffer, @@ -76,34 +69,34 @@ -- methods --- @constructor sourceBufferNew@ Create a new @ref type SourceBuffer@, possibly --- taking a @ref type SourceTagTable@. +-- | Create a new 'SourceBuffer', possibly +-- taking a 'SourceTagTable'. -- sourceBufferNew :: Maybe SourceTagTable -> IO SourceBuffer sourceBufferNew tt = makeNewGObject mkSourceBuffer $ {#call unsafe source_buffer_new#} (fromMaybe (mkSourceTagTable nullForeignPtr) tt) --- @constructor sourceBufferNewWithLanguage@ Create a new @ref type SourceBuffer@ --- with a @ref type SourceLanguage@. +-- | Create a new 'SourceBuffer' +-- with a 'SourceLanguage'. -- sourceBufferNewWithLanguage :: SourceLanguage -> IO SourceBuffer sourceBufferNewWithLanguage lang = makeNewGObject mkSourceBuffer $ {#call unsafe source_buffer_new_with_language#} lang --- @method sourceBufferSetCheckBrackets@ +-- | -- sourceBufferSetCheckBrackets :: SourceBuffer -> Bool -> IO () sourceBufferSetCheckBrackets sb newVal = {#call unsafe source_buffer_set_check_brackets#} sb (fromBool newVal) --- @method sourceBufferGetCheckBrackets@ +-- | -- sourceBufferGetCheckBrackets :: SourceBuffer -> IO Bool sourceBufferGetCheckBrackets sb = liftM toBool $ {#call unsafe source_buffer_get_check_brackets#} sb --- @method sourceBufferSetBracketsMatchStyle@ +-- | -- sourceBufferSetBracketsMatchStyle :: SourceBuffer -> SourceTagStyle -> IO () sourceBufferSetBracketsMatchStyle sb ts = @@ -111,91 +104,91 @@ poke tsPtr ts {#call unsafe source_buffer_set_bracket_match_style#} sb (castPtr tsPtr) --- @method sourceBufferSetHighlight@ +-- | -- sourceBufferSetHighlight :: SourceBuffer -> Bool -> IO () sourceBufferSetHighlight sb newVal = {#call unsafe source_buffer_set_highlight#} sb (fromBool newVal) --- @method sourceBufferGetHighlight@ +-- | -- sourceBufferGetHighlight :: SourceBuffer -> IO Bool sourceBufferGetHighlight sb = liftM toBool $ {#call unsafe source_buffer_get_highlight#} sb --- @method sourceBufferSetMaxUndoLevels@ +-- | -- sourceBufferSetMaxUndoLevels :: SourceBuffer -> Int -> IO () sourceBufferSetMaxUndoLevels sb newVal = {#call unsafe source_buffer_set_max_undo_levels#} sb (fromIntegral newVal) --- @method sourceBufferGetMaxUndoLevels@ +-- | -- sourceBufferGetMaxUndoLevels :: SourceBuffer -> IO Int sourceBufferGetMaxUndoLevels sb = liftM fromIntegral $ {#call unsafe source_buffer_get_max_undo_levels#} sb --- @method sourceBufferSetLanguage@ +-- | -- sourceBufferSetLanguage :: SourceBuffer -> SourceLanguage -> IO () sourceBufferSetLanguage sb lang = {#call unsafe source_buffer_set_language#} sb lang --- @method sourceBufferGetLanguage@ +-- | -- sourceBufferGetLanguage :: SourceBuffer -> IO SourceLanguage sourceBufferGetLanguage sb = makeNewGObject mkSourceLanguage $ {#call unsafe source_buffer_get_language#} sb --- @method sourceBufferSetEscapeChar@ +-- | -- sourceBufferSetEscapeChar :: SourceBuffer -> Char -> IO () sourceBufferSetEscapeChar sb char = {#call unsafe source_buffer_set_escape_char#} sb ((toEnum . fromEnum) char) --- @method sourceBufferGetEscapeChar@ +-- | -- sourceBufferGetEscapeChar :: SourceBuffer -> IO Char sourceBufferGetEscapeChar sb = liftM (toEnum . fromEnum) $ {#call unsafe source_buffer_get_escape_char#} sb --- @method sourceBufferCanUndo@ +-- | -- sourceBufferCanUndo :: SourceBuffer -> IO Bool sourceBufferCanUndo sb = liftM toBool $ {#call unsafe source_buffer_can_undo#} sb --- @method sourceBufferCanRedo@ +-- | -- sourceBufferCanRedo :: SourceBuffer -> IO Bool sourceBufferCanRedo sb = liftM toBool $ {#call unsafe source_buffer_can_redo#} sb --- @method sourceBufferUndo@ +-- | -- sourceBufferUndo :: SourceBuffer -> IO () sourceBufferUndo sb = {#call source_buffer_undo#} sb --- @method sourceBufferRedo@ +-- | -- sourceBufferRedo :: SourceBuffer -> IO () sourceBufferRedo sb = {#call source_buffer_redo#} sb --- @method sourceBufferBeginNotUndoableAction@ +-- | -- sourceBufferBeginNotUndoableAction :: SourceBuffer -> IO () sourceBufferBeginNotUndoableAction sb = {#call source_buffer_begin_not_undoable_action#} sb --- @method sourceBufferEndNotUndoableAction@ +-- | -- sourceBufferEndNotUndoableAction :: SourceBuffer -> IO () sourceBufferEndNotUndoableAction sb = {#call source_buffer_end_not_undoable_action#} sb --- @method sourceBufferCreateMarker@ +-- | -- sourceBufferCreateMarker :: SourceBuffer -> String -> String -> TextIter -> IO SourceMarker sourceBufferCreateMarker sb name markerType iter = @@ -204,19 +197,19 @@ withCString markerType $ \strPtr2 -> {#call source_buffer_create_marker#} sb strPtr1 strPtr2 iter --- @method sourceBufferMoveMarker@ +-- | -- sourceBufferMoveMarker :: SourceBuffer -> SourceMarker -> TextIter -> IO () sourceBufferMoveMarker sb mark iter = {#call source_buffer_move_marker#} sb mark iter --- @method sourceBufferDeleteMarker@ +-- | -- sourceBufferDeleteMarker :: SourceBuffer -> SourceMarker -> IO () sourceBufferDeleteMarker sb mark = {#call source_buffer_delete_marker#} sb mark --- @method sourceBufferGetMarker@ +-- | -- sourceBufferGetMarker :: SourceBuffer -> String -> IO SourceMarker sourceBufferGetMarker sb name = @@ -224,7 +217,7 @@ withCString name $ \strPtr1 -> {#call unsafe source_buffer_get_marker#} sb strPtr1 --- @method sourceBufferGetMarkersInRegion@ +-- | -- sourceBufferGetMarkersInRegion :: SourceBuffer -> TextIter -> TextIter -> IO [SourceMarker] sourceBufferGetMarkersInRegion sb begin end = do @@ -232,21 +225,21 @@ wList <- fromGSList gList mapM (makeNewGObject mkSourceMarker) (map return wList) --- @method sourceBufferGetFirstMarker@ +-- | -- sourceBufferGetFirstMarker :: SourceBuffer -> IO SourceMarker sourceBufferGetFirstMarker sb = makeNewGObject mkSourceMarker $ {#call unsafe source_buffer_get_first_marker#} sb --- @method sourceBufferGetLastMarker@ +-- | -- sourceBufferGetLastMarker :: SourceBuffer -> IO SourceMarker sourceBufferGetLastMarker sb = makeNewGObject mkSourceMarker $ {#call unsafe source_buffer_get_last_marker#} sb --- @method sourceBufferGetIterAtMarker@ +-- | -- sourceBufferGetIterAtMarker :: SourceBuffer -> SourceMarker -> IO TextIter sourceBufferGetIterAtMarker sb mark = do @@ -254,7 +247,7 @@ {#call unsafe source_buffer_get_iter_at_marker#} sb iter mark return iter --- @method sourceBufferGetNextMarker@ +-- | -- sourceBufferGetNextMarker :: SourceBuffer -> TextIter -> IO (Maybe SourceMarker) sourceBufferGetNextMarker sb iter = do @@ -262,7 +255,7 @@ if markPtr==nullPtr then return Nothing else liftM Just $ makeNewGObject mkSourceMarker (return markPtr) --- @method sourceBufferGetPrevMarker@ +-- | -- sourceBufferGetPrevMarker :: SourceBuffer -> TextIter -> IO (Maybe SourceMarker) sourceBufferGetPrevMarker sb iter = do Index: SourceLanguagesManager.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/sourceview/SourceLanguagesManager.chs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- SourceLanguagesManager.chs 17 Nov 2003 23:54:29 -0000 1.4 +++ SourceLanguagesManager.chs 25 May 2004 00:50:41 -0000 1.5 @@ -1,5 +1,5 @@ -- -*-haskell-*- --- GIMP Toolkit (GTK) @entry SourceLanguagesManager@ +-- GIMP Toolkit (GTK) SourceLanguagesManager -- -- Author : Duncan Coutts -- derived from GtkTextView bindings by Axel Simon @@ -16,14 +16,7 @@ -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- --- @description@ -------------------------------------------------------------- --- --- --- @documentation@ ------------------------------------------------------------ --- --- --- @todo@ --------------------------------------------------------------------- --- +-- | -- module SourceLanguagesManager ( SourceLanguagesManager, @@ -46,14 +39,13 @@ -- methods --- @constructor sourceLanguagesManagerNew@ Create a new --- @ref type SourceLanguagesManager@. +-- | Create a new 'SourceLanguagesManager'. -- sourceLanguagesManagerNew :: IO SourceLanguagesManager sourceLanguagesManagerNew = makeNewGObject mkSourceLanguagesManager {#call source_languages_manager_new#} --- @method sourceLanguagesManagerGetAvailableLanguages@ +-- | -- sourceLanguagesManagerGetAvailableLanguages :: SourceLanguagesManager -> IO [SourceLanguage] @@ -62,7 +54,7 @@ wList <- readGSList gList mapM (makeNewGObject mkSourceLanguage) (map return wList) --- @method sourceLanguagesManagerGetLanguageFromMimeType@ +-- | -- sourceLanguagesManagerGetLanguageFromMimeType :: SourceLanguagesManager -> String -> IO (Maybe SourceLanguage) sourceLanguagesManagerGetLanguageFromMimeType lm mimeType = do @@ -71,8 +63,7 @@ if langPtr==nullPtr then return Nothing else liftM Just $ makeNewGObject mkSourceLanguage (return langPtr) --- @method sourceLanguagesManagerGetLangFilesDirs@ Retrieve filenames with --- language specifications. +-- | Retrieve filenames with language specifications. -- sourceLanguagesManagerGetLangFilesDirs :: SourceLanguagesManager -> IO [FilePath] Index: SourceTagTable.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/sourceview/SourceTagTable.chs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- SourceTagTable.chs 2 Nov 2003 23:57:58 -0000 1.2 +++ SourceTagTable.chs 25 May 2004 00:50:41 -0000 1.3 @@ -1,5 +1,5 @@ -- -*-haskell-*- --- GIMP Toolkit (GTK) @entry SourceTagTable@ +-- GIMP Toolkit (GTK) SourceTagTable -- -- Author : Duncan Coutts -- derived from GtkTextView bindings by Axel Simon @@ -16,14 +16,7 @@ -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- --- @description@ -------------------------------------------------------------- --- --- --- @documentation@ ------------------------------------------------------------ --- --- --- @todo@ --------------------------------------------------------------------- --- +-- | -- module SourceTagTable ( SourceTagTable, @@ -46,14 +39,14 @@ -- methods --- @constructor sourceTagTableNew@ Create a new @ref type SourceTagTable@ +-- | Create a new 'SourceTagTable' -- sourceTagTableNew :: IO SourceTagTable sourceTagTableNew = makeNewGObject mkSourceTagTable {#call unsafe source_tag_table_new#} --- @method sourceTagTableAddTags@ Add a list of tag to the table. +-- | Add a list of tag to the table. -- -- * The added tags are assigned the highest priority in the table. If a tag is -- already present in table or has the same name as an already-added tag, then @@ -69,13 +62,13 @@ -- make sure the ForeignPtrs are not gc'd while we are still using the Ptrs mapM_ touchForeignPtr tagForeignPtrs --- @method sourceTagTableRemoveSourceTags@ +-- | -- sourceTagTableRemoveSourceTags :: SourceTagTable -> IO () sourceTagTableRemoveSourceTags tt = {#call source_tag_table_remove_source_tags#} tt --- @signal onTagChanged@ The source tag table has changed. +-- | The source tag table has changed. -- onTagChanged, afterTagChanged :: SourceTagTableClass stt => stt -> IO () -> IO (ConnectId stt) Index: SourceView.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/sourceview/SourceView.chs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- SourceView.chs 16 Apr 2004 11:53:18 -0000 1.3 +++ SourceView.chs 25 May 2004 00:50:41 -0000 1.4 @@ -1,5 +1,5 @@ -- -*-haskell-*- --- GIMP Toolkit (GTK) @entry Widget SourceView@ +-- GIMP Toolkit (GTK) Widget SourceView -- -- Author : Duncan Coutts -- derived from GtkTextView bindings by Axel Simon @@ -16,14 +16,7 @@ -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- --- @description@ -------------------------------------------------------------- --- --- --- @documentation@ ------------------------------------------------------------ --- --- --- @todo@ --------------------------------------------------------------------- --- +-- | -- module SourceView ( SourceView, @@ -79,124 +72,124 @@ -- methods --- @constructor sourceViewNew@ Create a new @ref type SourceView@ widget with a --- default @ref type SourceBuffer@. +-- | Create a new 'SourceView' widget with a +-- default 'SourceBuffer'. -- sourceViewNew :: IO SourceView sourceViewNew = makeNewGObject mkSourceView $ liftM castPtr {#call unsafe source_view_new#} --- @constructor sourceViewNewWithBuffer@ Create a new @ref type SourceView@ --- widget with the given @ref type SourceBuffer@. +-- | Create a new 'SourceView' +-- widget with the given 'SourceBuffer'. -- sourceViewNewWithBuffer :: SourceBuffer -> IO SourceView sourceViewNewWithBuffer sb = makeNewGObject mkSourceView $ liftM castPtr $ {#call unsafe source_view_new_with_buffer#} sb --- @method sourceViewSetShowLineNumbers@ +-- | -- sourceViewSetShowLineNumbers :: SourceViewClass sv => sv -> Bool -> IO () sourceViewSetShowLineNumbers sv newVal = {#call unsafe source_view_set_show_line_numbers#} (toSourceView sv) (fromBool newVal) --- @method sourceViewGetShowLineNumbers@ +-- | -- sourceViewGetShowLineNumbers :: SourceViewClass sv => sv -> IO Bool sourceViewGetShowLineNumbers sv = liftM toBool $ {#call unsafe source_view_get_show_line_numbers#} (toSourceView sv) --- @method sourceViewSetShowLineMarkers@ +-- | -- sourceViewSetShowLineMarkers :: SourceViewClass sv => sv -> Bool -> IO () sourceViewSetShowLineMarkers sv newVal = {#call unsafe source_view_set_show_line_markers#} (toSourceView sv) (fromBool newVal) --- @method sourceViewGetShowLineMarkers@ +-- | -- sourceViewGetShowLineMarkers :: SourceViewClass sv => sv -> IO Bool sourceViewGetShowLineMarkers sv = liftM toBool $ {#call unsafe source_view_get_show_line_markers#} (toSourceView sv) --- @method sourceViewSetTabsWidth@ +-- | -- sourceViewSetTabsWidth :: SourceViewClass sv => sv -> Int -> IO () sourceViewSetTabsWidth sv width = {#call unsafe source_view_set_tabs_width#} (toSourceView sv) (fromIntegral width) --- @method sourceViewGetTabsWidth@ +-- | -- sourceViewGetTabsWidth :: SourceViewClass sv => sv -> IO Int sourceViewGetTabsWidth sv = liftM fromIntegral $ {#call unsafe source_view_get_tabs_width#} (toSourceView sv) --- @method sourceViewSetAutoIndent@ +-- | -- sourceViewSetAutoIndent :: SourceViewClass sv => sv -> Bool -> IO () sourceViewSetAutoIndent sv newVal = {#call unsafe source_view_set_auto_indent#} (toSourceView sv) (fromBool newVal) --- @method sourceViewGetAutoIndent@ +-- | -- sourceViewGetAutoIndent :: SourceViewClass sv => sv -> IO Bool sourceViewGetAutoIndent sv = liftM toBool $ {#call unsafe source_view_get_auto_indent#} (toSourceView sv) --- @method sourceViewSetInsertSpacesInsteadOfTabs@ +-- | -- sourceViewSetInsertSpacesInsteadOfTabs :: SourceViewClass sv => sv -> Bool -> IO () sourceViewSetInsertSpacesInsteadOfTabs sv newVal = {#call unsafe source_view_set_insert_spaces_instead_of_tabs#} (toSourceView sv) (fromBool newVal) --- @method sourceViewGetInsertSpacesInsteadOfTabs@ +-- | -- sourceViewGetInsertSpacesInsteadOfTabs :: SourceViewClass sv => sv -> IO Bool sourceViewGetInsertSpacesInsteadOfTabs sv = liftM toBool $ {#call unsafe source_view_get_insert_spaces_instead_of_tabs#} (toSourceView sv) --- @method sourceViewSetShowMargin@ +-- | -- sourceViewSetShowMargin :: SourceViewClass sv => sv -> Bool -> IO () sourceViewSetShowMargin sv newVal = {#call unsafe source_view_set_show_margin#} (toSourceView sv) (fromBool newVal) --- @method sourceViewGetShowMargin@ +-- | -- sourceViewGetShowMargin :: SourceViewClass sv => sv -> IO Bool sourceViewGetShowMargin sv = liftM toBool $ {#call unsafe source_view_get_show_margin#} (toSourceView sv) --- @method sourceViewSetMargin@ +-- | -- sourceViewSetMargin :: SourceViewClass sv => sv -> Int -> IO () sourceViewSetMargin sv margin = {#call unsafe source_view_set_margin#} (toSourceView sv) (fromIntegral margin) --- @method sourceViewGetMargin@ +-- | -- sourceViewGetMargin :: SourceViewClass sv => sv -> IO Int sourceViewGetMargin sv = liftM fromIntegral $ {#call unsafe source_view_get_margin#} (toSourceView sv) --- @method sourceViewSetMarkerPixbuf@ +-- | -- sourceViewSetMarkerPixbuf :: SourceViewClass sv => sv -> String -> Pixbuf -> IO () sourceViewSetMarkerPixbuf sv markerType marker = withCString markerType $ \strPtr -> {#call unsafe source_view_set_marker_pixbuf#} (toSourceView sv) strPtr marker --- @method sourceViewGetMarkerPixbuf@ +-- | -- sourceViewGetMarkerPixbuf :: SourceViewClass sv => sv -> String -> IO Pixbuf sourceViewGetMarkerPixbuf sv markerType = withCString markerType $ \strPtr -> makeNewGObject mkPixbuf $ {#call unsafe source_view_get_marker_pixbuf#} (toSourceView sv) strPtr --- @method sourceViewSetSmartHomeEnd@ +-- | -- sourceViewSetSmartHomeEnd :: SourceViewClass sv => sv -> Bool -> IO () sourceViewSetSmartHomeEnd sv newVal = {#call unsafe source_view_set_smart_home_end#} (toSourceView sv) (fromBool newVal) --- @method sourceViewGetSmartHomeEnd@ +-- | -- sourceViewGetSmartHomeEnd :: SourceViewClass sv => sv -> IO Bool sourceViewGetSmartHomeEnd sv = liftM toBool $ Index: SourceTag.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/sourceview/SourceTag.chs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- SourceTag.chs 11 Nov 2003 12:07:43 -0000 1.3 +++ SourceTag.chs 25 May 2004 00:50:41 -0000 1.4 @@ -1,5 +1,5 @@ -- -*-haskell-*- --- GIMP Toolkit (GTK) @entry SourceTag@ +-- GIMP Toolkit (GTK) SourceTag -- -- Author : Duncan Coutts -- derived from GtkTextView bindings by Axel Simon @@ -16,14 +16,7 @@ -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- --- @description@ -------------------------------------------------------------- --- --- --- @documentation@ ------------------------------------------------------------ --- --- --- @todo@ --------------------------------------------------------------------- --- +-- | -- module SourceTag ( SourceTag, @@ -49,7 +42,7 @@ -- methods --- @constructor syntaxTagNew@ Create a new @ref type SourceTag@ +-- | Create a new 'SourceTag' -- syntaxTagNew :: String -> String -> String -> String -> IO SourceTag syntaxTagNew id name patternStart patternEnd = @@ -60,7 +53,7 @@ withCString patternEnd $ \strPtr4 -> {#call syntax_tag_new#} strPtr1 strPtr2 strPtr3 strPtr4 --- @constructor patternTagNew@ Create a new @ref type SourceTag@ +-- | Create a new 'SourceTag' -- patternTagNew :: String -> String -> String -> IO SourceTag patternTagNew id name pattern = @@ -71,7 +64,7 @@ {#call unsafe pattern_tag_new#} strPtr1 strPtr2 strPtr3 --- @constructor keywordListTagNew@ Create a new @ref type SourceTag@. +-- | Create a new 'SourceTag'. -- keywordListTagNew :: String -> String -> [String] -> Bool -> Bool -> Bool -> String -> String -> IO SourceTag @@ -97,12 +90,12 @@ mapM_ free keywordPtrs return obj --- @constructor blockCommentTagNew@ Create a new @ref type SourceTag@ +-- | Create a new 'SourceTag' -- blockCommentTagNew :: String -> String -> String -> String -> IO SourceTag blockCommentTagNew = syntaxTagNew --in the C header this is just a macro --- @constructor lineCommentTagNew@ Create a new @ref type SourceTag@ +-- | Create a new 'SourceTag' -- lineCommentTagNew :: String -> String -> String -> IO SourceTag lineCommentTagNew id name pattern = @@ -112,7 +105,7 @@ withCString pattern $ \strPtr3 -> {#call unsafe line_comment_tag_new#} strPtr1 strPtr2 strPtr3 --- @constructor stringTagNew@ Create a new @ref type SourceTag@ +-- | Create a new 'SourceTag' -- stringTagNew :: String -> String -> String -> String -> Bool -> IO SourceTag stringTagNew id name patternStart patternEnd endAtLineEnd = @@ -124,7 +117,7 @@ {#call unsafe string_tag_new#} strPtr1 strPtr2 strPtr3 strPtr4 (fromBool endAtLineEnd) --- @method sourceTagGetStyle@ +-- | -- sourceTagGetStyle :: SourceTag -> IO SourceTagStyle sourceTagGetStyle tag = do @@ -133,7 +126,7 @@ {#call unsafe g_free#} tsPtr return ts --- @method sourceTagSetStyle@ +-- | -- sourceTagSetStyle :: SourceTag -> SourceTagStyle -> IO () sourceTagSetStyle tag ts = alloca $ \tsPtr -> do Index: SourceIter.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/sourceview/SourceIter.chs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- SourceIter.chs 16 Apr 2004 11:53:18 -0000 1.1 +++ SourceIter.chs 25 May 2004 00:50:41 -0000 1.2 @@ -1,5 +1,5 @@ -- -*-haskell-*- --- GIMP Toolkit (GTK) @entry SourceIter@ +-- GIMP Toolkit (GTK) SourceIter -- -- Author : Duncan Coutts -- @@ -15,17 +15,12 @@ -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- --- @description@ -------------------------------------------------------------- +-- | -- --- Adds extra useful methods for GtkTextIter for searching forwards and +-- Adds extra useful methods for "TextIter" for searching forwards and -- backwards within a region in the buffer and matching brackets. -- --- @documentation@ ------------------------------------------------------------ --- --- There is no SourceIter object, just extra methods for TextIter --- --- @todo@ --------------------------------------------------------------------- --- +-- * There is no SourceIter object, just extra methods for "TextIter" -- module SourceIter ( @@ -52,7 +47,7 @@ -- methods --- @method sourceIterForwardSearch@ same as textIterForwardSearch but allows +-- | same as 'textIterForwardSearch' but allows -- case insensitive search and possibly in the future regular expressions. -- sourceIterForwardSearch :: TextIter -> String -> [SourceSearchFlags] -> @@ -66,7 +61,7 @@ (fromMaybe (TextIter nullForeignPtr) limit) return $ if found then Just (start,end) else Nothing --- @method sourceIterForwardSearch@ same as textIterForwardSearch but allows +-- | same as 'textIterForwardSearch' but allows -- case insensitive search and possibly in the future regular expressions. -- sourceIterBackwardSearch :: TextIter -> String -> [SourceSearchFlags] -> @@ -80,11 +75,11 @@ (fromMaybe (TextIter nullForeignPtr) limit) return $ if found then Just (start,end) else Nothing --- @method sourceIterFindMatchingBracket@ Tries to match the bracket character --- currently at the given iter with its opening/closing counterpart, and if +-- | Tries to match the bracket character +-- currently at the given iter with its opening\/closing counterpart, and if -- found moves iter to the position where it was found. -- --- * the TextIter must belong to a SourceBuffer +-- * the 'TextIter' must belong to a 'SourceBuffer' -- sourceIterFindMatchingBracket :: TextIter -> IO Bool sourceIterFindMatchingBracket ti = |
From: Duncan C. <dun...@us...> - 2004-05-25 00:50:52
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1422 Modified Files: ChangeLog Log Message: initial haddockification Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.173 retrieving revision 1.174 diff -u -d -r1.173 -r1.174 --- ChangeLog 25 May 2004 00:38:48 -0000 1.173 +++ ChangeLog 25 May 2004 00:50:41 -0000 1.174 @@ -6,6 +6,14 @@ * glade/Glade.chs: initial haddockification + * sourceview/SourceBuffer.chs, sourceview/SourceIter.chs, + sourceview/SourceLanguage.chs, + sourceview/SourceLanguagesManager.chs, + sourceview/SourceMarker.chs, sourceview/SourceStyleScheme.chs, + sourceview/SourceTag.chs, sourceview/SourceTagStyle.hsc, + sourceview/SourceTagTable.chs, sourceview/SourceView.chs: + initial haddockification + 2004-05-23 Duncan Coutts <du...@co...> * gtk/abstract/Bin.chs, gtk/abstract/Box.chs, |
From: Duncan C. <dun...@us...> - 2004-05-25 00:38:58
|
Update of /cvsroot/gtk2hs/gtk2hs/glade In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31480/glade Modified Files: Glade.chs Log Message: initial haddockification Index: Glade.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/glade/Glade.chs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Glade.chs 30 Apr 2004 12:50:15 -0000 1.2 +++ Glade.chs 25 May 2004 00:38:48 -0000 1.3 @@ -1,4 +1,4 @@ --- |GIMP Toolkit (GTK) Binding for Haskell: binding to Libglade -*-haskell-*- +-- GIMP Toolkit (GTK) Binding for Haskell: binding to Libglade -*-haskell-*- -- for loading XML widget specifications -- -- Author : Manuel M T Chakravarty @@ -19,40 +19,38 @@ -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- Library General Public License for more details. -- ---- Description --------------------------------------------------------------- --- --- Language: Haskell 98 Binding Module +-- | -- -- Libglade facilitates loading of XML specifications of whole widget trees -- that have been interactively designed with the GUI builder Glade. The --- present module exports operations for manipulating `GladeXML' objects. +-- present module exports operations for manipulating 'GladeXML' objects. -- --- `glade_xml_signal_autoconnect()' is not supported. The C variant is not --- suitable for Haskell as `-rdynamic' leads to huge executable and we +-- @glade_xml_signal_autoconnect()@ is not supported. The C variant is not +-- suitable for Haskell as @-rdynamic@ leads to huge executable and we -- usually don't want to connect staticly named functions, but closures. -- --- NB: `glade_xml_construct()' is not bound, as it doesn't seem to be useful --- in Haskell. As usual, the `signal_connect_data' variant for --- registering signal handlers isn't bound either. Moreover, the --- `connect_full' functions are not bound. +-- * @glade_xml_construct()@ is not bound, as it doesn't seem to be useful +-- in Haskell. As usual, the @signal_connect_data@ variant for +-- registering signal handlers isn't bound either. Moreover, the +-- @connect_full@ functions are not bound. -- --- NB: This binding does not support Libglade functionality that is --- exclusively meant for extending Libglade with new widgets. Like new --- widgets, such functionality is currently expected to be implemented in --- C. +-- * This binding does not support Libglade functionality that is +-- exclusively meant for extending Libglade with new widgets. Like new +-- widgets, such functionality is currently expected to be implemented in +-- C. -- module Glade ( - -- data types + -- * Data types -- GladeXMLClass, GladeXML, - -- creation operations + -- * Creation operations -- xmlNew, xmlNewWithRootAndDomain, - -- obtaining widget handles + -- * Obtaining widget handles -- xmlGetWidget, xmlGetWidgetRaw @@ -70,15 +68,9 @@ {#context lib="glade" prefix ="glade"#} --- |Operations --- ----------- - --- |Creation operations --- - - --- @constructor xmlNew@ Create a new XML object (and the corresponding +-- | Create a new XML object (and the corresponding -- widgets) from the given XML file; corresponds to --- `xmlNewWithRootAndDomain', but without the ability to specify a root +-- 'xmlNewWithRootAndDomain', but without the ability to specify a root -- widget or translation domain. -- xmlNew :: FilePath -> IO (Maybe GladeXML) @@ -88,15 +80,15 @@ if xmlPtr==nullPtr then return Nothing else liftM Just $ makeNewGObject mkGladeXML (return xmlPtr) --- @constructor xmlNewWithRootAndDomain@ Create a new GladeXML object (and +-- | Create a new GladeXML object (and -- the corresponding widgets) from the given XML file with an optional -- root widget and translation domain. -- --- * If the second argument is not `Nothing', the interface will only be built +-- * If the second argument is not @Nothing@, the interface will only be built -- from the widget whose name is given. This feature is useful if you only -- want to build say a toolbar or menu from the XML file, but not the window -- it is embedded in. Note also that the XML parse tree is cached to speed --- up creating another `XML' object for the same file. +-- up creating another \'XML\' object for the same file. -- xmlNewWithRootAndDomain :: FilePath -> Maybe String -> Maybe String -> IO (Maybe GladeXML) xmlNewWithRootAndDomain file rootWidgetName domain = @@ -107,15 +99,12 @@ if xmlPtr==nullPtr then return Nothing else liftM Just $ makeNewGObject mkGladeXML (return xmlPtr) --- |Obtaining widget handles --- - - --- @method xmlGetWidget@ Get the widget that has the given name in +-- | Get the widget that has the given name in -- the interface description. If the named widget cannot be found -- or is of the wrong type the result is an error. -- -- * the second parameter is the ID of the widget in the glade xml --- file, eg "button1". +-- file, eg \"button1\". -- -- * the third parameter should be a dynamic cast function that -- returns the type of object that you expect, eg castToButton |
From: Duncan C. <dun...@us...> - 2004-05-25 00:38:58
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31480 Modified Files: ChangeLog Log Message: initial haddockification Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.172 retrieving revision 1.173 diff -u -d -r1.172 -r1.173 --- ChangeLog 25 May 2004 00:33:36 -0000 1.172 +++ ChangeLog 25 May 2004 00:38:48 -0000 1.173 @@ -4,6 +4,8 @@ mogul/NewWidget.hs, mogul/TreeList.hs, mogul/WidgetTable.hs: initial haddockification + * glade/Glade.chs: initial haddockification + 2004-05-23 Duncan Coutts <du...@co...> * gtk/abstract/Bin.chs, gtk/abstract/Box.chs, |
From: Duncan C. <dun...@us...> - 2004-05-25 00:33:47
|
Update of /cvsroot/gtk2hs/gtk2hs/mogul In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30038/mogul Modified Files: GetWidget.hs MDialog.hs Mogul.hs NewWidget.hs TreeList.hs WidgetTable.hs Log Message: initial haddockification Index: Mogul.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/mogul/Mogul.hs,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Mogul.hs 10 Mar 2003 17:07:41 -0000 1.6 +++ Mogul.hs 25 May 2004 00:33:35 -0000 1.7 @@ -19,14 +19,10 @@ -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- ---- DESCRIPTION --------------------------------------------------------------- --- --- * This module re-exports all unchanged Gtk and Mogul entities. --- ---- DOCU ---------------------------------------------------------------------- +-- | -- +-- This module re-exports all unchanged Gtk and Mogul entities. -- ---- TODO ---------------------------------------------------------------------- module Mogul( module NewWidget, Index: WidgetTable.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/mogul/WidgetTable.hs,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- WidgetTable.hs 15 Apr 2004 18:02:16 -0000 1.5 +++ WidgetTable.hs 25 May 2004 00:33:35 -0000 1.6 @@ -19,15 +19,12 @@ -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- ---- DESCRIPTION --------------------------------------------------------------- --- --- * This module provides the possibility to lookup a widget by name. +-- | -- ---- DOCU ---------------------------------------------------------------------- +-- This module provides the possibility to lookup a widget by name. -- -- * This module uses a global variable (unsafePerformIO is lurking). -- ---- TODO ---------------------------------------------------------------------- module WidgetTable ( WidgetName, Index: MDialog.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/mogul/MDialog.hs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- MDialog.hs 24 Mar 2002 21:56:20 -0000 1.1.1.1 +++ MDialog.hs 25 May 2004 00:33:35 -0000 1.2 @@ -19,14 +19,10 @@ -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- ---- DESCRIPTION --------------------------------------------------------------- --- --- * Simplify the construction of a non-modal dialog. --- ---- DOCU ---------------------------------------------------------------------- +-- | -- +-- Simplify the construction of a non-modal dialog. -- ---- TODO ---------------------------------------------------------------------- module MDialog( assureDialog Index: GetWidget.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/mogul/GetWidget.hs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- GetWidget.hs 19 Jan 2003 19:20:47 -0000 1.3 +++ GetWidget.hs 25 May 2004 00:33:35 -0000 1.4 @@ -19,14 +19,10 @@ -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- ---- DESCRIPTION --------------------------------------------------------------- --- --- * Retrieve a widget by name from the global store. --- ---- DOCU ---------------------------------------------------------------------- +-- | -- +-- Retrieve a widget by name from the global store. -- ---- TODO ---------------------------------------------------------------------- module GetWidget( getMisc, Index: NewWidget.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/mogul/NewWidget.hs,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- NewWidget.hs 19 Jan 2003 19:20:47 -0000 1.7 +++ NewWidget.hs 25 May 2004 00:33:35 -0000 1.8 @@ -18,17 +18,14 @@ -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- ---- DESCRIPTION --------------------------------------------------------------- --- --- * These functions generate a new widget with a name. +-- | -- ---- DOCU ---------------------------------------------------------------------- +-- These functions generate a new widget with a name. -- [...1072 lines suppressed...] --newIMMulticontext = iMMulticontextNew --- @see itemFactoryNew +-- | see 'itemFactoryNew' -- --newItemFactory :: IO ItemFactory --newItemFactory = itemFactoryNew --- @see tooltipsNew +-- | see 'tooltipsNew' -- newTooltips :: IO Tooltips newTooltips = tooltipsNew --- @see name +-- | see 'name' -- newIconFactory :: IO IconFactory newIconFactory = iconFactoryNew Index: TreeList.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/mogul/TreeList.hs,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- TreeList.hs 10 Mar 2003 17:07:41 -0000 1.9 +++ TreeList.hs 25 May 2004 00:33:35 -0000 1.10 @@ -1,5 +1,5 @@ -- -*-haskell-*- --- The Monad GUI Library (Mogul): @entry Widget TreeView@ +-- The Monad GUI Library (Mogul): Widget TreeView -- -- Author : Axel Simon -- @@ -19,10 +19,12 @@ -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- --- @documentation@ ------------------------------------------------------------ +-- | -- --- * This module provides all object for a widget displaying data organized --- in a table. There are two flavors: A simple list organizes +-- This module provides all object for a widget displaying data organized +-- in a table. +-- +-- * There are two flavors: A simple list organizes -- data in rows and a tree which provides the possibility to impose a -- hierarchical structure on the entries of one column. -- @@ -36,38 +38,41 @@ -- in the widget. -- -- * The widget that displays the data and can be inserted like any other --- into a container is called @ref data TreeView@. This widget is itself --- a container for @ref data TreeViewColumn@s which has a title at the top --- of the column. Each @ref data TreeViewColumn@ in turn can contain --- several @ref data Renderer@. There are currently three --- @ref data Renderer@, one for each of the following items: --- text, @ref data Pixbuf@ and @ref data ToggleButton@. +-- into a container is called 'TreeView'. This widget is itself +-- a container for 'TreeViewColumn's which has a title at the top +-- of the column. Each 'TreeViewColumn' in turn can contain +-- several 'Renderer'. There are currently three +-- 'Renderer', one for each of the following items: +-- text, 'Pixbuf' and 'ToggleButton'. -- -- * The database is called store, specifically for simple lists it is --- @ref data ListStore@ and for hierachical data it is called --- @ref data TreeStore@. A store is created from a skeleton. --- @ref data Attribute@s can be added to an empty --- @ref data ListSkel@ or @ref data TreeSkel@ skeleton which yields --- a functions to access the attribute and an @ref data Association@. +-- 'ListStore' and for hierachical data it is called +-- 'TreeStore'. A store is created from a skeleton. +-- '' Attributes can be added to an empty +-- 'ListSkel' or 'TreeSkel' skeleton which yields +-- a functions to access the attribute and an 'Association'. -- After the skeleton is turned into a store by calling either --- @ref constructor newListStore@ or @ref constructor newTreeStore@, --- @ref data Association@s can be inserted together with an appropriate --- @ref data Renderer@ into a @ref data TreeViewColumn@. +-- 'newListStore' or 'newTreeStore', +-- 'Association's can be inserted together with an appropriate +-- 'Renderer' into a 'TreeViewColumn'. -- --- @todo@ --------------------------------------------------------------------- +-- TODO -- -- * Figure out if properties in the store have priority over global -- properties when both are set. -- module TreeList( + -- * ListStore ListSkel, emptyListSkel, listSkelAddAttribute, newListStore, + -- * TreeStore TreeSkel, emptyTreeSkel, treeSkelAddAttribute, newTreeStore, + -- * Widget Association, Renderer, treeViewColumnNewText, @@ -75,10 +80,13 @@ treeViewColumnNewToggle, treeViewColumnAssociate, treeViewGetPathAtPos, + -- * CellRenderer cellRendererSetAttribute, cellRendererGetAttribute, + -- * CellRendererText onEdited, afterEdited, + -- * TreeModel TreePath, treeModelGetIter, treeModelGetPath @@ -123,12 +131,10 @@ import LocalData (IORef(..), newIORef, readIORef, writeIORef) import LocalControl (throw, Exception(AssertionFailed)) --- @entry ListStore TreeModel@ - --- @data ListSkel@ A skeleton of a @ref data ListStore@ database. +-- | A skeleton of a 'ListStore' database. -- -- * This datastructure describes what columns the database will have when --- it is finally created by @ref constructor newListStore@. +-- it is finally created by 'newListStore'. -- newtype ListSkel = ListSkel (IORef ListSkelState) @@ -136,17 +142,17 @@ | LSSActive ListStore --- @method emptyListSkel@ Returns an empty @ref data ListSkel@. +-- | Returns an empty 'ListSkel'. -- emptyListSkel :: IO ListSkel emptyListSkel = liftM ListSkel (newIORef (LSSPrepare [])) --- @method listSkelAddAttribute@ Reserve a new column in --- @ref data ListSkel@ to hold values for the given attribute. +-- | Reserve a new column in +-- 'ListSkel' to hold values for the given attribute. -- --- * The type of the column is determined by the given @ref data Attribute@ --- of the @ref data ViewColumn@ which should be stored here. It is possible --- to associate this column with several @ref data ViewColumn@s. +-- * The type of the column is determined by the given 'Attribute' +-- of the 'ViewColumn' which should be stored here. It is possible +-- to associate this column with several 'ViewColumn's. -- listSkelAddAttribute :: CellRendererClass cr => ListSkel -> @@ -183,7 +189,7 @@ ) --- @constructor newListStore@ Create a new @ref data ListStore@ database. +-- | Create a new 'ListStore' database. -- -- * This method throws an exception if the skeleton has been used before. -- @@ -198,12 +204,11 @@ LSSActive _ -> throw $ AssertionFailed "Mogul.newListStore: tried to reuse a ListStore skeleton." --- @entry TreeStore@ --- @data TreeSkel@ A skeleton of a @ref data TreeStore@ database. +-- | A skeleton of a 'TreeStore' database. -- -- * This datastructure describes what columns the database will have when --- it is finally created by @ref constructor newTreeStore@ +-- it is finally created by 'newTreeStore' -- newtype TreeSkel = TreeSkel (IORef TreeSkelState) @@ -211,17 +216,17 @@ | TSSActive TreeStore --- @method emptyTreeSkel@ Returns an empty @ref data TreeSkel@. +-- | Returns an empty 'TreeSkel'. -- emptyTreeSkel :: IO TreeSkel emptyTreeSkel = liftM TreeSkel (newIORef (TSSPrepare [])) --- @method treeSkelAddAttribute@ Reserve a new column in --- @ref data TreeSkel@ to hold values for the given attribute. +-- | Reserve a new column in +-- 'TreeSkel' to hold values for the given attribute. -- --- * The type of the column is determined by the given @ref data Attribute@ --- of the @ref data ViewColumn@ which should be stored here. It is possible --- to associate this column with several @ref data ViewColumn@s. +-- * The type of the column is determined by the given 'Attribute' +-- of the 'ViewColumn' which should be stored here. It is possible +-- to associate this column with several 'ViewColumn's. -- treeSkelAddAttribute :: CellRendererClass r => TreeSkel -> Attribute r argTy -> @@ -256,7 +261,7 @@ mapM_ (uncurry $Gtk.treeStoreSetValue ls ti) ) --- @constructor newTreeStore@ Create a new @ref data TreeStore@ database. +-- | Create a new 'TreeStore' database. -- -- * This method throws an exception if the skeleton has been used before. -- @@ -271,22 +276,20 @@ TSSActive _ -> throw $ AssertionFailed "Mogul.newTreeStore: tried to reuse a TreeStore skeleton." --- @entry Widget TreeView@ - --- @data Association@ An abstract link between a store and a view. +-- | An abstract link between a store and a view. -- data CellRendererClass cr => Association cr = Association [String] Int --- @data TextRenderer@ A renderer for text in a @ref data TreeView@. +-- | A renderer for text in a 'TreeView'. -- data CellRendererClass cr => Renderer cr = Renderer cr TreeViewColumn --- @method treeViewColumnNewText@ Create a new rederer showing text. +-- | Create a new rederer showing text. -- --- * There can be several @ref data Renderer@ in each --- @ref data TreeViewColumn@. Each @ref data Renderer@ can reflect --- several @ref data Attributes@ from a @ref data ListStore@ or --- @ref data TreeStore@. +-- * There can be several 'Renderer' in each +-- 'TreeViewColumn'. Each 'Renderer' can reflect +-- several 'Attributes' from a 'ListStore' or +-- 'TreeStore'. -- treeViewColumnNewText :: TreeViewColumn -> Bool -> Bool -> IO (Renderer CellRendererText) @@ -296,14 +299,13 @@ tvc ren expand return $ Renderer ren tvc --- @method treeViewColumnNewPixbuf@ Create a new renderer showing a --- @ref data Pixbuf@. +-- | Create a new renderer showing a 'Pixbuf'. -- -- --- * There can be several @ref data Renderer@ in each --- @ref data TreeViewColumn@. Each @ref data Renderer@ can reflect --- several @ref data Attributes@ from a @ref data ListStore@ or --- @ref data TreeStore@. +-- * There can be several 'Renderer' in each +-- 'TreeViewColumn'. Each 'Renderer' can reflect +-- several 'Attributes' from a 'ListStore' or +-- 'TreeStore'. -- treeViewColumnNewPixbuf :: TreeViewColumn -> Bool -> Bool -> IO (Renderer CellRendererPixbuf) @@ -313,14 +315,12 @@ tvc ren expand return $ Renderer ren tvc --- @method treeViewColumnNewPixbuf@ Create a new renderer showing a --- @ref data ToggleButton@. --- +-- | Create a new renderer showing a 'ToggleButton'. -- --- * There can be several @ref data Renderer@ in each --- @ref data TreeViewColumn@. Each @ref data Renderer@ can reflect --- several @ref data Attributes@ from a @ref data ListStore@ or --- @ref data TreeStore@. +-- * There can be several 'Renderer' in each +-- 'TreeViewColumn'. Each 'Renderer' can reflect +-- several 'Attributes' from a 'ListStore' or +-- 'TreeStore'. -- treeViewColumnNewToggle :: TreeViewColumn -> Bool -> Bool -> IO (Renderer CellRendererToggle) @@ -330,11 +330,10 @@ tvc ren expand return $ Renderer ren tvc --- @method treeViewColumnAssociate@ Create a link between the store and this --- model. +-- | Create a link between the store and this model. -- --- * The results are undefined, if this @ref data TreeViewColumn@ was not --- created with the same @ref data TreeModel@ as the @ref data Association@s. +-- * The results are undefined, if this 'TreeViewColumn' was not +-- created with the same 'TreeModel' as the 'Association's. -- treeViewColumnAssociate :: CellRendererClass r => Renderer r -> [Association r] -> IO () @@ -343,19 +342,19 @@ mapM_ (\(attr,col) -> Gtk.treeViewColumnAddAttribute tvc ren attr col) assocs' --- @method treeViewGetPathAtPos@ Map a pixel to the specific cell. +-- | Map a pixel to the specific cell. -- --- * Finds the path at the @ref type Point@ @ref arg (x, y)@. The --- coordinates @literal x@ and @literal y@ are relative to the top left --- corner of the @ref data TreeView@ drawing window. As such, coordinates +-- * Finds the path at the 'Point' @(x, y)@. The +-- coordinates @x@ and @y@ are relative to the top left +-- corner of the 'TreeView' drawing window. As such, coordinates -- in a mouse click event can be used directly to determine the cell -- which the user clicked on. This is therefore a way to realize for -- popup menus. -- -- * The returned point is the input point relative to the cell's upper --- left corner. The whole @ref data TreeView@ is divided between all cells. +-- left corner. The whole 'TreeView' is divided between all cells. -- The returned point is relative to the rectangle this cell occupies --- within the @ref data TreeView@. +-- within the 'TreeView'. -- treeViewGetPathAtPos :: TreeViewClass tv => tv -> Point -> IO (Maybe (TreePath, TreeViewColumn, Point)) @@ -368,32 +367,29 @@ path <- Gtk.treePathGetIndices realPath return $ Just (path, col, relPt) --- @entry CellRenderer TreeView@ - --- @method cellRendererSetAttribute@ Set an @ref data Attribute@ globally. +-- | Set an 'Attribute' globally. -- --- * An @ref data Attribute@ of a @ref data Renderer@ can either be set --- on a row-by-row basis using @ref method listSkelAddAttribute@ and --- @ref method treeSkelAddAttribute@ or globally through this function. +-- * An 'Attribute' of a 'Renderer' can either be set +-- on a row-by-row basis using 'listSkelAddAttribute' and +-- 'treeSkelAddAttribute' or globally through this function. -- cellRendererSetAttribute :: CellRendererClass cr => Renderer cr -> Attribute cr val -> val -> IO () cellRendererSetAttribute (Renderer ren _) = Gtk.cellRendererSet ren --- @method cellRendererGetAttribute@ Get an global @ref data Attribute@. +-- | Get an global 'Attribute'. -- cellRendererGetAttribute :: CellRendererClass cr => Renderer cr -> Attribute cr val -> IO val cellRendererGetAttribute (Renderer ren _) = Gtk.cellRendererGet ren --- @entry CellRendererText TreeView@ --- @signal edited@ Emitted when the user finished editing a cell. +-- | Emitted when the user finished editing a cell. -- -- * This signal is not emitted when editing is disabled (see --- @ref constant cellEditable@) or when the user aborts editing. +-- 'cellEditable') or when the user aborts editing. -- onEdited, afterEdited :: TreeModelClass tm => Renderer CellRendererText -> tm -> @@ -402,17 +398,14 @@ onEdited (Renderer ren _) = Gtk.onEdited ren afterEdited (Renderer ren _) = Gtk.afterEdited ren --- @entry TreeModel@ - --- @type TreePath@ A simple way of addressing nodes. +-- | A simple way of addressing nodes. -- -- These integer lists are used to address nodes in a hierarchical --- @ref data ListStore@ structure. +-- 'ListStore' structure. -- type TreePath = [Int] --- @method treeModelGetIter@ Turn a @ref type TreePath@ into an abstract --- @ref data TreeIter@ator. +-- | Turn a 'TreePath' into an abstract 'TreeIter'ator. -- treeModelGetIter :: TreeModelClass tm => tm -> TreePath -> IO (Maybe TreeIter) treeModelGetIter _ [] = throw $ AssertionFailed "Mogul.treeModelGetIter: \ @@ -422,8 +415,7 @@ mapM_ (Gtk.treePathAppendIndex realPath) tp Gtk.treeModelGetIter tm realPath --- @method treeModelGetPath@ Turn an abstract @ref data TreeIter@ into a --- @ref type TreePath@. +-- | Turn an abstract 'TreeIter' into a 'TreePath'. -- treeModelGetPath :: TreeModelClass tm => tm -> TreeIter -> IO TreePath treeModelGetPath tm ti = do |
From: Duncan C. <dun...@us...> - 2004-05-25 00:33:46
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30038 Modified Files: ChangeLog Log Message: initial haddockification Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.171 retrieving revision 1.172 diff -u -d -r1.171 -r1.172 --- ChangeLog 23 May 2004 17:06:24 -0000 1.171 +++ ChangeLog 25 May 2004 00:33:36 -0000 1.172 @@ -1,3 +1,9 @@ +2004-05-25 Duncan Coutts <du...@co...> + + * mogul/GetWidget.hs, mogul/MDialog.hs, mogul/Mogul.hs, + mogul/NewWidget.hs, mogul/TreeList.hs, mogul/WidgetTable.hs: + initial haddockification + 2004-05-23 Duncan Coutts <du...@co...> * gtk/abstract/Bin.chs, gtk/abstract/Box.chs, |
From: Duncan C. <dun...@us...> - 2004-05-23 17:06:35
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29916 Modified Files: ChangeLog Log Message: initial haddockification (oops nearly missed this one) Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.170 retrieving revision 1.171 diff -u -d -r1.170 -r1.171 --- ChangeLog 23 May 2004 17:04:06 -0000 1.170 +++ ChangeLog 23 May 2004 17:06:24 -0000 1.171 @@ -93,6 +93,8 @@ * embedding/Embedding.hsc, embedding/Plug.hs, embedding/Socket.chs: initial haddockification + * gtk/glib/GParameter.hsc: initial haddockification + 2004-05-21 Duncan Coutts <du...@co...> * gtk/abstract/FileChooser.chs, gtk/abstract/Widget.chs: |