Package org.gnome.webkit
Class BackForwardList
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.gobject.TypeInstance
org.gnome.gobject.GObject
org.gnome.webkit.BackForwardList
- All Implemented Interfaces:
Proxy
List of visited pages.
WebKitBackForwardList maintains a list of visited pages used to navigate to recent pages. Items are inserted in the list in the order they are visited.
WebKitBackForwardList also maintains the notion of the current item
(which is always at index 0), the preceding item (which is at index -1),
and the following item (which is at index 1).
Methods webkit_web_view_go_back() and webkit_web_view_go_forward() move
the current item backward or forward by one. Method
webkit_web_view_go_to_back_forward_list_item() sets the current item to the
specified item. All other methods returning WebKitBackForwardListItem
<!-- -->s
do not change the value of the current item, they just return the requested
item or items.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
BackForwardList.Builder<B extends BackForwardList.Builder<B>>
Inner class implementing a builder pattern to construct a GObject with properties.static interface
Functional interface declaration of theChangedCallback
callback.Nested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClass
-
Constructor Summary
ConstructorDescriptionBackForwardList
(MemorySegment address) Create a BackForwardList proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected BackForwardList
asParent()
Returns this instance as if it were its parent type.static BackForwardList.Builder
<? extends BackForwardList.Builder> builder()
ABackForwardList.Builder
object constructs aBackForwardList
with the specified properties.void
emitChanged
(@Nullable BackForwardListItem itemAdded, @Nullable MemorySegment itemsRemoved) Emits the "changed" signal.Returns the item that precedes the current item.Obtain the list of items preceding the current one.getBackListWithLimit
(int limit) Obtain a list up to some number of items preceding the current one.Returns the current item in this BackForwardList.Returns the item that follows the current item.Obtain the list of items following the current one.getForwardListWithLimit
(int limit) Obtain a list up to some number of items following the current one.int
Obtain the amount of items in the list.getNthItem
(int index) Returns the item at a given index relative to the current item.static Type
getType()
Get the GType of the BackForwardList classonChanged
(BackForwardList.ChangedCallback handler) This signal is emitted whenbackForwardList
changes.Methods inherited from class org.gnome.gobject.GObject
addToggleRef, addWeakPointer, bindProperty, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, connect, constructed, disconnect, dispatchPropertiesChanged, dispose, dupData, dupQdata, emit, emitNotify, finalize_, forceFloating, freezeNotify, get, getData, getMemoryLayout, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newInstance, newInstance, newv, notify_, notify_, notifyByPspec, onNotify, ref, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref, withProperties
Methods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, getPrivate, readGClass, writeGClass
Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
BackForwardList
Create a BackForwardList proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
-
Method Details
-
getType
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuper
keyword, but will set the native typeclass function pointers to the parent type. When overriding a native virtual method in Java, "chaining up" withsuper.methodName()
doesn't work, because it invokes the overridden function pointer again. To chain up, callasParent().methodName()
. This will call the native function pointer of this virtual method in the typeclass of the parent type. -
getBackItem
Returns the item that precedes the current item.- Returns:
- the
WebKitBackForwardListItem
preceding the current item ornull
.
-
getBackList
Obtain the list of items preceding the current one.- Returns:
- a
GList
of items preceding the current item.
-
getBackListWithLimit
Obtain a list up to some number of items preceding the current one.- Parameters:
limit
- the number of items to retrieve- Returns:
- a
GList
of items preceding the current item limited bylimit
.
-
getCurrentItem
Returns the current item in this BackForwardList.- Returns:
- a
WebKitBackForwardListItem
ornull
if this BackForwardList is empty.
-
getForwardItem
Returns the item that follows the current item.- Returns:
- the
WebKitBackForwardListItem
following the current item ornull
.
-
getForwardList
Obtain the list of items following the current one.- Returns:
- a
GList
of items following the current item.
-
getForwardListWithLimit
Obtain a list up to some number of items following the current one.- Parameters:
limit
- the number of items to retrieve- Returns:
- a
GList
of items following the current item limited bylimit
.
-
getLength
public int getLength()Obtain the amount of items in the list.- Returns:
- the length of this BackForwardList.
-
getNthItem
Returns the item at a given index relative to the current item.- Parameters:
index
- the index of the item- Returns:
- the
WebKitBackForwardListItem
located at the specified index relative to the current item ornull
.
-
onChanged
public SignalConnection<BackForwardList.ChangedCallback> onChanged(BackForwardList.ChangedCallback handler) This signal is emitted whenbackForwardList
changes. This happens when the current item is updated, a new item is added or one or more items are removed. Note that bothitemAdded
anditemsRemoved
cannull
when only the current item is updated. Items are only removed when the list is cleared or the maximum items limit is reached.- Parameters:
handler
- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- See Also:
-
emitChanged
public void emitChanged(@Nullable @Nullable BackForwardListItem itemAdded, @Nullable @Nullable MemorySegment itemsRemoved) Emits the "changed" signal. SeeonChanged(org.gnome.webkit.BackForwardList.ChangedCallback)
. -
builder
ABackForwardList.Builder
object constructs aBackForwardList
with the specified properties. Use the variousset...()
methods to set properties, and finish construction withBackForwardList.Builder.build()
.
-