Package org.gnome.webkit
Class FeatureList
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.webkit.FeatureList
- All Implemented Interfaces:
Proxy
Contains a set of toggle-able web engine features.
The list supports passing around a set of Feature
objects and
iterating over them:
g_autoptr(WebKitFeatureList) list = webkit_settings_get_experimental_features();
for (gsize i = 0; i < webkit_feature_list_get_length(list): i++) {
WebKitFeature *feature = webkit_feature_list_get(list, i);
// Do something with "feature".
}
Lists of features can be obtained with
Settings.getExperimentalFeatures()
,
Settings.getDevelopmentFeatures()
, and
Settings.getAllFeatures()
.
-
Constructor Summary
ConstructorDescriptionFeatureList
(MemorySegment address) Create a FeatureList proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionget
(long index) Gets a feature given its index.long
Gets the number of elements in the feature list.static Type
getType()
Get the GType of the FeatureList classref()
Atomically acquires a reference on the given this FeatureList.void
unref()
Atomically releases a reference on the given this FeatureList.Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
FeatureList
Create a FeatureList proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
-
Method Details
-
getType
-
get
Gets a feature given its index.- Parameters:
index
- index of the feature- Returns:
- The feature at
index
.
-
getLength
public long getLength()Gets the number of elements in the feature list.- Returns:
- number of elements.
Since 2.42
-
ref
Atomically acquires a reference on the given this FeatureList.This function is MT-safe and may be called from any thread.
- Returns:
- The same this FeatureList with an additional reference.
-
unref
public void unref()Atomically releases a reference on the given this FeatureList.If the reference was the last, the resources associated to the this FeatureList are freed. This function is MT-safe and may be called from any thread.
-