diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/findbar.cc | 10 | ||||
-rw-r--r-- | src/keys.cc | 8 | ||||
-rw-r--r-- | src/menu.cc | 6 | ||||
-rw-r--r-- | src/ui.cc | 36 | ||||
-rw-r--r-- | src/uicmd.cc | 22 | ||||
-rw-r--r-- | src/xembed.cc | 2 |
6 files changed, 42 insertions, 42 deletions
diff --git a/src/findbar.cc b/src/findbar.cc index 915d355a..49cffcd6 100644 --- a/src/findbar.cc +++ b/src/findbar.cc @@ -34,8 +34,8 @@ public: int MyInput::handle(int e) { _MSG("findbar MyInput::handle()\n"); - int ret = 1, k = event_key(); - unsigned modifier = event_state() & (FL_SHIFT | FL_CTRL | FL_ALT | FL_META); + int ret = 1, k = Fl::event_key(); + unsigned modifier = Fl::event_state() & (FL_SHIFT| FL_CTRL| FL_ALT|FL_META); if (e == KEY) { if (k == FL_Left || k == FL_Right) { @@ -92,7 +92,7 @@ void Findbar::search_cb2(Widget *widget, void *vfb) * Somehow fltk even regards the first loss of focus for the * window as a WHEN_ENTER_KEY_ALWAYS event. */ - if (event_key() == FL_Enter) + if (Fl::event_key() == FL_Enter) search_cb(widget, vfb); } @@ -177,8 +177,8 @@ Findbar::~Findbar() int Findbar::handle(int event) { int ret = 0; - int k = event_key(); - unsigned modifier = event_state() & (FL_SHIFT | FL_CTRL | FL_ALT | FL_META); + int k = Fl::event_key(); + unsigned modifier = Fl::event_state() & (FL_SHIFT| FL_CTRL| FL_ALT|FL_META); if (event == KEY && modifier == 0 && k == FL_Escape) { hide(); diff --git a/src/keys.cc b/src/keys.cc index a3430c72..2343ccbb 100644 --- a/src/keys.cc +++ b/src/keys.cc @@ -173,16 +173,16 @@ KeysCommand_t Keys::getKeyCmd() KeysCommand_t ret = KEYS_NOP; KeyBinding_t keyNode; // We're only interested in some flags - keyNode.modifier = fltk::event_state() & + keyNode.modifier = Fl::event_state() & (FL_SHIFT | FL_CTRL | FL_ALT | FL_META); if (keyNode.modifier == FL_SHIFT && - ispunct(fltk::event_text()[0])) { + ispunct(Fl::event_text()[0])) { // Get key code for a shifted character - keyNode.key = fltk::event_text()[0]; + keyNode.key = Fl::event_text()[0]; keyNode.modifier = 0; } else { - keyNode.key = fltk::event_key(); + keyNode.key = Fl::event_key(); } _MSG("getKeyCmd: key=%d, mod=%d\n", keyNode.key, keyNode.modifier); diff --git a/src/menu.cc b/src/menu.cc index e032c189..37d78938 100644 --- a/src/menu.cc +++ b/src/menu.cc @@ -57,7 +57,7 @@ public: int button () { return EventButton; }; void draw(); int handle(int e) { - EventButton = event_button(); + EventButton = Fl::event_button(); return Item::handle(e); } }; @@ -139,7 +139,7 @@ static void Menu_open_url_nw_cb(Widget* ) static void Menu_open_url_nt_cb(Widget* ) { int focus = prefs.focus_new_tab ? 1 : 0; - if (event_state(FL_SHIFT)) focus = !focus; + if (Fl::event_state(FL_SHIFT)) focus = !focus; a_UIcmd_open_url_nt(popup_bw, popup_url, focus); } @@ -293,7 +293,7 @@ static void Menu_history_cb(Widget *wid, void *data) // Middle button, open in a new window/tab if (prefs.middle_click_opens_new_tab) { int focus = prefs.focus_new_tab ? 1 : 0; - if (event_state(FL_SHIFT)) focus = !focus; + if (Fl::event_state(FL_SHIFT)) focus = !focus; a_UIcmd_open_url_nt(popup_bw, url, focus); } else { a_UIcmd_open_url_nw(popup_bw, url); @@ -108,18 +108,18 @@ public: */ int CustInput::handle(int e) { - int k = event_key(); + int k = Fl::event_key(); _MSG("CustInput::handle event=%d\n", e); // We're only interested in some flags - unsigned modifier = event_state() & (FL_SHIFT | FL_CTRL | FL_ALT); + unsigned modifier = Fl::event_state() & (FL_SHIFT | FL_CTRL | FL_ALT); // Don't focus with arrow keys - if (e == FOCUS && + if (e == FL_FOCUS && (k == FL_Up || k == FL_Down || k == FL_Left || k == FL_Right)) { return 0; - } else if (e == KEY) { + } else if (e == FL_KEYBOARD) { if (modifier == FL_CTRL) { if (k == 'l') { // Make text selected when already focused. @@ -154,8 +154,8 @@ public: int CustHighlightButton::handle(int e) { - if (e == PASTE) { - const char* t = event_text(); + if (e == FL_PASTE) { + const char* t = Fl::event_text(); if (t && *t) { a_UIcmd_set_location_text(a_UIcmd_get_bw_by_widget(this), t); a_UIcmd_open_urlstr(a_UIcmd_get_bw_by_widget(this), t); @@ -207,7 +207,7 @@ public: */ static void search_cb(Widget *wid, void *data) { - int k = event_key(); + int k = Fl::event_key(); if (k == 1) { a_UIcmd_search_dialog(a_UIcmd_get_bw_by_widget(wid)); @@ -243,7 +243,7 @@ static void help_cb(Widget *w, void *) */ static void filemenu_cb(Widget *wid, void *) { - int k = event_key(); + int k = Fl::event_key(); if (k == 1 || k == 3) { a_UIcmd_file_popup(a_UIcmd_get_bw_by_widget(wid), wid); } @@ -256,7 +256,7 @@ static void clear_cb(Widget *w, void *data) { UI *ui = (UI*)data; - int k = event_key(); + int k = Fl::event_key(); if (k == 1) { ui->set_location(""); ui->focus_location(); @@ -288,7 +288,7 @@ static void location_cb(Widget *wid, void *data) * other events we're not interested in. For instance pressing * The Back or Forward, buttons, or the first click on a rendered * page. BUG: this must be investigated and reported to FLTK2 team */ - if (event_key() == FL_Enter) { + if (Fl::event_key() == FL_Enter) { a_UIcmd_open_urlstr(a_UIcmd_get_bw_by_widget(i), i->value()); } if (ui->get_panelmode() == UI_TEMPORARILY_SHOW_PANELS) { @@ -303,7 +303,7 @@ static void location_cb(Widget *wid, void *data) static void b1_cb(Widget *wid, void *cb_data) { int bn = VOIDP2INT(cb_data); - int k = event_key(); + int k = Fl::event_key(); if (k && k <= 7) { _MSG("[%s], mouse button %d was pressed\n", button_names[bn], k); _MSG("mouse button %d was pressed\n", k); @@ -373,7 +373,7 @@ static void b1_cb(Widget *wid, void *cb_data) */ static void bugmeter_cb(Widget *wid, void *data) { - int k = event_key(); + int k = Fl::event_key(); if (k == 1) { a_UIcmd_view_page_bugs(a_UIcmd_get_bw_by_widget(wid)); } else if (k == 3) { @@ -778,14 +778,14 @@ UI::~UI() */ int UI::handle(int event) { - _MSG("UI::handle event=%d (%d,%d)\n", event, event_x(), event_y()); + _MSG("UI::handle event=%d (%d,%d)\n", event, Fl::event_x(), Fl::event_y()); _MSG("Panel->h()=%d Main->h()=%d\n", Panel->h() , Main->h()); int ret = 0; - if (event == KEY) { + if (event == FL_KEYBOARD) { return 0; // Receive as shortcut - } else if (event == SHORTCUT) { + } else if (event == FL_SHORTCUT) { KeysCommand_t cmd = Keys::getKeyCmd(); if (cmd == KEYS_NOP) { // Do nothing @@ -851,11 +851,11 @@ int UI::handle(int event) a_Timeout_add(0.0, a_UIcmd_close_all_bw, NULL); ret = 1; } - } else if (event == PUSH) { + } else if (event == FL_PUSH) { if (prefs.middle_click_drags_page == 0 && - event_button() == FL_MIDDLE_MOUSE && + Fl::event_button() == FL_MIDDLE_MOUSE && !a_UIcmd_pointer_on_link(a_UIcmd_get_bw_by_widget(this))) { - if (Main->Rectangle::contains (event_x (), event_y ())) { + if (Main->Rectangle::contains (Fl::event_x (), Fl::event_y ())) { /* Offer the event to Main's children (form widgets) */ int save_x = e_x, save_y = e_y; diff --git a/src/uicmd.cc b/src/uicmd.cc index 6b3287a6..21b069cf 100644 --- a/src/uicmd.cc +++ b/src/uicmd.cc @@ -246,10 +246,10 @@ public: // Don't focus with arrow keys _MSG("CustTabGroup::handle %d\n", e); fltk::Rectangle r(btn_x,0,BTN_W,BTN_H); - if (e == KEY) { - int k = event_key(); + if (e == FL_KEYBOARD) { + int k = Fl::event_key(); // We're only interested in some flags - unsigned modifier = event_state() & (FL_SHIFT | FL_CTRL | FL_ALT); + unsigned modifier = Fl::event_state() & (FL_SHIFT | FL_CTRL | FL_ALT); if (k == FL_Up || k == FL_Down || k == FL_Tab) { return 0; } else if (k == FL_Left || k == FL_Right) { @@ -268,9 +268,9 @@ public: BrowserWindow *bw = a_UIcmd_get_bw_by_widget(selected_child()); const char *title = a_History_get_title(NAV_TOP_UIDX(bw), 1); a_UIcmd_set_page_title(bw, title ? title : ""); - } else if (e == MOVE) { + } else if (e == FL_MOVE) { CustShrinkTabPager *cstp = (CustShrinkTabPager *) pager(); - if (event_inside(r) && children() > 1) { + if (Fl::event_inside(r) && children() > 1) { /* We're inside the button area */ cstp->btn_highlight(true); if (prefs.show_tooltip) { @@ -295,12 +295,12 @@ public: } } } - } else if (e == PUSH && event_inside(r) && - event_button() == 1 && children() > 1) { + } else if (e == FL_PUSH && Fl::event_inside(r) && + Fl::event_button() == 1 && children() > 1) { buttonPushed = true; return 1; /* non-zero */ - } else if (e == RELEASE) { - if (event_inside(r) && event_button() == 1 && + } else if (e == FL_RELEASE) { + if (Fl::event_inside(r) && Fl::event_button() == 1 && children() > 1 && buttonPushed) { a_UIcmd_close_bw(a_UIcmd_get_bw_by_widget(selected_child())); } else { @@ -308,13 +308,13 @@ public: cstp->btn_highlight(false); } buttonPushed = false; - } else if (e == DRAG) { + } else if (e == FL_DRAG) { /* Ignore this event */ return 1; } int ret = TabGroup::handle(e); - if (e == PUSH) { + if (e == FL_PUSH) { /* WORKAROUND: FLTK raises the window on unhandled clicks, * which we do not want. */ diff --git a/src/xembed.cc b/src/xembed.cc index 04a4362a..49828ffe 100644 --- a/src/xembed.cc +++ b/src/xembed.cc @@ -71,7 +71,7 @@ Xembed::sendXembedEvent(uint32_t message) { int Xembed::handle(int e) { - if (e == fltk::PUSH) + if (e == FL_PUSH) sendXembedEvent(XEMBED_REQUEST_FOCUS); return Window::handle(e); |