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 / xcell / CellP.h < prev    next >
C/C++ Source or Header  |  1991-10-03  |  5KB  |  190 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.  * CellP.h - Private definitions for XcuCell widget
  29.  */
  30.  
  31. #ifndef _Xcu_CellP_h
  32. #define _Xcu_CellP_h
  33.  
  34. #include <stdio.h>
  35. #include "Cell.h"
  36. #include <X11/Xcu/SimpleP.h>
  37. #include <X11/Xcu/ProcedureR.h>
  38.  
  39. /* New fields for the XcuCell widget class record */
  40.  
  41. typedef struct
  42.     {
  43.     XtProc    redisplay_text ;
  44.     } XcuCellClassPart;
  45.  
  46.  
  47. /* Full class record declaration */
  48. typedef struct _XcuCellClassRec
  49.     {
  50.     CoreClassPart    core_class ;
  51.     XcuSimpleClassPart    simple_class ;
  52.     XcuCellClassPart    cell_class ;
  53.     } XcuCellClassRec ;
  54.  
  55. extern XcuCellClassRec xcuCellClassRec ;
  56.  
  57. /* New fields for the XcuCell widget record */
  58.  
  59. typedef enum {
  60.          KLCRT3, KLCRT4, KLCRT5, LCCRRR4, LCCR4, LCR3, LCR4, LCR5, LCR6
  61.          } XcuCellType ;
  62.  
  63. typedef struct
  64.     {
  65.     /* resources */
  66.     XColor    *colors ;
  67.     String    color0 ;
  68.     String    color1 ;
  69.     String    color2 ;
  70.     String    color3 ;
  71.     String    color4 ;
  72.     String    color5 ;
  73.     String    color6 ;
  74.     String    color7 ;
  75.     String    color_string ;
  76.     String    rules_file ;
  77.     String    pick_file ;
  78.     String    type_ ;
  79.     String    ignore_colors ;
  80.     String    directory ;
  81.     int        seed_ ;
  82.     int        per_row_ ;
  83.     int        per_col_ ;
  84.     int        rule_index_ ;
  85.     int        n_colors ;
  86.     Boolean    vertical_merge_ ;
  87.     Boolean    horizontal_merge_ ;
  88.     Boolean    order_ ;
  89.     Boolean    masks_active ;
  90.     Boolean    alternating ;
  91.     Boolean    mutate ;
  92.     Boolean    beep ;
  93.     Dimension    internal_width ;
  94.     Dimension    internal_height ;
  95.     XcuCellSequenceType sequence ;
  96.     XcuCellFrequencyType frequency ;
  97.     XtProcedureList *procedure_list ;
  98.  
  99.     /* private state */
  100.     XcuCellType    mix_ ;
  101.     Pixel    *cells ;
  102.     Pixel    **rcells ;
  103.     int        max_colors ;
  104.     int        current_h ;
  105.     int        n_permutations ;
  106.     int        permutation_index ;
  107.     int        **permute_array ;
  108.     int        max_rw_cells ;
  109.     int        spread_ ;
  110.     int        reduct_ ;
  111.     int        window_ ;
  112.     int        order_number_ ;
  113.     GC        background_GC ;
  114.     GC        cell_GC ;
  115.     int        height ;
  116.     int        width ;
  117.     XImage    *image ;
  118.     unsigned char *row0_, *row1_ ;
  119.     int        ***save_rule_ ;
  120.     int        ***asave_rule_ ;
  121.     int        *irule_ ;
  122.     int        *arule_ ;
  123.     int        *mutation ;
  124.     int        mod_many_per_page ;
  125.     int        mod_hmany_per_page ;
  126.     int        old_many_per_page ;
  127.     int        old_hmany_per_page ;
  128.     int        old_rcell_hmany ;
  129.     FILE    *fpick_ ;
  130.     int        **mask_ ;
  131.     int        **rule_ ;
  132.     int        nrule_ ;
  133.     int        masks_ ;
  134.     int        row_ ;
  135.     int        row_count_ ;
  136.     int        rule_count ;
  137.     int        many_count_ ;
  138.     int        hmany_count_ ;
  139.     int        mask_iter_ ;
  140.     int        *ignore_array ;
  141.     int        ignore_count ;
  142.     int        rule_number_ ;
  143.     int        old_n_colors ;
  144.     Boolean    is_exposed ;
  145.     Boolean    all_random_ ;
  146.     Boolean    first_initial_row ;
  147.     unsigned
  148.     char    **wrap_left_, **wrap_right_ ;
  149.     Boolean  height_changed ;
  150.     Boolean  hmerge_changed ;
  151.     Boolean  hmany_changed ;
  152.     Boolean  ignore_colors_changed ;
  153.     Boolean  many_changed ;
  154.     Boolean  mod_changed ;
  155.     Boolean  pick_changed ;
  156.     Boolean  rrule_changed ;
  157.     Boolean  rules_changed ;
  158.     Boolean  seed_changed ;
  159.     Boolean  spread_changed ;
  160.     Boolean  type_changed ;
  161.     Boolean  width_changed ;
  162.     Boolean  windo_changed ;
  163.     Boolean  colors_changed ;
  164.     Boolean  reduct_changed ;
  165.     Boolean  n_colors_changed ;
  166.     Boolean  alt_changed ;
  167.     } XcuCellPart ;
  168.  
  169.  
  170. /*
  171.  * Full instance record declaration
  172.  */
  173.  
  174. typedef struct _XcuCellRec
  175.     {
  176.     CorePart     core ;
  177.     XcuSimplePart simple ;
  178.     XcuCellPart     cell ;
  179.     } XcuCellRec ;
  180.  
  181. /*
  182.  * Inheritance definitions
  183.  */
  184.  
  185. /**
  186. #define XtInheritRedisplayText ((XtProc) _XtInherit)
  187. **/
  188.  
  189. #endif _Xcu_CellP_h
  190.