{-# LINE 2 "./Graphics/UI/Gtk/Display/Statusbar.chs" #-}
-- -*-haskell-*-
-- GIMP Toolkit (GTK) Widget Statusbar
--
-- Author : Axel Simon, Andy Stewart
--
-- Created: 23 May 2001
--
-- Copyright (C) 1999-2005 Axel Simon
-- Copyright (C) 2010 Andy Stewart
--
-- 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
-- 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
-- Lesser General Public License for more details.
--
-- |
-- Maintainer : gtk2hs-users@lists.sourceforge.net
-- Stability : provisional
-- Portability : portable (depends on GHC)
--
-- Report messages of minor importance to the user
--
module Graphics.UI.Gtk.Display.Statusbar (
-- * Detail
--
-- | A 'Statusbar' is usually placed along the bottom of an application's main
-- 'Window'. It may provide a regular commentary of the application's status
-- (as is usually the case in a web browser, for example), or may be used to
-- simply output a message when the status changes, (when an upload is complete
-- in an FTP client, for example). It may also have a resize grip (a triangular
-- area in the lower right corner) which can be clicked on to resize the window
-- containing the statusbar.
--
-- Status bars in Gtk+ maintain a stack of messages. The message at the top
-- of the each bar's stack is the one that will currently be displayed.
--
-- Any messages added to a statusbar's stack must specify a /context_id/
-- that is used to uniquely identify the source of a message. This context_id
-- can be generated by 'statusbarGetContextId', given a message and the
-- statusbar that it will be added to. Note that messages are stored in a
-- stack, and when choosing which message to display, the stack structure is
-- adhered to, regardless of the context identifier of a message.
--
-- Status bars are created using 'statusbarNew'.
--
-- Messages are added to the bar's stack with 'statusbarPush'.
--
-- The message at the top of the stack can be removed using 'statusbarPop'.
-- A message can be removed from anywhere in the stack if its message_id was
-- recorded at the time it was added. This is done using 'statusbarRemove'.

-- * Class Hierarchy
-- |
-- @
-- | 'GObject'
-- | +----'Object'
-- | +----'Widget'
-- | +----'Container'
-- | +----'Box'
-- | +----'HBox'
-- | +----Statusbar
-- @

-- * Types
  Statusbar,
  StatusbarClass,
  castToStatusbar, gTypeStatusbar,
  toStatusbar,
  ContextId,
  MessageId,

-- * Constructors
  statusbarNew,

-- * Methods
  statusbarGetContextId,
  statusbarPush,
  statusbarPop,
  statusbarRemove,

  statusbarSetHasResizeGrip,
  statusbarGetHasResizeGrip,


  statusbarGetMessageArea,


  statusbarRemoveAll,


-- * Attributes

  statusbarHasResizeGrip,


-- * Signals
  textPopped,
  textPushed,

-- * Deprecated

  onTextPopped,
  afterTextPopped,
  onTextPushed,
  afterTextPushed,

  ) where

import Control.Monad (liftM)

import System.Glib.FFI
import System.Glib.UTFString

import System.Glib.Attributes

import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
import Graphics.UI.Gtk.Types
{-# LINE 124 "./Graphics/UI/Gtk/Display/Statusbar.chs" #-}
import Graphics.UI.Gtk.Signals
{-# LINE 125 "./Graphics/UI/Gtk/Display/Statusbar.chs" #-}


{-# LINE 127 "./Graphics/UI/Gtk/Display/Statusbar.chs" #-}

--------------------
-- Constructors

-- | Creates a new 'Statusbar' ready for messages.
--
statusbarNew :: IO Statusbar
statusbarNew :: IO Statusbar
statusbarNew =
  (ForeignPtr Statusbar -> Statusbar, FinalizerPtr Statusbar)
-> IO (Ptr Statusbar) -> IO Statusbar
forall obj.
ObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewObject (ForeignPtr Statusbar -> Statusbar, FinalizerPtr Statusbar)
forall {a}. (ForeignPtr Statusbar -> Statusbar, FinalizerPtr a)
mkStatusbar (IO (Ptr Statusbar) -> IO Statusbar)
-> IO (Ptr Statusbar) -> IO Statusbar
forall a b. (a -> b) -> a -> b
$
  (Ptr Widget -> Ptr Statusbar)
-> IO (Ptr Widget) -> IO (Ptr Statusbar)
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM (Ptr Widget -> Ptr Statusbar
forall a b. Ptr a -> Ptr b
castPtr :: Ptr Widget -> Ptr Statusbar) (IO (Ptr Widget) -> IO (Ptr Statusbar))
-> IO (Ptr Widget) -> IO (Ptr Statusbar)
forall a b. (a -> b) -> a -> b
$
  IO (Ptr Widget)
gtk_statusbar_new
{-# LINE 138 "./Graphics/UI/Gtk/Display/Statusbar.chs" #-}

--------------------
-- Methods

type ContextId = (CUInt)
{-# LINE 143 "./Graphics/UI/Gtk/Display/Statusbar.chs" #-}

-- | Returns a new context identifier, given a description of the actual
-- context. This id can be used to later remove entries form the Statusbar.
--
statusbarGetContextId :: (StatusbarClass self, GlibString string) => self
 -> string -- ^ @contextDescription@ - textual description of what context the
                 -- new message is being used in.
 -> IO ContextId -- ^ returns an id that can be used to later remove entries
                 -- ^ from the Statusbar.
statusbarGetContextId :: forall self string.
(StatusbarClass self, GlibString string) =>
self -> string -> IO ContextId
statusbarGetContextId self
self string
contextDescription =
  string -> (CString -> IO ContextId) -> IO ContextId
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
contextDescription ((CString -> IO ContextId) -> IO ContextId)
-> (CString -> IO ContextId) -> IO ContextId
forall a b. (a -> b) -> a -> b
$ \CString
contextDescriptionPtr ->
  (\(Statusbar ForeignPtr Statusbar
arg1) CString
arg2 -> ForeignPtr Statusbar
-> (Ptr Statusbar -> IO ContextId) -> IO ContextId
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Statusbar
arg1 ((Ptr Statusbar -> IO ContextId) -> IO ContextId)
-> (Ptr Statusbar -> IO ContextId) -> IO ContextId
forall a b. (a -> b) -> a -> b
$ \Ptr Statusbar
argPtr1 ->Ptr Statusbar -> CString -> IO ContextId
gtk_statusbar_get_context_id Ptr Statusbar
argPtr1 CString
arg2)
{-# LINE 155 "./Graphics/UI/Gtk/Display/Statusbar.chs" #-}
    (toStatusbar self)
    CString
contextDescriptionPtr

newtype MessageId = MessageId (CUInt)
{-# LINE 159 "./Graphics/UI/Gtk/Display/Statusbar.chs" #-}

-- | Pushes a new message onto the Statusbar's stack. It will
-- be displayed as long as it is on top of the stack.
--
statusbarPush :: (StatusbarClass self, GlibString string) => self
 -> ContextId -- ^ @contextId@ - the message's context id, as returned by
                 -- 'statusbarGetContextId'.
 -> string -- ^ @text@ - the message to add to the statusbar.
 -> IO MessageId -- ^ returns the message's new message id for use with
                 -- 'statusbarRemove'.
statusbarPush :: forall self string.
(StatusbarClass self, GlibString string) =>
self -> ContextId -> string -> IO MessageId
statusbarPush self
self ContextId
contextId string
text =
  (ContextId -> MessageId) -> IO ContextId -> IO MessageId
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM ContextId -> MessageId
MessageId (IO ContextId -> IO MessageId) -> IO ContextId -> IO MessageId
forall a b. (a -> b) -> a -> b
$
  string -> (CString -> IO ContextId) -> IO ContextId
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
text ((CString -> IO ContextId) -> IO ContextId)
-> (CString -> IO ContextId) -> IO ContextId
forall a b. (a -> b) -> a -> b
$ \CString
textPtr ->
  (\(Statusbar ForeignPtr Statusbar
arg1) ContextId
arg2 CString
arg3 -> ForeignPtr Statusbar
-> (Ptr Statusbar -> IO ContextId) -> IO ContextId
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Statusbar
arg1 ((Ptr Statusbar -> IO ContextId) -> IO ContextId)
-> (Ptr Statusbar -> IO ContextId) -> IO ContextId
forall a b. (a -> b) -> a -> b
$ \Ptr Statusbar
argPtr1 ->Ptr Statusbar -> ContextId -> CString -> IO ContextId
gtk_statusbar_push Ptr Statusbar
argPtr1 ContextId
arg2 CString
arg3)
{-# LINE 173 "./Graphics/UI/Gtk/Display/Statusbar.chs" #-}
    (toStatusbar self)
    ContextId
contextId
    CString
textPtr

-- | Removes the topmost message that has the correct context.
--
statusbarPop :: StatusbarClass self => self
 -> ContextId -- ^ @contextId@ - the context identifier used when the
                -- message was added.
 -> IO ()
statusbarPop :: forall self. StatusbarClass self => self -> ContextId -> IO ()
statusbarPop self
self ContextId
contextId =
  (\(Statusbar ForeignPtr Statusbar
arg1) ContextId
arg2 -> ForeignPtr Statusbar -> (Ptr Statusbar -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Statusbar
arg1 ((Ptr Statusbar -> IO ()) -> IO ())
-> (Ptr Statusbar -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Statusbar
argPtr1 ->Ptr Statusbar -> ContextId -> IO ()
gtk_statusbar_pop Ptr Statusbar
argPtr1 ContextId
arg2)
{-# LINE 185 "./Graphics/UI/Gtk/Display/Statusbar.chs" #-}
    (toStatusbar self)
     ContextId
contextId

-- | Forces the removal of a message from a statusbar's stack. The exact
-- @contextId@ and @messageId@ must be specified.
--
statusbarRemove :: StatusbarClass self => self
 -> ContextId -- ^ @contextId@ - a context identifier.
 -> MessageId -- ^ @messageId@ - a message identifier, as returned by
              -- 'statusbarPush'.
 -> IO ()
statusbarRemove :: forall self.
StatusbarClass self =>
self -> ContextId -> MessageId -> IO ()
statusbarRemove self
self ContextId
contextId (MessageId ContextId
messageId) =
  (\(Statusbar ForeignPtr Statusbar
arg1) ContextId
arg2 ContextId
arg3 -> ForeignPtr Statusbar -> (Ptr Statusbar -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Statusbar
arg1 ((Ptr Statusbar -> IO ()) -> IO ())
-> (Ptr Statusbar -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Statusbar
argPtr1 ->Ptr Statusbar -> ContextId -> ContextId -> IO ()
gtk_statusbar_remove Ptr Statusbar
argPtr1 ContextId
arg2 ContextId
arg3)
{-# LINE 198 "./Graphics/UI/Gtk/Display/Statusbar.chs" #-}
    (toStatusbar self)
    ContextId
contextId
    ContextId
messageId


-- | Sets whether the statusbar has a resize grip. @True@ by default.
--
statusbarSetHasResizeGrip :: StatusbarClass self => self -> Bool -> IO ()
statusbarSetHasResizeGrip :: forall self. StatusbarClass self => self -> Bool -> IO ()
statusbarSetHasResizeGrip self
self Bool
setting =
  (\(Statusbar ForeignPtr Statusbar
arg1) CInt
arg2 -> ForeignPtr Statusbar -> (Ptr Statusbar -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Statusbar
arg1 ((Ptr Statusbar -> IO ()) -> IO ())
-> (Ptr Statusbar -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Statusbar
argPtr1 ->Ptr Statusbar -> CInt -> IO ()
gtk_statusbar_set_has_resize_grip Ptr Statusbar
argPtr1 CInt
arg2)
{-# LINE 208 "./Graphics/UI/Gtk/Display/Statusbar.chs" #-}
    (toStatusbar self)
    (Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
setting)

-- | Returns whether the statusbar has a resize grip.
--
statusbarGetHasResizeGrip :: StatusbarClass self => self -> IO Bool
statusbarGetHasResizeGrip :: forall self. StatusbarClass self => self -> IO Bool
statusbarGetHasResizeGrip self
self =
  (CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
  (\(Statusbar ForeignPtr Statusbar
arg1) -> ForeignPtr Statusbar -> (Ptr Statusbar -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Statusbar
arg1 ((Ptr Statusbar -> IO CInt) -> IO CInt)
-> (Ptr Statusbar -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Statusbar
argPtr1 ->Ptr Statusbar -> IO CInt
gtk_statusbar_get_has_resize_grip Ptr Statusbar
argPtr1)
{-# LINE 217 "./Graphics/UI/Gtk/Display/Statusbar.chs" #-}
    (toStatusbar self)



-- | Retrieves the box containing the label widget.
statusbarGetMessageArea :: StatusbarClass self => self -> IO Box
statusbarGetMessageArea :: forall self. StatusbarClass self => self -> IO Box
statusbarGetMessageArea self
self =
  (ForeignPtr Box -> Box, FinalizerPtr Box) -> IO (Ptr Box) -> IO Box
forall obj.
ObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewObject (ForeignPtr Box -> Box, FinalizerPtr Box)
forall {a}. (ForeignPtr Box -> Box, FinalizerPtr a)
mkBox (IO (Ptr Box) -> IO Box) -> IO (Ptr Box) -> IO Box
forall a b. (a -> b) -> a -> b
$
  (Ptr Widget -> Ptr Box) -> IO (Ptr Widget) -> IO (Ptr Box)
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM (Ptr Widget -> Ptr Box
forall a b. Ptr a -> Ptr b
castPtr :: Ptr Widget -> Ptr Box) (IO (Ptr Widget) -> IO (Ptr Box))
-> IO (Ptr Widget) -> IO (Ptr Box)
forall a b. (a -> b) -> a -> b
$
  (\(Statusbar ForeignPtr Statusbar
arg1) -> ForeignPtr Statusbar
-> (Ptr Statusbar -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Statusbar
arg1 ((Ptr Statusbar -> IO (Ptr Widget)) -> IO (Ptr Widget))
-> (Ptr Statusbar -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a b. (a -> b) -> a -> b
$ \Ptr Statusbar
argPtr1 ->Ptr Statusbar -> IO (Ptr Widget)
gtk_statusbar_get_message_area Ptr Statusbar
argPtr1)
{-# LINE 227 "./Graphics/UI/Gtk/Display/Statusbar.chs" #-}
    (toStatusbar self)




-- | Forces the removal of all messages from a statusbar's stack with the exact @contextId@.
--
-- * Available since Gtk+ version 2.22
--
statusbarRemoveAll :: StatusbarClass self => self
                   -> ContextId -- ^ @contextId@ a context identifier
                   -> IO ()
statusbarRemoveAll :: forall self. StatusbarClass self => self -> ContextId -> IO ()
statusbarRemoveAll self
self ContextId
contextId =
  (\(Statusbar ForeignPtr Statusbar
arg1) ContextId
arg2 -> ForeignPtr Statusbar -> (Ptr Statusbar -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Statusbar
arg1 ((Ptr Statusbar -> IO ()) -> IO ())
-> (Ptr Statusbar -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Statusbar
argPtr1 ->Ptr Statusbar -> ContextId -> IO ()
gtk_statusbar_remove_all Ptr Statusbar
argPtr1 ContextId
arg2)
{-# LINE 241 "./Graphics/UI/Gtk/Display/Statusbar.chs" #-}
    (toStatusbar self)
    ContextId
contextId


--------------------
-- Attributes


-- | Whether the statusbar has a grip for resizing the toplevel window.
--
-- Default value: @True@
--
-- Removed in Gtk3.
statusbarHasResizeGrip :: StatusbarClass self => Attr self Bool
statusbarHasResizeGrip :: forall self. StatusbarClass self => Attr self Bool
statusbarHasResizeGrip = (self -> IO Bool)
-> (self -> Bool -> IO ()) -> ReadWriteAttr self Bool Bool
forall o a b.
(o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
newAttr
  self -> IO Bool
forall self. StatusbarClass self => self -> IO Bool
statusbarGetHasResizeGrip
  self -> Bool -> IO ()
forall self. StatusbarClass self => self -> Bool -> IO ()
statusbarSetHasResizeGrip


--------------------
-- Signals

-- %hash c:4eb7 d:d0ef
-- | Is emitted whenever a new message gets pushed onto a statusbar's stack.
--
textPushed :: (StatusbarClass self, GlibString string) => Signal self (ContextId -> string -> IO ())
textPushed :: forall self string.
(StatusbarClass self, GlibString string) =>
Signal self (ContextId -> string -> IO ())
textPushed = (Bool
 -> self -> (ContextId -> string -> IO ()) -> IO (ConnectId self))
-> Signal self (ContextId -> string -> IO ())
forall object handler.
(Bool -> object -> handler -> IO (ConnectId object))
-> Signal object handler
Signal (\Bool
a self
self ContextId -> string -> IO ()
user -> SignalName
-> Bool -> self -> (Word -> string -> IO ()) -> IO (ConnectId self)
forall b' obj.
(GlibString b', GObjectClass obj) =>
SignalName
-> Bool -> obj -> (Word -> b' -> IO ()) -> IO (ConnectId obj)
connect_WORD_GLIBSTRING__NONE SignalName
"text-pushed" Bool
a self
self (\Word
w string
s -> ContextId -> string -> IO ()
user (Word -> ContextId
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
w) string
s))

-- %hash c:2614 d:c1d2
-- | Is emitted whenever a new message is popped off a statusbar's stack.
--
textPopped :: (StatusbarClass self, GlibString string) => Signal self (ContextId -> string -> IO ())
textPopped :: forall self string.
(StatusbarClass self, GlibString string) =>
Signal self (ContextId -> string -> IO ())
textPopped = (Bool
 -> self -> (ContextId -> string -> IO ()) -> IO (ConnectId self))
-> Signal self (ContextId -> string -> IO ())
forall object handler.
(Bool -> object -> handler -> IO (ConnectId object))
-> Signal object handler
Signal (\Bool
a self
self ContextId -> string -> IO ()
user -> SignalName
-> Bool -> self -> (Word -> string -> IO ()) -> IO (ConnectId self)
forall b' obj.
(GlibString b', GObjectClass obj) =>
SignalName
-> Bool -> obj -> (Word -> b' -> IO ()) -> IO (ConnectId obj)
connect_WORD_GLIBSTRING__NONE SignalName
"text-popped" Bool
a self
self (\Word
w string
s -> ContextId -> string -> IO ()
user (Word -> ContextId
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
w) string
s))

--------------------
-- Deprecated Signals


-- | Called if a message is removed.
--
onTextPopped, afterTextPopped :: (StatusbarClass self, GlibString string) => self
 -> (ContextId -> string -> IO ())
 -> IO (ConnectId self)
onTextPopped :: forall self string.
(StatusbarClass self, GlibString string) =>
self -> (ContextId -> string -> IO ()) -> IO (ConnectId self)
onTextPopped self
self ContextId -> string -> IO ()
user = SignalName
-> Bool -> self -> (Word -> string -> IO ()) -> IO (ConnectId self)
forall b' obj.
(GlibString b', GObjectClass obj) =>
SignalName
-> Bool -> obj -> (Word -> b' -> IO ()) -> IO (ConnectId obj)
connect_WORD_GLIBSTRING__NONE SignalName
"text-popped" Bool
False self
self (ContextId -> string -> IO ()
user (ContextId -> string -> IO ())
-> (Word -> ContextId) -> Word -> string -> IO ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Word -> ContextId
forall a b. (Integral a, Num b) => a -> b
fromIntegral)
afterTextPopped :: forall self string.
(StatusbarClass self, GlibString string) =>
self -> (ContextId -> string -> IO ()) -> IO (ConnectId self)
afterTextPopped self
self ContextId -> string -> IO ()
user = SignalName
-> Bool -> self -> (Word -> string -> IO ()) -> IO (ConnectId self)
forall b' obj.
(GlibString b', GObjectClass obj) =>
SignalName
-> Bool -> obj -> (Word -> b' -> IO ()) -> IO (ConnectId obj)
connect_WORD_GLIBSTRING__NONE SignalName
"text-popped" Bool
True self
self (ContextId -> string -> IO ()
user (ContextId -> string -> IO ())
-> (Word -> ContextId) -> Word -> string -> IO ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Word -> ContextId
forall a b. (Integral a, Num b) => a -> b
fromIntegral)

-- | Called if a message is pushed on top of the
-- stack.
--
onTextPushed, afterTextPushed :: (StatusbarClass self, GlibString string) => self
 -> (ContextId -> string -> IO ())
 -> IO (ConnectId self)
onTextPushed :: forall self string.
(StatusbarClass self, GlibString string) =>
self -> (ContextId -> string -> IO ()) -> IO (ConnectId self)
onTextPushed self
self ContextId -> string -> IO ()
user = SignalName
-> Bool -> self -> (Word -> string -> IO ()) -> IO (ConnectId self)
forall b' obj.
(GlibString b', GObjectClass obj) =>
SignalName
-> Bool -> obj -> (Word -> b' -> IO ()) -> IO (ConnectId obj)
connect_WORD_GLIBSTRING__NONE SignalName
"text-pushed" Bool
False self
self (ContextId -> string -> IO ()
user (ContextId -> string -> IO ())
-> (Word -> ContextId) -> Word -> string -> IO ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Word -> ContextId
forall a b. (Integral a, Num b) => a -> b
fromIntegral)
afterTextPushed :: forall self string.
(StatusbarClass self, GlibString string) =>
self -> (ContextId -> string -> IO ()) -> IO (ConnectId self)
afterTextPushed self
self ContextId -> string -> IO ()
user = SignalName
-> Bool -> self -> (Word -> string -> IO ()) -> IO (ConnectId self)
forall b' obj.
(GlibString b', GObjectClass obj) =>
SignalName
-> Bool -> obj -> (Word -> b' -> IO ()) -> IO (ConnectId obj)
connect_WORD_GLIBSTRING__NONE SignalName
"text-pushed" Bool
True self
self (ContextId -> string -> IO ()
user (ContextId -> string -> IO ())
-> (Word -> ContextId) -> Word -> string -> IO ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Word -> ContextId
forall a b. (Integral a, Num b) => a -> b
fromIntegral)

foreign import ccall unsafe "gtk_statusbar_new"
  gtk_statusbar_new :: (IO (Ptr Widget))

foreign import ccall unsafe "gtk_statusbar_get_context_id"
  gtk_statusbar_get_context_id :: ((Ptr Statusbar) -> ((Ptr CChar) -> (IO CUInt)))

foreign import ccall safe "gtk_statusbar_push"
  gtk_statusbar_push :: ((Ptr Statusbar) -> (CUInt -> ((Ptr CChar) -> (IO CUInt))))

foreign import ccall safe "gtk_statusbar_pop"
  gtk_statusbar_pop :: ((Ptr Statusbar) -> (CUInt -> (IO ())))

foreign import ccall safe "gtk_statusbar_remove"
  gtk_statusbar_remove :: ((Ptr Statusbar) -> (CUInt -> (CUInt -> (IO ()))))

foreign import ccall safe "gtk_statusbar_set_has_resize_grip"
  gtk_statusbar_set_has_resize_grip :: ((Ptr Statusbar) -> (CInt -> (IO ())))

foreign import ccall unsafe "gtk_statusbar_get_has_resize_grip"
  gtk_statusbar_get_has_resize_grip :: ((Ptr Statusbar) -> (IO CInt))

foreign import ccall unsafe "gtk_statusbar_get_message_area"
  gtk_statusbar_get_message_area :: ((Ptr Statusbar) -> (IO (Ptr Widget)))

foreign import ccall safe "gtk_statusbar_remove_all"
  gtk_statusbar_remove_all :: ((Ptr Statusbar) -> (CUInt -> (IO ())))