com.github.bloodshura.ignitium.ntv.forwarding.impl.UnixNativeImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ignitium-native Show documentation
Show all versions of ignitium-native Show documentation
An API for working with native system APIs, with a higher-level interface.
The newest version!
package com.github.bloodshura.ignitium.ntv.forwarding.impl;
import com.github.bloodshura.ignitium.math.random.XRandom;
import com.github.bloodshura.ignitium.ntv.NativeException;
import com.github.bloodshura.ignitium.ntv.forwarding.NativeImpl;
import com.github.bloodshura.ignitium.ntv.keyboard.KeyboardHandler;
import com.github.bloodshura.ignitium.ntv.keyboard.KeyboardWatcher;
import com.github.bloodshura.ignitium.ntv.keyboard.impl.X11KeyboardWatcher;
import com.github.bloodshura.ignitium.ntv.math.UnixRandom;
import com.github.bloodshura.ignitium.ntv.mouse.MouseHandler;
import com.github.bloodshura.ignitium.ntv.mouse.impl.X11MouseHandler;
import com.github.bloodshura.ignitium.ntv.process.NativeProcess;
import com.github.bloodshura.ignitium.ntv.process.impl.UnixProcess;
import com.github.bloodshura.ignitium.ntv.shm.SharedMemory;
import com.github.bloodshura.ignitium.ntv.shm.impl.UnixSharedMemory;
import com.github.bloodshura.ignitium.ntv.sys.NativeSystem;
import com.github.bloodshura.ignitium.ntv.sys.impl.UnixNativeSystem;
import javax.annotation.Nullable;
public class UnixNativeImpl implements NativeImpl {
@Nullable
@Override
public KeyboardHandler createKeyboardHandler() throws NativeException {
return null;
}
@Nullable
@Override
public KeyboardWatcher createKeyboardWatcher() throws NativeException {
return new X11KeyboardWatcher();
}
@Nullable
@Override
public MouseHandler createMouseHandler() throws NativeException {
return new X11MouseHandler();
}
@Nullable
@Override
public NativeProcess createProcess(int processId) throws NativeException {
return new UnixProcess(processId);
}
@Nullable
@Override
public XRandom createRandom() throws NativeException {
return new UnixRandom();
}
@Nullable
@Override
public SharedMemory createSharedMemory(int key, int size) throws NativeException {
return new UnixSharedMemory(key, size, true);
}
@Nullable
@Override
public NativeSystem createSystem() throws NativeException {
return new UnixNativeSystem();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy