1: XmCreateMainWindow
2:
3: #include <Xm/Xm.h>
4: #include <X11/bitmaps/mailfull>
5:
6: main (int argc, char *argv[])
7: {
8: Widget toplevel;
9: XtAppContext app;
10: Pixmap bitmap;
11:
12: XtSetLanguageProc (NULL, NULL, NULL);
13:
14: /* size is irrelevant -- toplevel is iconified */
15: /* it just can't be 0, or Xt complains */
16: toplevel = XtVaOpenApplication (&app, "Demos", NULL, 0, &argc, argv, NULL,
17: sessionShellWidgetClass,
18: XmNwidth, 100,
19: XmNheight, 100,
20: XmNiconic, True,
21: NULL);
22: bitmap = XCreatePixmapFromBitmapData (XtDisplay (toplevel)
23: RootWindowOfScreen (XtScreen (toplevel)),
24: (char *) mailfull_bits,
25: mailfull_width
26: mailfull_height,
27: 1, 0, 1);
28: XtVaSetValues (toplevel, XmNiconPixmap, bitmap, NULL);
29: XtRealizeWidget (toplevel);
30: XtAppMainLoop (app);
31: }
32:
CVSweb interface <joel.bertrand@systella.fr>