Re: Gtk::Main::signal_key_snooper()
- From: Omar Barneto <obarneto hasar com>
- To: Шевчук Андрій Ярославович <a shevchuk lt ukrsotsbank com>
- Cc: GTKMM-LIST gnome org
- Subject: Re: Gtk::Main::signal_key_snooper()
- Date: Tue, 27 Jun 2006 09:20:26 -0300
#include <gtkmm/main.h>
#include <gtkmm/window.h>
class MainWindow : public Gtk::Window
{
public:
MainWindow() { show_all(); }
int KeySnooper(Gtk::Widget *w,GdkEventKey *e)
{
printf("Key %x (%s) type %s\n",e->keyval,e->string,
e->type == GTK_KEY_RELEASE ? "KEY_PRESS"
: "KEY_RELEASE);
return true
}
};
int main( int argc,char **argv)
{
Gtk::Main kit(argc,argv);
MainWindow m;
kit.signal_key_snooper().connect(sigc::mem_fun(m,&MainWindow::KeySnooper));
Gtk::Main::run(m);
return 0;
}
Шевчук Андрій Ярославович wrote:
Hi!
I need example, how to use Gtk::Main::signal_key_snooper().connect...
thanks.
---
Sorry for my bad English...
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]