gtk3-mac-integration 0.2.0.4 → 0.3.0.0
raw patch · 5 files changed
+37/−31 lines, 5 filesdep ~glibdep ~gtk3
Dependency ranges changed: glib, gtk3
Files
- Graphics/UI/Gtk/OSX/Application.chs +19/−17
- Graphics/UI/Gtk/OSX/Signals.chs +8/−7
- gtk3-mac-integration.cabal +5/−5
- hs-gtk-mac-integration.h +3/−0
- marshal.list +2/−2
Graphics/UI/Gtk/OSX/Application.chs view
@@ -62,6 +62,7 @@ import Data.Maybe (fromMaybe) import System.Glib.FFI+import System.Glib.UTFString import System.Glib.GObject (objectNew, makeNewGObject) {#import System.Glib.Properties#} import System.Glib.Attributes@@ -143,11 +144,12 @@ -- | ---applicationSetDockIconResource :: ApplicationClass self => self -> String -> String -> String -> IO ()+applicationSetDockIconResource :: (ApplicationClass self, GlibString string)+ => self -> string -> string -> string -> IO () applicationSetDockIconResource self name rType subdir =- withCString name $ \namePtr ->- withCString rType $ \typePtr ->- withCString subdir $ \subdirPtr ->+ withUTFString name $ \namePtr ->+ withUTFString rType $ \typePtr ->+ withUTFString subdir $ \subdirPtr -> {#call unsafe gtkosx_application_set_dock_icon_resource#} (toApplication self) namePtr typePtr subdirPtr newtype AttentionRequestID = AttentionRequestID CInt@@ -166,34 +168,34 @@ -- | ---applicationGetBundlePath :: IO String+applicationGetBundlePath :: GlibString string => IO string applicationGetBundlePath =- {#call unsafe gtkosx_application_get_bundle_path#} >>= peekCString+ {#call unsafe gtkosx_application_get_bundle_path#} >>= peekUTFString -- | ---applicationGetResourcePath :: IO String+applicationGetResourcePath :: GlibString string => IO string applicationGetResourcePath =- {#call unsafe gtkosx_application_get_resource_path#} >>= peekCString+ {#call unsafe gtkosx_application_get_resource_path#} >>= peekUTFString -- | ---applicationGetExecutablePath :: IO String+applicationGetExecutablePath :: GlibString string => IO string applicationGetExecutablePath =- {#call unsafe gtkosx_application_get_executable_path#} >>= peekCString+ {#call unsafe gtkosx_application_get_executable_path#} >>= peekUTFString -- | ---applicationGetBundleId :: IO String+applicationGetBundleId :: GlibString string => IO string applicationGetBundleId =- {#call unsafe gtkosx_application_get_bundle_id#} >>= peekCString+ {#call unsafe gtkosx_application_get_bundle_id#} >>= peekUTFString -- | ---applicationGetBundleInfo :: String -> IO String+applicationGetBundleInfo :: GlibString string => string -> IO string applicationGetBundleInfo key =- withCString key $ \keyPtr ->- {#call unsafe gtkosx_application_get_bundle_info#} keyPtr >>= peekCString+ withUTFString key $ \keyPtr ->+ {#call unsafe gtkosx_application_get_bundle_info#} keyPtr >>= peekUTFString -- | --@@ -217,6 +219,6 @@ -- | ---openFile :: ApplicationClass self => Signal self (String -> IO ())-openFile = Signal (connect_STRING__NONE "NSApplicationOpenFile")+openFile :: (ApplicationClass self, GlibString string) => Signal self (string -> IO ())+openFile = Signal (connect_GLIBSTRING__NONE "NSApplicationOpenFile")
Graphics/UI/Gtk/OSX/Signals.chs view
@@ -28,7 +28,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 possibility to do the@@ -43,7 +43,7 @@ connect_NONE__NONE, connect_BOXED_BOXED__NONE, connect_NONE__BOOL,- connect_STRING__NONE,+ connect_GLIBSTRING__NONE, ) where @@ -51,9 +51,10 @@ import System.Glib.FFI import System.Glib.UTFString (peekUTFString,maybePeekUTFString)+import qualified System.Glib.UTFString as Glib import System.Glib.GError (failOnGError) {#import System.Glib.Signals#}-{#import System.Glib.GObject#} +{#import System.Glib.GObject#} {#context lib="gtk" prefix="gtk" #}@@ -103,12 +104,12 @@ failOnGError $ user -connect_STRING__NONE :: - GObjectClass obj => SignalName ->+connect_GLIBSTRING__NONE :: + (Glib.GlibString a', GObjectClass obj) => SignalName -> ConnectAfter -> obj ->- (String -> IO ()) ->+ (a' -> IO ()) -> IO (ConnectId obj)-connect_STRING__NONE signal after obj user =+connect_GLIBSTRING__NONE signal after obj user = connectGeneric signal after obj action where action :: Ptr GObject -> CString -> IO () action _ str1 =
gtk3-mac-integration.cabal view
@@ -1,5 +1,5 @@ Name: gtk3-mac-integration-Version: 0.2.0.4+Version: 0.3.0.0 License: LGPL-2.1 License-file: COPYING Copyright: (c) 2001-2010 The Gtk2Hs Team@@ -38,11 +38,11 @@ location: https://github.com/gtk2hs/ige-mac-integration Library- build-depends: base >= 4 && < 5, array, containers, mtl,- glib >=0.12.5.0 && <0.13,- gtk3 >=0.12.5.0 && <0.13+ build-depends: base >= 4 && < 5, array -any, containers -any, mtl -any,+ glib >=0.13.0.0 && <0.14,+ gtk3 >=0.13.0.0 && <0.14 - build-tools: gtk2hsC2hs >= 0.13.9,+ build-tools: gtk2hsC2hs >= 0.13.11, gtk2hsHookGenerator, gtk2hsTypeGen exposed-modules:
hs-gtk-mac-integration.h view
@@ -1,2 +1,5 @@+#ifdef __BLOCKS__+#undef __BLOCKS__+#endif #include <gtkosxapplication.h>
marshal.list view
@@ -14,7 +14,7 @@ # FLAGS for flag enumeration types (guint) # FLOAT for single-precision float types (gfloat) # DOUBLE for double-precision float types (gdouble)-# STRING for string types (gchar*)+# GLIBSTRING for string types (gchar*) # BOXED for boxed (anonymous but reference counted) types (GBoxed*) # POINTER for anonymous pointer types (gpointer) # NONE deprecated alias for VOID@@ -45,4 +45,4 @@ NONE:NONE NONE:BOXED,BOXED BOOLEAN:VOID-VOID:STRING+VOID:GLIBSTRING