glib 0.13.0.5 → 0.13.0.6
raw patch · 10 files changed
+30/−30 lines, 10 files
Files
- Gtk2HsSetup.hs +1/−1
- System/Glib/Attributes.hs +1/−1
- System/Glib/Flags.hs +1/−1
- System/Glib/GError.chs +6/−6
- System/Glib/GParameter.hsc +1/−1
- System/Glib/GType.chs +1/−1
- System/Glib/Signals.chs +4/−4
- System/Glib/StoreValue.hsc +12/−12
- System/Glib/Utils.chs +1/−1
- glib.cabal +2/−2
Gtk2HsSetup.hs view
@@ -129,7 +129,7 @@ Just ('.':_) -> True Just ('-':n:_) | isNumber n -> True _ -> False- + -- The following code is a big copy-and-paste job from the sources of -- Cabal 1.8 just to be able to fix a field in the package file. Yuck.
System/Glib/Attributes.hs view
@@ -68,7 +68,7 @@ AttrOp(..), get, set,- + -- * Internal attribute constructors newNamedAttr, readNamedAttr,
System/Glib/Flags.hs view
@@ -34,7 +34,7 @@ import Data.Maybe (catMaybes) class (Enum a, Bounded a) => Flags a- + fromFlags :: Flags a => [a] -> Int fromFlags is = orNum 0 is where orNum n [] = n
System/Glib/GError.chs view
@@ -40,7 +40,7 @@ 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@@ -60,10 +60,10 @@ -- catchGErrorJust, catchGErrorJustDomain,- + handleGErrorJust, handleGErrorJustDomain,- + -- ** Deprecated catchGError, handleGError,@@ -124,7 +124,7 @@ -- | A human readable error message. type GErrorMessage = Text- + instance Storable GError where sizeOf _ = {#sizeof GError #} alignment _ = alignment (undefined:: GQuark)@@ -200,7 +200,7 @@ -- > (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@@ -252,7 +252,7 @@ -- -- > handleGError (\(GError dom code msg) -> ...) $ -- > ...--- +-- handleGError :: (GError -> IO a) -> IO a -> IO a handleGError = handle {-# DEPRECATED handleGError "Use ordinary Control.Exception.handle" #-}
System/Glib/GParameter.hsc view
@@ -6,7 +6,7 @@ -- Created: 29 March 2004 -- -- Copyright (c) 2004 Duncan Coutts--- +-- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Lesser General Public -- License as published by the Free Software Foundation; either
System/Glib/GType.chs view
@@ -13,7 +13,7 @@ -- modify it under the terms of the GNU Lesser General Public -- License as published by the Free Software Foundation; either -- version 2.1 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
System/Glib/Signals.chs view
@@ -24,7 +24,7 @@ -- 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--- the marshall list mentions OBJECT it refers to an instance of this +-- the marshall list mentions OBJECT it refers to an instance of this -- GObject which is automatically wrapped with a ref and unref call. -- Structures which are not derived from GObject have to be passed as -- BOXED which gives the signal connect function a possiblity to do the@@ -133,7 +133,7 @@ signalBlock (ConnectId handler obj) = withForeignPtr ((unGObject.toGObject) obj) $ \objPtr -> {# call g_signal_handler_block #} (castPtr objPtr) handler- + -- | Unblock a specific signal handler. -- -- * Undoes the effect of a previous 'signalBlock' call. A blocked handler@@ -181,8 +181,8 @@ connectGeneric signal after obj user = do sptr <- newStablePtr user gclosurePtr <- gtk2hs_closure_new sptr- sigId <- - withCString signal $ \signalPtr -> + sigId <-+ withCString signal $ \signalPtr -> withForeignPtr ((unGObject.toGObject) obj) $ \objPtr -> {# call g_signal_connect_closure #} (castPtr objPtr)
System/Glib/StoreValue.hsc view
@@ -96,20 +96,20 @@ fromEnum TMobject = #const G_TYPE_OBJECT -- fromEnum TMboxed = #const G_TYPE_BOXED toEnum #{const G_TYPE_INVALID} = TMinvalid- toEnum #{const G_TYPE_UINT} = TMuint - toEnum #{const G_TYPE_INT} = TMint --- toEnum #{const G_TYPE_UCHAR} = TMuchar --- toEnum #{const G_TYPE_CHAR} = TMchar - toEnum #{const G_TYPE_BOOLEAN} = TMboolean + toEnum #{const G_TYPE_UINT} = TMuint+ toEnum #{const G_TYPE_INT} = TMint+-- toEnum #{const G_TYPE_UCHAR} = TMuchar+-- toEnum #{const G_TYPE_CHAR} = TMchar+ toEnum #{const G_TYPE_BOOLEAN} = TMboolean toEnum #{const G_TYPE_ENUM} = TMenum toEnum #{const G_TYPE_FLAGS} = TMflags--- toEnum #{const G_TYPE_POINTER} = TMpointer - toEnum #{const G_TYPE_FLOAT} = TMfloat - toEnum #{const G_TYPE_DOUBLE} = TMdouble - toEnum #{const G_TYPE_STRING} = TMstring - toEnum #{const G_TYPE_OBJECT} = TMobject +-- toEnum #{const G_TYPE_POINTER} = TMpointer+ toEnum #{const G_TYPE_FLOAT} = TMfloat+ toEnum #{const G_TYPE_DOUBLE} = TMdouble+ toEnum #{const G_TYPE_STRING} = TMstring+ toEnum #{const G_TYPE_OBJECT} = TMobject -- toEnum #{const G_TYPE_BOXED} = TMboxed- toEnum _ = + toEnum _ = error "StoreValue.toEnum(TMType): no dynamic types allowed." valueSetGenericValue :: GValue -> GenericValue -> IO ()@@ -140,7 +140,7 @@ valueGetGenericValue gvalue = do gtype <- valueGetType gvalue case (toEnum . fromIntegral) gtype of- TMinvalid -> throw $ AssertionFailed + TMinvalid -> throw $ AssertionFailed "StoreValue.valueGetGenericValue: invalid or unavailable value." TMuint -> liftM GVuint $ valueGetUInt gvalue TMint -> liftM GVint $ valueGetInt gvalue
System/Glib/Utils.chs view
@@ -11,7 +11,7 @@ -- modify it under the terms of the GNU Lesser General Public -- License as published by the Free Software Foundation; either -- version 2.1 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
glib.cabal view
@@ -1,5 +1,5 @@ Name: glib-Version: 0.13.0.5+Version: 0.13.0.6 License: LGPL-2.1 License-file: COPYING Copyright: (c) 2001-2010 The Gtk2Hs Team@@ -38,7 +38,7 @@ bytestring >= 0.9.1.10 && < 0.11, text >= 1.0.0.0 && < 1.3, containers- build-tools: gtk2hsC2hs >= 0.13.11+ build-tools: gtk2hsC2hs >= 0.13.12 cpp-options: -U__BLOCKS__ -D__attribute__(A)= if flag(closure_signals) cpp-options: -DUSE_GCLOSURE_SIGNALS_IMPL