gtk-serialized-event 0.11.0 → 0.12.0
raw patch · 2 files changed
+17/−17 lines, 2 filesdep ~glibdep ~gtkPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: glib, gtk
API changes (from Hackage documentation)
Files
- demo/Main.hs +14/−14
- gtk-serialized-event.cabal +3/−3
demo/Main.hs view
@@ -32,7 +32,7 @@ main = do -- Init. unsafeInitGUIForThreadedRTS- + -- Get program arguments. args <- getArgs @@ -55,8 +55,8 @@ requestName client "org.manatee.server" [] -- Build dbus match rule to listen child process create signal,- -- then use socketAddId add plug. - let matchRule = MatchRule + -- then use socketAddId add plug.+ let matchRule = MatchRule (Just Signal) Nothing (mkInterfaceName "org.manatee.interface")@@ -81,17 +81,17 @@ sEvent <- serializedEvent liftIO $ do -- Create signal.- let signal = DM.Signal + let signal = DM.Signal (mkObjectPath_ "/client") (mkMemberName_ "event1") (mkInterfaceName_ "org.manatee.clientinterface") (mkBusName "org.manatee.client") [toVariant sEvent]- + -- Send signal. emitSignal client signal - -- Startup child plug process. + -- Startup child plug process. path <- liftM2 (</>) getCurrentDirectory getProgName -- get program full path runCommand $ path ++ " hello" @@ -103,7 +103,7 @@ plug <- plugNew Nothing plug `onDestroy` mainQuit plugId <- plugGetId plug- + -- Create browser widget. scrolledWindow <- scrolledWindowNew Nothing Nothing webView <- webViewNew@@ -112,13 +112,13 @@ plug `containerAdd` scrolledWindow widgetShowAll plug- + -- Create render client. client <- mkClient =<< getSessionBus requestName client "org.manatee.client" [] -- Build dbus match rule to listen daemon process event.- let matchRule = MatchRule + let matchRule = MatchRule (Just Signal) Nothing (mkInterfaceName "org.manatee.clientinterface")@@ -134,9 +134,9 @@ drawWindow <- widgetGetDrawWindow webView postGUIAsync $ deserializeEvent event drawWindow (widgetEvent webView) >> return () Nothing -> return ()- + -- Send plug id to deamon process.- let signal = DM.Signal + let signal = DM.Signal (mkObjectPath_ "/server") (mkMemberName_ "signal1") (mkInterfaceName_ "org.manatee.interface")@@ -144,7 +144,7 @@ [toVariant plugId] -- Send signal. emitSignal client signal- + mainGUI instance Num NativeWindowId where@@ -158,13 +158,13 @@ compare = comparing (fromIntegral . fromNativeWindowId) instance Variable NativeWindowId where- toVariant = toVariant . show . fromNativeWindowId + toVariant = toVariant . show . fromNativeWindowId fromVariant x = case fromVariant x of Just v -> Just $ toNativeWindowId $ read v Nothing -> Nothing instance Variable SerializedEvent where- toVariant = toVariant . show + toVariant = toVariant . show fromVariant x = case fromVariant x of Just v -> Just (read v :: SerializedEvent) Nothing -> Nothing
gtk-serialized-event.cabal view
@@ -1,5 +1,5 @@ Name: gtk-serialized-event-Version: 0.11.0+Version: 0.12.0 License: LGPL-2.1 License-file: COPYING Copyright: (c) 2001-2010 The Gtk2Hs Team@@ -30,8 +30,8 @@ Library build-depends: base >= 4 && < 5, array, containers, haskell98, mtl, - glib >= 0.11 && < 0.12,- gtk >= 0.11 && < 0.12+ glib >= 0.12 && < 0.13,+ gtk >= 0.12 && < 0.13 exposed-modules: Graphics.UI.Gtk.Gdk.SerializedEvent