2016-02-06 08:27:36 -05:00
|
|
|
#ifndef ROFI_VIEW_INTERNAL_H
|
|
|
|
#define ROFI_VIEW_INTERNAL_H
|
|
|
|
#include "widget.h"
|
|
|
|
#include "textbox.h"
|
|
|
|
#include "scrollbar.h"
|
2016-02-19 13:29:06 -05:00
|
|
|
#include "x11-helper.h"
|
2016-02-06 08:27:36 -05:00
|
|
|
|
|
|
|
/**
|
2016-02-08 12:16:16 -05:00
|
|
|
* @ingroup ViewHandle
|
2016-02-06 08:27:36 -05:00
|
|
|
*
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
// State of the menu.
|
|
|
|
|
2016-02-11 14:24:29 -05:00
|
|
|
struct RofiViewState
|
2016-02-06 08:27:36 -05:00
|
|
|
{
|
2016-02-22 10:53:30 -05:00
|
|
|
Mode *sw;
|
|
|
|
unsigned int menu_lines;
|
|
|
|
unsigned int max_elements;
|
|
|
|
unsigned int max_rows;
|
|
|
|
unsigned int columns;
|
2016-02-06 08:27:36 -05:00
|
|
|
|
2016-02-22 10:53:30 -05:00
|
|
|
unsigned int element_width;
|
|
|
|
int top_offset;
|
2016-02-06 08:27:36 -05:00
|
|
|
|
|
|
|
// Update/Refilter list.
|
2016-02-22 10:53:30 -05:00
|
|
|
int update;
|
|
|
|
int refilter;
|
|
|
|
int rchanged;
|
|
|
|
int cur_page;
|
2016-02-06 08:27:36 -05:00
|
|
|
|
|
|
|
// Entries
|
2016-02-22 10:53:30 -05:00
|
|
|
textbox *text;
|
|
|
|
textbox *prompt_tb;
|
|
|
|
textbox *message_tb;
|
|
|
|
textbox *case_indicator;
|
|
|
|
textbox **boxes;
|
|
|
|
scrollbar *scrollbar;
|
|
|
|
int *distance;
|
|
|
|
unsigned int *line_map;
|
2016-02-06 08:27:36 -05:00
|
|
|
|
2016-02-22 10:53:30 -05:00
|
|
|
unsigned int num_lines;
|
2016-02-06 08:27:36 -05:00
|
|
|
|
|
|
|
// Selected element.
|
2016-02-22 10:53:30 -05:00
|
|
|
unsigned int selected;
|
|
|
|
unsigned int filtered_lines;
|
2016-02-06 08:27:36 -05:00
|
|
|
// Last offset in paginating.
|
2016-02-22 10:53:30 -05:00
|
|
|
unsigned int last_offset;
|
2016-02-06 08:27:36 -05:00
|
|
|
|
2016-02-22 10:53:30 -05:00
|
|
|
xkb_keysym_t prev_key;
|
|
|
|
xcb_timestamp_t last_button_press;
|
2016-02-06 08:27:36 -05:00
|
|
|
|
2016-02-22 10:53:30 -05:00
|
|
|
int quit;
|
|
|
|
int skip_absorb;
|
2016-02-06 08:27:36 -05:00
|
|
|
// Return state
|
2016-02-22 10:53:30 -05:00
|
|
|
unsigned int selected_line;
|
|
|
|
MenuReturn retv;
|
|
|
|
int *lines_not_ascii;
|
|
|
|
int line_height;
|
|
|
|
unsigned int border;
|
|
|
|
workarea mon;
|
2016-02-06 08:27:36 -05:00
|
|
|
|
|
|
|
// Sidebar view
|
2016-02-22 10:53:30 -05:00
|
|
|
unsigned int num_modi;
|
|
|
|
textbox **modi;
|
2016-02-10 13:40:19 -05:00
|
|
|
|
2016-02-22 10:53:30 -05:00
|
|
|
MenuFlags menu_flags;
|
2016-02-06 08:27:36 -05:00
|
|
|
// Handlers.
|
2016-02-22 10:53:30 -05:00
|
|
|
void ( *x11_event_loop )( struct RofiViewState *state, xcb_generic_event_t *ev, xkb_stuff *xkb );
|
|
|
|
void ( *finalize )( struct RofiViewState *state );
|
2016-02-11 14:24:29 -05:00
|
|
|
};
|
2016-02-06 08:27:36 -05:00
|
|
|
/** @} */
|
|
|
|
#endif
|