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