All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.gnome.gobject.ValueDataUnion Maven / Gradle / Ivy

There is a newer version: 0.11.1
Show newest version
// Java-GI - Java language bindings for GObject-Introspection-based libraries
// Copyright (C) 2022-2024 Jan-Willem Harmannij
//
// SPDX-License-Identifier: LGPL-2.1-or-later
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see .
//
// This file has been generated with Java-GI.
// Do not edit this file directly!
// Visit  for more information.
//
package org.gnome.gobject;

import io.github.jwharm.javagi.base.ManagedInstance;
import io.github.jwharm.javagi.interop.Interop;
import java.lang.foreign.MemoryLayout;
import java.lang.foreign.MemorySegment;
import java.lang.foreign.ValueLayout;
import javax.annotation.processing.Generated;

@Generated("io.github.jwharm.JavaGI")
public class ValueDataUnion extends ManagedInstance {
    static {
        GObjects.javagi$ensureInitialized();
    }

    /**
     * Create a ValueDataUnion proxy instance for the provided memory address.
     * @param address the memory address of the native object
     */
    public ValueDataUnion(MemorySegment address) {
        super(Interop.reinterpret(address, getMemoryLayout().byteSize()));
    }

    /**
     * The memory layout of the native struct.
     * @return the memory layout
     */
    public static MemoryLayout getMemoryLayout() {
        return MemoryLayout.unionLayout(
            ValueLayout.JAVA_INT.withName("v_int"),
            ValueLayout.JAVA_INT.withName("v_uint"),
            ValueLayout.JAVA_LONG.withName("v_long"),
            ValueLayout.JAVA_LONG.withName("v_ulong"),
            ValueLayout.JAVA_LONG.withName("v_int64"),
            ValueLayout.JAVA_LONG.withName("v_uint64"),
            ValueLayout.JAVA_FLOAT.withName("v_float"),
            ValueLayout.JAVA_DOUBLE.withName("v_double"),
            ValueLayout.ADDRESS.withName("v_pointer")
        ).withName("null");
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy