From b15a6af3d29ad844bdd44eb6181d069958afab5b Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Fri, 16 May 2008 09:37:22 +0000 Subject: s/wchar_t/uint32_t/g We always assumed that the keycode type was 32bits wide, anyway. wchar_t isn't guaranteed to be that big, so isn't remotely portable. svn path=/trunk/netsurf/; revision=4165 --- desktop/browser.h | 6 +++--- desktop/textinput.c | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'desktop') diff --git a/desktop/browser.h b/desktop/browser.h index ed002b2c5..bdada0c73 100644 --- a/desktop/browser.h +++ b/desktop/browser.h @@ -24,8 +24,8 @@ #ifndef _NETSURF_DESKTOP_BROWSER_H_ #define _NETSURF_DESKTOP_BROWSER_H_ +#include #include -#include #include #include "render/html.h" @@ -43,7 +43,7 @@ struct bitmap; typedef bool (*browser_caret_callback)(struct browser_window *bw, - wchar_t key, void *p); + uint32_t key, void *p); typedef bool (*browser_paste_callback)(struct browser_window *bw, const char *utf8, unsigned utf8_len, bool last, void *p); typedef void (*browser_move_callback)(struct browser_window *bw, @@ -216,7 +216,7 @@ void browser_window_mouse_track(struct browser_window *bw, void browser_window_mouse_drag_end(struct browser_window *bw, browser_mouse_state mouse, int x, int y); -bool browser_window_key_press(struct browser_window *bw, wchar_t key); +bool browser_window_key_press(struct browser_window *bw, uint32_t key); bool browser_window_paste_text(struct browser_window *bw, const char *utf8, unsigned utf8_len, bool last); void browser_window_form_select(struct browser_window *bw, diff --git a/desktop/textinput.c b/desktop/textinput.c index 0aa7b29f7..c2678d021 100644 --- a/desktop/textinput.c +++ b/desktop/textinput.c @@ -49,9 +49,9 @@ struct caret ghost_caret; static bool browser_window_textarea_callback(struct browser_window *bw, - wchar_t key, void *p); + uint32_t key, void *p); static bool browser_window_input_callback(struct browser_window *bw, - wchar_t key, void *p); + uint32_t key, void *p); static void browser_window_place_caret(struct browser_window *bw, int x, int y, int height, browser_caret_callback caret_cb, @@ -302,7 +302,7 @@ void browser_window_textarea_click(struct browser_window *bw, * it would have claimed it if it could. */ bool browser_window_textarea_callback(struct browser_window *bw, - wchar_t key, void *p) + uint32_t key, void *p) { struct box *textarea = p; struct box *inline_container = @@ -809,7 +809,7 @@ void browser_window_input_click(struct browser_window* bw, * it would have claimed it if it could. */ bool browser_window_input_callback(struct browser_window *bw, - wchar_t key, void *p) + uint32_t key, void *p) { struct box *input = (struct box *)p; struct box *text_box = input->children->children; @@ -1147,7 +1147,7 @@ void browser_window_remove_caret(struct browser_window *bw) * \param key The UCS4 character codepoint * \return true if key handled, false otherwise */ -bool browser_window_key_press(struct browser_window *bw, wchar_t key) +bool browser_window_key_press(struct browser_window *bw, uint32_t key) { /* keys that take effect wherever the caret is positioned */ switch (key) { -- cgit v1.2.3