### Initialize and Monitor Window Properties Source: https://webkitgtk.org/reference/webkitgtk/stable/class.WindowProperties.html This example shows how to get WebKitWindowProperties from a WebKitWebView, connect to 'notify::geometry' and other signals to monitor changes, and apply initial window properties before showing the window. It demonstrates setting toolbar, menubar, fullscreen, resizable, and geometry properties. ```c static void ready_to_show_cb (WebKitWebView *web_view, gpointer user_data) { GtkWidget *window; WebKitWindowProperties *window_properties; gboolean visible; // Create the window to contain the WebKitWebView. window = browser_window_new (); gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (web_view)); gtk_widget_show (GTK_WIDGET (web_view)); // Get the WebKitWindowProperties of the web view and monitor it. window_properties = webkit_web_view_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_window_properties_get_toolbar_visible (window_properties); browser_window_set_toolbar_visible (BROWSER_WINDOW (window), visible); visible = webkit_window_properties_get_menubar_visible (window_properties); browser_window_set_menubar_visible (BROWSER_WINDOW (window), visible); if (webkit_window_properties_get_fullscreen (window_properties)) { gtk_window_fullscreen (GTK_WINDOW (window)); } else { GdkRectangle geometry; gtk_window_set_resizable (GTK_WINDOW (window), webkit_window_properties_get_resizable (window_properties)); webkit_window_properties_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); } ``` -------------------------------- ### Install Sysprof on Ubuntu Source: https://webkitgtk.org/reference/webkitgtk/stable/profiling.html Installs the Sysprof tool on Ubuntu systems. This is a prerequisite for profiling. ```bash apt install sysprof ``` -------------------------------- ### Install Sysprof on Fedora Source: https://webkitgtk.org/reference/webkitgtk/stable/profiling.html Installs the Sysprof tool on Fedora systems. This is a prerequisite for profiling. ```bash dnf install sysprof ``` -------------------------------- ### Install Polkit Agent on Ubuntu Source: https://webkitgtk.org/reference/webkitgtk/stable/profiling.html Installs the GNOME Polkit authentication agent on Ubuntu, which is required for `sysprof-cli` to make authorized D-Bus calls. ```bash sudo apt install policykit-1-gnome ``` -------------------------------- ### webkit_settings_get_media_content_types_requiring_hardware_support Source: https://webkitgtk.org/reference/webkitgtk/stable/method.Settings.get_media_content_types_requiring_hardware_support.html Gets the `WebKitSettings:media-content-types-requiring-hardware-support` property. ```APIDOC ## webkit_settings_get_media_content_types_requiring_hardware_support ### Description Gets the `WebKitSettings:media-content-types-requiring-hardware-support` property. ### Method This is a getter method for a property. ### Return Value - **const gchar*** - Media content types requiring hardware support, or `NULL`. The data is owned by the instance. The value is a NUL terminated UTF-8 string. ``` -------------------------------- ### webkit_download_get_elapsed_time Source: https://webkitgtk.org/reference/webkitgtk/stable/class.Download.html Gets the total time elapsed since the download started, including fractional seconds. ```APIDOC ## webkit_download_get_elapsed_time ### Description Gets the elapsed time in seconds, including any fractional part. ### Method [Method signature or call example if available] ``` -------------------------------- ### Get ITP Summary Asynchronously Source: https://webkitgtk.org/reference/webkitgtk/stable/method.NetworkSession.get_itp_summary.html Call this method to start an asynchronous operation to retrieve the ITP summary. A GAsyncReadyCallback must be provided to handle the result, and webkit_network_session_get_itp_summary_finish() should be called within the callback to get the actual summary data. ```c void webkit_network_session_get_itp_summary ( WebKitNetworkSession* session, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data ) ``` -------------------------------- ### Run Polkit Agent Source: https://webkitgtk.org/reference/webkitgtk/stable/profiling.html Starts the GNOME Polkit authentication agent. This should be run if `sysprof-cli` encounters D-Bus authorization errors. ```bash /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 ``` -------------------------------- ### Get Initiating WebView for Download Source: https://webkitgtk.org/reference/webkitgtk/stable/method.Download.get_web_view.html Retrieve the WebKitWebView that started the download. Returns NULL if the download was not initiated by a WebView. The returned data is owned by the instance. ```c WebKitWebView* webkit_download_get_web_view ( WebKitDownload* download ) ``` -------------------------------- ### WebKitPrintOperation: page-setup Source: https://webkitgtk.org/reference/webkitgtk/stable/property.PrintOperation.page-setup.html The initial GtkPageSetup for the print operation. This property is readable and writable. ```APIDOC ## WebKitPrintOperation: page-setup ### Description The initial `GtkPageSetup` for the print operation. ### Method `webkit_print_operation_get_page_setup()` (getter), `webkit_print_operation_set_page_setup()` (setter) ### Parameters #### Getter None #### Setter - **page_setup** (`GtkPageSetup`) - The `GtkPageSetup` to set. ### Response #### Success Response (Getter) - **page_setup** (`GtkPageSetup`) - The current `GtkPageSetup`. #### Success Response (Setter) None ``` -------------------------------- ### Get Elapsed Time Source: https://webkitgtk.org/reference/webkitgtk/stable/method.Download.get_elapsed_time.html Retrieves the time elapsed since the download started, in seconds. This value is accurate up to the point the download finished, encountered an error, or was cancelled. ```APIDOC ## Method webkit_download_get_elapsed_time ### Description Gets the elapsed time in seconds, including any fractional part. If the download finished, had an error or was cancelled this is the time between its start and the event. ### Parameters #### Path Parameters - **download** (WebKitDownload*) - The WebKitDownload object. ### Return value _Type:_ `gdouble` Seconds since the download was started. ``` -------------------------------- ### WebKitSettings Instance Methods Source: https://webkitgtk.org/reference/webkitgtk/stable/class.Settings.html Methods for applying settings from a key file and retrieving various setting properties. ```APIDOC ## webkit_settings_apply_from_key_file ### Description Reads the contents of the given `group_name` from the given `key_file` and apply the value of each key/value to the corresponding property on the `settings`. ### Instance Methods - `webkit_settings_apply_from_key_file(settings, key_file, group_name)` ``` ```APIDOC ## webkit_settings_get_allow_file_access_from_file_urls ### Description Get the `WebKitSettings:allow-file-access-from-file-urls` property. ### Instance Methods - `webkit_settings_get_allow_file_access_from_file_urls(settings)` ``` ```APIDOC ## webkit_settings_get_allow_modal_dialogs ### Description Get the `WebKitSettings:allow-modal-dialogs` property. ### Instance Methods - `webkit_settings_get_allow_modal_dialogs(settings)` ``` ```APIDOC ## webkit_settings_get_allow_top_navigation_to_data_urls ### Description Get the `WebKitSettings:allow-top-navigation-to-data-urls` property. ### Instance Methods - `webkit_settings_get_allow_top_navigation_to_data_urls(settings)` ``` ```APIDOC ## webkit_settings_get_allow_universal_access_from_file_urls ### Description Get the `WebKitSettings:allow-universal-access-from-file-urls` property. ### Instance Methods - `webkit_settings_get_allow_universal_access_from_file_urls(settings)` ``` ```APIDOC ## webkit_settings_get_auto_load_images ### Description Get the `WebKitSettings:auto-load-images` property. ### Instance Methods - `webkit_settings_get_auto_load_images(settings)` ``` ```APIDOC ## webkit_settings_get_cursive_font_family ### Description Gets the `WebKitSettings:cursive-font-family` property. ### Instance Methods - `webkit_settings_get_cursive_font_family(settings)` ``` ```APIDOC ## webkit_settings_get_default_charset ### Description Gets the `WebKitSettings:default-charset` property. ### Instance Methods - `webkit_settings_get_default_charset(settings)` ``` ```APIDOC ## webkit_settings_get_default_font_family ### Description Gets the `WebKitSettings:default-font-family` property. ### Instance Methods - `webkit_settings_get_default_font_family(settings)` ``` ```APIDOC ## webkit_settings_get_default_font_size ### Description Gets the `WebKitSettings:default-font-size` property. ### Instance Methods - `webkit_settings_get_default_font_size(settings)` ``` ```APIDOC ## webkit_settings_get_default_monospace_font_size ### Description Gets the `WebKitSettings:default-monospace-font-size` property. ### Instance Methods - `webkit_settings_get_default_monospace_font_size(settings)` ``` ```APIDOC ## webkit_settings_get_disable_web_security ### Description Get the `WebKitSettings:disable-web-security` property. ### Instance Methods - `webkit_settings_get_disable_web_security(settings)` ``` ```APIDOC ## webkit_settings_get_draw_compositing_indicators ### Description Get the `WebKitSettings:draw-compositing-indicators` property. ### Instance Methods - `webkit_settings_get_draw_compositing_indicators(settings)` ``` ```APIDOC ## webkit_settings_get_enable_2d_canvas_acceleration ### Description Get the `WebKitSettings:enable-2d-canvas-acceleration` property. ### Instance Methods - `webkit_settings_get_enable_2d_canvas_acceleration(settings)` ``` ```APIDOC ## webkit_settings_get_enable_back_forward_navigation_gestures ### Description Get the `WebKitSettings:enable-back-forward-navigation-gestures` property. ### Instance Methods - `webkit_settings_get_enable_back_forward_navigation_gestures(settings)` ``` ```APIDOC ## webkit_settings_get_enable_caret_browsing ### Description Get the `WebKitSettings:enable-caret-browsing` property. ### Instance Methods - `webkit_settings_get_enable_caret_browsing(settings)` ``` ```APIDOC ## webkit_settings_get_enable_developer_extras ### Description Get the `WebKitSettings:enable-developer-extras` property. ### Instance Methods - `webkit_settings_get_enable_developer_extras(settings)` ``` ```APIDOC ## webkit_settings_get_enable_dns_prefetching ### Description Get the `WebKitSettings:enable-dns-prefetching` property. ### Instance Methods - `webkit_settings_get_enable_dns_prefetching(settings)` ``` ```APIDOC ## webkit_settings_get_enable_encrypted_media ### Description Get the `WebKitSettings:enable-encrypted-media` property. ### Instance Methods - `webkit_settings_get_enable_encrypted_media(settings)` ``` ```APIDOC ## webkit_settings_get_enable_fullscreen ### Description Get the `WebKitSettings:enable-fullscreen` property. ### Instance Methods - `webkit_settings_get_enable_fullscreen(settings)` ``` ```APIDOC ## webkit_settings_get_enable_html5_database ### Description Get the `WebKitSettings:enable-html5-database` property. ### Instance Methods - `webkit_settings_get_enable_html5_database(settings)` ``` ```APIDOC ## webkit_settings_get_enable_html5_local_storage ### Description Get the `WebKitSettings:enable-html5-local-storage` property. ### Instance Methods - `webkit_settings_get_enable_html5_local_storage(settings)` ``` ```APIDOC ## webkit_settings_get_enable_hyperlink_auditing ### Description Get the `WebKitSettings:enable-hyperlink-auditing` property. ### Instance Methods - `webkit_settings_get_enable_hyperlink_auditing(settings)` ``` ```APIDOC ## webkit_settings_get_enable_javascript ### Description Get the `WebKitSettings:enable-javascript` property. ### Instance Methods - `webkit_settings_get_enable_javascript(settings)` ``` ```APIDOC ## webkit_settings_get_enable_javascript_markup ### Description Get the `WebKitSettings:enable-javascript-markup` property. ### Instance Methods - `webkit_settings_get_enable_javascript_markup(settings)` ``` -------------------------------- ### Get Download Elapsed Time Source: https://webkitgtk.org/reference/webkitgtk/stable/method.Download.get_elapsed_time.html Retrieves the elapsed time in seconds for a WebKitDownload. This value represents the time from the download's start until it finished, encountered an error, or was cancelled. ```c gdouble webkit_download_get_elapsed_time ( WebKitDownload* download ) ``` -------------------------------- ### Get media playback user gesture requirement Source: https://webkitgtk.org/reference/webkitgtk/stable/property.Settings.media-playback-requires-user-gesture.html Retrieves the current setting for whether a user gesture is required to start media playback. This is useful for understanding the current playback behavior. ```c webkit_settings_get_media_playback_requires_user_gesture() ``` -------------------------------- ### WebKitApplicationInfo Constructors Source: https://webkitgtk.org/reference/webkitgtk/stable/struct.ApplicationInfo.html Methods for creating and initializing WebKitApplicationInfo objects. ```APIDOC ## webkit_application_info_new ### Description Creates a new `WebKitApplicationInfo`. ### Since 2.18 ``` -------------------------------- ### webkit_navigation_action_get_frame_name Source: https://webkitgtk.org/reference/webkitgtk/stable/method.NavigationAction.get_frame_name.html Gets the navigation target frame name. For example, if navigation was triggered by clicking a link with a target attribute equal to “_blank”, this will return the value of that attribute. In all other cases, this function will return NULL. ```APIDOC ## WebKitNavigationAction get_frame_name ### Description Gets the `navigation` target frame name. For example if navigation was triggered by clicking a link with a target attribute equal to “_blank”, this will return the value of that attribute. In all other cases this function will return `NULL`. ### Method webkit_navigation_action_get_frame_name ### Parameters #### Path Parameters - **navigation** (WebKitNavigationAction*) - Required - The WebKitNavigationAction to get the frame name from. ### Return value _Type:_ `const char*` The name of the new frame this navigation action targets or `NULL`. ### Remarks The return value can be `NULL`. The value is a NUL terminated UTF-8 string. ``` -------------------------------- ### webkit_print_operation_run_dialog Source: https://webkitgtk.org/reference/webkitgtk/stable/method.PrintOperation.run_dialog.html Runs the print dialog and starts the printing process. This method blocks until the dialog is closed. It returns the user's action (cancel or print) and updates the print settings and page setup upon successful printing. ```APIDOC ## Method: webkit_print_operation_run_dialog ### Description Run the print dialog and start printing using the options selected by the user. This method returns when the print dialog is closed. If the print dialog is cancelled `WEBKIT_PRINT_OPERATION_RESPONSE_CANCEL` is returned. If the user clicks on the print button, `WEBKIT_PRINT_OPERATION_RESPONSE_PRINT` is returned and the print operation starts. In this case, the `WebKitPrintOperation::finished` signal is emitted when the operation finishes. If an error occurs while printing, the signal `WebKitPrintOperation::failed` is emitted before `WebKitPrintOperation::finished`. If the print dialog is not cancelled current print settings and page setup of `print_operation` are updated with options selected by the user when Print button is pressed in print dialog. You can get the updated print settings and page setup by calling `webkit_print_operation_get_print_settings()` and `webkit_print_operation_get_page_setup()` after this method. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Method Signature ```c WebKitPrintOperationResponse webkit_print_operation_run_dialog ( WebKitPrintOperation* print_operation, GtkWindow* parent ) ``` ### Parameters - **print_operation** (*WebKitPrintOperation*): The print operation object. - **parent** (*GtkWindow*): Transient parent of the print dialog. The argument can be `NULL`. ### Return Value - *WebKitPrintOperationResponse*: The `WebKitPrintOperationResponse` of the print dialog. ``` -------------------------------- ### Start System-Wide Sysprof Capture Source: https://webkitgtk.org/reference/webkitgtk/stable/profiling.html Initiates a system-wide profiling capture using sysprof-cli. This captures all system activity. ```bash sysprof-cli -f ``` -------------------------------- ### WebKitSettings: media-content-types-requiring-hardware-support Source: https://webkitgtk.org/reference/webkitgtk/stable/property.Settings.media-content-types-requiring-hardware-support.html This property allows you to get or set a list of media content types that require hardware support. The types are semicolon-separated. For example: 'video/webm; codecs="vp_"':'video/mp4; codecs="avc_"':'video/*' codecs="av1*"'. ```APIDOC ## WebKitSettings: media-content-types-requiring-hardware-support ### Description List of media content types requiring hardware support, split by semicolons (:). For example: ‘video/webm; codecs=”vp _“:video/mp4; codecs=”avc_ “:video/* codecs=”av1*”’. ### Type `gchar*` ### Available since 2.30 ### Default value NULL ### Getter method `webkit_settings_get_media_content_types_requiring_hardware_support()` ### Setter method `webkit_settings_set_media_content_types_requiring_hardware_support()` ### Flags Readable: yes Writable: yes Construct: yes Construct only: no ``` -------------------------------- ### Instance Methods Source: https://webkitgtk.org/reference/webkitgtk/stable/class.AutomationSession.html Methods available on WebKitAutomationSession instances. ```APIDOC ## webkit_automation_session_get_application_info ### Description Get the the previously set `WebKitAutomationSession`. ### Method webkit_automation_session_get_application_info ### Since 2.18 ``` ```APIDOC ## webkit_automation_session_get_id ### Description Get the unique identifier of a `WebKitAutomationSession`. ### Method webkit_automation_session_get_id ### Since 2.18 ``` ```APIDOC ## webkit_automation_session_set_application_info ### Description Set the application information to `session`. ### Method webkit_automation_session_set_application_info ### Since 2.18 ``` -------------------------------- ### Enable Developer Extras and Show Inspector Source: https://webkitgtk.org/reference/webkitgtk/stable/class.WebInspector.html This snippet demonstrates how to enable developer extras in WebKitSettings, load a URI, and then show the WebKitWebInspector. Ensure developer extras are enabled before attempting to show the inspector. ```c /* Enable the developer extras */ WebKitSettings *settings = webkit_web_view_get_settings (WEBKIT_WEB_VIEW(my_webview)); g_object_set (G_OBJECT(settings), "enable-developer-extras", TRUE, NULL); /* Load some data or reload to be able to inspect the page */ webkit_web_view_load_uri (WEBKIT_WEB_VIEW(my_webview), "http://www.gnome.org"); /* Show the inspector */ WebKitWebInspector *inspector = webkit_web_view_get_inspector (WEBKIT_WEB_VIEW(my_webview)); webkit_web_inspector_show (WEBKIT_WEB_INSPECTOR(inspector)); ``` -------------------------------- ### webkit_print_operation_print Source: https://webkitgtk.org/reference/webkitgtk/stable/method.PrintOperation.print.html Starts a print operation using the current print settings and page setup. If these are not explicitly set, default options will be used, and the job will be sent to the default printer. The `WebKitPrintOperation::finished` signal is emitted upon completion, and `WebKitPrintOperation::failed` is emitted before `finished` if an error occurs. Note that in a sandbox environment, this function has limitations, particularly for physical printers. ```APIDOC ## webkit_print_operation_print ### Description Start a print operation using current print settings and page setup. Start a print operation using current print settings and page setup without showing the print dialog. If either print settings or page setup are not set with `webkit_print_operation_set_print_settings()` and `webkit_print_operation_set_page_setup()`, the default options will be used and the print job will be sent to the default printer. The `WebKitPrintOperation::finished` signal is emitted when the printing operation finishes. If an error occurs while printing the signal `WebKitPrintOperation::failed` is emitted before `WebKitPrintOperation::finished`. If the app is running in a sandbox, this function only works if printing to a file that is in a location accessible to the sandbox, usually acquired through the File Chooser portal. This function will not work for physical printers when running in a sandbox. ### Method ```c void webkit_print_operation_print ( WebKitPrintOperation* print_operation ) ``` ``` -------------------------------- ### Get Number of Items Source: https://webkitgtk.org/reference/webkitgtk/stable/class.OptionMenu.html Gets the total number of items in the menu. ```APIDOC ## webkit_option_menu_get_n_items ### Description Gets the length of the `menu`. ### Method Signature webkit_option_menu_get_n_items (menu: WebKitOptionMenu) returns gint ### Parameters * **menu** (WebKitOptionMenu) - The `WebKitOptionMenu` whose length is to be determined. ### Returns (gint) - The number of items in the menu. ``` -------------------------------- ### ready_to_show Source: https://webkitgtk.org/reference/webkitgtk/stable/class.WebView.html This signal is emitted when the web view is ready to be displayed. ```APIDOC ## ready_to_show ### Description This signal is emitted when the web view is ready to be displayed. ### Signal Signature `void (* ready_to_show) ( WebKitWebView* web_view )` ``` -------------------------------- ### Get Context Menu Item Source: https://webkitgtk.org/reference/webkitgtk/stable/method.ContextMenu.get_item_at_position.html Gets the context menu item at the specified position. ```APIDOC ## webkit_context_menu_get_item_at_position ### Description Gets the item at the given position in the `menu`. ### Method WebKitContextMenuget_item_at_position ### Parameters #### Path Parameters - **menu** (WebKitContextMenu*) - Required - The context menu to retrieve the item from. - **position** (guint) - Required - The zero-based index of the item to retrieve. ### Return value #### Success Response - **WebKitContextMenuItem*** - The `WebKitContextMenuItem` at the specified position, or `NULL` if the position is out of bounds. The returned item is owned by the menu instance. ``` -------------------------------- ### WebKit.Settings:media-content-types-requiring-hardware-support Source: https://webkitgtk.org/reference/webkitgtk/stable/class.Settings.html A semicolon-separated list of media content types that require hardware support for playback. ```APIDOC ## WebKit.Settings:media-content-types-requiring-hardware-support ### Description List of media content types requiring hardware support, split by semicolons (:). For example: ‘video/webm; codecs=”vp _“:video/mp4; codecs=”avc_ “:video/* codecs=”av1*”’. ### Since 2.30 ``` -------------------------------- ### WebKit.WebContext::initialize-web-process-extensions Source: https://webkitgtk.org/reference/webkitgtk/stable/class.WebContext.html This signal is emitted when a new web process is about to be launched. It signals the most appropriate moment to use webkit_web_context_set_web_process_extensions_initialization_user_data() and webkit_web_context_set_web_process_extensions_directory(). ```APIDOC ## WebKit.WebContext::initialize-web-process-extensions ### Description This signal is emitted when a new web process is about to be launched. It signals the most appropriate moment to use `webkit_web_context_set_web_process_extensions_initialization_user_data()` and `webkit_web_context_set_web_process_extensions_directory()`. ### Since 2.4 ``` -------------------------------- ### Constructors Source: https://webkitgtk.org/reference/webkitgtk/stable/class.NetworkSession.html Methods for creating new WebKitNetworkSession instances. ```APIDOC ## webkit_network_session_new ### Description Creates a new `WebKitNetworkSession` with a persistent `WebKitWebsiteDataManager`. The parameters `data_directory` and `cache_directory` will be used as construct properties of the `WebKitWebsiteDataManager` of the network session. Note that if `NULL` is passed, the default directory will be passed to `WebKitWebsiteDataManager` so that `webkit_website_data_manager_get_base_data_directory()` and `webkit_website_data_manager_get_base_cache_directory()` always return a value for non ephemeral sessions. ### Since 2.40 ``` ```APIDOC ## webkit_network_session_new_ephemeral ### Description Creates a new `WebKitNetworkSession` with an ephemeral `WebKitWebsiteDataManager`. ### Since 2.40 ``` -------------------------------- ### Get Find Controller Source: https://webkitgtk.org/reference/webkitgtk/stable/method.WebView.get_find_controller.html Gets the WebKitFindController that will allow the caller to query the WebKitWebView for the text to look for. ```APIDOC ## WebKitWebViewget_find_controller ### Description Gets the `WebKitFindController` that will allow the caller to query the `WebKitWebView` for the text to look for. ### Method ```c WebKitFindController* webkit_web_view_get_find_controller ( WebKitWebView* web_view ) ``` ### Return Value _Type:_ `WebKitFindController` The `WebKitFindController` associated to this particular `WebKitWebView`. The data is owned by the instance. ``` -------------------------------- ### WebKit.WebViewClass.ready_to_show Source: https://webkitgtk.org/reference/webkitgtk/stable/class.WebView.html Virtual method called when the WebView is ready to be shown. ```APIDOC ## WebKit.WebViewClass.ready_to_show ### Description No description available. ### Method Virtual Method ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### Get Enable Caret Browsing Source: https://webkitgtk.org/reference/webkitgtk/stable/method.Settings.get_enable_caret_browsing.html Gets the WebKitSettings:enable-caret-browsing property. This property determines if caret browsing is enabled. ```APIDOC ## WebKitSettings.get_enable_caret_browsing ### Description Gets the `WebKitSettings:enable-caret-browsing` property. ### Method `gboolean webkit_settings_get_enable_caret_browsing (WebKitSettings* settings)` ### Return value _Type:_ `gboolean` `TRUE` If caret browsing is enabled or `FALSE` otherwise. ``` -------------------------------- ### Get Enable Media Source: https://webkitgtk.org/reference/webkitgtk/stable/class.Settings.html Retrieves the current state of the `WebKitSettings:enable-media` property. ```APIDOC ## webkit_settings_get_enable_media ### Description Get the `WebKitSettings:enable-media` property. ### Method GET ### Endpoint /settings/enable-media ``` -------------------------------- ### WEBKIT_CONTEXT_MENU_ACTION_SELECT_ALL Source: https://webkitgtk.org/reference/webkitgtk/stable/enum.ContextMenuAction.html Select all text. ```APIDOC ## WEBKIT_CONTEXT_MENU_ACTION_SELECT_ALL ### Description Select all text. ### Value `18` ### Nickname `select-all` ### Available since 6.0 ``` -------------------------------- ### Get Event Source: https://webkitgtk.org/reference/webkitgtk/stable/class.OptionMenu.html Gets the GdkEvent that triggered the dropdown menu. Returns NULL if the menu was not triggered by user interaction. ```APIDOC ## webkit_option_menu_get_event ### Description Gets the `GdkEvent` that triggered the dropdown menu. If `menu` was not triggered by a user interaction, like a mouse click, `NULL` is returned. ### Method Signature webkit_option_menu_get_event (menu: WebKitOptionMenu) returns GdkEvent ### Parameters * **menu** (WebKitOptionMenu) - The `WebKitOptionMenu` to get the event from. ### Returns (GdkEvent) - The `GdkEvent` that triggered the menu, or NULL. ``` -------------------------------- ### WebKit.WebViewClass.create Source: https://webkitgtk.org/reference/webkitgtk/stable/class.WebView.html Virtual method for creating a WebView instance. ```APIDOC ## WebKit.WebViewClass.create ### Description No description available. ### Method Virtual Method ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### Get Website Data Size Source: https://webkitgtk.org/reference/webkitgtk/stable/method.WebsiteData.get_size.html Use this function to get the size of website data for specific types. Note that only `WEBKIT_WEBSITE_DATA_DISK_CACHE` is supported. ```c guint64 webkit_website_data_get_size ( WebKitWebsiteData* website_data, WebKitWebsiteDataTypes types ) ``` -------------------------------- ### WebKitWebView.resource_load_started Source: https://webkitgtk.org/reference/webkitgtk/stable/vfunc.WebView.resource_load_started.html This virtual method is called when a resource load is started. It receives the web view, the resource, and the URI request. ```APIDOC ## WebKitWebView.resource_load_started ### Description This virtual method is called when a resource load is started. It receives the web view, the resource, and the URI request. ### Parameters #### Parameters - **resource** (WebKitWebResource) - No description available. The data is owned by the caller of the function. - **request** (WebKitURIRequest) - No description available. The data is owned by the caller of the function. ``` -------------------------------- ### Create WebKitWebsitePolicies with Policies Source: https://webkitgtk.org/reference/webkitgtk/stable/ctor.WebsitePolicies.new_with_policies.html Use this function to create a new `WebKitWebsitePolicies` object. Policies are passed as variadic arguments, terminated by NULL. The caller owns the returned object and is responsible for freeing it. ```c WebKitWebsitePolicies *default_website_policies = webkit_website_policies_new_with_policies( "autoplay", WEBKIT_AUTOPLAY_DENY, NULL); // ... WebKitWebView *view = WEBKIT_WEB_VIEW(g_object_new(WEBKIT_TYPE_WEB_VIEW, "web-context", ctx, "settings", settings, "user-content-manager", content_manager, "website-policies", default_website_policies, NULL)); // ... ``` -------------------------------- ### Get User Content Filter Error Quark Source: https://webkitgtk.org/reference/webkitgtk/stable/error.UserContentFilterError.html Gets the quark for the domain of user content filter errors. This function is used to retrieve the unique identifier for the WebKitUserContentFilterError domain. ```c webkit_user_content_filter_error_quark ``` -------------------------------- ### Handle Permission Request with a Dialog Source: https://webkitgtk.org/reference/webkitgtk/stable/signal.WebView.permission-request.html Example of handling a permission request by displaying a GTK dialog to the user. This callback allows the user to explicitly grant or deny the request. ```c static gboolean permission_request_cb ( WebKitWebView *web_view, WebKitPermissionRequest *request, GtkWindow *parent_window) { GtkWidget *dialog = gtk_message_dialog_new (parent_window, GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, "Allow Permission Request?"); gtk_widget_show (dialog); gint result = gtk_dialog_run (GTK_DIALOG (dialog)); switch (result) { case GTK_RESPONSE_YES: webkit_permission_request_allow (request); break; default: webkit_permission_request_deny (request); break; } gtk_widget_destroy (dialog); return TRUE; } ``` -------------------------------- ### webkit_context_menu_get_user_data Source: https://webkitgtk.org/reference/webkitgtk/stable/method.ContextMenu.get_user_data.html Gets the user data of a WebKitContextMenu. This function can be used from the UI Process to get user data previously set from the Web Process with webkit_context_menu_set_user_data(). Available since version 2.8. ```APIDOC ## webkit_context_menu_get_user_data ### Description Gets the user data of `menu`. This function can be used from the UI Process to get user data previously set from the Web Process with webkit_context_menu_set_user_data(). ### Method ```c GVariant* webkit_context_menu_get_user_data ( WebKitContextMenu* menu ) ``` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Response #### Success Response (200) - **GVariant** - The user data of `menu`, or `NULL` if `menu` doesn’t have user data. The data is owned by the instance. #### Response Example None provided in source. ``` -------------------------------- ### WebKit.WebViewClass.resource_load_started Source: https://webkitgtk.org/reference/webkitgtk/stable/class.WebView.html Virtual method called when a resource load starts. ```APIDOC ## WebKit.WebViewClass.resource_load_started ### Description No description available. ### Method Virtual Method ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### Get HTTP Method of URI Scheme Request Source: https://webkitgtk.org/reference/webkitgtk/stable/method.URISchemeRequest.get_http_method.html Use this function to retrieve the HTTP method (e.g., GET, POST) of a WebKitURISchemeRequest. The returned string is owned by the instance and is a NUL-terminated UTF-8 string. ```c const gchar* webkit_uri_scheme_request_get_http_method ( WebKitURISchemeRequest* request ) ``` -------------------------------- ### webkit_settings_new_with_settings Source: https://webkitgtk.org/reference/webkitgtk/stable/ctor.Settings.new_with_settings.html Creates a new WebKitSettings instance with the given settings. It must be manually attached to a WebKitWebView. This method is not directly available to language bindings. ```APIDOC ## WebKitSettings.new_with_settings ### Description Creates a new `WebKitSettings` instance with the given settings. It must be manually attached to a `WebKitWebView`. This method is not directly available to language bindings. ### Method Signature ```c WebKitSettings* webkit_settings_new_with_settings (const gchar* first_setting_name, ...) ``` ### Parameters #### `first_setting_name` - **Type:** `const gchar*` - **Description:** Name of the first setting to set. The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. #### `...` - **Type:** `` - **Description:** Value of the first setting, followed by more settings, `NULL`-terminated. ### Return Value - **Type:** `WebKitSettings` - **Description:** A new `WebKitSettings` instance. The caller of the function takes ownership of the data and is responsible for freeing it. ``` -------------------------------- ### webkit_security_origin_get_protocol Source: https://webkitgtk.org/reference/webkitgtk/stable/method.SecurityOrigin.get_protocol.html Gets the protocol of the WebKitSecurityOrigin. ```APIDOC ## webkit_security_origin_get_protocol ### Description Gets the protocol of `origin`. ### Method C Function ### Declaration ```c const gchar* webkit_security_origin_get_protocol ( WebKitSecurityOrigin* origin ) ``` ### Parameters #### Path Parameters - **origin** (WebKitSecurityOrigin*) - The WebKitSecurityOrigin to get the protocol from. ### Return value _Type:_ `const gchar*` The protocol of the `WebKitSecurityOrigin`. The data is owned by the instance. The return value can be `NULL`. The value is a NUL terminated UTF-8 string. ``` -------------------------------- ### webkit_option_menu_item_get_tooltip Source: https://webkitgtk.org/reference/webkitgtk/stable/method.OptionMenuItem.get_tooltip.html Get the tooltip of a WebKitOptionMenuItem. ```APIDOC ## webkit_option_menu_item_get_tooltip ### Description Get the tooltip of a `WebKitOptionMenuItem`. ### Method `webkit_option_menu_item_get_tooltip` ### Parameters #### Path Parameters - **item** (WebKitOptionMenuItem*) - Required - The `WebKitOptionMenuItem` to get the tooltip from. ### Return value _Type:_ `const gchar*` The tooltip of `item`, or `NULL`. The data is owned by the instance. The value is a NUL terminated UTF-8 string. ``` -------------------------------- ### Get Enable WebRTC Source: https://webkitgtk.org/reference/webkitgtk/stable/class.Settings.html Retrieves the current state of the `WebKitSettings:enable-webrtc` property. ```APIDOC ## webkit_settings_get_enable_webrtc ### Description Get the `WebKitSettings:enable-webrtc` property. ### Method GET ### Endpoint /settings/enable-webrtc ``` -------------------------------- ### enable-mock-capture-devices Source: https://webkitgtk.org/reference/webkitgtk/stable/property.Settings.enable-mock-capture-devices.html Enable or disable the Mock Capture Devices. Those are fake Microphone and Camera devices to be used as MediaStream sources. ```APIDOC ## Property enable-mock-capture-devices ### Description Enable or disable the Mock Capture Devices. Those are fake Microphone and Camera devices to be used as MediaStream sources. ### Type `gboolean` ### Available since 2.24 ### Default value FALSE ### Getter method `webkit_settings_get_enable_mock_capture_devices()` ### Setter method `webkit_settings_set_enable_mock_capture_devices()` ### Flags - Readable: yes - Writable: yes - Construct: yes - Construct only: no ``` -------------------------------- ### webkit_web_view_get_window_properties Source: https://webkitgtk.org/reference/webkitgtk/stable/class.WebView.html Get the WebKitWindowProperties object. ```APIDOC ## webkit_web_view_get_window_properties ### Description Get the `WebKitWindowProperties` object. ### Since 6.0 (unstable) ``` -------------------------------- ### webkit_context_menu_get_n_items Source: https://webkitgtk.org/reference/webkitgtk/stable/method.ContextMenu.get_n_items.html Gets the length of the `menu`. ```APIDOC ## webkit_context_menu_get_n_items ### Description Gets the length of the `menu`. ### Method ```c guint webkit_context_menu_get_n_items (WebKitContextMenu* menu) ``` ### Parameters #### Path Parameters - **menu** (WebKitContextMenu*) - The WebKitContextMenu to get the number of items from. ### Return value _Type:_ `guint` The number of `WebKitContextMenuItem`s in `menu`. ``` -------------------------------- ### Get Enable WebAudio Source: https://webkitgtk.org/reference/webkitgtk/stable/class.Settings.html Retrieves the current state of the `WebKitSettings:enable-webaudio` property. ```APIDOC ## webkit_settings_get_enable_webaudio ### Description Get the `WebKitSettings:enable-webaudio` property. ### Method GET ### Endpoint /settings/enable-webaudio ``` -------------------------------- ### webkit_web_extension_get_version Source: https://webkitgtk.org/reference/webkitgtk/stable/class.WebExtension.html Get the version for the extension. ```APIDOC ## webkit_web_extension_get_version ### Description Get the version for the extension. ### Since 2.52 ``` -------------------------------- ### webkit_web_context_set_web_process_extensions_initialization_user_data Source: https://webkitgtk.org/reference/webkitgtk/stable/method.WebContext.set_web_process_extensions_initialization_user_data.html Sets user data to be passed to Web Extensions on initialization. This data will be passed to the `WebKitWebProcessExtensionInitializeWithUserDataFunction`. This method must be called before loading anything in this context, otherwise it will not have any effect. You can connect to `WebKitWebContext::initialize-web-process-extensions` to call this method before anything is loaded. ```APIDOC ## webkit_web_context_set_web_process_extensions_initialization_user_data ### Description Set user data to be passed to Web Extensions on initialization. The data will be passed to the `WebKitWebProcessExtensionInitializeWithUserDataFunction`. This method must be called before loading anything in this context, otherwise it will not have any effect. You can connect to `WebKitWebContext::initialize-web-process-extensions` to call this method before anything is loaded. ### Method void ### Parameters #### Path Parameters - **context** (WebKitWebContext*) - Description: The `WebKitWebContext` to set user data for. - **user_data** (GVariant*) - Required - A `GVariant`. The data is owned by the caller of the method. ``` -------------------------------- ### resource_load_started Source: https://webkitgtk.org/reference/webkitgtk/stable/class.WebView.html This signal is emitted when the loading of a web resource begins. ```APIDOC ## resource_load_started ### Description This signal is emitted when the loading of a web resource begins. ### Signal Signature `void (* resource_load_started) ( WebKitWebView* web_view, WebKitWebResource* resource, WebKitURIRequest* request )` ``` -------------------------------- ### webkit_uri_scheme_request_get_uri Source: https://webkitgtk.org/reference/webkitgtk/stable/class.URISchemeRequest.html Get the URI of request. ```APIDOC ## webkit_uri_scheme_request_get_uri ### Description Get the URI of `request`. ### Method (Not specified, assumed to be called on a WebKitURISchemeRequest instance) ### Parameters (Not specified in source) ### Request Example (Not specified in source) ### Response (Not specified in source) ``` -------------------------------- ### webkit_uri_scheme_request_get_http_headers Source: https://webkitgtk.org/reference/webkitgtk/stable/class.URISchemeRequest.html Get the SoupMessageHeaders of the request. ```APIDOC ## webkit_uri_scheme_request_get_http_headers ### Description Get the `SoupMessageHeaders` of the request. ### Method (Not specified, assumed to be called on a WebKitURISchemeRequest instance) ### Parameters (Not specified in source) ### Request Example (Not specified in source) ### Response (Not specified in source) ``` -------------------------------- ### WebKitWebView ready_to_show Source: https://webkitgtk.org/reference/webkitgtk/stable/vfunc.WebView.ready_to_show.html This virtual method is called when the WebView is ready to be shown. It is intended for internal use and subclasses may override it. ```APIDOC ## WebKitWebView ready_to_show ### Description No description available. ### Declaration ```c void ready_to_show ( WebKitWebView* web_view ) ``` ``` -------------------------------- ### WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_LINK_TO_DISK Source: https://webkitgtk.org/reference/webkitgtk/stable/enum.ContextMenuAction.html Download link destination. ```APIDOC ## WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_LINK_TO_DISK ### Description Download link destination. ### Value `3` ### Nickname `download-link-to-disk` ### Available since 6.0 ``` -------------------------------- ### webkit_uri_scheme_request_get_http_body Source: https://webkitgtk.org/reference/webkitgtk/stable/class.URISchemeRequest.html Get the request body. ```APIDOC ## webkit_uri_scheme_request_get_http_body ### Description Get the request body. ### Method (Not specified, assumed to be called on a WebKitURISchemeRequest instance) ### Parameters (Not specified in source) ### Request Example (Not specified in source) ### Response (Not specified in source) ``` -------------------------------- ### webkit_uri_response_get_uri Source: https://webkitgtk.org/reference/webkitgtk/stable/method.URIResponse.get_uri.html Gets the URI which resulted in the response. ```APIDOC ## WebKitURIResponseget_uri ### Description Gets the URI which resulted in the response. ### Method ```c const gchar* webkit_uri_response_get_uri ( WebKitURIResponse* response ) ``` ### Return value _Type:_ `const gchar*` Response URI, as a string. The data is owned by the instance. The value is a NUL terminated UTF-8 string. ``` -------------------------------- ### WebKitSettings Constructors Source: https://webkitgtk.org/reference/webkitgtk/stable/class.Settings.html Constructors for creating new WebKitSettings instances. ```APIDOC ## webkit_settings_new ### Description Creates a new `WebKitSettings` instance with default values. ### Constructors - `webkit_settings_new()` ``` ```APIDOC ## webkit_settings_new_with_settings ### Description Creates a new `WebKitSettings` instance with the given settings. ### Constructors - `webkit_settings_new_with_settings(settings)` ``` -------------------------------- ### webkit_uri_response_get_mime_type Source: https://webkitgtk.org/reference/webkitgtk/stable/method.URIResponse.get_mime_type.html Gets the MIME type of the response. ```APIDOC ## webkit_uri_response_get_mime_type ### Description Gets the MIME type of the response. ### Method ```c const gchar* webkit_uri_response_get_mime_type ( WebKitURIResponse* response ) ``` ### Return Value _Type:_ `const gchar*` MIME type, as a string. The data is owned by the instance. The value is a NUL terminated UTF-8 string. ``` -------------------------------- ### webkit_settings_set_enable_dns_prefetching Source: https://webkitgtk.org/reference/webkitgtk/stable/class.Settings.html Set the `WebKitSettings:enable-dns-prefetching` property. ```APIDOC ## webkit_settings_set_enable_dns_prefetching ### Description Set the `WebKitSettings:enable-dns-prefetching` property. ### Since 6.0 (deprecated in 2.48) ``` -------------------------------- ### WebKitSettings.get_minimum_font_size Source: https://webkitgtk.org/reference/webkitgtk/stable/method.Settings.get_minimum_font_size.html Gets the WebKitSettings:minimum-font-size property. ```APIDOC ## WebKitSettings.get_minimum_font_size ### Description Gets the `WebKitSettings:minimum-font-size` property. ### Method `webkit_settings_get_minimum_font_size` ### Parameters * `settings` (WebKitSettings*) - The `WebKitSettings` object. ### Return value * `guint32` - Minimum font size, in pixels. ``` -------------------------------- ### Set enable-dns-prefetching Setting Source: https://webkitgtk.org/reference/webkitgtk/stable/property.Settings.enable-dns-prefetching.html Configures whether to enable DNS prefetching. Set to TRUE to prefetch domain names before they are needed, or FALSE to disable it. ```c webkit_settings_set_enable_dns_prefetching() ``` -------------------------------- ### WebKit.Settings:enable-html5-local-storage Source: https://webkitgtk.org/reference/webkitgtk/stable/class.Settings.html Whether to enable HTML5 local storage support. Local storage provides simple synchronous storage access. ```APIDOC ## WebKit.Settings:enable-html5-local-storage ### Description Whether to enable HTML5 local storage support. Local storage provides simple synchronous storage access. ### Details unstable since: 6.0 ``` -------------------------------- ### Example URI Scheme Request Callback Source: https://webkitgtk.org/reference/webkitgtk/stable/method.WebContext.register_uri_scheme.html This callback function handles incoming URI scheme requests. It checks the path of the request and either finishes the request with data or an error. It demonstrates asynchronous handling by referencing the request object. ```c static void about_uri_scheme_request_cb (WebKitURISchemeRequest *request, gpointer user_data) { GInputStream *stream; gsize stream_length; const gchar *path = webkit_uri_scheme_request_get_path (request); if (!g_strcmp0 (path, "memory")) { // Create a GInputStream with the contents of memory about page, and set its length to stream_length } else if (!g_strcmp0 (path, "applications")) { // Create a GInputStream with the contents of applications about page, and set its length to stream_length } else if (!g_strcmp0 (path, "example")) { gchar *contents = g_strdup_printf ("
Example about page
"); stream_length = strlen (contents); stream = g_memory_input_stream_new_from_data (contents, stream_length, g_free); } else { GError *error = g_error_new (ABOUT_HANDLER_ERROR, ABOUT_HANDLER_ERROR_INVALID, "Invalid about:%s page.", path); webkit_uri_scheme_scheme_request_finish_error (request, error); g_error_free (error); return; } webkit_uri_scheme_request_finish (request, stream, stream_length, "text/html"); g_object_unref (stream); } ``` -------------------------------- ### gtk_buildable_get_buildable_id Source: https://webkitgtk.org/reference/webkitgtk/stable/class.WebView.html Gets the ID of the `buildable` object. ```APIDOC ## gtk_buildable_get_buildable_id ### Description Gets the ID of the `buildable` object. ### Method (Not specified, likely part of an asynchronous callback) ### Endpoint (Not applicable for this SDK method) ### Parameters (Not specified in the source) ### Request Example (Not applicable for this SDK method) ### Response (Not specified in the source) ``` -------------------------------- ### WebKitApplicationInfo Instance Methods Source: https://webkitgtk.org/reference/webkitgtk/stable/struct.ApplicationInfo.html Methods for interacting with WebKitApplicationInfo objects, including getting and setting application details, and managing reference counts. ```APIDOC ## webkit_application_info_get_name ### Description Get the name of the application. ### Since 2.18 ``` ```APIDOC ## webkit_application_info_get_version ### Description Get the application version previously set with webkit_application_info_set_version(). ### Since 2.18 ``` ```APIDOC ## webkit_application_info_ref ### Description Atomically increments the reference count of `info` by one. ### Since 2.18 ``` ```APIDOC ## webkit_application_info_set_name ### Description Set the name of the application. ### Since 2.18 ``` ```APIDOC ## webkit_application_info_set_version ### Description Set the application version. ### Since 2.18 ``` ```APIDOC ## webkit_application_info_unref ### Description Atomically decrements the reference count of `info` by one. ### Since 2.18 ``` -------------------------------- ### webkit_web_view_get_website_policies Source: https://webkitgtk.org/reference/webkitgtk/stable/class.WebView.html Gets the default website policies. ```APIDOC ## webkit_web_view_get_website_policies ### Description Gets the default website policies. ### Since 2.30 ``` -------------------------------- ### webkit_web_view_get_web_extension_mode Source: https://webkitgtk.org/reference/webkitgtk/stable/class.WebView.html Get the view’s WebKitWebExtensionMode. ```APIDOC ## webkit_web_view_get_web_extension_mode ### Description Get the view’s `WebKitWebExtensionMode`. ### Since 2.38 ``` -------------------------------- ### Get Enable Mock Capture Devices Source: https://webkitgtk.org/reference/webkitgtk/stable/class.Settings.html Retrieves the current state of the `WebKitSettings:enable-mock-capture-devices` property. ```APIDOC ## webkit_settings_get_enable_mock_capture_devices ### Description Get the `WebKitSettings:enable-mock-capture-devices` property. ### Method GET ### Endpoint /settings/enable-mock-capture-devices ``` -------------------------------- ### webkit_context_menu_last Source: https://webkitgtk.org/reference/webkitgtk/stable/method.ContextMenu.last.html Gets the last item in the menu. ```APIDOC ## webkit_context_menu_last ### Description Gets the last item in the `menu`. ### Method `webkit_context_menu_last` ### Parameters #### Path Parameters - **menu** (WebKitContextMenu*) - Required - The context menu to get the last item from. ### Return value _Type:_ `WebKitContextMenuItem` The last `WebKitContextMenuItem` of `menu`, or `NULL` if the `WebKitContextMenu` is empty. The data is owned by the instance. ```