Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: ncurses_wgetch - Manual
[go: Go Back, main page]

PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<ncurses_werasencurses_whline" width="11" height="7"/>
view the version of this page
Last updated: Tue, 21 Dec 2004

ncurses_wgetch

(PHP 4 >= 4.2.0, PHP 5)

ncurses_wgetch --  Reads a character from keyboard (window)

Description

int ncurses_wgetch ( resource window)

警告

この関数は、 現在のところ詳細な情報はありません。引数のリストのみが 記述されています。



add a note add a note User Contributed Notes
ncurses_wgetch
gf3 dot bm3 at gmail dot com
09-Oct-2004 08:41
Heres a function to get a string from a specific window and return it on ENTER.

// Dynamic String Input (converts INT ASCII to CHAR)
function ncurses_wgetstr($win){
   $strlen = 1;
   for ($sx=0;$sx<$strlen;$sx++){
       $strlen++;
       $ch = ncurses_wgetch($win);
       if ($ch == 13){
           return $str;
           break 2;
       }
       $str .= chr($ch);
   }
}

Example:

$ncurse = ncurses_init();
$fullscreen = ncurses_newwin (0,0,  0,0);
ncurses_border(0,0,  0,0,  0,0,  0,0);
ncurses_refresh();

while (1){
   $keyPressed = ncurses_wgetstr($fullscreen);
   ncurses_wrefresh($fullscreen);
}

<ncurses_werasencurses_whline" width="11" height="7"/>
 Last updated: Tue, 21 Dec 2004
show source | credits | sitemap | contact | advertising | mirror sites 
Copyright © 2001-2005 The PHP Group
All rights reserved.
This mirror generously provided by: HappySize, Inc.
Last updated: Thu Jan 13 06:11:42 2005 JST