org.gnome.gtk.TreeSelection Maven / Gradle / Ivy
Show all versions of gtk Show documentation
// This file was automatically generated by Java-GI. Do not edit this file
// directly! Visit for more information.
//
// The API documentation in this file was derived from GObject-Introspection
// metadata and may include text or comments from the original C sources.
//
// Copyright (c), upstream authors as identified in the GObject-Introspection
// metadata.
//
// This generated file is distributed under the same license as the original
// GObject-Introspection data, unless otherwise specified. Users of this file
// are responsible for complying with any licenses or terms required by the
// original authors.
//
// THIS FILE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.
//
package org.gnome.gtk;
import io.github.jwharm.javagi.base.FunctionPointer;
import io.github.jwharm.javagi.base.GLibLogger;
import io.github.jwharm.javagi.base.Out;
import io.github.jwharm.javagi.gobject.InstanceCache;
import io.github.jwharm.javagi.gobject.SignalConnection;
import io.github.jwharm.javagi.gobject.types.Signals;
import io.github.jwharm.javagi.interop.Arenas;
import io.github.jwharm.javagi.interop.Interop;
import java.lang.Deprecated;
import java.lang.FunctionalInterface;
import java.lang.foreign.Arena;
import java.lang.foreign.FunctionDescriptor;
import java.lang.foreign.Linker;
import java.lang.foreign.MemorySegment;
import java.lang.foreign.ValueLayout;
import java.lang.invoke.MethodHandle;
import javax.annotation.processing.Generated;
import org.gnome.glib.List;
import org.gnome.glib.Type;
import org.gnome.gobject.GObject;
import org.gnome.gobject.GObjects;
import org.gnome.gobject.Value;
import org.jetbrains.annotations.Nullable;
/**
* The selection object for GtkTreeView
*
* The {@code GtkTreeSelection} object is a helper object to manage the selection
* for a {@code GtkTreeView} widget. The {@code GtkTreeSelection} object is
* automatically created when a new {@code GtkTreeView} widget is created, and
* cannot exist independently of this widget. The primary reason the
* {@code GtkTreeSelection} objects exists is for cleanliness of code and API.
* That is, there is no conceptual reason all these functions could not be
* methods on the {@code GtkTreeView} widget instead of a separate function.
*
* The {@code GtkTreeSelection} object is gotten from a {@code GtkTreeView} by calling
* gtk_tree_view_get_selection(). It can be manipulated to check the
* selection status of the tree, as well as select and deselect individual
* rows. Selection is done completely view side. As a result, multiple
* views of the same model can have completely different selections.
* Additionally, you cannot change the selection of a row on the model that
* is not currently displayed by the view without expanding its parents
* first.
*
* One of the important things to remember when monitoring the selection of
* a view is that the {@code GtkTreeSelection}::changed signal is mostly a hint.
* That is, it may only emit one signal when a range of rows is selected.
* Additionally, it may on occasion emit a {@code GtkTreeSelection}::changed signal
* when nothing has happened (mostly as a result of programmers calling
* select_row on an already selected row).
*/
@Generated("io.github.jwharm.JavaGI")
@Deprecated
public class TreeSelection extends GObject {
static {
Gtk.javagi$ensureInitialized();
}
/**
* Create a TreeSelection proxy instance for the provided memory address.
*
* @param address the memory address of the native object
*/
public TreeSelection(MemorySegment address) {
super(Interop.reinterpret(address, getMemoryLayout().byteSize()));
}
/**
* Get the GType of the TreeSelection class
*
* @return the GType
*/
public static Type getType() {
return Interop.getType("gtk_tree_selection_get_type");
}
/**
* Returns this instance as if it were its parent type. This is mostly
* synonymous to the Java {@code super} keyword, but will set the native
* typeclass function pointers to the parent type. When overriding a native
* virtual method in Java, "chaining up" with {@code super.methodName()}
* doesn't work, because it invokes the overridden function pointer again.
* To chain up, call {@code asParent().methodName()}. This will call the
* native function pointer of this virtual method in the typeclass of the
* parent type.
*/
protected TreeSelection asParent() {
TreeSelection _parent = new TreeSelection(handle());
_parent.callParent(true);
return _parent;
}
/**
* Returns the number of rows that have been selected in {@code tree}.
*
* @return The number of rows selected.
* @deprecated Use GtkListView or GtkColumnView
*/
@Deprecated
public int countSelectedRows() {
int _result;
try {
_result = (int) MethodHandles.gtk_tree_selection_count_selected_rows.invokeExact(
handle());
} catch (Throwable _err) {
throw new AssertionError(_err);
}
return _result;
}
/**
* Gets the selection mode for this TreeSelection. See
* gtk_tree_selection_set_mode().
*
* @return the current selection mode
* @deprecated Use GtkListView or GtkColumnView
*/
@Deprecated
public SelectionMode getMode() {
int _result;
try {
_result = (int) MethodHandles.gtk_tree_selection_get_mode.invokeExact(handle());
} catch (Throwable _err) {
throw new AssertionError(_err);
}
return SelectionMode.of(_result);
}
/**
* Returns the current selection function.
*
* @return The function.
* @deprecated Use GtkListView or GtkColumnView
*/
@Deprecated
public TreeSelectionFunc getSelectFunction() {
MemorySegment _result;
try {
_result = (MemorySegment) MethodHandles.gtk_tree_selection_get_select_function.invokeExact(
handle());
} catch (Throwable _err) {
throw new AssertionError(_err);
}
return null /* Unsupported parameter type */;
}
/**
* Sets {@code iter} to the currently selected node if this TreeSelection is set to
* {@link org.gnome.gtk.SelectionMode#SINGLE} or {@link org.gnome.gtk.SelectionMode#BROWSE}. {@code iter} may be NULL if you
* just want to test if this TreeSelection has any selected nodes. {@code model} is filled
* with the current model as a convenience. This function will not work if you
* use this TreeSelection is {@link org.gnome.gtk.SelectionMode#MULTIPLE}.
*
* @param model A pointer to set to the {@code GtkTreeModel}
* @param iter The {@code GtkTreeIter}
* @return TRUE, if there is a selected node.
* @deprecated Use GtkListView or GtkColumnView
*/
@Deprecated
public boolean getSelected(@Nullable Out model, @Nullable TreeIter iter) {
try (var _arena = Arena.ofConfined()) {
MemorySegment _modelPointer = _arena.allocate(ValueLayout.ADDRESS);
int _result;
try {
_result = (int) MethodHandles.gtk_tree_selection_get_selected.invokeExact(handle(),
(MemorySegment) (model == null ? MemorySegment.NULL : _modelPointer),
(MemorySegment) (iter == null ? MemorySegment.NULL : iter.handle()));
} catch (Throwable _err) {
throw new AssertionError(_err);
}
if (model != null) {
model.set((TreeModel) InstanceCache.getForType(_modelPointer.get(ValueLayout.ADDRESS, 0), TreeModel.TreeModelImpl::new, true));
}
return _result != 0;
}
}
/**
* Creates a list of path of all selected rows. Additionally, if you are
* planning on modifying the model after calling this function, you may
* want to convert the returned list into a list of {@code GtkTreeRowReference}s.
* To do this, you can use gtk_tree_row_reference_new().
*
* To free the return value, use:
*
{@code g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free);
* }
*
* @param model A pointer to set to the {@code GtkTreeModel}
* @return A {@code GList} containing a {@code GtkTreePath} for each selected row.
* @deprecated Use GtkListView or GtkColumnView
*/
@Deprecated
public List getSelectedRows(@Nullable Out model) {
try (var _arena = Arena.ofConfined()) {
MemorySegment _modelPointer = _arena.allocate(ValueLayout.ADDRESS);
MemorySegment _result;
try {
_result = (MemorySegment) MethodHandles.gtk_tree_selection_get_selected_rows.invokeExact(
handle(),
(MemorySegment) (model == null ? MemorySegment.NULL : _modelPointer));
} catch (Throwable _err) {
throw new AssertionError(_err);
}
if (model != null) {
model.set((TreeModel) InstanceCache.getForType(_modelPointer.get(ValueLayout.ADDRESS, 0), TreeModel.TreeModelImpl::new, true));
}
return new List(_result, TreePath::new, (_b -> GObjects.boxedFree(TreePath.getType(), _b == null ? MemorySegment.NULL : _b.handle())), true);
}
}
/**
* Returns the tree view associated with this TreeSelection.
*
* @return A {@code GtkTreeView}
* @deprecated Use GtkListView or GtkColumnView
*/
@Deprecated
public TreeView getTreeView() {
MemorySegment _result;
try {
_result = (MemorySegment) MethodHandles.gtk_tree_selection_get_tree_view.invokeExact(
handle());
} catch (Throwable _err) {
throw new AssertionError(_err);
}
var _object = (TreeView) InstanceCache.getForType(_result, TreeView::new, true);
if (_object instanceof GObject _gobject) {
GLibLogger.debug("Ref org.gnome.gtk.TreeView %ld", _gobject.handle().address());
_gobject.ref();
}
return _object;
}
/**
* Returns the user data for the selection function.
*
* @return The user data.
* @deprecated Use GtkListView or GtkColumnView
*/
@Deprecated
public MemorySegment getUserData() {
MemorySegment _result;
try {
_result = (MemorySegment) MethodHandles.gtk_tree_selection_get_user_data.invokeExact(
handle());
} catch (Throwable _err) {
throw new AssertionError(_err);
}
return _result;
}
/**
* Returns {@code true} if the row at {@code iter} is currently selected.
*
* @param iter A valid {@code GtkTreeIter}
* @return {@code true}, if {@code iter} is selected
* @deprecated Use GtkListView or GtkColumnView
*/
@Deprecated
public boolean iterIsSelected(TreeIter iter) {
int _result;
try {
_result = (int) MethodHandles.gtk_tree_selection_iter_is_selected.invokeExact(handle(),
(MemorySegment) (iter == null ? MemorySegment.NULL : iter.handle()));
} catch (Throwable _err) {
throw new AssertionError(_err);
}
return _result != 0;
}
/**
* Returns {@code true} if the row pointed to by {@code path} is currently selected. If {@code path}
* does not point to a valid location, {@code false} is returned
*
* @param path A {@code GtkTreePath} to check selection on.
* @return {@code true} if {@code path} is selected.
* @deprecated Use GtkListView or GtkColumnView
*/
@Deprecated
public boolean pathIsSelected(TreePath path) {
int _result;
try {
_result = (int) MethodHandles.gtk_tree_selection_path_is_selected.invokeExact(handle(),
(MemorySegment) (path == null ? MemorySegment.NULL : path.handle()));
} catch (Throwable _err) {
throw new AssertionError(_err);
}
return _result != 0;
}
/**
* Selects all the nodes. this TreeSelection must be set to {@link org.gnome.gtk.SelectionMode#MULTIPLE}
* mode.
*
* @deprecated Use GtkListView or GtkColumnView
*/
@Deprecated
public void selectAll() {
try {
MethodHandles.gtk_tree_selection_select_all.invokeExact(handle());
} catch (Throwable _err) {
throw new AssertionError(_err);
}
}
/**
* Selects the specified iterator.
*
* @param iter The {@code GtkTreeIter} to be selected.
* @deprecated Use GtkListView or GtkColumnView
*/
@Deprecated
public void selectIter(TreeIter iter) {
try {
MethodHandles.gtk_tree_selection_select_iter.invokeExact(handle(),
(MemorySegment) (iter == null ? MemorySegment.NULL : iter.handle()));
} catch (Throwable _err) {
throw new AssertionError(_err);
}
}
/**
* Select the row at {@code path}.
*
* @param path The {@code GtkTreePath} to be selected.
* @deprecated Use GtkListView or GtkColumnView
*/
@Deprecated
public void selectPath(TreePath path) {
try {
MethodHandles.gtk_tree_selection_select_path.invokeExact(handle(),
(MemorySegment) (path == null ? MemorySegment.NULL : path.handle()));
} catch (Throwable _err) {
throw new AssertionError(_err);
}
}
/**
* Selects a range of nodes, determined by {@code startPath} and {@code endPath} inclusive.
* this TreeSelection must be set to {@link org.gnome.gtk.SelectionMode#MULTIPLE} mode.
*
* @param startPath The initial node of the range.
* @param endPath The final node of the range.
* @deprecated Use GtkListView or GtkColumnView
*/
@Deprecated
public void selectRange(TreePath startPath, TreePath endPath) {
try {
MethodHandles.gtk_tree_selection_select_range.invokeExact(handle(),
(MemorySegment) (startPath == null ? MemorySegment.NULL : startPath.handle()),
(MemorySegment) (endPath == null ? MemorySegment.NULL : endPath.handle()));
} catch (Throwable _err) {
throw new AssertionError(_err);
}
}
/**
* Calls a function for each selected node. Note that you cannot modify
* the tree or selection from within this function. As a result,
* gtk_tree_selection_get_selected_rows() might be more useful.
*
* @param func The function to call for each selected node.
* @deprecated Use GtkListView or GtkColumnView
*/
@Deprecated
public void selectedForeach(TreeSelectionForeachFunc func) {
try (var _arena = Arena.ofConfined()) {
try {
MethodHandles.gtk_tree_selection_selected_foreach.invokeExact(handle(),
(MemorySegment) (func == null ? MemorySegment.NULL : func.toCallback(_arena)),
MemorySegment.NULL);
} catch (Throwable _err) {
throw new AssertionError(_err);
}
}
}
/**
* Sets the selection mode of the this TreeSelection. If the previous type was
* {@link org.gnome.gtk.SelectionMode#MULTIPLE}, then the anchor is kept selected, if it was
* previously selected.
*
* @param type The selection mode
* @deprecated Use GtkListView or GtkColumnView
*/
@Deprecated
public void setMode(SelectionMode type) {
try {
MethodHandles.gtk_tree_selection_set_mode.invokeExact(handle(), type.getValue());
} catch (Throwable _err) {
throw new AssertionError(_err);
}
}
/**
* Sets the selection function.
*
* If set, this function is called before any node is selected or unselected,
* giving some control over which nodes are selected. The select function
* should return {@code true} if the state of the node may be toggled, and {@code false}
* if the state of the node should be left unchanged.
*
* @param func The selection function. May be {@code null}
* @deprecated Use GtkListView or GtkColumnView
*/
@Deprecated
public void setSelectFunction(@Nullable TreeSelectionFunc func) {
try (var _arena = Arena.ofConfined()) {
final Arena _funcScope = Arena.ofConfined();
try {
MethodHandles.gtk_tree_selection_set_select_function.invokeExact(handle(),
(MemorySegment) (func == null ? MemorySegment.NULL : func.toCallback(_funcScope)),
Arenas.cacheArena(_funcScope), Arenas.CLOSE_CB_SYM);
} catch (Throwable _err) {
throw new AssertionError(_err);
}
}
}
/**
* Unselects all the nodes.
*
* @deprecated Use GtkListView or GtkColumnView
*/
@Deprecated
public void unselectAll() {
try {
MethodHandles.gtk_tree_selection_unselect_all.invokeExact(handle());
} catch (Throwable _err) {
throw new AssertionError(_err);
}
}
/**
* Unselects the specified iterator.
*
* @param iter The {@code GtkTreeIter} to be unselected.
* @deprecated Use GtkListView or GtkColumnView
*/
@Deprecated
public void unselectIter(TreeIter iter) {
try {
MethodHandles.gtk_tree_selection_unselect_iter.invokeExact(handle(),
(MemorySegment) (iter == null ? MemorySegment.NULL : iter.handle()));
} catch (Throwable _err) {
throw new AssertionError(_err);
}
}
/**
* Unselects the row at {@code path}.
*
* @param path The {@code GtkTreePath} to be unselected.
* @deprecated Use GtkListView or GtkColumnView
*/
@Deprecated
public void unselectPath(TreePath path) {
try {
MethodHandles.gtk_tree_selection_unselect_path.invokeExact(handle(),
(MemorySegment) (path == null ? MemorySegment.NULL : path.handle()));
} catch (Throwable _err) {
throw new AssertionError(_err);
}
}
/**
* Unselects a range of nodes, determined by {@code startPath} and {@code endPath}
* inclusive.
*
* @param startPath The initial node of the range.
* @param endPath The initial node of the range.
* @deprecated Use GtkListView or GtkColumnView
*/
@Deprecated
public void unselectRange(TreePath startPath, TreePath endPath) {
try {
MethodHandles.gtk_tree_selection_unselect_range.invokeExact(handle(),
(MemorySegment) (startPath == null ? MemorySegment.NULL : startPath.handle()),
(MemorySegment) (endPath == null ? MemorySegment.NULL : endPath.handle()));
} catch (Throwable _err) {
throw new AssertionError(_err);
}
}
/**
* Emitted whenever the selection has (possibly) changed. Please note that
* this signal is mostly a hint. It may only be emitted once when a range
* of rows are selected, and it may occasionally be emitted when nothing
* has happened.
*
* @param handler the signal handler
* @return a signal handler ID to keep track of the signal connection
* @see ChangedCallback#run
*/
public SignalConnection onChanged(ChangedCallback handler) {
try (Arena _arena = Arena.ofConfined()) {
try {
var _name = Interop.allocateNativeString("changed", _arena);
var _callbackArena = Arena.ofShared();
var _result = (int) (long) Signals.g_signal_connect_data.invokeExact(handle(),
_name, handler.toCallback(_callbackArena),
Arenas.cacheArena(_callbackArena), Arenas.CLOSE_CB_SYM, 0);
return new SignalConnection<>(handle(), _result);
} catch (Throwable _err) {
throw new AssertionError(_err);
}
}
}
/**
* Emits the "changed" signal. See {@link #onChanged}.
*/
public void emitChanged() {
try (Arena _arena = Arena.ofConfined()) {
MemorySegment _name = Interop.allocateNativeString("changed", _arena);
Object[] _args = new Object[0];
Signals.g_signal_emit_by_name.invokeExact(handle(), _name, _args);
} catch (Throwable _err) {
throw new AssertionError(_err);
}
}
/**
* A {@link Builder} object constructs a {@code TreeSelection}
* with the specified properties.
* Use the various {@code set...()} methods to set properties,
* and finish construction with {@link Builder#build()}.
*/
public static Builder extends Builder> builder() {
return new Builder<>();
}
/**
* Functional interface declaration of the {@code ChangedCallback} callback.
*
* @see ChangedCallback#run
*/
@FunctionalInterface
public interface ChangedCallback extends FunctionPointer {
/**
* Emitted whenever the selection has (possibly) changed. Please note that
* this signal is mostly a hint. It may only be emitted once when a range
* of rows are selected, and it may occasionally be emitted when nothing
* has happened.
*/
void run();
/**
* The {@code upcall} method is called from native code. The parameters
* are marshaled and {@link #run} is executed.
*/
default void upcall(MemorySegment sourceTreeSelection) {
run();
}
/**
* Creates a native function pointer to the {@link #upcall} method.
*
* @return the native function pointer
*/
default MemorySegment toCallback(Arena arena) {
FunctionDescriptor _fdesc = FunctionDescriptor.ofVoid(ValueLayout.ADDRESS);
MethodHandle _handle = Interop.upcallHandle(java.lang.invoke.MethodHandles.lookup(), ChangedCallback.class, _fdesc);
return Linker.nativeLinker().upcallStub(_handle.bindTo(this), _fdesc, arena);
}
}
/**
* Inner class implementing a builder pattern to construct a GObject with
* properties.
*
* @param the type of the Builder that is returned
*/
public static class Builder> extends GObject.Builder {
/**
* Default constructor for a {@code Builder} object.
*/
protected Builder() {
}
/**
* Finish building the {@code TreeSelection} object. This will call
* {@link GObject#withProperties} to create a new GObject instance,
* which is then cast to {@code TreeSelection}.
*
* @return a new instance of {@code TreeSelection} with the properties
* that were set in the Builder object.
*/
public TreeSelection build() {
try {
var _instance = (TreeSelection) GObject.withProperties(TreeSelection.getType(), getNames(), getValues());
connectSignals(_instance.handle());
return _instance;
} finally {
for (Value _value : getValues()) _value.unset();
getArena().close();
}
}
/**
* Selection mode.
* See gtk_tree_selection_set_mode() for more information on this property.
*
* @param mode the value for the {@code mode} property
* @return the {@code Builder} instance is returned, to allow method chaining
*/
public B setMode(SelectionMode mode) {
Arena _arena = getArena();
Value _value = new Value(_arena);
_value.init(SelectionMode.getType());
_value.setEnum(mode.getValue());
addBuilderProperty("mode", _value);
return (B) this;
}
/**
* Emitted whenever the selection has (possibly) changed. Please note that
* this signal is mostly a hint. It may only be emitted once when a range
* of rows are selected, and it may occasionally be emitted when nothing
* has happened.
*
* @param handler the signal handler
* @return the {@code Builder} instance is returned, to allow method chaining
* @see ChangedCallback#run
*/
public B onChanged(ChangedCallback handler) {
connect("changed", handler);
return (B) this;
}
}
private static final class MethodHandles {
static final MethodHandle gtk_tree_selection_count_selected_rows = Interop.downcallHandle(
"gtk_tree_selection_count_selected_rows",
FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS), false);
static final MethodHandle gtk_tree_selection_get_mode = Interop.downcallHandle(
"gtk_tree_selection_get_mode", FunctionDescriptor.of(ValueLayout.JAVA_INT,
ValueLayout.ADDRESS), false);
static final MethodHandle gtk_tree_selection_get_select_function = Interop.downcallHandle(
"gtk_tree_selection_get_select_function", FunctionDescriptor.of(ValueLayout.ADDRESS,
ValueLayout.ADDRESS), false);
static final MethodHandle gtk_tree_selection_get_selected = Interop.downcallHandle(
"gtk_tree_selection_get_selected", FunctionDescriptor.of(ValueLayout.JAVA_INT,
ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS), false);
static final MethodHandle gtk_tree_selection_get_selected_rows = Interop.downcallHandle(
"gtk_tree_selection_get_selected_rows", FunctionDescriptor.of(ValueLayout.ADDRESS,
ValueLayout.ADDRESS, ValueLayout.ADDRESS), false);
static final MethodHandle gtk_tree_selection_get_tree_view = Interop.downcallHandle(
"gtk_tree_selection_get_tree_view", FunctionDescriptor.of(ValueLayout.ADDRESS,
ValueLayout.ADDRESS), false);
static final MethodHandle gtk_tree_selection_get_user_data = Interop.downcallHandle(
"gtk_tree_selection_get_user_data", FunctionDescriptor.of(ValueLayout.ADDRESS,
ValueLayout.ADDRESS), false);
static final MethodHandle gtk_tree_selection_iter_is_selected = Interop.downcallHandle(
"gtk_tree_selection_iter_is_selected", FunctionDescriptor.of(ValueLayout.JAVA_INT,
ValueLayout.ADDRESS, ValueLayout.ADDRESS), false);
static final MethodHandle gtk_tree_selection_path_is_selected = Interop.downcallHandle(
"gtk_tree_selection_path_is_selected", FunctionDescriptor.of(ValueLayout.JAVA_INT,
ValueLayout.ADDRESS, ValueLayout.ADDRESS), false);
static final MethodHandle gtk_tree_selection_select_all = Interop.downcallHandle(
"gtk_tree_selection_select_all", FunctionDescriptor.ofVoid(ValueLayout.ADDRESS),
false);
static final MethodHandle gtk_tree_selection_select_iter = Interop.downcallHandle(
"gtk_tree_selection_select_iter", FunctionDescriptor.ofVoid(ValueLayout.ADDRESS,
ValueLayout.ADDRESS), false);
static final MethodHandle gtk_tree_selection_select_path = Interop.downcallHandle(
"gtk_tree_selection_select_path", FunctionDescriptor.ofVoid(ValueLayout.ADDRESS,
ValueLayout.ADDRESS), false);
static final MethodHandle gtk_tree_selection_select_range = Interop.downcallHandle(
"gtk_tree_selection_select_range", FunctionDescriptor.ofVoid(ValueLayout.ADDRESS,
ValueLayout.ADDRESS, ValueLayout.ADDRESS), false);
static final MethodHandle gtk_tree_selection_selected_foreach = Interop.downcallHandle(
"gtk_tree_selection_selected_foreach",
FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS,
ValueLayout.ADDRESS), false);
static final MethodHandle gtk_tree_selection_set_mode = Interop.downcallHandle(
"gtk_tree_selection_set_mode", FunctionDescriptor.ofVoid(ValueLayout.ADDRESS,
ValueLayout.JAVA_INT), false);
static final MethodHandle gtk_tree_selection_set_select_function = Interop.downcallHandle(
"gtk_tree_selection_set_select_function",
FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS,
ValueLayout.ADDRESS, ValueLayout.ADDRESS), false);
static final MethodHandle gtk_tree_selection_unselect_all = Interop.downcallHandle(
"gtk_tree_selection_unselect_all", FunctionDescriptor.ofVoid(ValueLayout.ADDRESS),
false);
static final MethodHandle gtk_tree_selection_unselect_iter = Interop.downcallHandle(
"gtk_tree_selection_unselect_iter", FunctionDescriptor.ofVoid(ValueLayout.ADDRESS,
ValueLayout.ADDRESS), false);
static final MethodHandle gtk_tree_selection_unselect_path = Interop.downcallHandle(
"gtk_tree_selection_unselect_path", FunctionDescriptor.ofVoid(ValueLayout.ADDRESS,
ValueLayout.ADDRESS), false);
static final MethodHandle gtk_tree_selection_unselect_range = Interop.downcallHandle(
"gtk_tree_selection_unselect_range", FunctionDescriptor.ofVoid(ValueLayout.ADDRESS,
ValueLayout.ADDRESS, ValueLayout.ADDRESS), false);
}
}