home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / x / volume3 / xsaver / part02 / xsaver.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-03-10  |  2.6 KB  |  100 lines

  1. /*
  2.  * $Source: /mit/sipbsrc/uus/src/xscreensaver/RCS/xscreensaver.h,v $
  3.  * $Author: jik $
  4.  * $Header: xscreensaver.h,v 1.7 89/02/28 06:55:31 jik Exp $
  5.  *
  6.  * This file is part of xscreensaver.  It contains the general header
  7.  * stuff for the screensaver.
  8.  *
  9.  * Author: Jonathan Kamens, MIT Project Athena and
  10.  *                          MIT Student Information Processing Board
  11.  *
  12.  * Copyright (c) 1989 by Jonathan Kamens.  This code may be
  13.  * distributed freely as long as this notice is kept intact in its
  14.  * entirety and every effort is made to send all corrections and
  15.  * improvements to the code back to the author.  Also, don't try to
  16.  * make any money off of it or pretend that you wrote it.
  17.  */
  18.  
  19. #define PASSWDLENGTH         13 /* length of correct password in */
  20.                    /* the /etc/passwd file */
  21. #define MAXUSERNAME        15 /* maximum length of a username */
  22. #define MAXPASSWORD        20 /* maximum length of a password */
  23. #define MAXPROMPT        10 /* max number of lines in a */
  24.                    /* promptbox */
  25. typedef struct {
  26.      int velocity, timeout, menu_button;
  27.      Boolean use_background, auto_lock, use_passwd, transparent, no_fork;
  28.      Boolean d_time, d_elapsed, d_timeout, leave_close, start_locked;
  29.      String key, ekey, lock_message;
  30.      String lock_command, unlock_command;
  31. } Defaults;
  32.  
  33. #define TIME_FORMAT         "Time: %d:%02d"
  34. #define ELAPSED_FORMAT         "Elapsed: %d:%02d"
  35. #define TIMEOUT_FORMAT         "Timeout: %d %s, %d %s"
  36. #define TIMELEFT_FORMAT        "Time Left: %d %s, %d %s"
  37. #define USER_FORMAT        "User: %s"
  38. #define PASS_PROMPT1        "Enter password:     "
  39. #define PASS_PROMPT2        "Enter it again:     "
  40.  
  41. typedef enum {
  42.      Force,
  43.      NoForce,
  44. } ForceType;
  45.  
  46.       
  47.  
  48.  
  49. typedef struct {
  50.      char *str;
  51.      char *name;
  52.      Pixmap bitmap;
  53.      Boolean use_default;
  54.      Boolean center;
  55.      int spread;
  56.      Dimension width;
  57. } PromptLine;
  58.  
  59.  
  60.  
  61. static PromptLine default_line = {
  62.      "promptLabel",
  63.      "prompt",
  64.      (Pixmap) NULL,
  65.      False,
  66.      True,
  67.      0,
  68.      0
  69. };
  70.  
  71.  
  72.  
  73.  /* Note that if MAXTIMEOUT is set, then TIMEOUT must not be set to 0! */
  74.  /* If it is, then a spurious error message will be generated every */
  75.  /* time the program is run!  Both TIMEOUT and MAXTIMEOUT should be */
  76.  /* set in minutes. */
  77. #define TIMEOUT            "0"
  78. #undef MAXTIMEOUT
  79. #define CMPERMINUTE         "40"
  80. #define MENUBUTTON        "2"
  81.  
  82.  /* If your C library uses "putenv" instead of "setenv," you need to */
  83.  /* define setenv to putenv, because my library uses setenv. */
  84. #define setenv putenv
  85.  
  86. typedef struct {
  87.      Widget widget;
  88.      Dimension width;
  89. } WidgetandWidth;
  90.  
  91.  
  92.  
  93. typedef struct {
  94.      int start, current, saver;
  95. } Times;
  96.  
  97. typedef struct {
  98.      int timeout, interval, prefer_blanking, allow_exposures;
  99. } Saver;
  100.