用QT写的贪食蛇游戏
时间:2011-11-07
来源:互联网
谁会找的。任何语言都可以。
只得到
而3c00001 a0000a 在 xwininfo -tree -root里面根本没有。
就算直接从xwininfo的结果得到 0x1c00004,怎么指定此窗口?
$_=Gtk2::Gdk::Window->lookup(0x1c00004); 可不行。
代码:
● xwininfo -tree -root|grep -C 6 desktop
0x2c005b5 (has no name): () 950x2+9+0 +902+355
0x2c005b4 (has no name): () 23x44+0+0 +893+355
0x1600111 (has no name): () 1920x1080+0+0 +0+0
1 child:
0x1600112 (has no name): () 1920x1080+0+0 +0+0
1 child:
0x1c00004 "桌面": ("desktop_window" "Nautilus") 1920x1080+0+0 +0+0
2 children:
0x1c00072 (has no name): () 1920x1080+0+0 +0+0
0x1c00005 (has no name): () 1x1+-1+-1 +-1+-1
0x1200003 "main.py": ("main.py" "Main.py") 24x14+1876+1026 +1876+1026
1 child:
0x1200004 (has no name): () 1x1+-1+-1 +1875+1025
0x2c005b5 (has no name): () 950x2+9+0 +902+355
0x2c005b4 (has no name): () 23x44+0+0 +893+355
0x1600111 (has no name): () 1920x1080+0+0 +0+0
1 child:
0x1600112 (has no name): () 1920x1080+0+0 +0+0
1 child:
0x1c00004 "桌面": ("desktop_window" "Nautilus") 1920x1080+0+0 +0+0
2 children:
0x1c00072 (has no name): () 1920x1080+0+0 +0+0
0x1c00005 (has no name): () 1x1+-1+-1 +-1+-1
0x1200003 "main.py": ("main.py" "Main.py") 24x14+1876+1026 +1876+1026
1 child:
0x1200004 (has no name): () 1x1+-1+-1 +1875+1025
代码:
● dog drawonroot.pl
sub wininfo{
my $w=shift;
my ($x, $y, $width, $height, $depth) = $w->get_geometry;
printf "%10x:\t${width}x$height+$x+$y\@$depth\ttype:%s\n", $w->get_xid, $w->get_type_hint;
}
Gtk2->init;
$window=Gtk2::Gdk->get_default_root_window;
($drawable,$x_offset,$y_offset)=$window->get_internal_paint_info;
wininfo($window);
@wlist = $window->get_children;
foreach(@wlist){ wininfo($_); }
wininfo($_);
exit;
sub wininfo{
my $w=shift;
my ($x, $y, $width, $height, $depth) = $w->get_geometry;
printf "%10x:\t${width}x$height+$x+$y\@$depth\ttype:%s\n", $w->get_xid, $w->get_type_hint;
}
Gtk2->init;
$window=Gtk2::Gdk->get_default_root_window;
($drawable,$x_offset,$y_offset)=$window->get_internal_paint_info;
wininfo($window);
@wlist = $window->get_children;
foreach(@wlist){ wininfo($_); }
wininfo($_);
exit;
只得到
代码:
● drawonroot.pl
15d: 1920x1080+0+0@24 type:normal
3c00001: 10x10+10+10@24 type:normal
a0000a: 10x10+0+0@24 type:normal
15d: 1920x1080+0+0@24 type:normal
3c00001: 10x10+10+10@24 type:normal
a0000a: 10x10+0+0@24 type:normal
而3c00001 a0000a 在 xwininfo -tree -root里面根本没有。
就算直接从xwininfo的结果得到 0x1c00004,怎么指定此窗口?
$_=Gtk2::Gdk::Window->lookup(0x1c00004); 可不行。
作者: eexpress 发布时间: 2011-11-07
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28