WebKit.WindowProperties¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w/co |
|||
r/w/co |
|||
r/w/co |
|||
r/w/co |
|||
r/w/co |
|||
r/w/co |
|||
r/w/co |
|||
r/w/co |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class WebKit.WindowProperties(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Window properties of a
WebKit.WebView.The content of a
WebKit.WebViewcan request to change certain properties of the window containing the view. 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, and the request to show theWebKit.WebViewfullscreen.The
WebKit.WebView::ready-to-showsignal handler is the proper place to apply the initial window properties. Then you can monitor theWebKit.WindowPropertiesby connecting to::notifysignal.```c static void ready_to_show_cb (
WebKit.WebView*web_view,objectuser_data) {Gtk.Widget*window;WebKit.WindowProperties*window_properties;boolvisible;// Create the window to contain the
WebKit.WebView. window = browser_window_new (); gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (web_view));Gtk.Widget.show(GTK_WIDGET (web_view));// Get the
WebKit.WindowPropertiesof the web view and monitor it. window_properties =WebKit.WebView.get_window_properties(web_view); g_signal_connect (window_properties, “notify::geometry”, G_CALLBACK (window_geometry_changed), window); g_signal_connect (window_properties, “notify::toolbar-visible”, G_CALLBACK (window_toolbar_visibility_changed), window); g_signal_connect (window_properties, “notify::menubar-visible”, G_CALLBACK (window_menubar_visibility_changed), window);// Apply the window properties before showing the window. visible =
WebKit.WindowProperties.get_toolbar_visible(window_properties); browser_window_set_toolbar_visible (BROWSER_WINDOW (window), visible); visible =WebKit.WindowProperties.get_menubar_visible(window_properties); browser_window_set_menubar_visible (BROWSER_WINDOW (window), visible);if (
WebKit.WindowProperties.get_fullscreen(window_properties)) {Gtk.Window.fullscreen(GTK_WINDOW (window)); } else {Gdk.Rectanglegeometry;Gtk.Window.set_resizable(GTK_WINDOW (window),WebKit.WindowProperties.get_resizable(window_properties));WebKit.WindowProperties.get_geometry(window_properties, &geometry); gtk_window_move (GTK_WINDOW (window), geometry.x, geometry.y); gtk_window_resize (GTK_WINDOW (window), geometry.width, geometry.height); }Gtk.Widget.show(window); } ```- get_fullscreen()¶
-
Get whether the window should be shown in fullscreen state or not.
- get_geometry()¶
- Returns:
return location for the window geometry
- Return type:
geometry:
Gdk.Rectangle
Get the geometry the window should have on the screen when shown.
- get_locationbar_visible()¶
-
Get whether the window should have the locationbar visible or not.
-
Get whether the window should have the menubar visible or not.
- get_resizable()¶
-
Get whether the window should be resizable by the user or not.
- get_scrollbars_visible()¶
-
Get whether the window should have the scrollbars visible or not.
- get_statusbar_visible()¶
-
Get whether the window should have the statusbar visible or not.
Property Details¶
- WebKit.WindowProperties.props.fullscreen¶
- Name:
fullscreen- Type:
- Default Value:
- Flags:
Whether window will be displayed fullscreen.
- WebKit.WindowProperties.props.geometry¶
- Name:
geometry- Type:
- Default Value:
- Flags:
The size and position of the window on the screen.
- WebKit.WindowProperties.props.locationbar_visible¶
- Name:
locationbar-visible- Type:
- Default Value:
- Flags:
Whether the locationbar should be visible for the window.
- Name:
menubar-visible- Type:
- Default Value:
- Flags:
Whether the menubar should be visible for the window.
- WebKit.WindowProperties.props.resizable¶
- Name:
resizable- Type:
- Default Value:
- Flags:
Whether the window can be resized.
- WebKit.WindowProperties.props.scrollbars_visible¶
- Name:
scrollbars-visible- Type:
- Default Value:
- Flags:
Whether the scrollbars should be visible for the window.
- WebKit.WindowProperties.props.statusbar_visible¶
- Name:
statusbar-visible- Type:
- Default Value:
- Flags:
Whether the statusbar should be visible for the window.