Skip to content

Commit

Permalink
Reuse Void
Browse files Browse the repository at this point in the history
  • Loading branch information
supki committed Feb 26, 2014
1 parent 854a146 commit 0537b1b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion libnotify.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ library
default-language: Haskell2010
hs-source-dirs: src
build-depends:
base >= 4 && < 5
base >= 4 && < 5
, bytestring
, glib
, gtk
, mtl
, void >= 0.5
exposed-modules:
Libnotify
Libnotify.C.Notify
Expand Down
4 changes: 2 additions & 2 deletions src/Libnotify.hs
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ update mt mb mi = Notify $

-- | Shows notification to user.
render :: Notify Bool
render = withNotification $ notify_notification_show
render = withNotification notify_notification_show

-- | Closes notification.
close :: Notify Bool
close = withNotification $ notify_notification_close
close = withNotification notify_notification_close

-- | Sets notification 'Timeout'.
setTimeout :: Timeout -> Notify ()
Expand Down
5 changes: 3 additions & 2 deletions src/Libnotify/C/NotifyNotification.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ module Libnotify.C.NotifyNotification

import Control.Exception (throwIO)
import Data.Data (Typeable, Data)
import Data.Void (Void)
import GHC.Generics (Generic)
import Foreign
import Foreign.C
Expand All @@ -44,9 +45,9 @@ import Unsafe.Coerce (unsafeCoerce)
import qualified Data.ByteString as BS

-- | An opaque notification token
newtype NotifyNotification = NotifyNotification (Ptr NotifyNotification)
type NotifyNotification = Ptr Void

-- | Create a new NotifyNotification
-- | Create a new 'NotifyNotification'
--
-- Only summary is required
notify_notification_new
Expand Down

0 comments on commit 0537b1b

Please sign in to comment.