Package org.gnome.webkit
Class NavigationAction
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.webkit.NavigationAction
-
Constructor Summary
ConstructorDescriptionNavigationAction
(MemorySegment address) Create a NavigationAction proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptioncopy()
Make a copy of this NavigationAction.void
free()
Free theWebKitNavigationAction
Gets the this NavigationAction target frame name.int
Return the modifier keys.int
Return the number of the mouse button that triggered the navigation.Return the type of action that triggered the navigation.Return theWebKitURIRequest
associated with the navigation action.static Type
getType()
Get the GType of the NavigationAction classboolean
Returns whether the this NavigationAction was redirected.boolean
Return whether the navigation was triggered by a user gesture like a mouse click.Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
NavigationAction
Create a NavigationAction proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
-
Method Details
-
getType
-
copy
Make a copy of this NavigationAction.- Returns:
- A copy of passed in
WebKitNavigationAction
-
free
public void free()Free theWebKitNavigationAction
-
getFrameName
Gets the this NavigationAction 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 returnnull
.- Returns:
- The name of the new frame this navigation action targets or
null
-
getModifiers
public int getModifiers()Return the modifier keys.Return a bitmask of
GdkModifierType
values describing the modifier keys that were in effect when the navigation was requested- Returns:
- the modifier keys
-
getMouseButton
public int getMouseButton()Return the number of the mouse button that triggered the navigation.Return the number of the mouse button that triggered the navigation, or 0 if the navigation was not started by a mouse event.
- Returns:
- the mouse button number or 0
-
getRequest
Return theWebKitURIRequest
associated with the navigation action.Modifications to the returned object are <emphasis>not</emphasis> taken into account when the request is sent over the network, and is intended only to aid in evaluating whether a navigation action should be taken or not. To modify requests before they are sent over the network the
WebKitPage
::send-request signal can be used instead.- Returns:
- a
WebKitURIRequest
-
isRedirect
public boolean isRedirect()Returns whether the this NavigationAction was redirected.- Returns:
true
if the original navigation was redirected,false
otherwise.
-
isUserGesture
public boolean isUserGesture()Return whether the navigation was triggered by a user gesture like a mouse click.- Returns:
- whether navigation action is a user gesture
-