|
|
| version 1.1, 2004/07/14 16:01:40 | version 1.4, 2007/01/02 16:43:48 |
|---|---|
| Line 12 | Line 12 |
| * 2. Redistributions in binary form must reproduce the above copyright | * 2. Redistributions in binary form must reproduce the above copyright |
| * notice, this list of conditions and the following disclaimer in the | * notice, this list of conditions and the following disclaimer in the |
| * documentation and/or other materials provided with the distribution. | * documentation and/or other materials provided with the distribution. |
| * 3. The name of the author may not be used to endorse or promote products | |
| * derived from this software without specific prior written permission. | |
| * | * |
| * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
| * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
| Line 120 key_press_evhandler(GtkWidget *w, GdkEve | Line 118 key_press_evhandler(GtkWidget *w, GdkEve |
| UNUSED(w); | UNUSED(w); |
| UNUSED(p); | UNUSED(p); |
| if ((ev->keyval == GDK_F12) && (np2oscfg.F12KEY == 0)) | if (ev->keyval == GDK_F11) |
| xmenu_select_screen(scrnmode ^ SCRNMODE_FULLSCREEN); | |
| else if ((ev->keyval == GDK_F12) && (np2oscfg.F12KEY == 0)) | |
| xmenu_toggle_item(NULL, "mousemode", !np2oscfg.MOUSE_SW); | xmenu_toggle_item(NULL, "mousemode", !np2oscfg.MOUSE_SW); |
| else | else |
| gtkkbd_keydown(ev->keyval); | gtkkbd_keydown(ev->keyval); |
| Line 196 button_release_evhandler(GtkWidget *w, G | Line 196 button_release_evhandler(GtkWidget *w, G |
| return TRUE; | return TRUE; |
| } | } |
| /* | |
| - Signal: gboolean GtkWidget::window_state_event (GtkWidget *widget, | |
| GdkEventWindowState *event, gpointer user_data) | |
| */ | |
| static gboolean | |
| window_state_evhandler(GtkWidget *w, GdkEventWindowState *ev, gpointer p) | |
| { | |
| UNUSED(w); | |
| UNUSED(p); | |
| if (ev->new_window_state & GDK_WINDOW_STATE_FULLSCREEN) { | |
| /* Nothing to do. */ | |
| } | |
| return TRUE; | |
| } | |
| /* | /* |
| * misc | * misc |
| Line 319 gui_gtk_widget_create(void) | Line 336 gui_gtk_widget_create(void) |
| GTK_SIGNAL_FUNC(button_press_evhandler), NULL); | GTK_SIGNAL_FUNC(button_press_evhandler), NULL); |
| g_signal_connect(GTK_OBJECT(main_window), "button_release_event", | g_signal_connect(GTK_OBJECT(main_window), "button_release_event", |
| GTK_SIGNAL_FUNC(button_release_evhandler), NULL); | GTK_SIGNAL_FUNC(button_release_evhandler), NULL); |
| g_signal_connect(GTK_OBJECT(main_window), "window_state_event", | |
| GTK_SIGNAL_FUNC(window_state_evhandler), NULL); | |
| g_signal_connect(GTK_OBJECT(drawarea), "configure_event", | g_signal_connect(GTK_OBJECT(drawarea), "configure_event", |
| GTK_SIGNAL_FUNC(configure_evhandler), NULL); | GTK_SIGNAL_FUNC(configure_evhandler), NULL); |
| Line 344 void | Line 363 void |
| gui_gtk_widget_mainloop(void) | gui_gtk_widget_mainloop(void) |
| { | { |
| install_idle_process(); | install_idle_process(); |
| gtk_main(); | gtk_main(); |
| uninstall_idle_process(); | uninstall_idle_process(); |