[comp.windows.x] Xr11 Example Programs

julie@hpcvlo.HP.COM (Julie Skeen) (12/29/87)

 
   Due to an unfortunate oversight, the examples at the beginning of the Xr11
   manual, distributed on zap.mit.edu, will not work.  We will correct this
   problem as quickly as we can.  Until we can get our manual writers to create
   some patch files for the manual sources, we will circumvent the problem by
   posting the correct example sources as responses to this note; these will
   appear over the course of this week.

   We apologize for any inconvenience this may have caused!

julie@hpcvlo.HP.COM (Julie Skeen) (12/29/87)

/*
 *   Hello World using X
 */
#include <X11/Xlib.h>

main()
{
    Display *display;
    int screen;
    GC gc;
    Window windowId;
    Font f;
    unsigned long border, background;
    XSetWindowAttributes wAttribs;



                                /*
1.  Open the display and default screen specified by the environment
    variable DISPLAY.
                                */

    if ((display=XOpenDisplay (0)) == 0)
        {
        printf ("cannot create a window on %s\n", getenv ("DISPLAY"));
        exit (1);
        }

    screen = DefaultScreen (display);
    border = BlackPixel (display, screen);
    background = WhitePixel (display, screen);



                                /*
2.  Create a window and put it on the display.
                                */

    windowId = XCreateSimpleWindow (display, RootWindow(display, screen),
                                    50, 50, 400, 200, 3, border, background);

    wAttribs.override_redirect = 1;
    XChangeWindowAttributes (display, windowId, CWOverrideRedirect, &wAttribs);

    XMapWindow (display, windowId);



                                /*
3.  Create a Graphics Context.
                                */

    gc = XCreateGC (display, windowId, 0, 0);



                                /*
4.  Send "Hello World" to the window.
                                */

    XDrawString (display, windowId, gc, 100, 80, "Hello World", 11);



                                /*
5.  Send all of those instructions to the X window server to process.
                                */

    XFlush (display);



                                /*
6.  Sleep, Close Display, and exit.
                                */
    sleep (10);
    XCloseDisplay (display);

}

julie@hpcvlo.HP.COM (Julie Skeen) (12/29/87)

/*
 *   add a Title Bar to Hello World 
 */
#include <X11/Xlib.h>
#include <Xr11/Xrlib.h>

/*
 * fill a structure to define a Title Bar
 */
xrTitleBarInfo titleBarInfo =
{
    0,                       /* windowId */
    {0,0,0,0},               /* editor rectangle */
    XrVISIBLE | XrSENSITIVE, /* editor state */
    -1, -1,                  /* editor colors - use defaults */
    NULL,                    /* editor font - use defaults */
    "Hello World",           /* Title name */
    NULL,                    /* gadget1 - unused */
    NULL,                    /* gadget2 - unused */
};

xrWindowData windowData;


main()
{
    Display *display;
    int screen;
    Window windowId;
    XSetWindowAttributes wAttribs;



/* Open the display specified by the environment variable DISPLAY */

    if ((display=XOpenDisplay (0)) == NULL)
        {
        printf ("Cannot open display: %s\n", getenv ("DISPLAY"));
        exit (1);
        }

    screen = DefaultScreen (display);



                                /*
1.  Initialize Xrlib
                                */

    if (XrInit (display, screen, NULL) == FALSE)
        {
        printf ("Could not initialize Xrlib\n");
        exit (1);
        }



/* Create a window and put it on the display */

    windowId = XCreateSimpleWindow (display, RootWindow(display, screen),
                                    50, 50, 400, 200, 3, 
                                    BlackPixel(display, screen),
                                    WhitePixel(display, screen));

    wAttribs.override_redirect = TRUE;
    XChangeWindowAttributes (display, windowId, CWOverrideRedirect, &wAttribs);

    XMapWindow (display, windowId);



                                /*
2.  Register this window with Xrlib functionality
                                */

    XrSetRect (&windowData.windowRect, 50, 50, 400, 200);
    windowData.foreTile = BlackPixmap;
    windowData.backTile = WhitePixmap;

    XrInput (windowId, MSG_ADDWINDOW, &windowData);



                                /*
3.  Draw the Title Bar
                                */

    titleBarInfo.editorWindowId = windowId;
    XrTitleBar (NULL, MSG_NEW, &titleBarInfo);



/* write the hello world string into the window */

    XSetForeground (display, xrEditorGC1, BlackPixel(display, screen));
    XDrawString (display, windowId, xrEditorGC1, 100, 80, "Hello World", 11);



/* Send all of those instructions to the X window server to process */

    XFlush (display);



/* Sleep, close display, and exit */
    sleep (5);
    XCloseDisplay (display);

}

