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

com.codedisaster.steamworks.SteamInterface Maven / Gradle / Ivy

There is a newer version: 1.9.0
Show newest version
package com.codedisaster.steamworks;

abstract class SteamInterface {

	protected final long pointer;
	protected long callback;

	SteamInterface(long pointer) {
		this(pointer, 0L);
	}

	SteamInterface(long pointer, long callback) {
		if (pointer == 0L) {
			throw new RuntimeException("Steam interface created with null pointer." +
							" Always check result of SteamAPI.init(), or with SteamAPI.isSteamRunning()!");
		}
		this.pointer = pointer;
		this.callback = callback;
	}

	void setCallback(long callback) {
		this.callback = callback;
	}

	public void dispose() {
		deleteCallback(callback);
	}

	/*JNI
		#include "SteamCallbackAdapter.h"
	*/

	static protected native void deleteCallback(long callback); /*
		delete (SteamCallbackAdapter*) callback;
	*/

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy