- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.sun.jna.platform.unix.X11.XCloseDisplay()
方法的一些代码示例,展示了X11.XCloseDisplay()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。X11.XCloseDisplay()
方法的具体详情如下:
包路径:com.sun.jna.platform.unix.X11
类名称:X11
方法名:XCloseDisplay
暂无
代码示例来源:origin: net.java.dev.jna/jna-platform
public boolean isPressed(int keycode, int location) {
X11 lib = X11.INSTANCE;
Display dpy = lib.XOpenDisplay(null);
if (dpy == null) {
throw new Error("Can't open X Display");
}
try {
byte[] keys = new byte[32];
// Ignore the return value
lib.XQueryKeymap(dpy, keys);
int keysym = toKeySym(keycode, location);
for (int code=5;code < 256;code++) {
int idx = code / 8;
int shift = code % 8;
if ((keys[idx] & (1 << shift)) != 0) {
int sym = lib.XKeycodeToKeysym(dpy, (byte)code, 0).intValue();
if (sym == keysym)
return true;
}
}
}
finally {
lib.XCloseDisplay(dpy);
}
return false;
}
}
代码示例来源:origin: net.java.dev.jna/platform
public boolean isPressed(int keycode, int location) {
X11 lib = X11.INSTANCE;
Display dpy = lib.XOpenDisplay(null);
if (dpy == null) {
throw new Error("Can't open X Display");
}
try {
byte[] keys = new byte[32];
// Ignore the return value
lib.XQueryKeymap(dpy, keys);
int keysym = toKeySym(keycode, location);
for (int code=5;code < 256;code++) {
int idx = code / 8;
int shift = code % 8;
if ((keys[idx] & (1 << shift)) != 0) {
int sym = lib.XKeycodeToKeysym(dpy, (byte)code, 0).intValue();
if (sym == keysym)
return true;
}
}
}
finally {
lib.XCloseDisplay(dpy);
}
return false;
}
}
代码示例来源:origin: net.java.dev.jna/jna-platform
x11.XFree(info.getPointer());
x11.XCloseDisplay(dpy);
代码示例来源:origin: net.java.dev.jna/platform
x11.XFree(info.getPointer());
x11.XCloseDisplay(dpy);
代码示例来源:origin: uk.co.caprica/vlcj
if(display != null) {
x.XCloseDisplay(display);
代码示例来源:origin: net.java.dev.jna/jna-platform
@Override
public void run() {
X11 x11 = X11.INSTANCE;
Display dpy = x11.XOpenDisplay(null);
if (dpy == null) {
return;
}
Pixmap pm = null;
try {
X11.Window win = getDrawable(w);
pm = src.getPixmap(dpy, win);
Xext ext = Xext.INSTANCE;
ext.XShapeCombineMask(dpy, win, X11.Xext.ShapeBounding,
0, 0, pm == null ? Pixmap.None : pm,
X11.Xext.ShapeSet);
}
finally {
if (pm != null) {
x11.XFreePixmap(dpy, pm);
}
x11.XCloseDisplay(dpy);
}
setForceHeavyweightPopups(getWindow(w), pm != null);
}
};
代码示例来源:origin: net.java.dev.jna/platform
public void run() {
X11 x11 = X11.INSTANCE;
Display dpy = x11.XOpenDisplay(null);
if (dpy == null) {
return;
}
Pixmap pm = null;
try {
X11.Window win = getDrawable(w);
pm = src.getPixmap(dpy, win);
Xext ext = Xext.INSTANCE;
ext.XShapeCombineMask(dpy, win, X11.Xext.ShapeBounding,
0, 0, pm == null ? Pixmap.None : pm,
X11.Xext.ShapeSet);
}
finally {
if (pm != null) {
x11.XFreePixmap(dpy, pm);
}
x11.XCloseDisplay(dpy);
}
setForceHeavyweightPopups(getWindow(w), pm != null);
}
};
代码示例来源:origin: com.googlecode.gstreamer-java/gstreamer-java
x11.XCloseDisplay(display);
} catch (Exception e) {
e.printStackTrace();
代码示例来源:origin: igniterealtime/Spark
public long getIdleTimeMillis() {
X11.Window win = null;
Xss.XScreenSaverInfo info = null;
X11.Display dpy = null;
final X11 x11 = X11.INSTANCE;
final Xss xss = Xss.INSTANCE;
long idlemillis = 0L;
try {
dpy = x11.XOpenDisplay(null);
win = x11.XDefaultRootWindow(dpy);
info = xss.XScreenSaverAllocInfo();
xss.XScreenSaverQueryInfo(dpy, win, info);
idlemillis = info.idle.longValue();
} finally {
if (info != null)
x11.XFree(info.getPointer());
info = null;
if (dpy != null)
x11.XCloseDisplay(dpy);
dpy = null;
}
return idlemillis;
}
}
代码示例来源:origin: net.java.dev.jna/jna-platform
@Override
public void run() {
X11 x11 = X11.INSTANCE;
Display dpy = x11.XOpenDisplay(null);
if (dpy == null)
return;
try {
X11.Window win = getDrawable(w);
if (alpha == 1f) {
x11.XDeleteProperty(dpy, win,
x11.XInternAtom(dpy, OPACITY,
false));
}
else {
int opacity = (int)((long)(alpha * OPAQUE) & 0xFFFFFFFF);
IntByReference patom = new IntByReference(opacity);
x11.XChangeProperty(dpy, win,
x11.XInternAtom(dpy, OPACITY,
false),
X11.XA_CARDINAL, 32,
X11.PropModeReplace,
patom.getPointer(), 1);
}
}
finally {
x11.XCloseDisplay(dpy);
}
}
};
代码示例来源:origin: net.java.dev.jna/platform
public void run() {
X11 x11 = X11.INSTANCE;
Display dpy = x11.XOpenDisplay(null);
if (dpy == null)
return;
try {
X11.Window win = getDrawable(w);
if (alpha == 1f) {
x11.XDeleteProperty(dpy, win,
x11.XInternAtom(dpy, OPACITY,
false));
}
else {
int opacity = (int)((long)(alpha * OPAQUE) & 0xFFFFFFFF);
IntByReference patom = new IntByReference(opacity);
x11.XChangeProperty(dpy, win,
x11.XInternAtom(dpy, OPACITY,
false),
X11.XA_CARDINAL, 32,
X11.PropModeReplace,
patom.getPointer(), 1);
}
}
finally {
x11.XCloseDisplay(dpy);
}
}
};
代码示例来源:origin: net.java.dev.jna/platform
x11.XCloseDisplay(dpy);
代码示例来源:origin: net.java.dev.jna/jna-platform
x11.XCloseDisplay(dpy);
我从各种文档中看到,XCloseDisplay 返回一个整数,我怀疑这是一个错误代码。 我应该如何处理这个值?是错误代码吗?如果是这样,我该如何处理错误? 最佳答案 我查看了源代码(lib/X11/C
我正在开发一个自己编写的小型窗口管理器,项目刚刚开始,只有几行与 X 服务器通信的代码。问题出现在退出时:程序在调用 XCloseDisplay 时挂起。 测试时没有运行窗口管理器,程序只是初始化一些
本文整理了Java中com.sun.jna.platform.unix.X11.XCloseDisplay()方法的一些代码示例,展示了X11.XCloseDisplay()的具体用法。这些代码示例主
我正在使用 X11,当我运行我的程序时,窗口显示正常,但是当我退出时,控制台中会输出以下错误: XIO: fatal IO error 11 (Resource temporarily unavail
我是一名优秀的程序员,十分优秀!