Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online

ncurses getmouse function syntax tag tutorial 2013 Donate at flattr Flattr this





Alert! Connect with 10,000 Chating Online. Join Now

Php ncurses getmouse () function

Write your php code

 
<?php ?>

Php Result


Your code below



(PHP 4 >= 4.2.0, PHP 5)

ncurses_getmouse -- Reads mouse event

Syntax

bool ncurses_getmouse ( array &mevent )

Warning

This function is EXPERIMENTAL. The behaviour of this function, the name of this function, and anything else documented about this function may change without notice in a future release of PHP. Use this function at your own risk.

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

Example 1. ncurses_getmouse() example

<?php
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()

Php ncurses getmouse Function syntax tag

ncurses getmouse php code on this is provided for your study purpose, it will guide you to know how create and design a website using php. use it to practice and train your self online



Php ncurses getmouse syntax tutorial

php tutorial guide and code design are for easy learning and programming. The code practice section provided at the top is for practising of this syntax. Use the code section up to practice your php programming online. Learning php is very easy, all you need is to use the examples on this site and practice them to perfect your skills.


Function index

Variables

Expressions

Operators

Control-Structures

Cookies

Array

Date & Time

Directory function

File

Image

Operators

Form data handling

Mathematics operators

Mail

Php Mysql

Network Functions

Strings

php tutorial guides,functions, classes, code examples and tags for creating simple dynamic site to mysql database driven sites
 
 
Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online