You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
1.1 KiB

  1. #ifndef _UNLOCK_INDICATOR_H
  2. #define _UNLOCK_INDICATOR_H
  3. typedef enum {
  4. STATE_STARTED = 0, /* default state */
  5. STATE_KEY_PRESSED = 1, /* key was pressed, show unlock indicator */
  6. STATE_KEY_ACTIVE = 2, /* a key was pressed recently, highlight part
  7. of the unlock indicator. */
  8. STATE_BACKSPACE_ACTIVE = 3, /* backspace was pressed recently, highlight
  9. part of the unlock indicator in red. */
  10. STATE_NOTHING_TO_DELETE = 4, /* backspace was pressed, but there is nothing to delete. */
  11. } unlock_state_t;
  12. typedef enum {
  13. STATE_AUTH_IDLE = 0, /* no authenticator interaction at the moment */
  14. STATE_AUTH_VERIFY = 1, /* currently verifying the password via authenticator */
  15. STATE_AUTH_LOCK = 2, /* currently locking the screen */
  16. STATE_AUTH_WRONG = 3, /* the password was wrong */
  17. STATE_I3LOCK_LOCK_FAILED = 4, /* i3lock failed to load */
  18. } auth_state_t;
  19. xcb_pixmap_t draw_image(uint32_t* resolution);
  20. void redraw_screen(void);
  21. void clear_indicator(void);
  22. #endif