Exemplo n.º 1
0
static void
key_handler(struct window *window, struct input *input, uint32_t time,
	    uint32_t key, uint32_t unicode,
	    enum wl_keyboard_key_state state, void *data)
{
	struct view *view = data;

	if (state == WL_KEYBOARD_KEY_STATE_RELEASED)
	        return;

	switch (key) {
	case KEY_SPACE:
	case KEY_PAGEDOWN:
	case KEY_RIGHT:
	case KEY_DOWN:
                view_page_down(view);
		break;
	case KEY_BACKSPACE:
	case KEY_PAGEUP:
	case KEY_LEFT:
	case KEY_UP:
                view_page_up(view);
		break;
	default:
		break;
	}
}
Exemplo n.º 2
0
Arquivo: view.c Projeto: N8Fear/adwc
static void
key_handler(struct window *window, struct input *input, uint32_t time,
	    uint32_t key, uint32_t unicode, uint32_t state, void *data)
{
	struct view *view = data;

	if(!state)
	        return;

	switch (key) {
	case KEY_F11:
		view->fullscreen ^= 1;
		window_set_fullscreen(window, view->fullscreen);
		break;
	case KEY_SPACE:
	case KEY_PAGEDOWN:
	case KEY_RIGHT:
	case KEY_DOWN:
                view_page_down(view);
		break;
	case KEY_BACKSPACE:
	case KEY_PAGEUP:
	case KEY_LEFT:
	case KEY_UP:
                view_page_up(view);
		break;
	default:
		break;
	}
}
Exemplo n.º 3
0
Arquivo: view.c Projeto: N8Fear/adwc
static void
button_handler(struct widget *widget, struct input *input, uint32_t time,
               int button, int state, void *data)
{
        struct view *view = data;

        if(!state)
                return;

        switch(button) {
        case 275:
                view_page_up(view);
                break;
        case 276:
                view_page_down(view);
                break;
        default:
                break;
        }
}
Exemplo n.º 4
0
static void
button_handler(struct widget *widget, struct input *input, uint32_t time,
               uint32_t button, enum wl_pointer_button_state state,
	       void *data)
{
        struct view *view = data;

        if (state == WL_POINTER_BUTTON_STATE_RELEASED)
                return;

        switch(button) {
        case 275:
                view_page_up(view);
                break;
        case 276:
                view_page_down(view);
                break;
        default:
                break;
        }
}