頭檔案
#include <curses.h>
函式原型
void getparyx(WINDOW *win, int y, int x);
說明
The getparyx() macro, if the specified window is a subwindow, stores in y and x the coordinates of the window's origin relative to its parent window. otherwise, -1 is stored in y and x. 函式沒有返回值,也沒有出錯的信息。這個函式是一個宏,並且在參數y和x之前不能加上地址操作符 `&' 。
範例
#include<curses.h>
#include<stdlib.h>
#include<stdio.h>
int main(){
int pary = 0, parx = 0;
initscr();
getparyx(stdscr, pary, parx);
endwin();
printf("pary = %d\t,parx = %d\n", pary, parx);
return 0;
}