julie@hpcvlo.HP.COM (Julie Skeen) (12/29/87)

/*
 * add a Message Box to Hello World
 */
#include <X11/Xlib.h>
#include <Xr11/Xrlib.h>
#include <time.h>

/*
 * fill a structure to define a Title Bar
 */
xrTitleBarInfo titleBarInfo =
{
   0,                       /* windowId */
   {0,0,0,0},               /* editor rectangle */
   XrVISIBLE | XrSENSITIVE, /* editor state */
   -1, -1,                  /* editor colors; use defaults */
   NULL,                    /* editor font; use defaults */
   "Hello World",           /* Title name */
   NULL,                    /* gadget1; unused */
   NULL                     /* gadget2; unused */
};

xrWindowData windowData;
xrEditor   * t_bar;
xrEvent      messageEvent;
xrMsgBoxInfo msgInfo;
INT8       * myButtons[] = {"Ready", "Not Ready"};


main()
{
   Display * display;
   int       screen;
   Window    windowId;
   XSetWindowAttributes wAttrs;

   /* Open the display specified by the environment variable DISPLAY */
     
      if ((display = XOpenDisplay(0)) == NULL)
      {
         printf ("Cannot open display: %s\n", getenv("DISPLAY"));
         exit (1);
      }

      screen = DefaultScreen(display);


   /* Initialize Xrlib */

      if (XrInit (display, screen, NULL) == FALSE)
      {
         printf ("Could not initialize Xrlib\n");
         exit (1);
      }


   /* Create a window and put it on the display */

      windowId = XCreateSimpleWindow (display, RootWindow(display, screen),
                                      50, 50, 400, 200, 3,
                                      BlackPixel(display, screen),
                                      WhitePixel(display, screen));
      wAttrs.override_redirect = TRUE;
      XChangeWindowAttributes (display, windowId, CWOverrideRedirect, &wAttrs);
      XMapWindow (display, windowId);


   /* Associate this window with Xrlib functionality */

      XrSetRect (&windowData.windowRect, 50, 50, 400, 200);
      windowData.foreTile = BlackPixmap;
      windowData.backTile = WhitePixmap;
      XrInput (windowId, MSG_ADDWINDOW, &windowData);


   /* Draw the Title Bar */

      titleBarInfo.editorWindowId = windowId;
      t_bar = XrTitleBar (NULL, MSG_NEW, &titleBarInfo);



                                                        /*
   1. Select the type of input for the window.
                                                         */

      XSelectInput (display, windowId, ButtonPressMask | ButtonReleaseMask |
                                       KeyPressMask);


                                                        /*
   2. Put up a message box.
                                                         */

      msgInfo.messageOrigin.x = 50;
      msgInfo.messageOrigin.y = 50;
      msgInfo.relativeTo = windowId;
      msgInfo.messageText = "Are you ready?";
      msgInfo.messageButtons = myButtons;
      msgInfo.numButtons = 2;

      /*
       * Put up a message box; upon return, examine value1:
       *  value1 == 1, iff the user selected the 'not ready' button.
       *  value1 == 0, iff the user hit a key or selected the 'ready' button.
       *  value1 == -1, if the message box times out.
       */

      do
      {
         XrMessageBox (&msgInfo, MSG_EDIT, &messageEvent);
      }  while (messageEvent.value1 != 0);


                                                        /*
   3. Redraw the Title Bar.
                                                         */

      XrTitleBar (t_bar, MSG_REDRAW, XrREDRAW_ALL);

      /* Write hello world message to the window */

      XSetForeground (display, xrEditorGC1, BlackPixel(display, screen));
      XDrawString (display, windowId, xrEditorGC1, 100, 80, "Hello World", 11);

      /* Send all those instructions to the X window server to process */

      XFlush (display);

      /* Sleep, close the display, and then exit */

      sleep (5);
      XCloseDisplay (display);

}

