diff options
author | Witold Filipczyk <gglater62@gmail.com> | 2015-03-27 09:36:19 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2015-03-27 09:36:19 +0000 |
commit | befa5e6ed356e019fa82b7ebf9be90913aad3edb (patch) | |
tree | 5157bdd1ad1c4f54eda26894af6843afc7050322 /render | |
parent | 9d6ab0475f6cd259bc6135696900bad9295f5bcb (diff) | |
download | netsurf-befa5e6ed356e019fa82b7ebf9be90913aad3edb.tar.gz netsurf-befa5e6ed356e019fa82b7ebf9be90913aad3edb.tar.bz2 |
To avoid namespace conflicts with ncurses add NetSurf key prefix.
Adds a NetSurf key code prefix of NS_ to all key codes.
Diffstat (limited to 'render')
-rw-r--r-- | render/box_textarea.c | 8 | ||||
-rw-r--r-- | render/html_interaction.c | 8 | ||||
-rw-r--r-- | render/textplain.c | 8 |
3 files changed, 12 insertions, 12 deletions
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; |