You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
|
Jul
(68) |
Aug
(4) |
Sep
|
Oct
(23) |
Nov
(95) |
Dec
(9) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(3) |
Feb
|
Mar
|
Apr
(51) |
May
(81) |
Jun
(2) |
Jul
(86) |
Aug
(143) |
Sep
(3) |
Oct
(31) |
Nov
(63) |
Dec
(90) |
| 2005 |
Jan
(277) |
Feb
(157) |
Mar
(99) |
Apr
(195) |
May
(151) |
Jun
(148) |
Jul
(98) |
Aug
(123) |
Sep
(20) |
Oct
(174) |
Nov
(155) |
Dec
(26) |
| 2006 |
Jan
(51) |
Feb
(19) |
Mar
(16) |
Apr
(12) |
May
(5) |
Jun
|
Jul
(11) |
Aug
(7) |
Sep
(10) |
Oct
(31) |
Nov
(174) |
Dec
(56) |
| 2007 |
Jan
(45) |
Feb
(52) |
Mar
(10) |
Apr
(5) |
May
(47) |
Jun
(16) |
Jul
(80) |
Aug
(29) |
Sep
(14) |
Oct
(59) |
Nov
(46) |
Dec
(16) |
| 2008 |
Jan
(10) |
Feb
(1) |
Mar
|
Apr
|
May
(49) |
Jun
(26) |
Jul
(8) |
Aug
(4) |
Sep
(25) |
Oct
(53) |
Nov
(9) |
Dec
(1) |
| 2009 |
Jan
(66) |
Feb
(11) |
Mar
(1) |
Apr
(14) |
May
(8) |
Jun
(1) |
Jul
(2) |
Aug
(2) |
Sep
(9) |
Oct
(23) |
Nov
(35) |
Dec
|
| 2010 |
Jan
(7) |
Feb
(2) |
Mar
(39) |
Apr
(19) |
May
(161) |
Jun
(19) |
Jul
(32) |
Aug
(65) |
Sep
(113) |
Oct
(120) |
Nov
(2) |
Dec
|
| 2012 |
Jan
|
Feb
(5) |
Mar
(4) |
Apr
(7) |
May
(9) |
Jun
(14) |
Jul
(1) |
Aug
|
Sep
(1) |
Oct
(1) |
Nov
(12) |
Dec
(2) |
| 2013 |
Jan
(1) |
Feb
(17) |
Mar
(4) |
Apr
(4) |
May
(9) |
Jun
|
Jul
(8) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
|
From: Andy S. <And...@co...> - 2010-03-22 14:57:49
|
Mon Mar 22 10:56:57 EDT 2010 Andy Stewart <laz...@gm...>
* Update all `Buttons` modules to Gtk+ 2.18.3
Ignore-this: 5104ae0d2c5813c6de782e7b7d874c4a
hunk ./ApiUpdateTodoList.txt 82
-*** TODO LinkButton.chs
+*** DONE LinkButton.chs
hunk ./ApiUpdateTodoList.txt 171
-*** TODO VolumeButton.chs
+*** DONE VolumeButton.chs
hunk ./ApiUpdateTodoList.txt 201
-** TODO Directory: gtk-modules/Graphics/UI/Gtk/Buttons
-*** TODO Button.chs.pp
-*** TODO CheckButton.chs
-*** TODO RadioButton.chs.pp
-*** TODO ToggleButton.chs
+** DONE Directory: gtk-modules/Graphics/UI/Gtk/Buttons
+*** DONE Button.chs.pp
+*** DONE CheckButton.chs
+*** DONE RadioButton.chs.pp
+*** DONE ToggleButton.chs
hunk ./Makefile.am 628
+ gtk/Graphics/UI/Gtk/Buttons/LinkButton.chs.pp \
+ gtk/Graphics/UI/Gtk/Buttons/ScaleButton.chs.pp \
+ gtk/Graphics/UI/Gtk/Buttons/VolumeButton.chs.pp \
hunk ./gtk/Graphics/UI/Gtk.hs.pp 90
+ module Graphics.UI.Gtk.Buttons.LinkButton,
+ module Graphics.UI.Gtk.Buttons.ScaleButton,
+ module Graphics.UI.Gtk.Buttons.VolumeButton,
hunk ./gtk/Graphics/UI/Gtk.hs.pp 289
+import Graphics.UI.Gtk.Buttons.LinkButton
+import Graphics.UI.Gtk.Buttons.ScaleButton
+import Graphics.UI.Gtk.Buttons.VolumeButton
hunk ./gtk/Graphics/UI/Gtk/Buttons/Button.chs.pp 8
--- Copyright (C) 1999-2005 Axel Simon
+-- Copyright (C) 1999-2009 Axel Simon
hunk ./gtk/Graphics/UI/Gtk/Buttons/Button.chs.pp 116
+ activated,
+ clicked,
+ enter,
+ leave,
+ pressed,
+ released,
+
+ -- * Compatibilty aliases
hunk ./gtk/Graphics/UI/Gtk/Buttons/Button.chs.pp 139
- afterReleased
+ afterReleased,
hunk ./gtk/Graphics/UI/Gtk/Buttons/Button.chs.pp 610
-buttonActivated :: ButtonClass self => Signal self (IO ())
-buttonActivated = Signal (connect_NONE__NONE "clicked")
+activated :: ButtonClass self => Signal self (IO ())
+activated = Signal (connect_NONE__NONE "clicked")
+
+-- | Emitted when the button is pressed.
+--
+pressed :: ButtonClass self => Signal self (IO ())
+pressed = Signal (connect_NONE__NONE "pressed")
+
+-- | Emitted when the button is released.
+--
+released :: ButtonClass self => Signal self (IO ())
+released = Signal (connect_NONE__NONE "released")
+
+-- | Emitted when the button has been activated (pressed and released).
+--
+clicked :: ButtonClass self => Signal self (IO ())
+clicked = Signal (connect_NONE__NONE "clicked")
+
+-- | Emitted when the pointer enters the button.
+--
+enter :: ButtonClass self => Signal self (IO ())
+enter = Signal (connect_NONE__NONE "enter")
+
+-- | Emitted when the pointer leaves the button.
+--
+leave :: ButtonClass self => Signal self (IO ())
+leave = Signal (connect_NONE__NONE "leave")
hunk ./gtk/Graphics/UI/Gtk/Buttons/Button.chs.pp 638
+---------------------
+-- Compatibility aliases.
+buttonActivated :: ButtonClass self => Signal self (IO ())
+buttonActivated = activated
hunk ./gtk/Graphics/UI/Gtk/Buttons/Button.chs.pp 685
+
hunk ./gtk/Graphics/UI/Gtk/Buttons/Button.chs.pp 687
+
hunk ./gtk/Graphics/UI/Gtk/Buttons/CheckButton.chs 8
--- Copyright (C) 1999-2005 Axel Simon
+-- Copyright (C) 1999-2009 Axel Simon
hunk ./gtk/Graphics/UI/Gtk/Buttons/CheckButton.chs 28
+
hunk ./gtk/Graphics/UI/Gtk/Buttons/CheckButton.chs 38
+--
addfile ./gtk/Graphics/UI/Gtk/Buttons/LinkButton.chs.pp
hunk ./gtk/Graphics/UI/Gtk/Buttons/LinkButton.chs.pp 1
+-- -*-haskell-*-
+-- GIMP Toolkit (GTK) Widget LinkButton
+--
+-- Author : Andy Stewart
+--
+-- Created: 22 Mar 2010
+--
+-- 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 : gtk...@li...
+-- Stability : provisional
+-- Portability : portable (depends on GHC)
+--
+-- Create buttons bound to a URL
+--
+-- * Module available since Gtk+ version 2.10
+--
+module Graphics.UI.Gtk.Buttons.LinkButton (
+
+-- * Detail
+--
+-- | A 'LinkButton' is a 'Button' with a hyperlink, similar to the one used by
+-- web browsers, which triggers an action when clicked. It is useful to show
+-- quick links to resources.
+--
+-- A link button is created by calling either 'linkButtonNew' or
+-- 'linkButtonNewWithLabel'. If using the former, the URI you pass to the
+-- constructor is used as a label for the widget.
+--
+-- The URI bound to a 'LinkButton' can be set specifically using
+-- 'linkButtonSetURI', and retrieved using 'linkButtonGetURI'.
+--
+-- 'LinkButton' offers a global hook, which is called when the used clicks
+-- on it: see 'linkButtonSetURIHook'.
+--
+-- 'LinkButton' was added in Gtk+ 2.10.
+
+-- * Class Hierarchy
+--
+-- |
+-- @
+-- | 'GObject'
+-- | +----'Object'
+-- | +----'Widget'
+-- | +----'Container'
+-- | +----'Bin'
+-- | +----'Button'
+-- | +----LinkButton
+-- @
+
+#if GTK_CHECK_VERSION(2,10,0)
+-- * Types
+ LinkButton,
+ LinkButtonClass,
+ LinkButtonUri,
+ castToLinkButton,
+ toLinkButton,
+
+-- * Constructors
+ linkButtonNew,
+ linkButtonNewWithLabel,
+
+-- * Methods
+ linkButtonSetURIHook,
+
+-- * Attributes
+ linkButtonURI,
+ linkButtonVisited,
+
+-- * Deprecated
+#ifndef DISABLE_DEPRECATED
+ linkButtonGetURI,
+ linkButtonSetURI,
+#if GTK_CHECK_VERSION(2,14,0)
+ linkButtonGetVisited,
+ linkButtonSetVisited,
+#endif
+#endif
+#endif
+ ) where
+
+import Control.Monad (liftM, unless)
+
+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#}
+{#import Graphics.UI.Gtk.Signals#}
+
+{# context lib="gtk" prefix="gtk" #}
+
+#if GTK_CHECK_VERSION(2,10,0)
+
+--------------------
+-- Types [_$_]
+type LinkButtonUri = String -> ()
+
+{#pointer LinkButtonUriFunc#}
+
+foreign import ccall "wrapper" mkLinkButtonUriFunc ::
+ (Ptr LinkButton -> CString -> Ptr () -> IO ())
+ -> IO LinkButtonUriFunc
+
+--------------------
+-- Constructors
+
+-- | Creates a new 'LinkButton' with the URI as its text.
+--
+linkButtonNew ::
+ String -- ^ @uri@ - a valid URI
+ -> IO LinkButton
+linkButtonNew uri =
+ makeNewObject mkLinkButton $
+ liftM (castPtr :: Ptr Widget -> Ptr LinkButton) $
+ withUTFString uri $ \uriPtr ->
+ {# call gtk_link_button_new #}
+ uriPtr
+
+-- | Creates a new 'LinkButton' containing a label.
+--
+linkButtonNewWithLabel ::
+ String -- ^ @uri@ - a valid URI
+ -> String -- ^ @label@ - the text of the button
+ -> IO LinkButton
+linkButtonNewWithLabel uri label =
+ makeNewObject mkLinkButton $
+ liftM (castPtr :: Ptr Widget -> Ptr LinkButton) $
+ withUTFString label $ \labelPtr ->
+ withUTFString uri $ \uriPtr ->
+ {# call gtk_link_button_new_with_label #}
+ uriPtr
+ labelPtr
+
+--------------------
+-- Methods
+
+#ifndef DISABLE_DEPRECATED
+linkButtonGetURI :: LinkButtonClass self => self
+ -> IO String -- ^ returns a valid URI. The returned string is owned by the
+ -- link button and should not be modified or freed.
+linkButtonGetURI self =
+ {# call gtk_link_button_get_uri #}
+ (toLinkButton self)
+ >>= peekUTFString
+{-# DEPRECATED linkButtonGetURI "instead of 'linkButtonGetURI obj' use 'get obj linkButtonURI'" #-}
+
+linkButtonSetURI :: LinkButtonClass self => self
+ -> String -- ^ @uri@ - a valid URI
+ -> IO ()
+linkButtonSetURI self uri =
+ withUTFString uri $ \uriPtr ->
+ {# call gtk_link_button_set_uri #}
+ (toLinkButton self)
+ uriPtr
+{-# DEPRECATED linkButtonSetURI "instead of 'linkButtonSetURI obj value' use 'set obj [ linkButtonURI := value ]'" #-}
+#endif
+
+-- | Sets @func@ as the function that should be invoked every time a user
+-- clicks a 'LinkButton'. This function is called before every callback
+-- registered for the \"clicked\" signal.
+--
+-- If no uri hook has been set, Gtk+ defaults to calling 'showURI'.
+--
+linkButtonSetURIHook :: Maybe LinkButtonUri
+ -> DestroyNotify [_$_]
+ -> IO ()
+linkButtonSetURIHook func destroy = do
+ pfPtr <- case func of
+ Just pf -> mkLinkButtonUriFunc $ \_ cstr _ -> do
+ str <- peekCString cstr
+ return (pf str)
+ Nothing -> return nullFunPtr
+ {# call gtk_link_button_set_uri_hook #} pfPtr nullPtr destroy
+ unless (pfPtr == nullFunPtr) $ freeHaskellFunPtr pfPtr
+ [_$_]
+#ifndef DISABLE_DEPRECATED
+
+#if GTK_CHECK_VERSION(2,14,0)
+linkButtonGetVisited :: LinkButtonClass self => self
+ -> IO Bool -- ^ returns @True@ if the link has been visited, @False@
+ -- otherwise
+linkButtonGetVisited self =
+ liftM toBool $
+ {# call gtk_link_button_get_visited #}
+ (toLinkButton self)
+{-# DEPRECATED linkButtonGetVisited "instead of 'linkButtonGetVisited obj' use 'get obj linkButtonVisited'" #-}
+
+linkButtonSetVisited :: LinkButtonClass self => self
+ -> Bool -- ^ @visited@ - the new \'visited\' state
+ -> IO ()
+linkButtonSetVisited self visited =
+ {# call gtk_link_button_set_visited #}
+ (toLinkButton self)
+ (fromBool visited)
+{-# DEPRECATED linkButtonSetVisited "instead of 'linkButtonSetVisited obj value' use 'set obj [ linkButtonVisited := value ]'" #-}
+#endif
+#endif
+
+--------------------
+-- Attributes
+
+-- |
+--
+linkButtonURI :: LinkButtonClass self => Attr self String
+linkButtonURI = newAttrFromStringProperty "uri"
+
+-- |
+--
+linkButtonVisited :: LinkButtonClass self => Attr self Bool
+linkButtonVisited = newAttrFromBoolProperty "visited"
+#endif
hunk ./gtk/Graphics/UI/Gtk/Buttons/RadioButton.chs.pp 8
--- Copyright (C) 1999-2005 Axel Simon
+-- Copyright (C) 1999-2009 Axel Simon
hunk ./gtk/Graphics/UI/Gtk/Buttons/RadioButton.chs.pp 34
+
hunk ./gtk/Graphics/UI/Gtk/Buttons/RadioButton.chs.pp 90
+--
addfile ./gtk/Graphics/UI/Gtk/Buttons/ScaleButton.chs.pp
hunk ./gtk/Graphics/UI/Gtk/Buttons/ScaleButton.chs.pp 1
+-- -*-haskell-*-
+-- GIMP Toolkit (GTK) Widget ScaleButton
+--
+-- Author : Andy Stewart
+--
+-- Created: 22 Mar 2010
+--
+-- 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 : gtk...@li...
+-- Stability : provisional
+-- Portability : portable (depends on GHC)
+--
+-- A button which pops up a scale
+--
+-- * Module available since Gtk+ version 2.12
+--
+module Graphics.UI.Gtk.Buttons.ScaleButton (
+
+-- * Detail
+--
+-- | 'ScaleButton' provides a button which pops up a scale widget. This kind
+-- of widget is commonly used for volume controls in multimedia applications,
+-- and Gtk+ provides a 'VolumeButton' subclass that is tailored for this use
+-- case.
+
+-- * Class Hierarchy
+--
+-- |
+-- @
+-- | 'GObject'
+-- | +----'Object'
+-- | +----'Widget'
+-- | +----'Container'
+-- | +----'Bin'
+-- | +----'Button'
+-- | +----ScaleButton
+-- | +----'VolumeButton'
+-- @
+
+#if GTK_CHECK_VERSION(2,12,0)
+-- * Types
+ ScaleButton,
+ ScaleButtonClass,
+ castToScaleButton,
+ toScaleButton,
+
+-- * Constructors
+ scaleButtonNew,
+
+-- * Methods
+ scaleButtonSetIcons,
+#if GTK_CHECK_VERSION(2,14,0)
+ scaleButtonGetPopup,
+ scaleButtonGetPlusButton,
+ scaleButtonGetMinusButton,
+#endif
+
+-- * Attributes
+ scaleButtonValue,
+ scaleButtonSize,
+ scaleButtonAdjustment,
+ -- scaleButtonIcons,
+
+-- * Signals
+ scaleButtonPopdown,
+ scaleButtonPopup,
+ scaleButtonValueChanged,
+
+-- * Deprecated
+#ifndef DISABLE_DEPRECATED
+ scaleButtonSetAdjustment,
+ scaleButtonSetValue,
+ scaleButtonGetAdjustment,
+ scaleButtonGetValue,
+#endif
+#endif
+ ) where
+
+import Control.Monad (liftM)
+
+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.General.Structs (IconSize(..))
+{#import Graphics.UI.Gtk.Types#}
+{#import Graphics.UI.Gtk.Signals#}
+
+{# context lib="gtk" prefix="gtk" #}
+
+#if GTK_CHECK_VERSION(2,12,0)
+--------------------
+-- Interfaces
+
+-- instance OrientableClass ScaleButton
+
+--------------------
+-- Constructors
+
+-- | Creates a 'ScaleButton', with a range between @min@ and @max@, with a
+-- stepping of @step@.
+--
+scaleButtonNew ::
+ IconSize -- ^ @size@ - a stock icon size
+ -> Double -- ^ @min@ - the minimum value of the scale (usually 0)
+ -> Double -- ^ @max@ - the maximum value of the scale (usually 100)
+ -> Double -- ^ @step@ - the stepping of value when a scroll-wheel event, or
+ -- up\/down arrow event occurs (usually 2)
+ -> [String] -- ^ @icons@
+ -> IO ScaleButton
+scaleButtonNew size min max step icons =
+ makeNewObject mkScaleButton $
+ liftM (castPtr :: Ptr Widget -> Ptr ScaleButton) $
+ withUTFStringArray0 icons $ \iconsPtr ->
+ {# call gtk_scale_button_new #}
+ ((fromIntegral . fromEnum) size)
+ (realToFrac min)
+ (realToFrac max)
+ (realToFrac step)
+ iconsPtr
+
+--------------------
+-- Methods
+
+#ifndef DISABLE_DEPRECATED
+scaleButtonSetAdjustment :: ScaleButtonClass self => self
+ -> Adjustment -- ^ @adjustment@ - a 'Adjustment'
+ -> IO ()
+scaleButtonSetAdjustment self adjustment =
+ {# call gtk_scale_button_set_adjustment #}
+ (toScaleButton self)
+ adjustment
+{-# DEPRECATED scaleButtonSetAdjustment "instead of 'scaleButtonSetAdjustment obj value' use 'set obj [ scaleButtonAdjustment := value ]'" #-}
+#endif
+
+-- | Sets the icons to be used by the scale button. For details, see the "icons" property.
+scaleButtonSetIcons :: ScaleButtonClass self => self
+ -> [String] -- ^ @icons@
+ -> IO ()
+scaleButtonSetIcons self icons =
+ withUTFStringArray0 icons $ \iconsPtr ->
+ {# call gtk_scale_button_set_icons #}
+ (toScaleButton self)
+ iconsPtr
+
+#ifndef DISABLE_DEPRECATED
+scaleButtonSetValue :: ScaleButtonClass self => self
+ -> Double -- ^ @value@ - new value of the scale button
+ -> IO ()
+scaleButtonSetValue self value =
+ {# call gtk_scale_button_set_value #}
+ (toScaleButton self)
+ (realToFrac value)
+{-# DEPRECATED scaleButtonSetValue "instead of 'scaleButtonSetValue obj value' use 'set obj [ scaleButtonValue := value ]'" #-}
+
+scaleButtonGetAdjustment :: ScaleButtonClass self => self
+ -> IO Adjustment -- ^ returns the adjustment associated with the scale
+scaleButtonGetAdjustment self =
+ makeNewObject mkAdjustment $
+ {# call gtk_scale_button_get_adjustment #}
+ (toScaleButton self)
+{-# DEPRECATED scaleButtonGetAdjustment "instead of 'scaleButtonGetAdjustment obj' use 'get obj scaleButtonAdjustment'" #-}
+
+scaleButtonGetValue :: ScaleButtonClass self => self
+ -> IO Double -- ^ returns current value of the scale button
+scaleButtonGetValue self =
+ liftM realToFrac $
+ {# call gtk_scale_button_get_value #}
+ (toScaleButton self)
+{-# DEPRECATED scaleButtonGetValue "instead of 'scaleButtonGetValue obj' use 'get obj scaleButtonValue'" #-}
+#endif
+
+#if GTK_CHECK_VERSION(2,14,0)
+-- | Retrieves the popup of the 'ScaleButton'.
+--
+-- * Available since Gtk+ version 2.14
+--
+scaleButtonGetPopup :: ScaleButtonClass self => self
+ -> IO Widget -- ^ returns the popup of the 'ScaleButton'
+scaleButtonGetPopup self =
+ makeNewObject mkWidget $
+ {# call gtk_scale_button_get_popup #}
+ (toScaleButton self)
+
+-- | Retrieves the plus button of the 'ScaleButton'.
+--
+-- * Available since Gtk+ version 2.14
+--
+scaleButtonGetPlusButton :: ScaleButtonClass self => self
+ -> IO Widget -- ^ returns the plus button of the 'ScaleButton'.
+scaleButtonGetPlusButton self =
+ makeNewObject mkWidget $
+ {# call gtk_scale_button_get_plus_button #}
+ (toScaleButton self)
+
+-- | Retrieves the minus button of the 'ScaleButton'.
+--
+-- * Available since Gtk+ version 2.14
+--
+scaleButtonGetMinusButton :: ScaleButtonClass self => self
+ -> IO Widget -- ^ returns the minus button of the 'ScaleButton'.
+scaleButtonGetMinusButton self =
+ makeNewObject mkWidget $
+ {# call gtk_scale_button_get_minus_button #}
+ (toScaleButton self)
+#endif
+
+--------------------
+-- Attributes
+
+-- | The value of the scale.
+-- [_$_]
+-- Default value: 0
+scaleButtonValue :: ScaleButtonClass self => Attr self Double
+scaleButtonValue = newAttrFromDoubleProperty "value"
+
+-- | The icon size.
+-- [_$_]
+-- Default value: ''IconSizeSmallToolbar''
+scaleButtonSize :: ScaleButtonClass self => Attr self IconSize
+scaleButtonSize = newAttrFromEnumProperty "size"
+ {# call pure unsafe gtk_icon_size_get_type #}
+
+-- | The 'Adjustment' that contains the current value of this scale button object.
+scaleButtonAdjustment :: ScaleButtonClass self => Attr self Adjustment
+scaleButtonAdjustment = newAttrFromObjectProperty "adjustment"
+ {# call pure unsafe gtk_adjustment_get_type #}
+
+-- | The names of the icons to be used by the scale button. The first item in the array will be used in
+-- the button when the current value is the lowest value, the second item for the highest value. All
+-- the subsequent icons will be used for all the other values, spread evenly over the range of values.
+-- [_$_]
+-- If there's only one icon name in the icons array, it will be used for all the values. If only two
+-- icon names are in the icons array, the first one will be used for the bottom 50% of the scale, and
+-- the second one for the top 50%.
+-- [_$_]
+-- It is recommended to use at least 3 icons so that the 'ScaleButton' reflects the current value of
+-- the scale better for the users.
+-- [_$_]
+-- Since 2.12
+-- scaleButtonIcons :: ScaleButtonClass self => Attr self [String]
+-- scaleButtonIcons = newAttrFromStringsProperty "icons"
+
+--------------------
+-- Signals
+
+-- | The ::value-changed signal is emitted when the value field has changed.
+--
+scaleButtonValueChanged :: ScaleButtonClass self => Signal self (Double -> IO ())
+scaleButtonValueChanged = Signal (connect_DOUBLE__NONE "value-changed")
+
+-- | The 'popup' signal is a keybinding signal which gets emitted to popup the scale widget.
+-- [_$_]
+-- The default bindings for this signal are Space, Enter and Return.
+scaleButtonPopup :: ScaleButtonClass self => Signal self (IO ())
+scaleButtonPopup = Signal (connect_NONE__NONE "popup")
+
+-- | The 'popdown' signal is a keybinding signal which gets emitted to popdown the scale widget.
+-- [_$_]
+-- The default binding for this signal is Escape.
+scaleButtonPopdown :: ScaleButtonClass self => Signal self (IO ())
+scaleButtonPopdown = Signal (connect_NONE__NONE "popdown")
+#endif
hunk ./gtk/Graphics/UI/Gtk/Buttons/ToggleButton.chs.pp 8
--- Copyright (C) 1999-2005 Axel Simon
+-- Copyright (C) 1999-2009 Axel Simon
hunk ./gtk/Graphics/UI/Gtk/Buttons/ToggleButton.chs.pp 28
+
addfile ./gtk/Graphics/UI/Gtk/Buttons/VolumeButton.chs.pp
hunk ./gtk/Graphics/UI/Gtk/Buttons/VolumeButton.chs.pp 1
+-- -*-haskell-*-
+-- GIMP Toolkit (GTK) Widget VolumeButton
+--
+-- Author : Andy Stewart
+--
+-- Created: 22 Mar 2010
+--
+-- 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 : gtk...@li...
+-- Stability : provisional
+-- Portability : portable (depends on GHC)
+--
+-- A button which pops up a volume control
+--
+-- * Module available since Gtk+ version 2.12
+--
+module Graphics.UI.Gtk.Buttons.VolumeButton (
+
+-- * Detail
+--
+-- | 'VolumeButton' is a subclass of 'ScaleButton' that has been tailored for
+-- use as a volume control widget with suitable icons, tooltips and accessible
+-- labels.
+
+-- * Class Hierarchy
+--
+-- |
+-- @
+-- | 'GObject'
+-- | +----'Object'
+-- | +----'Widget'
+-- | +----'Container'
+-- | +----'Bin'
+-- | +----'Button'
+-- | +----'ScaleButton'
+-- | +----VolumeButton
+-- @
+
+#if GTK_CHECK_VERSION(2,12,0)
+-- * Types
+ VolumeButton,
+ VolumeButtonClass,
+ castToVolumeButton,
+ toVolumeButton,
+
+-- * Constructors
+ volumeButtonNew,
+#endif
+ ) where
+
+import Control.Monad (liftM)
+
+import System.Glib.FFI
+import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
+{#import Graphics.UI.Gtk.Types#}
+
+{# context lib="gtk" prefix="gtk" #}
+
+#if GTK_CHECK_VERSION(2,12,0)
+--------------------
+-- Constructors
+
+-- | Creates a 'VolumeButton', with a range between 0.0 and 1.0, with a
+-- stepping of 0.02. Volume values can be obtained and modified using the
+-- functions from 'ScaleButton'.
+--
+volumeButtonNew :: IO VolumeButton
+volumeButtonNew =
+ makeNewObject mkVolumeButton $
+ liftM (castPtr :: Ptr Widget -> Ptr VolumeButton) $
+ {# call gtk_volume_button_new #}
+#endif
hunk ./tools/hierarchyGen/hierarchy.list 66
+ GtkScaleButton
+ GtkVolumeButton
+ GtkLinkButton
|
|
From: Andy S. <And...@co...> - 2010-03-22 12:13:53
|
Mon Mar 22 08:04:28 EDT 2010 Andy Stewart <laz...@gm...>
* Update all `Windows` modules to Gtk+ 2.18.3
Ignore-this: 7f37b40f96e4bb0f7ddc58e93319a58
hunk ./ApiUpdateTodoList.txt 25
-*** TODO Assistant.chs
+*** DONE Assistant.chs
hunk ./ApiUpdateTodoList.txt 339
-** TODO Directory: gtk-modules/Graphics/UI/Gtk/Windows
-*** TODO AboutDialog.chs.pp
-*** TODO Dialog.chs.pp
-*** TODO MessageDialog.chs.pp
-*** TODO Window.chs.pp
-*** TODO WindowGroup.chs
+** DONE Directory: gtk-modules/Graphics/UI/Gtk/Windows
+*** DONE AboutDialog.chs.pp
+*** DONE Dialog.chs.pp
+*** DONE MessageDialog.chs.pp
+*** DONE Window.chs.pp
+*** DONE WindowGroup.chs
hunk ./Makefile.am 770
+ gtk/Graphics/UI/Gtk/Windows/Assistant.chs.pp \
hunk ./gtk/Graphics/UI/Gtk.hs.pp 77
+ module Graphics.UI.Gtk.Windows.Assistant,
hunk ./gtk/Graphics/UI/Gtk.hs.pp 269
+import Graphics.UI.Gtk.Windows.Assistant hiding (close)
hunk ./gtk/Graphics/UI/Gtk/Windows/AboutDialog.chs.pp 8
--- Copyright (C) 2005 Duncan Coutts
+-- Copyright (C) 2005-2009 Duncan Coutts
hunk ./gtk/Graphics/UI/Gtk/Windows/AboutDialog.chs.pp 29
+-- Note:
+-- Use attributes instead below functions, so we con't bind them for simple:
+-- gtk_about_dialog_get_program_name
+-- gtk_about_dialog_set_program_name
+-- Current FFI don't support varage functions:
+-- gtk_show_about_dialog
+--
hunk ./gtk/Graphics/UI/Gtk/Windows/AboutDialog.chs.pp 37
+
hunk ./gtk/Graphics/UI/Gtk/Windows/AboutDialog.chs.pp 67
+--
addfile ./gtk/Graphics/UI/Gtk/Windows/Assistant.chs.pp
hunk ./gtk/Graphics/UI/Gtk/Windows/Assistant.chs.pp 1
+-- -*-haskell-*-
+-- GIMP Toolkit (GTK) Widget Assistant
+--
+-- Author : Andy Stewart
+--
+-- Created: 22 Mar 2010
+--
+-- 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 : gtk...@li...
+-- Stability : provisional
+-- Portability : portable (depends on GHC)
+--
+-- A widget used to guide users through multi-step operations
+--
+-- * Module available since Gtk+ version 2.10
+--
+module Graphics.UI.Gtk.Windows.Assistant (
hunk ./gtk/Graphics/UI/Gtk/Windows/Assistant.chs.pp 31
+-- * Detail
+--
+-- | A 'Assistant' is a widget used to represent a generally complex operation
+-- splitted in several steps, guiding the user through its pages and
+-- controlling the page flow to collect the necessary data.
+
+-- ** GtkAssistant as GtkBuildable
+--
+-- | The 'Assistant' implementation of the 'Buildable' interface exposes the
+-- @actionArea@ as internal children with the name \"action_area\".
+--
+-- To add pages to an assistant in 'Builder', simply add it as a \<child> to
+-- the 'Assistant' object, and set its child properties as necessary.
+
+-- * Class Hierarchy
+--
+-- |
+-- @
+-- | 'GObject'
+-- | +----'Object'
+-- | +----'Widget'
+-- | +----'Container'
+-- | +----'Bin'
+-- | +----'Window'
+-- | +----Assistant
+-- @
+
+#if GTK_CHECK_VERSION(2,10,0)
+-- * Types
+ Assistant,
+ AssistantClass,
+ AssistantPage,
+ castToAssistant,
+ toAssistant,
+
+-- * Enums.
+ AssistantPageType(..),
+
+-- * Constructors
+ assistantNew,
+
+-- * Methods
+ assistantGetNPages,
+ assistantGetNthPage,
+ assistantPrependPage,
+ assistantAppendPage,
+ assistantInsertPage,
+ assistantSetForwardPageFunc,
+ assistantSetPageType,
+ assistantGetPageType,
+ assistantSetPageTitle,
+ assistantGetPageTitle,
+ assistantSetPageHeaderImage,
+ assistantGetPageHeaderImage,
+ assistantSetPageSideImage,
+ assistantGetPageSideImage,
+ assistantSetPageComplete,
+ assistantGetPageComplete,
+ assistantAddActionWidget,
+ assistantRemoveActionWidget,
+ assistantUpdateButtonsState,
+ assistantGetCurrentPage,
+ assistantSetCurrentPage,
+
+-- * Attributes
+ assistantCurrentPage,
+
+-- * Child Attributes
+ assistantChildPageType,
+ assistantChildTitle,
+ assistantChildHeaderImage,
+ assistantChildSidebarImage,
+ assistantChildComplete,
+
+-- * Signals
+ cancel,
+ prepare,
+ apply,
+ close,
+#endif
+ ) where
+
+import Control.Monad (liftM, unless)
+
+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#}
+{#import Graphics.UI.Gtk.Signals#}
+
+{# context lib="gtk" prefix="gtk" #}
+
+#if GTK_CHECK_VERSION(2,10,0)
+--------------------
+-- Types [_$_]
+type AssistantPage = Int -> Int
+
+{#pointer AssistantPageFunc#}
+
+foreign import ccall "wrapper" mkAssistantPageFunc ::
+ (Ptr Assistant -> {#type glong#} -> Ptr () -> IO {#type glong#})
+ -> IO AssistantPageFunc
+
+--------------------
+-- Interfaces
+
+-- instance BuildableClass Assistant
+
+--------------------
+-- Enum
+{#enum GtkAssistantPageType as AssistantPageType {underscoreToCase} deriving (Bounded,Eq,Show)#}
+
+--------------------
+-- Constructors
+
+-- | Creates a new 'Assistant'.
+--
+assistantNew :: IO Assistant
+assistantNew =
+ makeNewObject mkAssistant $
+ liftM (castPtr :: Ptr Widget -> Ptr Assistant) $
+ {# call gtk_assistant_new #}
+
+--------------------
+-- Methods
+
+assistantGetCurrentPage :: AssistantClass self => self
+ -> IO Int -- ^ returns The index (starting from 0) of the current page in the
+ -- @assistant@, if the @assistant@ has no pages, -1 will be returned
+assistantGetCurrentPage self =
+ liftM fromIntegral $
+ {# call gtk_assistant_get_current_page #}
+ (toAssistant self)
+
+assistantSetCurrentPage :: AssistantClass self => self
+ -> Int -- ^ @pageNum@ - index of the page to switch to, starting from 0. If
+ -- negative, the last page will be used. If greater than the number of
+ -- pages in the @assistant@, nothing will be done.
+ -> IO ()
+assistantSetCurrentPage self pageNum =
+ {# call gtk_assistant_set_current_page #}
+ (toAssistant self)
+ (fromIntegral pageNum)
+
+-- | Returns the number of pages in the @assistant@
+--
+assistantGetNPages :: AssistantClass self => self
+ -> IO Int -- ^ returns The number of pages in the @assistant@.
+assistantGetNPages self =
+ liftM fromIntegral $
+ {# call gtk_assistant_get_n_pages #}
+ (toAssistant self)
+
+-- | Returns the child widget contained in page number @pageNum@.
+--
+assistantGetNthPage :: AssistantClass self => self
+ -> Int -- ^ @pageNum@ - The index of a page in the @assistant@, or -1
+ -- to get the last page;
+ -> IO Widget -- ^ returns The child widget
+assistantGetNthPage self pageNum =
+ makeNewObject mkWidget $
+ {# call gtk_assistant_get_nth_page #}
+ (toAssistant self)
+ (fromIntegral pageNum)
+
+-- | Prepends a page to the @assistant@.
+--
+assistantPrependPage :: (AssistantClass self, WidgetClass page) => self
+ -> page -- ^ @page@ - a 'Widget'
+ -> IO Int -- ^ returns the index (starting at 0) of the inserted page
+assistantPrependPage self page =
+ liftM fromIntegral $
+ {# call gtk_assistant_prepend_page #}
+ (toAssistant self)
+ (toWidget page)
+
+-- | Appends a page to the @assistant@.
+--
+assistantAppendPage :: (AssistantClass self, WidgetClass page) => self
+ -> page -- ^ @page@ - a 'Widget'
+ -> IO Int -- ^ returns the index (starting at 0) of the inserted page
+assistantAppendPage self page =
+ liftM fromIntegral $
+ {# call gtk_assistant_append_page #}
+ (toAssistant self)
+ (toWidget page)
+
+-- | Inserts a page in the @assistant@ at a given position.
+--
+assistantInsertPage :: (AssistantClass self, WidgetClass page) => self
+ -> page -- ^ @page@ - a 'Widget'
+ -> Int -- ^ @position@ - the index (starting at 0) at which to insert the
+ -- page, or -1 to append the page to the @assistant@
+ -> IO Int -- ^ returns the index (starting from 0) of the inserted page
+assistantInsertPage self page position =
+ liftM fromIntegral $
+ {# call gtk_assistant_insert_page #}
+ (toAssistant self)
+ (toWidget page)
+ (fromIntegral position)
+
+-- | Sets the page forwarding function to be @pageFunc@, this function will be
+-- used to determine what will be the next page when the user presses the
+-- forward button. Setting @pageFunc@ to will make the assistant to use the
+-- default forward function, which just goes to the next visible page.
+--
+assistantSetForwardPageFunc :: AssistantClass self => self
+ -> Maybe AssistantPage -- ^ @pageFunc@ - the 'AssistantPage'
+ -> DestroyNotify -- ^ @destroy@ - destroy notifier for @data@
+ -> IO ()
+assistantSetForwardPageFunc self pageFunc destroy = do
+ pfPtr <- case pageFunc of
+ Just pf -> mkAssistantPageFunc $ \_ c _ ->
+ return (fromIntegral (pf (fromIntegral c)))
+ Nothing -> return nullFunPtr
+ {# call gtk_assistant_set_forward_page_func #}
+ (toAssistant self)
+ pfPtr
+ nullPtr
+ destroy
+ unless (pfPtr == nullFunPtr) $ freeHaskellFunPtr pfPtr
+
+-- | Sets the page type for @page@. The page type determines the page behavior
+-- in the @assistant@.
+--
+assistantSetPageType :: (AssistantClass self, WidgetClass page) => self
+ -> page -- ^ @page@ - a page of @assistant@
+ -> AssistantPageType -- ^ @type@ - the new type for @page@
+ -> IO ()
+assistantSetPageType self page type_ =
+ {# call gtk_assistant_set_page_type #}
+ (toAssistant self)
+ (toWidget page)
+ ((fromIntegral . fromEnum) type_)
+
+-- | Gets the page type of @page@.
+--
+assistantGetPageType :: (AssistantClass self, WidgetClass page) => self
+ -> page -- ^ @page@ - a page of @assistant@
+ -> IO AssistantPageType -- ^ returns the page type of @page@.
+assistantGetPageType self page =
+ liftM (toEnum . fromIntegral) $
+ {# call gtk_assistant_get_page_type #}
+ (toAssistant self)
+ (toWidget page)
+
+-- | Sets a title for @page@. The title is displayed in the header area of the
+-- assistant when @page@ is the current page.
+--
+assistantSetPageTitle :: (AssistantClass self, WidgetClass page) => self
+ -> page -- ^ @page@ - a page of @assistant@
+ -> String -- ^ @title@ - the new title for @page@
+ -> IO ()
+assistantSetPageTitle self page title =
+ withUTFString title $ \titlePtr ->
+ {# call gtk_assistant_set_page_title #}
+ (toAssistant self)
+ (toWidget page)
+ titlePtr
+
+-- | Gets the title for @page@.
+--
+assistantGetPageTitle :: (AssistantClass self, WidgetClass page) => self
+ -> page -- ^ @page@ - a page of @assistant@
+ -> IO String -- ^ returns the title for @page@.
+assistantGetPageTitle self page =
+ {# call gtk_assistant_get_page_title #}
+ (toAssistant self)
+ (toWidget page)
+ >>= peekUTFString
+
+-- | Sets a header image for @page@. This image is displayed in the header
+-- area of the assistant when @page@ is the current page.
+--
+assistantSetPageHeaderImage :: (AssistantClass self, WidgetClass page) => self
+ -> page -- ^ @page@ - a page of @assistant@
+ -> Pixbuf -- ^ @pixbuf@ - the new header image @page@
+ -> IO ()
+assistantSetPageHeaderImage self page pixbuf =
+ {# call gtk_assistant_set_page_header_image #}
+ (toAssistant self)
+ (toWidget page)
+ pixbuf
+
+-- | Gets the header image for @page@.
+--
+assistantGetPageHeaderImage :: (AssistantClass self, WidgetClass page) => self
+ -> page -- ^ @page@ - a page of @assistant@
+ -> IO Pixbuf -- ^ returns the header image for @page@
+assistantGetPageHeaderImage self page =
+ makeNewGObject mkPixbuf $
+ {# call gtk_assistant_get_page_header_image #}
+ (toAssistant self)
+ (toWidget page)
+
+-- | Sets a header image for @page@. This image is displayed in the side area
+-- of the assistant when @page@ is the current page.
+--
+assistantSetPageSideImage :: (AssistantClass self, WidgetClass page) => self
+ -> page -- ^ @page@ - a page of @assistant@
+ -> Pixbuf -- ^ @pixbuf@ - the new header image @page@
+ -> IO ()
+assistantSetPageSideImage self page pixbuf =
+ {# call gtk_assistant_set_page_side_image #}
+ (toAssistant self)
+ (toWidget page)
+ pixbuf
+
+-- | Gets the header image for @page@.
+--
+assistantGetPageSideImage :: (AssistantClass self, WidgetClass page) => self
+ -> page -- ^ @page@ - a page of @assistant@
+ -> IO Pixbuf -- ^ returns the side image for @page@
+assistantGetPageSideImage self page =
+ makeNewGObject mkPixbuf $
+ {# call gtk_assistant_get_page_side_image #}
+ (toAssistant self)
+ (toWidget page)
+
+-- | Sets whether @page@ contents are complete. This will make @assistant@
+-- update the buttons state to be able to continue the task.
+--
+assistantSetPageComplete :: (AssistantClass self, WidgetClass page) => self
+ -> page -- ^ @page@ - a page of @assistant@
+ -> Bool -- ^ @complete@ - the completeness status of the page
+ -> IO ()
+assistantSetPageComplete self page complete =
+ {# call gtk_assistant_set_page_complete #}
+ (toAssistant self)
+ (toWidget page)
+ (fromBool complete)
+
+-- | Gets whether @page@ is complete.
+--
+assistantGetPageComplete :: (AssistantClass self, WidgetClass page) => self
+ -> page -- ^ @page@ - a page of @assistant@
+ -> IO Bool -- ^ returns @True@ if @page@ is complete.
+assistantGetPageComplete self page =
+ liftM toBool $
+ {# call gtk_assistant_get_page_complete #}
+ (toAssistant self)
+ (toWidget page)
+
+-- | Adds a widget to the action area of a 'Assistant'.
+--
+assistantAddActionWidget :: (AssistantClass self, WidgetClass child) => self
+ -> child -- ^ @child@ - a 'Widget'
+ -> IO ()
+assistantAddActionWidget self child =
+ {# call gtk_assistant_add_action_widget #}
+ (toAssistant self)
+ (toWidget child)
+
+-- | Removes a widget from the action area of a 'Assistant'.
+--
+assistantRemoveActionWidget :: (AssistantClass self, WidgetClass child) => self
+ -> child -- ^ @child@ - a 'Widget'
+ -> IO ()
+assistantRemoveActionWidget self child =
+ {# call gtk_assistant_remove_action_widget #}
+ (toAssistant self)
+ (toWidget child)
+
+-- | Forces @assistant@ to recompute the buttons state.
+--
+-- Gtk+ automatically takes care of this in most situations, e.g. when the
+-- user goes to a different page, or when the visibility or completeness of a
+-- page changes.
+--
+-- One situation where it can be necessary to call this function is when
+-- changing a value on the current page affects the future page flow of the
+-- assistant.
+--
+assistantUpdateButtonsState :: AssistantClass self => self -> IO ()
+assistantUpdateButtonsState self =
+ {# call gtk_assistant_update_buttons_state #}
+ (toAssistant self)
+
+--------------------
+-- Attributes
+
+-- | Switches the page to @pageNum@. Note that this will only be necessary in
+-- custom buttons, as the @assistant@ flow can be set with
+-- 'assistantSetForwardPageFunc'.
+--
+-- Returns the page number of the current page
+--
+-- TODO: merge attr docs from those of the setter and getter methods
+--
+assistantCurrentPage :: AssistantClass self => Attr self Int
+assistantCurrentPage = newAttr
+ assistantGetCurrentPage
+ assistantSetCurrentPage
+
+--------------------
+-- Child Attributes
+
+-- | The type of the assistant page.
+--
+-- Default value: 'AssistantPageContent'
+--
+assistantChildPageType :: AssistantClass self => Attr self AssistantPageType
+assistantChildPageType = [_$_]
+ newAttrFromEnumProperty "page-type" {#call pure unsafe assistant_page_type_get_type#}
+
+-- | The title that is displayed in the page header.
+--
+-- If title and header-image are both, no header is displayed.
+--
+assistantChildTitle :: AssistantClass self => Attr self String
+assistantChildTitle = newAttrFromStringProperty "title"
+
+-- | The image that is displayed next to the page.
+--
+assistantChildHeaderImage :: AssistantClass self => Attr self Pixbuf
+assistantChildHeaderImage = newAttrFromObjectProperty "header-image"
+ {# call pure unsafe gdk_pixbuf_get_type #}
+
+-- | Sidebar image for the assistant page.
+--
+assistantChildSidebarImage :: AssistantClass self => Attr self Pixbuf
+assistantChildSidebarImage = newAttrFromObjectProperty "sidebar-image"
+ {# call pure unsafe gdk_pixbuf_get_type #}
+
+-- | Setting the \"complete\" child property to @True@ marks a page as
+-- complete (i.e.: all the required fields are filled out). Gtk+ uses this
+-- information to control the sensitivity of the navigation buttons.
+--
+-- Default value: @False@
+--
+assistantChildComplete :: AssistantClass self => Attr self Bool
+assistantChildComplete = newAttrFromBoolProperty "complete"
+
+--------------------
+-- Signals
+
+-- | The ::cancel signal is emitted when then the cancel button is clicked.
+--
+cancel :: AssistantClass self => Signal self (IO ())
+cancel = Signal (connect_NONE__NONE "cancel")
+
+-- | The ::prepare signal is emitted when a new page is set as the assistant's
+-- current page, before making the new page visible. A handler for this signal
+-- can do any preparation which are necessary before showing @page@.
+--
+prepare :: AssistantClass self => Signal self (Widget -> IO ())
+prepare = Signal (connect_OBJECT__NONE "prepare")
+
+-- | The ::apply signal is emitted when the apply button is clicked. The
+-- default behavior of the 'Assistant' is to switch to the page after the
+-- current page, unless the current page is the last one.
+--
+-- A handler for the ::apply signal should carry out the actions for which
+-- the wizard has collected data. If the action takes a long time to complete,
+-- you might consider to put a page of type 'AssistantPageProgress' after the
+-- confirmation page and handle this operation within the 'prepare' signal of the progress page.
+--
+apply :: AssistantClass self => Signal self (IO ())
+apply = Signal (connect_NONE__NONE "apply")
+
+-- | The ::close signal is emitted either when the close button of a summary
+-- page is clicked, or when the apply button in the last page in the flow (of
+-- type 'AssistantPageConfirm') is clicked.
+--
+close :: AssistantClass self => Signal self (IO ())
+close = Signal (connect_NONE__NONE "close")
+#endif
hunk ./gtk/Graphics/UI/Gtk/Windows/Dialog.chs.pp 29
--- Now FFI haven't support variadic function `gtk_dialog_set_alternative_button_order`
+-- Now FFI haven't support variadic function, below are functons list: [_$_]
+-- gtk_dialog_new_with_buttons
+-- gtk_dialog_add_buttons
+-- gtk_dialog_set_alternative_button_order
hunk ./gtk/Graphics/UI/Gtk/Windows/Dialog.chs.pp 111
+#if GTK_CHECK_VERSION(2,14,0)
+ dialogGetContentArea,
+#endif
hunk ./gtk/Graphics/UI/Gtk/Windows/Dialog.chs.pp 207
+#if GTK_CHECK_VERSION(2,14,0)
+-- | Returns the content area of @dialog@.
+--
+-- * Available since Gtk+ version 2.14
+--
+dialogGetContentArea :: DialogClass self => self
+ -> IO Widget -- ^ returns the content area 'VBox'.
+dialogGetContentArea self =
+ makeNewObject mkWidget $
+ {# call gtk_dialog_get_content_area #}
+ (toDialog self)
+#endif
+
hunk ./gtk/Graphics/UI/Gtk/Windows/Dialog.chs.pp 433
+
hunk ./gtk/Graphics/UI/Gtk/Windows/Invisible.chs.pp 32
+--
hunk ./gtk/Graphics/UI/Gtk/Windows/Invisible.chs.pp 43
+ InvisibleClass,
+ castToInvisible,
+ toInvisible,
hunk ./gtk/Graphics/UI/Gtk/Windows/Invisible.chs.pp 48
- invisibleNew, [_$_]
+ invisibleNew,
+#if GTK_CHECK_VERSION(2,2,0)
hunk ./gtk/Graphics/UI/Gtk/Windows/Invisible.chs.pp 51
+#endif
+
+-- * Attributes
+ invisibleScreen,
hunk ./gtk/Graphics/UI/Gtk/Windows/Invisible.chs.pp 87
+#if GTK_CHECK_VERSION(2,2,0)
hunk ./gtk/Graphics/UI/Gtk/Windows/Invisible.chs.pp 99
- [_$_]
+#endif [_$_]
+
hunk ./gtk/Graphics/UI/Gtk/Windows/Invisible.chs.pp 121
+--------------------
+-- Attributes
+
+-- |
+--
+invisibleScreen :: InvisibleClass self => Attr self Screen
+invisibleScreen = newAttrFromObjectProperty "screen"
+ {# call pure unsafe gdk_screen_get_type #}
hunk ./gtk/Graphics/UI/Gtk/Windows/MessageDialog.chs.pp 8
--- Copyright (C) 2006 Axel Simon
+-- Copyright (C) 2006-2009 Axel Simon
hunk ./gtk/Graphics/UI/Gtk/Windows/MessageDialog.chs.pp 29
+
hunk ./gtk/Graphics/UI/Gtk/Windows/MessageDialog.chs.pp 43
+--
hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 31
+--
hunk ./gtk/Graphics/UI/Gtk/Windows/WindowGroup.chs.pp 8
--- Copyright (C) 2005 Duncan Coutts
+-- Copyright (C) 2005-2009 Duncan Coutts
hunk ./gtk/Graphics/UI/Gtk/Windows/WindowGroup.chs.pp 30
+--
hunk ./tools/hierarchyGen/hierarchy.list 83
+ GtkAssistant
|
|
From: Andy S. <And...@co...> - 2010-03-22 09:49:43
|
Mon Mar 22 04:40:03 EDT 2010 Andy Stewart <laz...@gm...>
* Update all `Ornaments` modules to Gtk+ 2.18.3
Ignore-this: cb0606d6c94783bd3756c67bb7581749
hunk ./ApiUpdateTodoList.txt 297
-** TODO Directory: gtk-modules/Graphics/UI/Gtk/Ornaments
-*** TODO Frame.chs
-*** TODO HSeparator.chs
-*** TODO VSeparator.chs
+** DONE Directory: gtk-modules/Graphics/UI/Gtk/Ornaments
+*** DONE Frame.chs
+*** DONE HSeparator.chs
+*** DONE VSeparator.chs
hunk ./gtk/Graphics/UI/Gtk/Ornaments/Frame.chs 8
--- Copyright (C) 1999-2005 Axel Simon
+-- Copyright (C) 1999-2009 Axel Simon
hunk ./gtk/Graphics/UI/Gtk/Ornaments/Frame.chs 28
+
hunk ./gtk/Graphics/UI/Gtk/Ornaments/Frame.chs 37
+--
hunk ./gtk/Graphics/UI/Gtk/Ornaments/HSeparator.chs 8
--- Copyright (C) 1999-2005 Axel Simon
+-- Copyright (C) 1999-2009 Axel Simon
hunk ./gtk/Graphics/UI/Gtk/Ornaments/HSeparator.chs 28
+
hunk ./gtk/Graphics/UI/Gtk/Ornaments/HSeparator.chs 36
+--
hunk ./gtk/Graphics/UI/Gtk/Ornaments/VSeparator.chs 8
--- Copyright (C) 1999-2005 Axel Simon
+-- Copyright (C) 1999-2009 Axel Simon
hunk ./gtk/Graphics/UI/Gtk/Ornaments/VSeparator.chs 28
+
hunk ./gtk/Graphics/UI/Gtk/Ornaments/VSeparator.chs 30
--- [_$_]
+--
hunk ./gtk/Graphics/UI/Gtk/Ornaments/VSeparator.chs 36
+--
|
|
From: Andy S. <And...@co...> - 2010-03-22 08:27:31
|
Mon Mar 22 04:25:43 EDT 2010 Andy Stewart <laz...@gm...>
* Update all `Scrolling` modules to Gtk+ 2.18.3
Ignore-this: c100ef0fe00c0e56866fff0205f65674
hunk ./ApiUpdateTodoList.txt 302
-** TODO Directory: gtk-modules/Graphics/UI/Gtk/Scrolling
-*** TODO HScrollbar.chs
-*** TODO ScrolledWindow.chs.pp
-*** TODO VScrollbar.chs
+** DONE Directory: gtk-modules/Graphics/UI/Gtk/Scrolling
+*** DONE HScrollbar.chs
+*** DONE ScrolledWindow.chs.pp
+*** DONE VScrollbar.chs
hunk ./gtk/Graphics/UI/Gtk/Scrolling/HScrollbar.chs 8
--- Copyright (C) 1999-2005 Axel Simon
+-- Copyright (C) 1999-2009 Axel Simon
hunk ./gtk/Graphics/UI/Gtk/Scrolling/HScrollbar.chs 28
+
hunk ./gtk/Graphics/UI/Gtk/Scrolling/HScrollbar.chs 40
+--
hunk ./gtk/Graphics/UI/Gtk/Scrolling/ScrolledWindow.chs.pp 8
--- Copyright (C) 1999-2005 Axel Simon
+-- Copyright (C) 1999-2009 Axel Simon
hunk ./gtk/Graphics/UI/Gtk/Scrolling/ScrolledWindow.chs.pp 28
+
hunk ./gtk/Graphics/UI/Gtk/Scrolling/ScrolledWindow.chs.pp 66
+--
hunk ./gtk/Graphics/UI/Gtk/Scrolling/ScrolledWindow.chs.pp 96
+#if GTK_CHECK_VERSION(2,10,0)
+ scrolledWindowUnsetPlacement,
+#endif
hunk ./gtk/Graphics/UI/Gtk/Scrolling/ScrolledWindow.chs.pp 114
- scrolledWindowWindowPlacement,
hunk ./gtk/Graphics/UI/Gtk/Scrolling/ScrolledWindow.chs.pp 115
- scrolledWindowPlacement,
+ scrolledWindowWindowPlacement,
+ scrolledWindowWindowPlacementSet,
+
+-- * Signals
+ moveFocusOut,
+ scrollChild,
hunk ./gtk/Graphics/UI/Gtk/Scrolling/ScrolledWindow.chs.pp 130
+{#import Graphics.UI.Gtk.Signals#}
hunk ./gtk/Graphics/UI/Gtk/Scrolling/ScrolledWindow.chs.pp 132
-import Graphics.UI.Gtk.General.Enums (PolicyType(..), CornerType(..), ShadowType(..))
+import Graphics.UI.Gtk.General.Enums (PolicyType(..), CornerType(..), ShadowType(..), [_$_]
+ DirectionType(..), ScrollType(..))
hunk ./gtk/Graphics/UI/Gtk/Scrolling/ScrolledWindow.chs.pp 255
+#if GTK_CHECK_VERSION(2,10,0)
+-- | Unsets the placement of the contents with respect to the scrollbars for
+-- the scrolled window. If no window placement is set for a scrolled window, it
+-- obeys the \"gtk-scrolled-window-placement\" XSETTING.
+--
+-- See also 'scrolledWindowSetPlacement' and 'scrolledWindowGetPlacement'.
+--
+-- * Available since Gtk+ version 2.10
+--
+scrolledWindowUnsetPlacement :: ScrolledWindowClass self => self -> IO ()
+scrolledWindowUnsetPlacement self =
+ {# call gtk_scrolled_window_unset_placement #}
+ (toScrolledWindow self)
+#endif
+
hunk ./gtk/Graphics/UI/Gtk/Scrolling/ScrolledWindow.chs.pp 374
+-- | Whether 'windowPlacement' should be used to determine the location of the contents with respect to
+-- the scrollbars. Otherwise, the 'gtkScrolledWindowPlacement' setting is used.
+-- [_$_]
+-- Default value: 'False'
+-- [_$_]
+-- Since 2.10
+scrolledWindowWindowPlacementSet :: ScrolledWindowClass self => Attr self Bool
+scrolledWindowWindowPlacementSet = newAttrFromBoolProperty "window-placement-set"
+
hunk ./gtk/Graphics/UI/Gtk/Scrolling/ScrolledWindow.chs.pp 392
--- | \'placement\' property. See 'scrolledWindowGetPlacement' and
--- 'scrolledWindowSetPlacement'
---
-scrolledWindowPlacement :: ScrolledWindowClass self => Attr self CornerType
-scrolledWindowPlacement = newAttr
- scrolledWindowGetPlacement
- scrolledWindowSetPlacement
+-----------------
+-- Signals
+-- |
+moveFocusOut :: ScrolledWindowClass self => Signal self (DirectionType -> IO ())
+moveFocusOut = Signal (connect_ENUM__NONE "move-focus-out")
+
+-- |
+scrollChild :: ScrolledWindowClass self => Signal self (ScrollType -> Bool -> IO Bool)
+scrollChild = Signal (connect_ENUM_BOOL__BOOL "scroll-child")
hunk ./gtk/Graphics/UI/Gtk/Scrolling/VScrollbar.chs 8
--- Copyright (C) 1999-2005 Axel Simon
+-- Copyright (C) 1999-2009 Axel Simon
hunk ./gtk/Graphics/UI/Gtk/Scrolling/VScrollbar.chs 28
+
hunk ./gtk/Graphics/UI/Gtk/Scrolling/VScrollbar.chs 40
+--
hunk ./tools/callbackGen/gtkmarshal.list 157
+# for Scrolling
+BOOLEAN:NONE
+BOOLEAN:ENUM,BOOLEAN
|
|
From: Andy S. <And...@co...> - 2010-03-22 07:25:46
|
Mon Mar 22 03:23:41 EDT 2010 Andy Stewart <laz...@gm...>
* Update all `Entry` and `Embedding` modules to Gtk+ 2.18.3
Ignore-this: 89eaf339c3f05182a23360cca1161bcb
hunk ./ApiUpdateTodoList.txt 51
-*** TODO EntryBuffer.chs
+*** DONE EntryBuffer.chs
hunk ./ApiUpdateTodoList.txt 215
-** TODO Directory: gtk-modules/Graphics/UI/Gtk/Embedding
-*** TODO Plug.chs.pp
-*** TODO Socket.chs.pp
+** DONE Directory: gtk-modules/Graphics/UI/Gtk/Embedding
+*** DONE Plug.chs.pp
+*** DONE Socket.chs.pp
hunk ./ApiUpdateTodoList.txt 220
-*** TODO Editable.chs.pp
+*** DONE Editable.chs.pp
hunk ./ApiUpdateTodoList.txt 222
-*** TODO EntryCompletion.chs.pp
-*** TODO HScale.chs
+*** DONE EntryCompletion.chs.pp
+*** DONE HScale.chs
hunk ./ApiUpdateTodoList.txt 225
-*** TODO VScale.chs
+*** DONE VScale.chs
hunk ./Makefile.am 638
+ gtk/Graphics/UI/Gtk/Entry/EntryBuffer.chs.pp \
hunk ./gtk/Graphics/UI/Gtk.hs.pp 92
+ module Graphics.UI.Gtk.Entry.EntryBuffer,
hunk ./gtk/Graphics/UI/Gtk.hs.pp 285
-import Graphics.UI.Gtk.Entry.Editable
-import Graphics.UI.Gtk.Entry.Entry
-import Graphics.UI.Gtk.Entry.EntryCompletion
+import Graphics.UI.Gtk.Entry.Editable hiding (editableChanged)
+import Graphics.UI.Gtk.Entry.Entry hiding (backspace, copyClipboard, cutClipboard, deleteFromCursor,
+ insertAtCursor, moveCursor, pasteClipboard, populatePopup, toggleOverwrite)
+import Graphics.UI.Gtk.Entry.EntryBuffer
+import Graphics.UI.Gtk.Entry.EntryCompletion hiding (actionActivated)
hunk ./gtk/Graphics/UI/Gtk.hs.pp 292
-import Graphics.UI.Gtk.Entry.SpinButton
+import Graphics.UI.Gtk.Entry.SpinButton hiding (changeValue, valueChanged)
hunk ./gtk/Graphics/UI/Gtk.hs.pp 418
- objectDestroy )
+ destory )
hunk ./gtk/Graphics/UI/Gtk/Abstract/IMContext.chs.pp 59
- imContextPreeditStart,
- imContextPreeditEnd,
- imContextPreeditChanged,
- imContextCommit,
- imContextRetrieveSurrounding,
- imContextDeleteSurrounding',
+ preeditStart,
+ preeditEnd,
+ preeditChanged,
+ commit,
+ retrieveSurrounding,
+ deleteSurrounding,
hunk ./gtk/Graphics/UI/Gtk/Abstract/IMContext.chs.pp 217
--- 'imContextRetrieveSurrounding' signal on the input method; in response to
+-- 'retrieveSurrounding' signal on the input method; in response to
hunk ./gtk/Graphics/UI/Gtk/Abstract/IMContext.chs.pp 220
--- is no obligation for a widget to respond to the 'imContextRetrieveSurrounding'
+-- is no obligation for a widget to respond to the 'retrieveSurrounding'
hunk ./gtk/Graphics/UI/Gtk/Abstract/IMContext.chs.pp 246
--- 'imContextDeleteSurrounding' signal.
+-- 'deleteSurrounding signal.
hunk ./gtk/Graphics/UI/Gtk/Abstract/IMContext.chs.pp 276
-imContextPreeditStart :: IMContextClass self => Signal self (IO ())
-imContextPreeditStart = Signal (connect_NONE__NONE "preedit_start")
+preeditStart :: IMContextClass self => Signal self (IO ())
+preeditStart = Signal (connect_NONE__NONE "preedit_start")
hunk ./gtk/Graphics/UI/Gtk/Abstract/IMContext.chs.pp 282
-imContextPreeditEnd :: IMContextClass self => Signal self (IO ())
-imContextPreeditEnd = Signal (connect_NONE__NONE "preedit_end")
+preeditEnd :: IMContextClass self => Signal self (IO ())
+preeditEnd = Signal (connect_NONE__NONE "preedit_end")
hunk ./gtk/Graphics/UI/Gtk/Abstract/IMContext.chs.pp 289
-imContextPreeditChanged :: IMContextClass self => Signal self (IO ())
-imContextPreeditChanged = Signal (connect_NONE__NONE "preedit_changed")
+preeditChanged :: IMContextClass self => Signal self (IO ())
+preeditChanged = Signal (connect_NONE__NONE "preedit_changed")
hunk ./gtk/Graphics/UI/Gtk/Abstract/IMContext.chs.pp 297
-imContextCommit :: IMContextClass self => Signal self (String -> IO ())
-imContextCommit = Signal (connect_STRING__NONE "commit")
+commit :: IMContextClass self => Signal self (String -> IO ())
+commit = Signal (connect_STRING__NONE "commit")
hunk ./gtk/Graphics/UI/Gtk/Abstract/IMContext.chs.pp 305
-imContextRetrieveSurrounding :: IMContextClass self => Signal self (IO Bool)
-imContextRetrieveSurrounding = Signal (connect_NONE__BOOL "retrieve_surrounding")
+retrieveSurrounding :: IMContextClass self => Signal self (IO Bool)
+retrieveSurrounding = Signal (connect_NONE__BOOL "retrieve_surrounding")
hunk ./gtk/Graphics/UI/Gtk/Abstract/IMContext.chs.pp 317
-imContextDeleteSurrounding' :: IMContextClass self => Signal self (Int -> Int -> IO Bool)
-imContextDeleteSurrounding' = Signal (connect_INT_INT__BOOL "delete_surrounding")
+deleteSurrounding :: IMContextClass self => Signal self (Int -> Int -> IO Bool)
+deleteSurrounding = Signal (connect_INT_INT__BOOL "delete_surrounding")
hunk ./gtk/Graphics/UI/Gtk/Abstract/Object.chs.pp 72
- objectDestroy
+ destory,
hunk ./gtk/Graphics/UI/Gtk/Abstract/Object.chs.pp 159
-objectDestroy :: ObjectClass self => Signal self (IO ())
-objectDestroy = Signal (connect_NONE__NONE "destroy")
+destory :: ObjectClass self => Signal self (IO ())
+destory = Signal (connect_NONE__NONE "destroy")
hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 298
- popupMenuSignal,
+ popupMenu,
hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 2797
-popupMenuSignal :: WidgetClass self => Signal self (IO Bool)
-popupMenuSignal = Signal (connect_NONE__BOOL "popup_menu")
+popupMenu :: WidgetClass self => Signal self (IO Bool)
+popupMenu = Signal (connect_NONE__BOOL "popup_menu")
hunk ./gtk/Graphics/UI/Gtk/Entry/Editable.chs.pp 8
--- Copyright (C) 1999-2005 Axel Simon, Duncan Coutts
+-- Copyright (C) 1999-2009 Axel Simon, Duncan Coutts
hunk ./gtk/Graphics/UI/Gtk/Entry/Editable.chs.pp 28
+
hunk ./gtk/Graphics/UI/Gtk/Entry/Editable.chs.pp 40
+--
hunk ./gtk/Graphics/UI/Gtk/Entry/Editable.chs.pp 73
+ insertText,
+ deleteText,
+ editableChanged,
+ stopDeleteText,
+ stopInsertText,
+
+-- * Deprecated
+#ifndef DISABLE_DEPRECATED
hunk ./gtk/Graphics/UI/Gtk/Entry/Editable.chs.pp 85
- stopDeleteText,
hunk ./gtk/Graphics/UI/Gtk/Entry/Editable.chs.pp 87
- stopInsertText
+#endif
hunk ./gtk/Graphics/UI/Gtk/Entry/Editable.chs.pp 287
+-- | This signal is emitted when text is inserted into the widget by the user.
+-- The default handler for this signal will normally be responsible for
+-- inserting the text, so by connecting to this signal and then stopping the
+-- signal with 'gSignalStopEmission', it is possible to modify the inserted
+-- text, or prevent it from being inserted entirely.
+--
+insertText :: EditableClass self => Signal self (String -> Int -> Int -> IO ())
+insertText = Signal (connect_STRING_INT_INT__NONE "insert-text")
+
+-- | This signal is emitted when text is deleted from the widget by the user.
+-- The default handler for this signal will normally be responsible for
+-- deleting the text, so by connecting to this signal and then stopping the
+-- signal with 'gSignalStopEmission', it is possible to modify the range of
+-- deleted text, or prevent it from being deleted entirely. The @startPos@ and
+-- @endPos@ parameters are interpreted as for 'editableDeleteText'.
+--
+deleteText :: EditableClass self => Signal self (Int -> Int -> IO ())
+deleteText = Signal (connect_INT_INT__NONE "delete-text")
+
+-- | The ::changed signal is emitted at the end of a single user-visible
+-- operation on the contents of the 'Editable'.
+--
+-- E.g., a paste operation that replaces the contents of the selection will
+-- cause only one signal emission (even though it is implemented by first
+-- deleting the selection, then inserting the new content, and may cause
+-- multiple ::notify::text signals to be emitted).
+--
+editableChanged :: EditableClass self => Signal self (IO ())
+editableChanged = Signal (connect_NONE__NONE "changed")
+
+-- | Stop the current signal that deletes text.
+stopDeleteText :: EditableClass self => ConnectId self -> IO ()
+stopDeleteText (ConnectId _ obj) =
+ signalStopEmission obj "delete_text"
hunk ./gtk/Graphics/UI/Gtk/Entry/Editable.chs.pp 322
+-- | Stop the current signal that inserts text.
+stopInsertText :: EditableClass self => ConnectId self -> IO ()
+stopInsertText (ConnectId _ obj) =
+ signalStopEmission obj "insert_text"
+
+--------------------
+-- Deprecated
+#ifndef DISABLE_DEPRECATED
hunk ./gtk/Graphics/UI/Gtk/Entry/Editable.chs.pp 347
--- | Stop the current signal that deletes text.
-stopDeleteText :: EditableClass self => ConnectId self -> IO ()
-stopDeleteText (ConnectId _ obj) =
- signalStopEmission obj "delete_text"
-
hunk ./gtk/Graphics/UI/Gtk/Entry/Editable.chs.pp 398
-
--- | Stop the current signal that inserts text.
-stopInsertText :: EditableClass self => ConnectId self -> IO ()
-stopInsertText (ConnectId _ obj) =
- signalStopEmission obj "insert_text"
+#endif
hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 8
--- Copyright (C) 1999-2005 Axel Simon
+-- Copyright (C) 1999-2009 Axel Simon
hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 33
+-- [_$_]
+-- Note: [_$_]
+-- Below function can use attributes instead, so don't bind it for simple:
+-- gtk_entry_get_inner_border
+-- gtk_entry_set_inner_border
+-- gtk_entry_get_overwrite_mode
+-- gtk_entry_set_overwrite_mode
+-- gtk_entry_get_progress_fraction
+-- gtk_entry_set_progress_fraction
+-- gtk_entry_get_progress_pulse_step
+-- gtk_entry_set_progress_pulse_step
+-- gtk_entry_get_buffer
+-- gtk_entry_set_buffer
hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 48
+
hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 57
+--
hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 73
+-- * Enums.
+ IconPosition(..),
+
hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 78
+#if GTK_CHECK_VERSION(2,18,0)
+ entryNewWithBuffer,
+#endif
hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 95
+#if GTK_CHECK_VERSION(2,12,0)
+ entrySetCursorHAdjustment,
+ entryGetCursorHAdjustment,
+#endif
hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 111
+#if GTK_CHECK_VERSION(2,14,0)
+ entryGetTextLength,
+#endif
+ entryGetLayout,
+ entryGetLayoutOffsets,
+ entryLayoutIndexToTextIndex,
+ entryTextIndexToLayoutIndex,
+#if GTK_CHECK_VERSION(2,16,0)
+ entryProgressPulse,
+ entrySetIconFromPixbuf,
+ entrySetIconFromStock,
+ entrySetIconFromIconName,
+ -- entrySetIconFromGicon,
+ entryGetIconStorageType,
+ entryGetIconPixbuf,
+ entryGetIconStock,
+ entryGetIconName,
+ -- entryGetIconGicon,
+ entrySetIconActivatable,
+ entryGetIconActivatable,
+ entrySetIconSensitive,
+ entryGetIconSensitive,
+ entryGetIconAtPos,
+ entrySetIconTooltipText,
+ entryGetIconTooltipText,
+ entrySetIconTooltipMarkup,
+ entryGetIconTooltipMarkup,
+ entrySetIconDragSource,
+ entryGetCurrentIconDragSource,
+#endif
hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 145
+ entryCapsLockWarning,
+ entryImModule,
hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 151
+ -- entryInnerBorder,
+ entryOverwriteMode,
+ entryTextLength,
+ entryTruncateMultiline,
+ entryProgressFraction,
+ entryProgressPulseStep,
+ entryPrimaryIconPixbuf,
+ entrySecondaryIconPixbuf,
+ entryPrimaryIconStock,
+ entrySecondaryIconStock,
+ entryPrimaryIconName,
+ entrySecondaryIconName,
+ -- entryPrimaryIconGicon,
+ -- entrySecondaryIconGicon,
+ entryPrimaryIconStorageType,
+ entrySecondaryIconStorageType,
+ entryPrimaryIconActivatable,
+ entrySecondaryIconActivatable,
+ entryPrimaryIconSensitive,
+ entrySecondaryIconSensitive,
+ entryPrimaryIconTooltipText,
+ entrySecondaryIconTooltipText,
+ entryPrimaryIconTooltipMarkup,
+ entrySecondaryIconTooltipMarkup,
hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 176
+ entryInvisibleCharSet,
hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 186
+#if GTK_CHECK_VERSION(2,18,0)
+ entryBuffer,
+#endif
hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 191
+ activate,
+ backspace,
+ copyClipboard,
+ cutClipboard,
+ deleteFromCursor,
+ iconPress,
+ -- iconRelease,
+ insertAtCursor,
+ moveCursor,
+ pasteClipboard,
+ populatePopup,
+ toggleOverwrite,
+
+-- * Deprecated
+#ifndef DISABLE_DEPRECATED
hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 216
+#endif
hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 221
+import Data.IORef (newIORef)
hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 229
+import Graphics.UI.Gtk.Gdk.Enums (DragAction(..))
+import Graphics.UI.Gtk.General.Enums (DeleteType(..), MovementStep(..))
hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 232
+{#import Graphics.UI.Gtk.General.DNDTypes#} (TargetList(..))
hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 234
+{#import Graphics.UI.Gtk.Pango.Types#}
+{#import Graphics.UI.Gtk.Display.Image#} (ImageType)
+import Graphics.UI.Gtk.Gdk.Events (Event, marshalEvent)
+import System.Glib.Flags
hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 241
+--------------------
+-- Enums
+{#enum EntryIconPosition as IconPosition {underscoreToCase}#}
+
hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 261
+#if GTK_CHECK_VERSION(2,18,0)
+-- | Creates a new entry with the specified text buffer.
+--
+-- * Available since Gtk+ version 2.18
+--
+entryNewWithBuffer :: EntryBufferClass buffer =>
+ buffer -- ^ @buffer@ - The buffer to use for the new 'Entry'.
+ -> IO Entry
+entryNewWithBuffer buffer =
+ makeNewObject mkEntry $
+ liftM (castPtr :: Ptr Widget -> Ptr Entry) $
+ {# call gtk_entry_new_with_buffer #}
+ (toEntryBuffer buffer)
+#endif
+
hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 400
+#if GTK_CHECK_VERSION(2,12,0)
+entrySetCursorHAdjustment :: EntryClass self => self
+ -> Adjustment -- ^ @adjustment@ - an adjustment which should be adjusted when
+ -- the cursor is moved, or {@NULL@, FIXME: this should probably
+ -- be converted to a Maybe data type}
+ -> IO ()
+entrySetCursorHAdjustment self adjustment =
+ {# call entry_set_cursor_hadjustment #}
+ (toEntry self)
+ adjustment
+
+entryGetCursorHAdjustment :: EntryClass self => self
+ -> IO Adjustment -- ^ returns the horizontal cursor adjustment, or {@NULL@,
+ -- FIXME: this should probably be converted to a Maybe data
+ -- type} if none has been set.
+entryGetCursorHAdjustment self =
+ makeNewObject mkAdjustment $
+ {# call entry_get_cursor_hadjustment #}
+ (toEntry self)
+#endif
+
hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 531
- {# call gtk_entry_set_completion #}
+ {# call entry_set_completion #}
hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 544
- {# call gtk_entry_get_completion #}
+ {# call entry_get_completion #}
+ (toEntry self)
+#endif
+
+#if GTK_CHECK_VERSION(2,14,0)
+-- | Retrieves the current length of the text in @entry@.
+--
+-- This is equivalent to:
+--
+-- * Available since Gtk+ version 2.14
+--
+entryGetTextLength :: EntryClass self => self
+ -> IO Word16 -- ^ returns the current number of characters in 'Entry', or 0
+ -- if there are none.
+entryGetTextLength self =
+ liftM fromIntegral $
+ {# call entry_get_text_length #}
+ (toEntry self)
+#endif
+
+-- | Gets the 'PangoLayout' used to display the entry. The layout is useful to
+-- e.g. convert text positions to pixel positions, in combination with
+-- 'entryGetLayoutOffsets'. The returned layout is owned by the entry and must
+-- not be modified or freed by the caller.
+--
+-- Keep in mind that the layout text may contain a preedit string, so
+-- 'entryLayoutIndexToTextIndex' and 'entryTextIndexToLayoutIndex' are needed
+-- to convert byte indices in the layout to byte indices in the entry contents.
+--
+entryGetLayout :: EntryClass self => self
+ -> IO PangoLayout -- ^ returns the 'PangoLayout' for this entry
+entryGetLayout self = do
+ pl <- constructNewGObject mkPangoLayoutRaw $
+ {# call entry_get_layout #}
+ (toEntry self)
+ ps <- makeNewPangoString ""
+ psRef <- newIORef ps
+ return (PangoLayout psRef pl)
+
+-- | Obtains the position of the 'PangoLayout' used to render text in the
+-- entry, in widget coordinates. Useful if you want to line up the text in an
+-- entry with some other text, e.g. when using the entry to implement editable
+-- cells in a sheet widget.
+--
+-- Also useful to convert mouse events into coordinates inside the
+-- 'PangoLayout', e.g. to take some action if some part of the entry text is
+-- clicked.
+--
+-- Note that as the user scrolls around in the entry the offsets will
+-- change; you'll need to connect to the \"notify::scroll-offset\" signal to
+-- track this. Remember when using the 'PangoLayout' functions you need to
+-- convert to and from pixels using 'pangopixels' or 'PangoScale'
+--
+-- Keep in mind that the layout text may contain a preedit string, so
+-- 'entryLayoutIndexToTextIndex' and 'entryTextIndexToLayoutIndex' are needed
+-- to convert byte indices in the layout to byte indices in the entry contents.
+--
+entryGetLayoutOffsets :: EntryClass self => self
+ -> IO (Int, Int) -- ^ @(x, y)@ [_$_]
+ -- @x@ - location to store X offset of layout
+ -- @y@ - location to store Y offset of layout
+entryGetLayoutOffsets self =
+ alloca $ \xPtr ->
+ alloca $ \yPtr ->
+ {# call entry_get_layout_offsets #}
+ (toEntry self)
+ xPtr
+ yPtr
+ >>
+ peek xPtr >>= \x ->
+ peek yPtr >>= \y ->
+ return (fromIntegral x, fromIntegral y)
+
+-- | Converts from a position in the entry contents (returned by
+-- 'entryGetText') to a position in the entry's 'PangoLayout' (returned by
+-- 'entryGetLayout', with text retrieved via 'layoutGetText').
+--
+entryLayoutIndexToTextIndex :: EntryClass self => self
+ -> Int -- ^ @layoutIndex@ - byte index into the entry layout text
+ -> IO Int -- ^ returns byte index into the entry contents
+entryLayoutIndexToTextIndex self layoutIndex =
+ liftM fromIntegral $
+ {# call entry_layout_index_to_text_index #}
+ (toEntry self)
+ (fromIntegral layoutIndex)
+
+-- | Converts from a position in the entry's 'PangoLayout' (returned by
+-- 'entryGetLayout') to a position in the entry contents (returned by
+-- 'entryGetText').
+--
+entryTextIndexToLayoutIndex :: EntryClass self => self
+ -> Int -- ^ @textIndex@ - byte index into the entry contents
+ -> IO Int -- ^ returns byte index into the entry layout text
+entryTextIndexToLayoutIndex self textIndex =
+ liftM fromIntegral $
+ {# call entry_text_index_to_layout_index #}
+ (toEntry self)
+ (fromIntegral textIndex)
+
+#if GTK_CHECK_VERSION(2,16,0)
+-- | Indicates that some progress is made, but you don't know how much. Causes
+-- the entry's progress indicator to enter \"activity mode,\" where a block
+-- bounces back and forth. Each call to 'entryProgressPulse' causes the block
+-- to move by a little bit (the amount of movement per pulse is determined by
+-- 'entrySetProgressPulseStep').
+--
+-- * Available since Gtk+ version 2.16
+--
+entryProgressPulse :: EntryClass self => self -> IO ()
+entryProgressPulse self =
+ {# call entry_progress_pulse #}
+ (toEntry self)
+
+-- | Sets the icon shown in the specified position using a pixbuf.
+--
+-- If @pixbuf@ is {@NULL@, FIXME: this should probably be converted to a
+-- Maybe data type}, no icon will be shown in the specified position.
+--
+-- * Available since Gtk+ version 2.16
+--
+entrySetIconFromPixbuf :: EntryClass self => self
+ -> IconPosition -- ^ @iconPos@ - Icon position
+ -> Pixbuf -- ^ @pixbuf@ - A 'Pixbuf', or {@NULL@, FIXME: this
+ -- should probably be converted to a Maybe data type}
+ -> IO ()
+entrySetIconFromPixbuf self iconPos pixbuf =
+ {# call entry_set_icon_from_pixbuf #}
+ (toEntry self)
+ ((fromIntegral . fromEnum) iconPos)
+ pixbuf
+
+-- | Sets the icon shown in the entry at the specified position from a stock
+-- image.
+--
+-- If @stockId@ is {@NULL@, FIXME: this should probably be converted to a
+-- Maybe data type}, no icon will be shown in the specified position.
+--
+-- * Available since Gtk+ version 2.16
+--
+entrySetIconFromStock :: EntryClass self => self
+ -> IconPosition -- ^ @iconPos@ - Icon position
+ -> String -- ^ @stockId@ - The name of the stock item, or {@NULL@,
+ -- FIXME: this should probably be converted to a Maybe
+ -- data type}
+ -> IO ()
+entrySetIconFromStock self iconPos stockId =
+ withUTFString stockId $ \stockIdPtr ->
+ {# call entry_set_icon_from_stock #}
+ (toEntry self)
+ ((fromIntegral . fromEnum) iconPos)
+ stockIdPtr
+
+-- | Sets the icon shown in the entry at the specified position from the
+-- current icon theme.
+--
+-- If the icon name isn't known, a \"broken image\" icon will be displayed
+-- instead.
+--
+-- If @iconName@ is {@NULL@, FIXME: this should probably be converted to a
+-- Maybe data type}, no icon will be shown in the specified position.
+--
+-- * Available since Gtk+ version 2.16
+--
+entrySetIconFromIconName :: EntryClass self => self
+ -> IconPosition -- ^ @iconPos@ - The position at which to set the icon
+ -> String -- ^ @iconName@ - An icon name, or {@NULL@, FIXME: this
+ -- should probably be converted to a Maybe data type}
+ -> IO ()
+entrySetIconFromIconName self iconPos iconName =
+ withUTFString iconName $ \iconNamePtr ->
+ {# call entry_set_icon_from_icon_name #}
+ (toEntry self)
+ ((fromIntegral . fromEnum) iconPos)
+ iconNamePtr
+
+-- | Sets the icon shown in the entry at the specified position from the
+-- current icon theme. If the icon isn't known, a \"broken image\" icon will be
+-- displayed instead.
+--
+-- If @icon@ is {@NULL@, FIXME: this should probably be converted to a Maybe
+-- data type}, no icon will be shown in the specified position.
+--
+-- * Available since Gtk+ version 2.16
+--
+-- entrySetIconFromGicon :: EntryClass self => self
+-- -> IconPosition -- ^ @iconPos@ - The position at which to set the icon
+-- -> GIcon -- ^ @icon@ - The icon to set, or {@NULL@, FIXME: this
+-- -- should probably be converted to a Maybe data type}
+-- -> IO ()
+-- entrySetIconFromGicon self iconPos icon =
+-- {# call entry_set_icon_from_gicon #}
+-- (toEntry self)
+-- ((fromIntegral . fromEnum) iconPos)
+-- icon
+
+-- | Gets the type of representation being used by the icon to store image
+-- data. If the icon has no image data, the return value will be 'ImageEmpty'.
+--
+-- * Available since Gtk+ version 2.16
+--
+entryGetIconStorageType :: EntryClass self => self
+ -> IconPosition -- ^ @iconPos@ - Icon position
+ -> IO ImageType -- ^ returns image representation being used
+entryGetIconStorageType self iconPos =
+ liftM (toEnum . fromIntegral) $
+ {# call entry_get_icon_storage_type #}
+ (toEntry self)
+ ((fromIntegral . fromEnum) iconPos)
+
+-- | Retrieves the image used for the icon.
+--
+-- Unlike the other methods of setting and getting icon data, this method
+-- will work regardless of whether the icon was set using a 'Pixbuf', a {GIcon,
+-- FIXME: unknown type\/value}, a stock item, or an icon name.
+--
+-- * Available since Gtk+ version 2.16
+--
+entryGetIconPixbuf :: EntryClass self => self
+ -> IconPosition -- ^ @iconPos@ - Icon position
+ -> IO Pixbuf -- ^ returns A 'Pixbuf', or {@NULL@, FIXME: this should
+ -- probably be converted to a Maybe data type} if no icon
+ -- is set for this position.
+entryGetIconPixbuf self iconPos =
+ makeNewGObject mkPixbuf $
+ {# call entry_get_icon_pixbuf #}
+ (toEntry self)
+ ((fromIntegral . fromEnum) iconPos)
+
+-- | Retrieves the stock id used for the icon, or {@NULL@, FIXME: this should
+-- probably be converted to a Maybe data type} if there is no icon or if the
+-- icon was set by some other method (e.g., by pixbuf, icon name or gicon).
+--
+-- * Available since Gtk+ version 2.16
+--
+entryGetIconStock :: EntryClass self => self
+ -> IconPosition -- ^ @iconPos@ - Icon position
+ -> IO String -- ^ returns A stock id, or {@NULL@, FIXME: this should
+ -- probably be converted to a Maybe data type} if no icon
+ -- is set or if the icon wasn't set from a stock id
+entryGetIconStock self iconPos =
+ {# call entry_get_icon_stock #}
+ (toEntry self)
+ ((fromIntegral . fromEnum) iconPos)
+ >>= peekUTFString
+
+-- | Retrieves the icon name used for the icon, or {@NULL@, FIXME: this should
+-- probably be converted to a Maybe data type} if there is no icon or if the
+-- icon was set by some other method (e.g., by pixbuf, stock or gicon).
+--
+-- * Available since Gtk+ version 2.16
+--
+entryGetIconName :: EntryClass self => self
+ -> IconPosition -- ^ @iconPos@ - Icon position
+ -> IO String -- ^ returns An icon name, or {@NULL@, FIXME: this
+ -- should probably be converted to a Maybe data type} if
+ -- no icon is set or if the icon wasn't set from an icon
+ -- name
+entryGetIconName self iconPos =
+ {# call entry_get_icon_name #}
+ (toEntry self)
+ ((fromIntegral . fromEnum) iconPos)
+ >>= peekUTFString
+
+-- | Retrieves the {GIcon, FIXME: unknown type\/value} used for the icon, or
+-- {@NULL@, FIXME: this should probably be converted to a Maybe data type} if
+-- there is no icon or if the icon was set by some other method (e.g., by
+-- stock, pixbuf, or icon name).
+--
+-- * Available since Gtk+ version 2.16
+--
+-- entryGetIconGicon :: EntryClass self => self
+-- -> IconPosition -- ^ @iconPos@ - Icon position
+-- -> IO GIcon -- ^ returns A {GIcon, FIXME: unknown type\/value}, or
+-- -- {@NULL@, FIXME: this should probably be converted to a
+-- -- Maybe data type} if no icon is set or if the icon is
+-- -- not a {GIcon, FIXME: unknown type\/value}
+-- entryGetIconGicon self iconPos =
+-- {# call entry_get_icon_gicon #}
+-- (toEntry self)
+-- ((fromIntegral . fromEnum) iconPos)
+
+-- | Sets whether the icon is activatable.
+--
+-- * Available since Gtk+ version 2.16
+--
+entrySetIconActivatable :: EntryClass self => self
+ -> IconPosition -- ^ @iconPos@ - Icon position
+ -> Bool -- ^ @activatable@ - @True@ if the icon should be
+ -- activatable
+ -> IO ()
+entrySetIconActivatable self iconPos activatable =
+ {# call entry_set_icon_activatable #}
+ (toEntry self)
+ ((fromIntegral . fromEnum) iconPos)
+ (fromBool activatable)
+
+-- | Returns whether the icon is activatable.
+--
+-- * Available since Gtk+ version 2.16
+--
+entryGetIconActivatable :: EntryClass self => self
+ -> IconPosition -- ^ @iconPos@ - Icon position
+ -> IO Bool -- ^ returns @True@ if the icon is activatable.
+entryGetIconActivatable self iconPos =
+ liftM toBool $
+ {# call entry_get_icon_activatable #}
+ (toEntry self)
+ ((fromIntegral . fromEnum) iconPos)
+
+-- | Sets the sensitivity for the specified icon.
+--
+-- * Available since Gtk+ version 2.16
+--
+entrySetIconSensitive :: EntryClass self => self
+ -> IconPosition -- ^ @iconPos@ - Icon position
+ -> Bool -- ^ @sensitive@ - Specifies whether the icon should
+ -- appear sensitive or insensitive
+ -> IO ()
+entrySetIconSensitive self iconPos sensitive =
+ {# call entry_set_icon_sensitive #}
+ (toEntry self)
+ ((fromIntegral . fromEnum) iconPos)
+ (fromBool sensitive)
+
+-- | Returns whether the icon appears sensitive or insensitive.
+--
+-- * Available since Gtk+ version 2.16
+--
+entryGetIconSensitive :: EntryClass self => self
+ -> IconPosition -- ^ @iconPos@ - Icon position
+ -> IO Bool -- ^ returns @True@ if the icon is sensitive.
+entryGetIconSensitive self iconPos =
+ liftM toBool $
+ {# call entry_get_icon_sensitive #}
+ (toEntry self)
+ ((fromIntegral . fromEnum) iconPos)
+
+-- | Finds the icon at the given position and return its index. If @x@, @y@
+-- doesn't lie inside an icon, -1 is returned. This function is intended for
+-- use in a {\"query-tooltip\", FIXME: unknown type\/value} signal handler.
+--
+-- * Available since Gtk+ version 2.16
+--
+entryGetIconAtPos :: EntryClass self => self
+ -> Int -- ^ @x@ - the x coordinate of the position to find
+ -> Int -- ^ @y@ - the y coordinate of the position to find
+ -> IO Int -- ^ returns the index of the icon at the given position, or -1
+entryGetIconAtPos self x y =
+ liftM fromIntegral $
+ {# call entry_get_icon_at_pos #}
+ (toEntry self)
+ (fromIntegral x)
+ (fromIntegral y)
+
+-- | Sets @tooltip@ as the contents of the tooltip for the icon at the
+-- specified position.
+--
+-- Use {@NULL@, FIXME: this should probably be converted to a Maybe data
+-- type} for @tooltip@ to remove an existing tooltip.
+--
+-- See also 'widgetSetTooltipText' and 'entrySetIconTooltipMarkup'.
+--
+-- * Available since Gtk+ version 2.16
+--
+entrySetIconTooltipText :: EntryClass self => self
+ -> IconPosition -- ^ @iconPos@ - the icon position
+ -> String -- ^ @tooltip@ - the contents of the tooltip for the
+ -- icon, or {@NULL@, FIXME: this should probably be
+ -- converted to a Maybe data type}
+ -> IO ()
+entrySetIconTooltipText self iconPos tooltip =
+ withUTFString tooltip $ \tooltipPtr ->
+ {# call entry_set_icon_tooltip_text #}
+ (toEntry self)
+ ((fromIntegral . fromEnum) iconPos)
+ tooltipPtr
+
+-- | Gets the contents of the tooltip on the icon at the specified position in
+-- @entry@.
+--
+-- * Available since Gtk+ version 2.16
+--
+entryGetIconTooltipText :: EntryClass self => self
+ -> IconPosition -- ^ @iconPos@ - the icon position
+ -> IO String -- ^ returns the tooltip text, or {@NULL@, FIXME: this
+ -- should probably be converted to a Maybe data type}.
+ -- Free the returned string with 'gFree' when done.
+entryGetIconTooltipText self iconPos =
+ {# call entry_get_icon_tooltip_text #}
+ (toEntry self)
+ ((fromIntegral . fromEnum) iconPos)
+ >>= readUTFString
+
+-- | Sets @tooltip@ as the contents of the tooltip for the icon at the
+-- specified position. @tooltip@ is assumed to be marked up with the Pango text
+-- markup language.
+--
+-- Use {@NULL@, FIXME: this should probably be converted to a Maybe data
+-- type} for @tooltip@ to remove an existing tooltip.
+--
+-- See also 'widgetSetTooltipMarkup' and 'entySetIconTooltipText'.
+--
+-- * Available since Gtk+ version 2.16
+--
+entrySetIconTooltipMarkup :: EntryClass self => self
+ -> IconPosition -- ^ @iconPos@ - the icon position
+ -> String -- ^ @tooltip@ - the contents of the tooltip for the
+ -- icon, or {@NULL@, FIXME: this should probably be
+ -- converted to a Maybe data type}
+ -> IO ()
+entrySetIconTooltipMarkup self iconPos tooltip =
+ withUTFString tooltip $ \tooltipPtr ->
+ {# call entry_set_icon_tooltip_markup #}
+ (toEntry self)
+ ((fromIntegral . fromEnum) iconPos)
+ tooltipPtr
+
+-- | Gets the contents of the tooltip on the icon at the specified position in
+-- @entry@.
+--
+-- * Available since Gtk+ version 2.16
+--
+entryGetIconTooltipMarkup :: EntryClass self => self
+ -> IconPosition -- ^ @iconPos@ - the icon position
+ -> IO String -- ^ returns the tooltip text, or {@NULL@, FIXME: this
+ -- should probably be converted to a Maybe data type}.
+ -- Free the returned string with 'gFree' when done.
+entryGetIconTooltipMarkup self iconPos =
+ {# call entry_get_icon_tooltip_markup #}
+ (toEntry self)
+ ((fromIntegral . fromEnum) iconPos)
+ >>= readUTFString
+
+-- | Sets up the icon at the given position so that Gtk+ will start a drag
+-- operation when the user clicks and drags the icon.
+--
+-- To handle the drag operation, you need to connect to the usual
+-- {\"drag-data-get\", FIXME: unknown type\/value} (or possibly
+-- {\"drag-data-delete\", FIXME: unknown type\/value}) signal, and use
+-- 'entryGetCurrentIconDragSource' in your signal handler to find out if the
+-- drag was started from an icon.
+--
+-- By default, Gtk+ uses the icon as the drag icon. You can use the
+-- {\"drag-begin\", FIXME: unknown type\/value} signal to set a different icon.
+-- Note that you have to use 'gSignalConnectAfter' to ensure that your signal
+-- handler gets executed after the default handler.
+--
+-- * Available since Gtk+ version 2.16
+--
+entrySetIconDragSource :: EntryClass self => self
+ -> IconPosition -- ^ @iconPos@ - icon position
+ -> TargetList -- ^ @targets@ - the targets (data formats) in which
+ -- the data can be provided
+ -> [DragAction] -- ^ @actions@ - a bitmask of the allowed drag actions
+ -> IO ()
+entrySetIconDragSource self iconPos targetList actions =
+ {# call gtk_entry_set_icon_drag_source #}
+ (toEntry self)
+ ((fromIntegral . fromEnum) iconPos)
+ targetList
+ ((fromIntegral . fromFlags) actions)
+-- entrySetIconDragSource self iconPos targets actions =
+-- alloca $ \nTargetsPtr -> do
+-- tlPtr <- {#call unsafe gtk_target_table_new_from_list#} targets nTargetsPtr
+-- nTargets <- peek nTargetsPtr
+-- {# call entry_set_icon_drag_source #}
+-- (toEntry self)
+-- ((fromIntegral . fromEnum) iconPos)
+-- tlPtr
+-- nTargets
+-- ((fromIntegral . fromFlags) actions)
+-- {#call unsafe gtk_target_table_free#} tlPtr nTargets
+
+-- | Returns the index of the icon which is the source of the current DND
+-- operation, or -1.
+--
+-- This function is meant to be used in a {\"drag-data-get\", FIXME: unknown
+-- type\/value} callback.
+--
+-- * Available since Gtk+ version 2.16
+--
+entryGetCurrentIconDragSource :: EntryClass self => self
+ -> IO Int -- ^ returns index of the icon which is the source of the current
+ -- DND operation, or -1.
+entryGetCurrentIconDragSource self =
+ liftM fromIntegral $
+ {# call entry_get_current_icon_drag_source #}
hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 1056
+-- | Whether password entries will show a warning when Caps Lock is on.
+-- [_$_]
+-- Note that the warning is shown using a secondary icon, and thus does not work if you are using the
+-- secondary icon position for some other purpose.
+-- [_$_]
+-- Default value: 'True'
+-- [_$_]
+-- Since 2.16
+entryCapsLockWarning :: EntryClass self => Attr self Bool
+entryCapsLockWarning = newAttrFromBoolProperty "caps-lock-warning" [_$_]
+
+-- | Which IM (input method) module should be used for this entry. See 'IMContext'.
+-- [_$_]
+-- Setting this to a non-'Nothing' value overrides the system-wide IM module setting. See the 'Settings'
+-- 'gtkImModule' property.
+-- [_$_]
+-- Default value: 'Nothing'
+-- [_$_]
+-- Since 2.16
+entryImModule :: EntryClass self => Attr self (Maybe String)
+entryImModule = newAttrFromMaybeStringProperty "im-module" [_$_]
+
hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 1115
+-- entryInnerBorder :: EntryClass self => Attr self {-GtkBorder-}
+-- entryInnerBorder = newAttrFrom{-GtkBorder-}Property "inner-border"
+
+-- | If text is overwritten when typing in the 'Entry'.
+-- [_$_]
+-- Default value: 'False'
+-- [_$_]
+-- Since 2.14
+entryOverwriteMode :: EntryClass self => Attr self Bool
+entryOverwriteMode = newAttrFromBoolProperty "overwrite-mode"
+
+-- | The length of the text in the 'Entry'.
+-- [_$_]
+-- Allowed values: <= 65535
+-- [_$_]
+-- Default value: 0
+-- [_$_]
+-- Since 2.14
+entryTextLength :: EntryClass self => ReadAttr self Int
+entryTextLength = readAttrFromIntProperty "text-length"
+
+-- | When 'True', pasted multi-line text is truncated to the first line.
+-- [_$_]
+-- Default value: 'False'
+-- [_$_]
+-- Since 2.10
+entryTruncateMultiline :: EntryClass self => Attr self Bool
+entryTruncateMultiline = newAttrFromBoolProperty "truncate-multiline"
+
+-- | The current fraction of the task that's been completed.
+-- [_$_]
+-- Allowed values: [0,1]
+-- [_$_]
+-- Default value: 0
+-- [_$_]
+-- Since 2.16
+entryProgressFraction :: EntryClass self => Attr self Double
+entryProgressFraction = newAttrFromDoubleProperty "progress-fraction"
+
+-- | The fraction of total entry width to move the progress bouncing block for each call to
+-- 'entryProgressPulse'.
+-- [_$_]
+-- Allowed values: [0,1]
+-- [_$_]
+-- Default value: 0.1
+-- [_$_]
+-- Since 2.16
+entryProgressPulseStep :: EntryClass self => Attr self Double
+entryProgressPulseStep = newAttrFromDoubleProperty "progress-pulse-step"
+
+-- | A pixbuf to use as the primary icon for the entry.
+-- [_$_]
+-- Since 2.16
+entryPrimaryIconPixbuf :: EntryClass self => Attr self Pixbuf
+entryPrimaryIconPixbuf = newAttrFromObjectProperty "primary-icon-pixbuf"
+ {# call pure unsafe gdk_pixbuf_get_type #}
+-- | An pixbuf to use as the secondary icon for the entry.
+-- [_$_]
+-- Since 2.16
+entrySecondaryIconPixbuf :: EntryClass self => Attr self Pixbuf
+entrySecondaryIconPixbuf = newAttrFromObjectProperty "secondary-icon-pixbuf"
+ {# call pure unsafe gdk_pixbuf_get_type #}
+-- | The stock id to use for the primary icon for the entry.
+-- [_$_]
+-- Default value: 'Nothing'
+-- [_$_]
+-- Since 2.16
+entryPrimaryIconStock :: EntryClass self => Attr self String
+entryPrimaryIconStock = newAttrFromStringProperty "primary-icon-stock"
+
+-- | The stock id to use for the secondary icon for the entry.
+-- [_$_]
+-- Default value: 'Nothing'
+-- [_$_]
+-- Since 2.16
+entrySecondaryIconStock :: EntryClass self => Attr self String
+entrySecondaryIconStock = newAttrFromStringProperty "secondary-icon-stock"
+
+-- | The icon name to use for the primary icon for the entry.
+-- [_$_]
+-- Default value: 'Nothing'
+-- [_$_]
+-- Since 2.16
+entryPrimaryIconName :: EntryClass self => Attr self String
+entryPrimaryIconName = newAttrFromStringProperty "primary-icon-name"
+
+-- | The icon name to use for the secondary icon for the entry.
+-- [_$_]
+-- Default value: 'Nothing'
+-- [_$_]
+-- Since 2.16
+entrySecondaryIconName :: EntryClass self => Attr self String
+entrySecondaryIconName = newAttrFromStringProperty "secondary-icon-name"
+
+-- entryPrimaryIconGicon :: EntryClass self => Attr self {-GIcon-}
+-- entryPrimaryIconGicon = newAttrFrom{-GIcon-}Property "primary-icon-gicon"
+
+-- |
+--
+-- entrySecondaryIconGicon :: EntryClass self => Attr self {-GIcon-}
+-- entrySecondaryIconGicon = newAttrFrom{-GIcon-}Property "secondary-icon-gicon"
+
+-- | The representation which is used for the primary icon of the entry.
+-- [_$_]
+-- Default value: ''ImageEmpty''
+-- [_$_]
+-- Since 2.16
+entryPrimaryIconStorageType :: EntryClass self => ReadAttr self ImageType
+entryPrimaryIconStorageType = readAttrFromEnumProperty "primary-icon-storage-type"
+ {# call pure unsafe gtk_image_type_get_type #}
+
+-- | The representation which is used for the secondary icon of the entry.
+-- [_$_]
+-- Default value: ''ImageEmpty''
+-- [_$_]
+-- Since 2.16
+entrySecondaryIconStorageType :: EntryClass self => ReadAttr self ImageType
+entrySecondaryIconStorageType = readAttrFromEnumProperty "secondary-icon-storage-type"
+ {# call pure unsafe gtk_image_type_get_type #}
+
+-- | Whether the primary icon is activatable.
+-- [_$_]
+-- GTK+ emits the 'iconPress' and 'iconRelease' signals only on sensitive, activatable icons.
+-- [_$_]
+-- Sensitive, but non-activatable icons can be used for purely informational purposes.
+-- [_$_]
+-- Default value: 'False'
+-- [_$_]
+-- Since 2.16
+entryPrimaryIconActivatable :: EntryClass self => Attr self Bool
+entryPrimaryIconActivatable = newAttrFromBoolProperty "primary-icon-activatable"
+
+-- | Whether the secondary icon is activatable.
+-- [_$_]
+-- GTK+ emits the 'iconPress' and 'iconRelease' signals only on sensitive, activatable icons.
+-- [_$_]
+-- Sensitive, but non-activatable icons can be used for purely informational purposes.
+-- [_$_]
+-- Default value: 'False'
+-- [_$_]
+-- Since 2.16
+entrySecondaryIconActivatable :: EntryClass self => Attr self Bool
+entrySecondaryIconActivatable = newAttrFromBoolProperty "secondary-icon-activatable"
+
+-- | Whether the primary icon is sensitive.
+-- [_$_]
+-- An insensitive icon appears grayed out. GTK+ does not emit the 'iconPress' and 'iconRelease'
+-- signals and does not allow DND from insensitive icons.
+-- [_$_]
+-- An icon should be set insensitive if the action that would trigger when clicked is currently not
+-- available.
+-- [_$_]
+-- Default value: 'True'
+-- [_$_]
+-- Since 2.16
+entryPrimaryIconSensitive :: EntryClass self => Attr self Bool
+entryPrimaryIconSensitive = newAttrFromBoolProperty "primary-icon-sensitive"
+
+-- | Whether the secondary icon is sensitive.
+-- [_$_]
+-- An insensitive icon appears grayed out. GTK+ does not emit the 'iconPress' and 'iconRelease'
+-- signals and does not allow DND from insensitive icons.
+-- [_$_]
+-- An icon should be set insensitive if the action that would trigger when clicked is currently not
+-- available.
+-- [_$_]
+-- Default value: 'True'
+-- [_$_]
+-- Since 2.16
+entrySecondaryIconSensitive :: EntryClass self => Attr self Bool
+entrySecondaryIconSensitive = newAttrFromBoolProperty "secondary-icon-sensitive"
+
+-- | The contents of the tooltip on the primary icon.
+-- [_$_]
+-- Also see 'entrySetIconTooltipText'.
+-- [_$_]
+-- Default value: 'Nothing'
+-- [_$_]
+-- Since 2.16
+entryPrimaryIconTooltipText :: EntryClass self => Attr self String
+entryPrimaryIconTooltipText = newAttrFromStringProperty "primary-icon-tooltip-text"
+
+-- | The contents of the tooltip on the secondary icon.
+-- [_$_]
+-- Also see 'entrySetIconTooltipText'.
+-- [_$_]
+-- Default value: 'Nothing'
+-- [_$_]
+-- Since 2.16
+entrySecondaryIconTooltipText :: EntryClass self => Attr self String
+entrySecondaryIconTooltipText = newAttrFromStringProperty "secondary-icon-tooltip-text"
+
+-- | The contents of the tooltip on the primary icon, which is marked up with the Pango text markup
+-- language.
+-- [_$_]
+-- Also see 'entrySetIconTooltipMarkup'.
+-- [_$_]
+-- Default value: 'Nothing'
+-- [_$_]
+-- Since 2.16
+entryPrimaryIconTooltipMarkup :: EntryClass self => Attr self String
+entryPrimaryIconTooltipMarkup = newAttrFromStringProperty "primary-icon-tooltip-markup"
+
+-- | The contents of the tooltip on the secondary icon, which is marked up with the Pango text markup
+-- language.
+-- [_$_]
+-- Also see 'entrySetIconTooltipMarkup'.
+-- [_$_]
+-- Default value: 'Nothing'
+-- [_$_]
+-- Since 2.16
+entrySecondaryIconTooltipMarkup :: EntryClass self => Attr self String
+entrySecondaryIconTooltipMarkup = newAttrFromStringProperty "secondary-icon-tooltip-markup"
+
hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 1338
+-- | Whether the invisible char has been set for the 'Entry'.
+-- [_$_]
+-- Default value: 'False'
+-- [_$_]
+-- Since 2.16
+entryInvisibleCharSet :: EntryClass self => Attr self Bool
+entryInvisibleCharSet = newAttrFromBoolProperty "invisible-char-set"
+
hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 1412
+#if GTK_CHECK_VERSION(2,18,0)
+entryBuffer :: (EntryClass self, EntryBufferClass entryBuffer) => ReadWriteAttr self EntryBuffer entryBuffer
+entryBuffer = newAttrFromObjectProperty "buffer"
+ {# call pure unsafe gtk_entry_buffer_get_type #}
+#endif
+
hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 1420
+-- | A keybinding signal which gets emitted when the user activates the entry.
+-- [_$_]
+-- Applications should not connect to it, but may emit it with 'signalEmitByName' if they need to
+-- control activation programmatically.
+-- [_$_]
+-- The default bindings for this signal are all forms of the Enter key.
+activate :: EntryClass self => Signal self (IO ())
+activate = Signal (connect_NONE__NONE "activate")
+ [_$_]
+-- | The 'backspace' signal is a keybinding signal which gets emitted when the user asks for it.
+-- [_$_]
+-- The default bindings for this signal are Backspace and Shift-Backspace.
+backspace :: EntryClass self => Signal self (IO ())
+backspace = Signal (connect_NONE__NONE "backspace")
hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 1435
+-- | The 'copyClipboard' signal is a keybinding signal which gets emitted to copy the selection to the
+-- clipboard.
+-- [_$_]
+-- The default bindings for this signal are Ctrl-c and Ctrl-Insert.
+copyClipboard :: EntryClass self => Signal self (IO ())
+copyClipboard = Signal (connect_NONE__NONE "copy-clipboard")
+ [_$_]
+-- | The 'cutClipboard' signal is a keybinding signal which gets emitted to cut the selection to the
+-- clipboard.
+-- [_$_]
+-- The default bindings for this signal are Ctrl-x and Shift-Delete.
+cutClipboard :: EntryClass self => Signal self (IO ())
+cutClipboard = Signal (connect_NONE__NONE "cut-clipboard")
+ [_$_]
+-- | The 'deleteFromCursor' signal is a keybinding signal which gets emitted when the user initiates a
+-- text deletion.
+-- [_$_]
+-- If the type is ''DeleteChars'', GTK+ deletes the selection if there is one, otherwise it deletes
+-- the requested number of characters.
+-- [_$_]
+-- The default bindings for this signal are Delete for deleting a character and Ctrl-Delete for
+-- deleting a word.
+deleteFromCursor :: EntryClass self => Signal self (DeleteType -> Int -> IO ())
+deleteFromCursor = Signal (connect_ENUM_INT__NONE "delete-from-cursor")
+
+-- | The 'insertAtCursor' signal is a keybinding signal which gets emitted when the user initiates the
+-- insertion of a fixed string at the cursor.
+-- [_$_]
+-- This signal has no default bindings.
+insertAtCursor :: EntryClass self => Signal self (String -> IO ())
+insertAtCursor = Signal (connect_STRING__NONE "insert-at-cursor")
+ [_$_]
+-- | The 'moveCursor' signal is a keybinding signal which gets emitted when the user initiates a cursor
+-- movement. If the cursor is not visible in entry, this signal causes the viewport to be moved
+-- instead.
+-- [_$_]
+-- Applications should not connect to it, but may emit it with 'signalEmitByName' if they need to
+-- control the cursor programmatically.
+-- [_$_]
+-- The default bindings for this signal come in two variants, the variant with the Shift modifier
+-- extends the selection, the variant without the Shift modifer does not. There are too many key
+-- combinations to list them all here.
+-- [_$_]
+-- [_\e2_][_\97_][_\8f_] Arrow keys move by individual characters/lines [_$_]
+-- [_\e2_][_\97_][_\8f_] Ctrl-arrow key combinations move by words/paragraphs [_$_]
+-- [_\e2_][_\97_][_\8f_] Home/End keys move to the ends of the buffer
+moveCursor :: EntryClass self => Signal self (MovementStep -> Int -> Bool -> IO ())
+moveCursor = Signal (connect_ENUM_INT_BOOL__NONE "move-cursor")
+
+-- | The 'pasteClipboard' signal is a keybinding signal which gets emitted to paste the contents of the
+-- clipboard into the text view.
+-- [_$_]
+-- The default bindings for this signal are Ctrl-v and Shift-Insert.
+pasteClipboard :: EntryClass self => Signal self (IO ())
+pasteClipboard = Signal (connect_NONE__NONE "paste-clipboard")
+ [_$_]
+-- | The 'populatePopup' signal gets emitted before showing the context menu of the entry.
+-- [_$_]
+-- If you need to add items to the context menu, connect to this signal and append your menuitems to
+-- the menu.
+populatePopup :: EntryClass self => Signal self (Menu -> IO ())
+populatePopup = Signal (connect_OBJECT__NONE "populate-popup")
+
+-- | The 'toggleOverwrite' signal is a keybinding signal which gets emitted to toggle the overwrite mode
+-- of the entry.
+-- [_$_]
+-- The default bindings for this signal is Insert.
+toggleOverwrite :: EntryClass self => Signal self (IO ())
+toggleOverwrite = Signal (connect_NONE__NONE "toggle-overwrite")
+ [_$_]
+-- | The 'iconPress' signal is emitted when an activatable icon is clicked.
+iconPress :: EntryClass self => Signal self (IconPosition -> Event -> IO ())
+iconPress = Signal (connect_ENUM_BOXED__NONE "icon-press" marshalEvent)
+ [_$_]
+-- * Deprecated
+#ifndef DISABLE_DEPRECATED
hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 1566
-
+#endif
addfile ./gtk/Graphics/UI/Gtk/Entry/EntryBuffer.chs.pp
hunk ./gtk/Graphics/UI/Gtk/Entry/EntryBuffer.chs.pp 1
+-- -*-haskell-*-
+-- GIMP Toolkit (GTK) Widget EntryBuffer
+--
+-- Author : Andy Stewart
+--
+-- Created: 22 Mar 2010
+--
+-- 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 : gtk...@li...
+-- Stability : provisional
+-- Portability : portable (depends on GHC)
+--
+-- Text buffer for 'Entry'
+--
+-- * Module available since Gtk+ version 2.18
+--
+module Graphics.UI.Gtk.Entry.EntryBuffer (
+
+-- * Detail
+--
+-- | The 'EntryBuffer' class contains the actual text displayed in a 'Entry'
+-- widget.
+--
+-- A single 'EntryBuffer' object can be shared by multiple 'Entry' widgets
+-- which will then share the same text content, but not the cursor position,
+-- visibility attributes, icon etc.
+--
+-- 'EntryBuffer' may be derived from. Such a derived class might allow text
+-- to be stored in an alternate location, such as non-pageable memory, useful
+-- in the case of important passwords. Or a derived class could integrate with
+-- an application's concept of undo\/redo.
+
+-- * Class Hierarchy
+--
+-- |
+-- @
+-- | 'GObject'
+-- | +----EntryBuffer
+-- @
+
+#if GTK_CHECK_VERSION(2,18,0)
+-- * Types
+ EntryBuffer,
+ EntryBufferClass,
+ castToEntryBuffer,
+ toEntryBuffer,
+
+-- * Constructors
+ entryBufferNew,
+
+-- * Methods
+ entryBufferGetText,
+ entryBufferSetText,
+ entryBufferGetBytes,
+ entryBufferGetLength,
+ entryBufferInsertText,
+ entryBufferDeleteText,
+ entryBufferEmitDeletedText,
+ entryBufferEmitInsertedText,
+ entryBufferGetMaxLength,
+ entryBufferSetMaxLength,
+
+-- * Attributes
+ entryBufferText,
+ entryBufferLength,
+ entryBufferMaxLength,
+
+-- * Signals
+ insertedText,
+ deletedText,
+#endif
+ ) where
+
+import Control.Monad (liftM)
+
+import System.Glib.FFI
+import System.Glib.UTFString
+import System.Glib.Attributes
+import System.Glib.Properties
+{#import Graphics.UI.Gtk.Types#}
+{#import Graphics.UI.Gtk.Signals#}
+
+{# context lib="gtk" prefix="gtk" #}
+
+#if GTK_CHECK_VERSION(2,18,0)
+--------------------
+-- Constructors
+
+-- | Create a new 'EntryBuffer' object.
+--
+-- Optionally, specify initial text to set in the buffer.
+--
+entryBufferNew ::
+ String -- ^ @initialChars@ - initial buffer text
+ -> Int -- ^ @nInitialChars@ - number of characters in @initialChars@, or
+ -- -1
+ -> IO EntryBuffer
+entryBufferNew initialChars nInitialChars =
+ constructNewGObject mkEntryBuffer $
+ withUTFString initialChars $ \initialCharsPtr ->
+ {# call gtk_entry_buffer_new #}
+ initialCharsPtr
+ (fromIntegral nInitialChars)
+
+--------------------
+-- Methods
+
+-- | Retrieves the contents of the buffer.
+--
+-- The memory pointer returned by this call will not change unless this
+-- object emits a signal, or is finalized.
+--
+entryBufferGetText :: EntryBufferClass self => self
+ -> IO String -- ^ returns a pointer to the contents of the widget as a
+ -- string. This string points to internally allocated storage in
+ -- the buffer and must not be freed, modified or stored.
+entryBufferGetText self =
+ {# call gtk_entry_buffer_get_text #}
+ (toEntryBuffer self)
+ >>= peekUTFString
+
+-- | Sets the text in the buffer.
+--
+-- This is roughly equivalent to calling 'entryBufferDeleteText' and
+-- 'entryBufferInsertText'.
+--
+-- Note that @nChars@ is in characters, not in bytes.
+--
+entryBufferSetText :: EntryBufferClass self => self
+ -> String -- ^ @chars@ - the new text
+ -> Int -- ^ @nChars@ - the number of characters in @text@, or -1
+ -> IO ()
+entryBufferSetText self chars nChars =
+ withUTFString chars $ \charsPtr ->
+ {# call gtk_entry_buffer_set_text #}
+ (toEntryBuffer self)
+ charsPtr
+ (fromIntegral nChars)
+
+-- | Retrieves the length in bytes of the buffer. See 'entryBufferGetLength'.
+--
+entryBufferGetBytes :: EntryBufferClass self => self
+ -> IO Int -- ^ returns The byte length of the buffer.
+entryBufferGetBytes self =
+ liftM fromIntegral $ [_$_]
+ {# call gtk_entry_buffer_get_bytes #}
+ (toEntryBuffer self)
+
+-- | Retrieves the length in characters of the buffer.
+--
+entryBufferGetLength :: EntryBufferClass self => self
+ -> IO Int -- ^ returns The number of characters in the buffer.
+entryBufferGetLength self =
+ liftM fromIntegral $
+ {# call gtk_entry_buffer_get_length #}
+ (toEntryBuffer self)
+
+-- | Retrieves the maximum allowed length of the text in buffer. See 'entryBufferSetMaxLength'.
+entryBufferGetMaxLength :: EntryBufferClass self => self
+ -> IO Int -- ^ returns the maximum allowed number of characters in
+ -- 'EntryBuffer', or 0 if there is no maximum.
+entryBufferGetMaxLength self =
+ liftM fromIntegral $
+ {# call gtk_entry_buffer_get_max_length #}
+ (toEntryBuffer self)
+
+-- | Sets the maximum allowed length of the contents of the buffer. If the current contents are longer
+-- than the given length, then they will be truncated to fit.
+entryBufferSetMaxLength :: EntryBufferClass self => self
+ -> Int -- ^ @maxLength@ - the maximum length of the entry buffer, or 0 for no
+ -- maximum. (other than the maximum length of entries.) The value
+ -- passed in will be clamped to the range 0-65536.
+ -> IO ()
+entryBufferSetMaxLength self maxLength =
+ {# call gtk_entry_buffer_set_max_length #}
+ (toEntryBuffer self)
+ (fromIntegral maxLength)
+
+-- | Inserts @nChars@ characters of @chars@ into the contents of the buffer,
+-- at position @position@.
+--
+-- If @nChars@ is negative, then characters from chars will be inserted
+-- until a null-terminator is found. If @position@ or @nChars@ are out of
+-- bounds, or the maximum buffer text length is exceeded, then they are coerced
+-- to sane values.
+--
+-- Note that the position and length are in characters, not in bytes.
+--
+entryBufferInsertText :: EntryBufferClass self => self
+ -> Int -- ^ @position@ - the position at which to insert text.
+ -> String -- ^ @chars@ - the text to insert into the buffer.
+ -> Int -- ^ @nChars@ - the length of the text in characters, or -1
+ -> IO Int -- ^ returns The number of characters actually inserted.
+entryBufferInsertText self position chars nChars =
+ liftM fromIntegral $
+ withUTFString chars $ \charsPtr ->
+ {# call gtk_entry_buffer_insert_text #}
+ (toEntryBuffer self)
+ (fromIntegral position)
+ char...
[truncated message content] |
|
From: Andy S. <And...@co...> - 2010-03-22 00:57:41
|
Sun Mar 21 20:37:58 EDT 2010 Andy Stewart <laz...@gm...>
* Update all `Abstract` modules to Gtk+ 2.18.3 (except Container and Widget). Details see ApiUpdateTodoList.txt
Ignore-this: 856ff1073fff1653c9e8da2e8c308cb3
hunk ./ApiUpdateTodoList.txt 180
-*** TODO Bin.chs
-*** TODO Box.chs
-*** TODO ButtonBox.chs.pp
+*** DONE Bin.chs
+*** DONE Box.chs
+*** DONE ButtonBox.chs.pp
hunk ./ApiUpdateTodoList.txt 184
-*** TODO IMContext.chs.pp
-*** TODO Misc.chs
-*** TODO Object.chs.pp
-*** TODO Paned.chs.pp
-*** TODO Range.chs.pp
-*** TODO Scale.chs
-*** TODO Scrollbar.hs
-*** TODO Separator.hs
+*** DONE IMContext.chs.pp
+*** DONE Misc.chs
+*** DONE Object.chs.pp
+*** DONE Paned.chs.pp
+*** DONE Range.chs.pp
+*** DONE Scale.chs
+*** DONE Scrollbar.hs
+*** DONE Separator.hs
hunk ./glib/System/Glib/Properties.chs 69
+ readAttrFromFloatProperty,
hunk ./glib/System/Glib/Properties.chs 266
+readAttrFromFloatProperty :: GObjectClass gobj => String -> ReadAttr gobj Float
+readAttrFromFloatProperty propName =
+ readNamedAttr propName (objectGetPropertyFloat propName)
+
hunk ./gtk/Graphics/UI/Gtk/Abstract/Bin.chs 8
--- Copyright (C) 2004-2005 Duncan Coutts
+-- Copyright (C) 2004-2009 Duncan Coutts
hunk ./gtk/Graphics/UI/Gtk/Abstract/Bin.chs 28
+
hunk ./gtk/Graphics/UI/Gtk/Abstract/Bin.chs 30
--- [_$_]
+--
hunk ./gtk/Graphics/UI/Gtk/Abstract/Bin.chs 39
+--
hunk ./gtk/Graphics/UI/Gtk/Abstract/Box.chs 8
--- Copyright (C) 1999-2005 Axel Simon
+-- Copyright (C) 1999-2009 Axel Simon
hunk ./gtk/Graphics/UI/Gtk/Abstract/Box.chs 28
+
hunk ./gtk/Graphics/UI/Gtk/Abstract/Box.chs 89
+--
hunk ./gtk/Graphics/UI/Gtk/Abstract/Box.chs 112
- boxPackStartDefaults,
- boxPackEndDefaults,
hunk ./gtk/Graphics/UI/Gtk/Abstract/Box.chs 129
+
+-- * Deprecated
+ boxPackStartDefaults,
+ boxPackEndDefaults,
hunk ./gtk/Graphics/UI/Gtk/Abstract/Box.chs 202
--- | Like 'boxPackStart' but uses the default parameters 'PackRepel' and 0 for
--- padding.
---
-boxPackStartDefaults :: (BoxClass self, WidgetClass widget) => self
- -> widget -- ^ @widget@ - the 'Widget' to be added to the box.
- -> IO ()
-boxPackStartDefaults self widget =
- {# call box_pack_start_defaults #}
- (toBox self)
- (toWidget widget)
-
--- | Like 'boxPackEnd' but uses the default parameters 'PackRepel' and 0 for
--- padding.
---
-boxPackEndDefaults :: (BoxClass self, WidgetClass widget) => self
- -> widget -- ^ @widget@ - the 'Widget' to be added to the box.
- -> IO ()
-boxPackEndDefaults self widget =
- {# call box_pack_end_defaults #}
- (toBox self)
- (toWidget widget)
-
hunk ./gtk/Graphics/UI/Gtk/Abstract/Box.chs 380
+
+-- * Deprecated
+
+-- | Like 'boxPackStart' but uses the default parameters 'PackRepel' and 0 for
+-- padding.
+--
+boxPackStartDefaults :: (BoxClass self, WidgetClass widget) => self
+ -> widget -- ^ @widget@ - the 'Widget' to be added to the box.
+ -> IO ()
+boxPackStartDefaults self widget =
+ {# call box_pack_start_defaults #}
+ (toBox self)
+ (toWidget widget)
+
+-- | Like 'boxPackEnd' but uses the default parameters 'PackRepel' and 0 for
+-- padding.
+--
+boxPackEndDefaults :: (BoxClass self, WidgetClass widget) => self
+ -> widget -- ^ @widget@ - the 'Widget' to be added to the box.
+ -> IO ()
+boxPackEndDefaults self widget =
+ {# call box_pack_end_defaults #}
+ (toBox self)
+ (toWidget widget)
hunk ./gtk/Graphics/UI/Gtk/Abstract/ButtonBox.chs.pp 8
--- Copyright (C) 2004-2005 Matthew Walton
+-- Copyright (C) 2004-2009 Matthew Walton
hunk ./gtk/Graphics/UI/Gtk/Abstract/ButtonBox.chs.pp 28
+
hunk ./gtk/Graphics/UI/Gtk/Abstract/ButtonBox.chs.pp 30
--- [_$_]
+--
hunk ./gtk/Graphics/UI/Gtk/Abstract/ButtonBox.chs.pp 54
+--
hunk ./gtk/Graphics/UI/Gtk/Abstract/Container.chs.pp 8
--- Copyright (C) 1999-2005 Axel Simon
+-- Copyright (C) 1999-2009 Axel Simon
hunk ./gtk/Graphics/UI/Gtk/Abstract/Container.chs.pp 20
+-- NOTE: the following varargs functions were not bound
+-- gtk_container_add_with_properties
+-- gtk_container_child_get
+-- gtk_container_child_set
+-- gtk_container_child_get_valist
+-- gtk_container_child_set_valist
+--
hunk ./gtk/Graphics/UI/Gtk/Abstract/Container.chs.pp 35
+
hunk ./gtk/Graphics/UI/Gtk/Abstract/Container.chs.pp 37
--- [_$_]
+--
hunk ./gtk/Graphics/UI/Gtk/Abstract/Container.chs.pp 128
+--
hunk ./gtk/Graphics/UI/Gtk/Abstract/Container.chs.pp 166
+ containerSetReallocateRedraws,
hunk ./gtk/Graphics/UI/Gtk/Abstract/Container.chs.pp 176
+ containerChildType,
+ containerChildGetProperty,
+ containerChildSetProperty,
hunk ./gtk/Graphics/UI/Gtk/Abstract/Container.chs.pp 183
+#if GTK_CHECK_VERSION(2,14,0)
+ containerGetFocusChild,
+#endif
hunk ./gtk/Graphics/UI/Gtk/Abstract/Container.chs.pp 217
+import System.Glib.UTFString
hunk ./gtk/Graphics/UI/Gtk/Abstract/Container.chs.pp 224
+{#import System.Glib.GType#}
+{#import System.Glib.GValue#}
hunk ./gtk/Graphics/UI/Gtk/Abstract/Container.chs.pp 312
+-- | Sets the @reallocateRedraws@ flag of the container to the given value.
+-- [_$_]
+-- Containers requesting reallocation redraws get automatically redrawn if any of their children
+-- changed allocation.
+containerSetReallocateRedraws :: ContainerClass self => self
+ -> Bool -- ^ @needsRedraws@ - the new value for the container's
+ -- @reallocateRedraws@ flag
+ -> IO ()
+containerSetReallocateRedraws self needsRedraws =
+ {# call gtk_container_set_reallocate_redraws #}
+ (toContainer self)
+ (fromBool needsRedraws)
+
hunk ./gtk/Graphics/UI/Gtk/Abstract/Container.chs.pp 442
+-- | Returns the type of the children supported by the container.
+-- [_$_]
+-- Note that this may return 'GTypeNone' to indicate that no more children can be added, e.g. for a
+-- 'Paned' which already has two children.
+containerChildType :: ContainerClass self => self -> IO (Maybe GType)
+containerChildType self = do
+ gtype <- {# call container_child_type #} (toContainer self)
+ return $ if gtype == 0
+ then Just $ fromIntegral gtype
+ else Nothing
+
+-- | Gets the value of a child property for @child@ and @container@.
+--
+containerChildGetProperty :: (ContainerClass self, WidgetClass child) => self
+ -> child -- ^ @child@ - a widget which is a child of @container@
+ -> String -- ^ @propertyName@ - the name of the property to get
+ -> GValue -- ^ @value@ - a location to return the value
+ -> IO ()
+containerChildGetProperty self child propertyName value =
+ withUTFString propertyName $ \propertyNamePtr ->
+ {# call gtk_container_child_get_property #}
+ (toContainer self)
+ (toWidget child)
+ propertyNamePtr
+ value
+
+-- | Sets a child property for @child@ and @container@.
+--
+containerChildSetProperty :: (ContainerClass self, WidgetClass child) => self
+ -> child -- ^ @child@ - a widget which is a child of @container@
+ -> String -- ^ @propertyName@ - the name of the property to set
+ -> GValue -- ^ @value@ - the value to set the property to
+ -> IO ()
+containerChildSetProperty self child propertyName value =
+ withUTFString propertyName $ \propertyNamePtr ->
+ {# call gtk_container_child_set_property #}
+ (toContainer self)
+ (toWidget child)
+ propertyNamePtr
+ value
+
hunk ./gtk/Graphics/UI/Gtk/Abstract/Container.chs.pp 535
+#if GTK_CHECK_VERSION(2,14,0)
+-- | Returns the current focus child widget inside container.
+containerGetFocusChild :: ContainerClass self => self
+ -> IO Widget -- ^ returns The child widget which has the focus inside
+ -- @container@, or {@NULL@, FIXME: this should probably be
+ -- converted to a Maybe data type} if none is set.
+containerGetFocusChild self =
+ makeNewObject mkWidget $
+ {# call gtk_container_get_focus_child #}
+ (toContainer self)
+#endif
+
hunk ./gtk/Graphics/UI/Gtk/Abstract/Misc.chs 8
--- Copyright (C) 1999-2005 Axel Simon
+-- Copyright (C) 1999-2009 Axel Simon
hunk ./gtk/Graphics/UI/Gtk/Abstract/Misc.chs 28
+
hunk ./gtk/Graphics/UI/Gtk/Abstract/Misc.chs 43
+--
hunk ./gtk/Graphics/UI/Gtk/Abstract/Object.chs.pp 8
--- Copyright (C) 2001-2005 Axel Simon
+-- Copyright (C) 2001-2009 Axel Simon
hunk ./gtk/Graphics/UI/Gtk/Abstract/Object.chs.pp 32
--- * Detail
--- [_$_]
+
+-- ** Description
+--
hunk ./gtk/Graphics/UI/Gtk/Abstract/Object.chs.pp 42
+--
hunk ./gtk/Graphics/UI/Gtk/Abstract/Object.chs.pp 54
+-- | +----'RecentFilter'
hunk ./gtk/Graphics/UI/Gtk/Abstract/Paned.chs.pp 8
--- Copyright (C) 1999-2005 Axel Simon
+-- Copyright (C) 1999-2009 Axel Simon
hunk ./gtk/Graphics/UI/Gtk/Abstract/Paned.chs.pp 28
+
hunk ./gtk/Graphics/UI/Gtk/Abstract/Paned.chs.pp 30
--- [_$_]
+--
hunk ./gtk/Graphics/UI/Gtk/Abstract/Paned.chs.pp 57
+--
hunk ./gtk/Graphics/UI/Gtk/Abstract/Paned.chs.pp 101
+-- * Signals
+ cycleChildFocus,
+ toggleHandleFocus,
+ moveHandle,
+ cycleHandleFocus,
+ acceptPosition,
+ cancelPosition,
hunk ./gtk/Graphics/UI/Gtk/Abstract/Paned.chs.pp 304
+--------------------
+-- Signals
+-- | The 'cycleChildFocus' signal is a keybinding signal which gets emitted to cycle the focus between
+-- the children of the paned.
+-- [_$_]
+-- The default binding is f6.
+cycleChildFocus :: PanedClass self => Signal self (Bool -> IO Bool)
+cycleChildFocus = Signal (connect_BOOL__BOOL "cycle_child_focus")
+
+-- | The 'toggleHandleFocus' is a keybinding signal which gets emitted to accept the current position
+-- of the handle and then move focus to the next widget in the focus chain.
+-- [_$_]
+-- The default binding is Tab.
+toggleHandleFocus :: PanedClass self => Signal self (IO Bool)
+toggleHandleFocus = Signal (connect_NONE__BOOL "toggle_handle_focus")
+
+-- | The 'moveHandle' signal is a keybinding signal which gets emitted to move the handle when the user
+-- is using key bindings to move it.
+moveHandle :: PanedClass self => Signal self (ScrollType -> IO Bool)
+moveHandle = Signal (connect_ENUM__BOOL "move_handle")
+
+-- | The 'cycleHandleFocus' signal is a keybinding signal which gets emitted to cycle whether the paned
+-- should grab focus to allow the user to change position of the handle by using key bindings.
+-- [_$_]
+-- The default binding for this signal is f8.
+cycleHandleFocus :: PanedClass self => Signal self (Bool -> IO Bool)
+cycleHandleFocus = Signal (connect_BOOL__BOOL "cycle_handle_focus")
+
+-- | The 'acceptPosition' signal is a keybinding signal which gets emitted to accept the current
+-- position of the handle when moving it using key bindings.
+-- [_$_]
+-- The default binding for this signal is Return or Space.
+acceptPosition :: PanedClass self => Signal self (IO Bool)
+acceptPosition = Signal (connect_NONE__BOOL "accept_position")
+
+-- | The 'cancelPosition' signal is a keybinding signal which gets emitted to cancel moving the position
+-- of the handle using key bindings. The position of the handle will be reset to the value prior to
+-- moving it.
+-- [_$_]
+-- The default binding for this signal is Escape.
+cancelPosition :: PanedClass self => Signal self (IO Bool)
+cancelPosition = Signal (connect_NONE__BOOL "cancel_position")
+
hunk ./gtk/Graphics/UI/Gtk/Abstract/Range.chs.pp 8
--- Copyright (C) 1999-2005 Axel Simon
+-- Copyright (C) 1999-2009 Axel Simon
hunk ./gtk/Graphics/UI/Gtk/Abstract/Range.chs.pp 27
+-- Note: below function can use attributes instead, so don't bind it for simple:
+-- gtk_range_get_fill_level
+-- gtk_range_set_fill_level
+-- gtk_range_get_restrict_to_fill_level
+-- gtk_range_set_restrict_to_fill_level
+-- gtk_range_get_show_fill_level
+-- gtk_range_set_show_fill_level
+--
hunk ./gtk/Graphics/UI/Gtk/Abstract/Range.chs.pp 36
--- * Description
+
+-- * Detail
+--
+-- | 'Range' is the common base class for widgets which visualize an
+-- adjustment, e.g scales or scrollbars.
hunk ./gtk/Graphics/UI/Gtk/Abstract/Range.chs.pp 46
+--
hunk ./gtk/Graphics/UI/Gtk/Abstract/Range.chs.pp 83
+#if GTK_CHECK_VERSION(2,18,0)
+ rangeGetFlippable,
+ rangeSetFlippable,
+#endif
hunk ./gtk/Graphics/UI/Gtk/Abstract/Range.chs.pp 92
+ rangeFillLevel,
+ rangeRestrictToFillLevel,
+ rangeShowFillLevel,
hunk ./gtk/Graphics/UI/Gtk/Abstract/Range.chs.pp 101
+ rangeActivateSlider,
+ rangeArrowDisplacementX,
+ rangeArrowDisplacementY,
+ rangeArrowScaling,
+ rangeSliderWidth,
+ rangeStepperSize,
+ rangeStepperSpacing,
+ rangeTroughBorder,
+ rangeTroughSideDetails,
+ rangeTroughUnderSteppers,
+
hunk ./gtk/Graphics/UI/Gtk/Abstract/Range.chs.pp 115
+ moveSlider,
hunk ./gtk/Graphics/UI/Gtk/Abstract/Range.chs.pp 340
+#if GTK_CHECK_VERSION(2,18,0)
+-- | Gets the value set by 'rangeSetFlippable'.
+rangeGetFlippable :: RangeClass self => self
+ -> IO Bool -- ^ returns @True@ if the range is flippable
+rangeGetFlippable self =
+ liftM toBool $
+ {# call gtk_range_get_flippable #}
+ (toRange self)
+
+-- | If a range is flippable, it will switch its direction if it is horizontal and its direction is
+-- ''TextDirRtl''.
+-- [_$_]
+-- See 'widgetGetDirection'.
+rangeSetFlippable :: RangeClass self => self
+ -> Bool -- ^ @flippable@ - @True@ to make the range flippable
+ -> IO ()
+rangeSetFlippable self flippable =
+ {# call gtk_range_set_flippable #}
+ (toRange self)
+ (fromBool flippable)
+#endif
+
hunk ./gtk/Graphics/UI/Gtk/Abstract/Range.chs.pp 390
+-- | The fill level (e.g. prebuffering of a network stream). See 'rangeSetFillLevel'.
+-- [_$_]
+-- Default value: 1.79769e+308
+-- [_$_]
+-- Since 2.12
+rangeFillLevel :: RangeClass self => Attr self Double
+rangeFillLevel = newAttrFromDoubleProperty "fill-level"
+
+-- | The restrict-to-fill-level property controls whether slider movement is restricted to an upper
+-- boundary set by the fill level. See 'rangeSetRestrictToFillLevel'.
+-- [_$_]
+-- Default value: 'True'
+-- [_$_]
+-- Since 2.12
+rangeRestrictToFillLevel :: RangeClass self => Attr self Bool
+rangeRestrictToFillLevel = newAttrFromBoolProperty "restrict-to-fill-level"
+
+-- | The show-fill-level property controls whether fill level indicator graphics are displayed on the
+-- trough. See 'rangeSetShowFillLevel '.
+-- [_$_]
+-- Default value: 'False'
+-- [_$_]
+-- Since 2.12
+rangeShowFillLevel :: RangeClass self => Attr self Bool
+rangeShowFillLevel = newAttrFromBoolProperty "show-fill-level"
+
hunk ./gtk/Graphics/UI/Gtk/Abstract/Range.chs.pp 446
+-- | With this option set to 'True', sliders will be drawn ACTIVE and with shadow IN while they are
+-- dragged.
+-- [_$_]
+-- Default value: 'False'
+rangeActivateSlider :: RangeClass self => ReadAttr self Bool
+rangeActivateSlider = readAttrFromBoolProperty "activate-slider"
+
+-- | How far in the x direction to move the arrow when the button is depressed.
+-- [_$_]
+-- Default value: 0
+rangeArrowDisplacementX :: RangeClass self => ReadAttr self Int
+rangeArrowDisplacementX = readAttrFromIntProperty "arrow-displacement-x"
+
+-- | How far in the y direction to move the arrow when the button is depressed.
+-- [_$_]
+-- Default value: 0
+rangeArrowDisplacementY :: RangeClass self => ReadAttr self Int
+rangeArrowDisplacementY = readAttrFromIntProperty "arrow-displacement-y"
+ [_$_]
+ [_$_]
+-- | The arrow size proportion relative to the scroll button size.
+-- [_$_]
+-- Allowed values: [0,1]
+-- [_$_]
+-- Default value: 0.5
+-- [_$_]
+-- Since 2.14
+rangeArrowScaling :: RangeClass self => ReadAttr self Float
+rangeArrowScaling = readAttrFromFloatProperty "arrow-scaling"
+
+-- | Width of scrollbar or scale thumb.
+-- [_$_]
+-- Allowed values: >= 0
+-- [_$_]
+-- Default value: 14
+rangeSliderWidth :: RangeClass self => ReadAttr self Int
+rangeSliderWidth = readAttrFromIntProperty "slider-width"
+
+-- | Length of step buttons at ends.
+-- [_$_]
+-- Allowed values: >= 0
+-- [_$_]
+-- Default value: 14
+rangeStepperSize :: RangeClass self => ReadAttr self Int
+rangeStepperSize = readAttrFromIntProperty "stepper-size"
+ [_$_]
+-- | The spacing between the stepper buttons and thumb. Note that setting this value to anything > 0 will
+-- automatically set the trough-under-steppers style property to 'True' as well. Also, stepper-spacing
+-- won't have any effect if there are no steppers.
+-- [_$_]
+-- Allowed values: >= 0
+-- [_$_]
+-- Default value: 0
+rangeStepperSpacing :: RangeClass self => ReadAttr self Int
+rangeStepperSpacing = readAttrFromIntProperty "stepper-spacing"
+ [_$_]
+-- | Spacing between thumb/steppers and outer trough bevel.
+-- [_$_]
+-- Allowed values: >= 0
+-- [_$_]
+-- Default value: 1
+rangeTroughBorder :: RangeClass self => ReadAttr self Int
+rangeTroughBorder = readAttrFromIntProperty "trough-border"
+ [_$_]
+-- | When 'True', the parts of the trough on the two sides of the slider are drawn with different details.
+-- [_$_]
+-- Default value: 'False'
+-- [_$_]
+-- Since 2.10
+rangeTroughSideDetails :: RangeClass self => ReadAttr self Bool
+rangeTroughSideDetails = readAttrFromBoolProperty "trough-side-details"
+ [_$_]
+-- | Whether to draw the trough across the full length of the range or to exclude the steppers and their
+-- spacing. Note that setting the 'stepperSpacing' style property to any value > 0 will automatically
+-- enable trough-under-steppers too.
+-- [_$_]
+-- Default value: 'True'
+-- [_$_]
+-- Since 2.10
+rangeTroughUnderSteppers :: RangeClass self => ReadAttr self Bool
+rangeTroughUnderSteppers = readAttrFromBoolProperty "trough-under-steppers"
+
hunk ./gtk/Graphics/UI/Gtk/Abstract/Range.chs.pp 537
+-- | Virtual function that moves the slider. Used for keybindings.
+moveSlider :: RangeClass self => Signal self (ScrollType -> IO ())
+moveSlider = Signal (connect_ENUM__NONE "move-slider")
+
hunk ./gtk/Graphics/UI/Gtk/Abstract/Scale.chs 8
--- Copyright (C) 1999-2005 Axel Simon
+-- Copyright (C) 1999-2009 Axel Simon
hunk ./gtk/Graphics/UI/Gtk/Abstract/Scale.chs 28
+
hunk ./gtk/Graphics/UI/Gtk/Abstract/Scale.chs 45
+--
hunk ./gtk/Graphics/UI/Gtk/Abstract/Scale.chs 72
+ scaleGetLayout,
+ scaleGetLayoutOffsets,
+
+ scaleAddMark,
+ scaleClearMarks,
hunk ./gtk/Graphics/UI/Gtk/Abstract/Scale.chs 85
+import Data.IORef ( newIORef )
+
hunk ./gtk/Graphics/UI/Gtk/Abstract/Scale.chs 89
+import System.Glib.UTFString
+{#import Graphics.UI.Gtk.Pango.Types#}
hunk ./gtk/Graphics/UI/Gtk/Abstract/Scale.chs 163
+-- | Gets the 'PangoLayout' used to display the scale. The returned object is
+-- owned by the scale so does not need to be freed by the caller.
+--
+-- * Available since Gtk+ version 2.4
+--
+scaleGetLayout :: ScaleClass self => self
+ -> IO (Maybe PangoLayout) -- ^ returns the 'PangoLayout' for this scale, or
+ -- @Nothing@ if the 'drawValue' property is @False@.
+scaleGetLayout self = do
+ pl <- {# call gtk_scale_get_layout #}
+ (toScale self)
+ if pl == nullPtr
+ then return Nothing
+ else do
+ ps <- makeNewPangoString ""
+ psRef <- newIORef ps
+ raw <- constructNewGObject mkPangoLayoutRaw $ return pl
+ return $ Just (PangoLayout psRef raw)
+
+-- | Obtains the coordinates where the scale will draw the PangoLayout representing the text in the
+-- scale. Remember when using the PangoLayout function you need to convert to and from pixels using
+-- 'PIXELS' or 'PangoScale'.
+-- [_$_]
+-- If the 'drawValue' property is 'False', the return values are undefined.
+-- representing the text in the scale. Remember when using the 'PangoLayout'
+-- function you need to convert to and from pixels using 'pangopixels' or
+-- 'PangoPixels' or `PangoScale'
+--
+-- * Available since Gtk+ version 2.4
+--
+scaleGetLayoutOffsets :: ScaleClass self => self
+ -> IO (Int, Int) -- ^ @(x, y)@ [_$_]
+ -- @x@ - location to store X offset of layout
+ -- @y@ - location to store Y offset of layout
+scaleGetLayoutOffsets self =
+ alloca $ \xPtr ->
+ alloca $ \yPtr ->
+ {# call gtk_scale_get_layout_offsets #}
+ (toScale self)
+ xPtr
+ yPtr
+ >>
+ peek xPtr >>= \x ->
+ peek yPtr >>= \y ->
+ return (fromIntegral x, fromIntegral y)
+
+-- | Adds a mark at @value@.
+--
+-- A mark is indicated visually by drawing a tick mark next to the scale,
+-- and Gtk+ makes it easy for the user to position the scale exactly at the
+-- marks value.
+--
+-- To remove marks from a scale, use 'scaleClearMarks'.
+--
+-- * Available since Gtk+ version 2.16
+--
+scaleAddMark :: ScaleClass self => self
+ -> Double -- ^ @value@ - the value at which the mark is placed, must be
+ -- between the lower and upper limits of the scales\'
+ -- adjustment
+ -> PositionType -- ^ @position@ - where to draw the mark. For a horizontal
+ -- scale, 'PosTop' is drawn above the scale, anything else
+ -- below. For a vertical scale, 'PosLeft' is drawn to the left
+ -- of the scale, anything else to the right.
+ -> String -- ^ @markup@ - Text to be shown at the mark, using Pango
+ -- markup
+ -> IO ()
+scaleAddMark self value position markup =
+ withUTFString markup $ \markupPtr ->
+ {# call gtk_scale_add_mark #}
+ (toScale self)
+ (realToFrac value)
+ ((fromIntegral . fromEnum) position)
+ markupPtr
+
+-- | Removes any marks that have been added with 'scaleAddMark'.
+--
+-- * Available since Gtk+ version 2.16
+--
+scaleClearMarks :: ScaleClass self => self -> IO ()
+scaleClearMarks self =
+ {# call gtk_scale_clear_marks #}
+ (toScale self)
+
hunk ./gtk/Graphics/UI/Gtk/Abstract/Scrollbar.hs 8
--- Copyright (C) 1999-2005 Axel Simon
+-- Copyright (C) 1999-2009 Axel Simon
hunk ./gtk/Graphics/UI/Gtk/Abstract/Scrollbar.hs 25
--- Base class for 'Graphics.UI.Gtk.Scrolling.HScrollbar' and
--- 'Graphics.UI.Gtk.Scrolling.VScrollbar'
+-- Base class for 'HScrollbar' and 'VScrollbar'
hunk ./gtk/Graphics/UI/Gtk/Abstract/Scrollbar.hs 28
+
hunk ./gtk/Graphics/UI/Gtk/Abstract/Scrollbar.hs 30
--- [_$_]
--- | The 'Scrollbar' widget is an abstract base class for [_$_]
--- 'Graphics.UI.Gtk.Scrolling.HScrollbar' and
--- 'Graphics.UI.Gtk.Scrolling.VScrollbar'. It is not very useful in itself.
+--
+-- | The 'Scrollbar' widget is an abstract base class for 'HScrollbar' and
+-- 'VScrollbar'. It is not very useful in itself.
hunk ./gtk/Graphics/UI/Gtk/Abstract/Scrollbar.hs 35
--- adjustments. See 'Graphics.UI.Gtk.Misc.Adjustment' for the fields in an
--- adjustment - for
+-- adjustments. See 'Adjustment' for the fields in an adjustment - for
hunk ./gtk/Graphics/UI/Gtk/Abstract/Scrollbar.hs 44
+--
hunk ./gtk/Graphics/UI/Gtk/Abstract/Scrollbar.hs 47
--- | 'System.Glib.GObject'
--- | +----'Graphics.UI.Gtk.Abstract.Object'
--- | +----'Graphics.UI.Gtk.Abstract.Widget'
--- | +----'Graphics.UI.Gtk.Abstract.Range'
+-- | 'GObject'
+-- | +----'Object'
+-- | +----'Widget'
+-- | +----'Range'
hunk ./gtk/Graphics/UI/Gtk/Abstract/Scrollbar.hs 52
--- | +----'Graphics.UI.Gtk.Scrolling.HScrollbar'
--- | +----'Graphics.UI.Gtk.Scrolling.VScrollbar'
+-- | +----'HScrollbar'
+-- | +----'VScrollbar'
hunk ./gtk/Graphics/UI/Gtk/Abstract/Separator.hs 8
--- Copyright (C) 1999-2005 Axel Simon
+-- Copyright (C) 1999-2009 Axel Simon
hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 8
--- Copyright (C) 2001-2008 Axel Simon
+-- Copyright (C) 2001-2009 Axel Simon
+-- Copyright (C) 2001-2010 Andy Stewart
hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 27
+-- Note:
+--
+-- Below function not useful or rarely-used or just for widget implementations,
+-- don't bind those functoins to avoid confuse:
+-- `gtk_widget_send_expose`
+-- `gtk_widget_get_allocation`
+-- `gtk_widget_set_allocation`
+-- `gtk_widget_set_has_window'
+-- `gtk_widget_set_window`
+-- `gtk_requisition_copy`
+-- `gtk_requisition_free`
+-- [_$_]
+-- FFI don't support vararg functions, so below funtion don't bind:
+-- `gtk_widget_style_get_valist`
+--
+-- Below function just need corresponding attributes, function is not necessary.
+-- `gtk_widget_get_tooltip_markup`
+-- `gtk_widget_set_tooltip_markup`
+-- `gtk_widget_get_tooltip_text`
+-- `gtk_widget_set_tooltip_text`
+-- `gtk_widget_get_has_tooltip`
+-- `gtk_widget_set_has_tooltip `
+-- `gtk_widget_get_double_buffered`
+-- `gtk_widget_set_receives_default`
+-- `gtk_widget_get_receives_default`
+--
hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 114
+ widgetRealize,
hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 148
+ widgetGetVisual,
+ widgetGetDefaultVisual,
+#if GTK_CHECK_VERSION(2,12,0)
+ widgetModifyCursor,
+ widgetErrorBell,
+ widgetKeynavFailed,
+ widgetGetTooltipWindow,
+ widgetSetTooltipWindow,
+ widgetTriggerTooltipQuery,
+#endif
+#if GTK_CHECK_VERSION(2,14,0)
+ widgetGetSnapshot,
+#endif
+#if GTK_CHECK_VERSION(2,18,0)
+ widgetGetHasWindow,
+ widgetIsSensitive,
+ widgetHasGrab,
+ widgetIsDrawable,
+ widgetIsToplevel,
+#endif
+ widgetPopCompositeChild,
+ widgetPushCompositeChild,
+ widgetMnemonicActivate,
+ widgetStyleGetProperty,
+ widgetChildNotify,
+ widgetFreezeChildNotify,
hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 181
+ widgetHideOnDelete,
hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 184
+ widgetEnsureStyle,
hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 226
- --widgetGetClipboard,
+ -- widgetGetClipboard,
+ widgetThawChildNotify,
hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 277
-
+ widgetTooltipMark,
+ widgetTooltipText,
+ widgetHasTooltip,
+ widgetDoubleBuffered,
+ [_$_]
hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 302
+ compositedChanged,
+#if GTK_CHECK_VERSION(2,14,0)
+ damageEvent,
+#endif
hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 332
+ grabFocus,
+ mnemonicActivate,
+ widgetMoveFocus,
+#if GTK_CHECK_VERSION(2,12,0)
+ keynavFailed,
+ queryTooltip,
+#endif
hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 430
+import Graphics.UI.Gtk.General.DNDTypes (Atom(..))
+{#import System.Glib.GValue#}
hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 440
+ ,Rectangle
hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 545
+-- | Creates the GDK (windowing system) resources associated with a widget. For example, widget->window
+-- will be created when a widget is realized. Normally realization happens implicitly; if you show a
+-- widget and all its parent containers, then the widget will be realized and mapped automatically.
+-- [_$_]
+-- Realizing a widget requires all the widget's parent widgets to be realized; calling
+-- 'widgetRealize' realizes the widget's parents in addition to widget itself. If a widget is not
+-- yet inside a toplevel window when you realize it, bad things will happen.
+-- [_$_]
+-- This function is primarily used in widget implementations, and isn't very useful otherwise. Many
+-- times when you think you might need it, a better approach is to connect to a signal that will be
+-- called after the widget is realized automatically, such as 'expose'-event. Or simply
+-- 'signalConnect' to the 'realize' signal.
+widgetRealize :: WidgetClass self => self -> IO ()
+widgetRealize self =
+ {#call widget_realize #} (toWidget self)
+
hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 975
+-- | Gets the visual that will be used to render widget.
+widgetGetVisual :: WidgetClass self => self [_$_]
+ -> IO Visual
+widgetGetVisual self =
+ makeNewGObject mkVisual $ {# call widget_get_visual #} (toWidget self) [_$_]
+
+-- | Obtains the visual of the default colormap. Not really useful; used to be
+-- useful before 'colormapGetVisual' existed.
+--
+widgetGetDefaultVisual ::
+ IO Visual -- ^ returns visual of the default colormap
+widgetGetDefaultVisual =
+ makeNewGObject mkVisual $
+ {# call gtk_widget_get_default_visual #}
+
+#if GTK_CHECK_VERSION(2,12,0)
+-- | Sets the cursor color to use in a widget, overriding the "cursor-color" and "secondary-cursor-color"
+-- style properties. All other style values are left untouched. See also 'widgetModifyStyle'.
+--
+-- * Available since Gtk+ version 2.12
+--
+widgetModifyCursor :: WidgetClass self => self
+ -> Color -- ^ @primary@ - the color to use for primary cursor (does not need
+ -- to be allocated)
+ -> Color -- ^ @secondary@ - the color to use for secondary cursor (does not
+ -- need to be allocated)
+ -> IO ()
+widgetModifyCursor self primary secondary =
+ with secondary $ \secondaryPtr ->
+ with primary $ \primaryPtr ->
+ {# call gtk_widget_modify_cursor #}
+ (toWidget self)
+ (castPtr primaryPtr)
+ (castPtr secondaryPtr)
+
+-- | Notifies the user about an input-related error on this widget. If the 'gtkErrorBell' setting is
+-- 'True', it calls 'windowBeep', otherwise it does nothing.
+-- [_$_]
+-- Note that the effect of 'windowBeep' can be configured in many ways, depending on the windowing
+-- backend and the desktop environment or window manager that is used.
+-- [_$_]
+widgetErrorBell :: WidgetClass self => self -> IO ()
+widgetErrorBell self =
+ {# call gtk_widget_error_bell #}
+ (toWidget self)
+
+-- | This function should be called whenever keyboard navigation within a single widget hits a
+-- boundary. The function emits the 'keynavFailed' signal on the widget and its return value should be
+-- interpreted in a way similar to the return value of 'widgetChildFocus':
+-- [_$_]
+-- When 'True' is returned, stay in the widget, the failed keyboard navigation is Ok and/or there is
+-- nowhere we can/should move the focus to.
+-- [_$_]
+-- When 'False' is returned, the caller should continue with keyboard navigation outside the widget,
+-- e.g. by calling 'widgetChildFocus' on the widget's toplevel.
+-- [_$_]
+-- The default 'keynavFailed' handler returns 'True' for ''DirTabForward'' and
+-- ''DirTabBackward''. For the other values of 'DirectionType', it looks at the
+-- 'gtkKeynavCursorOnly' setting and returns 'False' if the setting is 'True'. This way the entire user
+-- interface becomes cursor-navigatable on input devices such as mobile phones which only have cursor
+-- keys but no tab key.
+-- [_$_]
+-- Whenever the default handler returns 'True', it also calls 'widgetErrorBell' to notify the user
+-- of the failed keyboard navigation.
+-- [_$_]
+-- A use case for providing an own implementation of 'keynavFailed' (either by connecting to it or by
+-- overriding it) would be a row of 'Entry' widgets where the user should be able to navigate the
+-- entire row with the cursor keys, as e.g. known from user interfaces that require entering license
+-- keys.
+-- [_$_]
+widgetKeynavFailed :: WidgetClass self => self
+ -> DirectionType -- ^ @direction@ - direction of focus movement
+ -> IO Bool -- ^ returns @True@ if stopping keyboard navigation is fine,
+ -- @False@ if the emitting widget should try to handle the
+ -- keyboard navigation attempt in its parent container(s).
+widgetKeynavFailed self direction =
+ liftM toBool $
+ {# call gtk_widget_keynav_failed #}
+ (toWidget self)
+ ((fromIntegral . fromEnum) direction)
+
+-- | Returns the 'Window' of the current tooltip. This can be the 'Window' created by default, or the
+-- custom tooltip window set using 'widgetSetTooltipWindow'.
+-- [_$_]
+widgetGetTooltipWindow :: WidgetClass self => self
+ -> IO Window -- ^ returns The 'Window' of the current tooltip.
+widgetGetTooltipWindow self =
+ makeNewObject mkWindow $
+ {# call gtk_widget_get_tooltip_window #}
+ (toWidget self)
+
+-- | Replaces the default, usually yellow, window used for displaying tooltips with @customWindow@. GTK+
+-- will take care of showing and hiding @customWindow@ at the right moment, to behave likewise as the
+-- default tooltip window. If @customWindow@ is 'Nothing', the default tooltip window will be used.
+-- [_$_]
+-- If the custom window should have the default theming it needs to have the name 'gtkTooltip', see
+-- 'widgetSetName'.
+-- [_$_]
+widgetSetTooltipWindow :: (WidgetClass self, WindowClass customWindow) => self
+ -> Maybe customWindow -- ^ @customWindow@ - a 'Window
+ -> IO ()
+widgetSetTooltipWindow self customWindow =
+ {# call gtk_widget_set_tooltip_window #}
+ (toWidget self)
+ $ case customWindow of
+ Just win -> toWindow win
+ Nothing -> Window nullForeignPtr
+
+-- | Triggers a tooltip query on the display where the toplevel of @widget@ is
+-- located. See 'tooltipTriggerTooltipQuery' for more information.
+--
+-- * Available since Gtk+ version 2.12
+--
+widgetTriggerTooltipQuery :: WidgetClass self => self -> IO ()
+widgetTriggerTooltipQuery self =
+ {# call gtk_widget_trigger_tooltip_query #}
+ (toWidget self)
+
+#endif
+
+#if GTK_CHECK_VERSION(2,14,0)
+-- | Create a GdkPixmap of the contents of the widget and its children.
+-- [_$_]
+-- Works even if the widget is obscured. The depth and visual of the resulting pixmap is dependent on
+-- the widget being snapshot and likely differs from those of a target widget displaying the
+-- pixmap. The function 'pixbufGetFromDrawable' can be used to convert the pixmap to a visual
+-- independant representation.
+-- [_$_]
+-- The snapshot area used by this function is the widget's allocation plus any extra space occupied by
+-- additional windows belonging to this widget (such as the arrows of a spin button). Thus, the
+-- resulting snapshot pixmap is possibly larger than the allocation.
+-- [_$_]
+-- The resulting pixmap is shrunken to match the specified @clipRect@. The
+-- (x,y) coordinates of @clipRect@ are interpreted widget relative. If width or height of @clipRect@ are
+-- 0 or negative, the width or height of the resulting pixmap will be shrunken by the respective
+-- amount. For instance a @clipRect@ { +5, +5, -10, -10 } will chop off 5 pixels at each side of the
+-- snapshot pixmap. @clipRect@ will contain the exact widget-relative snapshot coordinates
+-- upon return. A @clipRect@ of { -1, -1, 0, 0 } can be used to preserve the auto-grown snapshot area
+-- and use @clipRect@ as a pure output parameter.
+-- [_$_]
+-- The returned pixmap can be 'Nothing', if the resulting @clipArea@ was empty.
+-- [_$_]
+widgetGetSnapshot :: WidgetClass self => self
+ -> Rectangle -- ^ @clipRect@ - [_$_]
+ -> IO (Maybe Pixmap) -- ^ returns 'Pixmap' snapshot of the widget
+widgetGetSnapshot self clipRect =
+ with clipRect $ \clipRectPtr -> do
+ pixmapPtr <- {# call gtk_widget_get_snapshot #}
+ (toWidget self)
+ (castPtr clipRectPtr)
+ if pixmapPtr == nullPtr
+ then return Nothing
+ else liftM Just $ makeNewGObject mkPixmap (return pixmapPtr)
+#endif
+
+#if GTK_CHECK_VERSION(2,18,0)
+-- | Determines whether widget has a GdkWindow of its own. See 'widgetSetHasWindow'.
+-- | [_$_]
+widgetGetHasWindow :: WidgetClass self => self
+ -> IO Bool -- ^ returns @True@ if @widget@ has a window, @False@ otherwise
+widgetGetHasWindow self =
+ liftM toBool $
+ {# call gtk_widget_get_has_window #}
+ (toWidget self)
+-- | Returns the widget's effective sensitivity, which means it is sensitive
+-- itself and also its parent widget is sensntive
+--
+-- * Available since Gtk+ version 2.18
+--
+widgetIsSensitive :: WidgetClass self => self
+ -> IO Bool -- ^ returns @True@ if the widget is effectively sensitive
+widgetIsSensitive self =
+ liftM toBool $
+ {# call gtk_widget_is_sensitive #}
+ (toWidget self)
+
+-- | Determines whether the widget is currently grabbing events, so it is the
+-- only widget receiving input events (keyboard and mouse).
+--
+-- See also 'grabAdd'.
+--
+-- * Available since Gtk+ version 2.18
+--
+widgetHasGrab :: WidgetClass self => self
+ -> IO Bool -- ^ returns @True@ if the widget is in the grab_widgets stack
+widgetHasGrab self =
+ liftM toBool $
+ {# call gtk_widget_has_grab #}
+ (toWidget self)
+
+-- | Determines whether @widget@ can be drawn to. A widget can be drawn to if
+-- it is mapped and visible.
+--
+-- * Available since Gtk+ version 2.18
+--
+widgetIsDrawable :: WidgetClass self => self
+ -> IO Bool -- ^ returns @True@ if @widget@ is drawable, @False@ otherwise
+widgetIsDrawable self =
+ liftM toBool $
+ {# call gtk_widget_is_drawable #}
+ (toWidget self)
+-- | Determines whether @widget@ is a toplevel widget. Currently only 'Window'
+-- and 'Invisible' are toplevel widgets. Toplevel widgets have no parent
+-- widget.
+--
+-- * Available since Gtk+ version 2.18
+--
+widgetIsToplevel :: WidgetClass self => self
+ -> IO Bool -- ^ returns @True@ if @widget@ is a toplevel, @False@ otherwise
+widgetIsToplevel self =
+ liftM toBool $
+ {# call gtk_widget_is_toplevel #}
+ (toWidget self)
+
+#endif
+
+-- | Cancels the effect of a previous call to 'widgetPushCompositeChild'.
+--
+widgetPopCompositeChild :: IO ()
+widgetPopCompositeChild =
+ {# call gtk_widget_pop_composite_child #}
+
+-- | Makes all newly-created widgets as composite children until the
+-- corresponding 'widgetPopCompositeChild' call.
+--
+-- A composite child is a child that's an implementation detail of the
+-- container it's inside and should not be visible to people using the
+-- container. Composite children aren't treated differently by Gtk+ (but see
+-- 'containerForeach' vs. 'containerForall'), but e.g. GUI builders might want
+-- to treat them in a different way.
+--
+widgetPushCompositeChild :: IO ()
+widgetPushCompositeChild =
+ {# call gtk_widget_push_composite_child #}
+
+-- | Emits the 'mnemonicActivate' signal.
+-- [_$_]
+-- The default handler for this signal activates the widget if @groupCycling@ is 'False', and just grabs
+-- the focus if @groupCycling@ is 'True'.
+-- [_$_]
+widgetMnemonicActivate :: WidgetClass self => self
+ -> Bool -- ^ @groupCycling@ - @True@ if there are other widgets with the
+ -- same mnemonic
+ -> IO Bool -- ^ returns @True@ if the signal has been handled
+widgetMnemonicActivate self groupCycling =
+ liftM toBool $
+ {# call gtk_widget_mnemonic_activate #}
+ (toWidget self)
+ (fromBool groupCycling)
+
+-- | Gets the value of a style property of @widget@.
+--
+widgetStyleGetProperty :: WidgetClass self => self
+ -> String -- ^ @propertyName@ - the name of a style property
+ -> GValue -- ^ @value@ - location to return the property value
+ -> IO ()
+widgetStyleGetProperty self propertyName value =
+ withUTFString propertyName $ \propertyNamePtr ->
+ {# call gtk_widget_style_get_property #}
+ (toWidget self)
+ propertyNamePtr
+ value
+
+-- | Emits a 'childNotify' signal for the child property @childProperty@ on widget.
+-- [_$_]
+-- This is the analogue of 'objectNotify' for child properties.
+-- [_$_]
+widgetChildNotify :: WidgetClass self => self
+ -> String -- ^ @childProperty@ - the name of a child property installed on
+ -- the class of @widget@'s parent
+ -> IO ()
+widgetChildNotify self childProperty =
+ withUTFString childProperty $ \childPropertyPtr ->
+ {# call gtk_widget_child_notify #}
+ (toWidget self)
+ childPropertyPtr
+
+-- | Stops emission of 'childNotify' signals on widget. The signals are queued until
+-- 'widgetThawChildNotify' is called on widget.
+-- [_$_]
+-- This is the analogue of 'objectFreezeNotify' for child properties.
+-- [_$_]
+widgetFreezeChildNotify :: WidgetClass self => self -> IO ()
+widgetFreezeChildNotify self =
+ {# call gtk_widget_freeze_child_notify #}
+ (toWidget self)
+
hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 1385
+-- | Utility function; intended to be connected to the "delete-event" signal on a GtkWindow. The function
+-- calls 'widgetHide' on its argument, then returns 'True'. If connected to 'delete-event', the
+-- result is that clicking the close button for a window (on the window frame, top right corner
+-- usually) will hide but not destroy the window. By default, GTK+ destroys windows when 'delete-event'
+-- is received.
+widgetHideOnDelete :: [_$_]
+ WidgetClass self => self [_$_]
+ -> IO Bool
+widgetHideOnDelete self = [_$_]
+ liftM toBool $
+ {# call widget_hide_on_delete #} (toWidget self)
+
hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 1415
- {# call gtk_widget_ensure_style #} (toWidget widget)
hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 1417
+-- | Ensures that widget has a style (widget->style). Not a very useful function; most of the time, if
+-- you want the style, the widget is realized, and realized widgets are guaranteed to have a style
+-- already.
+widgetEnsureStyle :: WidgetClass self => self -> IO ()
+widgetEnsureStyle self = {# call widget_ensure_style #} (toWidget self)
+
hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 2123
+-- | Returns the clipboard object for the given selection to be used with widget. widget must have a
+-- GdkDisplay associated with it, so must be attached to a toplevel window.
+-- [_$_]
+-- widgetGetClipboard :: WidgetClass self => self
+-- -> Atom -- ^ @selection@ - a {GdkAtom, FIXME: struct type} which
+-- -- identifies the clipboard to use. @GDK_SELECTION_CLIPBOARD@
+-- -- gives the default clipboard. Another common value is
+-- -- @GDK_SELECTION_PRIMARY@, which gives the primary X
+-- -- selection.
+-- -> IO Clipboard -- ^ returns the appropriate clipboard object. If no
+-- -- clipboard already exists, a new one will be created. Once a
+-- -- clipboard object has been created, it is persistent for all
+-- -- time.
+-- widgetGetClipboard self selection =
+-- makeNewGObject mkClipboard $
+-- with selection $ \selectionPtr ->
+-- {# call gtk_widget_get_clipboard #}
+-- (toWidget self)
+-- (castPtr selectionPtr) -- need write Stroable isntance for GdkAtom
+
+-- | Reverts the effect of a previous call to 'widgetFreezeChildNotify'. This causes all queued
+-- 'childNotify' signals on widget to be emitted.
+-- [_$_]
+widgetThawChildNotify :: WidgetClass self => self -> IO ()
+widgetThawChildNotify self =
+ {# call gtk_widget_thaw_child_notify #}
+ (toWidget self)
+
hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 2633
+-- | Sets the text of tooltip to be the given string, which is marked up with the Pango text markup
+-- language. Also see 'tooltipSetMarkup' .
+-- [_$_]
+-- This is a convenience property which will take care of getting the tooltip shown if the given string
+-- is not NULL: 'hasTooltip' will automatically be set to 'True' and there will be taken care of
+-- 'queryTooltip' in the default signal handler.
+-- [_$_]
+widgetTooltipMark :: WidgetClass self => Attr self (Maybe String)
+widgetTooltipMark = newAttrFromMaybeStringProperty "tooltip-markup"
+
+-- | Sets the text of tooltip to be the given string.
+-- [_$_]
+-- Also see 'tooltipSetText'.
+-- [_$_]
+-- This is a convenience property which will take care of getting the tooltip shown if the given string
+-- is not 'Nothing': 'hasTooltip' will automatically be set to 'True' and there will be taken care of
+-- 'queryTooltip' in the default signal handler.
+-- [_$_]
+widgetTooltipText :: WidgetClass self => Attr self (Maybe String)
+widgetTooltipText = newAttrFromMaybeStringProperty "tooltip-textup"
+
+-- | Enables or disables the emission of 'queryTooltip' on widget. A value of 'True' indicates that widget
+-- can have a tooltip, in this case the widget will be queried using 'queryTooltip' to determine
+-- whether it will provide a tooltip or not.
+-- [_$_]
+-- Note that setting this property to 'True' for the first time will change the event masks of the
+-- GdkWindows of this widget to include leave-notify and motion-notify events. This cannot and will not
+-- be undone when the property is set to 'False' again.
+-- [_$_]
+widgetHasTooltip :: WidgetClass self => Attr self Bool
+widgetHasTooltip = newAttrFromBoolProperty "has-tooltip"
+
+-- | Whether or not the widget is double buffered.
+-- | [_$_]
+widgetDoubleBuffered :: WidgetClass self => Attr self Bool
+widgetDoubleBuffered = newAttrFromBoolProperty "double-buffered"
+
hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 2822
+-- | The 'compositedChanged' signal is emitted when the composited status of widgets screen changes. See
+-- 'screenIsComposited'.
+-- [_$_]
+compositedChanged :: WidgetClass self => Signal self (IO ())
+compositedChanged = Signal (connect_NONE__NONE "composited-changed")
+
+-- |
+grabFocus :: WidgetClass self => Signal self (IO ())
+grabFocus = Signal (connect_NONE__NONE "grab-focus")
+
+-- | [_$_]
+mnemonicActivate :: WidgetClass self => Signal self (Bool -> IO Bool)
+mnemonicActivate = Signal (connect_BOOL__BOOL "mnemonic-activate")
+
+-- | [_$_]
+widgetMoveFocus :: WidgetClass self => Signal self (DirectionType -> IO ())
+widgetMoveFocus = Signal (connect_ENUM__NONE "move-focus")
+
+#if GTK_CHECK_VERSION(2,12,0)
+-- | Gets emitted if keyboard navigation fails. See 'widgetKeynavFailed' for
+-- details.
+--
+-- * Available since Gtk+ version 2.12
+--
+keynavFailed :: WidgetClass self => Signal self (DirectionType -> IO Bool)
+keynavFailed = Signal (connect_ENUM__BOOL "keynav-failed")
+
+-- | Emitted when 'hasTooltip' is 'True' and the 'gtkTooltipTimeout' has expired with the cursor
+-- hovering "above" widget; or emitted when widget got focus in keyboard mode.
+-- [_$_]
+-- Using the given coordinates, the signal handler should determine whether a tooltip should be shown
+-- for widget. If this is the case 'True' should be returned, 'False' otherwise. Note that if @keyboardMode@
+-- is 'True', the values of x and y are undefined and should not be used.
+-- [_$_]
+-- The signal handler is free to manipulate tooltip with the therefore destined function calls.
+-- [_$_]
+-- * Available since Gtk+ version 2.12
+--
+queryTooltip :: WidgetClass self => Signal self (Int -> Int -> Bool -> Tooltips -> IO Bool)
+queryTooltip = Signal (connect_INT_INT_BOOL_OBJECT__BOOL "query-tooltip")
+#endif
+
+#if GTK_CHECK_VERSION(2,14,0)
+-- | Emitted when a redirected window belonging to @widget@ gets drawn into.
+-- The region\/area members of the event shows what area of the redirected
+-- drawable was drawn into.
+--
+-- * Available since Gtk+ version 2.14
+--
+damageEvent :: WidgetClass self => Signal self (EventM EAny Bool)
+damageEvent = Signal (eventM "damage-event" [])
+#endif
+ [_$_]
hunk ./tools/callbackGen/gtkmarshal.list 151
+# for widget
+BOOLEAN:INT,INT,BOOLEAN,OBJECT
|
|
From: Andy S. <And...@co...> - 2010-03-20 16:34:27
|
Sat Mar 20 12:33:35 EDT 2010 Andy Stewart <laz...@gm...>
* Add TODO list for update All Gtk+ API to 2.18.3, please read ./ApiUpdateTodoList.txt file for details.
Ignore-this: 524d1218aebd21d836d998e1e625b3e
addfile ./ApiUpdateTodoList.txt
hunk ./ApiUpdateTodoList.txt 1
+-- | Below is TODO List that Update all Gtk+ API to 2.18.3
+--
+-- This file will remove after udpate all API complete.
+-- Before that, we will convert tag `TODO` to tag `FINISH`
+-- when we finish update work with some module.
+--
+-- This TODO list is share list for gtk2hs developer (or anyone want to contribute)
+-- So please make sure convert `FINISH` tag here to avoid duplicate work.
+--
+-- For udpate new module, just unpack http://www.di.ens.fr/~simona/gtk-modules.tgz
+-- Then do `diff` with same module in current version, then merge it. That's all.
+-- Welcome help!
+-- [_$_]
+-- -- Andy Stewart
+--
+
+** TODO Directory: gtk-modules
+*** TODO Accel.chs
+*** TODO Accelerator.chs
+*** TODO AccelGroup.chs
+*** TODO AccelMap.chs
+*** TODO Accessible.chs
+*** TODO Activatable.chs
+*** TODO AppLaunchContext.chs
+*** TODO Assistant.chs
+*** TODO Bindings.chs
+*** TODO Bitmap.chs
+*** TODO Border.chs
+*** TODO Buildable.chs
+*** TODO Builder.chs
+*** TODO CellEditable.chs
+*** TODO CellRendererAccel.chs
+*** TODO CellRendererSpin.chs
+*** TODO Char.chs
+*** TODO CList.chs
+*** TODO Color.chs
+*** TODO Colormap.chs
+*** TODO Colors.chs
+*** TODO CTree.chs
+*** TODO Cursor.chs
+*** TODO Curve.chs
+*** TODO CustomPaperUnixDialog.chs
+*** TODO Device.chs
+*** TODO Display.chs
+*** TODO Display.chs.pp
+*** TODO DisplayManager.chs
+*** TODO DragContext.chs
+*** TODO Drawable.chs
+*** TODO Draw.chs
+*** TODO Drop.chs
+*** TODO EntryBuffer.chs
+*** TODO Error.chs
+*** TODO Event.chs
+*** TODO FileChooserEmbed.chs
+*** TODO Font.chs
+*** TODO Fontset.chs
+*** TODO GammaCurve.chs
+*** TODO Gc.chs
+*** TODO GC.chs
+*** TODO Global.chs
+*** TODO Grab.chs
+*** TODO HRuler.chs
+*** TODO HSV.chs
+*** TODO Icon.chs
+*** TODO IconInfo.chs
+*** TODO IconSet.chs
+*** TODO IconSource.chs
+*** TODO IconTheme.chs
+*** TODO Idle.chs
+*** TODO IMContextSimple.chs
+*** TODO InfoBar.chs
+*** TODO Init.chs
+*** TODO Input.chs
+*** TODO InputDialog.chs
+*** TODO Invisible.chs
+*** TODO Item.chs
+*** TODO ItemFactory.chs
+*** TODO Keyboard.chs
+*** TODO Key.chs
+*** TODO Keymap.chs
+*** TODO Keyval.chs
+*** TODO LinkButton.chs
+*** TODO List.chs
+*** TODO ListItem.chs
+*** TODO Main.chs
+*** TODO MountOperation.chs
+*** TODO Notify.chs
+*** TODO Offscreen.chs
+*** TODO OldEditable.chs
+*** TODO Orientable.chs
+*** TODO PageSetup.chs
+*** TODO PageSetupUnixDialog.chs
+*** TODO Pango.chs
+*** TODO PangoRenderer.chs
+*** TODO PaperSize.chs
+*** TODO PixbufAniAnim.chs
+*** TODO PixbufAniAnimIter.chs
+*** TODO PixbufAnimation.chs
+*** TODO PixbufAnimationIter.chs
+*** TODO Pixbuf.chs
+*** TODO PixbufGdipAnim.chs
+*** TODO PixbufGdipAnimIter.chs
+*** TODO PixbufGifAnim.chs
+*** TODO PixbufGifAnimIter.chs
+*** TODO PixbufLoader.chs
+*** TODO PixbufSimpleAnim.chs
+*** TODO Pixmap.chs
+*** TODO Pointer.chs
+*** TODO Preview.chs
+*** TODO PrintBackend.chs
+*** TODO Print.chs
+*** TODO PrintContext.chs
+*** TODO Printer.chs
+*** TODO PrinterOption.chs
+*** TODO PrinterOptionSet.chs
+*** TODO PrinterOptionWidget.chs
+*** TODO PrintJob.chs
+*** TODO PrintOperation.chs
+*** TODO PrintOperationPreview.chs
+*** TODO PrintSettings.chs
+*** TODO PrintUnixDialog.chs
+*** TODO Progress.chs
+*** TODO Property.chs
+*** TODO Query.chs
+*** TODO Quit.chs
+*** TODO Rc.chs
+*** TODO RcStyle.chs
+*** TODO RecentAction.chs
+*** TODO RecentChooser.chs
+*** TODO RecentChooserDefault.chs
+*** TODO RecentChooserDialog.chs
+*** TODO RecentChooserMenu.chs
+*** TODO RecentChooserWidget.chs
+*** TODO RecentFilter.chs
+*** TODO RecentInfo.chs
+*** TODO RecentManager.chs
+*** TODO Rectangle.chs
+*** TODO Requisition.chs
+*** TODO Rgb.chs
+*** TODO Ruler.chs
+*** TODO ScaleButton.chs
+*** TODO Screen.chs
+*** TODO SearchEngineBeagle.chs
+*** TODO SearchEngine.chs
+*** TODO SearchEngineQuartz.chs
+*** TODO SearchEngineSimple.chs
+*** TODO SearchEngineTracker.chs
+*** TODO SelectionData.chs
+*** TODO Settings.chs
+*** TODO Signal.chs
+*** TODO Spawn.chs
+*** TODO Stock.chs
+*** TODO Target.chs
+*** TODO TargetList.chs
+*** TODO Targets.chs
+*** TODO TextAttributes.chs
+*** TODO TextChildAnchor.chs
+*** TODO Text.chs
+*** TODO Threads.chs
+*** TODO Timeout.chs
+*** TODO TipsQuery.chs
+*** TODO ToolShell.chs
+*** TODO Tooltip.chs
+*** TODO TrayIcon.chs
+*** TODO Tree.chs
+*** TODO TreeDragDest.chs
+*** TODO TreeDragSource.chs
+*** TODO TreeModelFilter.chs
+*** TODO Type.chs
+*** TODO Visual.chs
+*** TODO VolumeButton.chs
+*** TODO VRuler.chs
+*** TODO Win32EmbedWidget.chs
+*** TODO WindowImpl.chs
+
+** TODO Directory: gtk-modules/Graphics/UI/Gtk
+*** TODO Cairo.chs.pp
+
+** TODO Directory: gtk-modules/Graphics/UI/Gtk/Abstract
+*** TODO Bin.chs
+*** TODO Box.chs
+*** TODO ButtonBox.chs.pp
+*** TODO Container.chs.pp
+*** TODO IMContext.chs.pp
+*** TODO Misc.chs
+*** TODO Object.chs.pp
+*** TODO Paned.chs.pp
+*** TODO Range.chs.pp
+*** TODO Scale.chs
+*** TODO Scrollbar.hs
+*** TODO Separator.hs
+*** TODO Widget.chs.pp
+
+** TODO Directory: gtk-modules/Graphics/UI/Gtk/ActionMenuToolbar
+*** TODO Action.chs.pp
+*** TODO ActionGroup.chs.pp
+*** TODO RadioAction.chs.pp
+*** TODO ToggleAction.chs.pp
+*** TODO UIManager.chs.pp
+
+** TODO Directory: gtk-modules/Graphics/UI/Gtk/Buttons
+*** TODO Button.chs.pp
+*** TODO CheckButton.chs
+*** TODO RadioButton.chs.pp
+*** TODO ToggleButton.chs
+
+** TODO Directory: gtk-modules/Graphics/UI/Gtk/Display
+*** TODO AccelLabel.chs
+*** TODO Image.chs.pp
+*** TODO Label.chs.pp
+*** TODO ProgressBar.chs.pp
+*** TODO Statusbar.chs
+*** TODO StatusIcon.chs.pp
+
+** TODO Directory: gtk-modules/Graphics/UI/Gtk/Embedding
+*** TODO Plug.chs.pp
+*** TODO Socket.chs.pp
+
+** TODO Directory: gtk-modules/Graphics/UI/Gtk/Entry
+*** TODO Editable.chs.pp
+*** TODO Entry.chs.pp
+*** TODO EntryCompletion.chs.pp
+*** TODO HScale.chs
+*** TODO SpinButton.chs
+*** TODO VScale.chs
+
+** TODO Directory: gtk-modules/Graphics/UI/Gtk/General
+*** TODO Clipboard.chs.pp
+*** TODO Drag.chs.pp
+*** TODO IconFactory.chs.pp
+*** TODO Selection.chs.pp
+*** TODO Style.chs
+
+** TODO Directory: gtk-modules/Graphics/UI/Gtk/Layout
+*** TODO Alignment.chs.pp
+*** TODO AspectFrame.chs
+*** TODO Expander.chs.pp
+*** TODO Fixed.chs
+*** TODO HBox.chs
+*** TODO HButtonBox.chs
+*** TODO HPaned.chs
+*** TODO Layout.chs
+*** TODO Notebook.chs.pp
+*** TODO Table.chs
+*** TODO VBox.chs
+*** TODO VButtonBox.chs
+*** TODO VPaned.chs
+
+** TODO Directory: gtk-modules/Graphics/UI/Gtk/MenuComboToolbar
+*** TODO CheckMenuItem.chs.pp
+*** TODO ComboBox.chs.pp
+*** TODO ComboBoxEntry.chs.pp
+*** TODO Combo.chs.pp
+*** TODO ImageMenuItem.chs
+*** TODO MenuBar.chs.pp
+*** TODO Menu.chs.pp
+*** TODO MenuItem.chs
+*** TODO MenuShell.chs.pp
+*** TODO MenuToolButton.chs.pp
+*** TODO OptionMenu.chs.pp
+*** TODO RadioMenuItem.chs
+*** TODO RadioToolButton.chs.pp
+*** TODO SeparatorMenuItem.chs.pp
+*** TODO SeparatorToolItem.chs.pp
+*** TODO TearoffMenuItem.chs
+*** TODO ToggleToolButton.chs.pp
+*** TODO Toolbar.chs.pp
+*** TODO ToolButton.chs.pp
+*** TODO ToolItem.chs.pp
+
+** TODO Directory: gtk-modules/Graphics/UI/Gtk/Misc
+*** TODO Adjustment.chs.pp
+*** TODO Arrow.chs
+*** TODO Calendar.chs.pp
+*** TODO DrawingArea.chs
+*** TODO EventBox.chs.pp
+*** TODO HandleBox.chs
+*** TODO IMMulticontext.chs.pp
+*** TODO SizeGroup.chs.pp
+*** TODO Tooltips.chs.pp
+*** TODO Viewport.chs
+
+** TODO Directory: gtk-modules/Graphics/UI/Gtk/ModelView
+*** TODO CellLayout.chs.pp
+*** TODO CellRendererCombo.chs.pp
+*** TODO CellRendererProgress.chs.pp
+*** TODO TreeSortable.chs.pp
+
+** TODO Directory: gtk-modules/Graphics/UI/Gtk/Multiline
+*** TODO TextBuffer.chs.pp
+*** TODO TextIter.chs.pp
+*** TODO TextMark.chs
+*** TODO TextTag.chs.pp
+*** TODO TextTagTable.chs
+*** TODO TextView.chs.pp
+
+** TODO Directory: gtk-modules/Graphics/UI/Gtk/Ornaments
+*** TODO Frame.chs
+*** TODO HSeparator.chs
+*** TODO VSeparator.chs
+
+** TODO Directory: gtk-modules/Graphics/UI/Gtk/Scrolling
+*** TODO HScrollbar.chs
+*** TODO ScrolledWindow.chs.pp
+*** TODO VScrollbar.chs
+
+** TODO Directory: gtk-modules/Graphics/UI/Gtk/Selectors
+*** TODO ColorButton.chs.pp
+*** TODO ColorSelection.chs
+*** TODO ColorSelectionDialog.chs
+*** TODO FileChooserButton.chs.pp
+*** TODO FileChooser.chs.pp
+*** TODO FileChooserDialog.chs.pp
+*** TODO FileChooserWidget.chs.pp
+*** TODO FileFilter.chs.pp
+*** TODO FileSelection.chs.pp
+*** TODO FontButton.chs.pp
+*** TODO FontSelection.chs
+*** TODO FontSelectionDialog.chs
+
+** TODO Directory: gtk-modules/Graphics/UI/Gtk/TreeList
+*** TODO CellRenderer.hs
+*** TODO CellRendererPixbuf.chs
+*** TODO CellRendererText.chs
+*** TODO CellRendererToggle.chs
+*** TODO CellView.chs.pp
+*** TODO IconView.chs.pp
+*** TODO ListStore.chs.pp
+*** TODO TreeIter.chs.pp
+*** TODO TreeModel.chs.pp
+*** TODO TreeModelSort.chs.pp
+*** TODO TreePath.chs.pp
+*** TODO TreeRowReference.chs.pp
+*** TODO TreeSelection.chs.pp
+*** TODO TreeStore.chs.pp
+*** TODO TreeView.chs.pp
+*** TODO TreeViewColumn.chs.pp
+
+** TODO Directory: gtk-modules/Graphics/UI/Gtk/Windows
+*** TODO AboutDialog.chs.pp
+*** TODO Dialog.chs.pp
+*** TODO MessageDialog.chs.pp
+*** TODO Window.chs.pp
+*** TODO WindowGroup.chs
|
|
From: Andy S. <And...@co...> - 2010-03-20 15:18:38
|
Sat Mar 20 11:17:26 EDT 2010 Andy Stewart <laz...@gm...>
* Add WebKit demo.
Ignore-this: cddf99434ea4b04a41e1f13c3b91d177
adddir ./demo/webkit
addfile ./demo/webkit/Makefile
hunk ./demo/webkit/Makefile 1
+
+PROGS = webkit
+SOURCES = Webkit.hs
+
+all : $(PROGS)
+
+webkit : Webkit.hs
+ $(HC) --make $< -o $@ $(HCFLAGS)
+
+clean:
+ rm -f $(SOURCES:.hs=.hi) $(SOURCES:.hs=.o) $(PROGS)
+
+HC=ghc
addfile ./demo/webkit/Webkit.hs
hunk ./demo/webkit/Webkit.hs 1
+-- | WebKit browser demo.
+-- Author : Andy Stewart
+-- Copyright : (c) 2010 Andy Stewart <laz...@gm...>
+
+-- | This simple browser base on WebKit API.
+-- For simple, i just make all link open in current window.
+-- Of course, you can integrate signal `createWebView` with `notebook`
+-- to build multi-tab browser.
+--
+-- You can click right-button for forward or backward page.
+--
+-- Usage:
+-- webkit [uri]
+--
+module Main where
+
+import Graphics.UI.Gtk
+import Graphics.UI.Gtk.General.Structs
+import Graphics.UI.Gtk.WebKit.WebView
+import Graphics.UI.Gtk.WebKit.WebFrame
+
+import System.Process
+import System.Environment [_$_]
+
+-- | Main entry.
+main :: IO ()
+main = do
+ -- Get program arguments.
+ args <- getArgs
+ case args of
+ -- Display help
+ ["--help"] -> do
+ putStrLn $ "Welcome to Gtk2hs WebKit demo. :)\n\n" ++ [_$_]
+ "Usage: webkit [uri]\n\n" ++
+ " -- Gtk2hs Team"
+ -- Start program.
+ [arg] -> browser arg -- entry user input url
+ _ -> browser "http://www.google.com" -- entry default url
+
+-- | Internal browser fucntion.
+browser :: String -> IO ()
+browser url = do
+ -- Init.
+ initGUI
+ [_$_]
+ -- Create window.
+ window <- windowNew
+ windowSetDefaultSize window 900 600
+ windowSetPosition window WinPosCenter
+ windowSetOpacity window 0.8 -- this function need window-manager support Alpha channel in X11
+
+ -- Create WebKit view.
+ webView <- webViewNew
+ [_$_]
+ -- Create window box.
+ winBox <- vBoxNew False 0
+ [_$_]
+ -- Create address bar.
+ addressBar <- entryNew
+
+ -- Create scroll window.
+ scrollWin <- scrolledWindowNew Nothing Nothing
+
+ -- Load uri.
+ webViewLoadUri webView url
+ entrySetText addressBar url
+
+ -- Open uri when user press `return` at address bar.
+ onEntryActivate addressBar $ do
+ uri <- entryGetText addressBar -- get uri from address bar
+ webViewLoadUri webView uri -- load new uri
+
+ -- Add current uri to address bar when load start.
+ webView `on` loadStarted $ \frame -> do
+ currentUri <- webFrameGetUri frame
+ case currentUri of
+ Just uri -> entrySetText addressBar uri
+ Nothing -> return ()
+
+ -- Open all link in current window.
+ webView `on` createWebView $ \frame -> do
+ newUri <- webFrameGetUri frame
+ case newUri of
+ Just uri -> webViewLoadUri webView uri
+ Nothing -> return ()
+ return webView
+
+ -- Connect and show.
+ boxPackStart winBox addressBar PackNatural 0
+ boxPackStart winBox scrollWin PackGrow 0
+ window `containerAdd` winBox
+ scrollWin `containerAdd` webView
+ window `onDestroy` mainQuit
+ widgetShowAll window
+
+ mainGUI
|
|
From: Andy S. <And...@co...> - 2010-03-20 09:46:42
|
Sat Mar 20 05:44:34 EDT 2010 Andy Stewart <laz...@gm...>
* Oooops, i forgot "darcs add ..." before "darcs push", add misssing WebKit modules, sorry!
Ignore-this: 4f7074dba2d5ffd67926bd20434032d9
addfile ./webkit/Graphics/UI/Gtk/WebKit/HitTestResult.chs.pp
hunk ./webkit/Graphics/UI/Gtk/WebKit/HitTestResult.chs.pp 1
+-- -*-haskell-*-
+-----------------------------------------------------------------------------
+-- Module : Graphics.UI.Gtk.WebKit.HitTestResult
+-- Author : Andy Stewart
+-- Copyright : (c) 2010 Andy Stewart <laz...@gm...>
+--
+-- 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 : gtk...@li...
+-- Stability : provisional
+-- Portability : portable (depends on GHC)
+--
+-- Access to the WebKit Web Resource
+-----------------------------------------------------------------------------
+
+module Graphics.UI.Gtk.WebKit.HitTestResult (
+-- * Types
+ HitTestResult,
+
+-- * Enums.
+ HitTestResultContext(..),
+) where
+
+import System.Glib.FFI
+import System.Glib.GList
+import System.Glib.GError [_$_]
+import Graphics.UI.Gtk.Gdk.Events
+
+{#import Graphics.UI.Gtk.Abstract.Object#} (makeNewObject)
+{#import Graphics.UI.Gtk.Signals#}
+{#import Graphics.UI.Gtk.WebKit.Types#}
+{#import System.Glib.GObject#}
+
+{#context lib="webkit" prefix ="webkit"#}
+
+-- * Enums.
+
+{#enum HitTestResultContext {underscoreToCase}#}
addfile ./webkit/Graphics/UI/Gtk/WebKit/Internal.chs.pp
hunk ./webkit/Graphics/UI/Gtk/WebKit/Internal.chs.pp 1
+-- -*-haskell-*-
+-----------------------------------------------------------------------------
+-- Module : Graphics.UI.Gtk.WebKit.Internal
+-- Author : Andy Stewart
+-- Copyright : (c) 2010 Andy Stewart <laz...@gm...>
+--
+-- 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 : gtk...@li...
+-- Stability : provisional
+-- Portability : portable (depends on GHC)
+--
+-- Access to the WebKit Internal
+--
+-- This module contain some functions for help binding Webkit.
+--
+-----------------------------------------------------------------------------
+
+module Graphics.UI.Gtk.WebKit.Internal (
+-- * Methods
+-- Below functions just help binding use in internal.
+-- Don't call those functions in your code.
+ connect_OBJECT__OBJECTPTR,
+ webViewToWebViewPtr,
+) where
+
+import System.Glib.FFI
+import System.Glib.GList
+import System.Glib.GError [_$_]
+import Graphics.UI.Gtk.Gdk.Events
+
+{#import Graphics.UI.Gtk.Abstract.Object#} (makeNewObject)
+{#import Graphics.UI.Gtk.Signals#}
+{#import Graphics.UI.Gtk.WebKit.Types#}
+{#import System.Glib.GObject#}
+
+{#context lib="webkit" prefix ="webkit"#}
+
+-- | Signal helper functions.
+connect_OBJECT__OBJECTPTR ::
+ (GObjectClass a', GObjectClass obj) => SignalName ->
+ ConnectAfter -> obj ->
+ (a' -> IO WebView) ->
+ IO (ConnectId obj)
+connect_OBJECT__OBJECTPTR signal after obj user =
+ connectGeneric signal after obj action
+ where action :: Ptr GObject -> Ptr GObject -> IO (Ptr WebView)
+ action _ obj1 =
+ failOnGError $
+ makeNewGObject mkGObject (return obj1) >>= \obj1' ->
+ user (unsafeCastGObject obj1') >>= webViewToWebViewPtr
+
+-- | Internal helper function for convert.
+webViewToWebViewPtr :: WebViewClass self => self -> IO (Ptr WebView)
+webViewToWebViewPtr webview = return $ unsafeForeignPtrToPtr (unWebView (toWebView webview))
addfile ./webkit/Graphics/UI/Gtk/WebKit/SecurityOrigin.chs.pp
hunk ./webkit/Graphics/UI/Gtk/WebKit/SecurityOrigin.chs.pp 1
+-- -*-haskell-*-
+-----------------------------------------------------------------------------
+-- Module : Graphics.UI.Gtk.WebKit.WebSecurityOrigin
+-- Author : Andy Stewart
+-- Copyright : (c) 2010 Andy Stewart <laz...@gm...>
+--
+-- 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 : gtk...@li...
+-- Stability : provisional
+-- Portability : portable (depends on GHC)
+--
+-- Access to the WebKit Web SecurityOrigin
+-----------------------------------------------------------------------------
+
+module Graphics.UI.Gtk.WebKit.SecurityOrigin (
+-- * Types
+ SecurityOrigin,
+
+-- * Methods [_$_]
+ securityOriginGetAllWebDatabases,
+ securityOriginGetHost,
+ securityOriginGetPort,
+ securityOriginGetProtocol,
+ securityOriginGetWebDatabaseQuota,
+ securityOriginSetWebDatabaseQuota,
+ securityOriginGetWebDatabaseUsage,
+) where
+
+import Control.Monad (liftM)
+
+import System.Glib.FFI
+import System.Glib.UTFString
+import System.Glib.GList
+import System.Glib.GError [_$_]
+import Graphics.UI.Gtk.Gdk.Events
+
+{#import Graphics.UI.Gtk.Abstract.Object#} (makeNewObject)
+{#import Graphics.UI.Gtk.Signals#}
+{#import Graphics.UI.Gtk.WebKit.Types#}
+{#import System.Glib.GObject#}
+
+{#context lib="webkit" prefix ="webkit"#}
+
+-- * Methods.
+
+-- | Returns the frame's security origin.
+securityOriginGetAllWebDatabases ::
+ SecurityOriginClass self => self
+ -> IO [WebDatabase] [_$_]
+securityOriginGetAllWebDatabases so = do
+ glist <- {#call security_origin_get_all_web_databases#} (toSecurityOrigin so)
+ databasePtr <- fromGList glist
+ mapM (makeNewGObject mkWebDatabase . return) databasePtr
+
+-- | Returns the hostname for the security origin.
+securityOriginGetHost ::
+ SecurityOriginClass self => self
+ -> IO String
+securityOriginGetHost so =
+ {#call security_origin_get_host#} (toSecurityOrigin so) >>= peekCString
+
+-- | Returns the port for the security origin.
+securityOriginGetPort ::
+ SecurityOriginClass self => self
+ -> IO Int
+securityOriginGetPort so =
+ liftM fromIntegral $ {#call security_origin_get_port#} (toSecurityOrigin so)
+
+-- | Returns the protocol for the security origin.
+securityOriginGetProtocol ::
+ SecurityOriginClass self => self
+ -> IO String
+securityOriginGetProtocol so =
+ {#call security_origin_get_protocol#} (toSecurityOrigin so) >>= peekCString
+
+-- | Returns the quota for Web Database storage of the security origin in bytes.
+securityOriginGetWebDatabaseQuota ::
+ SecurityOriginClass self => self
+ -> IO Int
+securityOriginGetWebDatabaseQuota so =
+ liftM fromIntegral $ {#call security_origin_get_web_database_quota#} (toSecurityOrigin so)
+ [_$_]
+-- | Returns the usage for Web Database storage of the security origin in bytes.
+securityOriginGetWebDatabaseUsage ::
+ SecurityOriginClass self => self
+ -> IO Int
+securityOriginGetWebDatabaseUsage so =
+ liftM fromIntegral $ {#call security_origin_get_web_database_usage#} (toSecurityOrigin so)
+ [_$_]
+-- | Adjust the quota for Web Database storage of the security origin
+securityOriginSetWebDatabaseQuota ::
+ SecurityOriginClass self => self
+ -> Int
+ -> IO ()
+securityOriginSetWebDatabaseQuota so quota =
+ {#call security_origin_set_web_database_quota#} (toSecurityOrigin so) (fromIntegral quota)
+
addfile ./webkit/Graphics/UI/Gtk/WebKit/SoupAuthDialog.chs.pp
hunk ./webkit/Graphics/UI/Gtk/WebKit/SoupAuthDialog.chs.pp 1
+-- -*-haskell-*-
+-----------------------------------------------------------------------------
+-- Module : Graphics.UI.Gtk.WebKit.SoupAuthDialog
+-- Author : Andy Stewart
+-- Copyright : (c) 2010 Andy Stewart <laz...@gm...>
+--
+-- 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 : gtk...@li...
+-- Stability : provisional
+-- Portability : portable (depends on GHC)
+--
+-- Access to the WebKit Web Resource
+-----------------------------------------------------------------------------
+
+module Graphics.UI.Gtk.WebKit.SoupAuthDialog (
+-- * Types
+ SoupAuthDialog,
+) where
+
+import System.Glib.FFI
+import System.Glib.GList
+import System.Glib.GError [_$_]
+import Graphics.UI.Gtk.Gdk.Events
+
+{#import Graphics.UI.Gtk.Abstract.Object#} (makeNewObject)
+{#import Graphics.UI.Gtk.Signals#}
+{#import Graphics.UI.Gtk.WebKit.Types#}
+{#import System.Glib.GObject#}
+
+{#context lib="webkit" prefix ="webkit"#}
addfile ./webkit/Graphics/UI/Gtk/WebKit/WebDataSource.chs.pp
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebDataSource.chs.pp 1
+-- -*-haskell-*-
+-----------------------------------------------------------------------------
+-- Module : Graphics.UI.Gtk.WebKit.WebDataSource
+-- Author : Andy Stewart
+-- Copyright : (c) 2010 Andy Stewart <laz...@gm...>
+--
+-- 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 : gtk...@li...
+-- Stability : provisional
+-- Portability : portable (depends on GHC)
+--
+-- Note
+--
+-- Function `webkit_web_data_source_get_data` haven't binding, [_$_]
+-- no idea how to handle `GString`
+--
+-- Access to the WebKit Web DataSource
+-----------------------------------------------------------------------------
+
+module Graphics.UI.Gtk.WebKit.WebDataSource (
+-- * Types
+ WebDataSource,
+
+-- * Constructors
+ webDataSourceNew,
+
+-- * Methods [_$_]
+ webDataSourceGetEncoding,
+ webDataSourceGetInitialRequest,
+ webDataSourceGetMainResource,
+ webDataSourceGetRequest,
+ webDataSourceGetSubresources,
+ webDataSourceGetUnreachableUri,
+ webDataSourceGetWebFrame,
+ webDataSourceIsLoading,
+) where
+
+import Control.Monad (liftM)
+
+import System.Glib.FFI
+import System.Glib.UTFString
+import System.Glib.GList
+import System.Glib.GError [_$_]
+import Graphics.UI.Gtk.Gdk.Events
+
+{#import Graphics.UI.Gtk.Abstract.Object#} (makeNewObject)
+{#import Graphics.UI.Gtk.Signals#}
+{#import Graphics.UI.Gtk.WebKit.Types#}
+{#import System.Glib.GObject#}
+
+{#context lib="webkit" prefix ="webkit"#}
+
+-- | Creates a new 'WebDataSource' instance. [_$_]
+-- The URL of the 'WebDataSource' will be set to "about:blank".
+webDataSourceNew :: IO WebDataSource
+webDataSourceNew = [_$_]
+ constructNewGObject mkWebDataSource $ {#call web_data_source_new#} [_$_]
+
+-- | Returns the text encoding name as set in the 'WebView', or if not, the text encoding of the response.
+webDataSourceGetEncoding ::
+ WebDataSourceClass self => self
+ -> IO String
+webDataSourceGetEncoding ds = [_$_]
+ {#call web_data_source_get_encoding#} (toWebDataSource ds) >>= peekCString
+ [_$_]
+-- | Returns a reference to the original request that was used to load the web content. [_$_]
+-- The NetworkRequest returned by this method is the
+-- request prior to the "committed" load state. [_$_]
+-- See 'webDataSourceGetRequest' for getting the "committed" request.
+webDataSourceGetInitialRequest ::
+ WebDataSourceClass self => self
+ -> IO NetworkRequest
+webDataSourceGetInitialRequest ds =
+ makeNewGObject mkNetworkRequest $ {# call web_data_source_get_initial_request#} (toWebDataSource ds)
+
+-- | Returns the main resource of the data_source
+webDataSourceGetMainResource ::
+ WebDataSourceClass self => self
+ -> IO WebResource [_$_]
+webDataSourceGetMainResource ds =
+ makeNewGObject mkWebResource $ {#call web_data_source_get_main_resource#} (toWebDataSource ds)
+ [_$_]
+-- | Returns a NetworkRequest that was used to create this 'WebDataSource'. [_$_]
+-- The NetworkRequest returned by this method is the request that was "committed", [_$_]
+-- and hence, different from the request you get from the 'webDataSourceGetInitialRequest' method.
+webDataSourceGetRequest ::
+ WebDataSourceClass self => self
+ -> IO NetworkRequest
+webDataSourceGetRequest ds =
+ makeNewGObject mkNetworkRequest $ {# call web_data_source_get_request#} (toWebDataSource ds)
+
+-- | Gives you a List of 'WebResource' objects that compose the 'WebView' to which this 'WebDataSource' is attached.
+webDataSourceGetSubresources ::
+ WebDataSourceClass self => self
+ -> IO [WebResource] [_$_]
+webDataSourceGetSubresources ds = do
+ glist <- {#call web_data_source_get_subresources#} (toWebDataSource ds)
+ resourcePtr <- fromGList glist
+ mapM (makeNewGObject mkWebResource . return) resourcePtr
+
+-- | Return the unreachable URI of data_source. [_$_]
+-- The 'dataSource' will have an unreachable URL [_$_]
+-- if it was created using 'WebFrame''s [_$_]
+-- 'webFrameLoadAlternateHtmlString' method.
+webDataSourceGetUnreachableUri ::
+ WebDataSourceClass self => self
+ -> IO String
+webDataSourceGetUnreachableUri ds =
+ {#call web_data_source_get_unreachable_uri#} (toWebDataSource ds) >>= peekCString
+
+-- | Returns the 'WebFrame' that represents this data source
+webDataSourceGetWebFrame ::
+ WebDataSourceClass self => self
+ -> IO WebFrame
+webDataSourceGetWebFrame ds =
+ makeNewGObject mkWebFrame $ {#call web_data_source_get_web_frame#} (toWebDataSource ds)
+
+-- | Determines whether the data source is in the process of loading its content.
+webDataSourceIsLoading ::
+ WebDataSourceClass self => self
+ -> IO Bool
+webDataSourceIsLoading ds =
+ liftM toBool $ {#call web_data_source_is_loading#} (toWebDataSource ds)
addfile ./webkit/Graphics/UI/Gtk/WebKit/WebDatabase.chs.pp
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebDatabase.chs.pp 1
+-- -*-haskell-*-
+-----------------------------------------------------------------------------
+-- Module : Graphics.UI.Gtk.WebKit.WebDatabase
+-- Author : Andy Stewart
+-- Copyright : (c) 2010 Andy Stewart <laz...@gm...>
+--
+-- 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 : gtk...@li...
+-- Stability : provisional
+-- Portability : portable (depends on GHC)
+--
+-- Access to the WebKit Web Database
+-----------------------------------------------------------------------------
+
+module Graphics.UI.Gtk.WebKit.WebDatabase (
+-- * Types
+ WebDatabase,
+
+-- * Methods [_$_]
+ webDatabaseGetDisplayName,
+ webDatabaseGetExpectedSize,
+ webDatabaseGetFilename,
+ webDatabaseGetName,
+ webDatabaseGetSecurityOrigin,
+ webDatabaseGetSize,
+ webDatabaseRemove,
+) where
+
+import Control.Monad (liftM)
+
+import System.Glib.FFI
+import System.Glib.UTFString
+import System.Glib.GList
+import System.Glib.GError [_$_]
+import Graphics.UI.Gtk.Gdk.Events
+
+{#import Graphics.UI.Gtk.Abstract.Object#} (makeNewObject)
+{#import Graphics.UI.Gtk.Signals#}
+{#import Graphics.UI.Gtk.WebKit.Types#}
+{#import System.Glib.GObject#}
+
+{#context lib="webkit" prefix ="webkit"#}
+
+-- | Returns the name of the 'WebDatabase' as seen by the user.
+webDatabaseGetDisplayName ::
+ WebDatabaseClass self => self
+ -> IO String
+webDatabaseGetDisplayName wd =
+ {#call web_database_get_display_name#} (toWebDatabase wd) >>= peekCString
+ [_$_]
+-- | Returns the expected size of the Database in bytes as defined by the web author. The Web Database standard allows web authors to
+-- specify an expected size of the database to optimize the user experience.
+webDatabaseGetExpectedSize :: [_$_]
+ WebDatabaseClass self => self
+ -> IO Int [_$_]
+webDatabaseGetExpectedSize wd =
+ liftM fromIntegral $ {#call web_database_get_expected_size#} (toWebDatabase wd)
+
+-- | Returns the absolute filename to the WebKitWebDatabase file on disk.
+webDatabaseGetFilename ::
+ WebDatabaseClass self => self
+ -> IO String
+webDatabaseGetFilename wd = [_$_]
+ {#call web_database_get_filename#} (toWebDatabase wd) >>= peekCString
+
+-- | Returns the canonical name of the 'WebDatabase'.
+webDatabaseGetName ::
+ WebDatabaseClass self => self
+ -> IO String
+webDatabaseGetName wd = [_$_]
+ {#call web_database_get_name#} (toWebDatabase wd) >>= peekCString
+
+-- | Returns the security origin of the WebKitWebDatabase.
+webDatabaseGetSecurityOrigin :: [_$_]
+ WebDatabaseClass self => self
+ -> IO SecurityOrigin [_$_]
+webDatabaseGetSecurityOrigin wd =
+ makeNewGObject mkSecurityOrigin $ {#call web_database_get_security_origin#} (toWebDatabase wd)
+
+-- | Returns the actual size of the 'WebDatabase' space on disk in bytes. [_$_]
+webDatabaseGetSize ::
+ WebDatabaseClass self => self [_$_]
+ -> IO Int
+webDatabaseGetSize wd = [_$_]
+ liftM fromIntegral $ {#call web_database_get_size#} (toWebDatabase wd)
+ [_$_]
+-- | Removes the 'WebDatabase' from its security origin and destroys all data stored in the database.
+webDatabaseRemove ::
+ WebDatabaseClass self => self
+ -> IO ()
+webDatabaseRemove wd =
+ {#call web_database_remove#} (toWebDatabase wd)
+
addfile ./webkit/Graphics/UI/Gtk/WebKit/WebNavigationAction.chs.pp
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebNavigationAction.chs.pp 1
+-- -*-haskell-*-
+-----------------------------------------------------------------------------
+-- Module : Graphics.UI.Gtk.WebKit.WebNavigationAction
+-- Author : Andy Stewart
+-- Copyright : (c) 2010 Andy Stewart <laz...@gm...>
+--
+-- 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 : gtk...@li...
+-- Stability : provisional
+-- Portability : portable (depends on GHC)
+--
+-- Access to the WebKit NavigationAction
+-----------------------------------------------------------------------------
+
+module Graphics.UI.Gtk.WebKit.WebNavigationAction (
+-- * Types
+ WebNavigationAction,
+
+-- * Enums
+ NavigationReason(..),
+
+-- * Methods [_$_]
+ webNavigationActionGetButton,
+ webNavigationActionGetModifierState,
+ webNavigationActionGetOriginalUri,
+ webNavigationActionSetOriginalUri,
+ webNavigationActionGetReason,
+ webNavigationActionSetReason,
+ webNavigationActionGetTargetFrame,
+) where
+
+import Control.Monad (liftM)
+
+import System.Glib.FFI
+import System.Glib.UTFString
+import System.Glib.GList
+import System.Glib.GError [_$_]
+import Graphics.UI.Gtk.Gdk.Events
+
+{#import Graphics.UI.Gtk.Abstract.Object#} (makeNewObject)
+{#import Graphics.UI.Gtk.Signals#}
+{#import Graphics.UI.Gtk.WebKit.Types#}
+{#import System.Glib.GObject#}
+
+{#context lib="webkit" prefix ="webkit"#}
+
+-- * Enums
+
+{#enum WebNavigationReason as NavigationReason {underscoreToCase}#}
+
+-- * Methods
+
+-- | Returns the DOM identifier for the mouse button used to click. [_$_]
+-- DOM button values are 0, 1 and 2 for left, middle and right buttons. [_$_]
+-- If the action was not initiated by a mouse click, returns -1.
+webNavigationActionGetButton :: [_$_]
+ WebNavigationActionClass self => self
+ -> IO Int
+webNavigationActionGetButton action = [_$_]
+ liftM fromIntegral $ {#call web_navigation_action_get_button#} (toWebNavigationAction action)
+
+-- | Returns a bitmask with the the state of the modifier keys.
+webNavigationActionGetModifierState :: [_$_]
+ WebNavigationActionClass self => self
+ -> IO Int [_$_]
+webNavigationActionGetModifierState action = [_$_]
+ liftM fromIntegral $ {#call web_navigation_action_get_modifier_state#} (toWebNavigationAction action)
+ [_$_]
+-- | Returns the URI that was originally requested. [_$_]
+-- This may differ from the navigation target, for instance because of a redirect.
+webNavigationActionGetOriginalUri :: [_$_]
+ WebNavigationActionClass self => self
+ -> IO String
+webNavigationActionGetOriginalUri action = [_$_]
+ {#call web_navigation_action_get_original_uri#} (toWebNavigationAction action) >>= peekCString
+ [_$_]
+-- | Returns the reason why WebKit is requesting a navigation.
+webNavigationActionGetReason ::
+ WebNavigationActionClass self => self
+ -> IO NavigationReason [_$_]
+webNavigationActionGetReason action = [_$_]
+ liftM (toEnum . fromIntegral) $ {#call web_navigation_action_get_reason#} (toWebNavigationAction action)
+
+-- | Returns the target frame of the action.
+webNavigationActionGetTargetFrame :: [_$_]
+ WebNavigationActionClass self => self
+ -> IO String
+webNavigationActionGetTargetFrame action = [_$_]
+ {#call web_navigation_action_get_target_frame#} (toWebNavigationAction action) >>= peekCString
+ [_$_]
+-- | Sets the URI that was originally requested. [_$_]
+-- This may differ from the navigation target, for instance because of a redirect.
+webNavigationActionSetOriginalUri ::
+ WebNavigationActionClass self => self
+ -> String
+ -> IO ()
+webNavigationActionSetOriginalUri action uri =
+ withCString uri $ \uriPtr -> [_$_]
+ {#call web_navigation_action_set_original_uri#} [_$_]
+ (toWebNavigationAction action)
+ uriPtr
+
+-- | Sets the reason why WebKit is requesting a navigation.
+webNavigationActionSetReason ::
+ WebNavigationActionClass self => self
+ -> NavigationReason
+ -> IO ()
+webNavigationActionSetReason action reason =
+ {#call web_navigation_action_set_reason#} (toWebNavigationAction action) (fromIntegral (fromEnum reason))
+ [_$_]
addfile ./webkit/Graphics/UI/Gtk/WebKit/WebPolicyDecision.chs.pp
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebPolicyDecision.chs.pp 1
+-- -*-haskell-*-
+-----------------------------------------------------------------------------
+-- Module : Graphics.UI.Gtk.WebKit.WebPolicyDecision
+-- Author : Andy Stewart
+-- Copyright : (c) 2010 Andy Stewart <laz...@gm...>
+--
+-- 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 : gtk...@li...
+-- Stability : provisional
+-- Portability : portable (depends on GHC)
+--
+-- Access to the WebKit PolicyDecision
+-----------------------------------------------------------------------------
+
+module Graphics.UI.Gtk.WebKit.WebPolicyDecision (
+-- * Types
+ WebPolicyDecision,
+
+-- * Methods [_$_]
+ webPolicyDecisionDownload,
+ webPolicyDecisionIgnore,
+ webPolicyDecisionUse,
+) where
+
+import Control.Monad (liftM)
+
+import System.Glib.FFI
+import System.Glib.UTFString
+import System.Glib.GList
+import System.Glib.GError [_$_]
+import Graphics.UI.Gtk.Gdk.Events
+
+{#import Graphics.UI.Gtk.Abstract.Object#} (makeNewObject)
+{#import Graphics.UI.Gtk.Signals#}
+{#import Graphics.UI.Gtk.WebKit.Types#}
+{#import System.Glib.GObject#}
+
+{#context lib="webkit" prefix ="webkit"#}
+
+-- * Methods
+
+-- | Will send the DOWNLOAD decision to the policy implementer.
+webPolicyDecisionDownload :: [_$_]
+ WebPolicyDecisionClass self => self
+ -> IO () [_$_]
+webPolicyDecisionDownload pd =
+ {#call web_policy_decision_download#} (toWebPolicyDecision pd)
+
+-- | Will send the IGNORE decision to the policy implementer.
+webPolicyDecisionIgnore ::
+ WebPolicyDecisionClass self => self [_$_]
+ -> IO ()
+webPolicyDecisionIgnore pd =
+ {#call web_policy_decision_ignore#} (toWebPolicyDecision pd)
+
+-- | Will send the USE decision to the policy implementer.
+webPolicyDecisionUse ::
+ WebPolicyDecisionClass self => self
+ -> IO ()
+webPolicyDecisionUse pd =
+ {#call web_policy_decision_use#} (toWebPolicyDecision pd)
addfile ./webkit/Graphics/UI/Gtk/WebKit/WebResource.chs.pp
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebResource.chs.pp 1
+-- -*-haskell-*-
+-----------------------------------------------------------------------------
+-- Module : Graphics.UI.Gtk.WebKit.WebResource
+-- Author : Andy Stewart
+-- Copyright : (c) 2010 Andy Stewart <laz...@gm...>
+--
+-- 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 : gtk...@li...
+-- Stability : provisional
+-- Portability : portable (depends on GHC)
+--
+-- Note:
+--
+-- Function `webkit_web_resource_get_data` haven't binding
+-- no idea how to handle `GString`.
+--
+-- Access to the WebKit Web Resource
+-----------------------------------------------------------------------------
+
+module Graphics.UI.Gtk.WebKit.WebResource (
+-- * Types
+ WebResource,
+
+-- * Constructors
+ webResourceNew,
+
+-- * Methods [_$_]
+ webResourceGetEncoding,
+ webResourceGetFrameName,
+ webResourceGetMimeType,
+ webResourceGetUri,
+) where
+
+import Control.Monad (liftM)
+
+import System.Glib.FFI
+import System.Glib.UTFString
+import System.Glib.GList
+import System.Glib.GError [_$_]
+import Graphics.UI.Gtk.Gdk.Events
+
+{#import Graphics.UI.Gtk.Abstract.Object#} (makeNewObject)
+{#import Graphics.UI.Gtk.Signals#}
+{#import Graphics.UI.Gtk.WebKit.Types#}
+{#import System.Glib.GObject#}
+
+{#context lib="webkit" prefix ="webkit"#}
+
+-- | Returns a new WebKitWebResource. [_$_]
+-- The @encoding@ can be empty. [_$_]
+-- The @frameName@ can be used if the resource represents contents of an
+-- entire HTML frame, otherwise pass empty.
+webResourceNew :: String -> Int -> String -> String -> String -> String -> IO WebResource
+webResourceNew resData size uri mimeType encoding frameName =
+ withCString resData $ \dataPtr -> [_$_]
+ withCString uri $ \uriPtr ->
+ withCString mimeType $ \mimePtr ->
+ withCString encoding $ \encodingPtr ->
+ withCString frameName $ \framePtr -> [_$_]
+ constructNewGObject mkWebResource $ [_$_]
+ {#call web_resource_new#} dataPtr (fromIntegral size) uriPtr mimePtr encodingPtr framePtr
+
+-- | Get encoding.
+webResourceGetEncoding :: [_$_]
+ WebResourceClass self => self
+ -> IO String
+webResourceGetEncoding wr =
+ {#call web_resource_get_encoding#} (toWebResource wr) >>= peekCString
+
+-- | Get frame name.
+webResourceGetFrameName :: [_$_]
+ WebResourceClass self => self
+ -> IO String
+webResourceGetFrameName wr =
+ {#call web_resource_get_frame_name#} (toWebResource wr) >>= peekCString
+
+-- | Get mime type.
+webResourceGetMimeType :: [_$_]
+ WebResourceClass self => self
+ -> IO String
+webResourceGetMimeType wr =
+ {#call web_resource_get_mime_type#} (toWebResource wr) >>= peekCString
+
+-- | Get uri.
+webResourceGetUri :: [_$_]
+ WebResourceClass self => self
+ -> IO String
+webResourceGetUri wr =
+ {#call web_resource_get_uri#} (toWebResource wr) >>= peekCString
addfile ./webkit/Graphics/UI/Gtk/WebKit/WebWindowFeatures.chs.pp
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebWindowFeatures.chs.pp 1
+-- -*-haskell-*-
+-----------------------------------------------------------------------------
+-- Module : Graphics.UI.Gtk.WebKit.WebWindowFeatures
+-- Author : Andy Stewart
+-- Copyright : (c) 2010 Andy Stewart <laz...@gm...>
+--
+-- 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 : gtk...@li...
+-- Stability : provisional
+-- Portability : portable (depends on GHC)
+--
+-- Access to the WebKit Web WindowFeatures
+-----------------------------------------------------------------------------
+
+module Graphics.UI.Gtk.WebKit.WebWindowFeatures (
+-- * Types
+ WebWindowFeatures,
+
+-- * Constructors
+ webWindowFeaturesNew,
+
+-- * Methods [_$_]
+ webWindowFeaturesEqual,
+
+-- * Attributes
+ webWindowFeaturesFullscreen,
+ webWindowFeaturesHeight,
+ webWindowFeaturesWidth,
+ webWindowFeaturesX,
+ webWindowFeaturesY,
+ webWindowFeaturesLocationbarVisible,
+ webWindowFeaturesMenubarVisible,
+ webWindowFeaturesScrollbarVisible,
+ webWindowFeaturesStatusbarVisible,
+ webWindowFeaturesToolbarVisible,
+) where
+
+import Control.Monad (liftM)
+
+import System.Glib.FFI
+import System.Glib.UTFString
+import System.Glib.GList
+import System.Glib.GError [_$_]
+import System.Glib.Attributes
+import System.Glib.Properties
+import Graphics.UI.Gtk.Gdk.Events
+
+{#import Graphics.UI.Gtk.Abstract.Object#} (makeNewObject)
+{#import Graphics.UI.Gtk.Signals#}
+{#import Graphics.UI.Gtk.WebKit.Types#}
+{#import System.Glib.GObject#}
+
+{#context lib="webkit" prefix ="webkit"#}
+
+-- * Constructors
+
+-- | Creates a new 'WebWindowFeatures' instance with default values. [_$_]
+-- It must be manually attached to a WebView.
+webWindowFeaturesNew :: IO WebWindowFeatures
+webWindowFeaturesNew = [_$_]
+ constructNewGObject mkWebWindowFeatures $ {#call web_window_features_new#}
+
+-- | Decides if a 'WebWindowFeatures' instance equals another, as in has the same values.
+webWindowFeaturesEqual :: [_$_]
+ (WebWindowFeaturesClass winA, WebWindowFeaturesClass winB) => winA -> winB
+ -> IO Bool
+webWindowFeaturesEqual winA winB =
+ liftM toBool $ {#call web_window_features_equal#} (toWebWindowFeatures winA) (toWebWindowFeatures winB)
+
+-- * Attributes
+
+-- | Controls whether window will be displayed fullscreen.
+webWindowFeaturesFullscreen :: WebWindowFeaturesClass self => Attr self Bool
+webWindowFeaturesFullscreen = newAttrFromBoolProperty "fullscreen"
+
+-- | The height of the window on the screen.
+webWindowFeaturesHeight :: WebWindowFeaturesClass self => Attr self Int
+webWindowFeaturesHeight = newAttrFromIntProperty "height"
+
+-- | The width of the window on the screen.
+webWindowFeaturesWidth :: WebWindowFeaturesClass self => Attr self Int
+webWindowFeaturesWidth = newAttrFromIntProperty "width"
+
+-- | Controls whether the locationbar should be visible for the window.
+webWindowFeaturesLocationbarVisible :: WebWindowFeaturesClass self => Attr self Bool
+webWindowFeaturesLocationbarVisible = newAttrFromBoolProperty "locationbar-visible"
+
+-- | Controls whether the menubar should be visible for the window.
+webWindowFeaturesMenubarVisible :: WebWindowFeaturesClass self => Attr self Bool
+webWindowFeaturesMenubarVisible = newAttrFromBoolProperty "menubar-visible"
+
+-- | Controls whether the scrollbar should be visible for the window.
+webWindowFeaturesScrollbarVisible :: WebWindowFeaturesClass self => Attr self Bool
+webWindowFeaturesScrollbarVisible = newAttrFromBoolProperty "scrollbar-visible"
+
+-- | Controls whether the statusbar should be visible for the window.
+webWindowFeaturesStatusbarVisible :: WebWindowFeaturesClass self => Attr self Bool
+webWindowFeaturesStatusbarVisible = newAttrFromBoolProperty "statusbar-visible"
+
+-- | Controls whether the toolbar should be visible for the window.
+webWindowFeaturesToolbarVisible :: WebWindowFeaturesClass self => Attr self Bool
+webWindowFeaturesToolbarVisible = newAttrFromBoolProperty "toolbar-visible"
+
+-- | The starting x position of the window on the screen.
+webWindowFeaturesX :: WebWindowFeaturesClass self => Attr self Int
+webWindowFeaturesX = newAttrFromIntProperty "x"
+
+-- | The starting y position of the window on the screen.
+webWindowFeaturesY :: WebWindowFeaturesClass self => Attr self Int
+webWindowFeaturesY = newAttrFromIntProperty "y"
+
|
|
From: Andy S. <And...@co...> - 2010-03-19 19:06:57
|
Fri Mar 19 15:05:36 EDT 2010 Andy Stewart <laz...@gm...>
* Finish WebKit-1.1.15 API binding.
Ignore-this: f5f55bf2e269a4e384409cc385d209bc
hunk ./Makefile.am 1288
- webkit/Graphics/UI/Gtk/WebKit/NetworkResponse.chs [_$_]
+ webkit/Graphics/UI/Gtk/WebKit/NetworkResponse.chs \
+ webkit/Graphics/UI/Gtk/WebKit/HitTestResult.chs \
+ webkit/Graphics/UI/Gtk/WebKit/SecurityOrigin.chs \
+ webkit/Graphics/UI/Gtk/WebKit/SoupAuthDialog.chs \
+ webkit/Graphics/UI/Gtk/WebKit/WebDatabase.chs \
+ webkit/Graphics/UI/Gtk/WebKit/WebDataSource.chs \
+ webkit/Graphics/UI/Gtk/WebKit/WebNavigationAction.chs \
+ webkit/Graphics/UI/Gtk/WebKit/WebPolicyDecision.chs \
+ webkit/Graphics/UI/Gtk/WebKit/WebResource.chs \
+ webkit/Graphics/UI/Gtk/WebKit/WebWindowFeatures.chs \
+ webkit/Graphics/UI/Gtk/WebKit/Internal.chs
hunk ./configure.ac 350
-GTKHS_PKG_CHECK(webkit, webkit, WEBKIT, [webkit-1.0 >= 1.1.14], [GLIB GTK],
+GTKHS_PKG_CHECK(webkit, webkit, WEBKIT, [webkit-1.0 >= 1.1.15], [GLIB GTK],
hunk ./tools/callbackGen/gtkmarshal.list 143
+BOOLEAN:INT,INT,STRING
+BOOLEAN:STRING,STRING,INT,STRING
+BOOLEAN:OBJECT,STRING
+BOOLEAN:OBJECT,STRING,STRING
+BOOLEAN:OBJECT,OBJECT,OBJECT,OBJECT
+BOOLEAN:OBJECT,OBJECT,STRING,OBJECT
+NONE:OBJECT,OBJECT,OBJECT,OBJECT
+BOOLEAN:ENUM,INT
hunk ./tools/hierarchyGen/hierarchy.list 327
+ WebkitHitTestResult as HitTestResult if webkit
+ WebkitSecurityOrigin as SecurityOrigin if webkit
+ WebkitSoupAuthDialog as SoupAuthDialog if webkit
+ WebkitWebDatabase as WebDatabase if webkit
+ WebkitWebDataSource as WebDataSource if webkit
+ WebkitWebNavigationAction as WebNavigationAction if webkit
+ WebkitWebPolicyDecision as WebPolicyDecision if webkit
+ WebkitWebResource as WebResource if webkit
+ WebkitWebWindowFeatures as WebWindowFeatures if webkit
hunk ./webkit/Graphics/UI/Gtk/WebKit/Download.chs.pp 6
+-- Copyright : (c) 2010 Andy Stewart <laz...@gm...>
hunk ./webkit/Graphics/UI/Gtk/WebKit/Download.chs.pp 30
+-- * Enums
+ DownloadError(..),
+ DownloadStatus(..),
+
hunk ./webkit/Graphics/UI/Gtk/WebKit/Download.chs.pp 39
- DownloadStatus(..),
hunk ./webkit/Graphics/UI/Gtk/WebKit/Download.chs.pp 52
+
+-- * Attributes
+ currentSize,
+ destinationUri,
+ networkRequest,
+ networkResponse,
+ progress,
+ status,
+ suggestedFilename,
+ totalSize,
+
+-- * Signals
+ downloadError,
hunk ./webkit/Graphics/UI/Gtk/WebKit/Download.chs.pp 73
+import System.Glib.Attributes
+import System.Glib.Properties
hunk ./webkit/Graphics/UI/Gtk/WebKit/Download.chs.pp 84
+-- * Enums
+
hunk ./webkit/Graphics/UI/Gtk/WebKit/Download.chs.pp 203
+-- * Attibutes
hunk ./webkit/Graphics/UI/Gtk/WebKit/Download.chs.pp 205
+-- | The length of the data already downloaded
+--
+-- Default value: 0
+-- [_$_]
+-- * Since 1.1.2 [_$_]
+--
+currentSize :: DownloadClass self => ReadAttr self Int
+currentSize = readAttr downloadGetCurrentSize
+
+-- | The URI of the save location for this download.
+--
+-- Default value: ""
+--
+-- * Since 1.1.2
+destinationUri :: DownloadClass self => Attr self (Maybe String) [_$_]
+destinationUri = newAttrFromMaybeStringProperty "destination-uri"
+
+-- | The NetworkRequest instance associated with the download.
+--
+-- * Since 1.1.2
+networkRequest :: DownloadClass self => Attr self NetworkRequest
+networkRequest = [_$_]
+ newAttrFromObjectProperty "network-request"
+ {#call pure webkit_network_request_get_type#}
+
+-- | The NetworkResponse instance associated with the download.
+--
+-- * Since 1.1.16
+networkResponse :: DownloadClass self => Attr self NetworkResponse
+networkResponse = [_$_]
+ newAttrFromObjectProperty "network-response"
+ {#call pure webkit_network_response_get_type#}
+
+-- | Determines the current progress of the download. [_$_]
+-- Notice that, although the progress changes are reported as soon as possible, [_$_]
+-- the emission of the notify signal for this property is throttled, for the benefit of download managers. [_$_]
+-- If you care about every update, use 'Download' : currentSize.
+--
+-- Allowed values: [0,1]
+--
+-- Default value: 1
+--
+-- * Since 1.1.2
+progress :: DownloadClass self => ReadAttr self Double
+progress = readAttr downloadGetProgress
+
+-- | Determines the current status of the download.
+--
+-- Default value: 'DownloadStatusCreated'
+--
+-- * Since 1.1.2
+status :: DownloadClass self => ReadAttr self DownloadStatus
+status = readAttr downloadGetStatus
+
+-- | The file name suggested as default when saving
+--
+-- Default value: ""
+--
+-- * Since 1.1.2
+suggestedFilename :: DownloadClass self => ReadAttr self (Maybe String)
+suggestedFilename = readAttr downloadGetSuggestedFilename
+
+-- | The total size of the file
+--
+-- Default value: 0
+--
+-- * Since 1.1.2
+totalSize :: DownloadClass self => ReadAttr self Int
+totalSize = readAttr downloadGetTotalSize
+
+-- * Signals
+
+-- | Emitted when download is interrupted either by user action or by network errors, [_$_]
+-- errorDetail will take any value of 'DownloadError'.
+--
+-- 'download': the object on which the signal is emitted [_$_]
+-- 'errorCode': the corresponding error code [_$_]
+-- 'errorDetail': detailed error code for the error, see 'DownloadError' [_$_]
+-- 'reason': a string describing the error [_$_]
+-- [_$_]
+-- Since 1.1.2
+downloadError :: DownloadClass self => Signal self (Int -> Int -> String -> IO Bool)
+downloadError = Signal (connect_INT_INT_STRING__BOOL "error")
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebFrame.chs.pp 6
+-- Copyright : (c) 2010 Andy Stewart <laz...@gm...>
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebFrame.chs.pp 24
+--
+-- Note:
+-- Functon `webkit_web_frame_get_global_context` can't binding now, [_$_]
+-- Because it need `JSGlobalContextRef` exist in JavaScriptCore.
+--
+-- Function `webkit_web_frame_print_full` can't binding now,
+-- Because library `GtkPrintOperation` haven't binding.
+--
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebFrame.chs.pp 37
+
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebFrame.chs.pp 40
+
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebFrame.chs.pp 42
- [_$_]
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebFrame.chs.pp 47
+ webFrameGetLoadStatus,
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebFrame.chs.pp 51
+ webFrameLoadRequest,
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebFrame.chs.pp 55
+ webFrameGetDataSource,
+ webFrameGetHorizontalScrollbarPolicy,
+ webFrameGetVerticalScrollbarPolicy,
+ webFrameGetProvisionalDataSource,
+ webFrameGetSecurityOrigin,
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebFrame.chs.pp 70
+import Graphics.UI.Gtk.General.Enums
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebFrame.chs.pp 79
+-- * Enums
+
+{#enum LoadStatus {underscoreToCase}#}
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebFrame.chs.pp 132
+-- | Determines the current status of the load.
+--
+-- frame[_\c2_][_\a0_]: a WebKitWebView [_$_]
+-- [_$_]
+-- * Since 1.1.7
+webFrameGetLoadStatus ::
+ WebFrameClass self => self
+ -> IO LoadStatus [_$_]
+webFrameGetLoadStatus ls =
+ liftM (toEnum . fromIntegral) $ {#call web_frame_get_load_status#} (toWebFrame ls)
+
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebFrame.chs.pp 199
+-- | Connects to a given URI by initiating an asynchronous client request.
+--
+-- Creates a provisional data source that will transition to a committed data source once any data has been received. [_$_]
+-- Use 'webFrameStopLoading' to stop the load. [_$_]
+-- This function is typically invoked on the main frame.
+webFrameLoadRequest :: [_$_]
+ (WebFrameClass self, NetworkRequestClass requ) => self -> requ
+ -> IO ()
+webFrameLoadRequest webframe request =
+ {#call web_frame_load_request#} (toWebFrame webframe) (toNetworkRequest request) [_$_]
+
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebFrame.chs.pp 237
+-- | Returns the committed data source.
+webFrameGetDataSource :: [_$_]
+ WebFrameClass self => self
+ -> IO WebDataSource
+webFrameGetDataSource webframe =
+ makeNewGObject mkWebDataSource $ {#call web_frame_get_data_source#} (toWebFrame webframe)
+
+-- | Return the policy of horizontal scrollbar.
+webFrameGetHorizontalScrollbarPolicy :: [_$_]
+ WebFrameClass self => self
+ -> IO PolicyType [_$_]
+webFrameGetHorizontalScrollbarPolicy webframe = [_$_]
+ liftM (toEnum.fromIntegral) $
+ {#call web_frame_get_horizontal_scrollbar_policy#} (toWebFrame webframe)
+ [_$_]
+-- | Return the policy of vertical scrollbar.
+webFrameGetVerticalScrollbarPolicy :: [_$_]
+ WebFrameClass self => self
+ -> IO PolicyType [_$_]
+webFrameGetVerticalScrollbarPolicy webframe = [_$_]
+ liftM (toEnum.fromIntegral) $
+ {#call web_frame_get_vertical_scrollbar_policy#} (toWebFrame webframe)
+
+-- | You use the 'webFrameLoadRequest' method to initiate a request that creates a provisional data source. [_$_]
+-- The provisional data source will transition to a committed data source once any data has been received. [_$_]
+-- Use 'webFrameGetDataSource' to get the committed data source.
+webFrameGetProvisionalDataSource :: [_$_]
+ WebFrameClass self => self
+ -> IO WebDataSource [_$_]
+webFrameGetProvisionalDataSource webframe =
+ makeNewGObject mkWebDataSource $ {#call web_frame_get_provisional_data_source#} (toWebFrame webframe)
+
+-- | Returns the frame's security origin.
+webFrameGetSecurityOrigin ::
+ WebFrameClass self => self
+ -> IO SecurityOrigin [_$_]
+webFrameGetSecurityOrigin webframe = [_$_]
+ makeNewGObject mkSecurityOrigin $ {#call web_frame_get_security_origin#} (toWebFrame webframe)
+
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs.pp 33
+-- * Attribute [_$_]
+ webInspectorInspectedUri,
+ webInspectorJSProfilingEnable,
+ webInspectorWebView,
+
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs.pp 39
- onAttachWindow,
- onCloseWindow,
- onDetachWindow,
- onFinished,
- onInspectWebView,
- onShowWindow,
+ attachWindow,
+ detachWindow,
+ closeWindow,
+ showWindow,
+ finished,
+ inspectWebView,
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs.pp 53
+import System.Glib.Attributes
+import System.Glib.Properties
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs.pp 60
+{#import Graphics.UI.Gtk.WebKit.Internal#}
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs.pp 87
+-- * Attribute
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs.pp 89
--- * Signals
--- | Emitted when the 'WebInspector' should appear at the same window as the 'WebView' being inspected.
---
--- return True if the signal is handled.
-onAttachWindow :: WebInspectorClass self => self ->( IO Bool )-> IO (ConnectId self)
-onAttachWindow =
- connect_NONE__BOOL "attach-window" True
+-- | The URI that is currently being inspected.
+webInspectorInspectedUri :: (WebInspectorClass self) => ReadAttr self String
+webInspectorInspectedUri = readAttr webInspectorGetInspectedUri
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs.pp 93
--- | Emitted when the inspector window should be closed. [_$_]
---
--- return True if the signal is handled.
---
--- You can destroy the window or hide it so that it can be displayed again by handling 'onShowWindow' later on. [_$_]
--- Notice that the inspected 'WebView' may no longer exist when this signal is emitted.
--- Notice, too, that if you decide to destroy the window, [_$_]
--- 'onInspectWebView' will be emmited again, when the user inspects an element.
+-- | This is enabling JavaScript profiling in the Inspector. This means that Console.profiles will return the profiles.
+webInspectorJSProfilingEnable :: (WebInspectorClass self) => Attr self Bool
+webInspectorJSProfilingEnable = newAttrFromBoolProperty "javascript-profiling-enabled"
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs.pp 97
-onCloseWindow :: WebInspectorClass self => self ->( IO Bool )-> IO (ConnectId self)
-onCloseWindow =
- connect_NONE__BOOL "close-window" True
+-- | The Web View that renders the Web Inspector itself.
+webInspectorWebView :: (WebInspectorClass self) => ReadAttr self WebView
+webInspectorWebView = [_$_]
+ readAttrFromObjectProperty "web-view"
+ {#call pure webkit_web_view_get_type#}
+
+-- * Signals
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs.pp 108
-onDetachWindow :: WebInspectorClass self => self ->( IO Bool )-> IO (ConnectId self)
-onDetachWindow =
- connect_NONE__BOOL "detach-window" True
-
--- | Emitted when the inspection is done.
-onFinished :: WebInspectorClass self => self ->( IO () )-> IO (ConnectId self)
-onFinished =
- connect_NONE__NONE "finished" True
+attachWindow :: WebInspectorClass self => Signal self (IO Bool)
+attachWindow = Signal (connect_NONE__BOOL "attach-window")
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs.pp 111
--- internal helper function used in onInspectWebView
-webViewToWebViewPtr :: WebViewClass self => self -> IO (Ptr WebView)
-webViewToWebViewPtr webview = do
- let webViewPtr = unsafeForeignPtrToPtr (unWebView (toWebView webview))
- -- objectRef webViewPtr
- return webViewPtr
+-- | Emitted when the inspector should appear in a separate window.
+--
+-- return True if the signal has been handled [_$_]
+detachWindow :: WebInspectorClass self => Signal self (IO Bool)
+detachWindow = Signal (connect_NONE__BOOL "detach-window")
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs.pp 117
--- | Emitted when the user activates the \'inspect\' context menu item to inspect a 'WebView'. [_$_]
+-- | Emitted when the inspector window should be closed. [_$_]
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs.pp 119
--- The application which is interested in the inspector should create a window, [_$_]
--- or otherwise add the 'WebView' it creates to an existing window.
--- [_$_]
--- !!!NOTE!!!, you should return a 'WebView' in user function [_$_]
-onInspectWebView :: WebInspectorClass self => self ->( WebView -> IO WebView )-> IO (ConnectId self)
-onInspectWebView =
- connect_OBJECT__OBJECTPTR "inspect-web-view" True
- where connect_OBJECT__OBJECTPTR ::
- (GObjectClass a', GObjectClass obj) => SignalName ->
- ConnectAfter -> obj ->
- (a' -> IO WebView) ->
- IO (ConnectId obj)
- connect_OBJECT__OBJECTPTR signal after obj user =
- connectGeneric signal after obj action
- where action :: Ptr GObject -> Ptr GObject -> IO (Ptr WebView)
- action _ obj1 =
- failOnGError $
- makeNewGObject mkGObject (return obj1) >>= \obj1' ->
- user (unsafeCastGObject obj1') >>= webViewToWebViewPtr
+-- return True if the signal is handled.
+closeWindow :: WebInspectorClass self => Signal self (IO Bool)
+closeWindow = Signal (connect_NONE__BOOL "close-window")
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs.pp 124
+-- Notice that the window must have been created already by handling 'inspectWebView'.
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs.pp 126
--- Notice that the window must have been created already by handling "inspect-web-view".
-onShowWindow :: WebInspectorClass self => self ->( IO Bool )-> IO (ConnectId self)
-onShowWindow =
- connect_NONE__BOOL "show-window" True
+-- return True if the signal has been handled [_$_]
+showWindow :: WebInspectorClass self => Signal self (IO Bool)
+showWindow = Signal (connect_NONE__BOOL "show-window")
+
+-- | Emitted when the inspection is done. You should release your references on the inspector at this time. [_$_]
+-- The inspected 'WebView' may no longer exist when this signal is emitted.
+finished :: WebInspectorClass self => Signal self (IO ())
+finished = Signal (connect_NONE__NONE "finished")
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs.pp 135
+-- | Emitted when the user activates the 'inspect' context menu item to inspect a web view. [_$_]
+-- The application which is interested in the inspector should create a window, [_$_]
+-- or otherwise add the 'WebView' it creates to an existing window.
+--
+-- You don't need to handle the reference count of the 'WebView' instance you create; [_$_]
+-- the widget to which you add it will do that.
+inspectWebView :: WebInspectorClass self => Signal self (WebView -> IO WebView)
+inspectWebView = Signal (connect_OBJECT__OBJECTPTR "inspect-web-view")
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebSettings.chs.pp 32
+-- * Methods
+ webSettingsCopy,
+ webSettingsGetUserAgent,
+
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebSettings.chs.pp 70
--- * Methods
-
- webSettingsCopy,
- webSettingsGetUserAgent,
-
+ webSettingsEnableSiteSpecificQuirks,
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebSettings.chs.pp 318
+-- | Enables the site-specific compatibility workarounds.
+--
+-- Default value: False
+webSettingsEnableSiteSpecificQuirks :: WebSettingsClass self => Attr self Bool
+webSettingsEnableSiteSpecificQuirks = newAttrFromBoolProperty "enable-site-specific-quirks"
+
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 6
+-- Copyright : (c) 2010 Andy Stewart <laz...@gm...>
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 23
+-- Note:
+--
+-- Signal `window-object-cleared` can't bidning now, [_$_]
+-- because it need JavaScriptCore that haven't binding.
+--
+-- Signal `create-plugin-widget` can't binding now, [_$_]
+-- no idea how to binding `GHaskellTable`
+--
+--
+-- TODO:
+--
+-- `webViewGetHitTestResult`
+--
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 43
+-- * Enums
+ NavigationResponse(..),
+ TargetInfo(..),
+ LoadStatus(..),
+
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 50
--- * Methods
- LoadStatus(..),
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 51
+-- * Methods
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 114
+ webViewGetCopyTargetList,
+ webViewGetPasteTargetList,
+
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 122
+ webViewMoveCursor,
+
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 130
+ webViewGetWindowFeatures,
+
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 145
- [_$_]
+ webViewUri,
+ webViewCopyTargetList,
+ webViewPasteTargetList,
+ webViewWindowFeatures,
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 151
- onLoadStarted,
- onLoadCommitted,
- onProgressChanged,
- onLoadFinished,
- onLoadError,
- onTitleChanged,
- -- onHoveringOverLink,
-
- -- onCreateWebView,
- onWebViewReady,
- onCloseWebView,
- onDownloadRequested,
- onIconLoaded,
- onRedo,
- onUndo,
-
+ loadStarted,
+ loadCommitted,
+ progressChanged,
+ loadFinished,
+ loadError,
+ titleChanged,
+ hoveringOverLink,
+ createWebView,
+ webViewReady,
+ closeWebView,
+ consoleMessage,
+ copyClipboard,
+ cutClipboard,
+ pasteClipboard,
+ populatePopup,
+ printRequested,
+ scriptAlert,
+ scriptConfirm,
+ scriptPrompt,
+ statusBarTextChanged,
+ selectAll,
+ selectionChanged,
+ setScrollAdjustments,
+ databaseQuotaExceeded,
+ documentLoadFinished,
+ downloadRequested,
+ iconLoaded,
+ redo,
+ undo,
+ mimeTypePolicyDecisionRequested,
+ moveCursor,
+ navigationPolicyDecisionRequested,
+ newWindowPolicyDecisionRequested,
+ resourceRequestStarting,
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 189
--- import Data.IORef
-
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 193
+import System.Glib.Properties
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 197
-
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 200
+{#import Graphics.UI.Gtk.WebKit.Internal#}
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 202
+{#import Graphics.UI.Gtk.General.DNDTypes#}
+{#import Graphics.UI.Gtk.General.Selection#} ( TargetList )
+{#import Graphics.UI.Gtk.MenuComboToolbar.Menu#}
+{#import Graphics.UI.Gtk.General.Enums#}
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 209
+-- * Enums
+
+{#enum NavigationResponse {underscoreToCase}#}
+
+{#enum WebViewTargetInfo as TargetInfo {underscoreToCase}#}
+
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 254
+-- | Returns the instance of WebKitWebWindowFeatures held by the given WebKitWebView.
+webViewGetWindowFeatures ::
+ WebViewClass self => self
+ -> IO WebWindowFeatures [_$_]
+webViewGetWindowFeatures webview =
+ makeNewGObject mkWebWindowFeatures $ {#call web_view_get_window_features#} (toWebView webview)
+
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 629
+-- | Move the cursor in view as described by step and count.
+webViewMoveCursor ::
+ WebViewClass self => self
+ -> MovementStep
+ -> Int
+ -> IO () [_$_]
+webViewMoveCursor webview step count =
+ {#call web_view_move_cursor#} (toWebView webview) (fromIntegral $ fromEnum step) (fromIntegral count)
+
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 771
+-- | This function returns the list of targets this 'WebView' can provide for clipboard copying and as DND source. [_$_]
+-- The targets in the list are added with values from the 'WebViewTargetInfo' enum, [_$_]
+-- using 'targetListAdd' and 'targetListAddTextTargets'.
+webViewGetCopyTargetList ::
+ WebViewClass self => self [_$_]
+ -> IO (Maybe TargetList)
+webViewGetCopyTargetList webview = do
+ tlPtr <- {#call web_view_get_copy_target_list#} (toWebView webview)
+ if tlPtr==nullPtr then return Nothing else liftM Just (mkTargetList tlPtr)
+
+-- | This function returns the list of targets this 'WebView' can provide for clipboard pasteing and as DND source. [_$_]
+-- The targets in the list are added with values from the 'WebViewTargetInfo' enum, [_$_]
+-- using 'targetListAdd' and 'targetListAddTextTargets'.
+webViewGetPasteTargetList ::
+ WebViewClass self => self [_$_]
+ -> IO (Maybe TargetList)
+webViewGetPasteTargetList webview = do
+ tlPtr <- {#call web_view_get_paste_target_list#} (toWebView webview)
+ if tlPtr==nullPtr then return Nothing else liftM Just (mkTargetList tlPtr)
+
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 870
+-- | Returns the current URI of the contents displayed by the @web_view.
+--
+-- Default value: Nothing
+webViewUri :: WebViewClass self => ReadAttr self (Maybe String)
+webViewUri = readAttr webViewGetUri
+
+-- | The list of targets this web view supports for clipboard copying.
+webViewCopyTargetList :: WebViewClass self => ReadAttr self (Maybe TargetList)
+webViewCopyTargetList = readAttr webViewGetCopyTargetList
+
+-- | The list of targets this web view supports for clipboard pasteing.
+webViewPasteTargetList :: WebViewClass self => ReadAttr self (Maybe TargetList)
+webViewPasteTargetList = readAttr webViewGetPasteTargetList
+
+-- | An associated 'WebWindowFeatures' instance.
+webViewWindowFeatures :: WebViewClass self => Attr self WebWindowFeatures
+webViewWindowFeatures = [_$_]
+ newAttrFromObjectProperty "window-features"
+ {#call pure webkit_web_window_features_get_type#}
+
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 901
-onTitleChanged :: WebViewClass self => self ->( WebFrame -> String -> IO() )-> IO (ConnectId self)
-onTitleChanged = [_$_]
- connect_OBJECT_STRING__NONE "title-changed" True
+titleChanged :: WebViewClass self => Signal self ( WebFrame -> String -> IO() )
+titleChanged = [_$_]
+ Signal (connect_OBJECT_STRING__NONE "title-changed")
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 913
--- onHoveringOverLink :: WebViewClass self => self -> (Maybe String -> Maybe String -> IO()) -> IO(ConnectId self)
--- onHoveringOverLink =
--- connect_BOXED_BOXED__NONE "hovering-over-link" readMString True
--- where
--- readMString strPtr | strPtr==nullPtr = return Nothing
--- | otherwise = liftM Just $ peekUTFString strPtr
+hoveringOverLink :: WebViewClass self => Signal self (String -> String -> IO())
+hoveringOverLink =
+ Signal (connect_STRING_STRING__NONE "hovering-over-link")
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 918
-onLoadStarted :: WebViewClass self => self -> (WebFrame -> IO()) -> IO (ConnectId self)
-onLoadStarted = [_$_]
- connect_OBJECT__NONE "load-started" True
+loadStarted :: WebViewClass self => Signal self (WebFrame -> IO())
+loadStarted = Signal (connect_OBJECT__NONE "load-started")
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 922
-onLoadCommitted :: WebViewClass self => self -> (WebFrame -> IO()) -> IO (ConnectId self)
-onLoadCommitted = [_$_]
- connect_OBJECT__NONE "load-committed" True
+loadCommitted :: WebViewClass self => Signal self (WebFrame -> IO())
+loadCommitted = Signal (connect_OBJECT__NONE "load-committed")
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 929
-onProgressChanged :: WebViewClass self => self -> (Int-> IO()) -> IO (ConnectId self)
-onProgressChanged = [_$_]
- connect_INT__NONE "load-progress-changed" True
+progressChanged :: WebViewClass self => Signal self (Int-> IO())
+progressChanged = [_$_]
+ Signal (connect_INT__NONE "load-progress-changed")
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 934
-onLoadFinished :: WebViewClass self => self -> (WebFrame -> IO()) -> IO (ConnectId self)
-onLoadFinished = [_$_]
- connect_OBJECT__NONE "load-finished" True
+loadFinished :: WebViewClass self => Signal self (WebFrame -> IO())
+loadFinished = [_$_]
+ Signal (connect_OBJECT__NONE "load-finished")
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 947
-onLoadError :: WebViewClass self => self -> (WebFrame -> String -> GError -> IO Bool) -> IO (ConnectId self)
-onLoadError = connect_OBJECT_STRING_BOXED__BOOL "load-error" peek True
+loadError :: WebViewClass self => Signal self (WebFrame -> String -> GError -> IO Bool)
+loadError = Signal (connect_OBJECT_STRING_BOXED__BOOL "load-error" peek)
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 950
-
--- |Emitted when the creation of a new window requested.
--- [_$_]
--- * A new 'WebView' instance should be created in the call back or an
--- existing 'WebView' can be returned. In either case, the URL and other
--- details of the returned 'WebView' will be modified once this signal
--- handler returns, thus, you should not modify the 'WebView' in this
--- signal handler. If you need to modify the new 'WebView', you can do so
--- in the 'webViewReady' signal or after the 'webViewReady' signal has
--- been emitted.
---
--- onCreateWebView :: WebViewClass self => self -> (WebFrame -> IO WebView) -> IO (ConnectId self)
--- -- onCreateWebView = \vw act
--- onCreateWebView vw act =
--- connect_OBJECT__PTR "create-web-view" True vw act'
--- where
--- act' wf = do
--- wv <- act wf
--- -- We need to return a Ptr WebView to the caller of this signal. To
--- -- prevent the garbage collector from freeing the WebView before this
--- -- signal returns, we increment the reference count of the object and
--- -- decrement it as soon as the 'webViewReady' signal is emitted which
--- -- always happens after this signal returns.
--- gObjectRef wv
--- sidRef <- newIORef undefined
--- sid <- onWebViewReady wv $ do
--- gObjectUnref wv
--- sid <- readIORef sidRef
--- signalDisconnect wv sid
--- return False
--- writeIORef sidRef sid
--- return unsafeForeignPtrToPtr (unWebView wv)
+createWebView :: WebViewClass self => Signal self (WebFrame -> IO WebView)
+createWebView = Signal (connect_OBJECT__OBJECTPTR "create-web-view")
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 961
-onCloseWebView :: WebViewClass self => self -> (IO Bool) -> IO(ConnectId self)
-onCloseWebView = [_$_]
- connect_NONE__BOOL "close-web-view" True
+closeWebView :: WebViewClass self => Signal self (IO Bool)
+closeWebView = [_$_]
+ Signal (connect_NONE__BOOL "close-web-view")
+
+-- | A JavaScript console message was created.
+consoleMessage :: WebViewClass self => Signal self (String -> String -> Int -> String -> IO Bool)
+consoleMessage = Signal (connect_STRING_STRING_INT_STRING__BOOL "console-message")
+
+-- | The 'copyClipboard' signal is a keybinding signal which gets emitted to copy the selection to the clipboard.
+--
+-- The default bindings for this signal are Ctrl-c and Ctrl-Insert.
+copyClipboard :: WebViewClass self => Signal self (IO ())
+copyClipboard = Signal (connect_NONE__NONE "copy-clipboard")
+
+-- | The 'cutClipboard' signal is a keybinding signal which gets emitted to cut the selection to the clipboard.
+--
+-- The default bindings for this signal are Ctrl-x and Shift-Delete.
+cutClipboard :: WebViewClass self => Signal self (IO ())
+cutClipboard = Signal (connect_NONE__NONE "cut-clipboard")
+
+-- | The 'pasteClipboard' signal is a keybinding signal which gets emitted to paste the contents of the clipboard into the Web view.
+--
+-- The default bindings for this signal are Ctrl-v and Shift-Insert.
+pasteClipboard :: WebViewClass self => Signal self (IO ())
+pasteClipboard = Signal (connect_NONE__NONE "paste-clipboard")
+
+-- | When a context menu is about to be displayed this signal is emitted.
+populatePopup :: WebViewClass self => Signal self (Menu -> IO ())
+populatePopup = Signal (connect_OBJECT__NONE "populate-popup")
+
+-- | Emitted when printing is requested by the frame, usually because of a javascript call. [_$_]
+-- When handling this signal you should call 'webFramePrintFull' or 'webFramePrint' to do the actual printing.
+--
+-- The default handler will present a print dialog and carry a print operation. [_$_]
+-- Notice that this means that if you intend to ignore a print
+-- request you must connect to this signal, and return True.
+printRequested :: WebViewClass self => Signal self (WebFrame -> IO Bool)
+printRequested = Signal (connect_OBJECT__BOOL "print-requested")
+
+-- | A JavaScript alert dialog was created.
+scriptAlert :: WebViewClass self => Signal self (WebFrame -> String -> IO Bool)
+scriptAlert = Signal (connect_OBJECT_STRING__BOOL "scriptAlert")
+
+-- | A JavaScript confirm dialog was created, providing Yes and No buttons.
+scriptConfirm :: WebViewClass self => Signal self (WebFrame -> String -> IO Bool)
+scriptConfirm = Signal (connect_OBJECT_STRING__BOOL "script-confirm")
+
+-- | A JavaScript prompt dialog was created, providing an entry to input text.
+scriptPrompt :: WebViewClass self => Signal self (WebFrame -> String -> String -> IO Bool)
+scriptPrompt = Signal (connect_OBJECT_STRING_STRING__BOOL "script-prompt")
+
+-- | When status-bar text changed, this signal will emitted.
+statusBarTextChanged :: WebViewClass self => Signal self (String -> IO ())
+statusBarTextChanged = Signal (connect_STRING__NONE "status-bar-text-changed")
+
+
+
+-- | The 'selectAll' signal is a keybinding signal which gets emitted to select the complete contents of the text view.
+-- [_$_]
+-- The default bindings for this signal is Ctrl-a.
+selectAll :: WebViewClass self => Signal self (IO ())
+selectAll = Signal (connect_NONE__NONE "select-all")
+
+-- | When selection changed, this signal is emitted.
+selectionChanged :: WebViewClass self => Signal self (IO ())
+selectionChanged = Signal (connect_NONE__NONE "selection-changed")
+
+-- | When set scroll adjustments, this signal is emitted.
+setScrollAdjustments :: WebViewClass self => Signal self (Adjustment -> Adjustment -> IO ())
+setScrollAdjustments = Signal (connect_OBJECT_OBJECT__NONE "set-scroll-adjustments")
+
+-- | The 'databaseQuotaExceeded' signal will be emitted when a Web Database exceeds the quota of its security origin. [_$_]
+-- This signal may be used to increase the size of the quota before the originating operation fails.
+databaseQuotaExceeded :: WebViewClass self => Signal self (WebFrame -> WebDatabase -> IO ())
+databaseQuotaExceeded = Signal (connect_OBJECT_OBJECT__NONE "database-quota-exceeded")
+
+-- | When document loading finished, this signal is emitted
+documentLoadFinished :: WebViewClass self => Signal self (WebFrame -> IO ())
+documentLoadFinished = Signal (connect_OBJECT__NONE "document-load-finished")
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 1048
-onWebViewReady:: WebViewClass self => self -> (IO Bool) -> IO(ConnectId self)
-onWebViewReady =
- connect_NONE__BOOL "web-view-ready" True
+webViewReady:: WebViewClass self => Signal self (IO Bool)
+webViewReady =
+ Signal (connect_NONE__BOOL "web-view-ready")
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 1059
-onDownloadRequested :: WebViewClass self => self -> (Download -> IO Bool) -> IO(ConnectId self)
-onDownloadRequested =
- connect_OBJECT__BOOL "download-requested" True
+downloadRequested :: WebViewClass self => Signal self (Download -> IO Bool)
+downloadRequested =
+ Signal (connect_OBJECT__BOOL "download-requested")
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 1064
-onIconLoaded :: WebViewClass self => self -> (IO ()) -> IO(ConnectId self)
-onIconLoaded =
- connect_NONE__NONE "icon-loaded" True
+iconLoaded :: WebViewClass self => Signal self (IO ())
+iconLoaded =
+ Signal (connect_NONE__NONE "icon-loaded")
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 1071
-onRedo :: WebViewClass self => self -> (IO ()) -> IO(ConnectId self)
-onRedo =
- connect_NONE__NONE "redo" True
+redo :: WebViewClass self => Signal self (IO ())
+redo =
+ Signal (connect_NONE__NONE "redo")
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 1078
-onUndo :: WebViewClass self => self -> (IO ()) -> IO(ConnectId self)
-onUndo =
- connect_NONE__NONE "undo" True [_$_]
+undo :: WebViewClass self => Signal self (IO ())
+undo =
+ Signal (connect_NONE__NONE "undo")
+
+-- | Decide whether or not to display the given MIME type. [_$_]
+-- If this signal is not handled, the default behavior is to show the content of the
+-- requested URI if WebKit can show this MIME type and the content disposition is not a download; [_$_]
+-- if WebKit is not able to show the MIME type nothing happens.
+--
+-- Notice that if you return True, meaning that you handled the signal, [_$_]
+-- you are expected to be aware of the "Content-Disposition" header. [_$_]
+-- A value of "attachment" usually indicates a download regardless of the MIME type, [_$_]
+-- see also soupMessageHeadersGetContentDisposition'
+-- And you must call 'webPolicyDecisionIgnore', 'webPolicyDecisionDownload', or 'webPolicyDecisionUse' [_$_]
+-- on the 'webPolicyDecision' object.
+mimeTypePolicyDecisionRequested :: WebViewClass self => Signal self (WebFrame -> NetworkRequest -> String -> WebPolicyDecision -> IO Bool)
+mimeTypePolicyDecisionRequested = Signal (connect_OBJECT_OBJECT_STRING_OBJECT__BOOL "mime-type-policy-decision-requested")
+
+-- | The 'moveCursor' will be emitted to apply the cursor movement described by its parameters to the view.
+moveCursor :: WebViewClass self => Signal self (MovementStep -> Int -> IO Bool)
+moveCursor = Signal (connect_ENUM_INT__BOOL "move-cursor")
+
+-- | Emitted when frame requests a navigation to another page. [_$_]
+-- If this signal is not handled, the default behavior is to allow the navigation.
+--
+-- Notice that if you return True, meaning that you handled the signal, [_$_]
+-- you are expected to be aware of the "Content-Disposition" header. [_$_]
+-- A value of "attachment" usually indicates a download regardless of the MIME type, [_$_]
+-- see also soupMessageHeadersGetContentDisposition'
+-- And you must call 'webPolicyDecisionIgnore', 'webPolicyDecisionDownload', or 'webPolicyDecisionUse' [_$_]
+-- on the 'webPolicyDecision' object.
+navigationPolicyDecisionRequested :: WebViewClass self => Signal self (WebFrame -> NetworkRequest -> WebNavigationAction -> WebPolicyDecision -> IO Bool)
+navigationPolicyDecisionRequested = Signal (connect_OBJECT_OBJECT_OBJECT_OBJECT__BOOL "navigation-policy-decision-requested")
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 1112
+-- | Emitted when frame requests opening a new window. [_$_]
+-- With this signal the browser can use the context of the request to decide about the new window. [_$_]
+-- If the request is not handled the default behavior is to allow opening the new window to load the URI, [_$_]
+-- which will cause a 'createWebView' signal emission where the browser handles the new window action [_$_]
+-- but without information of the context that caused the navigation. [_$_]
+-- The following 'navigationPolicyDecisionRequested' emissions will load the page [_$_]
+-- after the creation of the new window just with the information of this new navigation context, [_$_]
+-- without any information about the action that made this new window to be opened.
+--
+-- Notice that if you return True, meaning that you handled the signal, [_$_]
+-- you are expected to be aware of the "Content-Disposition" header. [_$_]
+-- A value of "attachment" usually indicates a download regardless of the MIME type, [_$_]
+-- see also soupMessageHeadersGetContentDisposition'
+-- And you must call 'webPolicyDecisionIgnore', 'webPolicyDecisionDownload', or 'webPolicyDecisionUse' [_$_]
+-- on the 'webPolicyDecision' object.
+newWindowPolicyDecisionRequested :: WebViewClass self => Signal self (WebFrame -> NetworkRequest -> WebNavigationAction -> WebPolicyDecision -> IO Bool)
+newWindowPolicyDecisionRequested = Signal (connect_OBJECT_OBJECT_OBJECT_OBJECT__BOOL "new-window-policy-decision-requested")
+
+-- | Emitted when a request is about to be sent. [_$_]
+-- You can modify the request while handling this signal. [_$_]
+-- You can set the URI in the 'NetworkRequest' object itself, [_$_]
+-- and add/remove/replace headers using the SoupMessage object it carries, [_$_]
+-- if it is present. See 'networkRequestGetMessage'. [_$_]
+-- Setting the request URI to "about:blank" will effectively cause the request to load nothing, [_$_]
+-- and can be used to disable the loading of specific resources.
+--
+-- Notice that information about an eventual redirect is available in response's SoupMessage, [_$_]
+-- not in the SoupMessage carried by the request.
+-- If response is NULL, then this is not a redirected request.
+--
+-- The 'WebResource' object will be the same throughout all the lifetime of the resource, [_$_]
+-- but the contents may change from inbetween signal emissions.
+resourceRequestStarting :: WebViewClass self => Signal self (WebFrame -> WebResource -> NetworkRequest -> NetworkResponse -> IO ())
+resourceRequestStarting = Signal (connect_OBJECT_OBJECT_OBJECT_OBJECT__NONE "resource-request-starting")
|
|
From: Andy S. <And...@co...> - 2010-03-18 20:11:10
|
Thu Mar 18 16:10:15 EDT 2010 Andy Stewart <laz...@gm...>
* Add notes for GtkSocket/GtkPlug.
Ignore-this: 6223d20eb1a44b44daf045e5e9d1e154
addfile ./demo/embedded/Notes.txt
hunk ./demo/embedded/Notes.txt 1
+If you use GtkSocket/GtkPlug with multi-processes framework.
+DON'T use function `forkProcess` to spawn process!
+
+Because `forkProcess` just simple call C `fork`, haven't any protection,
+then two processes will got *race condition*,
+you will get X Window error (such as `BadWindow`) when those two processes
+try to access same X resource.
+
+So use `runProcess` or `runCommand` instead.
+Above two functions add MVar lock when spawn processes (call c_runInteractiveProcess)
+to make sure two processes won't get *race condition* problem on X resource.
|
|
From: Andy S. <And...@co...> - 2010-03-18 19:57:25
|
Thu Mar 18 15:55:45 EDT 2010 Andy Stewart <laz...@gm...>
* Add me to Author for maintain longly. :)
Ignore-this: c1b2d1374bf9009785769ff0e1aba56c
hunk ./AUTHORS 7
+Andy Stewart <laz...@gm...>
+
|
|
From: Andy S. <And...@co...> - 2010-03-18 16:47:13
|
Thu Mar 18 12:12:17 EDT 2010 Andy Stewart <laz...@gm...>
* Fix compile error of Webkit patch.
Ignore-this: 2a53ca7d0b84edf5ad6a7bc375d88cc0
hunk ./Makefile.am 79
+if ENABLE_WEBKIT
+pkglib_LIBRARIES += libHSwebkit.a
+endif
hunk ./Makefile.am 103
-if ENABLE_WEBKIT
-pkglib_LIBRARIES += libHSwebkit.a
-endif
hunk ./Makefile.am 990
-endif
+endif #ENABLE_GTK
hunk ./Makefile.am 1141
- [_$_]
+
hunk ./Makefile.am 1152
-libHSvte_a_LIBADD = \
- vte/Graphics/UI/Gtk/Vte/Vte_stub.o
-
hunk ./Makefile.am 1156
-[_^I_][_^I_][_^I_][_$_]
hunk ./Makefile.am 1251
+#
+## webkit package
+#
+##################################################################################
+
+if ENABLE_WEBKIT
+
+webkit_PKGNAME = libHSwebkit_a
+
+libHSwebkit_a_NAME = webkit
+libHSwebkit_a_CONFIG = webkit/webkit.package.conf
+libHSwebkit_a_EXTERNALDEPS = base-$(PKG_BASE_VERSION)
+libHSwebkit_a_INTERNALDEPS = gtk glib
+libHSwebkit_a_HEADER = webkit/hswebkit.h
+libHSwebkit_a_PRECOMP = webkit/webkit.precomp
+libHSwebkit_a_LIBS = $(GLIB_LIBS) $(GTK_LIBS) $(WEBKIT_LIBS)
+libHSwebkit_a_HCFLAGS = $(FFI)
+libHSwebkit_a_CFLAGS = $(filter-out -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS) $(WEBKIT_CFLAGS)) [_$_]
+libHSwebkit_a_CPPFLAGS = $(filter -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS) $(WEBKIT_CFLAGS))
+
+
+libHSwebkit_a_SOURCESDIRS = webkit
+
+libHSwebkit_a_GENERATEDSOURCES = \
+ webkit/Graphics/UI/Gtk/WebKit/Types.chs
+
+nodist_libHSwebkit_a_SOURCES = $(libHSwebkit_a_GENERATEDSOURCES)
+
+libHSwebkit_a_SOURCES = \
+ webkit/Graphics/UI/Gtk/WebKit/WebView.chs \
+ webkit/Graphics/UI/Gtk/WebKit/WebFrame.chs \
+ webkit/Graphics/UI/Gtk/WebKit/WebSettings.chs \
+ webkit/Graphics/UI/Gtk/WebKit/WebHistoryItem.chs \
+ webkit/Graphics/UI/Gtk/WebKit/WebBackForwardList.chs \
+ webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs \
+ webkit/Graphics/UI/Gtk/WebKit/Download.chs \
+ webkit/Graphics/UI/Gtk/WebKit/NetworkRequest.chs \
+ webkit/Graphics/UI/Gtk/WebKit/NetworkResponse.chs [_$_]
+
+htmldoc_HSFILES_HIDDEN += $(libHSwebkit_a_GENERATEDSOURCES:.chs=.hs)
+
+webkit_Graphics_UI_Gtk_Webkit_Types_hs_HCFLAGS = -fglasgow-exts [_$_]
+
+webkit/Graphics/UI/Gtk/WebKit/Types.chs : $(srcdir)/tools/hierarchyGen/hierarchy.list \
+ $(srcdir)/tools/hierarchyGen/TypeGenerator$(EXEEXT) \
+ $(srcdir)/tools/hierarchyGen/Hierarchy.chs.template
+ $(strip $(srcdir)/tools/hierarchyGen/TypeGenerator$(EXEEXT) \
+ $(srcdir)/tools/hierarchyGen/hierarchy.list \
+ $(srcdir)/tools/hierarchyGen/Hierarchy.chs.template \
+ $@ --tag=webkit --lib=webkit --prefix=webkit \
+ --modname=Graphics.UI.Gtk.WebKit.Types \
+ --forward=*System.Glib.GObject \
+ --destructor=objectUnrefFromMainloop \
+ --forward=*Graphics.UI.Gtk.Types)
+
+libHSwebkit_a_ALLSOURCES = $(libHSwebkit_a_SOURCES) $(nodist_libHSwebkit_a_SOURCES)
+
+am_libHSwebkit_a_OBJECTS = \
+ $(addsuffix .$(OBJEXT),$(basename $(basename $(libHSwebkit_a_ALLSOURCES))))
+
+libHSwebkit_a_HSPPFILES = $(filter %.hs.pp, $(libHSwebkit_a_ALLSOURCES))
+libHSwebkit_a_CHSPPFILES = $(filter %.chs.pp,$(libHSwebkit_a_ALLSOURCES))
+libHSwebkit_a_CHSFILES = \
+ $(filter %.chs,$(libHSwebkit_a_ALLSOURCES:.chs.pp=.chs))
+libHSwebkit_a_CHSFILES_HS = $(libHSwebkit_a_CHSFILES:.chs=.hs)
+libHSwebkit_a_HSCFILES = $(filter %.hsc, $(libHSwebkit_a_ALLSOURCES))
+libHSwebkit_a_HSCFILES_HS = $(libHSwebkit_a_HSCFILES:.hsc=.hs)
+libHSwebkit_a_BUILDSOURCES = \
+ $(libHSwebkit_a_HSPPFILES:.hs.pp=.hs) \
+ $(libHSwebkit_a_CHSPPFILES:.chs.pp=.chs) \
+ $(libHSwebkit_a_CHSFILES_HS) \
+ $(libHSwebkit_a_HSCFILES_HS) \
+ $(libHSwebkit_a_GENERATEDSOURCES)
+libHSwebkit_a_HSFILES = \
+ $(filter %.hs,$(libHSwebkit_a_BUILDSOURCES)) \
+ $(filter %.hs,$(libHSwebkit_a_ALLSOURCES))
+
+nobase_hi_DATA += $(libHSwebkit_a_HSFILES:.hs=.hi)
+
+webkit_MOSTLYCLEANFILES = $(am_libHSwebkit_a_OBJECTS)
+webkit_MOSTLYCLEANFILES += $(libHSwebkit_a_HSFILES:.hs=.hi)
+webkit_MOSTLYCLEANFILES += $(libHSwebkit_a_CHSFILES:.chs=.chi)
+webkit_CLEANFILES = $(libHSwebkit_a_BUILDSOURCES)
+webkit_CLEANFILES += $(libHSwebkit_a_CHSFILES_HS:.hs=.dep)
+webkit_CLEANFILES += \
+ $(libHSwebkit_a_HSCFILES:.hsc=_hsc_make$(EXEEXT)) \
+ $(libHSwebkit_a_HSCFILES:.hsc=_hsc_make.c) \
+ $(libHSwebkit_a_HSCFILES:.hsc=_hsc_make.o)
+
+webkit/libHSwebkit_a.deps: $(libHSwebkit_a_HSFILES) | \
+ $(foreach pkg,$(libHSwebkit_a_INTERNALDEPS),$(pkg)/libHS$(pkg)_a.deps)
+$(libHSwebkit_a_CHSFILES:.chs=.dep): \
+ $(foreach pkg,webkit $(libHSglib_a_INTERNALDEPS),$(libHS$(pkg)_a_CHSFILES))
+$(libHSwebkit_a_CHSFILES_HS): $(libHSwebkit_a_PRECOMP)
+$(libHSwebkit_a_OBJECTS) : \
+ $(foreach pkg,$(libHSwebkit_a_INTERNALDEPS),$(libHS$(pkg)_a_OBJECTS))
+
+EARLY_DEPS += $(libHSwebkit_a_CHSFILES:.chs=.dep)
+
+ifeq (,$(DONT_USE_DEPS))
+-include $(libHSwebkit_a_CHSFILES:.chs=.dep) webkit/libHSwebkit_a.deps
+ endif
+
+if ENABLE_SPLITOBJS
+libHSwebkit_a_AR = $(srcdir)/mk/link-splitobjs.sh
+webkit_CLEANFILES_SPLIT = $(libHSwebkit_a_HSFILES:.hs=_split/)
+else
+libHSwebkit_a_AR = $(AR) $(ARFLAGS)
+endif
+
+libHSwebkit_a_DEPENDENCIES = HSwebkit.o
+pkglib_DATA += HSwebkit.o
+HSwebkit.o : $(libHSwebkit_a_OBJECTS)
+ $(LD) -r $(LD_X) -o $@ $(libHSwebkit_a_OBJECTS) $(libHSwebkit_a_LIBADD)
+
+if ENABLE_PROFILING
+libHSwebkit_a_DEPENDENCIES += libHSwebkit_p.a
+pkglib_DATA += libHSwebkit_p.a
+libHSwebkit_p.a : $(libHSwebkit_a_HSFILES:.hs=.p_o) \
+ $(libHSwebkit_a_LIBADD:.o=.p_o)
+ $(AR) $(ARFLAGS) $@ $^
+
+ifeq (,$(DONT_USE_DEPS))
+-include webkit/libHSwebkit_a.p_deps
+ endif
+
+nobase_hi_DATA += $(libHSwebkit_a_HSFILES:.hs=.p_hi)
+webkit_MOSTLYCLEANFILES += $(libHSwebkit_a_HSFILES:.hs=.p_hi)
+webkit_MOSTLYCLEANFILES += $(libHSwebkit_a_HSFILES:.hs=.p_o)
+webkit_MOSTLYCLEANFILES += $(libHSwebkit_a_LIBADD:.o=.p_o)
+endif
+
+endif #ENABLE_WEBKIT
+
hunk ./Makefile.am 2841
-endif
-
-
-#
-# webkit package
-#
-#################################################################################
-
-if ENABLE_WEBKIT
-
-webkit_PKGNAME = libHSwebkit_a
-
-libHSwebkit_a_NAME = webkit
-libHSwebkit_a_CONFIG = webkit/webkit.package.conf
-libHSwebkit_a_EXTERNALDEPS = base-$(PKG_BASE_VERSION)
-libHSwebkit_a_INTERNALDEPS = gtk glib
-libHSwebkit_a_HEADER = webkit/hswebkit.h
-libHSwebkit_a_PRECOMP = webkit/webkit.precomp
-libHSwebkit_a_LIBS = $(GLIB_LIBS) $(GTK_LIBS) $(WEBKIT_LIBS)
-libHSwebkit_a_HCFLAGS = $(FFI)
-libHSwebkit_a_CFLAGS = $(filter-out -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS) $(WEBKIT_CFLAGS)) [_$_]
-libHSwebkit_a_CPPFLAGS = $(filter -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS) $(WEBKIT_CFLAGS))
-
-
-libHSwebkit_a_SOURCESDIRS = webkit
-
-libHSwebkit_a_GENERATEDSOURCES = \
- webkit/Graphics/UI/Gtk/WebKit/Types.chs
-
-nodist_libHSwebkit_a_SOURCES = $(libHSwebkit_a_GENERATEDSOURCES)
-
-libHSwebkit_a_SOURCES = \
- webkit/Graphics/UI/Gtk/WebKit/WebView.chs \
- webkit/Graphics/UI/Gtk/WebKit/WebFrame.chs \
- webkit/Graphics/UI/Gtk/WebKit/WebSettings.chs \
- webkit/Graphics/UI/Gtk/WebKit/WebHistoryItem.chs \
- webkit/Graphics/UI/Gtk/WebKit/WebBackForwardList.chs \
- webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs \
- webkit/Graphics/UI/Gtk/WebKit/Download.chs \
- webkit/Graphics/UI/Gtk/WebKit/NetworkRequest.chs \
- webkit/Graphics/UI/Gtk/WebKit/NetworkResponse.chs [_$_]
-
-htmldoc_HSFILES_HIDDEN += $(libHSwebkit_a_GENERATEDSOURCES:.chs=.hs)
-
-webkit_Graphics_UI_Gtk_WebKit_Types_hs_HCFLAGS = -fglasgow-exts
-
-webkit/Graphics/UI/Gtk/WebKit/Types.chs : $(srcdir)/tools/hierarchyGen/hierarchy.list \
- $(srcdir)/tools/hierarchyGen/TypeGenerator$(EXEEXT) \
- $(srcdir)/tools/hierarchyGen/Hierarchy.chs.template
- $(strip $(srcdir)/tools/hierarchyGen/TypeGenerator$(EXEEXT) \
- $(srcdir)/tools/hierarchyGen/hierarchy.list \
- $(srcdir)/tools/hierarchyGen/Hierarchy.chs.template \
- $@ --tag=webkit --lib=webkit --prefix=webkit \
- --modname=Graphics.UI.Gtk.WebKit.Types \
- --parentname=Graphics.UI.Gtk.Types)
-
-libHSwebkit_a_ALLSOURCES = $(libHSwebkit_a_SOURCES) $(nodist_libHSwebkit_a_SOURCES)
-
-am_libHSwebkit_a_OBJECTS = \
- $(addsuffix .$(OBJEXT),$(basename $(basename $(libHSwebkit_a_ALLSOURCES))))
-
-libHSwebkit_a_HSPPFILES = $(filter %.hs.pp, $(libHSwebkit_a_ALLSOURCES))
-libHSwebkit_a_CHSPPFILES = $(filter %.chs.pp,$(libHSwebkit_a_ALLSOURCES))
-libHSwebkit_a_CHSFILES = \
- $(filter %.chs,$(libHSwebkit_a_ALLSOURCES:.chs.pp=.chs))
-libHSwebkit_a_CHSFILES_HS = $(libHSwebkit_a_CHSFILES:.chs=.hs)
-libHSwebkit_a_HSCFILES = $(filter %.hsc, $(libHSwebkit_a_ALLSOURCES))
-libHSwebkit_a_HSCFILES_HS = $(libHSwebkit_a_HSCFILES:.hsc=.hs)
-libHSwebkit_a_BUILDSOURCES = \
- $(libHSwebkit_a_HSPPFILES:.hs.pp=.hs) \
- $(libHSwebkit_a_CHSPPFILES:.chs.pp=.chs) \
- $(libHSwebkit_a_CHSFILES_HS) \
- $(libHSwebkit_a_HSCFILES_HS) \
- $(libHSwebkit_a_GENERATEDSOURCES)
-libHSwebkit_a_HSFILES = \
- $(filter %.hs,$(libHSwebkit_a_BUILDSOURCES)) \
- $(filter %.hs,$(libHSwebkit_a_ALLSOURCES))
-
-nobase_hi_DATA += $(libHSwebkit_a_HSFILES:.hs=.hi)
-
-webkit_MOSTLYCLEANFILES = $(am_libHSwebkit_a_OBJECTS)
-webkit_MOSTLYCLEANFILES += $(libHSwebkit_a_HSFILES:.hs=.hi)
-webkit_MOSTLYCLEANFILES += $(libHSwebkit_a_CHSFILES:.chs=.chi)
-webkit_CLEANFILES = $(libHSwebkit_a_BUILDSOURCES)
-webkit_CLEANFILES += $(libHSwebkit_a_CHSFILES_HS:.hs=.dep)
-webkit_CLEANFILES += \
- $(libHSwebkit_a_HSCFILES:.hsc=_hsc_make$(EXEEXT)) \
- $(libHSwebkit_a_HSCFILES:.hsc=_hsc_make.c) \
- $(libHSwebkit_a_HSCFILES:.hsc=_hsc_make.o)
-
-webkit/libHSwebkit_a.deps: $(libHSwebkit_a_HSFILES) | \
- $(foreach pkg,$(libHSwebkit_a_INTERNALDEPS),$(pkg)/libHS$(pkg)_a.deps)
-$(libHSwebkit_a_CHSFILES:.chs=.dep): \
- $(foreach pkg,webkit $(libHSglib_a_INTERNALDEPS),$(libHS$(pkg)_a_CHSFILES))
-$(libHSwebkit_a_CHSFILES_HS): $(libHSwebkit_a_PRECOMP)
-$(libHSwebkit_a_OBJECTS) : \
- $(foreach pkg,$(libHSwebkit_a_INTERNALDEPS),$(libHS$(pkg)_a_OBJECTS))
-
-EARLY_DEPS += $(libHSwebkit_a_CHSFILES:.chs=.dep)
-
-ifeq (,$(DONT_USE_DEPS))
--include $(libHSwebkit_a_CHSFILES:.chs=.dep) webkit/libHSwebkit_a.deps
- endif
-
-if ENABLE_SPLITOBJS
-libHSwebkit_a_AR = $(srcdir)/mk/link-splitobjs.sh
-webkit_CLEANFILES_SPLIT = $(libHSwebkit_a_HSFILES:.hs=_split/)
-else
-libHSwebkit_a_AR = $(AR) $(ARFLAGS)
-endif
-
-libHSwebkit_a_DEPENDENCIES = HSwebkit.o
-pkglib_DATA += HSwebkit.o
-HSwebkit.o : $(libHSwebkit_a_OBJECTS)
- $(LD) -r $(LD_X) -o $@ $(libHSwebkit_a_OBJECTS) $(libHSwebkit_a_LIBADD)
-
-if ENABLE_PROFILING
-libHSwebkit_a_DEPENDENCIES += libHSwebkit_p.a
-pkglib_DATA += libHSwebkit_p.a
-libHSwebkit_p.a : $(libHSwebkit_a_HSFILES:.hs=.p_o) \
- $(libHSwebkit_a_LIBADD:.o=.p_o)
- $(AR) $(ARFLAGS) $@ $^
-
-ifeq (,$(DONT_USE_DEPS))
--include webkit/libHSwebkit_a.p_deps
- endif
-
-nobase_hi_DATA += $(libHSwebkit_a_HSFILES:.hs=.p_hi)
-webkit_MOSTLYCLEANFILES += $(libHSwebkit_a_HSFILES:.hs=.p_hi)
-webkit_MOSTLYCLEANFILES += $(libHSwebkit_a_HSFILES:.hs=.p_o)
-webkit_MOSTLYCLEANFILES += $(libHSwebkit_a_LIBADD:.o=.p_o)
-endif
-
-endif #ENABLE_WEBKIT
+endif #ENABLE_GSTREAMER
hunk ./tools/hierarchyGen/hierarchy.list 60
+ WebkitWebView as WebView if webkit [_$_]
hunk ./tools/hierarchyGen/hierarchy.list 106
- WebkitWebView as WebView if webkit [_$_]
- WebkitWebFrame as WebFrame if webkit [_$_]
- WebkitWebSettings as WebSettings if webkit
- WebkitNetworkRequest as NetworkRequest if webkit
- WebkitNetworkResponse as NetworkResponse if webkit
- WebkitDownload as Download if webkit
- WebkitWebBackForwardList as WebBackForwardList if webkit
- WebkitWebHistoryItem as WebHistoryItem if webkit
- WebkitWebInspector as WebInspector if webkit
- WebkitWebNavigationAction as WebNavigationAction if webkit [_$_]
- WebkitWebPolicyDecision as WebPolicyDecision if webkit
- WebkitWebWindowFeatures as WebWindowFeatures if webkit
- WebkitWebDatabase as WebDatabase if webkit
- WebkitWebDataSource as WebDataSource if webkit
- WebkitWebResource as WebResource if webkit
- WebkitSecurityOrigin as SecurityOrigin if webkit
hunk ./tools/hierarchyGen/hierarchy.list 169
-
+[_^I_][_^I_][_^I_][_$_]
hunk ./tools/hierarchyGen/hierarchy.list 318
+
+ WebkitWebFrame as WebFrame if webkit [_$_]
+ WebkitWebSettings as WebSettings if webkit
+ WebkitNetworkRequest as NetworkRequest if webkit
+ WebkitNetworkResponse as NetworkResponse if webkit
+ WebkitDownload as Download if webkit
+ WebkitWebBackForwardList as WebBackForwardList if webkit
+ WebkitWebHistoryItem as WebHistoryItem if webkit
+ WebkitWebInspector as WebInspector if webkit
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 129
- onHoveringOverLink,
+ -- onHoveringOverLink,
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 131
- onCreateWebView,
+ -- onCreateWebView,
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 143
+-- import Data.IORef
+
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 802
-onHoveringOverLink :: WebViewClass self => self -> (Maybe String -> Maybe String -> IO()) -> IO(ConnectId self)
-onHoveringOverLink =
- connect_BOXED_BOXED__NONE "hovering-over-link" readMString True
- where
- readMString strPtr | strPtr==nullPtr = return Nothing
- | otherwise = liftM Just $ peekUTFString strPtr
+-- onHoveringOverLink :: WebViewClass self => self -> (Maybe String -> Maybe String -> IO()) -> IO(ConnectId self)
+-- onHoveringOverLink =
+-- connect_BOXED_BOXED__NONE "hovering-over-link" readMString True
+-- where
+-- readMString strPtr | strPtr==nullPtr = return Nothing
+-- | otherwise = liftM Just $ peekUTFString strPtr
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 855
-onCreateWebView :: WebViewClass self => self -> (WebFrame -> IO WebView) -> IO (ConnectId self)
-onCreateWebView = \vw act
- connect_OBJECT__PTR "create-web-view" True vw act'
- where
- act' wf = do
- wv <- act wf
- -- We need to return a Ptr WebView to the caller of this signal. To
- -- prevent the garbage collector from freeing the WebView before this
- -- signal returns, we increment the reference count of the object and
- -- decrement it as soon as the 'webViewReady' signal is emitted which
- -- always happens after this signal returns.
- gObjectRef wv
- sidRef <- newIORef undefined
- sid <- onWebViewReady wv $ do
- gObjectUnref wv
- sid <- readIORef sidRef
- signalDisconnect wv sid
- return False
- writeIORef sidRef sid
- return unsafeForeignPtrToPtr (unWebView wv)
-
+-- onCreateWebView :: WebViewClass self => self -> (WebFrame -> IO WebView) -> IO (ConnectId self)
+-- -- onCreateWebView = \vw act
+-- onCreateWebView vw act =
+-- connect_OBJECT__PTR "create-web-view" True vw act'
+-- where
+-- act' wf = do
+-- wv <- act wf
+-- -- We need to return a Ptr WebView to the caller of this signal. To
+-- -- prevent the garbage collector from freeing the WebView before this
+-- -- signal returns, we increment the reference count of the object and
+-- -- decrement it as soon as the 'webViewReady' signal is emitted which
+-- -- always happens after this signal returns.
+-- gObjectRef wv
+-- sidRef <- newIORef undefined
+-- sid <- onWebViewReady wv $ do
+-- gObjectUnref wv
+-- sid <- readIORef sidRef
+-- signalDisconnect wv sid
+-- return False
+-- writeIORef sidRef sid
+-- return unsafeForeignPtrToPtr (unWebView wv)
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 899
- [_$_]
-
hunk ./webkit/webkit.package.conf.in 3
+id: webkit-@PACKAGE_VERSION@
hunk ./webkit/webkit.package.conf.in 17
-depends: base-@PKG_BASE_VERSION@ gtk-@PACKAGE_VERSION@
+depends: @PKG_BASE_ID@ gtk-@PACKAGE_VERSION@
|
|
From: Andy S. <And...@co...> - 2010-03-13 16:13:23
|
Sat Mar 13 11:11:57 EST 2010 Andy Stewart <laz...@gm...>
* Add missing demo/embedded directory, i don't know how to remove it. Sorry!
Ignore-this: 87c60d1b7f85e37d955dddcf69ca4cf2
adddir ./demo/embedded
addfile ./demo/embedded/Embedded.hs
hunk ./demo/embedded/Embedded.hs 1
+-- Use GtkSocket and GtkPlug for cross-process embedded.
+-- Just startup program, press 'm' to create tab with new button.
+-- Click button for hang to simulate plug hanging process, [_$_]
+-- but socket process still running, can switch to other tab. [_$_]
+
+module Main where
+
+import System.Process
+import System.Environment
+import System.Directory
+import System.FilePath ((</>))
+import Control.Monad
+import Control.Monad.Trans
+import Control.Concurrent
+
+import Graphics.UI.Gtk
+import Graphics.UI.Gtk.General.Structs
+import Graphics.UI.Gtk.Gdk.EventM
+
+-- | Main.
+main :: IO ()
+main = do
+ -- Get program arguments.
+ args <- getArgs
+
+ case args of
+ -- Entry plug main when have two arguments.
+ [id] -> plugMain (toNativeWindowId $ read id :: NativeWindowId) -- get GtkSocket id
+ -- Othersise entry socket main when no arguments.
+ _ -> socketMain [_$_]
+ [_$_]
+-- | GtkSocekt main.
+socketMain :: IO () [_$_]
+socketMain = do
+ initGUI
+
+ -- Create top-level window.
+ window <- windowNew
+ windowSetPosition window WinPosCenter
+ windowSetDefaultSize window 600 400
+ windowSetTitle window "Press `m` to new tab, press `q` exit."
+ window `onDestroy` mainQuit
+
+ -- Create notebook to contain GtkSocekt.
+ notebook <- notebookNew
+ window `containerAdd` notebook
+
+ -- Handle key press.
+ window `on` keyPressEvent $ tryEvent $ do
+ keyName <- eventKeyName
+ liftIO $ [_$_]
+ case keyName of
+ "m" -> do
+ -- Create new GtkSocket.
+ socket <- socketNew
+ widgetShow socket -- must show before add GtkSocekt to container
+ notebookAppendPage notebook socket "Tab" -- add to GtkSocekt notebook
+ id <- socketGetId socket -- get GtkSocket id
+
+ -- Fork process to add GtkPlug into GtkSocekt. [_$_]
+ path <- liftM2 (</>) getCurrentDirectory getProgName -- get program full path
+ runCommand $ path ++ " " ++ (show $ fromNativeWindowId id) -- don't use `forkProcess` [_$_]
+ return ()
+ "q" -> mainQuit -- quit
+
+ widgetShowAll window
+
+ mainGUI
+
+-- | GtkPlug main.
+plugMain :: NativeWindowId -> IO ()
+plugMain id = do
+ initGUI
+
+ plug <- plugNew $ Just id
+ plug `onDestroy` mainQuit
+ [_$_]
+ button <- buttonNewWithLabel "Click me to hang."
+ plug `containerAdd` button
+
+ -- Simulate a plugin hanging to see if it blocks the outer process.
+ button `onClicked` threadDelay 5000000
+ [_$_]
+ widgetShowAll plug
+ [_$_]
+ mainGUI
addfile ./demo/embedded/Makefile
hunk ./demo/embedded/Makefile 1
+
+PROGS = Embedded Uzbl
+SOURCES = Embedded.hs Uzbl.hs
+
+all : $(PROGS)
+
+Embedded : Embedded.hs
+ $(HC) --make $< -o $@ $(HCFLAGS)
+
+Uzbl : Uzbl.hs
+ $(HC) --make $< -o $@ $(HCFLAGS)
+
+clean:
+ rm -f $(SOURCES:.hs=.hi) $(SOURCES:.hs=.o) $(PROGS)
+
+HC=ghc
addfile ./demo/embedded/Uzbl.hs
hunk ./demo/embedded/Uzbl.hs 1
+-- | This is program use uzbl embedded in window to render webpage.
+-- Just simple model demo for view, haven't handle event or else. [_$_]
+--
+-- You need install uzbl (git clone git://github.com/Dieterbe/uzbl.git) first.
+-- [_$_]
+-- How to use: [_$_]
+-- ./Uzbl default open Google page.
+-- ./Uzbl url will open url you input
+--
+module Main where
+
+import Graphics.UI.Gtk
+import Graphics.UI.Gtk.General.Structs
+import System.Process
+import System.Environment [_$_]
+
+main :: IO ()
+main = do
+ -- Init.
+ initGUI
+ [_$_]
+ -- Get program arguments.
+ args <- getArgs
+ let url = case args of
+ [arg] -> arg -- get user input url
+ _ -> "http://www.google.com" -- set default url
+
+ -- Create window.
+ window <- windowNew
+ windowSetDefaultSize window 900 600
+ windowSetPosition window WinPosCenter
+ windowSetOpacity window 0.8 -- this function need window-manager support Alpha channel in X11
+ [_$_]
+ -- Create socket.
+ socket <- socketNew
+ widgetShow socket -- must show before add to parent
+ window `containerAdd` socket
+
+ -- Get socket id.
+ socketId <- fmap (show . fromNativeWindowId) $ socketGetId socket
+
+ -- Start uzbl-core process.
+ runCommand $ "uzbl-core -s " ++ socketId ++ " -u " ++ url
+
+ -- Show.
+ window `onDestroy` mainQuit
+ widgetShowAll window
+
+ mainGUI
|
|
From: Andy S. <And...@co...> - 2010-03-13 13:14:36
|
Sat Mar 13 08:10:51 EST 2010 Andy Stewart <laz...@gm...>
* Update embedded demo (looks uzbl demo lost when merge patchs).
Ignore-this: ff89b127ee7e9a526d4c3a252bbca9bb
hunk ./demo/embbeded/Embedded.hs 1
--- |Use GtkSocket and GtkPlug for cross-process embedded.
--- Just startup program, press 'm' to create tab with new button.
--- Click button for hang to simulate plug hanging process, [_$_]
--- but socket process still running, can switch to other tab. [_$_]
---
--- Note:
---
--- Don't use `forkProcess` in gtk2hs!
--- Because `forkProcess` haven't any protect when spawn process, [_$_]
--- so you will got two processes *race condition*, when those two
--- process access same resource will crash your program.
--- Solution is use `runProcess` or `runCommand` instead, [_$_]
--- Because those functions add MVar to make sure two processes won't
--- get *race condition* problem.
---
-
-module Main where
-
-import System.Process
-import System.Environment
-import System.Directory
-import System.FilePath ((</>))
-import Control.Monad
-import Control.Monad.Trans
-import Control.Concurrent
-
-import Graphics.UI.Gtk
-import Graphics.UI.Gtk.General.Structs
-import Graphics.UI.Gtk.Gdk.EventM
-
--- | Main.
-main :: IO ()
-main = do
- -- Init main.
- initGUI
-
- -- Get program arguments.
- args <- getArgs
-
- case args of
- -- Entry plug main when have two arguments.
- [id] -> plugMain (toNativeWindowId $ read id :: NativeWindowId) -- get GtkSocket id
- -- Othersise entry socket main when no arguments.
- _ -> socketMain [_$_]
- [_$_]
--- | GtkSocekt main.
-socketMain :: IO () [_$_]
-socketMain = do
- -- Create top-level window.
- window <- windowNew
- windowSetPosition window WinPosCenter
- windowSetDefaultSize window 600 400
- windowSetTitle window "Press `m` to new tab, press `q` exit."
- window `onDestroy` mainQuit
-
- -- Create notebook to contain GtkSocekt.
- notebook <- notebookNew
- window `containerAdd` notebook
-
- -- Handle key press.
- window `on` keyPressEvent $ tryEvent $ do
- keyName <- eventKeyName
- liftIO $ [_$_]
- case keyName of
- "m" -> do
- -- Create new GtkSocket.
- socket <- socketNew
- widgetShow socket -- must show before add GtkSocekt to container
- notebookAppendPage notebook socket "Tab" -- add to GtkSocekt notebook
- id <- socketGetId socket -- get GtkSocket id
-
- -- Fork process to add GtkPlug into GtkSocekt. [_$_]
- path <- liftM2 (</>) getCurrentDirectory getProgName -- get program full path
- runCommand $ path ++ " " ++ (show $ fromNativeWindowId id) -- don't use `forkProcess` !
- return ()
- "q" -> mainQuit -- quit
-
- widgetShowAll window
-
- mainGUI
-
--- | GtkPlug main.
-plugMain :: NativeWindowId -> IO ()
-plugMain id = do
- plug <- plugNew $ Just id
- plug `onDestroy` mainQuit
- [_$_]
- button <- buttonNewWithLabel "Click me to hang."
- plug `containerAdd` button
-
- -- Simulate a plugin hanging to see if it blocks the outer process.
- button `onClicked` threadDelay 5000000
- [_$_]
- widgetShowAll plug
- [_$_]
- mainGUI
rmfile ./demo/embbeded/Embedded.hs
hunk ./demo/embbeded/Makefile 1
-PROGS = Embedded Uzbl
-SOURCES = Embedded.hs Uzbl.hs
-
-all : $(PROGS)
-
-Embedded : Embedded.hs
- $(HC_RULE)
-
-Uzbl : Uzbl.hs
- $(HC_RULE)
-
-HC_RULE = $(HC) --make $< -o $@ $(HCFLAGS)
-
-clean:
- rm -f $(SOURCES:.hs=.hi) $(SOURCES:.hs=.o) $(PROGS)
-
-HC=ghc
rmfile ./demo/embbeded/Makefile
rmdir ./demo/embbeded
|
|
From: Axel S. <si...@co...> - 2010-03-13 09:48:17
|
Thu Mar 11 07:12:49 EST 2010 Daniel Wagner <da...@wa...>
* some minor improvements to the documentation
Ignore-this: 75da59c73517fc4517b9a695a060dbfd
hunk ./docs/tutorial/common.mk 48
- $(HC) $< -o $@
+ $(HC) --make $< -o $@
hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 2468
--- * This event is useful for the 'DrawingArea'. On receiving this signal
--- the content of the passed 'Rectangle' or 'Region' needs to be redrawn.
--- If a client will redraw the whole area and is not interested in the
--- extra information in 'Expose', it is more efficient
--- to use 'exposeEventRect'.
+-- * The 'DrawWindow' that needs to be redrawn is available via
+-- 'eventWindow'.
hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 2471
--- * Widgets that are very expensive to re-render, such as an image editor,
--- may prefer to use the 'exposeEvent' which delivers a
--- 'Region' in addition to a 'Rectangle'. A 'Region' consists of several
--- rectangles that need redrawing.
+-- * The part that needs to be redrawn is available via 'eventArea' and
+-- 'eventRegion'. The options are, in order of efficiency: (a) redraw the
+-- entire window, (b) ask for the 'eventArea' and redraw that rectangle, (c)
+-- ask for the 'eventRegion' and redraw each of those rectangles.
hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 2476
+-- Only the exposed region will be updated; see also
+-- 'drawWindowBeginPaintRegion'.
+
hunk ./gtk/Graphics/UI/Gtk/Gdk/DrawWindow.chs.pp 89
+import Graphics.UI.Gtk.Gdk.EventM (eventRegion)
hunk ./gtk/Graphics/UI/Gtk/Gdk/DrawWindow.chs.pp 91
+import Graphics.UI.Gtk.Abstract.Widget (widgetSetDoubleBuffered)
hunk ./gtk/Graphics/UI/Gtk/Gdk/DrawWindow.chs.pp 171
--- If @DrawWindow@ is a toplevel, the drawWindow manager may choose to deny the
+-- If @DrawWindow@ is a toplevel, the window manager may choose to deny the
hunk ./gtk/Graphics/UI/Gtk/Gdk/DrawWindow.chs.pp 237
--- expose_event signal. That is, if you\'re writing an expose event handler,
--- you can assume that the exposed area in "EventExpose" has already been
+-- @expose_event@ signal. That is, if you\'re writing an expose event handler,
+-- you can assume that the exposed area in 'eventRegion' has already been
hunk ./gtk/Graphics/UI/Gtk/Gdk/DrawWindow.chs.pp 243
--- 'Graphics.UI.Gtk.Abstract.Widget.widgetSetDoubleBuffered'.)
+-- 'widgetSetDoubleBuffered'.)
hunk ./gtk/Graphics/UI/Gtk/Gdk/DrawWindow.chs.pp 315
--- handed to you. If a this window has no update area, 'drawWindowGetUpdateArea' returns 'Nothing'.
+-- handed to you. If this window has no update area, 'drawWindowGetUpdateArea' returns 'Nothing'.
|
|
From: Axel S. <si...@co...> - 2010-03-13 09:45:46
|
Sun Sep 27 12:58:23 EDT 2009 Axe...@en...
* Add the webkit widget.
hunk ./Makefile.am 100
+if ENABLE_WEBKIT
+pkglib_LIBRARIES += libHSwebkit.a
+endif
hunk ./Makefile.am 2713
+
+#
+# webkit package
+#
+#################################################################################
+
+if ENABLE_WEBKIT
+
+webkit_PKGNAME = libHSwebkit_a
+
+libHSwebkit_a_NAME = webkit
+libHSwebkit_a_CONFIG = webkit/webkit.package.conf
+libHSwebkit_a_EXTERNALDEPS = base-$(PKG_BASE_VERSION)
+libHSwebkit_a_INTERNALDEPS = gtk glib
+libHSwebkit_a_HEADER = webkit/hswebkit.h
+libHSwebkit_a_PRECOMP = webkit/webkit.precomp
+libHSwebkit_a_LIBS = $(GLIB_LIBS) $(GTK_LIBS) $(WEBKIT_LIBS)
+libHSwebkit_a_HCFLAGS = $(FFI)
+libHSwebkit_a_CFLAGS = $(filter-out -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS) $(WEBKIT_CFLAGS)) [_$_]
+libHSwebkit_a_CPPFLAGS = $(filter -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS) $(WEBKIT_CFLAGS))
+
+
+libHSwebkit_a_SOURCESDIRS = webkit
+
+libHSwebkit_a_GENERATEDSOURCES = \
+ webkit/Graphics/UI/Gtk/WebKit/Types.chs
+
+nodist_libHSwebkit_a_SOURCES = $(libHSwebkit_a_GENERATEDSOURCES)
+
+libHSwebkit_a_SOURCES = \
+ webkit/Graphics/UI/Gtk/WebKit/WebView.chs \
+ webkit/Graphics/UI/Gtk/WebKit/WebFrame.chs \
+ webkit/Graphics/UI/Gtk/WebKit/WebSettings.chs \
+ webkit/Graphics/UI/Gtk/WebKit/WebHistoryItem.chs \
+ webkit/Graphics/UI/Gtk/WebKit/WebBackForwardList.chs \
+ webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs \
+ webkit/Graphics/UI/Gtk/WebKit/Download.chs \
+ webkit/Graphics/UI/Gtk/WebKit/NetworkRequest.chs \
+ webkit/Graphics/UI/Gtk/WebKit/NetworkResponse.chs [_$_]
+
+htmldoc_HSFILES_HIDDEN += $(libHSwebkit_a_GENERATEDSOURCES:.chs=.hs)
+
+webkit_Graphics_UI_Gtk_WebKit_Types_hs_HCFLAGS = -fglasgow-exts
+
+webkit/Graphics/UI/Gtk/WebKit/Types.chs : $(srcdir)/tools/hierarchyGen/hierarchy.list \
+ $(srcdir)/tools/hierarchyGen/TypeGenerator$(EXEEXT) \
+ $(srcdir)/tools/hierarchyGen/Hierarchy.chs.template
+ $(strip $(srcdir)/tools/hierarchyGen/TypeGenerator$(EXEEXT) \
+ $(srcdir)/tools/hierarchyGen/hierarchy.list \
+ $(srcdir)/tools/hierarchyGen/Hierarchy.chs.template \
+ $@ --tag=webkit --lib=webkit --prefix=webkit \
+ --modname=Graphics.UI.Gtk.WebKit.Types \
+ --parentname=Graphics.UI.Gtk.Types)
+
+libHSwebkit_a_ALLSOURCES = $(libHSwebkit_a_SOURCES) $(nodist_libHSwebkit_a_SOURCES)
+
+am_libHSwebkit_a_OBJECTS = \
+ $(addsuffix .$(OBJEXT),$(basename $(basename $(libHSwebkit_a_ALLSOURCES))))
+
+libHSwebkit_a_HSPPFILES = $(filter %.hs.pp, $(libHSwebkit_a_ALLSOURCES))
+libHSwebkit_a_CHSPPFILES = $(filter %.chs.pp,$(libHSwebkit_a_ALLSOURCES))
+libHSwebkit_a_CHSFILES = \
+ $(filter %.chs,$(libHSwebkit_a_ALLSOURCES:.chs.pp=.chs))
+libHSwebkit_a_CHSFILES_HS = $(libHSwebkit_a_CHSFILES:.chs=.hs)
+libHSwebkit_a_HSCFILES = $(filter %.hsc, $(libHSwebkit_a_ALLSOURCES))
+libHSwebkit_a_HSCFILES_HS = $(libHSwebkit_a_HSCFILES:.hsc=.hs)
+libHSwebkit_a_BUILDSOURCES = \
+ $(libHSwebkit_a_HSPPFILES:.hs.pp=.hs) \
+ $(libHSwebkit_a_CHSPPFILES:.chs.pp=.chs) \
+ $(libHSwebkit_a_CHSFILES_HS) \
+ $(libHSwebkit_a_HSCFILES_HS) \
+ $(libHSwebkit_a_GENERATEDSOURCES)
+libHSwebkit_a_HSFILES = \
+ $(filter %.hs,$(libHSwebkit_a_BUILDSOURCES)) \
+ $(filter %.hs,$(libHSwebkit_a_ALLSOURCES))
+
+nobase_hi_DATA += $(libHSwebkit_a_HSFILES:.hs=.hi)
+
+webkit_MOSTLYCLEANFILES = $(am_libHSwebkit_a_OBJECTS)
+webkit_MOSTLYCLEANFILES += $(libHSwebkit_a_HSFILES:.hs=.hi)
+webkit_MOSTLYCLEANFILES += $(libHSwebkit_a_CHSFILES:.chs=.chi)
+webkit_CLEANFILES = $(libHSwebkit_a_BUILDSOURCES)
+webkit_CLEANFILES += $(libHSwebkit_a_CHSFILES_HS:.hs=.dep)
+webkit_CLEANFILES += \
+ $(libHSwebkit_a_HSCFILES:.hsc=_hsc_make$(EXEEXT)) \
+ $(libHSwebkit_a_HSCFILES:.hsc=_hsc_make.c) \
+ $(libHSwebkit_a_HSCFILES:.hsc=_hsc_make.o)
+
+webkit/libHSwebkit_a.deps: $(libHSwebkit_a_HSFILES) | \
+ $(foreach pkg,$(libHSwebkit_a_INTERNALDEPS),$(pkg)/libHS$(pkg)_a.deps)
+$(libHSwebkit_a_CHSFILES:.chs=.dep): \
+ $(foreach pkg,webkit $(libHSglib_a_INTERNALDEPS),$(libHS$(pkg)_a_CHSFILES))
+$(libHSwebkit_a_CHSFILES_HS): $(libHSwebkit_a_PRECOMP)
+$(libHSwebkit_a_OBJECTS) : \
+ $(foreach pkg,$(libHSwebkit_a_INTERNALDEPS),$(libHS$(pkg)_a_OBJECTS))
+
+EARLY_DEPS += $(libHSwebkit_a_CHSFILES:.chs=.dep)
+
+ifeq (,$(DONT_USE_DEPS))
+-include $(libHSwebkit_a_CHSFILES:.chs=.dep) webkit/libHSwebkit_a.deps
+ endif
+
+if ENABLE_SPLITOBJS
+libHSwebkit_a_AR = $(srcdir)/mk/link-splitobjs.sh
+webkit_CLEANFILES_SPLIT = $(libHSwebkit_a_HSFILES:.hs=_split/)
+else
+libHSwebkit_a_AR = $(AR) $(ARFLAGS)
+endif
+
+libHSwebkit_a_DEPENDENCIES = HSwebkit.o
+pkglib_DATA += HSwebkit.o
+HSwebkit.o : $(libHSwebkit_a_OBJECTS)
+ $(LD) -r $(LD_X) -o $@ $(libHSwebkit_a_OBJECTS) $(libHSwebkit_a_LIBADD)
+
+if ENABLE_PROFILING
+libHSwebkit_a_DEPENDENCIES += libHSwebkit_p.a
+pkglib_DATA += libHSwebkit_p.a
+libHSwebkit_p.a : $(libHSwebkit_a_HSFILES:.hs=.p_o) \
+ $(libHSwebkit_a_LIBADD:.o=.p_o)
+ $(AR) $(ARFLAGS) $@ $^
+
+ifeq (,$(DONT_USE_DEPS))
+-include webkit/libHSwebkit_a.p_deps
+ endif
+
+nobase_hi_DATA += $(libHSwebkit_a_HSFILES:.hs=.p_hi)
+webkit_MOSTLYCLEANFILES += $(libHSwebkit_a_HSFILES:.hs=.p_hi)
+webkit_MOSTLYCLEANFILES += $(libHSwebkit_a_HSFILES:.hs=.p_o)
+webkit_MOSTLYCLEANFILES += $(libHSwebkit_a_LIBADD:.o=.p_o)
+endif
+
+endif #ENABLE_WEBKIT
+
hunk ./configure.ac 350
+GTKHS_PKG_CHECK(webkit, webkit, WEBKIT, [webkit-1.0 >= 1.1.14], [GLIB GTK],
+ [build webkit package (default=auto)],
+ [webkit library requirement not met. Perhaps you need to install webkit or webkit-devel])
+
hunk ./configure.ac 469
- GTKHS_GLIBC_PTHREAD_HACK(MOZEMBED_LIBS);;
+ GTKHS_GLIBC_PTHREAD_HACK(MOZEMBED_LIBS)
+ GTKHS_GLIBC_PTHREAD_HACK(WEBKIT_LIBS);;
hunk ./configure.ac 663
+GTKHS_PACKAGE_FILTER_CFLAGS([WEBKIT_CFLAGS], [$GLIB_CFLAGS $GTK_CFLAGS], [$WEBKIT_CFLAGS])
+GTKHS_PACKAGE_FILTER_LIBS([WEBKIT_LIBS], [$GLIB_LIBS $GTK_LIBS], [$WEBKIT_LIBS])
+
hunk ./configure.ac 781
+GTKHS_REFORMAT_PACKAGE_CFLAGS(WEBKIT_CFLAGS, WEBKIT_CFLAGS_CQ)
+GTKHS_REFORMAT_PACKAGE_LIBS(WEBKIT_LIBS, WEBKIT_LIBS_CQ,
+ WEBKIT_LIBDIR_CQ, WEBKIT_LIBEXTRA_CQ)
+AC_SUBST(WEBKIT_CFLAGS_CQ)
+AC_SUBST(WEBKIT_LIBS_CQ)
+AC_SUBST(WEBKIT_LIBDIR_CQ)
+AC_SUBST(WEBKIT_LIBEXTRA_CQ)
+
hunk ./configure.ac 980
+ webkit/webkit.package.conf webkit/webkit.cabal
hunk ./configure.ac 1006
+echo "* webkit : ${ENABLE_WEBKIT} "
hunk ./tools/apiGen/Makefile 106
- sed -i 's:( \*link_activated):(\* link_activated):' atk/atk/atkhyperlink.h
+ gnused -i 's:( \*link_activated):(\* link_activated):' atk/atk/atkhyperlink.h
hunk ./tools/callbackGen/HookGenerator.hs 295
+marshRet Tptr body = indent 5. ss "liftM castPtr $ ". body
hunk ./tools/callbackGen/HookGenerator.hs 346
+marshRet Tptr = ss "castPtr"
hunk ./tools/callbackGen/HookGenerator.hs 361
- in str.ss "IO ".str'.sc ')'
+ str'' = if ' ' `elem` (str' "") then (sc '('.str'.sc ')') else str'
+ in str.ss "IO ".str''.sc ')'
hunk ./tools/callbackGen/gtkmarshal.list 31
+BOOLEAN:ENUM,DOUBLE
merger 0.0 (
hunk ./tools/callbackGen/gtkmarshal.list 132
+# for Notebook
+NONE:OBJECT,INT
+BOOLEAN:ENUM,BOOLEAN
+NONE:BOXED,INT
merger 0.0 (
hunk ./tools/callbackGen/gtkmarshal.list 130
+# for TextBuffer
+NONE:BOXED,STRING
hunk ./tools/callbackGen/gtkmarshal.list 130
+# for WebKit
+VOID:POINTER,POINTER
+BOOLEAN:OBJECT
+BOOLEAN:OBJECT,STRING,BOXED
+POINTER:OBJECT
)
)
hunk ./tools/hierarchyGen/hierarchy.list 105
+ WebkitWebView as WebView if webkit [_$_]
+ WebkitWebFrame as WebFrame if webkit [_$_]
+ WebkitWebSettings as WebSettings if webkit
+ WebkitNetworkRequest as NetworkRequest if webkit
+ WebkitNetworkResponse as NetworkResponse if webkit
+ WebkitDownload as Download if webkit
+ WebkitWebBackForwardList as WebBackForwardList if webkit
+ WebkitWebHistoryItem as WebHistoryItem if webkit
+ WebkitWebInspector as WebInspector if webkit
+ WebkitWebNavigationAction as WebNavigationAction if webkit [_$_]
+ WebkitWebPolicyDecision as WebPolicyDecision if webkit
+ WebkitWebWindowFeatures as WebWindowFeatures if webkit
+ WebkitWebDatabase as WebDatabase if webkit
+ WebkitWebDataSource as WebDataSource if webkit
+ WebkitWebResource as WebResource if webkit
+ WebkitSecurityOrigin as SecurityOrigin if webkit
adddir ./webkit
adddir ./webkit/Graphics
adddir ./webkit/Graphics/UI
adddir ./webkit/Graphics/UI/Gtk
adddir ./webkit/Graphics/UI/Gtk/WebKit
addfile ./webkit/Graphics/UI/Gtk/WebKit/Download.chs.pp
hunk ./webkit/Graphics/UI/Gtk/WebKit/Download.chs.pp 1
+-- -*-haskell-*-
+-----------------------------------------------------------------------------
+-- Module : Graphics.UI.Gtk.WebKit.Download
+-- Author : Cjacker Huang
+-- Copyright : (c) 2009 Cjacker Huang <jz...@re...>
+-- [_$_]
+-- 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 : gtk...@li...
+-- Stability : provisional
+-- Portability : portable (depends on GHC)
+--
+-- Object used to communicate with the application when downloading [_$_]
+-----------------------------------------------------------------------------
+
+module Graphics.UI.Gtk.WebKit.Download (
+-- * Types
+ Download,
+
+-- * Constructors
+ downloadNew,
+
+-- * Methods
+ DownloadError(..),
+ DownloadStatus(..),
+
+ downloadStart,
+ downloadCancel,
+ downloadGetUri,
+ downloadGetNetworkRequest,
+ downloadGetSuggestedFilename,
+ downloadGetDestinationUri,
+ downloadGetProgress,
+ downloadGetElapsedTime,
+ downloadGetTotalSize,
+ downloadGetCurrentSize,
+ downloadGetStatus,
+ downloadSetDestinationUri,
+) where
+
+import Control.Monad (liftM)
+
+import System.Glib.FFI
+import System.Glib.UTFString
+import System.Glib.GList
+import System.Glib.GError [_$_]
+import Graphics.UI.Gtk.Gdk.Events
+
+{#import Graphics.UI.Gtk.Abstract.Object#} (makeNewObject)
+{#import Graphics.UI.Gtk.Signals#}
+{#import Graphics.UI.Gtk.WebKit.Types#}
+{#import System.Glib.GObject#}
+
+{#context lib="webkit" prefix ="webkit"#}
+
+{#enum DownloadError {underscoreToCase}#}
+{#enum DownloadStatus {underscoreToCase}#}
+
+
+------------------
+-- Constructors
+
+
+-- | Create a new 'Download' instance for the given 'NetworkRequest'
+--
+-- Object used to communicate with the application when downloading.
+downloadNew :: NetworkRequestClass request => request -> IO Download
+downloadNew nr = [_$_]
+ makeNewGObject mkDownload $ {#call download_new#} (toNetworkRequest nr)
+
+-- | Initiates the 'Download'.
+--
+-- Notice that you must have set the destination-uri property before
+-- calling this function.
+downloadStart::
+ DownloadClass self => self
+ -> IO()
+downloadStart dl =
+ {#call download_start#} (toDownload dl)
+
+-- | Cancels the 'Download'.
+downloadCancel::
+ DownloadClass self => self
+ -> IO()
+downloadCancel dl =
+ {#call download_cancel#} (toDownload dl)
+
+-- | Retrieves the URI from 'Download' which is being downloaded.
+downloadGetUri::
+ DownloadClass self => self
+ -> IO (Maybe String) -- ^ the uri or @Nothing@ in case of failed
+downloadGetUri dl = [_$_]
+ {#call download_get_uri#} (toDownload dl)
+ >>= maybePeek peekCString
+
+-- | Retrieves the 'NetworkRequest' that backs the download process.
+downloadGetNetworkRequest :: [_$_]
+ DownloadClass self => self
+ -> IO NetworkRequest
+downloadGetNetworkRequest dl =
+ makeNewGObject mkNetworkRequest $ {#call download_get_network_request#} (toDownload dl)
+
+-- | Retrieves the filename that was suggested by the server,
+-- or the one derived from the URI.
+downloadGetSuggestedFilename :: [_$_]
+ DownloadClass self => self
+ -> IO (Maybe String) -- ^ the suggested filename or @Nothing@ in case of failed
+downloadGetSuggestedFilename dl =
+ {#call download_get_suggested_filename#} (toDownload dl) >>= maybePeek peekCString
+
+-- | Obtains the URI to which the downloaded file will be written.
+--
+-- It is set by Application before call 'downloadStart' [_$_]
+downloadGetDestinationUri :: [_$_]
+ DownloadClass self => self
+ -> IO (Maybe String)
+downloadGetDestinationUri dl =
+ {#call download_get_destination_uri#} (toDownload dl) >>= maybePeek peekCString
+
+-- | Defines the URI that should be used to save the downloaded file to.
+downloadSetDestinationUri :: [_$_]
+ DownloadClass self => self
+ -> String -- ^ @destination_uri@ - the destination URI
+ -> IO()
+downloadSetDestinationUri dl dest =
+ withCString dest $ \destPtr ->
+ {#call download_set_destination_uri#} (toDownload dl) destPtr
+
+-- |Determines the current progress of the 'Download'
+downloadGetProgress :: [_$_]
+ DownloadClass self => self
+ -> IO Double -- ^ a 'Double' ranging from 0.0 to 1.0
+downloadGetProgress dl =
+ liftM realToFrac $ {#call download_get_progress#} (toDownload dl)
+
+-- |Return elapsed time for the 'Download' in seconds.
+-- includeing any fractional part.
+--
+-- If the 'Download' is finished, had an error or was cancelled,
+-- this is the time between its start and the event.
+downloadGetElapsedTime ::
+ DownloadClass self => self
+ -> IO Double -- ^ seconds since the 'Download' was started.
+downloadGetElapsedTime dl =
+ liftM realToFrac $ {#call download_get_elapsed_time#} (toDownload dl)
+
+-- |Returns the excepted total size of the download.
+--
+-- This is expected because the server may provide incorrect or missing
+-- Content-Length. [_$_]
+--
+-- Notice that this may grow over time.
+downloadGetTotalSize :: [_$_]
+ DownloadClass self => self
+ -> IO Int -- ^ the expected total size of the downloaded file.
+downloadGetTotalSize dl =
+ liftM fromIntegral $ {#call download_get_total_size#} (toDownload dl)
+
+-- | Returns the current already downleaded size
+downloadGetCurrentSize :: [_$_]
+ DownloadClass self => self
+ -> IO Int -- ^ the already downloaded size.
+downloadGetCurrentSize dl =
+ liftM fromIntegral $ {#call download_get_current_size#} (toDownload dl)
+
+-- | Obtains the current status of the 'Download' as 'DownloadStatus'
+downloadGetStatus :: [_$_]
+ DownloadClass self => self
+ -> IO DownloadStatus -- ^ the current 'DownloadStatus'
+downloadGetStatus dl = [_$_]
+ liftM (toEnum . fromIntegral) $ {#call download_get_status#} (toDownload dl)
+
+
addfile ./webkit/Graphics/UI/Gtk/WebKit/NetworkRequest.chs.pp
hunk ./webkit/Graphics/UI/Gtk/WebKit/NetworkRequest.chs.pp 1
+-- -*-haskell-*-
+-----------------------------------------------------------------------------
+-- Module : Graphics.UI.Gtk.WebKit.NetworkRequest
+-- Author : Cjacker Huang
+-- Copyright : (c) 2009 Cjacker Huang <jz...@re...>
+--
+-- 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 : gtk...@li...
+-- Stability : provisional
+-- Portability : portable (depends on GHC)
+--
+-- The target of a navigation request
+-----------------------------------------------------------------------------
+
+module Graphics.UI.Gtk.WebKit.NetworkRequest (
+-- * Types
+ NetworkRequest,
+
+-- * Constructors
+ networkRequestNew,
+
+-- * Methods
+ networkRequestSetUri,
+ networkRequestGetUri,
+) where
+
+import Control.Monad (liftM)
+
+import System.Glib.FFI
+import System.Glib.UTFString
+import System.Glib.GList
+import System.Glib.GError [_$_]
+import Graphics.UI.Gtk.Gdk.Events
+
+{#import Graphics.UI.Gtk.Abstract.Object#} (makeNewObject)
+{#import Graphics.UI.Gtk.Signals#}
+{#import Graphics.UI.Gtk.WebKit.Types#}
+{#import System.Glib.GObject#}
+
+{#context lib="webkit" prefix ="webkit"#}
+
+------------------
+-- Constructors
+
+
+
+-- | Create a new NetworkRequest with the given @uri@.
+-- [_$_]
+-- It is used whenever WebKit wants to provide information [_$_]
+-- about a request that will be sent, or has been sent.
+networkRequestNew :: [_$_]
+ String -- ^ @uri@ - the uri of the request
+ -> IO NetworkRequest
+networkRequestNew uri = [_$_]
+ withCString uri $ \uriPtr -> [_$_]
+ constructNewGObject mkNetworkRequest $ [_$_]
+ {#call network_request_new#} uriPtr
+
+
+-- | Set the URI of 'NetworkRequest'.
+--
+networkRequestSetUri :: [_$_]
+ NetworkRequestClass self => self [_$_]
+ -> String -- ^ @uri@ - the uri will be set to the request.
+ -> IO()
+networkRequestSetUri networkrequest uri =
+ withCString uri $ \uriPtr -> [_$_]
+ {#call network_request_set_uri#} [_$_]
+ (toNetworkRequest networkrequest)
+ uriPtr
+
+
+-- | Return the uri of 'NetworkRequest'.
+networkRequestGetUri :: [_$_]
+ NetworkRequestClass self => self [_$_]
+ -> IO (Maybe String) -- ^ the URI or @Nothing@ in case failed.
+networkRequestGetUri networkrequest = [_$_]
+ {#call network_request_get_uri#} [_$_]
+ (toNetworkRequest networkrequest) >>= [_$_]
+ maybePeek peekCString
+
addfile ./webkit/Graphics/UI/Gtk/WebKit/NetworkResponse.chs.pp
hunk ./webkit/Graphics/UI/Gtk/WebKit/NetworkResponse.chs.pp 1
+-- -*-haskell-*-
+-----------------------------------------------------------------------------
+-- Module : Graphics.UI.Gtk.WebKit.NetworkResponse
+-- Author : Cjacker Huang
+-- Copyright : (c) 2009 Cjacker Huang <jz...@re...>
+--
+-- 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 : gtk...@li...
+-- Stability : provisional
+-- Portability : portable (depends on GHC)
+--
+-- The response given to a network request
+-----------------------------------------------------------------------------
+
+module Graphics.UI.Gtk.WebKit.NetworkResponse (
+-- * Types
+ NetworkResponse,
+
+-- * Methods
+ networkResponseSetUri,
+ networkResponseGetUri,
+) where
+
+import Control.Monad (liftM)
+
+import System.Glib.FFI
+import System.Glib.UTFString
+import System.Glib.GList
+import System.Glib.GError [_$_]
+import Graphics.UI.Gtk.Gdk.Events
+
+{#import Graphics.UI.Gtk.Abstract.Object#} (makeNewObject)
+{#import Graphics.UI.Gtk.Signals#}
+{#import Graphics.UI.Gtk.WebKit.Types#}
+{#import System.Glib.GObject#}
+
+{#context lib="webkit" prefix ="webkit"#}
+
+------------------
+-- Constructors
+
+-- | Set the URI of 'NetworkResponse'.
+--
+networkResponseSetUri :: [_$_]
+ NetworkResponseClass self => self [_$_]
+ -> String -- ^ @uri@ - the uri will be set to the response.
+ -> IO()
+networkResponseSetUri response uri =
+ withCString uri $ \uriPtr -> [_$_]
+ {#call network_response_set_uri#} [_$_]
+ (toNetworkResponse response)
+ uriPtr
+
+
+-- | Return the uri of 'NetworkResponse'.
+networkResponseGetUri :: [_$_]
+ NetworkResponseClass self => self [_$_]
+ -> IO (Maybe String) -- ^ the URI or @Nothing@ in case failed.
+networkResponseGetUri response = [_$_]
+ {#call network_response_get_uri#} [_$_]
+ (toNetworkResponse response) >>= [_$_]
+ maybePeek peekCString
+
addfile ./webkit/Graphics/UI/Gtk/WebKit/WebBackForwardList.chs.pp
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebBackForwardList.chs.pp 1
+-- -*-haskell-*-
+-----------------------------------------------------------------------------
+-- Module : Graphics.UI.Gtk.WebKit.Download
+-- Author : Cjacker Huang
+-- Copyright : (c) 2009 Cjacker Huang <jz...@re...>
+-- [_$_]
+-- 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 : gtk...@li...
+-- Stability : provisional
+-- Portability : portable (depends on GHC)
+--
+-- The history of a 'WebView'
+-----------------------------------------------------------------------------
+
+module Graphics.UI.Gtk.WebKit.WebBackForwardList (
+-- * Types
+ WebBackForwardList,
+
+-- * Constructors
+ webBackForwardListNewWithWebView,
+
+-- * Methods
+ webBackForwardListGoForward,
+ webBackForwardListGoBack,
+ webBackForwardListContainsItem,
+ webBackForwardListGoToItem,
+ webBackForwardListGetBackItem,
+ webBackForwardListGetCurrentItem,
+ webBackForwardListGetForwardItem,
+ webBackForwardListGetNthItem,
+ webBackForwardListGetBackLength,
+ webBackForwardListGetForwardLength,
+ webBackForwardListGetLimit,
+ webBackForwardListSetLimit,
+ webBackForwardListAddItem,
+ webBackForwardListGetForwardListWithLimit,
+ webBackForwardListGetBackListWithLimit,
+ [_$_]
+) where
+
+import Control.Monad (liftM)
+
+import System.Glib.FFI
+import System.Glib.UTFString
+import System.Glib.GList
+import System.Glib.GError [_$_]
+import Graphics.UI.Gtk.Gdk.Events
+
+{#import Graphics.UI.Gtk.Abstract.Object#} (makeNewObject)
+{#import Graphics.UI.Gtk.Signals#}
+{#import Graphics.UI.Gtk.WebKit.Types#}
+{#import System.Glib.GObject#}
+
+{#context lib="webkit" prefix ="webkit"#}
+
+
+------------------
+-- Constructors
+
+-- | Create an WebBackForwardList with a controlling WebView.
+webBackForwardListNewWithWebView :: (WebViewClass webview) => webview -> IO WebBackForwardList
+webBackForwardListNewWithWebView webview = [_$_]
+ constructNewGObject mkWebBackForwardList $ [_$_]
+ {#call web_back_forward_list_new_with_web_view#} [_$_]
+ (toWebView webview)
+
+-- | Steps forward in the back forward list.
+webBackForwardListGoForward :: [_$_]
+ WebBackForwardListClass self => self
+ -> IO()
+webBackForwardListGoForward webbackforwardlist = [_$_]
+ {#call web_back_forward_list_go_forward#} (toWebBackForwardList webbackforwardlist)
+
+-- | Steps back in the back forward list.
+webBackForwardListGoBack :: [_$_]
+ WebBackForwardListClass self => self
+ -> IO()
+webBackForwardListGoBack webbackforwardlist = [_$_]
+ {#call web_back_forward_list_go_back#} (toWebBackForwardList webbackforwardlist)
+
+-- | Check if an history item in the back forward list.
+webBackForwardListContainsItem :: [_$_]
+ (WebBackForwardListClass self, WebHistoryItemClass item) => self
+ -> item
+ -> IO Bool
+webBackForwardListContainsItem webbackforwardlist webhistoryitem = [_$_]
+ liftM toBool $ {#call web_back_forward_list_contains_item#} [_$_]
+ (toWebBackForwardList webbackforwardlist)
+ (toWebHistoryItem webhistoryitem)
+
+-- | Go to the specified history item in the back forward list.
+webBackForwardListGoToItem :: [_$_]
+ (WebBackForwardListClass self,WebHistoryItemClass item) => self
+ -> item
+ -> IO()
+webBackForwardListGoToItem webbackforwardlist webhistoryitem =
+ {#call web_back_forward_list_go_to_item#} [_$_]
+ (toWebBackForwardList webbackforwardlist)
+ (toWebHistoryItem webhistoryitem)
+
+-- | Return the history item that precedes the current history item.
+webBackForwardListGetBackItem :: [_$_]
+ WebBackForwardListClass self => self [_$_]
+ -> IO (Maybe WebHistoryItem) -- ^ A 'WebHistoryItem' or @Nothing@ [_$_]
+ -- if there is nothing precedes the current item.
+webBackForwardListGetBackItem webbackforwardlist = [_$_]
+ maybeNull (makeNewGObject mkWebHistoryItem) $ [_$_]
+ {#call web_back_forward_list_get_back_item#} [_$_]
+ (toWebBackForwardList webbackforwardlist)
+
+-- | Return the current history item of the back forward list
+webBackForwardListGetCurrentItem :: [_$_]
+ WebBackForwardListClass self => self
+ -> IO WebHistoryItem
+webBackForwardListGetCurrentItem webbackforwardlist = [_$_]
+ makeNewGObject mkWebHistoryItem $ [_$_]
+ {#call web_back_forward_list_get_current_item#} [_$_]
+ (toWebBackForwardList webbackforwardlist)
+
+-- | Return the item that succeeds the current item [_$_]
+
+webBackForwardListGetForwardItem :: [_$_]
+ WebBackForwardListClass self => self [_$_]
+ -> IO (Maybe WebHistoryItem) -- ^ A 'WebHistoryItem' or @Nothing@ [_$_]
+ -- if there is nothing succeeds the current item.
+webBackForwardListGetForwardItem webbackforwardlist = [_$_]
+ maybeNull (makeNewGObject mkWebHistoryItem) $ [_$_]
+ {#call web_back_forward_list_get_forward_item#} [_$_]
+ (toWebBackForwardList webbackforwardlist)
+
+-- | Return the history item at a given index relative to the current item.
+webBackForwardListGetNthItem :: [_$_]
+ WebBackForwardListClass self => self -- ^ @webbackforwardlist@ - a WebBackForwardList
+ -> Int -- ^ @index@ - the index of the item
+ -> IO WebHistoryItem
+webBackForwardListGetNthItem webbackforwardlist index = [_$_]
+ makeNewGObject mkWebHistoryItem $ [_$_]
+ {#call web_back_forward_list_get_nth_item#} [_$_]
+ (toWebBackForwardList webbackforwardlist)
+ (fromIntegral index)
+
+-- | Return the number of items that preced the current item.
+webBackForwardListGetBackLength :: [_$_]
+ WebBackForwardListClass self => self
+ -> IO Int [_$_]
+webBackForwardListGetBackLength webbackforwardlist = [_$_]
+ liftM fromIntegral $ [_$_]
+ {#call web_back_forward_list_get_back_length#} [_$_]
+ (toWebBackForwardList webbackforwardlist)
+
+-- | Return the number of items that succeed the current item.
+webBackForwardListGetForwardLength :: [_$_]
+ WebBackForwardListClass self => self
+ -> IO Int
+webBackForwardListGetForwardLength webbackforwardlist = [_$_]
+ liftM fromIntegral $ [_$_]
+ {#call web_back_forward_list_get_forward_length#} [_$_]
+ (toWebBackForwardList webbackforwardlist)
+
+-- | Return the maximum limit of the back forward list.
+webBackForwardListGetLimit :: [_$_]
+ WebBackForwardListClass self => self
+ -> IO Int
+webBackForwardListGetLimit webbackforwardlist = [_$_]
+ liftM fromIntegral $ [_$_]
+ {#call web_back_forward_list_get_limit#} [_$_]
+ (toWebBackForwardList webbackforwardlist)
+
+-- | Set the maximum limit of the back forward list. [_$_]
+-- [_$_]
+-- if the back forward list exceeds its capacity, [_$_]
+-- items will be removed everytime a new item had been added.
+--
+webBackForwardListSetLimit :: [_$_]
+ WebBackForwardListClass self => self
+ -> Int
+ -> IO()
+webBackForwardListSetLimit webbackforwardlist limit = [_$_]
+ {#call web_back_forward_list_set_limit#} [_$_]
+ (toWebBackForwardList webbackforwardlist)
+ (fromIntegral limit)
+
+-- | Add the item to the back forward list.
+webBackForwardListAddItem :: [_$_]
+ (WebBackForwardListClass self,WebHistoryItemClass item) => self
+ -> item
+ -> IO ()
+webBackForwardListAddItem webbackforwardlist webhistoryitem = [_$_]
+ {#call web_back_forward_list_add_item#} [_$_]
+ (toWebBackForwardList webbackforwardlist)
+ (toWebHistoryItem webhistoryitem)
+
+-- | Return a list of items that succeed the current item, limited by @limit@.
+webBackForwardListGetForwardListWithLimit :: [_$_]
+ WebBackForwardListClass self => self [_$_]
+ -> Int -- ^ the number of items to retrieve
+ -> IO [WebHistoryItem] -- ^ a 'List' of items succeeding the current item, limited by limit.
+webBackForwardListGetForwardListWithLimit webbackforwardlist limit = [_$_]
+ {#call web_back_forward_list_get_forward_list_with_limit#} [_$_]
+ (toWebBackForwardList webbackforwardlist)
+ (fromIntegral limit)
+ >>= fromGList [_$_]
+ >>= mapM (makeNewGObject mkWebHistoryItem . return)
+
+-- | Return a list of items that preced the current item.
+-- limited by limit.
+webBackForwardListGetBackListWithLimit :: [_$_]
+ WebBackForwardListClass self => self [_$_]
+ -> Int -- ^ the number of items to retrieve
+ -> IO [WebHistoryItem] -- ^ a 'List' of items preceding the current item, limited by limit
+webBackForwardListGetBackListWithLimit webbackforwardlist limit = [_$_]
+ {#call web_back_forward_list_get_back_list_with_limit#} [_$_]
+ (toWebBackForwardList webbackforwardlist)
+ (fromIntegral limit)
+ >>= fromGList [_$_]
+ >>= mapM (makeNewGObject mkWebHistoryItem . return)
+
addfile ./webkit/Graphics/UI/Gtk/WebKit/WebFrame.chs.pp
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebFrame.chs.pp 1
+-- -*-haskell-*-
+-----------------------------------------------------------------------------
+-- Module : Graphics.UI.Gtk.WebKit.WebFrame
+-- Author : Cjacker Huang
+-- Copyright : (c) 2009 Cjacker Huang <jz...@re...>
+-- [_$_]
+-- 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 : gtk...@li...
+-- Stability : provisional
+-- Portability : portable (depends on GHC)
+--
+-- The content of a 'WebView'
+-----------------------------------------------------------------------------
+
+module Graphics.UI.Gtk.WebKit.WebFrame (
+-- * Types
+ WebFrame,
+-- * Constructors
+ webFrameNew,
+-- * Methods
+ [_$_]
+ webFrameGetWebView,
+ webFrameGetName,
+ webFrameGetTitle,
+ webFrameGetUri,
+ webFrameGetParent,
+ webFrameLoadUri,
+ webFrameLoadString,
+ webFrameLoadAlternateString,
+ webFrameStopLoading,
+ webFrameReload,
+ webFrameFindFrame,
+ webFramePrint,
+) where
+
+import Control.Monad (liftM)
+
+import System.Glib.FFI
+import System.Glib.UTFString
+import System.Glib.GList
+import System.Glib.GError [_$_]
+import Graphics.UI.Gtk.Gdk.Events
+
+{#import Graphics.UI.Gtk.Abstract.Object#} (makeNewObject)
+{#import Graphics.UI.Gtk.Signals#}
+{#import Graphics.UI.Gtk.WebKit.Types#}
+{#import System.Glib.GObject#}
+
+{#context lib="webkit" prefix ="webkit"#}
+
+
+------------------
+-- Constructors
+
+
+-- | Create a new 'WebFrame' instance with the given @webview@.
+--
+-- A 'WebFrame' contains the content of one URI.
+webFrameNew :: [_$_]
+ WebViewClass webview => webview -- ^ @webview@ - the given webview
+ -> IO WebFrame
+webFrameNew webview = [_$_]
+ constructNewGObject mkWebFrame $ {#call web_frame_new#} (toWebView webview)
+
+-- | Return the 'WebView' that manages the given 'WebFrame'.
+webFrameGetWebView :: [_$_]
+ WebFrameClass self => self
+ -> IO WebView
+webFrameGetWebView webframe = [_$_]
+ makeNewObject mkWebView $ liftM castPtr $ {#call web_frame_get_web_view#} (toWebFrame webframe)
+
+-- | Return the name of the given 'WebFrame'.
+webFrameGetName :: [_$_]
+ WebFrameClass self => self
+ -> IO (Maybe String) -- ^ the name string or @Nothing@ in case failed.
+webFrameGetName webframe = [_$_]
+ {#call web_frame_get_name#} (toWebFrame webframe) >>= maybePeek peekCString
+
+-- | Return the title of the given 'WebFrame'.
+webFrameGetTitle :: [_$_]
+ WebFrameClass self => self [_$_]
+ -> IO (Maybe String) -- ^ the title string or @Nothing@ in case failed.
+webFrameGetTitle webframe = [_$_]
+ {#call web_frame_get_title#} (toWebFrame webframe) >>= maybePeek peekCString
+
+-- | Return the URI of the given 'WebFrame'.[_^I_][_$_]
+webFrameGetUri :: [_$_]
+ WebFrameClass self => self [_$_]
+ -> IO (Maybe String) -- ^ the URI string or @Nothing@ in case failed.
+webFrameGetUri webframe = [_$_]
+ {#call web_frame_get_uri#} (toWebFrame webframe) >>= maybePeek peekCString
+
+-- | Return the 'WebFrame''s parent frame if it has one,
+-- Otherwise return Nothing.
+webFrameGetParent :: [_$_]
+ WebFrameClass self => self [_$_]
+ -> IO (Maybe WebFrame) -- ^ a 'WebFrame' or @Nothing@ in case failed.
+webFrameGetParent webframe = [_$_]
+ maybeNull (makeNewGObject mkWebFrame) $ {#call web_frame_get_parent#} (toWebFrame webframe)
+
+-- | Request loading of the specified URI string.
+webFrameLoadUri :: [_$_]
+ WebFrameClass self => self [_$_]
+ -> String -- ^ @uri@ - an URI string. [_$_]
+ -> IO ()
+webFrameLoadUri webframe uri = [_$_]
+ withCString uri $ \uriPtr -> {#call web_frame_load_uri#}
+ (toWebFrame webframe)
+ uriPtr
+
+-- | Requests loading of the given @content@ [_$_]
+-- with the specified @mime_type@, @encoding@ and @base_uri@.
+-- [_$_]
+-- If @mime_type@ is @Nothing@, \"text/html\" is assumed.
+--
+-- If @encoding@ is @Nothing@, \"UTF-8\" is assumed.
+webFrameLoadString :: [_$_]
+ WebFrameClass self => self [_$_]
+ -> String -- ^ @content@ - the content string to be loaded.
+ -> (Maybe String) -- ^ @mime_type@ - the MIME type or @Nothing@. [_$_]
+ -> (Maybe String) -- ^ @encoding@ - the encoding or @Nothing@.
+ -> String -- ^ @base_uri@ - the base URI for relative locations.
+ -> IO()
+webFrameLoadString webframe content mimetype encoding baseuri = [_$_]
+ withCString content $ \contentPtr ->
+ maybeWith withCString mimetype $ \mimetypePtr ->
+ maybeWith withCString encoding $ \encodingPtr ->
+ withCString baseuri $ \baseuriPtr ->
+ {#call web_frame_load_string#} [_$_]
+ (toWebFrame webframe) [_$_]
+ contentPtr [_$_]
+ mimetypePtr [_$_]
+ encodingPtr [_$_]
+ baseuriPtr
+
+-- |Request loading of an alternate content for a URL that is unreachable.
+--
+-- Using this method will preserve the back-forward list.
+-- The URI passed in @base_uri@ has to be an absolute URI.[_^I_][_^I_][_$_]
+webFrameLoadAlternateString :: [_$_]
+ WebFrameClass self => self [_$_]
+ -> String -- ^ @content@ - the alternate content to display [_$_]
+ -- as the main page of the frame
+ -> String -- ^ @base_uri@ - the base URI for relative locations. [_$_]
+ -> String -- ^ @unreachable_url@ - the URL for the alternate page content.
+ -> IO()
+webFrameLoadAlternateString webframe content baseurl unreachableurl = [_$_]
+ withCString content $ \contentPtr ->
+ withCString baseurl $ \baseurlPtr ->
+ withCString unreachableurl $ \unreachableurlPtr ->
+ {#call web_frame_load_alternate_string#}
+ (toWebFrame webframe) [_$_]
+ contentPtr
+ baseurlPtr
+ unreachableurlPtr
+
+-- | Stops and pending loads on the given data source and those of its children.
+webFrameStopLoading :: [_$_]
+ WebFrameClass self => self
+ -> IO()
+webFrameStopLoading webframe = [_$_]
+ {#call web_frame_stop_loading#} (toWebFrame webframe)
+
+-- |Reloads the initial request.
+webFrameReload :: [_$_]
+ WebFrameClass self => self
+ -> IO()
+webFrameReload webframe = [_$_]
+ {#call web_frame_reload#} (toWebFrame webframe)
+
+-- |Return the 'WebFrame' associated with the given name [_$_]
+-- or @Nothing@ in case none if found
+-- [_$_]
+-- For pre-defined names, return the given webframe if name is [_$_]
+webFrameFindFrame:: [_$_]
+ WebFrameClass self => self [_$_]
+ -> String -- ^ @name@ - the name of the frame to be found.
+ -> IO (Maybe WebFrame)
+webFrameFindFrame webframe name = [_$_]
+ withCString name $ \namePtr ->
+ maybeNull (makeNewGObject mkWebFrame) $ [_$_]
+ {#call web_frame_find_frame#} (toWebFrame webframe) namePtr
+
+-- |Prints the given 'WebFrame'.
+--
+-- by presenting a print dialog to the user. [_$_]
+webFramePrint:: [_$_]
+ WebFrameClass self => self
+ -> IO()
+webFramePrint webframe = [_$_]
+ {#call web_frame_print#} (toWebFrame webframe)
+
addfile ./webkit/Graphics/UI/Gtk/WebKit/WebHistoryItem.chs.pp
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebHistoryItem.chs.pp 1
+-- -*-haskell-*-
+-----------------------------------------------------------------------------
+-- Module : Graphics.UI.Gtk.WebKit.WebHistoryItem
+-- Author : Cjacker Huang
+-- Copyright : (c) 2009 Cjacker Huang <jz...@re...>
+--
+-- 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 : gtk...@li...
+-- Stability : provisional
+-- Portability : portable (depends on GHC)
+--
+-- One item of the 'WebBackForwardList' and or global history
+-----------------------------------------------------------------------------
+
+module Graphics.UI.Gtk.WebKit.WebHistoryItem (
+-- * Types
+ WebHistoryItem,
+
+-- * Constructors
+ webHistoryItemNew,
+ webHistoryItemNewWithData,
+
+-- * Attributes
+ webHistoryItemTitle,
+ webHistoryItemAlternateTitle,
+ webHistoryItemUri,
+ webHistoryItemOriginalUri,
+ webHistoryItemLastVisitedTime,
+
+-- * Methods
+ webHistoryItemGetTitle,
+ webHistoryItemGetAlternateTitle,
+ webHistoryItemSetAlternateTitle,
+ webHistoryItemGetUri,
+ webHistoryItemGetOriginalUri,
+ webHistoryItemGetLastVisitedTime,
+) where
+
+import Control.Monad (liftM)
+
+import System.Glib.FFI
+import System.Glib.UTFString
+import System.Glib.GList
+import System.Glib.GError [_$_]
+import System.Glib.Attributes
+import Graphics.UI.Gtk.Gdk.Events
+
+{#import Graphics.UI.Gtk.Abstract.Object#} (makeNewObject)
+{#import Graphics.UI.Gtk.Signals#}
+{#import Graphics.UI.Gtk.WebKit.Types#}
+{#import System.Glib.GObject#}
+
+{#context lib="webkit" prefix ="webkit"#}
+
+------------------
+-- Constructors
+
+
+
+-- | Create a new 'WebHistoryItem' instance.
+--
+-- A history item consists out of a title and a uri, [_$_]
+-- it can be part of the WebBackForwardList and the global history.
+--
+-- The global history is used for coloring the links of visited sites.
+-- 'WebHistoryItem' constructed with 'webHistoryItemNew' are [_$_]
+-- automatically added to the global history.
+webHistoryItemNew :: IO WebHistoryItem
+webHistoryItemNew = [_$_]
+ constructNewGObject mkWebHistoryItem $ {#call web_history_item_new#}
+
+
+-- | Create a new 'WebHistoryItem' instance with the given @uri@ and @title@.
+-- [_$_]
+-- 'WebHistoryItem' constructed with 'webHistoryItemNewWithData' are [_$_]
+-- automatically added to the global history.
+webHistoryItemNewWithData :: [_$_]
+ String -- ^ @uri@ - the uri of the item
+ -> String -- ^ @title@ - the title of the item
+ -> IO WebHistoryItem
+webHistoryItemNewWithData uri title = [_$_]
+ withCString uri $ \uriPtr ->
+ withCString title $ \titlePtr ->
+ constructNewGObject mkWebHistoryItem $
+ {#call web_history_item_new_with_data#} [_$_]
+ uriPtr [_$_]
+ titlePtr
+
+
+-- | Return the title of 'WebHistoryItem'.
+webHistoryItemGetTitle :: [_$_]
+ WebHistoryItemClass self => self
+ -> IO (Maybe String) -- ^ the title or @Nothing@ in case failed.
+webHistoryItemGetTitle webhistoryitem = [_$_]
+ {#call web_history_item_get_title#} [_$_]
+ (toWebHistoryItem webhistoryitem) >>= [_$_]
+ maybePeek peekCString
+
+-- | Return the alternate title of WebHistoryItem.
+webHistoryItemGetAlternateTitle :: [_$_]
+ WebHistoryItemClass self => self [_$_]
+ -> IO (Maybe String) -- ^ the alternate title or @Nothing@ in case failed.
+webHistoryItemGetAlternateTitle webhistoryitem = [_$_]
+ {#call web_history_item_get_alternate_title#} [_$_]
+ (toWebHistoryItem webhistoryitem) >>= [_$_]
+ maybePeek peekCString
+
+-- | Set an alternate title for WebHistoryItem.
+webHistoryItemSetAlternateTitle :: [_$_]
+ WebHistoryItemClass self => self [_$_]
+ -> (Maybe String) -- ^ @title@ - the alternate title for this history item.
+ -> IO()
+webHistoryItemSetAlternateTitle webhistoryitem title =
+ maybeWith withCString title $ \titlePtr -> [_$_]
+ {#call web_history_item_set_alternate_title#} [_$_]
+ (toWebHistoryItem webhistoryitem)
+ titlePtr
+
+-- | Return the URI of WebHistoryItem.
+webHistoryItemGetUri :: [_$_]
+ WebHistoryItemClass self => self [_$_]
+ -> IO (Maybe String) -- ^ the URI or @Nothing@ in case failed.
+webHistoryItemGetUri webhistoryitem = [_$_]
+ {#call web_history_item_get_uri#} [_$_]
+ (toWebHistoryItem webhistoryitem) >>= [_$_]
+ maybePeek peekCString
+
+-- | Return the original URI of WebHistoryItem.
+webHistoryItemGetOriginalUri :: [_$_]
+ WebHistoryItemClass self => self [_$_]
+ -> IO (Maybe String) -- ^ the URI or @Nothing@ in case failed
+webHistoryItemGetOriginalUri webhistoryitem = [_$_]
+ {#call web_history_item_get_original_uri#} [_$_]
+ (toWebHistoryItem webhistoryitem) >>= [_$_]
+ maybePeek peekCString
+
+-- | Return the last visited time of WebHistoryItem.
+webHistoryItemGetLastVisitedTime :: [_$_]
+ WebHistoryItemClass self => self [_$_]
+ -> IO Double -- ^ the last visited time of this history item.
+webHistoryItemGetLastVisitedTime webhistoryitem = [_$_]
+ liftM realToFrac $ [_$_]
+ {#call web_history_item_get_last_visited_time#} [_$_]
+ (toWebHistoryItem webhistoryitem)
+
+-- | The title of the 'WebHistoryItem'
+--
+-- Default value: @Nothing@
+webHistoryItemTitle :: (WebHistoryItemClass self) => ReadAttr self (Maybe String)
+webHistoryItemTitle = readAttr webHistoryItemGetTitle
+
+-- | The alternate title of the history item.
+--
+-- Default value: @Nothing@
+webHistoryItemAlternateTitle :: (WebHistoryItemClass self) => Attr self (Maybe String)
+webHistoryItemAlternateTitle = newAttr webHistoryItemGetAlternateTitle webHistoryItemSetAlternateTitle
+
+-- | The URI of the history item.
+--
+-- Default value: @Nothing@
+webHistoryItemUri :: (WebHistoryItemClass self) => ReadAttr self (Maybe String)
+webHistoryItemUri = readAttr webHistoryItemGetUri
+
+-- | The original URI of the history item.
+--
+-- Default value: @Nothing@
+webHistoryItemOriginalUri :: (WebHistoryItemClass self) => ReadAttr self (Maybe String)
+webHistoryItemOriginalUri = readAttr webHistoryItemGetOriginalUri
+
+-- | The time at which the history item was last visited.
+--
+-- Allowed values: >= 0
+--
+-- Default value: 0
+webHistoryItemLastVisitedTime :: (WebHistoryItemClass self) => ReadAttr self Double
+webHistoryItemLastVisitedTime = readAttr webHistoryItemGetLastVisitedTime
+ [_$_]
addfile ./webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs.pp
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs.pp 1
+-- -*-haskell-*-
+-----------------------------------------------------------------------------
+-- Module : Graphics.UI.Gtk.WebKit.WebInspector
+-- Author : Cjacker Huang
+-- Copyright : (c) 2009 Cjacker Huang <jz...@re...>
+--
+-- 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 : gtk...@li...
+-- Stability : provisional
+-- Portability : portable (depends on GHC)
+--
+-- Access to the WebKit Inspector
+-----------------------------------------------------------------------------
+
+module Graphics.UI.Gtk.WebKit.WebInspector (
+-- * Types
+ WebInspector,
+
+-- * Methods
+ webInspectorGetInspectedUri,
+ webInspectorGetWebView,
+
+-- * Signals
+ onAttachWindow,
+ onCloseWindow,
+ onDetachWindow,
+ onFinished,
+ onInspectWebView,
+ onShowWindow,
+) where
+
+import Control.Monad (liftM)
+
+import System.Glib.FFI
+import System.Glib.UTFString
+import System.Glib.GList
+import System.Glib.GError [_$_]
+import Graphics.UI.Gtk.Gdk.Events
+
+{#import Graphics.UI.Gtk.Abstract.Object#} (makeNewObject)
+{#import Graphics.UI.Gtk.Signals#}
+{#import Graphics.UI.Gtk.WebKit.Types#}
+{#import System.Glib.GObject#}
+
+{#context lib="webkit" prefix ="webkit"#}
+
+
+------------------
+-- | Obtains the URI that is currently being inspected
+webInspectorGetInspectedUri :: [_$_]
+ WebInspectorClass self => self
+ -> IO String
+webInspectorGetInspectedUri inspector = [_$_]
+ {#call web_inspector_get_inspected_uri#} (toWebInspector inspector) >>= peekCString
+
+-- | Obtains the 'WebView' that is used to render the 'WebInspector'. [_$_]
+-- [_$_]
+-- The 'WebView' instance is created by the application,
+-- by handling the "inspect-web-view" signal. [_$_]
+-- This means that it may return @Nothing@ if the user hasn't inspected anything
+webInspectorGetWebView :: [_$_]
+ WebInspectorClass self => self
+ -> IO (Maybe WebView)
+webInspectorGetWebView inspector =
+ maybeNull (makeNewObject mkWebView) $ liftM castPtr $
+ {#call web_inspector_get_web_view#}
+ (toWebInspector inspector)
+
+
+-- * Signals
+-- | Emitted when the 'WebInspector' should appear at the same window as the 'WebView' being inspected.
+--
+-- return True if the signal is handled.
+onAttachWindow :: WebInspectorClass self => self ->( IO Bool )-> IO (ConnectId self)
+onAttachWindow =
+ connect_NONE__BOOL "attach-window" True
+
+-- | Emitted when the inspector window should be closed. [_$_]
+--
+-- return True if the signal is handled.
+--
+-- You can destroy the window or hide it so that it can be displayed again by handling 'onShowWindow' later on. [_$_]
+-- Notice that the inspected 'WebView' may no longer exist when this signal is emitted.
+-- Notice, too, that if you decide to destroy the window, [_$_]
+-- 'onInspectWebView' will be emmited again, when the user inspects an element.
+
+onCloseWindow :: WebInspectorClass self => self ->( IO Bool )-> IO (ConnectId self)
+onCloseWindow =
+ connect_NONE__BOOL "close-window" True
+
+-- | Emitted when the inspector should appear in a separate window
+--
+-- return True if the signal is handled
+onDetachWindow :: WebInspectorClass self => self ->( IO Bool )-> IO (ConnectId self)
+onDetachWindow =
+ connect_NONE__BOOL "detach-window" True
+
+-- | Emitted when the inspection is done.
+onFinished :: WebInspectorClass self => self ->( IO () )-> IO (ConnectId self)
+onFinished =
+ connect_NONE__NONE "finished" True
+
+-- internal helper function used in onInspectWebView
+webViewToWebViewPtr :: WebViewClass self => self -> IO (Ptr WebView)
+webViewToWebViewPtr webview = do
+ let webViewPtr = unsafeForeignPtrToPtr (unWebView (toWebView webview))
+ -- objectRef webViewPtr
+ return webViewPtr
+
+-- | Emitted when the user activates the \'inspect\' context menu item to inspect a 'WebView'. [_$_]
+--
+-- The application which is interested in the inspector should create a window, [_$_]
+-- or otherwise add the 'WebView' it creates to an existing window.
+-- [_$_]
+-- !!!NOTE!!!, you should return a 'WebView' in user function [_$_]
+onInspectWebView :: WebInspectorClass self => self ->( WebView -> IO WebView )-> IO (ConnectId self)
+onInspectWebView =
+ connect_OBJECT__OBJECTPTR "inspect-web-view" True
+ where connect_OBJECT__OBJECTPTR ::
+ (GObjectClass a', GObjectClass obj) => SignalName ->
+ ConnectAfter -> obj ->
+ (a' -> IO WebView) ->
+ IO (ConnectId obj)
+ connect_OBJECT__OBJECTPTR signal after obj user =
+ connectGeneric signal after obj action
+ where action :: Ptr GObject -> Ptr GObject -> IO (Ptr WebView)
+ action _ obj1 =
+ failOnGError $
+ makeNewGObject mkGObject (return obj1) >>= \obj1' ->
+ user (unsafeCastGObject obj1') >>= webViewToWebViewPtr
+
+-- | Emitted when the inspector window should be displayed. [_$_]
+--
+-- Notice that the window must have been created already by handling "inspect-web-view".
+onShowWindow :: WebInspectorClass self => self ->( IO Bool )-> IO (ConnectId self)
+onShowWindow =
+ connect_NONE__BOOL "show-window" True
+
addfile ./webkit/Graphics/UI/Gtk/WebKit/WebSettings.chs.pp
hunk ./webkit/Graphics/UI/Gtk/WebKit/WebSettings.chs.pp 1
+-- -*-haskell-*-
+-----------------------------------------------------------------------------
+-- Module : Graphics.UI.Gtk.WebKit.WebSettings
+-- Author : Cjacker Huang
+-- Copyright : (c) 2009 Cjacker Huang <jz...@re...>
+--
+-- 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 : gtk...@li...
+-- Stability : provisional
+-- Portability : portable (depends on GHC)
+--
+-- Control the behaviour of a 'WebView'
+-----------------------------------------------------------------------------
+
+module Graphics.UI.Gtk.WebKit.WebSettings (
+-- * Types
+ WebSettings,
+
+-- * Constructors
+ webSettingsNew,
+
+-- * Attributes
+ webSettingsAutoLoadImages,
+ webSettingsAutoShrinkImages,
+ webSettingsCursiveFontFamily,
+ webSettingsDefaultEncoding,
+ webSettingsDefaultFontFamily,
+ webSettingsDefaultFontSize,
+ webSettingsDefaultMonospaceFontSize,
+ webSettingsEditingBehavior,
+ webSettingsEnableCaretBrowsing,
+ webSettingsEnableDeveloperExtras,
+ webSettingsEnableHtml5Database,
+ webSettingsEnableHtml5LocalStorage,
+ webSettingsEnableOfflineWebApplicationCache,
+ webSettingsEnablePlugins,
+ webSettingsEnablePrivateBrowsing,
+ webSettingsEnableScripts,
+ webSettingsEnableSpellChecking,
+ webSettingsEnableUniversalAccessFromFileUris,
+ webSettingsEnableXssAuditor,
+ webSettingsEnforce96Dpi,
+ webSettingsFantasyFontFamily,
+ webSettingsJSCanOpenWindowAuto,
+ webSettingsMinimumFontSize,
+ webSettingsMinimumLogicalFontSize,
+ webSettingsMonospaceFontFamily,
+ webSettingsPrintBackgrounds,
+ webSettingsResizableTextAreas,
+ webSettingsSansFontFamily,
+ webSettingsSerifFontFamily,
+ webSettingsSpellCheckingLang,
+ webSettingsUserAgent,
+ webSettingsUserStylesheetUri,
+ webSettingsZoomStep,
+-- * Methods
+
+ webSettingsCopy,
+ webSettingsGetUserAgent,
+
+) where
+
+import Control.Monad (liftM)
+
+import System.Glib.FFI
+import System.Glib.UTFString
+import System.Glib.GList
+import System.Glib.GError [_$_]
+import System.Glib.Properties
+import System.Glib.Attributes
+import Graphics.UI.Gtk.Gdk.Events
+
+{#import Graphics.UI.Gtk.Abstract.Object#} (makeNewObject)
+{#import Graphics.UI.Gtk.Signals#}
+{#import Graphics.UI.Gtk.WebKit.Types#}
+{#import System.Glib.GObject#}
+
+{#context lib="webkit" prefix ="webkit"#}
+
+{#enum EditingBehavior {underscoreToCase}#}
+------------------
+-- Constructors
+
+
+-- | Create a new 'WebSettings' instance.
+-- [_$_]
+-- A 'WebSettings' can be applied to a 'WebView'
+-- to control the to be used text encoding, color, font size, [_$_]
+-- printing mode,script support, loading of images and various other things.
+webSettingsNew :: IO WebSettings
+webSettingsNew = [_$_]
+ constructNewGObject mkWebSettings $ {#call web_settings_new#}
+
+
+-- | Copy an existing 'WebSettings' instance.
+webSettingsCopy :: [_$_]
+ WebSettingsClass self => self
+ -> IO WebSettings
+webSettingsCopy websettings = [_$_]
+ constructNewGObject mkWebSettings $ {#call web_settings_copy#} (toWebSettings websettings)
+
+-- | Return the User-Agent string currently used.
+webSettingsGetUserAgent :: [_$_]
+ WebSettingsClass self => self
+ -> IO (Maybe String) -- ^ User-Agent string or @Nothing@ in case failed.
+webSettingsGetUserAgent websettings = [_$_]
+ {#call web_settings_get_user_agent#} (toWebSettings websettings) >>= maybePeek peekCString
+
+-- | Load images automatically
+--
+-- Default value: True
+webSettingsAutoLoadImages :: (WebSettingsClass self) => Attr self Bool
+webSettingsAutoLoadImages = newAttrFromBoolProperty "auto-load-images"
+
+-- | Automatically shrink standalone images to fit
+--
+-- Default value: True
+webSettingsAutoShrinkImages :: (WebSettingsClass self) => Attr self Bool
+webSettingsAutoShrinkImages = newAttrFromBoolProperty "auto-shrink-images"
+
+-- | The default Cursive font family used to display text
+--
+-- Default value "serif"
+webSettingsCursiveFontFamily :: (WebSettingsClass self) => Attr self String
+webSettingsCursiveFontFamily = newAttrFromStringProperty "cursive-font-family"
+
+-- | The default encoding used to display text
+--
+-- Default value "iso-8859-1"
+
+webSettingsDefaultEncoding :: (WebSettingsClass self) => Attr self String
+webSettingsDefaultEncoding = newAttrFromStringProperty "default-encoding"
+
+-- | The default font family used to disp...
[truncated message content] |
|
From: Axel S. <si...@co...> - 2010-03-13 09:45:46
|
Sat Jan 16 04:55:41 EST 2010 Axe...@en...
* Add more types for different bindings.
hunk ./tools/callbackGen/gtkmarshal.list 130
+# for TextBuffer
+NONE:BOXED,STRING
+# for Notebook
+NONE:OBJECT,INT
+BOOLEAN:ENUM,BOOLEAN
+NONE:BOXED,INT
+# for TextBuffer
+NONE:BOXED,STRING
+# for WebKit
+VOID:POINTER,POINTER
+BOOLEAN:OBJECT
+BOOLEAN:OBJECT,STRING,BOXED
+POINTER:OBJECT
|
|
From: Axel S. <si...@co...> - 2010-03-13 09:43:45
|
Wed Jan 6 06:50:45 EST 2010 Axel Simon <Axe...@en...>
* Doc fixes.
Ignore-this: 991398e752137054c6d6d7c179e5b7ac
hunk ./gtk/Graphics/UI/Gtk/Misc/DrawingArea.chs 32
--- the 'Drawable' returned by 'drawingAreaGetWindow'.
+-- the 'Drawable' returned by 'drawingAreaGetDrawWindow'.
hunk ./gtk/Graphics/UI/Gtk/Misc/DrawingArea.chs 36
--- * Mouse and button press signals to respond to input from the user. (Use
--- 'widgetAddEvents' to enable events you wish to receive.)
+-- * Mouse and button press signals to respond to input from the user.
hunk ./gtk/Graphics/UI/Gtk/Misc/DrawingArea.chs 38
--- * The \"realize\" signal to take any necessary actions when the widget is
+-- * The 'realize' signal to take any necessary actions when the widget is
hunk ./gtk/Graphics/UI/Gtk/Misc/DrawingArea.chs 42
--- * The \"configure_event\" signal to take any necessary actions when the
+-- * The 'configureEvent' signal to take any necessary actions when the
hunk ./gtk/Graphics/UI/Gtk/Misc/DrawingArea.chs 45
--- * The \"expose_event\" signal to handle redrawing the contents of the
+-- * The 'exposeEvent' signal to handle redrawing the contents of the
hunk ./gtk/Graphics/UI/Gtk/Misc/DrawingArea.chs 56
--- Primitives page. See also 'pixbufRenderToDrawable' for drawing a 'Pixbuf'.
+-- Primitives page.
hunk ./gtk/Graphics/UI/Gtk/Misc/DrawingArea.chs 60
--- 'CanFocus' flag on the drawing area, and should probably draw some
+-- 'widgetCanFocus' attribute on the drawing area, and should probably draw some
hunk ./gtk/Graphics/UI/Gtk/Misc/DrawingArea.chs 92
+-- to make haddock happy:
+import Graphics.UI.Gtk.Abstract.Widget
|
|
From: Andy S. <And...@co...> - 2010-03-13 06:45:29
|
Sat Mar 13 01:44:07 EST 2010 laz...@gm...
* use `runCommand` instead `forkProcess` for spawn process safely
Ignore-this: 67cdbdcc06120cf98dde089405157655
hunk ./demo/embbeded/Embedded.hs 1
--- Use GtkSocket and GtkPlug for cross-process embedded.
+-- |Use GtkSocket and GtkPlug for cross-process embedded.
hunk ./demo/embbeded/Embedded.hs 5
+--
+-- Note:
+--
+-- Don't use `forkProcess` in gtk2hs!
+-- Because `forkProcess` haven't any protect when spawn process, [_$_]
+-- so you will got two processes *race condition*, when those two
+-- process access same resource will crash your program.
+-- Solution is use `runProcess` or `runCommand` instead, [_$_]
+-- Because those functions add MVar to make sure two processes won't
+-- get *race condition* problem.
+--
hunk ./demo/embbeded/Embedded.hs 19
-import System.Posix.Process
+import System.Process
hunk ./demo/embbeded/Embedded.hs 74
- forkProcess (executeFile path False [show $ fromNativeWindowId id] Nothing)
+ runCommand $ path ++ " " ++ (show $ fromNativeWindowId id) -- don't use `forkProcess` !
|
|
From: Andy S. <And...@co...> - 2010-03-12 21:19:59
|
Fri Mar 12 15:54:02 EST 2010 laz...@gm...
* Add new embedded demo: use uzbl build Webkit browser.
Ignore-this: a916a3c5c01e3831d85ad61f6822ea75
hunk ./demo/embbeded/Makefile 1
-PROG = Embedded
-SOURCES = Embedded.hs
+PROGS = Embedded Uzbl
+SOURCES = Embedded.hs Uzbl.hs
hunk ./demo/embbeded/Makefile 4
-$(PROG) : $(SOURCES)
- $(HC) --make $< -o $@ $(HCFLAGS)
+all : $(PROGS)
+
+Embedded : Embedded.hs
+ $(HC_RULE)
+
+Uzbl : Uzbl.hs
+ $(HC_RULE)
+
+HC_RULE = $(HC) --make $< -o $@ $(HCFLAGS)
hunk ./demo/embbeded/Makefile 15
- rm -f $(SOURCES:.hs=.hi) $(SOURCES:.hs=.o) $(PROG)
+ rm -f $(SOURCES:.hs=.hi) $(SOURCES:.hs=.o) $(PROGS)
|
|
From: Axel S. <si...@co...> - 2010-02-26 20:44:30
|
Fri Feb 26 15:43:46 EST 2010 Axe...@in...
* Add, again, screenGetRGBAColormap.
Ignore-this: 6a7606d6e24abe1556c40f6bf3703fa1
hunk ./gtk/Graphics/UI/Gtk/Gdk/Screen.chs.pp 60
+#if GTK_CHECK_VERSION(2,8,0)
+ screenGetRGBAColormap,
+#endif
hunk ./gtk/Graphics/UI/Gtk/Gdk/Screen.chs.pp 169
+#if GTK_CHECK_VERSION(2,8,0)
+-- | Gets a colormap to use for creating windows or pixmaps with an alpha
+-- channel. The windowing system on which Gtk+ is running may not support this
+-- capability, in which case @Nothing@ will be returned. Even if a
+-- non-@Nothing@ value is returned, its possible that the window's alpha
+-- channel won't be honored when displaying the window on the screen: in
+-- particular, for X an appropriate windowing manager and compositing manager
+-- must be running to provide appropriate display.
+--
+-- * Available since Gdk version 2.8
+--
+screenGetRGBAColormap :: Screen
+ -> IO (Maybe Colormap) -- ^ returns a colormap to use for windows with an
+ -- alpha channel or @Nothing@ if the capability is not
+ -- available.
+screenGetRGBAColormap self =
+ maybeNull (makeNewGObject mkColormap) $
+ {# call gdk_screen_get_rgba_colormap #}
+ self
+#endif
+
|
|
From: Axel S. <si...@co...> - 2010-02-12 08:24:33
|
Fri Feb 12 03:23:26 EST 2010 Axe...@in...
* Avoid using rec because of -XDoRec notation
Ignore-this: b2435c3b465e13dbfc5b729c6bcd2a98
hunk ./gtk/Graphics/UI/Gtk/Display/StatusIcon.chs.pp 451
- rec <- peek recPtr
+ rec_ <- peek recPtr
hunk ./gtk/Graphics/UI/Gtk/Display/StatusIcon.chs.pp 453
- return $ Just (rec,toEnum $ fromIntegral or)
+ return $ Just (rec_,toEnum $ fromIntegral or)
|
|
From: Axel S. <si...@co...> - 2010-01-21 14:15:09
|
Sat Jan 16 04:43:11 EST 2010 Axe...@en...
* add a stub file for vte
Ignore-this: f7d4159f172547274e877d9928a7c272
hunk ./Makefile.am 1136
+libHSvte_a_LIBADD = \
+ vte/Graphics/UI/Gtk/Vte/Vte_stub.o
+ [_$_]
|
|
From: Axel S. <si...@co...> - 2010-01-21 14:15:01
|
Sat Jan 16 04:55:25 EST 2010 Axe...@en...
* Bring apiGen up to date.
hunk ./tools/apiGen/mkdocxml.sh 21
- <!ENTITY ldquo "“" ><!--=double quotation mark, left-->
- <!ENTITY rdquo "”" ><!--=double quotation mark, right-->
+ <!ENTITY sol "/">
+ <!ENTITY ldquo "l">
+ <!ENTITY rdquo "r">
hunk ./tools/apiGen/src/Api.hs 157
-extractAPI (Xml.Document _ _ (Xml.Elem "api" [] namespaces) _) =
+extractAPI (Xml.Document _ _ (Xml.Elem "apidoc" [] namespaces) _) =
hunk ./tools/apiGen/src/Api.hs 164
+extractAPI (Xml.Document _ _ (Xml.Elem notApi [] namespaces) _) =
+ error $ "extractAPI: expected `apidoc` top-element, but found "++notApi
|