julie@hpcvlo.HP.COM (Julie Skeen) (12/29/87)

# This is a shell archive.  Remove anything before this line,
# then unpack it by saving it in a file and typing "sh file".
#
# Wrapped by fred at hpcvxft on Mon Dec 28 14:11:12 1987
#
# This archive contains:
#	sample4.c	HelloWorld.h	frown.h		smile.h		
#

echo x - sample4.c
cat >sample4.c <<'@EOF'
#include <X11/Xlib.h>
#include <Xr11/Xrlib.h>
#include "HelloWorld.h"
#include "smile.h"
#include "frown.h"

GC        gc1, gc2;
Display * displayPtr;
int       screen;


main (argc, argv)
int argc;
char * argv[];
{
  xrWindowData windowData;
  XEvent  xinput;
  xrEvent * input;
  extern xrPFI DrawWindow();
  Pixmap pixmap;
  XImage * image;
  XSetWindowAttributes wAttr;

   input = (xrEvent *) & xinput;

                                          /* 
   1. Open the display
                                          */

      if ((displayPtr = XOpenDisplay (argv[1])) == NULL)
      {
        printf ("Could not open the display\n");
        exit();
      }
      screen = DefaultScreen(displayPtr);


                                          /* 
   2. Initialize Xrlib 
                                          */

      if (XrInit (displayPtr, screen, NULL) == FALSE)
      {
        printf ("Could not initialize Xrlib\n");
        exit();
      }


                                          /* 
   3. Create and map the window 
                                          */

      wAttr.override_redirect = TRUE;
      wAttr.border_pixmap = xrWindowForeground;
      wAttr.background_pixmap = xrWindowBackground;
      if ((windowId = XCreateWindow (displayPtr, 
           RootWindow(displayPtr, screen), 
           150, 150, 375, 120, xrBorderWidth, DefaultDepth(displayPtr, screen),
           InputOutput, DefaultVisual(displayPtr, screen),
           CWBorderPixmap | CWBackPixmap | CWOverrideRedirect, &wAttr)) == 0)
      {  
         printf("The window create failed\n");
         exit();
      }


                                          /* 
   4. Make the window appear on the display 
                                          */

      XMapRaised (displayPtr, windowId);


                                          /* 
   5. Set the window's input 
                                          */

      XrSetRect (&windowData.windowRect, 150, 150 , 375, 120);
      windowData.foreTile = xrWindowForeground;
      windowData.backTile = xrWindowBackground;

      XrInput (windowId,MSG_ADDWINDOW, &windowData);


                                          /*
   6. Select the input types
                                          */

     XSelectInput (displayPtr, windowId, ButtonPressMask | ButtonReleaseMask | 
                   KeyPressMask | ExposureMask);


                                          /* 
   7. Set up the graphics context to be used during drawing 
                                          */

      gc1 = XCreateGC (displayPtr, RootWindow(displayPtr, screen), 0, 0);
      _XrSetUpGC (gc1);
      XSetForeground (displayPtr, gc1, xrBackgroundColor);
      XSetBackground (displayPtr, gc1, xrForegroundColor);
      gc2 = XCreateGC (displayPtr, RootWindow(displayPtr, screen), 0, 0);
      _XrSetUpGC (gc2);
      XSetForeground (displayPtr, gc2, xrForegroundColor);
      XSetBackground (displayPtr, gc2, xrBackgroundColor);
      XSetFont (displayPtr, gc2, xrBaseFontInfo->fid);
      XSetGraphicsExposures (displayPtr, gc2, 0);


                                          /*
   8. Draw the window
                                          */

      DrawWindow (windowId, MSG_NEW, NULL);


                                          /*
   9. Define the cursor for the window
                                          */

      XDefineCursor (displayPtr, windowId, xrDefaultCursor);


                                          /* 
   10. Set up and create the menu 
                                          */

      menu = XrMenu (NULL, MSG_NEW, &menuInfo);
      XrMenu (menu, MSG_ACTIVATEMENU, windowId);


                                          /* 
   11. Set up rasters from smile.h and frown.h
                                          */

      image = (XImage *)XCreateImage (displayPtr, 
              DefaultVisual(displayPtr, screen),
              1, XYBitmap, 0, smile.raster, smile.width, smile.height, 
              BitmapPad(displayPtr), 0);
      image->bitmap_unit = 16;
      image->bitmap_pad = 16;
      image->byte_order = LSBFirst;
      image->bitmap_bit_order = LSBFirst;
      pixmap = XCreatePixmap (displayPtr, RootWindow(displayPtr, screen), 
                              smile.width, smile.height,
                              DefaultDepth(displayPtr, screen));
      XPutImage(displayPtr, pixmap, gc1, image, 0,0,0,0, smile.width, 
                smile.height);
      niceMsgInfo.rasterId = pixmap;
      niceMsgInfo.rasterWidth = smile.width;
      niceMsgInfo.rasterHeight = smile.height;


      image = (XImage *)XCreateImage (displayPtr, 
              DefaultVisual(displayPtr, screen),
              1, XYBitmap, 0, frown.raster, frown.width, frown.height, 
              BitmapPad(displayPtr), 0);
      image->bitmap_unit = 16;
      image->bitmap_pad = 16;
      image->byte_order = LSBFirst;
      image->bitmap_bit_order = LSBFirst;
      pixmap = XCreatePixmap (displayPtr, RootWindow(displayPtr, screen),
                              frown.width, frown.height,
                              DefaultDepth(displayPtr, screen));
      XPutImage(displayPtr, pixmap, gc1, image, 0,0,0,0,frown.width, 
                frown.height);
      meanMsgInfo.rasterId = pixmap;
      meanMsgInfo.rasterWidth = frown.width;
      meanMsgInfo.rasterHeight = frown.height;


                                          /* 
   12. input loop 
                                          */

      while (1)
      {
        if (XrInput (0, MSG_BLKHOTREAD, input) != FALSE)
        {
          if (input->type == XrXRAY && input->inputType  == XrMENU)
          {
	    switch (input->value3)
	    {
	      case 0:      /* Show the nice message box */
	        XrMessageBox (&niceMsgInfo, MSG_EDIT, input);
	      break;
    
	      case 1:     /* Show the mean message box */
	        XrMessageBox (&meanMsgInfo, MSG_EDIT, input);
	      break;


	      case 3:       /* Exit */
	        exit();
	      break;
	    }
	  }
        }
      }
}



