|
NetSurf
|
#include <sys/types.h>#include <stdint.h>#include <string.h>#include <stdbool.h>#include <libnsfb.h>#include <libnsfb_plot.h>#include <libnsfb_plot_util.h>#include <libnsfb_event.h>#include <libnsfb_cursor.h>#include "utils/utils.h"#include "utils/log.h"#include "netsurf/browser_window.h"#include "netsurf/keypress.h"#include "framebuffer/gui.h"#include "framebuffer/fbtk.h"#include "framebuffer/image_data.h"#include "widget.h"Go to the source code of this file.
Functions | |
| void | fbtk_input (fbtk_widget_t *root, nsfb_event_t *event) |
| Insert input into toolkit. More... | |
| void | fbtk_click (fbtk_widget_t *widget, nsfb_event_t *event) |
| Insert mouse button press into toolkit. More... | |
| bool | fbtk_tgrab_pointer (fbtk_widget_t *widget) |
| Toggle pointer grab. More... | |
| void | fbtk_warp_pointer (fbtk_widget_t *widget, int x, int y, bool relative) |
| Move pointer. More... | |
| bool | fbtk_event (fbtk_widget_t *root, nsfb_event_t *event, int timeout) |
| Retrive events from the framebuffer input. More... | |
| int | fbtk_keycode_to_ucs4 (int code, fbtk_modifier_type mods) |
| Convert a framebuffer keycode to ucs4. More... | |
Variables | |
| static int | keymap [] |
| static int | sh_keymap [] |
| void fbtk_click | ( | fbtk_widget_t * | widget, |
| nsfb_event_t * | event | ||
| ) |
Insert mouse button press into toolkit.
Definition at line 63 of file event.c.
References FBTK_CBT_CLICK, FBTK_CBT_INPUT, fbtk_get_absx(), fbtk_get_absy(), fbtk_get_handler(), fbtk_get_root_widget(), fbtk_get_widget_at(), fbtk_post_callback(), fbtk_set_focus(), NSLOG, and root.
Referenced by fbtk_event().
| bool fbtk_event | ( | fbtk_widget_t * | root, |
| nsfb_event_t * | event, | ||
| int | timeout | ||
| ) |
Retrive events from the framebuffer input.
Obtain events from the framebuffer input system with a timeout. Some events may be used by the toolkit instead of being returned to the caller.
| root | An fbtk widget. |
| event | an event structure to update. |
| timeout | The number of miliseconds to wait for an event. 0 means do not wait and -1 means wait foreevr. |
Definition at line 188 of file event.c.
References fbtk_click(), fbtk_get_root_widget(), fbtk_input(), fbtk_warp_pointer(), gui_resize(), and root.
Referenced by framebuffer_run().
| void fbtk_input | ( | fbtk_widget_t * | root, |
| nsfb_event_t * | event | ||
| ) |
Insert input into toolkit.
Definition at line 45 of file event.c.
References FBTK_CBT_INPUT, fbtk_get_root_widget(), fbtk_post_callback(), NSLOG, and root.
Referenced by fbtk_event(), and osk_click().
| int fbtk_keycode_to_ucs4 | ( | int | code, |
| fbtk_modifier_type | mods | ||
| ) |
Convert a framebuffer keycode to ucs4.
Character mapping between keycode with modifier state and ucs-4.
Definition at line 301 of file event.c.
References FBTK_MOD_CLEAR, FBTK_MOD_LCTRL, FBTK_MOD_LSHIFT, FBTK_MOD_RCTRL, FBTK_MOD_RSHIFT, keymap, NOF_ELEMENTS, NS_KEY_CLEAR_SELECTION, NS_KEY_COPY_SELECTION, NS_KEY_CUT_SELECTION, NS_KEY_DELETE_LINE, NS_KEY_PASTE, NS_KEY_SELECT_ALL, and sh_keymap.
Referenced by fb_browser_window_input(), and text_input().
| bool fbtk_tgrab_pointer | ( | fbtk_widget_t * | widget | ) |
Toggle pointer grab.
Toggles the movement grab for a widget.
| widget | The widget trying to grab the movement. |
Definition at line 95 of file event.c.
References fbtk_get_root_widget(), and root.
Referenced by fb_browser_window_click(), fb_browser_window_move(), hscrollarea_click(), and vscrollarea_click().
| void fbtk_warp_pointer | ( | fbtk_widget_t * | widget, |
| int | x, | ||
| int | y, | ||
| bool | relative | ||
| ) |
Move pointer.
Move the pointer cursor to a given location.
| widget | any tookit widget. |
| x | movement in horizontal plane. |
| y | movement in vertical plane. |
| relative | Wheter the /a x and /a y should be considered relative to current pointer position. |
Definition at line 117 of file event.c.
References FBTK_CBT_POINTERENTER, FBTK_CBT_POINTERLEAVE, FBTK_CBT_POINTERMOVE, fbtk_get_absx(), fbtk_get_absy(), fbtk_get_root_widget(), fbtk_get_widget_at(), fbtk_post_callback(), fbtk_widget_s::height, root, and fbtk_widget_s::width.
Referenced by fbtk_event().
|
static |
Definition at line 264 of file event.c.
Referenced by fbtk_keycode_to_ucs4().
|
static |
Definition at line 281 of file event.c.
Referenced by fbtk_keycode_to_ucs4().