Class WebKit

java.lang.Object
org.webkitgtk.WebKit

@Generated("org.javagi.JavaGI") public final class WebKit extends Object
Constants and functions that are declared in the global WebKit namespace.
  • Field Details

    • EDITING_COMMAND_COPY

      public static final String EDITING_COMMAND_COPY
      The copy clipboard command. Copies the current selection inside a WebKitWebView to the clipboard. You can check whether it's possible to execute the command with webkit_web_view_can_execute_editing_command(). In general it's possible to copy to the clipboard when there is an active selection inside the WebKitWebView.
      See Also:
    • EDITING_COMMAND_CUT

      public static final String EDITING_COMMAND_CUT
      The cut clipboard command. Copies the current selection inside a WebKitWebView to the clipboard and deletes the selected content. You can check whether it's possible to execute the command with webkit_web_view_can_execute_editing_command(). In general it's possible to cut to the clipboard when the WebKitWebView content is editable and there is an active selection.
      See Also:
    • EDITING_COMMAND_INSERT_IMAGE

      public static final String EDITING_COMMAND_INSERT_IMAGE
      The insert image command. Creates an image element that is inserted at the current cursor position. It receives an URI as argument, that is used as the image source. This command should be executed with webkit_web_view_execute_editing_command_with_argument().
      Since:
      2.10
      See Also:
    • EDITING_COMMAND_PASTE

      public static final String EDITING_COMMAND_PASTE
      The paste clipboard command. Pastes the contents of the clipboard to a WebKitWebView. You can check whether it's possible to execute the command with webkit_web_view_can_execute_editing_command(). In general it's possible to paste from the clipboard when the WebKitWebView content is editable and clipboard is not empty.
      See Also:
    • EDITING_COMMAND_PASTE_AS_PLAIN_TEXT

      public static final String EDITING_COMMAND_PASTE_AS_PLAIN_TEXT
      The paste as plaintext clipboard command. Pastes the contents of the clipboard to a WebKitWebView, with formatting removed. You can check whether it's possible to execute the command with webkit_web_view_can_execute_editing_command(). In general it's possible to paste from the clipboard when the WebKitWebView content is editable and clipboard is not empty.
      Since:
      2.30
      See Also:
    • EDITING_COMMAND_REDO

      public static final String EDITING_COMMAND_REDO
      The redo command. Redoes a previously undone editing command in a WebKitWebView. You can check whether it's possible to execute the command with webkit_web_view_can_execute_editing_command(). It's only possible to redo a command when it has been previously undone.
      See Also:
    • EDITING_COMMAND_SELECT_ALL

      public static final String EDITING_COMMAND_SELECT_ALL
      The select all command. Selects all the content of the current text field in a WebKitWebView. It is always possible to select all text, no matter whether the WebKitWebView content is editable or not. You can still check it with webkit_web_view_can_execute_editing_command().
      See Also:
    • EDITING_COMMAND_UNDO

      public static final String EDITING_COMMAND_UNDO
      The undo command. Undoes the last editing command in a WebKitWebView. You can check whether it's possible to execute the command with webkit_web_view_can_execute_editing_command(). It's only possible to undo a command after a previously executed editing operation.
      See Also:
    • MAJOR_VERSION

      public static final int MAJOR_VERSION
      Like webkit_get_major_version(), but from the headers used at application compile time, rather than from the library linked against at application run time.
      See Also:
    • MICRO_VERSION

      public static final int MICRO_VERSION
      Like webkit_get_micro_version(), but from the headers used at application compile time, rather than from the library linked against at application run time.
      See Also:
    • MINOR_VERSION

      public static final int MINOR_VERSION
      Like webkit_get_minor_version(), but from the headers used at application compile time, rather than from the library linked against at application run time.
      See Also:
  • Constructor Details

    • WebKit

      public WebKit()
  • Method Details

    • javagi$ensureInitialized

      public static void javagi$ensureInitialized()
    • getMajorVersion

      public static int getMajorVersion()

      Returns the major version number of the WebKit library.

      (e.g. in WebKit version 1.8.3 this is 1.)

      This function is in the library, so it represents the WebKit library your code is running against. Contrast with the WEBKIT_MAJOR_VERSION macro, which represents the major version of the WebKit headers you have included when compiling your code.

      Returns:
      the major version number of the WebKit library
    • getMicroVersion

      public static int getMicroVersion()

      Returns the micro version number of the WebKit library.

      (e.g. in WebKit version 1.8.3 this is 3.)

      This function is in the library, so it represents the WebKit library your code is running against. Contrast with the WEBKIT_MICRO_VERSION macro, which represents the micro version of the WebKit headers you have included when compiling your code.

      Returns:
      the micro version number of the WebKit library
    • getMinorVersion

      public static int getMinorVersion()

      Returns the minor version number of the WebKit library.

      (e.g. in WebKit version 1.8.3 this is 8.)

      This function is in the library, so it represents the WebKit library your code is running against. Contrast with the WEBKIT_MINOR_VERSION macro, which represents the minor version of the WebKit headers you have included when compiling your code.

      Returns:
      the minor version number of the WebKit library
    • mediaKeySystemPermissionGetName

      public static String mediaKeySystemPermissionGetName(MediaKeySystemPermissionRequest request)
      Get the key system for which access permission is being requested.
      Parameters:
      request - a WebKitMediaKeySystemPermissionRequest
      Returns:
      the key system name for request
      Since:
      2.32
    • uriForDisplay

      public static @Nullable String uriForDisplay(String uri)

      Use this function to format a URI for display.

      The URIs used internally by WebKit may contain percent-encoded characters or Punycode, which are not generally suitable to display to users. This function provides protection against IDN homograph attacks, so in some cases the host part of the returned URI may be in Punycode if the safety check fails.

      Parameters:
      uri - the URI to be converted
      Returns:
      uri suitable for display, or null in case of error.
      Since:
      2.24
    • userMediaPermissionIsForAudioDevice

      public static boolean userMediaPermissionIsForAudioDevice(UserMediaPermissionRequest request)
      Check whether the permission request is for an audio device.
      Parameters:
      request - a WebKitUserMediaPermissionRequest
      Returns:
      true if access to an audio device was requested.
      Since:
      2.8
    • userMediaPermissionIsForDisplayDevice

      public static boolean userMediaPermissionIsForDisplayDevice(UserMediaPermissionRequest request)
      Check whether the permission request is for a display device.
      Parameters:
      request - a WebKitUserMediaPermissionRequest
      Returns:
      true if access to a display device was requested.
      Since:
      2.34
    • userMediaPermissionIsForVideoDevice

      public static boolean userMediaPermissionIsForVideoDevice(UserMediaPermissionRequest request)
      Check whether the permission request is for a video device.
      Parameters:
      request - a WebKitUserMediaPermissionRequest
      Returns:
      true if access to a video device was requested.
      Since:
      2.8