Class WebKit
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The copy clipboard command.static final String
The create link command.static final String
The cut clipboard command.static final String
The insert image command.static final String
The paste clipboard command.static final String
The paste as plaintext clipboard command.static final String
The redo command.static final String
The select all command.static final String
The undo command.static final int
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.static final int
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.static final int
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. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
Returns the major version number of the WebKit library.static int
Returns the micro version number of the WebKit library.static int
Returns the minor version number of the WebKit library.static void
static String
Get the key system for which access permission is being requested.static String
uriForDisplay
(String uri) Use this function to format a URI for display.static boolean
Check whether the permission request is for an audio device.static boolean
Check whether the permission request is for a display device.static boolean
Check whether the permission request is for a video device.
-
Field Details
-
EDITING_COMMAND_COPY
The copy clipboard command. Copies the current selection inside aWebKitWebView
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 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()- See Also:
-
EDITING_COMMAND_CUT
The cut clipboard command. Copies the current selection inside aWebKitWebView
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 theWebKitWebView
content 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().- 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 theWebKitWebView
content 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 theWebKitWebView
content is editable and clipboard is not empty.- 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 theWebKitWebView
content 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
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
- Throws:
UnsupportedPlatformException
- when run on a platform other than linux
-
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
- Throws:
UnsupportedPlatformException
- when run on a platform other than linux
-
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
- Throws:
UnsupportedPlatformException
- when run on a platform other than linux
-
mediaKeySystemPermissionGetName
public static String mediaKeySystemPermissionGetName(MediaKeySystemPermissionRequest request) throws UnsupportedPlatformException Get the key system for which access permission is being requested.- Parameters:
request
- aWebKitMediaKeySystemPermissionRequest
- Returns:
- the key system name for
request
- Throws:
UnsupportedPlatformException
- when run on a platform other than linux
-
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:
uri
suitable for display, ornull
in case of error.- Throws:
UnsupportedPlatformException
- when run on a platform other than linux
-
userMediaPermissionIsForAudioDevice
public static boolean userMediaPermissionIsForAudioDevice(UserMediaPermissionRequest request) throws UnsupportedPlatformException Check whether the permission request is for an audio device.- Parameters:
request
- aWebKitUserMediaPermissionRequest
- Returns:
true
if access to an audio device was requested.- Throws:
UnsupportedPlatformException
- when run on a platform other than linux
-
userMediaPermissionIsForDisplayDevice
public static boolean userMediaPermissionIsForDisplayDevice(UserMediaPermissionRequest request) throws UnsupportedPlatformException Check whether the permission request is for a display device.- Parameters:
request
- aWebKitUserMediaPermissionRequest
- Returns:
true
if access to a display device was requested.- Throws:
UnsupportedPlatformException
- when run on a platform other than linux
-
userMediaPermissionIsForVideoDevice
public static boolean userMediaPermissionIsForVideoDevice(UserMediaPermissionRequest request) throws UnsupportedPlatformException Check whether the permission request is for a video device.- Parameters:
request
- aWebKitUserMediaPermissionRequest
- Returns:
true
if access to a video device was requested.- Throws:
UnsupportedPlatformException
- when run on a platform other than linux
-