3 * Author: Len Trigg <trigg@cs.waikato.ac.nz>
32 " -i <str>\tInitial entry contents (default none)\n"
33 " -p <str>\tPrompt message (default none)\n"
34 " -t <str>\tQuery window title (default none)\n"
37 "\t%s pops up a WindowMaker style input panel.\n"
41 ,ProgName
,ProgName
,__DATE__
46 int main(int argc
, char **argv
)
48 Display
*dpy
= XOpenDisplay("");
59 WMInitializeApplication("WMQuery", &argc
, argv
);
64 puts("could not open display");
68 while((ch
= getopt(argc
, argv
, "i:hp:t:")) != -1)
84 for(; optind
<argc
; optind
++)
88 scr
= WMCreateSimpleApplicationScreen(dpy
);
90 pixmap
= WMCreatePixmapFromXPMData(scr
, GNUSTEP_XPM
);
92 WMSetApplicationIconImage(scr
, pixmap
); WMReleasePixmap(pixmap
);
94 if ((result
= WMRunInputPanel(scr
, NULL
, title
, prompt
, initial
, "OK", "Cancel")) != NULL
)
95 printf("%s\n", result
);