home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / x / xcu16.zip / wlmCompiler / wlc.h < prev    next >
C/C++ Source or Header  |  1991-10-03  |  5KB  |  146 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. /*
  29.  * Copyright 1991 Cornell University
  30.  *
  31.  * Permission to use, copy, modify, and distribute this software and its
  32.  * documentation for any purpose and without fee is hereby granted, provided
  33.  * that the above copyright notice appear in all copies and that both that
  34.  * copyright notice and this permission notice appear in supporting
  35.  * documentation, and that the name of Cornell U. not be used in advertising
  36.  * or publicity pertaining to distribution of the software without specific,
  37.  * written prior permission.  Cornell U. makes no representations about the
  38.  * suitability of this software for any purpose.  It is provided "as is"
  39.  * without express or implied warranty.
  40.  *
  41.  * CORNELL UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  42.  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  43.  * EVENT SHALL CORNELL UNIVERSITY BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  44.  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  45.  * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  46.  * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  47.  * PERFORMANCE OF THIS SOFTWARE.
  48.  *
  49.  * Author:  Gene W. Dykes, Program of Computer Graphics
  50.  *          580 Theory Center, Cornell University, Ithaca, NY 14853
  51.  *          (607) 255-6713   gwd@graphics.cornell.edu
  52.  */
  53.  
  54.  
  55. /* Wlm widget private definitions */
  56.  
  57. #ifndef _WlmCompiler_h
  58. #define _WlmCompiler_h
  59.  
  60. /*
  61.  * Prelude
  62.  */
  63.  
  64. typedef enum {
  65.          WlmLocalContext, WlmGlobalContext
  66.          } WlmContext ;
  67.  
  68. typedef struct WlmManageItem
  69.     {
  70.     String widget ;
  71.     String type ;
  72.     String value ;
  73.     struct WlmManageItem *next ;
  74.     } WlmManageItem ;
  75.  
  76. #define MAX_DIRECTIVE_ARGUMENTS 10
  77. #define MAX_DIRECTIVE_CALLDATA_ITEMS 10
  78. #define MAX_DIRECTIVE_CALLDATA_INDICES 2
  79.  
  80. typedef enum
  81.     {
  82.      WlmDirectiveEquivalence
  83.     ,WlmDirectiveNonEquivalence
  84.     ,WlmDirectiveGreaterThan
  85.     ,WlmDirectiveLessThan
  86.     ,WlmDirectiveGreaterThanOrEqualTo
  87.     ,WlmDirectiveLessThanOrEqualTo
  88.     } WlmDirectiveOperator ;
  89.  
  90. typedef struct Resource
  91.     {
  92.     String name ;
  93.     String class ;
  94.     String value ;
  95.     WlmContext context ;
  96.     struct Resource *next ;
  97.     } Resource ;
  98.  
  99. typedef struct Directive
  100.     {
  101.     String callback_name ;
  102.     String call_data_converter[MAX_DIRECTIVE_CALLDATA_ITEMS] ;
  103.     String call_data[MAX_DIRECTIVE_CALLDATA_ITEMS] ;
  104.     WlmDirectiveOperator call_data_operator[MAX_DIRECTIVE_CALLDATA_ITEMS] ;
  105.     int call_data_index[MAX_DIRECTIVE_CALLDATA_ITEMS]
  106.             [MAX_DIRECTIVE_CALLDATA_INDICES] ;
  107.     int      n_call_comparisons ;
  108.     Cardinal n_call_indices[MAX_DIRECTIVE_CALLDATA_ITEMS] ;
  109.     String target_class ;
  110.     String target_name ;
  111.     Resource resource ;
  112.     String procedure ;
  113.     Cardinal n_arguments ;
  114.     String argument_converters[MAX_DIRECTIVE_ARGUMENTS] ;
  115.     String argument_strings[MAX_DIRECTIVE_ARGUMENTS] ;
  116.     long client_data[3] ;
  117.     struct Directive *next ;
  118.     } Directive ;
  119.  
  120. typedef struct Fetus
  121.     {
  122.     String class_name ;
  123.     Cardinal n_resources ;
  124.     Resource *resource ;
  125.     Cardinal n_directives ;
  126.     Directive *directives ;
  127.     Cardinal n_children ;
  128.     struct Fetus **children ;
  129.     Cardinal n_manage_list ;
  130.     WlmManageItem *manage_list ;
  131.     Widget id ;
  132.     } Fetus ;
  133.  
  134. typedef struct
  135.     {
  136.     String layout_file ;
  137.     String compiled_file ;
  138.     String class_file ;
  139.     String wldl_file ;
  140.     Cardinal cur_depth ;
  141.     Cardinal max_depth ;
  142.     Stack *child_stack ;
  143.     } WlmCompilerPart ;
  144.  
  145. #endif _WlmCompiler_h
  146.