Package org.webkitgtk
Class BackForwardList
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gobject.TypeInstance
org.gnome.gobject.GObject
org.webkitgtk.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
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classBackForwardList.Builder<B extends BackForwardList.Builder<B>>Inner class implementing a builder pattern to construct a GObject with properties.static interfaceFunctional interface declaration of theChangedCallbackcallback.Nested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClass -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new BackForwardList.BackForwardList(MemorySegment address) Create a BackForwardList proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected BackForwardListasParent()Returns this instance as if it were its parent type.static BackForwardList.Builder<? extends BackForwardList.Builder> builder()ABackForwardList.Builderobject constructs aBackForwardListwith the specified properties.voidemitChanged(@Nullable BackForwardListItem itemAdded, @Nullable MemorySegment itemsRemoved) Emits the "changed" signal.@Nullable BackForwardListItemReturns 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.@Nullable BackForwardListItemReturns the current item inbackForwardList.@Nullable BackForwardListItemReturns 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.intObtain the amount of items in the list.@Nullable BackForwardListItemgetNthItem(int index) Returns the item at a given index relative to the current item.static @Nullable TypegetType()Get the GType of the BackForwardList classonChanged(BackForwardList.ChangedCallback handler) This signal is emitted whenbackForwardListchanges.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, 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, withPropertiesMethods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class org.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
-
BackForwardList
public BackForwardList()Creates a new BackForwardList.
-
-
Method Details
-
getType
Get the GType of the BackForwardList class- Returns:
- the GType
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuperkeyword, 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
WebKitBackForwardListItempreceding the current item ornull.
-
getBackList
Obtain the list of items preceding the current one.- Returns:
- a
GListof 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
GListof items preceding the current item limited bylimit.
-
getCurrentItem
Returns the current item inbackForwardList.- Returns:
- a
WebKitBackForwardListItemornullif this BackForwardList is empty.
-
getForwardItem
Returns the item that follows the current item.- Returns:
- the
WebKitBackForwardListItemfollowing the current item ornull.
-
getForwardList
Obtain the list of items following the current one.- Returns:
- a
GListof 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
GListof items following the current item limited bylimit.
-
getLength
public int getLength()Obtain the amount of items in the list.- Returns:
- the length of
backForwardList.
-
getNthItem
Returns the item at a given index relative to the current item.- Parameters:
index- the index of the item- Returns:
- the
WebKitBackForwardListItemlocated at the specified index relative to the current item ornull.
-
onChanged
public SignalConnection<BackForwardList.ChangedCallback> onChanged(BackForwardList.ChangedCallback handler) This signal is emitted whenbackForwardListchanges. This happens when the current item is updated, a new item is added or one or more items are removed. Note that bothitemAddedanditemsRemovedcannullwhen 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 BackForwardListItem itemAdded, @Nullable MemorySegment itemsRemoved) Emits the "changed" signal. SeeonChanged(org.webkitgtk.BackForwardList.ChangedCallback). -
builder
ABackForwardList.Builderobject constructs aBackForwardListwith the specified properties. Use the variousset...()methods to set properties, and finish construction withBackForwardList.Builder.build().- Returns:
- the builder object
-