module Graphics.UI.Gtk.Windows.AboutDialog (
AboutDialog,
AboutDialogClass,
castToAboutDialog, gTypeAboutDialog,
toAboutDialog,
aboutDialogNew,
aboutDialogProgramName,
aboutDialogName,
aboutDialogVersion,
aboutDialogCopyright,
aboutDialogComments,
aboutDialogLicense,
aboutDialogWebsite,
aboutDialogWebsiteLabel,
aboutDialogAuthors,
aboutDialogDocumenters,
aboutDialogArtists,
aboutDialogTranslatorCredits,
aboutDialogLogo,
aboutDialogLogoIconName,
aboutDialogWrapLicense,
) where
import Control.Monad (liftM)
import Data.Maybe (fromMaybe)
import System.Glib.FFI
import System.Glib.UTFString
import System.Glib.Attributes
import System.Glib.Properties
import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
import Graphics.UI.Gtk.Types
aboutDialogNew :: IO AboutDialog
aboutDialogNew =
makeNewObject mkAboutDialog $
liftM (castPtr :: Ptr Widget -> Ptr AboutDialog) $
gtk_about_dialog_new
aboutDialogSetAuthors :: (AboutDialogClass self, GlibString string) => self
-> [string]
-> IO ()
aboutDialogSetAuthors self authors =
withUTFStringArray0 authors $ \authorsPtr ->
(\(AboutDialog arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_about_dialog_set_authors argPtr1 arg2)
(toAboutDialog self)
authorsPtr
aboutDialogGetAuthors :: (AboutDialogClass self, GlibString string) => self -> IO [string]
aboutDialogGetAuthors self =
(\(AboutDialog arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_about_dialog_get_authors argPtr1)
(toAboutDialog self)
>>= peekUTFStringArray0
aboutDialogSetArtists :: (AboutDialogClass self, GlibString string) => self
-> [string]
-> IO ()
aboutDialogSetArtists self artists =
withUTFStringArray0 artists $ \artistsPtr ->
(\(AboutDialog arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_about_dialog_set_artists argPtr1 arg2)
(toAboutDialog self)
artistsPtr
aboutDialogGetArtists :: (AboutDialogClass self, GlibString string) => self -> IO [string]
aboutDialogGetArtists self =
(\(AboutDialog arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_about_dialog_get_artists argPtr1)
(toAboutDialog self)
>>= peekUTFStringArray0
aboutDialogSetDocumenters :: (AboutDialogClass self, GlibString string) => self
-> [string]
-> IO ()
aboutDialogSetDocumenters self documenters =
withUTFStringArray0 documenters $ \documentersPtr ->
(\(AboutDialog arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_about_dialog_set_documenters argPtr1 arg2)
(toAboutDialog self)
documentersPtr
aboutDialogGetDocumenters :: (AboutDialogClass self, GlibString string) => self -> IO [string]
aboutDialogGetDocumenters self =
(\(AboutDialog arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_about_dialog_get_documenters argPtr1)
(toAboutDialog self)
>>= peekUTFStringArray0
aboutDialogGetLogo :: AboutDialogClass self => self -> IO Pixbuf
aboutDialogGetLogo self =
makeNewGObject mkPixbuf $
(\(AboutDialog arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_about_dialog_get_logo argPtr1)
(toAboutDialog self)
aboutDialogSetLogo :: AboutDialogClass self => self
-> Maybe Pixbuf
-> IO ()
aboutDialogSetLogo self logo =
(\(AboutDialog arg1) (Pixbuf arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gtk_about_dialog_set_logo argPtr1 argPtr2)
(toAboutDialog self)
(fromMaybe (Pixbuf nullForeignPtr) logo)
aboutDialogGetLogoIconName :: (AboutDialogClass self, GlibString string) => self -> IO string
aboutDialogGetLogoIconName self =
(\(AboutDialog arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_about_dialog_get_logo_icon_name argPtr1)
(toAboutDialog self)
>>= peekUTFString
aboutDialogSetLogoIconName :: (AboutDialogClass self, GlibString string) => self
-> Maybe string
-> IO ()
aboutDialogSetLogoIconName self iconName =
maybeWith withUTFString iconName $ \iconNamePtr ->
(\(AboutDialog arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_about_dialog_set_logo_icon_name argPtr1 arg2)
(toAboutDialog self)
iconNamePtr
aboutDialogName :: (AboutDialogClass self, GlibString string) => Attr self string
aboutDialogName = newAttrFromStringProperty "name"
aboutDialogProgramName :: (AboutDialogClass self, GlibString string) => Attr self string
aboutDialogProgramName = newAttrFromStringProperty "program-name"
aboutDialogVersion :: (AboutDialogClass self, GlibString string) => Attr self string
aboutDialogVersion = newAttrFromStringProperty "version"
aboutDialogCopyright :: (AboutDialogClass self, GlibString string) => Attr self string
aboutDialogCopyright = newAttrFromStringProperty "copyright"
aboutDialogComments :: (AboutDialogClass self, GlibString string) => Attr self string
aboutDialogComments = newAttrFromStringProperty "comments"
aboutDialogLicense :: (AboutDialogClass self, GlibString string) => Attr self (Maybe string)
aboutDialogLicense = newAttrFromMaybeStringProperty "license"
aboutDialogWebsite :: (AboutDialogClass self, GlibString string) => Attr self string
aboutDialogWebsite = newAttrFromStringProperty "website"
aboutDialogWebsiteLabel :: (AboutDialogClass self, GlibString string) => Attr self string
aboutDialogWebsiteLabel = newAttrFromStringProperty "website-label"
aboutDialogAuthors :: (AboutDialogClass self, GlibString string) => Attr self [string]
aboutDialogAuthors = newAttr
aboutDialogGetAuthors
aboutDialogSetAuthors
aboutDialogDocumenters :: (AboutDialogClass self, GlibString string) => Attr self [string]
aboutDialogDocumenters = newAttr
aboutDialogGetDocumenters
aboutDialogSetDocumenters
aboutDialogArtists :: (AboutDialogClass self, GlibString string) => Attr self [string]
aboutDialogArtists = newAttr
aboutDialogGetArtists
aboutDialogSetArtists
aboutDialogTranslatorCredits :: (AboutDialogClass self, GlibString string) => Attr self string
aboutDialogTranslatorCredits = newAttrFromStringProperty "translator-credits"
aboutDialogLogo :: AboutDialogClass self => ReadWriteAttr self Pixbuf (Maybe Pixbuf)
aboutDialogLogo = newAttr
aboutDialogGetLogo
aboutDialogSetLogo
aboutDialogLogoIconName :: (AboutDialogClass self, GlibString string) => ReadWriteAttr self string (Maybe string)
aboutDialogLogoIconName = newAttr
aboutDialogGetLogoIconName
aboutDialogSetLogoIconName
aboutDialogWrapLicense :: AboutDialogClass self => Attr self Bool
aboutDialogWrapLicense = newAttrFromBoolProperty "wrap-license"
foreign import ccall safe "gtk_about_dialog_new"
gtk_about_dialog_new :: (IO (Ptr Widget))
foreign import ccall safe "gtk_about_dialog_set_authors"
gtk_about_dialog_set_authors :: ((Ptr AboutDialog) -> ((Ptr (Ptr CChar)) -> (IO ())))
foreign import ccall safe "gtk_about_dialog_get_authors"
gtk_about_dialog_get_authors :: ((Ptr AboutDialog) -> (IO (Ptr (Ptr CChar))))
foreign import ccall safe "gtk_about_dialog_set_artists"
gtk_about_dialog_set_artists :: ((Ptr AboutDialog) -> ((Ptr (Ptr CChar)) -> (IO ())))
foreign import ccall safe "gtk_about_dialog_get_artists"
gtk_about_dialog_get_artists :: ((Ptr AboutDialog) -> (IO (Ptr (Ptr CChar))))
foreign import ccall safe "gtk_about_dialog_set_documenters"
gtk_about_dialog_set_documenters :: ((Ptr AboutDialog) -> ((Ptr (Ptr CChar)) -> (IO ())))
foreign import ccall safe "gtk_about_dialog_get_documenters"
gtk_about_dialog_get_documenters :: ((Ptr AboutDialog) -> (IO (Ptr (Ptr CChar))))
foreign import ccall safe "gtk_about_dialog_get_logo"
gtk_about_dialog_get_logo :: ((Ptr AboutDialog) -> (IO (Ptr Pixbuf)))
foreign import ccall safe "gtk_about_dialog_set_logo"
gtk_about_dialog_set_logo :: ((Ptr AboutDialog) -> ((Ptr Pixbuf) -> (IO ())))
foreign import ccall safe "gtk_about_dialog_get_logo_icon_name"
gtk_about_dialog_get_logo_icon_name :: ((Ptr AboutDialog) -> (IO (Ptr CChar)))
foreign import ccall safe "gtk_about_dialog_set_logo_icon_name"
gtk_about_dialog_set_logo_icon_name :: ((Ptr AboutDialog) -> ((Ptr CChar) -> (IO ())))