home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / demos / GL / buttonfly / buttonfly.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  1.8 KB  |  70 lines

  1. /*
  2.  * Copyright 1991, 1992, 1993, 1994, Silicon Graphics, Inc.
  3.  * All Rights Reserved.
  4.  *
  5.  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6.  * the contents of this file may not be disclosed to third parties, copied or
  7.  * duplicated in any form, in whole or in part, without the prior written
  8.  * permission of Silicon Graphics, Inc.
  9.  *
  10.  * RESTRICTED RIGHTS LEGEND:
  11.  * Use, duplication or disclosure by the Government is subject to restrictions
  12.  * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13.  * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14.  * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15.  * rights reserved under the Copyright Laws of the United States.
  16.  */
  17. /*
  18.  *    Type definitions, etc for buttonfly
  19.  */
  20. #define random(r) (r*(float)rand()/(float)(0x7fff))
  21.  
  22. #define WORDLENGTH 11
  23.  
  24. typedef struct popup_struct_type
  25. {
  26.     char *title;
  27.     char *action;
  28.     struct popup_struct_type *next;
  29. } popup_struct;
  30.  
  31. typedef struct button_struct_type
  32. {
  33.     char name[3][20];
  34.     int wc;        /* word count */
  35.     char *action;
  36.     char *submenu;
  37.     popup_struct *popup;
  38.     char *cwd;    /* Working directory */
  39.  
  40.     /* RGB 0 to 1 */
  41.     float color[3];
  42.     float backcolor[3];
  43.     float highcolor[3];
  44.     float default_color[3];
  45.     float default_backcolor[3];
  46.     float default_highcolor[3];
  47.     struct button_struct_type *next;
  48.     struct button_struct_type *forward;
  49.  
  50.     short ax, ay, az;
  51.     float tx, ty, tz;
  52. } button_struct;
  53.  
  54. typedef struct path_struct_type {
  55.  
  56.     button_struct *current_buttons;
  57.     button_struct *button;
  58.     struct path_struct_type *back;
  59.  
  60. } path_struct;
  61.  
  62. #define NUM_TOKENS 6
  63. #define MAX_SPOTS 32
  64.  
  65. extern char *dot_tokens[NUM_TOKENS];
  66. extern int token_nums[];
  67. extern float *spots[32];
  68. extern button_struct *current_button;
  69. extern char *malloc(), *realloc();
  70.