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

  1. /*
  2.  * Copyright 1991 Cornell University
  3.  *
  4.  * Permission to use, copy, modify, and distribute this software and its
  5.  * documentation for any purpose and without fee is hereby granted, provided
  6.  * that the above copyright notice appear in all copies and that both that
  7.  * copyright notice and this permission notice appear in supporting
  8.  * documentation, and that the name of Cornell U. not be used in advertising
  9.  * or publicity pertaining to distribution of the software without specific,
  10.  * written prior permission.  Cornell U. makes no representations about the
  11.  * suitability of this software for any purpose.  It is provided "as is"
  12.  * without express or implied warranty.
  13.  *
  14.  * CORNELL UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  15.  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  16.  * EVENT SHALL CORNELL UNIVERSITY BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  17.  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  18.  * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  19.  * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  20.  * PERFORMANCE OF THIS SOFTWARE.
  21.  *
  22.  * Author:  Gene W. Dykes, Program of Computer Graphics
  23.  *          580 Theory Center, Cornell University, Ithaca, NY 14853
  24.  *          (607) 255-6713   gwd@graphics.cornell.edu
  25.  */
  26.  
  27.  
  28. #include <stdio.h>
  29. #include <X11/Intrinsic.h>
  30. #include <X11/Xaw/Cardinals.h>
  31. #include <X11/StringDefs.h>
  32. #include <X11/Shell.h>
  33. #include <X11/Xcu/Wlm.h>
  34.  
  35. static Arg toplevel_args[] =
  36.     {
  37.      {XtNallowShellResize, (XtArgVal) True}
  38.     } ;
  39.  
  40. static Arg wlm_args[] =
  41.     {
  42.      {XtNfile, (XtArgVal) NULL}
  43.     } ;
  44.  
  45. Widget toplevel, wlm ;
  46.  
  47. main (argc, argv)
  48.     int argc ;
  49.     char **argv ;
  50. {
  51. Cardinal i ;
  52.  
  53. if (argc < 2)
  54.     {
  55.     fprintf (stderr, "\nUsage: %s wlm_layout_file\n\n",
  56.          argv[0]) ;
  57.     exit (1) ;
  58.     }
  59.  
  60. toplevel = XtInitialize (NULL, "top", NULL, NULL, &argc, argv);
  61.  
  62. XtSetArg (wlm_args[0], XtNfile, argv[1]) ;
  63. XtSetValues (toplevel, toplevel_args, XtNumber(toplevel_args)) ;
  64. wlm = XtCreateManagedWidget ( "wlm", xcuWlmWidgetClass, toplevel, wlm_args, ONE) ;
  65.  
  66. XtRealizeWidget (toplevel) ;
  67.  
  68. XcuWlmSample (wlm) ;
  69. for (;;)
  70.     {
  71.     XcuWlmRequest ( wlm) ;
  72.     }
  73. }
  74.  
  75. #include "xlayout.wh"
  76.