/* This function handles the initial drawing of the window, which occurs if the message is set to MSG_DRAW.  It also handles the redrawing of the window when an exposure event occurs.  Message will contain MSG_REDRAW. */

xrPFI
DrawWindow (window, message, data)
Window window;
INT32 message;
XEvent * data;

{
  xrWindowEvent exposeEvent[1];
  xrWindowFunctInfo exposeFunct;
  XEvent    xnullEvent;
  xrEvent * nullEvent;


/* Set up switch to handle the two possible messages */

  switch (message)
  {
    case MSG_NEW:
     
     /* create the titlebar editor */

    titleBarInfo.editorWindowId = windowId;
    titleBar = XrTitleBar (NULL, MSG_NEW, &titleBarInfo);

    /* 
     * Set up the structure necessary to have this function called 
     * automatically upon an exposure event. 
     */

    exposeEvent[0].type = Expose;
    exposeEvent[0].code = 0;
    exposeEvent[0].modifier = 0;

    exposeFunct.processFlag = TRUE;
    exposeFunct.funct = (xrPFI) DrawWindow;
    exposeFunct.instance = (INT32) windowId;
    exposeFunct.message = MSG_REDRAW;
    exposeFunct.eventCount = 1;
    exposeFunct.eventList = &exposeEvent[0];

    XrInput (windowId, MSG_ADDWINDOWFUNCT, &exposeFunct);

    case MSG_REDRAW:

    /* write the text into the window */

      XDrawImageString (displayPtr, window, gc2, 20, 50, 
                "Press the Menu Button to display the menu.", 42);
      XDrawImageString (displayPtr, window, gc2, 70, 
                50 + xrBaseFontInfo->ascent + xrBaseFontInfo->descent + 5, 
                "(Default: Right Button Down)", 28);

      /* Redraw the titlebar */

      XrTitleBar (titleBar, MSG_REDRAW, XrREDRAW_ALL);

      /* Push a null event to be returned to the application */

      nullEvent = (xrEvent *) &xnullEvent;
      nullEvent->type = XrXRAY;
      nullEvent->display = displayPtr;
      nullEvent->inputType = NULL;
      XrInput (0, MSG_PUSHEVENT, nullEvent);
     break;
    }
}
@EOF

