diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2011-07-26 18:50:29 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2011-07-26 18:50:29 +0200 |
commit | e0781f0390291e264e6dd9c17beae1342e87f9a2 (patch) | |
tree | aac2f19ab7e527180952db15867d8daaa23c4a91 /src/gui/gtk | |
parent | 2fec84314433c2b7152c6c47b1172a621257fe6f (diff) | |
download | weechat-e0781f0390291e264e6dd9c17beae1342e87f9a2.zip |
core: add mouse support (task #5435), free cursor movement, hook_focus, fix bugs with key "^" (bug #32072, bug #21381), fix bugs with bar windows, completion and /buffer
New features and bugs fixed:
- mouse support: new command /mouse, new option weechat.look.mouse, new key context "mouse"
- free movement of cursor: new command /cursor, new key context "cursor"
- new hook_focus (used by cursor and mouse)
- info "cursor_mode"
- bugs fixed with key "^"
- allow plugin name in /buffer name
- fix bugs with bar windows: do not create bar windows for hidden bars
- fix completion bug when two words for completion are equal but with different case
- automatic scroll direction in /bar scroll (x/y is now optional)
Diffstat (limited to 'src/gui/gtk')
-rw-r--r-- | src/gui/gtk/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/gui/gtk/Makefile.am | 1 | ||||
-rw-r--r-- | src/gui/gtk/gui-gtk-mouse.c | 94 | ||||
-rw-r--r-- | src/gui/gtk/gui-gtk-window.c | 10 |
4 files changed, 106 insertions, 0 deletions
diff --git a/src/gui/gtk/CMakeLists.txt b/src/gui/gtk/CMakeLists.txt index d40e6b6f6..e6596205d 100644 --- a/src/gui/gtk/CMakeLists.txt +++ b/src/gui/gtk/CMakeLists.txt @@ -25,6 +25,7 @@ gui-gtk-chat.c gui-gtk-color.c gui-gtk-key.c gui-gtk-main.c +gui-gtk-mouse.c gui-gtk-term.c gui-gtk-window.c) diff --git a/src/gui/gtk/Makefile.am b/src/gui/gtk/Makefile.am index 6f84e647f..01833e78d 100644 --- a/src/gui/gtk/Makefile.am +++ b/src/gui/gtk/Makefile.am @@ -37,6 +37,7 @@ weechat_gtk_SOURCES = gui-gtk-bar-window.c \ gui-gtk-color.c \ gui-gtk-key.c \ gui-gtk-main.c \ + gui-gtk-mouse.c \ gui-gtk-term.c \ gui-gtk-window.c \ gui-gtk.h diff --git a/src/gui/gtk/gui-gtk-mouse.c b/src/gui/gtk/gui-gtk-mouse.c new file mode 100644 index 000000000..8d7533d8d --- /dev/null +++ b/src/gui/gtk/gui-gtk-mouse.c @@ -0,0 +1,94 @@ +/* + * Copyright (C) 2011 Sebastien Helleu <flashcode@flashtux.org> + * + * This file is part of WeeChat, the extensible chat client. + * + * WeeChat is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * WeeChat is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with WeeChat. If not, see <http://www.gnu.org/licenses/>. + */ + +/* + * gui-gtk-mouse.c: mouse functions for Gtk GUI + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "../../core/weechat.h" +#include "../gui-mouse.h" + + +/* + * gui_mouse_enable: enable mouse + */ + +void +gui_mouse_enable () +{ + /* This function does nothing in Gtk GUI */ +} + +/* + * gui_mouse_disable: disable mouse + */ + +void +gui_mouse_disable () +{ + /* This function does nothing in Gtk GUI */ +} + +/* + * gui_mouse_display_state: display state of mouse + */ + +void +gui_mouse_display_state () +{ + /* This function does nothing in Gtk GUI */ +} + +/* + * gui_mouse_grab_init: init "grab mouse" mode + */ + +void +gui_mouse_grab_init () +{ + /* This function does nothing in Gtk GUI */ +} + +/* + * gui_mouse_grab_code2key: get key name with a mouse code + */ + +const char * +gui_mouse_grab_code2key (const char *code) +{ + (void) code; + + /* This function does nothing in Gtk GUI */ + + return NULL; +} + +/* + * gui_mouse_grab_end: end "grab mouse" mode + */ + +void +gui_mouse_grab_end () +{ + /* This function does nothing in Gtk GUI */ +} diff --git a/src/gui/gtk/gui-gtk-window.c b/src/gui/gtk/gui-gtk-window.c index c7bd94041..baa0dd326 100644 --- a/src/gui/gtk/gui-gtk-window.c +++ b/src/gui/gtk/gui-gtk-window.c @@ -849,6 +849,16 @@ gui_window_set_title (const char *title) } /* + * gui_window_move_cursor: move cursor on screen (for cursor mode) + */ + +void +gui_window_move_cursor () +{ + /* TODO: write this function for Gtk */ +} + +/* * gui_window_term_display_infos: display some infos about terminal and colors */ |