PHP: ncurses_mousemask - Manual

downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

ncurses_move_panel ncurses_mouseinterval

Last updated: Sat, 27 Jan 2007

view this page in

# ncurses_mousemask

(PHP 4 >= 4.2.0, PHP 5)

ncurses_mousemask -- Sets mouse options

## Описание

int ncurses_mousemask ( int newmask, int &oldmask )

Внимание
Эта функция является ЭКСПЕРИМЕНТАЛЬНОЙ. Поведение этой функции, ее имя и относящаяся к ней документация могут измениться в последующих версиях PHP без уведомления. Используйте эту функцию на свой страх и риск.

Sets mouse events to be reported. By default no mouse events will be reported.

Mouse events are represented by NCURSES_KEY_MOUSE in the ncurses_wgetch() input stream. To read the event data and pop the event of queue, call ncurses_getmouse().

## Список параметров

`newmask`

  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

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

`oldmask`

  This will be set to the previous value of the mouse event mask.

## Возвращаемые значения

Returns a mask to indicated which of the in parameter `newmask` specified mouse events can be reported. On complete failure, it returns 0.

## Примеры

Пример 1. ncurses_mousemask() example

`<?php
$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_getmouse()
ncurses_ungetmouse()
ncurese_getch()

add a note User Contributed Notes
ncurses_mousemask
There are no user contributed notes for this page.
ncurses_move_panel ncurses_mouseinterval

Last updated: Sat, 27 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 10:36:09 2007 PST