Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
The content of a WebView
can request to change certain
properties of a WebView
. This can include the x, y position
of the window, the width and height but also if a toolbar,
scrollbar, statusbar, locationbar should be visible to the user,
the request to show the WebView
fullscreen.
In the normal case one will use webkit_web_view_get_window_features
to get the WebWindowFeatures
and then monitor the property
changes. Be aware that the WebWindowFeatures
might change
before WebView
::web-view-ready
signal is emitted.
To be safe listen to the notify::window-features signal of the WebView
and reconnect the signals whenever the WebWindowFeatures
of
a WebView
changes.
<informalexample><programlisting> /<!-- -->* Get the current WebKitWebWindowFeatures *<!-- -->/ WebKitWebWindowFeatures *features = webkit_web_view_get_window_features (my_webview);
/<!-- -->* Connect to the property changes *<!-- -->/ g_signal_connect (G_OBJECT(features), "notify::menubar-visible", G_CALLBACK(make_menu_bar_visible), NULL); g_signal_connect (G_OBJECT(features), "notify::statusbar-visible", G_CALLBACK(make_status_bar_visible), NULL);
</programlisting></informalexample>
- newtype WebWindowFeatures = WebWindowFeatures (ManagedPtr WebWindowFeatures)
- class GObject o => IsWebWindowFeatures o
- toWebWindowFeatures :: IsWebWindowFeatures o => o -> IO WebWindowFeatures
- noWebWindowFeatures :: Maybe WebWindowFeatures
- data WebWindowFeaturesEqualMethodInfo
- webWindowFeaturesEqual :: (HasCallStack, MonadIO m, IsWebWindowFeatures a, IsWebWindowFeatures b) => a -> b -> m Bool
- webWindowFeaturesNew :: (HasCallStack, MonadIO m) => m WebWindowFeatures
- data WebWindowFeaturesFullscreenPropertyInfo
- constructWebWindowFeaturesFullscreen :: IsWebWindowFeatures o => Bool -> IO (GValueConstruct o)
- getWebWindowFeaturesFullscreen :: (MonadIO m, IsWebWindowFeatures o) => o -> m Bool
- setWebWindowFeaturesFullscreen :: (MonadIO m, IsWebWindowFeatures o) => o -> Bool -> m ()
- webWindowFeaturesFullscreen :: AttrLabelProxy "fullscreen"
- data WebWindowFeaturesHeightPropertyInfo
- constructWebWindowFeaturesHeight :: IsWebWindowFeatures o => Int32 -> IO (GValueConstruct o)
- getWebWindowFeaturesHeight :: (MonadIO m, IsWebWindowFeatures o) => o -> m Int32
- setWebWindowFeaturesHeight :: (MonadIO m, IsWebWindowFeatures o) => o -> Int32 -> m ()
- webWindowFeaturesHeight :: AttrLabelProxy "height"
- data WebWindowFeaturesLocationbarVisiblePropertyInfo
- constructWebWindowFeaturesLocationbarVisible :: IsWebWindowFeatures o => Bool -> IO (GValueConstruct o)
- getWebWindowFeaturesLocationbarVisible :: (MonadIO m, IsWebWindowFeatures o) => o -> m Bool
- setWebWindowFeaturesLocationbarVisible :: (MonadIO m, IsWebWindowFeatures o) => o -> Bool -> m ()
- webWindowFeaturesLocationbarVisible :: AttrLabelProxy "locationbarVisible"
- data WebWindowFeaturesMenubarVisiblePropertyInfo
- constructWebWindowFeaturesMenubarVisible :: IsWebWindowFeatures o => Bool -> IO (GValueConstruct o)
- getWebWindowFeaturesMenubarVisible :: (MonadIO m, IsWebWindowFeatures o) => o -> m Bool
- setWebWindowFeaturesMenubarVisible :: (MonadIO m, IsWebWindowFeatures o) => o -> Bool -> m ()
- webWindowFeaturesMenubarVisible :: AttrLabelProxy "menubarVisible"
- data WebWindowFeaturesScrollbarVisiblePropertyInfo
- constructWebWindowFeaturesScrollbarVisible :: IsWebWindowFeatures o => Bool -> IO (GValueConstruct o)
- getWebWindowFeaturesScrollbarVisible :: (MonadIO m, IsWebWindowFeatures o) => o -> m Bool
- setWebWindowFeaturesScrollbarVisible :: (MonadIO m, IsWebWindowFeatures o) => o -> Bool -> m ()
- webWindowFeaturesScrollbarVisible :: AttrLabelProxy "scrollbarVisible"
- data WebWindowFeaturesStatusbarVisiblePropertyInfo
- constructWebWindowFeaturesStatusbarVisible :: IsWebWindowFeatures o => Bool -> IO (GValueConstruct o)
- getWebWindowFeaturesStatusbarVisible :: (MonadIO m, IsWebWindowFeatures o) => o -> m Bool
- setWebWindowFeaturesStatusbarVisible :: (MonadIO m, IsWebWindowFeatures o) => o -> Bool -> m ()
- webWindowFeaturesStatusbarVisible :: AttrLabelProxy "statusbarVisible"
- data WebWindowFeaturesToolbarVisiblePropertyInfo
- constructWebWindowFeaturesToolbarVisible :: IsWebWindowFeatures o => Bool -> IO (GValueConstruct o)
- getWebWindowFeaturesToolbarVisible :: (MonadIO m, IsWebWindowFeatures o) => o -> m Bool
- setWebWindowFeaturesToolbarVisible :: (MonadIO m, IsWebWindowFeatures o) => o -> Bool -> m ()
- webWindowFeaturesToolbarVisible :: AttrLabelProxy "toolbarVisible"
- data WebWindowFeaturesWidthPropertyInfo
- constructWebWindowFeaturesWidth :: IsWebWindowFeatures o => Int32 -> IO (GValueConstruct o)
- getWebWindowFeaturesWidth :: (MonadIO m, IsWebWindowFeatures o) => o -> m Int32
- setWebWindowFeaturesWidth :: (MonadIO m, IsWebWindowFeatures o) => o -> Int32 -> m ()
- webWindowFeaturesWidth :: AttrLabelProxy "width"
- data WebWindowFeaturesXPropertyInfo
- constructWebWindowFeaturesX :: IsWebWindowFeatures o => Int32 -> IO (GValueConstruct o)
- getWebWindowFeaturesX :: (MonadIO m, IsWebWindowFeatures o) => o -> m Int32
- setWebWindowFeaturesX :: (MonadIO m, IsWebWindowFeatures o) => o -> Int32 -> m ()
- webWindowFeaturesX :: AttrLabelProxy "x"
- data WebWindowFeaturesYPropertyInfo
- constructWebWindowFeaturesY :: IsWebWindowFeatures o => Int32 -> IO (GValueConstruct o)
- getWebWindowFeaturesY :: (MonadIO m, IsWebWindowFeatures o) => o -> m Int32
- setWebWindowFeaturesY :: (MonadIO m, IsWebWindowFeatures o) => o -> Int32 -> m ()
- webWindowFeaturesY :: AttrLabelProxy "y"
Exported types
newtype WebWindowFeatures Source #
GObject WebWindowFeatures Source # | |
IsObject WebWindowFeatures Source # | |
IsWebWindowFeatures WebWindowFeatures Source # | |
((~) * info (ResolveWebWindowFeaturesMethod t WebWindowFeatures), MethodInfo * info WebWindowFeatures p) => IsLabel t (WebWindowFeatures -> p) Source # | |
((~) * info (ResolveWebWindowFeaturesMethod t WebWindowFeatures), MethodInfo * info WebWindowFeatures p) => IsLabelProxy t (WebWindowFeatures -> p) Source # | |
HasAttributeList * WebWindowFeatures Source # | |
type AttributeList WebWindowFeatures Source # | |
type SignalList WebWindowFeatures Source # | |
class GObject o => IsWebWindowFeatures o Source #
toWebWindowFeatures :: IsWebWindowFeatures o => o -> IO WebWindowFeatures Source #
Methods
equal
data WebWindowFeaturesEqualMethodInfo Source #
((~) * signature (b -> m Bool), MonadIO m, IsWebWindowFeatures a, IsWebWindowFeatures b) => MethodInfo * WebWindowFeaturesEqualMethodInfo a signature Source # | |
webWindowFeaturesEqual Source #
:: (HasCallStack, MonadIO m, IsWebWindowFeatures a, IsWebWindowFeatures b) | |
=> a |
|
-> b |
|
-> m Bool | Returns: |
Decides if a WebWindowFeatures
instance equals another, as
in has the same values.
Since: 1.0.3
new
:: (HasCallStack, MonadIO m) | |
=> m WebWindowFeatures | Returns: a new |
Creates a new WebWindowFeatures
instance with default values. It must
be manually attached to a WebView.
Since: 1.0.3
Properties
fullscreen
data WebWindowFeaturesFullscreenPropertyInfo Source #
constructWebWindowFeaturesFullscreen :: IsWebWindowFeatures o => Bool -> IO (GValueConstruct o) Source #
getWebWindowFeaturesFullscreen :: (MonadIO m, IsWebWindowFeatures o) => o -> m Bool Source #
setWebWindowFeaturesFullscreen :: (MonadIO m, IsWebWindowFeatures o) => o -> Bool -> m () Source #
webWindowFeaturesFullscreen :: AttrLabelProxy "fullscreen" Source #
height
data WebWindowFeaturesHeightPropertyInfo Source #
constructWebWindowFeaturesHeight :: IsWebWindowFeatures o => Int32 -> IO (GValueConstruct o) Source #
getWebWindowFeaturesHeight :: (MonadIO m, IsWebWindowFeatures o) => o -> m Int32 Source #
setWebWindowFeaturesHeight :: (MonadIO m, IsWebWindowFeatures o) => o -> Int32 -> m () Source #
webWindowFeaturesHeight :: AttrLabelProxy "height" Source #
locationbarVisible
data WebWindowFeaturesLocationbarVisiblePropertyInfo Source #
constructWebWindowFeaturesLocationbarVisible :: IsWebWindowFeatures o => Bool -> IO (GValueConstruct o) Source #
getWebWindowFeaturesLocationbarVisible :: (MonadIO m, IsWebWindowFeatures o) => o -> m Bool Source #
setWebWindowFeaturesLocationbarVisible :: (MonadIO m, IsWebWindowFeatures o) => o -> Bool -> m () Source #
webWindowFeaturesLocationbarVisible :: AttrLabelProxy "locationbarVisible" Source #
menubarVisible
data WebWindowFeaturesMenubarVisiblePropertyInfo Source #
constructWebWindowFeaturesMenubarVisible :: IsWebWindowFeatures o => Bool -> IO (GValueConstruct o) Source #
getWebWindowFeaturesMenubarVisible :: (MonadIO m, IsWebWindowFeatures o) => o -> m Bool Source #
setWebWindowFeaturesMenubarVisible :: (MonadIO m, IsWebWindowFeatures o) => o -> Bool -> m () Source #
webWindowFeaturesMenubarVisible :: AttrLabelProxy "menubarVisible" Source #
scrollbarVisible
data WebWindowFeaturesScrollbarVisiblePropertyInfo Source #
constructWebWindowFeaturesScrollbarVisible :: IsWebWindowFeatures o => Bool -> IO (GValueConstruct o) Source #
getWebWindowFeaturesScrollbarVisible :: (MonadIO m, IsWebWindowFeatures o) => o -> m Bool Source #
setWebWindowFeaturesScrollbarVisible :: (MonadIO m, IsWebWindowFeatures o) => o -> Bool -> m () Source #
webWindowFeaturesScrollbarVisible :: AttrLabelProxy "scrollbarVisible" Source #
statusbarVisible
data WebWindowFeaturesStatusbarVisiblePropertyInfo Source #
constructWebWindowFeaturesStatusbarVisible :: IsWebWindowFeatures o => Bool -> IO (GValueConstruct o) Source #
getWebWindowFeaturesStatusbarVisible :: (MonadIO m, IsWebWindowFeatures o) => o -> m Bool Source #
setWebWindowFeaturesStatusbarVisible :: (MonadIO m, IsWebWindowFeatures o) => o -> Bool -> m () Source #
webWindowFeaturesStatusbarVisible :: AttrLabelProxy "statusbarVisible" Source #
toolbarVisible
data WebWindowFeaturesToolbarVisiblePropertyInfo Source #
constructWebWindowFeaturesToolbarVisible :: IsWebWindowFeatures o => Bool -> IO (GValueConstruct o) Source #
getWebWindowFeaturesToolbarVisible :: (MonadIO m, IsWebWindowFeatures o) => o -> m Bool Source #
setWebWindowFeaturesToolbarVisible :: (MonadIO m, IsWebWindowFeatures o) => o -> Bool -> m () Source #
webWindowFeaturesToolbarVisible :: AttrLabelProxy "toolbarVisible" Source #
width
data WebWindowFeaturesWidthPropertyInfo Source #
constructWebWindowFeaturesWidth :: IsWebWindowFeatures o => Int32 -> IO (GValueConstruct o) Source #
getWebWindowFeaturesWidth :: (MonadIO m, IsWebWindowFeatures o) => o -> m Int32 Source #
setWebWindowFeaturesWidth :: (MonadIO m, IsWebWindowFeatures o) => o -> Int32 -> m () Source #
webWindowFeaturesWidth :: AttrLabelProxy "width" Source #
x
data WebWindowFeaturesXPropertyInfo Source #
constructWebWindowFeaturesX :: IsWebWindowFeatures o => Int32 -> IO (GValueConstruct o) Source #
getWebWindowFeaturesX :: (MonadIO m, IsWebWindowFeatures o) => o -> m Int32 Source #
setWebWindowFeaturesX :: (MonadIO m, IsWebWindowFeatures o) => o -> Int32 -> m () Source #
webWindowFeaturesX :: AttrLabelProxy "x" Source #
y
data WebWindowFeaturesYPropertyInfo Source #
constructWebWindowFeaturesY :: IsWebWindowFeatures o => Int32 -> IO (GValueConstruct o) Source #
getWebWindowFeaturesY :: (MonadIO m, IsWebWindowFeatures o) => o -> m Int32 Source #
setWebWindowFeaturesY :: (MonadIO m, IsWebWindowFeatures o) => o -> Int32 -> m () Source #
webWindowFeaturesY :: AttrLabelProxy "y" Source #