説明
bool
ncurses_getmouse ( array mevent)
è¦å‘Š |
ã“ã®é–¢æ•°ã¯ã€
実験的ãªã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã«ã‚りã¾ã™ã€‚ã“れã¯ã€ã“ã®é–¢æ•°ã®
動作ã€é–¢æ•°åã€ã“ã“ã§æ›¸ã‹ã‚Œã¦ã„ã‚‹ã“ã¨å…¨ã¦ãŒPHPã®å°†æ¥ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§äºˆå‘Š
ãªã変更ã•れるå¯èƒ½æ€§ãŒã‚ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚注æ„ã‚’å–šèµ·ã™ã‚‹ã¨ã¨ã‚‚ã«è‡ªåˆ†
ã®ãƒªã‚¹ã‚¯ã§ã“ã®é–¢æ•°ã‚’使用ã—ã¦ä¸‹ã•ã„。 |
ncurses_getmouse() reads mouse event out of
queue. Function ncurses_getmouse() will return
;FALSE if a mouse event is actually visible in the given
window, otherwise it will return TRUE.
Event options will be delivered in parameter
mevent, which has to be an array, passed
by reference (see example below).
On success an associative array with following keys will be
delivered:
"id" : Id to distinguish multiple
devices
"x" : screen relative x-position in character
cells
"y" : screen relative y-position in character
cells
"z" : currently not supported
"mmask" : Mouse action
例 1ncurses_getmouse() example switch (ncurses_getch){
case NCURSES_KEY_MOUSE:
if (!ncurses_getmouse(&$mevent)){
if ($mevent["mmask"] & NCURSES_MOUSE_BUTTON1_PRESSED){
$mouse_x = $mevent["x"]; // Save mouse position
$mouse_y = $mevent["y"];
}
}
break;
default:
....
} |
|
See also: ncurses_ungetmouse()