PHP マニュアル
前のページ |  | 次のページ

# ncurses_mousemask

(PHP 4 >= 4.2.0, PHP 5)

ncurses_mousemask -- マウスオプションを設定する

## 説明

int ncurses_mousemask ( int newmask, int oldmask)

警告
この関数は、 実験的なステータスにあります。これは、この関数の 動作、関数名、ここで書かれていること全てがPHPの将来のバージョンで予告 なく変更される可能性があることを意味します。注意を喚起するとともに自分 のリスクでこの関数を使用して下さい。

Function ncurses_mousemask() will set mouse events to be reported. By default no mouse events will be reported. The function ncurses_mousemask() will return a mask to indicated which of the in parameter newmask specified mouse events can be reported. On complete failure, it returns 0. In parameter oldmask, which is passed by reference ncurses_mousemask() returns the previous value of mouse event mask. Mouse events are represented bei NCURSES_KEY_MOUSE in the ncurses_wgetch() input stream. To read the event data and pop the event of of queue, call ncurses_getmouse().

As a side effect, setting a zero mousemask in newmask turns off the mouse pointer. Setting a non zero value turns mouse pointer on.

mouse mask options can be set with the following predefined constants:

- NCURSES_BUTTON1_PRESSED

- NCURSES_BUTTON1_RELEASED

- NCURSES_BUTTON1_CLICKED

- NCURSES_BUTTON1_DOUBLE_CLICKED

- NCURSES_BUTTON1_TRIPLE_CLICKED

- NCURSES_BUTTON2_PRESSED

- NCURSES_BUTTON2_RELEASED

- NCURSES_BUTTON2_CLICKED

- NCURSES_BUTTON2_DOUBLE_CLICKED

- NCURSES_BUTTON2_TRIPLE_CLICKED

- NCURSES_BUTTON3_PRESSED

- NCURSES_BUTTON3_RELEASED

- NCURSES_BUTTON3_CLICKED

- NCURSES_BUTTON3_DOUBLE_CLICKED

- NCURSES_BUTTON3_TRIPLE_CLICKED

- NCURSES_BUTTON4_PRESSED

- NCURSES_BUTTON4_RELEASED

- NCURSES_BUTTON4_CLICKED

- NCURSES_BUTTON4_DOUBLE_CLICKED

- NCURSES_BUTTON4_TRIPLE_CLICKED

- NCURSES_BUTTON_SHIFT>

- NCURSES_BUTTON_CTRL

- NCURSES_BUTTON_ALT

- NCURSES_ALL_MOUSE_EVENTS

- NCURSES_REPORT_MOUSE_POSITION

See also: ncurses_getmouse(), ncurses_ungetmouse() ncurese_getch()

例 1. ncurses_mousemask() example

`$newmask = NCURSES_BUTTON1_CLICKED + NCURSES_BUTTON1_RELEASED; $mask = ncurses_mousemask($newmask, &$oldmask); if ($mask & $newmask){ printf ("All specified mouse options will be supported\n"); }`

前のページ | ホーム | 次のページ
ncurses_mouseinterval | 上に戻る | ncurses_move_panel