curs_mouse(3x)联机man文档联机是什么意思

圣安地列斯联机 SA-MP 0.3X 的作弊器的怎么使用?全是英文的! (m0d_s0beit_sa_v4.3.2.0_for_0.3x.7z)_百度知道
圣安地列斯联机 SA-MP 0.3X 的作弊器的怎么使用?全是英文的! (m0d_s0beit_sa_v4.3.2.0_for_0.3x.7z)
我现在玩的是酷派天空的 不知道这个作弊器适不适合
KERNEL32。! 说什么无法定位什么
。。我刚刚安了
进不去联机了
提问者采纳
直接安装挂,你可以把安全的东西拿掉,无法定位是要再来
?????????????不懂你说什么耶
能不能说详细点
直接查圣安地列斯联机 SA-MP 0.3X 的作弊器的挂
提问者评价
能不能给个汉化版的下载地址 最好能刷武器、钱的
其他类似问题
等待您来回答
为您推荐:
下载知道APP
随时随地咨询
出门在外也不愁您的浏览器已经禁用了脚本,这可能会影响您正常使用本站的功能。
联机帮助命令:man、help系统中有大量的命令,而且许多命令又有众多选项或参数,要想全部记住它们相当困难。对大多数用户来说,也没有必要这样做,因为用户常用的命令是整个命令集合中的一个子集。硬性记忆命令很难,但Linux提供了联机帮助手册,利用它,可以方便地查看所有命令的完整说明,包括命令语法、各选项的意义及相关命令等。命令man命令格式化并显示某一命令的联机帮助手册页。man是英文单词&manual&的缩写,表示&手册&。该命令可以格式化并显示联机帮助手册页。通常,用户只要在命令man之后输入想了解其用法的命令名(例如,man ),man命令就会在屏幕上列出一份完整的说明,就好像查阅&命令手册&那样。所有用户都可以通过man命令使用Linux的联机用户手册,包括《操作系统用户手册》的全部内容。在联机手册中,常用的命令说明格式如下:Na比Ie部分表示命令的名称和用法。Synopsis显示命令的语法格式,列出其所有可供使用的选项及参数,说明如何使用该命令。方括号中的内容是可选的。DescriPtion部分描述命令的详细用法及每个选项的功能。Retum value在说明函数的手册页中,这段将说明函数返回值的类型,也可能包括出错时返回的特定值。Examples部分给出命令执行方式的典型示例。See Also部分说明命令的其他方面或对命令的其他解释。叭厄ming部分描述使用命令时可能会遇到的特殊问题。Bugs列出任何已知的缺点及隐含的错误。通过man命令,可以显示系统中各个命令的用法。它将命令名称为参数。如果在命令行参数中指定了特定命令名称,该命令会显示关于这条命令的手册页。例如,下面的命令行将显示命令的手册页: # man cal如果没有特别指定命令名称,该命令会显示所有的手册页。如果只想获得对系统某一部分使用的帮助,可以用适当的缩写形式指定需要获得的某一方面的信息。例如,如果想从硬件部分中了解有关硬盘的联机帮助信息,可以输入: # man hd一般格式:man [选项] 命令名选项: -M 路径 指定查找man手册页的路径。如果没有这个选项,将使用环境变量MANPATH指定的路径。如果没有设置MANPATH变量,就查看/usr/share/misc/man.conf文件中关于man手册页的位置。 -P 命令 指定显示手册所使用的分页程序。默认使用/usr/bin/-is。 -S 章节 指定查找手册也的章节列表。该列表是由表示各命令类别的章节号和分割它们&:&组成。手册中的章节见表。章节说明1一般用户命令。2系统调用。3C语言函数库。4有关驱动程序和系统设备的解释。5配置文件的解释。6游戏程序的命令。7有用的杂类命令,如宏命令包等。8有关系统维护的管理的命令。-a 显示所有的手册页,而不是只显示第一处找到的。 -d 这个选项主要在检查时使用。如果用户加入了新的手册页,就可以用这个选项检查手册页的安装情况。这个选项并不显示手册页的内容。 -D 既显示手册页内容,也显示检查信息。 -f 只显示出命令的功能而不显示其中详细的说明文件。 - 不显示手册页,只显示将被格式化和显示的文件所在的位置。示例:查看命令的用法: # man date命令help命令用来查看所有内置命令的帮助信息。shell是Linux的命令解释程序,它对接收的命令进行解释并予以执行。有些命令构造在shell内部,从而在shell环境内部执行。这种命令称为shell内置命令(也称为内部命令)。用户可以利用help命令来查看shell内置命令的用法。如果help命令后面不带任何参数,则显示help命令的用法,列出shell的内置命令列表。一般格式:help 命令示例:命令是一个shell内置命令,列出其帮助信息: # help cd延伸阅读
最新随机分享精选
关注交流群收藏Ctrl+D帮助&2015
关注Linux/Unix应用技术、业界新闻,同时也发布开源、移动互联网等新鲜资讯!—— Powered ——运行在Report forwarded
to debian-bugs-dist@lists.debian.org, Debian QA Group &packages@qa.debian.org&:
Bug#550716; Package ncurses.
(Mon, 12 Oct :08 GMT)
available.
Acknowledgement sent
to Colin Watson &&:
New Bug report received and forwarded.
Copy sent to Debian QA Group &packages@qa.debian.org&.
(Mon, 12 Oct :08 GMT)
available.
received at submit@bugs.debian.org (, , ):
Package: ncurses
Version: 5.7+
Severity: normal
Tags: patch
User: ubuntu-devel@
Usertags: origin-ubuntu ubuntu-patch karmic
When cross-building, dpkg-buildpackage sets PKG_CONFIG_LIBDIR to a
colon-separated pair of paths. This is valid as far as pkg-config is
concerned. However, ncurses breaks like this:
cd misc && /usr/bin/make DESTDIR=&/home/cjwatson/tmp/ncurses/debian/tmp& all
make[2]: Entering directory `/home/cjwatson/tmp/ncurses/obj/misc'
Makefile:128: *** target pattern contains no `%'. Stop.
The following patch fixes this, although it relies on GNU Make features
and so upstream might want to consider a different approach.
* debian/patches/08-pkg-config-libdir.patch: Cope with multiple
colon-separated entries in $(PKG_CONFIG_LIBDIR), as set by default by
dpkg-buildpackage when cross-compiling.
diff -u ncurses-5.7+/debian/patches/00list ncurses-5.7+/debian/patches/00list
--- ncurses-5.7+/debian/patches/00list
+++ ncurses-5.7+/debian/patches/00list
@@ -7,0 +8 @@
+08-pkg-config-libdir.dpatch
only in patch2:
unchanged:
--- ncurses-5.7+.orig/debian/patches/08-pkg-config-libdir.dpatch
+++ ncurses-5.7+/debian/patches/08-pkg-config-libdir.dpatch
@@ -0,0 +1,20 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 08-cross-compile.dpatch by Colin Watson &&
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Cope with multiple colon-separated entries in $(PKG_CONFIG_LIBDIR),
+## DP: as set by default by dpkg-buildpackage when cross-compiling.
+diff -urNad ncurses-5.7+~/misc/Makefile.in ncurses-5.7+/misc/Makefile.in
+--- ncurses-5.7+~/misc/Makefile.in
14:59:19. +0000
++++ ncurses-5.7+/misc/Makefile.in
13:25:29. +0100
+@@ -129,7 +129,7 @@
+ $(DESTDIR)$(libdir) \
+ $(DESTDIR)$(datadir) \
+ $(DESTDIR)$(tabsetdir) \
+-$(DESTDIR)$(PKG_CONFIG_LIBDIR) :
++$(foreach d,$(subst :, ,$(PKG_CONFIG_LIBDIR)),$(DESTDIR)$(d)) :
$(SHELL) $(top_srcdir)/mkdirs.sh $@
+ uninstall : uninstall.data uninstall.libs
Colin Watson
Added tag(s) fixed-upstream.
Request was from Sven Joachim &svenjoac@gmx.de&
to control@bugs.debian.org.
(Sun, 01 Nov :05 GMT)
available.
Added tag(s) pending.
Request was from Craig Small &.au&
to control@bugs.debian.org.
(Mon, 11 Jan :07 GMT)
available.
Message sent on
to Colin Watson &&:
Bug#550716.
(Mon, 11 Jan :11 GMT)
available.
received at 550716-submitter@bugs.debian.org (, , ):
tag 550716 pending
Bug #550716 reported by you has been fixed in the Git repository. You can
see the changelog below, and you can check the diff of the fix at:
commit daff6a2bbf1d816fcd39b9e35586
Author: Craig Small &.au&
Mon Jan 11 22:59:31
Adjusted other install files to stop double-instal
diff --git a/debian/changelog b/debian/changelog
index f86826a..644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
ncurses (5.7+) UNRELEASED; urgency=low
[ Sven Joachim ]
* New upstream patchlevel.
- Workaround for bug in g++ 4.1-4.4 warnings for wattrset() macro
on amd64 (Closes: #).
@@ -40,7 +41,11 @@ ncurses (5.7+) UNRELEASED; urgency=low
* Use dh_install instead of dh_movefiles to install files and clean
up debian/rules a bit.
- -- Sven Joachim &svenjoac@gmx.de&
Fri, 01 Jan :24 +0100
[ Craig Small ]
* New maintainer Closes:
* Cross compile patch applied Closes: #
+ -- Craig Small &csmall@debian.org&
Mon, 11 Jan :01 +1100
ncurses (5.7+) urgency=low
Reply sent
to Sven Joachim &svenjoac@gmx.de&:
You have taken responsibility.
(Tue, 16 Mar :21 GMT)
available.
Notification sent
to Colin Watson &&:
Bug acknowledged by developer.
(Tue, 16 Mar :21 GMT)
available.
received at 550716-close@bugs.debian.org (, , ):
Source: ncurses
Source-Version: 5.7+
We believe that the bug you reported is fixed in the latest version of
ncurses, which is due to be installed in the Debian FTP archive:
lib32ncurses5-dev_5.7+_amd64.deb
to main/n/ncurses/lib32ncurses5-dev_5.7+_amd64.deb
lib32ncurses5_5.7+_amd64.deb
to main/n/ncurses/lib32ncurses5_5.7+_amd64.deb
lib32ncursesw5-dev_5.7+_amd64.deb
to main/n/ncurses/lib32ncursesw5-dev_5.7+_amd64.deb
lib32ncursesw5_5.7+_amd64.deb
to main/n/ncurses/lib32ncursesw5_5.7+_amd64.deb
libncurses5-dbg_5.7+_amd64.deb
to main/n/ncurses/libncurses5-dbg_5.7+_amd64.deb
libncurses5-dev_5.7+_amd64.deb
to main/n/ncurses/libncurses5-dev_5.7+_amd64.deb
libncurses5_5.7+_amd64.deb
to main/n/ncurses/libncurses5_5.7+_amd64.deb
libncursesw5-dbg_5.7+_amd64.deb
to main/n/ncurses/libncursesw5-dbg_5.7+_amd64.deb
libncursesw5-dev_5.7+_amd64.deb
to main/n/ncurses/libncursesw5-dev_5.7+_amd64.deb
libncursesw5_5.7+_amd64.deb
to main/n/ncurses/libncursesw5_5.7+_amd64.deb
ncurses-base_5.7+_all.deb
to main/n/ncurses/ncurses-base_5.7+_all.deb
ncurses-bin_5.7+_amd64.deb
to main/n/ncurses/ncurses-bin_5.7+_amd64.deb
ncurses-term_5.7+_all.deb
to main/n/ncurses/ncurses-term_5.7+_all.deb
ncurses_5.7+.diff.gz
to main/n/ncurses/ncurses_5.7+.diff.gz
ncurses_5.7+.dsc
to main/n/ncurses/ncurses_5.7+.dsc
ncurses_5.7+.orig.tar.gz
to main/n/ncurses/ncurses_5.7+.orig.tar.gz
A summary of the changes between this version and the previous one is
Thank you for reporting the bug, which will now be closed.
have further comments please address them to 550716@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
Sven Joachim &svenjoac@gmx.de& (supplier of updated ncurses package)
(This message was generated automatica if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Sun, 21 Feb :58 +0100
Source: ncurses
Binary: libncurses5 libncurses5-dev libncurses5-dbg libncursesw5 libncursesw5-dev libncursesw5-dbg lib64ncurses5 lib64ncurses5-dev lib32ncurses5 lib32ncurses5-dev lib32ncursesw5 lib32ncursesw5-dev ncurses-bin ncurses-base ncurses-term
Architecture: source amd64 all
Version: 5.7+
Distribution: unstable
Urgency: low
Maintainer: Craig Small &csmall@debian.org&
Changed-By: Sven Joachim &svenjoac@gmx.de&
Description:
lib32ncurses5 - shared libraries for terminal handling (32-bit)
lib32ncurses5-dev - developer's libraries for ncurses (32-bit)
lib32ncursesw5 - shared libraries for terminal handling (wide character support) (
lib32ncursesw5-dev - developer's libraries for ncursesw (32-bit)
lib64ncurses5 - shared libraries for terminal handling (64-bit)
lib64ncurses5-dev - developer's libraries for ncurses (64-bit)
libncurses5 - shared libraries for terminal handling
libncurses5-dbg - debugging/profiling libraries for ncurses
libncurses5-dev - developer's libraries and docs for ncurses
libncursesw5 - shared libraries for terminal handling (wide character support)
libncursesw5-dbg - debugging/profiling libraries for ncurses
libncursesw5-dev - developer's libraries for ncursesw
ncurses-base - basic terminal type definitions
ncurses-bin - terminal-related programs and man pages
ncurses-term - additional terminal type definitions
ncurses (5.7+) urgency=low
[ Sven Joachim ]
* New upstream patchlevel.
- Workaround for bug in g++ 4.1-4.4 warnings for wattrset() macro
on amd64 (Closes: #).
- Fix typo in curs_mouse.3x (Closes: #).
- Modify CF_MAN_PAGES configure macro to replace all occurrences of
TPUT in tput.1's manpage (Closes: #).
- Bump shlibs version, as there are several new symbols.
* Remove patch introduced in 5.5-2, applied upstream. Remove patch
introduced in version 5.7+, no longer necessary.
* Switch patch system to quilt.
- Add a short debian/README.source as recommended by policy.
* Configure with /usr/share/terminfo as default terminfo dir, so that
we get the correct tabset directory (Closes: #, LP: #200773).
* Update xterm terminfo entry from xterm 246 (Closes: #).
* Derive xterm{16,256,88}-color from xterm-debian rather than
xterm-new for correct backspace key behavior.
* Move the debugging libraries back to /usr/lib/debug (Closes: #),
ship detached debugging symbols (Closes: #).
* Fix typo in debian/rules that lead to a dangling symlink in
lib64ncurses-dev (Closes: #).
* Install the binaries built without trace support in ncurses-bin
to avoid symbol lookup errors (Closes: #).
* Build static libraries with &--without-dlsym& (Closes: #).
* Remove compatibility symlinks in /usr/share/terminfo that were only
necessary for upgrades from versions prior to 5.4-9.
* debian/control cleanups:
- Adjust priority of the source package to required.
- Remove duplicate Section field for library packages.
- Fix dependencies of lib32ncursesw5-dev.
- Fix long descriptions of 32-bit packages on 64-bit systems.
- Do not recommend libgpm2 in non-native library packages, nor on
non-Linux architectures.
- Remove very old Replaces/Conflicts/Provides on ncurses-developer,
ncurses and tput.
- Version the &Replaces: ia32-libs& for lib32ncurses-dev.
- Remove no longer needed &Replaces: ncurses-term& and
&Depends: libncurses5& from ncurses-base.
- Set Homepage field to .
- Add Vcs-Browser and Vcs-Git fields.
- Add ${misc:Depends} in all Depends fields.
- Add myself to Uploaders.
* Add lintian override for alleged spelling error in ncurses-base'
&linux& refers to a terminal type there.
* Use dh_install instead of dh_movefiles to install files and clean
up debian/rules a bit.
* Update Standards-Version to 3.8.4, no changes needed.
[ Craig Small ]
* New maintainer Closes:
* Cross compile patch applied Closes: #
Checksums-Sha1:
d7fd67e22001bababfdaf5daa200cb49d4c3eee2 1567 ncurses_5.7+.dsc
78cabf0ab6f2df0d20ff569cbf305a 2612398 ncurses_5.7+.orig.tar.gz
57fb3fac65eca724 45965 ncurses_5.7+.diff.gz
e65cb1a1fc5b3e1e4b5b 364428 libncurses5_5.7+_amd64.deb
7c60ec0300adfce9e5a99b2a1998 libncurses5-dev_5.7+_amd64.deb
f6a382e24df24a8eb98538fcf7b9e772a60948 libncurses5-dbg_5.7+_amd64.deb
c30e205ae3ca3e0c700e4ff10a libncursesw5_5.7+_amd64.deb
bbd6ebe081ee41763aae2 528134 libncursesw5-dev_5.7+_amd64.deb
2edea94eaed0a82c8db259f026bae 2803976 libncursesw5-dbg_5.7+_amd64.deb
3ab82f33fc5e674ac0 344366 lib32ncurses5_5.7+_amd64.deb
44b4c16d0f8e44f49bddaf982a07dcab 396646 lib32ncurses5-dev_5.7+_amd64.deb
5f43ba38ac039d944d35 370856 lib32ncursesw5_5.7+_amd64.deb
90fc2f33feabefacb3e5c 426102 lib32ncursesw5-dev_5.7+_amd64.deb
c550a429cddc3c91f3efeb7 319822 ncurses-bin_5.7+_amd64.deb
35a638c53cecdfe1cac0 187128 ncurses-base_5.7+_all.deb
181bc883e908ee1c9cfeff047db5f 576314 ncurses-term_5.7+_all.deb
Checksums-Sha256:
8fd3ef916aa83a7f9bbb3ff7dccd0aeec 1567 ncurses_5.7+.dsc
95ee20f8a72eff80b3d0ba91d1a79cc38b4696bfe39cfc6815ef 2612398 ncurses_5.7+.orig.tar.gz
837cef0bc512e7a1b5dccbdadc6dc3ae51e65 ncurses_5.7+.diff.gz
04011da08bfc6b19a4ab9cf0e10ecb31 364428 libncurses5_5.7+_amd64.deb
dd2c06bd799ad65ecea26dc6b20d504ba9cf246fa 1631998 libncurses5-dev_5.7+_amd64.deb
abaa1f30ccac4e859a4f78ee23e7ec2c66aa536cda9d60948 libncurses5-dbg_5.7+_amd64.deb
d6149baee83b658ef872afebb 389154 libncursesw5_5.7+_amd64.deb
e38baef1750db44eae09add01af991cab 528134 libncursesw5-dev_5.7+_amd64.deb
59ecf242ab1da572f27ccc94bcedce6 libncursesw5-dbg_5.7+_amd64.deb
607dfcacdc94f52dc0a81cda2fbf42ceb93ed4648ea 344366 lib32ncurses5_5.7+_amd64.deb
ea973be9150b0f4ada92c6646 lib32ncurses5-dev_5.7+_amd64.deb
22dfe05e9b18d92ccd04b167b405fd53fb691adb9acad241a2becb 370856 lib32ncursesw5_5.7+_amd64.deb
bacde2c420b227c52a41c47afa179fffe7457fdef73df9b 426102 lib32ncursesw5-dev_5.7+_amd64.deb
40abd35bfa8d74b8ee5ffac602aa5a4fa51b2eea5be9 319822 ncurses-bin_5.7+_amd64.deb
ca6bfb667be50a161cf1a29fe21c1eb4b8ef ncurses-base_5.7+_all.deb
e397ac2eaba252f36fa2b0a3a4e511ebcbb9dc5d 576314 ncurses-term_5.7+_all.deb
1828455ebea9e5a0a7 libs required ncurses_5.7+.dsc
89f4f4b6dc88cc147c6f4b7a7f9fa80b 2612398 libs required ncurses_5.7+.orig.tar.gz
e8efe5f5 45965 libs required ncurses_5.7+.diff.gz
1baf1cb07f2bfe3b4ce9e 364428 libs required libncurses5_5.7+_amd64.deb
bee9f02e7f657a1f3dbcab64d82e libdevel optional libncurses5-dev_5.7+_amd64.deb
8e445a0acac4b8a2ed9a5bd 3260948 debug extra libncurses5-dbg_5.7+_amd64.deb
f37c1d8f5eecfe816a4db18 389154 libs important libncursesw5_5.7+_amd64.deb
d3a7dd02 528134 libdevel optional libncursesw5-dev_5.7+_amd64.deb
7a6b42cfe970b 2803976 debug extra libncursesw5-dbg_5.7+_amd64.deb
fadbf4f97deabb 344366 libs optional lib32ncurses5_5.7+_amd64.deb
a4da64ca27d7edd0b34cd1c7 396646 libdevel optional lib32ncurses5-dev_5.7+_amd64.deb
224ca9578a1dcce6ef7a 370856 libs optional lib32ncursesw5_5.7+_amd64.deb
b737feba196 426102 libdevel optional lib32ncursesw5-dev_5.7+_amd64.deb
7ef749fc8c70be8d1fdfb 319822 utils required ncurses-bin_5.7+_amd64.deb
ac96ffec75b64fd8447dba 187128 utils required ncurses-base_5.7+_all.deb
5beef314 admin standard ncurses-term_5.7+_all.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iD8DBQFLns2Vx2zlrBLK36URAsRIAKCHNvA64fYgvil+SEfAYx/00CWLwACgm6Xq
aeBqRvxlP79H2IiXp6/GsEg=
-----END PGP SIGNATURE-----
Bug archived.
Request was from Debbugs Internal Request &owner@bugs.debian.org&
to internal_control@bugs.debian.org.
(Thu, 22 Apr :32 GMT)
available.
Send a report that .
Debian bug tracking system administrator &&.
Last modified:
2 07:34:14 2015;
Machine Name:
Copyright (C) 1999 Darren O. Benham,
nCipher Corporation Ltd,
1994-97 Ian Jackson.Interfacing with the mouse NCURSES Programming HOWTOPrevNext12. Interfacing with the mouseNow that you have seen how to get keys, lets do the same thing from mouse.
Usually each UI allows the user to interact with both keyboard and mouse. 12.1. The BasicsBefore you do any thing else, the events you want to receive have to be enabled
with mousemask().
mousemask(
mmask_t newmask,
/* The events you want to listen to */
mmask_t *oldmask)
/* The old events mask
*/The first parameter to above function is a bit mask of events you would like to
listen. By default, all the events are turned off. The bit mask
ALL_MOUSE_EVENTS can be used to get all the events.The following are all the event masks:
Description
---------------------------------------------------------------------
BUTTON1_PRESSED
mouse button 1 down
BUTTON1_RELEASED
mouse button 1 up
BUTTON1_CLICKED
mouse button 1 clicked
BUTTON1_DOUBLE_CLICKED
mouse button 1 double clicked
BUTTON1_TRIPLE_CLICKED
mouse button 1 triple clicked
BUTTON2_PRESSED
mouse button 2 down
BUTTON2_RELEASED
mouse button 2 up
BUTTON2_CLICKED
mouse button 2 clicked
BUTTON2_DOUBLE_CLICKED
mouse button 2 double clicked
BUTTON2_TRIPLE_CLICKED
mouse button 2 triple clicked
BUTTON3_PRESSED
mouse button 3 down
BUTTON3_RELEASED
mouse button 3 up
BUTTON3_CLICKED
mouse button 3 clicked
BUTTON3_DOUBLE_CLICKED
mouse button 3 double clicked
BUTTON3_TRIPLE_CLICKED
mouse button 3 triple clicked
BUTTON4_PRESSED
mouse button 4 down
BUTTON4_RELEASED
mouse button 4 up
BUTTON4_CLICKED
mouse button 4 clicked
BUTTON4_DOUBLE_CLICKED
mouse button 4 double clicked
BUTTON4_TRIPLE_CLICKED
mouse button 4 triple clicked
BUTTON_SHIFT
shift was down during button state change
BUTTON_CTRL
control was down during button state change
BUTTON_ALT
alt was down during button state change
ALL_MOUSE_EVENTS
report all button state changes
REPORT_MOUSE_POSITION
report mouse movement12.2. Getting the eventsOnce a class of mouse events have been enabled, getch() class of functions
return KEY_MOUSE every time some mouse event happens. Then the mouse event can
be retrieved with getmouse().The code approximately looks like this:
ch = getch();
if(ch == KEY_MOUSE)
if(getmouse(&event) == OK)
/* Do some thing with the event */
getmouse() returns the event into the pointer given to it. It's a structure
which contains
typedef struct
/* ID to distinguish multiple devices */
/* event coordinates */
/* button state bits */
The bstate is the main variable we are
interested in. It tells the button state of the mouse.Then with a code snippet like the following, we can find out what happened.
if(event.bstate & BUTTON1_PRESSED)
printw("Left Button Pressed");12.3. Putting it all TogetherThat's pretty much interfacing with mouse. Let's create the same menu and enable
mouse interaction. To make things simpler, key handling is removed.Example 11.
Access the menu with mouse !!! #include <ncurses.h>
#define WIDTH 30
#define HEIGHT 10
int startx = 0;
int starty = 0;
char *choices[] = {
"Choice 1",
"Choice 2",
"Choice 3",
"Choice 4",
int n_choices = sizeof(choices) / sizeof(char *);
void print_menu(WINDOW *menu_win, int highlight);
void report_choice(int mouse_x, int mouse_y, int *p_choice);
int main()
{ int c, choice = 0;
WINDOW *menu_
/* Initialize curses */
initscr();
cbreak(); //Line buffering disabled. pass on everything
/* Try to put the window in the middle of screen */
startx = (80 - WIDTH) / 2;
starty = (24 - HEIGHT) / 2;
attron(A_REVERSE);
mvprintw(23, 1, "Click on Exit to quit (Works best in a virtual console)");
refresh();
attroff(A_REVERSE);
/* Print the menu for the first time */
menu_win = newwin(HEIGHT, WIDTH, starty, startx);
print_menu(menu_win, 1);
/* Get all the mouse events */
mousemask(ALL_MOUSE_EVENTS, NULL);
{ c = wgetch(menu_win);
{ case KEY_MOUSE:
if(getmouse(&event) == OK)
{ /* When the user clicks left mouse button */
if(event.bstate & BUTTON1_PRESSED)
{ report_choice(event.x + 1, event.y + 1, &choice);
if(choice == -1) //Exit chosen
mvprintw(22, 1, "Choice made is : %d String Chosen is \"%10s\"", choice, choices[choice - 1]);
refresh();
print_menu(menu_win, choice);
void print_menu(WINDOW *menu_win, int highlight)
box(menu_win, 0, 0);
for(i = 0; i < n_ ++i)
{ if(highlight == i + 1)
{ wattron(menu_win, A_REVERSE);
mvwprintw(menu_win, y, x, "%s", choices[i]);
wattroff(menu_win, A_REVERSE);
mvwprintw(menu_win, y, x, "%s", choices[i]);
wrefresh(menu_win);
/* Report the choice according to mouse position */
void report_choice(int mouse_x, int mouse_y, int *p_choice)
{ int i,j,
i = startx + 2;
j = starty + 3;
for(choice = 0; choice < n_ ++choice)
if(mouse_y == j + choice && mouse_x >= i && mouse_x <= i + strlen(choices[choice]))
{ if(choice == n_choices - 1)
*p_choice = -1;
*p_choice = choice + 1;
}12.4. Miscellaneous FunctionsThe functions mouse_trafo() and wmouse_trafo() can be used to convert to mouse
co-ordinates to screen relative co-ordinates. See curs_mouse(3X) man page for details.The
mouseinterval
function sets the maximum time (in thousands of a
second) that can elapse between press and release events in order for
them to be recognized as a click.
This function returns the previous
interval value.
The default is one fifth of a second.PrevHomeNextInterfacing with the key board&Screen Manipulation

我要回帖

更多关于 圣安地列斯联机0.3x 的文章

 

随机推荐