chmod 666 sample4.c

echo x - HelloWorld.h
cat >HelloWorld.h <<'@EOF'
Window windowId;	   /*  The window identifier for the main window  */


/*
 *  The declarations for the title bar and the info structure 
 *  needed to create the title bar.
 */

xrEditor * titleBar;
xrTitleBarInfo titleBarInfo =
{
   0,				/* windowId                      */
   {0, 0, 0, 0},		/* editor rectangle              */
   XrVISIBLE | XrSENSITIVE,	/* editor state                  */
   -1, -1,			/* editor colors - use defaults  */
   NULL,			/* editor font - use defaults    */
   "Hello World",		/* title name	                 */
   NULL,			/* gadget 1 - unused             */
   NULL				/* gadget 2 - unused             */
};


/*
 *  The declarations for the menu instance, items contained 
 *  in the menu, and the menu info structure.
 */

xrMenu * menu;	
INT8 * menuItems [9] =
{
   "\\KEHHello Message",	/*  item with a keyboad equiv of ^N  */
   "\\KEGGoodbye Message",	/*  item with a keyboad equiv of ^M  */
   "\\=",			/*  double line seperator item       */
   "Quit"
};

xrMenuInfo menuInfo = 
{
   "Hello World",		/*  Menu title bar string        */
   menuItems,			/*  item array declared above    */
   4,				/*  item count                   */
   NULL,			/*  menu context - unused        */
   0				/*  id returned with menu input  */
};


/*
 *  The declarations for the two message box info structures.
 */

INT8 * niceButton[1] = { "Oky Doky" };

xrMsgBoxInfo niceMsgInfo =
{
   { 240, 245 },			/*  message box origin  */
   NULL,			/*  relative to the RootWindow  */
   NULL,			/*  use default panel context   */
   0,				/*  raster height		*/
   0,				/*  raster width		*/
   0,				/*  raster id			*/
   "Hello World!",		/*  Text message		*/
   niceButton,			/*  button strings		*/
   1				/*  button count		*/
};



INT8 * meanButton[1] = { "Adios" };

xrMsgBoxInfo meanMsgInfo =
{
   { 240, 245 },			/*  message box origin  */
   NULL,			/*  relative to the RootWindow  */
   NULL,			/*  use default panel context   */
   0,				/*  raster height		*/
   0,				/*  raster width		*/
   0,				/*  raster id			*/
   "Goodbye World!",		/*  Text message		*/
   meanButton,			/*  button strings		*/
   1				/*  button count		*/
};
@EOF

chmod 644 HelloWorld.h

