3 * Author: Len Trigg <trigg@cs.waikato.ac.nz>
7 #include <WINGs/WINGs.h>
34 " -i <str>\tInitial entry contents (default none)\n"
35 " -p <str>\tPrompt message (default none)\n"
36 " -t <str>\tQuery window title (default none)\n"
39 "\t%s pops up a WindowMaker style input panel.\n"
43 ,ProgName
,ProgName
,__DATE__
49 main(int argc
, char **argv
)
51 Display
*dpy
= XOpenDisplay("");
62 WMInitializeApplication("WMQuery", &argc
, argv
);
67 puts("could not open display");
71 while((ch
= getopt(argc
, argv
, "i:hp:t:")) != -1)
87 for(; optind
<argc
; optind
++)
91 scr
= WMCreateSimpleApplicationScreen(dpy
);
93 pixmap
= WMCreatePixmapFromXPMData(scr
, GNUSTEP_XPM
);
95 WMSetApplicationIconPixmap(scr
, pixmap
); WMReleasePixmap(pixmap
);
97 if ((result
= WMRunInputPanel(scr
, NULL
, title
, prompt
, initial
, "OK", "Cancel")) != NULL
)
98 printf("%s\n", result
);