From befa5e6ed356e019fa82b7ebf9be90913aad3edb Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Fri, 27 Mar 2015 09:36:19 +0000 Subject: To avoid namespace conflicts with ncurses add NetSurf key prefix. Adds a NetSurf key code prefix of NS_ to all key codes. --- render/box_textarea.c | 8 ++++---- render/html_interaction.c | 8 ++++---- render/textplain.c | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'render') diff --git a/render/box_textarea.c b/render/box_textarea.c index b129f1257..aaee47170 100644 --- a/render/box_textarea.c +++ b/render/box_textarea.c @@ -43,14 +43,14 @@ bool box_textarea_keypress(html_content *html, struct box *box, uint32_t key) if (gadget->type != GADGET_TEXTAREA) { switch (key) { - case KEY_NL: - case KEY_CR: + case NS_KEY_NL: + case NS_KEY_CR: if (form) form_submit(content_get_url(c), html->bw, form, 0); return true; - case KEY_TAB: + case NS_KEY_TAB: { struct form_control *next_input; /* Find next text entry field that is actually @@ -71,7 +71,7 @@ bool box_textarea_keypress(html_content *html, struct box *box, uint32_t key) } return true; - case KEY_SHIFT_TAB: + case NS_KEY_SHIFT_TAB: { struct form_control *prev_input; /* Find previous text entry field that is actually diff --git a/render/html_interaction.c b/render/html_interaction.c index 4d2234fe3..c2cca60e2 100644 --- a/render/html_interaction.c +++ b/render/html_interaction.c @@ -1048,19 +1048,19 @@ bool html_keypress(struct content *c, uint32_t key) } switch (key) { - case KEY_COPY_SELECTION: + case NS_KEY_COPY_SELECTION: selection_copy_to_clipboard(sel); return true; - case KEY_CLEAR_SELECTION: + case NS_KEY_CLEAR_SELECTION: selection_clear(sel, true); return true; - case KEY_SELECT_ALL: + case NS_KEY_SELECT_ALL: selection_select_all(sel); return true; - case KEY_ESCAPE: + case NS_KEY_ESCAPE: if (selection_defined(sel)) { selection_clear(sel, true); return true; diff --git a/render/textplain.c b/render/textplain.c index 9a63da1dd..72feea746 100644 --- a/render/textplain.c +++ b/render/textplain.c @@ -743,19 +743,19 @@ bool textplain_keypress(struct content *c, uint32_t key) struct selection *sel = &text->sel; switch (key) { - case KEY_COPY_SELECTION: + case NS_KEY_COPY_SELECTION: selection_copy_to_clipboard(sel); return true; - case KEY_CLEAR_SELECTION: + case NS_KEY_CLEAR_SELECTION: selection_clear(sel, true); return true; - case KEY_SELECT_ALL: + case NS_KEY_SELECT_ALL: selection_select_all(sel); return true; - case KEY_ESCAPE: + case NS_KEY_ESCAPE: if (selection_defined(sel)) { selection_clear(sel, true); return true; -- cgit v1.2.3