echo x - frown.h
cat >frown.h <<'@EOF'
UINT16 frownRaster[] =
{
   0xffff, 0x01ff, 0xfe00, 0xffff, 
   0xffff, 0x003f, 0xe000, 0xffff, 
   0xffff, 0xfc0f, 0xc1ff, 0xffff, 
   0xffff, 0xff83, 0x0fff, 0xffff, 
   0xffff, 0xfff0, 0x3fff, 0xfffc, 
   0x3fff, 0xfffc, 0xffff, 0xfff8, 
   0x1fff, 0xffff, 0xffff, 0xfff1, 
   0xcfff, 0xffff, 0xffff, 0xfff3, 
   0xe7ff, 0xffff, 0xffff, 0xffe7, 
   0xf3ff, 0xffff, 0xffff, 0xffcf, 
   0xf9ff, 0xffff, 0xffff, 0xff8f, 
   0xfcff, 0xffff, 0xffff, 0xff9f, 
   0xfc7f, 0xfe1f, 0xf87f, 0xff3f, 
   0xfe7f, 0xf9e7, 0xe79f, 0xff3f, 
   0xff3f, 0xf7fb, 0xdfef, 0xfe7f, 
   0xff3f, 0xeffd, 0xbff7, 0xfe7f, 
   0xff3f, 0xeffd, 0xbff7, 0xfcff, 
   0xff9f, 0xdffe, 0x7ffb, 0xfcff, 
   0xff9f, 0xdffe, 0x7ffb, 0xf9ff, 
   0xff9f, 0xc1fe, 0x07fb, 0xf9ff, 
   0xffcf, 0xc0fe, 0x03fb, 0xf9ff, 
   0xffcf, 0xe07d, 0x81f7, 0xf3ff, 
   0xffcf, 0xe03d, 0x80f7, 0xf3ff, 
   0xffcf, 0xf03b, 0xc0ef, 0xf3ff, 
   0xffcf, 0xf827, 0xe09f, 0xf3ff, 
   0xffcf, 0xfe1f, 0xf87f, 0xf3ff, 
   0xffcf, 0xffff, 0xffff, 0xf3ff, 
   0xffcf, 0xffff, 0xffff, 0xf3ff, 
   0xffcf, 0xffff, 0xffff, 0xf3ff, 
   0xffcf, 0xffff, 0xffff, 0xf3ff, 
   0xffcf, 0xffff, 0xffff, 0xf3ff, 
   0xffcf, 0xffff, 0xffff, 0xf3ff, 
   0xffcf, 0xffff, 0xffff, 0xf3ff, 
   0xffcf, 0xffff, 0xffff, 0xf3ff, 
   0xffcf, 0x07ff, 0xff00, 0xf3ff, 
   0xffcf, 0xf8ff, 0xf8ff, 0xfbff, 
   0xffdf, 0xff1f, 0xe7ff, 0xfbff, 
   0xff9f, 0xffe7, 0x9fff, 0xf9ff, 
   0xff9f, 0xfffb, 0x7fff, 0xf9ff, 
   0xff3f, 0xfffc, 0xffff, 0xfcfe, 
   0x7f3f, 0xffff, 0xffff, 0xfcfd, 
   0xbf3f, 0xffff, 0xffff, 0xfefb, 
   0xde7f, 0xffff, 0xffff, 0xfe77, 
   0xfe7f, 0xffff, 0xffff, 0xff3f, 
   0xfcff, 0xffff, 0xffff, 0xff3f, 
   0xf8ff, 0xffff, 0xffff, 0xff9f, 
   0xf9ff, 0xffff, 0xffff, 0xffcf, 
   0xf3ff, 0xffff, 0xffff, 0xffc7, 
   0xe7ff, 0xffff, 0xffff, 0xffe7, 
   0xcfff, 0xffff, 0xffff, 0xfff3, 
   0x8fff, 0xffff, 0xffff, 0xfff9, 
   0x1fff, 0xffff, 0xffff, 0xfffc, 
   0x3fff, 0xfffe, 0x3fff, 0xfffe, 
   0x7fff, 0xfffc, 0x1fff, 0xffff, 
   0xffff, 0xfff0, 0xc3ff, 0xffff, 
   0xffff, 0xffe1, 0xe0ff, 0xffff, 
   0xffff, 0xff03, 0xf83f, 0xffff, 
   0xffff, 0x000f, 0xfe00, 0xffff, 
   0xffff, 0x00ff, 0xffc0, 0xffff, 
   0xffff, 0xffff, 0xffff, 0xffff, 
   0xffff, 0xffff, 0xffff, 0xffff, 
   0xffff, 0xffff, 0xffff, 0xffff, 
   0xffff, 0xffff, 0xffff, 0xffff, 
   0xffff, 0xffff, 0xffff, 0xffff, 
   
};


xrPixmap frown = 
{
   64,			/*  raster width       */
   64,			/*  raster height      */
   1,			/*  raster depth       */
   frownRaster		/*  ptr to the raster  */
};

@EOF

chmod 644 frown.h

