3 * Author: Len Trigg <trigg@cs.waikato.ac.nz>
6 #include <WINGs/WINGs.h>
28 " -i <str>\tInitial entry contents (default none)\n"
29 " -p <str>\tPrompt message (default none)\n"
30 " -t <str>\tQuery window title (default none)\n"
33 "\t%s pops up a WindowMaker style input panel.\n"
34 "\n" "version:\n" "\t%s\n", ProgName
, ProgName
, __DATE__
);
38 int main(int argc
, char **argv
)
40 Display
*dpy
= XOpenDisplay("");
51 WMInitializeApplication("WMQuery", &argc
, argv
);
56 puts("could not open display");
60 while ((ch
= getopt(argc
, argv
, "i:hp:t:")) != -1)
75 for (; optind
< argc
; optind
++)
78 scr
= WMCreateSimpleApplicationScreen(dpy
);
80 pixmap
= WMCreatePixmapFromXPMData(scr
, GNUSTEP_XPM
);
82 WMSetApplicationIconPixmap(scr
, pixmap
);
83 WMReleasePixmap(pixmap
);
85 if ((result
= WMRunInputPanel(scr
, NULL
, title
, prompt
, initial
, "OK", "Cancel")) != NULL
)
86 printf("%s\n", result
);