mirror of
https://github.com/davatorium/rofi.git
synced 2025-03-03 16:05:20 -05:00
view-internal: Use XCB types
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
This commit is contained in:
parent
09e520dfe8
commit
f39f5bb0cb
4 changed files with 48 additions and 46 deletions
|
@ -14,63 +14,63 @@
|
|||
|
||||
struct RofiViewState
|
||||
{
|
||||
Mode *sw;
|
||||
unsigned int menu_lines;
|
||||
unsigned int max_elements;
|
||||
unsigned int max_rows;
|
||||
unsigned int columns;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
unsigned int num_lines;
|
||||
|
||||
// Selected element.
|
||||
unsigned int selected;
|
||||
unsigned int filtered_lines;
|
||||
unsigned int selected;
|
||||
unsigned int filtered_lines;
|
||||
// Last offset in paginating.
|
||||
unsigned int last_offset;
|
||||
unsigned int last_offset;
|
||||
|
||||
KeySym prev_key;
|
||||
Time last_button_press;
|
||||
xkb_keysym_t prev_key;
|
||||
xcb_timestamp_t last_button_press;
|
||||
|
||||
int quit;
|
||||
int skip_absorb;
|
||||
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;
|
||||
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;
|
||||
unsigned int num_modi;
|
||||
textbox **modi;
|
||||
|
||||
MenuFlags menu_flags;
|
||||
MenuFlags menu_flags;
|
||||
// Handlers.
|
||||
void ( *x11_event_loop )( struct RofiViewState *state, xcb_generic_event_t *ev, xkb_stuff *xkb );
|
||||
void ( *finalize )( struct RofiViewState *state );
|
||||
void ( *x11_event_loop )( struct RofiViewState *state, xcb_generic_event_t *ev, xkb_stuff *xkb );
|
||||
void ( *finalize )( struct RofiViewState *state );
|
||||
};
|
||||
/** @} */
|
||||
#endif
|
||||
|
|
|
@ -4,14 +4,16 @@
|
|||
#include <xkbcommon/xkbcommon.h>
|
||||
#include <xkbcommon/xkbcommon-compose.h>
|
||||
|
||||
struct xkb_stuff {
|
||||
struct xkb_stuff
|
||||
{
|
||||
xcb_connection_t *xcb_connection;
|
||||
struct xkb_context *context;
|
||||
uint8_t first_event;
|
||||
int32_t device_id;
|
||||
struct xkb_keymap *keymap;
|
||||
struct xkb_state *state;
|
||||
struct {
|
||||
struct
|
||||
{
|
||||
struct xkb_compose_table *table;
|
||||
struct xkb_compose_state * state;
|
||||
} compose;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#ifndef ROFI_XKB_H
|
||||
#define ROFI_XKB_H
|
||||
|
||||
typedef struct xkb_stuff xkb_stuff;
|
||||
typedef struct xkb_stuff xkb_stuff;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -77,7 +77,7 @@ Window main_window = None;
|
|||
cairo_surface_t *surface = NULL;
|
||||
cairo_surface_t *fake_bg = NULL;
|
||||
cairo_t *draw = NULL;
|
||||
Colormap map = None;
|
||||
Colormap map = None;
|
||||
XVisualInfo vinfo;
|
||||
|
||||
static char * get_matching_state ( void )
|
||||
|
@ -1307,8 +1307,8 @@ static void rofi_view_mainloop_iter ( RofiViewState *state, xcb_generic_event_t
|
|||
switch ( xkb_compose_state_get_status ( xkb->compose.state ) )
|
||||
{
|
||||
case XKB_COMPOSE_CANCELLED:
|
||||
/* Eat the keysym that cancelled the compose sequence.
|
||||
* This is default behaviour with Xlib */
|
||||
/* Eat the keysym that cancelled the compose sequence.
|
||||
* This is default behaviour with Xlib */
|
||||
case XKB_COMPOSE_COMPOSING:
|
||||
key = XKB_KEY_NoSymbol;
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue