diff options
author | Phil Jones <philj56@gmail.com> | 2021-11-07 18:12:52 +0000 |
---|---|---|
committer | Phil Jones <philj56@gmail.com> | 2021-11-07 18:12:52 +0000 |
commit | 9a0ee7624c19acf7fabb311e6c01c45cc72a1da3 (patch) | |
tree | dbbeb78b90d1722678878cd27c5dd0d2b984babe /src/entry.h | |
parent | ae23e86114f559ce6d01a3e2499fc5417dc90d37 (diff) |
Initial working build.
Diffstat (limited to 'src/entry.h')
-rw-r--r-- | src/entry.h | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/entry.h b/src/entry.h index b0e9542..6da7222 100644 --- a/src/entry.h +++ b/src/entry.h @@ -5,8 +5,9 @@ #include "color.h" #include "image.h" #include "surface.h" +#include "string_vec.h" -#define MAX_PASSWORD_LENGTH 64 +#define MAX_INPUT_LENGTH 64 struct entry { struct surface surface; @@ -14,7 +15,8 @@ struct entry { struct image image; struct { PangoContext *context; - PangoLayout *layout; + PangoLayout *entry_layout; + PangoLayout *result_layouts[5]; } pango; struct { cairo_surface_t *surface; @@ -22,22 +24,21 @@ struct entry { } cairo; PangoRectangle text_bounds; - wchar_t password[MAX_PASSWORD_LENGTH]; + wchar_t input[MAX_INPUT_LENGTH]; /* Assume maximum of 4 bytes per wchar_t (for UTF-8) */ - char password_mb[4*MAX_PASSWORD_LENGTH]; - char password_mb_print[4*MAX_PASSWORD_LENGTH]; - uint32_t password_length; - bool password_visible; + char input_mb[4*MAX_INPUT_LENGTH]; + uint32_t input_length; + uint32_t input_mb_length; + + struct string_vec results; + struct string_vec commands; /* Options */ - bool use_pango; - uint32_t dot_radius; uint32_t font_size; const char *font_name; uint32_t padding; - bool tight_layout; - wchar_t password_character; uint32_t num_characters; + uint32_t num_lines; struct color foreground_color; struct color background_color; struct { @@ -48,6 +49,7 @@ struct entry { } border; }; +void entry_preload(void); void entry_init(struct entry *entry, uint32_t scale); void entry_destroy(struct entry *entry); void entry_update(struct entry *entry); |