home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / x / xcu16.zip / examples / xwlm / header.h < prev    next >
C/C++ Source or Header  |  1991-10-03  |  2KB  |  57 lines

  1. #include <stdio.h>
  2. #include <X11/Intrinsic.h>
  3. #include <X11/StringDefs.h>
  4. #include <X11/Shell.h>
  5. #include <X11/Xcu/Wlm.h>
  6.  
  7. static Widget wlm_id ;
  8. static void exit_routine () ;
  9. static int x ;
  10.  
  11. main(argc, argv)
  12.     int argc ;
  13.     char **argv ;
  14. {
  15. Arg wlm_arg ;
  16. Widget top = XtInitialize ( NULL, "top", NULL, NULL, &argc, argv ) ;
  17.  
  18. XtSetArg (wlm_arg, XtNfile, argv[1]) ;
  19. wlm_id = XtCreateManagedWidget ( "wlm", xcuWlmWidgetClass, top, &wlm_arg, 1 ) ;
  20.  
  21. XcuWlmAddCallback (
  22.           wlm_id,    /* XcuWlm widget id    */
  23.           XcuWLM_EVENTS,    /* Device argument    */
  24.           "Command",    /* Widget Class        */
  25.           "Exit",    /* Widget Name        */
  26.           "callback",    /* Callback List Name    */
  27.           exit_routine,    /* Function to call    */
  28.           NULL        /* client_data        */
  29.          ) ;
  30.  
  31. /*
  32.  * Copyright 1991 Cornell University
  33.  *
  34.  * Permission to use, copy, modify, and distribute this software and its
  35.  * documentation for any purpose and without fee is hereby granted, provided
  36.  * that the above copyright notice appear in all copies and that both that
  37.  * copyright notice and this permission notice appear in supporting
  38.  * documentation, and that the name of Cornell U. not be used in advertising
  39.  * or publicity pertaining to distribution of the software without specific,
  40.  * written prior permission.  Cornell U. makes no representations about the
  41.  * suitability of this software for any purpose.  It is provided "as is"
  42.  * without express or implied warranty.
  43.  *
  44.  * CORNELL UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  45.  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  46.  * EVENT SHALL CORNELL UNIVERSITY BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  47.  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  48.  * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  49.  * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  50.  * PERFORMANCE OF THIS SOFTWARE.
  51.  *
  52.  * Author:  Gene W. Dykes, Program of Computer Graphics
  53.  *          580 Theory Center, Cornell University, Ithaca, NY 14853
  54.  *          (607) 255-6713   gwd@graphics.cornell.edu
  55.  */
  56.  
  57.