http://ftp.x.org/contrib/applications/xscreensaver-3.19.tar.gz
[xscreensaver] / driver / xscreensaver.h
index 7a61d166b2d306bf69e27af82ae6f31ba3f7942d..58f5214efb6319bcf572d8365a4c0189369badbb 100644 (file)
@@ -84,6 +84,9 @@ struct saver_info {
   Bool screen_blanked_p;       /* Whether the saver is currently active. */
   Window mouse_grab_window;    /* Window holding our mouse grab */
   Window keyboard_grab_window; /* Window holding our keyboard grab */
+  Bool fading_possible_p;      /* Whether fading to/from black is possible. */
+  Bool throttled_p;             /* Whether we should temporarily just blank
+                                   the screen, not run hacks. */
 
 
   /* =======================================================================
@@ -112,6 +115,12 @@ struct saver_info {
   int unlock_failures;         /* Counts failed login attempts while the
                                   screen is locked. */
 
+  char *unlock_typeahead;      /* If the screen is locked, and the user types
+                                   a character, we assume that it is the first
+                                   character of the password.  It's stored here
+                                   for the password dialog to use to populate
+                                   itself. */
+
 
   /* =======================================================================
      demoing
@@ -135,8 +144,14 @@ struct saver_info {
   XtIntervalId check_pointer_timer_id; /* `prefs.pointer_timeout' */
 
   time_t last_activity_time;              /* Used only when no server exts. */
+  time_t last_wall_clock_time;             /* Used to detect laptop suspend. */
   saver_screen_info *last_activity_screen;
 
+  Bool emergency_lock_p;        /* Set when the wall clock has jumped
+                                   (presumably due to laptop suspend) and we
+                                   need to lock down right away instead of
+                                   waiting for the lock timer to go off. */
+
 
   /* =======================================================================
      remote control
@@ -193,6 +208,13 @@ struct saver_screen_info {
                                   real root window. */
   unsigned long black_pixel;   /* Black, allocated from `cmap'. */
 
+  int blank_vp_x, blank_vp_y;   /* Where the virtual-scrolling viewport was
+                                   when the screen went blank.  We need to
+                                   prevent the X server from letting the mouse
+                                   bump the edges to scroll while the screen
+                                   is locked, so we reset to this when it has
+                                   moved, and the lock dialog is up... */
+
 # ifdef HAVE_MIT_SAVER_EXTENSION
   Window server_mit_saver_window;
 # endif
@@ -273,6 +295,12 @@ extern void raise_window (saver_info *si,
 extern Bool blank_screen (saver_info *si);
 extern void unblank_screen (saver_info *si);
 
+extern void get_screen_viewport (saver_screen_info *ssi,
+                                 int *x_ret, int *y_ret,
+                                 int *w_ret, int *h_ret,
+                                 Bool verbose_p);
+
+
 /* =======================================================================
    locking
    ======================================================================= */
@@ -282,14 +310,11 @@ extern Bool unlock_p (saver_info *si);
 extern Bool lock_priv_init (int argc, char **argv, Bool verbose_p);
 extern Bool lock_init (int argc, char **argv, Bool verbose_p);
 extern Bool passwd_valid_p (const char *typed_passwd, Bool verbose_p);
+#endif /* NO_LOCKING */
 
-extern void make_passwd_window (saver_info *si);
-extern void draw_passwd_window (saver_info *si);
-extern void update_passwd_window (saver_info *si, const char *printed_passwd,
-                                 float ratio);
-extern void destroy_passwd_window (saver_info *si);
+extern void set_locked_p (saver_info *si, Bool locked_p);
+extern int move_mouse_grab (saver_info *si, Window to, Cursor cursor);
 
-#endif /* NO_LOCKING */
 
 /* =======================================================================
    runtime privileges