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

org.lwjgl.system.macosx.MacOSXLibrary Maven / Gradle / Ivy

The newest version!
/*
 * Copyright LWJGL. All rights reserved.
 * License terms: https://www.lwjgl.org/license
 */
package org.lwjgl.system.macosx;

import org.lwjgl.system.*;

import static org.lwjgl.system.APIUtil.*;

/** Implements a {@link SharedLibrary} on the macOS. */
public abstract class MacOSXLibrary extends SharedLibrary.Default {

    protected MacOSXLibrary(String name, long handle) {
        super(name, handle);
    }

    public static MacOSXLibrary getWithIdentifier(String bundleID) {
        apiLog("Loading library: " + bundleID);
        MacOSXLibraryBundle lib = MacOSXLibraryBundle.getWithIdentifier(bundleID);
        apiLog("\tSuccess");
        return lib;
    }

    public static MacOSXLibrary create(String name) {
        return name.endsWith(".framework")
            ? MacOSXLibraryBundle.create(name)
            : new MacOSXLibraryDL(name);
    }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy