Class FeatureList

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class FeatureList extends ProxyInstance

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().

Since:
2.42
  • Constructor Details

    • FeatureList

      public FeatureList(MemorySegment address)
      Create a FeatureList proxy instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the FeatureList class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • get

      public Feature get(long index)
      Gets a feature given its index.
      Parameters:
      index - index of the feature
      Returns:
      The feature at index.
      Since:
      2.42
    • getLength

      public long getLength()
      Gets the number of elements in the feature list.
      Returns:

      number of elements.

      Since 2.42

    • ref

      public FeatureList ref()

      Atomically acquires a reference on the given featureList.

      This function is MT-safe and may be called from any thread.

      Returns:
      The same this FeatureList with an additional reference.
      Since:
      2.42
    • unref

      public void unref()

      Atomically releases a reference on the given 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.

      Since:
      2.42