diff options
author | Michael Stapelberg <michael@stapelberg.de> | 2012-01-03 20:56:05 +0000 |
---|---|---|
committer | Michael Stapelberg <michael@stapelberg.de> | 2012-01-03 20:56:05 +0000 |
commit | 57585bef70d82b82b8f5a4b1a7eed2d2db7fa8c9 (patch) | |
tree | 8b675bc9ff512908bdfa3970bc28cbe382b7e904 /unlock_indicator.h | |
parent | 009a0b1a519cd20a80471f98e50afd7743515729 (diff) |
Refactor the unlock indicator into its own source code file
Diffstat (limited to 'unlock_indicator.h')
-rw-r--r-- | unlock_indicator.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/unlock_indicator.h b/unlock_indicator.h new file mode 100644 index 0000000..6cd7b54 --- /dev/null +++ b/unlock_indicator.h @@ -0,0 +1,22 @@ +#ifndef _UNLOCK_INDICATOR_H +#define _UNLOCK_INDICATOR_H + +typedef enum { + STATE_STARTED = 0, /* default state */ + STATE_KEY_PRESSED = 1, /* key was pressed, show unlock indicator */ + STATE_KEY_ACTIVE = 2, /* a key was pressed recently, highlight part + of the unlock indicator. */ + STATE_BACKSPACE_ACTIVE = 3 /* backspace was pressed recently, highlight + part of the unlock indicator in red. */ +} unlock_state_t; + +typedef enum { + STATE_PAM_IDLE = 0, /* no PAM interaction at the moment */ + STATE_PAM_VERIFY = 1, /* currently verifying the password via PAM */ + STATE_PAM_WRONG = 2 /* the password was wrong */ +} pam_state_t; + +xcb_pixmap_t draw_image(uint32_t* resolution); +void redraw_screen(); + +#endif |