echo x - smile.h
cat >smile.h <<'@EOF'
UINT16 smileRaster[] =
{
   0xffff, 0x01ff, 0xfe00, 0xffff, 
   0xffff, 0x003f, 0xe000, 0xffff, 
   0xffff, 0xfc0f, 0xc1ff, 0xffff, 
   0xffff, 0xff83, 0x0fff, 0xffff, 
   0xffff, 0xfff0, 0x3fff, 0xfffc, 
   0x3fff, 0xfffc, 0xffff, 0xfff8, 
   0x1fff, 0xffff, 0xffff, 0xfff1, 
   0xcfff, 0xffff, 0xffff, 0xfff3, 
   0xe7ff, 0xffff, 0xffff, 0xffe7, 
   0xf3ff, 0xffff, 0xffff, 0xffcf, 
   0xf9ff, 0xffff, 0xffff, 0xff8f, 
   0xfcff, 0xffff, 0xffff, 0xff9f, 
   0xfc7f, 0xfe1f, 0xf87f, 0xff3f, 
   0xfe7f, 0xf9e7, 0xe79f, 0xff3f, 
   0xff3f, 0xf7fb, 0xdfef, 0xfe7f, 
   0xff3f, 0xeffd, 0xbff7, 0xfe7f, 
   0xff3f, 0xeffd, 0xbff7, 0xfcff, 
   0xff9f, 0xdffe, 0x7ffb, 0xfcff, 
   0xff9f, 0xdffe, 0x7ffb, 0xf9ff, 
   0xff9f, 0xc1fe, 0x07fb, 0xf9ff, 
   0xffcf, 0xc0fe, 0x03fb, 0xf9ff, 
   0xffcf, 0xe07d, 0x81f7, 0xf3ff, 
   0xffcf, 0xe03d, 0x80f7, 0xf3ff, 
   0xffcf, 0xf03b, 0xc0ef, 0xf3ff, 
   0xffcf, 0xf827, 0xe09f, 0xf3ff, 
   0xffcf, 0xfe1f, 0xf87f, 0xf3ff, 
   0xffcf, 0xffff, 0xffff, 0xf3ff, 
   0xffcf, 0xffff, 0xffff, 0xf3ff, 
   0xffcf, 0xffff, 0xffff, 0xf3ff, 
   0xffcf, 0xffff, 0xffff, 0xf3ff, 
   0xffcf, 0xffff, 0xffff, 0xf3ff, 
   0xefcf, 0xffff, 0xffff, 0xf3f7, 
   0xefcf, 0xffff, 0xffff, 0xf3f7, 
   0xcfcf, 0xffff, 0xffff, 0xf3f3, 
   0x9fcf, 0xffff, 0xffff, 0xf3f9, 
   0x7fcf, 0xffff, 0xffff, 0xfbfe, 
   0x7fdf, 0xffff, 0x7fff, 0xfbfe, 
   0xff9f, 0xfffc, 0x9fff, 0xf9ff, 
   0xff9f, 0xfffb, 0xcfff, 0xf9ff, 
   0xff3f, 0xffe7, 0xf3ff, 0xfcff, 
   0xff3f, 0xff1f, 0xf87f, 0xfcff, 
   0xff3f, 0x00ff, 0xff00, 0xfeff, 
   0xfe7f, 0xffff, 0xffff, 0xfe7f, 
   0xfe7f, 0xffff, 0xffff, 0xff3f, 
   0xfcff, 0xffff, 0xffff, 0xff3f, 
   0xf8ff, 0xffff, 0xffff, 0xff9f, 
   0xf9ff, 0xffff, 0xffff, 0xffcf, 
   0xf3ff, 0xffff, 0xffff, 0xffc7, 
   0xe7ff, 0xffff, 0xffff, 0xffe7, 
   0xcfff, 0xffff, 0xffff, 0xfff3, 
   0x8fff, 0xffff, 0xffff, 0xfff9, 
   0x1fff, 0xffff, 0xffff, 0xfffc, 
   0x3fff, 0xfffe, 0x3fff, 0xfffe, 
   0x7fff, 0xfffc, 0x1fff, 0xffff, 
   0xffff, 0xfff0, 0xc3ff, 0xffff, 
   0xffff, 0xffe1, 0xe0ff, 0xffff, 
   0xffff, 0xff03, 0xf83f, 0xffff, 
   0xffff, 0x000f, 0xfe00, 0xffff, 
   0xffff, 0x00ff, 0xffc0, 0xffff, 
   0xffff, 0xffff, 0xffff, 0xffff, 
   0xffff, 0xffff, 0xffff, 0xffff, 
   0xffff, 0xffff, 0xffff, 0xffff, 
   0xffff, 0xffff, 0xffff, 0xffff, 
   0xffff, 0xffff, 0xffff, 0xffff, 
   
};


xrPixmap smile = 
{
   64,			/*  raster width       */
   64,			/*  raster height      */
   1,			/*  raster depth       */
   smileRaster		/*  ptr to the raster  */
};

@EOF

chmod 644 smile.h

exit 0