summaryrefslogtreecommitdiffstats
path: root/include/view-internal.h
blob: b4bbd8c60ad0c7aae823eccff22610264d0da003 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#ifndef ROFI_VIEW_INTERNAL_H
#define ROFI_VIEW_INTERNAL_H
#include "widget.h"
#include "textbox.h"
#include "scrollbar.h"
#include "x11-helper.h"

/**
 * @ingroup ViewHandle
 *
 * @{
 */
// State of the menu.

struct RofiViewState
{
    Mode         *sw;
    unsigned int menu_lines;
    unsigned int max_elements;
    unsigned int max_rows;
    unsigned int columns;

    // window width,height
    unsigned int w, h;
    int          x, y;
    unsigned int element_width;
    int          top_offset;

    // Update/Refilter list.
    int          update;
    int          refilter;
    int          rchanged;
    int          cur_page;

    // Entries
    textbox      *text;
    textbox      *prompt_tb;
    textbox      *message_tb;
    textbox      *case_indicator;
    textbox      **boxes;
    scrollbar    *scrollbar;
    int          *distance;
    unsigned int *line_map;

    unsigned int num_lines;

    // Selected element.
    unsigned int selected;
    unsigned int filtered_lines;
    // Last offset in paginating.
    unsigned int last_offset;

    KeySym       prev_key;
    Time         last_button_press;

    int          quit;
    int          skip_absorb;
    // Return state
    unsigned int selected_line;
    MenuReturn   retv;
    int          *lines_not_ascii;
    int          line_height;
    unsigned int border;
    workarea     mon;

    // Sidebar view
    unsigned int num_modi;
    textbox      **modi;

    MenuFlags    menu_flags;
    // Handlers.
    void         ( *x11_event_loop )( struct RofiViewState *state, xcb_generic_event_t *ev, xkb_stuff *xkb );
    void         ( *finalize )( struct RofiViewState *state );
};
/** @} */
#endif