diff options
author | Phil Jones <philj56@gmail.com> | 2021-10-29 13:23:44 +0100 |
---|---|---|
committer | Phil Jones <philj56@gmail.com> | 2021-10-29 13:23:44 +0100 |
commit | c691b8e48c572e2d5f1c7c16c8f42babd7d706d5 (patch) | |
tree | b3d601919670c41e0409477e22371ab77e092aa2 /src/entry.h | |
parent | 3bf156c9d9598acbee38c49d17cdb7d77e79d520 (diff) |
Basic text entry working.
Diffstat (limited to 'src/entry.h')
-rw-r--r-- | src/entry.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/entry.h b/src/entry.h new file mode 100644 index 0000000..18276a1 --- /dev/null +++ b/src/entry.h @@ -0,0 +1,33 @@ +#ifndef ENTRY_H +#define ENTRY_H + +#include <pango/pangocairo.h> +#include "util.h" +#include "surface.h" + +#define MAX_PASSWORD_LENGTH 256 + +struct entry { + struct surface surface; + struct wl_subsurface *wl_subsurface; + struct image image; + struct { + PangoLayout *layout; + cairo_surface_t *surface; + cairo_t *cr; + } pangocairo; + struct { + struct color color; + struct color outline_color; + int32_t width; + int32_t outline_width; + } border; + wchar_t password[MAX_PASSWORD_LENGTH]; + char password_mb[4*MAX_PASSWORD_LENGTH]; + uint32_t password_length; +}; + +void entry_init(struct entry *entry); +void entry_update(struct entry *entry); + +#endif /* ENTRY_H */ |