本文整理了Java中com.sun.jna.platform.unix.X11.XFree()
方法的一些代码示例,展示了X11.XFree()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。X11.XFree()
方法的具体详情如下:
包路径:com.sun.jna.platform.unix.X11
类名称:X11
方法名:XFree
[英]Frees the specified XModifierKeymap structure.
[中]释放指定的XModifierKeymap结构。
代码示例来源:origin: net.java.dev.jna/jna-platform
x11.XFree(info.getPointer());
代码示例来源:origin: net.java.dev.jna/platform
x11.XPutImage(dpy, win, gc, image, 0, 0, offset.x, offset.y, w, h);
x11.XFree(image.getPointer());
x11.XFreeGC(dpy, gc);
x11.XCloseDisplay(dpy);
代码示例来源:origin: net.java.dev.jna/jna-platform
x11.XPutImage(dpy, win, gc, image, 0, 0, offset.x, offset.y, w, h);
x11.XFree(image.getPointer());
x11.XFreeGC(dpy, gc);
x11.XCloseDisplay(dpy);
代码示例来源:origin: net.java.dev.jna/platform
x11.XFree(info.getPointer());
代码示例来源: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
private static X11.Window getContentWindow(Window w, X11.Display dpy,
X11.Window win, Point offset) {
if ((w instanceof Frame && !((Frame)w).isUndecorated())
|| (w instanceof Dialog && !((Dialog)w).isUndecorated())) {
X11 x11 = X11.INSTANCE;
X11.WindowByReference rootp = new X11.WindowByReference();
X11.WindowByReference parentp = new X11.WindowByReference();
PointerByReference childrenp = new PointerByReference();
IntByReference countp = new IntByReference();
x11.XQueryTree(dpy, win, rootp, parentp, childrenp, countp);
Pointer p = childrenp.getValue();
int[] ids = p.getIntArray(0, countp.getValue());
for (int id : ids) {
// TODO: more verification of correct window?
X11.Window child = new X11.Window(id);
X11.XWindowAttributes xwa = new X11.XWindowAttributes();
x11.XGetWindowAttributes(dpy, child, xwa);
offset.x = -xwa.x;
offset.y = -xwa.y;
win = child;
break;
}
if (p != null) {
x11.XFree(p);
}
}
return win;
}
代码示例来源:origin: net.java.dev.jna/platform
private static X11.Window getContentWindow(Window w, X11.Display dpy,
X11.Window win, Point offset) {
if ((w instanceof Frame && !((Frame)w).isUndecorated())
|| (w instanceof Dialog && !((Dialog)w).isUndecorated())) {
X11 x11 = X11.INSTANCE;
X11.WindowByReference rootp = new X11.WindowByReference();
X11.WindowByReference parentp = new X11.WindowByReference();
PointerByReference childrenp = new PointerByReference();
IntByReference countp = new IntByReference();
x11.XQueryTree(dpy, win, rootp, parentp, childrenp, countp);
Pointer p = childrenp.getValue();
int[] ids = p.getIntArray(0, countp.getValue());
for (int id : ids) {
// TODO: more verification of correct window?
X11.Window child = new X11.Window(id);
X11.XWindowAttributes xwa = new X11.XWindowAttributes();
x11.XGetWindowAttributes(dpy, child, xwa);
offset.x = -xwa.x;
offset.y = -xwa.y;
win = child;
break;
}
if (p != null) {
x11.XFree(p);
}
}
return win;
}
内容来源于网络,如有侵权,请联系作者删除!