X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=driver%2Ftypes.h;h=3ab8506cbb50a3ede62b4337680a2e70fc88f3d7;hb=2762a7d7cf8d83e68b8f635941f6609119d630ae;hp=48321877254bbb6d8a79f3cae6710e1f69fe54f7;hpb=c494fd2e6b3b25582375d62e40f4f5cc984ca424;p=xscreensaver diff --git a/driver/types.h b/driver/types.h index 48321877..3ab8506c 100644 --- a/driver/types.h +++ b/driver/types.h @@ -1,7 +1,4 @@ -/* types.h - * - * This file is part of XScreenSaver, - * Copyright (c) 1993-2004 Jamie Zawinski +/* xscreensaver, Copyright (c) 1993-2011 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -12,20 +9,19 @@ * implied warranty. */ -#ifndef TYPES_H -#define TYPES_H +#ifndef __XSCREENSAVER_TYPES_H__ +#define __XSCREENSAVER_TYPES_H__ typedef struct saver_info saver_info; -/* Unlock states. Old pw_* equivalents in square brackets: - * ul_read - reading input (or ready to do so) [pw_read] - * ul_success - auth success, unlock the screen [pw_ok] - * ul_fail - authentication failed [pw_fail] - * ul_cancel - user cancelled auth [pw_cancel or pw_null] - * ul_time - timed out, user took too long [pw_time] - * ul_finished - user pressed enter on the current prompt, process input - */ -enum unlock_state { ul_read, ul_success, ul_fail, ul_cancel, ul_time, ul_finished }; +typedef enum { + ul_read, /* reading input or ready to do so */ + ul_success, /* auth success, unlock */ + ul_fail, /* auth fail */ + ul_cancel, /* user cancelled auth (pw_cancel or pw_null) */ + ul_time, /* timed out */ + ul_finished /* user pressed enter */ +} unlock_state; typedef struct screenhack screenhack; struct screenhack { @@ -56,7 +52,28 @@ typedef struct saver_preferences saver_preferences; typedef struct saver_screen_info saver_screen_info; typedef struct passwd_dialog_data passwd_dialog_data; typedef struct splash_dialog_data splash_dialog_data; +typedef struct _monitor monitor; + +typedef struct poll_mouse_data poll_mouse_data; +struct poll_mouse_data { + int root_x; + int root_y; + Window child; + unsigned int mask; + time_t time; +}; +#ifdef HAVE_XINPUT +/* XInputExtension device support */ +#include + +typedef struct xinput_dev_info xinput_dev_info; +struct xinput_dev_info { + XDevice *device; + XEventClass press, release, valuator; + poll_mouse_data last_poll_mouse; +}; +#endif /* This structure holds all the user-specified parameters, read from the command line, the resource database, or entered through a dialog box. @@ -115,6 +132,8 @@ struct saver_preferences { int pointer_hysteresis; /* mouse motions less than N/sec are ignored */ Bool dpms_enabled_p; /* Whether to power down the monitor */ + Bool dpms_quickoff_p; /* Whether to power down monitor immediately + in "Blank Only" mode */ Time dpms_standby; /* how long until monitor goes black */ Time dpms_suspend; /* how long until monitor power-saves */ Time dpms_off; /* how long until monitor powers down */ @@ -134,6 +153,7 @@ struct saver_preferences { Bool use_mit_saver_extension; Bool use_sgi_saver_extension; Bool use_proc_interrupts; + Bool use_xinput_extension; Bool getviewport_full_of_lies_p; /* XFree86 bug #421 */ @@ -158,9 +178,11 @@ struct saver_info { saver_preferences prefs; int nscreens; + int ssi_count; saver_screen_info *screens; saver_screen_info *default_screen; /* ...on which dialogs will appear. */ - + monitor **monitor_layout; /* private to screens.c */ + Visual **best_gl_visuals; /* visuals for GL hacks on screen N */ /* ======================================================================= global connection info @@ -173,7 +195,6 @@ struct saver_info { server extension info ======================================================================= */ - Bool xinerama_p; /* Whether Xinerama is in use. */ Bool using_xidle_extension; /* which extension is being used. */ Bool using_mit_saver_extension; /* Note that `p->use_*' is the *request*, */ Bool using_sgi_saver_extension; /* and `si->using_*' is the *reality*. */ @@ -190,8 +211,20 @@ struct saver_info { # ifdef HAVE_RANDR int randr_event_number; int randr_error_number; + Bool using_randr_extension; # endif + Bool using_xinput_extension; /* Note that `p->use_*' is the *request*, */ + /* and `si->using_*' is the *reality*. */ +#ifdef HAVE_XINPUT + int xinput_ext_event_number; /* may not be used */ + int xinput_ext_error_number; + int xinput_DeviceButtonPress; /* Extension device event codes. */ + int xinput_DeviceButtonRelease; /* Assigned by server at runtime */ + int xinput_DeviceMotionNotify; + xinput_dev_info *xinput_devices; + int num_xinput_devices; +# endif /* ======================================================================= blanking @@ -247,7 +280,7 @@ struct saver_info { char *user; /* The user whose session is locked. */ char *cached_passwd; /* Cached password, used to avoid multiple prompts for password-only auth mechanisms.*/ - enum unlock_state unlock_state; + unlock_state unlock_state; auth_conv_cb_t unlock_cb; /* The function used to prompt for creds. */ void (*auth_finished_cb) (saver_info *si); @@ -349,7 +382,6 @@ struct saver_screen_info { int current_depth; /* How deep the visual (and the window) are. */ Visual *default_visual; /* visual to use when none other specified */ - Visual *best_gl_visual; /* visual to use for GL hacks */ Window real_vroot; /* The original virtual-root window. */ Window real_vroot_value; /* What was in the __SWM_VROOT property. */ @@ -383,12 +415,7 @@ struct saver_screen_info { timers ======================================================================= */ - int poll_mouse_last_root_x; /* Used only when no server exts. */ - int poll_mouse_last_root_y; - Window poll_mouse_last_child; - unsigned int poll_mouse_last_mask; - time_t poll_mouse_last_time; - + poll_mouse_data last_poll_mouse; /* Used only when no server exts. */ /* ======================================================================= subprocs @@ -407,4 +434,4 @@ struct saver_screen_info { }; -#endif +#endif /* __XSCREENSAVER_TYPES_H__ */