Class WebKit
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe copy clipboard command.static final StringThe create link command.static final StringThe cut clipboard command.static final StringThe insert image command.static final StringThe paste clipboard command.static final StringThe paste as plaintext clipboard command.static final StringThe redo command.static final StringThe select all command.static final StringThe undo command.static final intLike webkit_get_major_version(), but from the headers used at application compile time, rather than from the library linked against at application run time.static final intLike webkit_get_micro_version(), but from the headers used at application compile time, rather than from the library linked against at application run time.static final intLike webkit_get_minor_version(), but from the headers used at application compile time, rather than from the library linked against at application run time. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intReturns the major version number of the WebKit library.static intReturns the micro version number of the WebKit library.static intReturns the minor version number of the WebKit library.static voidstatic StringGet the key system for which access permission is being requested.static @Nullable StringuriForDisplay(String uri) Use this function to format a URI for display.static booleanCheck whether the permission request is for an audio device.static booleanCheck whether the permission request is for a display device.static booleanCheck whether the permission request is for a video device.
-
Field Details
-
EDITING_COMMAND_COPY
The copy clipboard command. Copies the current selection inside aWebKitWebViewto 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 theWebKitWebView.- See Also:
-
EDITING_COMMAND_CREATE_LINK
The create link command. Creates a link element that is inserted at the current cursor position. If there's a selection, the selected text will be used as the link text, otherwise the URL itself will be used. It receives the link URL as argument. This command should be executed with webkit_web_view_execute_editing_command_with_argument()- Since:
- 2.10
- See Also:
-
EDITING_COMMAND_CUT
The cut clipboard command. Copies the current selection inside aWebKitWebViewto 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 theWebKitWebViewcontent is editable and there is an active selection.- See Also:
-
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
The paste clipboard command. Pastes the contents of the clipboard to aWebKitWebView. 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 theWebKitWebViewcontent is editable and clipboard is not empty.- See Also:
-
EDITING_COMMAND_PASTE_AS_PLAIN_TEXT
The paste as plaintext clipboard command. Pastes the contents of the clipboard to aWebKitWebView, 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 theWebKitWebViewcontent is editable and clipboard is not empty.- Since:
- 2.30
- See Also:
-
EDITING_COMMAND_REDO
The redo command. Redoes a previously undone editing command in aWebKitWebView. 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
The select all command. Selects all the content of the current text field in aWebKitWebView. It is always possible to select all text, no matter whether theWebKitWebViewcontent is editable or not. You can still check it with webkit_web_view_can_execute_editing_command().- See Also:
-
EDITING_COMMAND_UNDO
The undo command. Undoes the last editing command in aWebKitWebView. 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_VERSIONLike 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_VERSIONLike 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_VERSIONLike 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_VERSIONmacro, 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_VERSIONmacro, 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_VERSIONmacro, 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
Get the key system for which access permission is being requested.- Parameters:
request- aWebKitMediaKeySystemPermissionRequest- Returns:
- the key system name for
request - Since:
- 2.32
-
uriForDisplay
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:
urisuitable for display, ornullin case of error.- Since:
- 2.24
-
userMediaPermissionIsForAudioDevice
Check whether the permission request is for an audio device.- Parameters:
request- aWebKitUserMediaPermissionRequest- Returns:
trueif access to an audio device was requested.- Since:
- 2.8
-
userMediaPermissionIsForDisplayDevice
Check whether the permission request is for a display device.- Parameters:
request- aWebKitUserMediaPermissionRequest- Returns:
trueif access to a display device was requested.- Since:
- 2.34
-
userMediaPermissionIsForVideoDevice
Check whether the permission request is for a video device.- Parameters:
request- aWebKitUserMediaPermissionRequest- Returns:
trueif access to a video device was requested.- Since:
- 2.8
-