2016-02-06 14:27:36 +01:00
|
|
|
#ifndef ROFI_VIEW_INTERNAL_H
|
|
|
|
#define ROFI_VIEW_INTERNAL_H
|
2016-10-08 18:57:59 +02:00
|
|
|
#include "widgets/widget.h"
|
|
|
|
#include "widgets/textbox.h"
|
|
|
|
#include "widgets/separator.h"
|
|
|
|
#include "widgets/listview.h"
|
|
|
|
#include "widgets/box.h"
|
2016-04-07 15:32:22 +02:00
|
|
|
#include "keyb.h"
|
2016-02-19 19:29:06 +01:00
|
|
|
#include "x11-helper.h"
|
2016-02-06 14:27:36 +01:00
|
|
|
|
|
|
|
/**
|
2016-02-08 18:16:16 +01:00
|
|
|
* @ingroup ViewHandle
|
2016-02-06 14:27:36 +01:00
|
|
|
*
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
// State of the menu.
|
|
|
|
|
2016-02-11 20:24:29 +01:00
|
|
|
struct RofiViewState
|
2016-02-06 14:27:36 +01:00
|
|
|
{
|
2016-05-08 11:13:11 +02:00
|
|
|
Mode *sw;
|
2016-02-06 14:27:36 +01:00
|
|
|
|
|
|
|
// Update/Refilter list.
|
2016-05-08 11:13:11 +02:00
|
|
|
int refilter;
|
|
|
|
int rchanged;
|
2016-02-06 14:27:36 +01:00
|
|
|
|
2016-10-08 18:57:59 +02:00
|
|
|
box *main_box;
|
2016-02-06 14:27:36 +01:00
|
|
|
// Entries
|
2016-10-08 18:57:59 +02:00
|
|
|
box *input_bar;
|
|
|
|
separator *input_bar_separator;
|
|
|
|
|
|
|
|
textbox *prompt;
|
2016-05-08 11:13:11 +02:00
|
|
|
textbox *text;
|
|
|
|
textbox *case_indicator;
|
2016-10-08 18:57:59 +02:00
|
|
|
|
|
|
|
listview *list_view;
|
2016-06-26 15:48:12 +02:00
|
|
|
// Small overlay.
|
|
|
|
textbox *overlay;
|
2016-05-08 11:13:11 +02:00
|
|
|
int *distance;
|
|
|
|
unsigned int *line_map;
|
2016-02-06 14:27:36 +01:00
|
|
|
|
2016-05-08 11:13:11 +02:00
|
|
|
unsigned int num_lines;
|
2016-02-06 14:27:36 +01:00
|
|
|
|
|
|
|
// Selected element.
|
2016-05-08 11:13:11 +02:00
|
|
|
unsigned int filtered_lines;
|
2016-02-06 14:27:36 +01:00
|
|
|
// Last offset in paginating.
|
2016-05-08 11:13:11 +02:00
|
|
|
unsigned int last_offset;
|
2016-02-06 14:27:36 +01:00
|
|
|
|
2016-04-07 15:32:22 +02:00
|
|
|
KeyBindingAction prev_action;
|
2016-05-08 11:13:11 +02:00
|
|
|
xcb_timestamp_t last_button_press;
|
2016-02-06 14:27:36 +01:00
|
|
|
|
2016-05-08 11:13:11 +02:00
|
|
|
int quit;
|
|
|
|
int skip_absorb;
|
2016-02-06 14:27:36 +01:00
|
|
|
// Return state
|
2016-05-08 11:13:11 +02:00
|
|
|
unsigned int selected_line;
|
|
|
|
MenuReturn retv;
|
|
|
|
unsigned int border;
|
|
|
|
workarea mon;
|
2016-02-06 14:27:36 +01:00
|
|
|
|
|
|
|
// Sidebar view
|
2016-10-08 18:57:59 +02:00
|
|
|
box *sidebar_bar;
|
2016-05-08 11:13:11 +02:00
|
|
|
unsigned int num_modi;
|
|
|
|
textbox **modi;
|
2016-02-10 19:40:19 +01:00
|
|
|
|
2016-05-08 11:13:11 +02:00
|
|
|
MenuFlags menu_flags;
|
2016-09-08 15:42:41 -05:00
|
|
|
int mouse_seen;
|
|
|
|
|
2016-09-17 17:49:45 +02:00
|
|
|
int reload;
|
2016-02-06 14:27:36 +01:00
|
|
|
// Handlers.
|
2016-05-08 11:13:11 +02:00
|
|
|
void ( *x11_event_loop )( struct RofiViewState *state, xcb_generic_event_t *ev, xkb_stuff *xkb );
|
|
|
|
void ( *finalize )( struct RofiViewState *state );
|
2016-09-17 17:49:45 +02:00
|
|
|
|
|
|
|
int width;
|
|
|
|
int height;
|
|
|
|
int x;
|
|
|
|
int y;
|
2016-10-11 08:18:34 +02:00
|
|
|
|
|
|
|
GRegex **tokens;
|
2016-02-11 20:24:29 +01:00
|
|
|
};
|
2016-02-06 14:27:36 +01:00
|
|
|
/** @} */
|
|
|
|
#endif
|