summaryrefslogtreecommitdiffstats
path: root/include/view.h
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2016-02-06 13:06:58 +0100
committerDave Davenport <qball@gmpclient.org>2016-02-06 13:06:58 +0100
commit312ca274fc4a12814a429a7b59cd5ebb840f643a (patch)
tree88122ed7bb8cc2ceda3e70222051422a1b63dd3a /include/view.h
parent531f3f884ac87b7a2f8d5494acbe255deee20bed (diff)
Split of files.
Diffstat (limited to 'include/view.h')
-rw-r--r--include/view.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/include/view.h b/include/view.h
new file mode 100644
index 00000000..8c7d02bc
--- /dev/null
+++ b/include/view.h
@@ -0,0 +1,69 @@
+
+// State of the menu.
+
+typedef 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;
+
+ ssize_t num_modi;
+ textbox **modi;
+ // Handlers.
+ void ( *x11_event_loop )( struct RofiViewState *state, XEvent *ev );
+ void ( *finalize )( struct RofiViewState *state );
+}RofiViewState;
+
+/**
+ * @param state The Menu Handle
+ *
+ * Check if a finalize function is set, and if sets executes it.
+ */
+void rofi_view_finalize ( RofiViewState *state );
+
+RofiViewState * rofi_view_state_create ( void );