|
|
| version 1.6, 2007/01/02 16:43:48 | version 1.7, 2007/01/12 19:09:58 |
|---|---|
| Line 1692 cb_radio(GtkRadioAction *action, GtkRadi | Line 1692 cb_radio(GtkRadioAction *action, GtkRadi |
| * create menubar | * create menubar |
| */ | */ |
| static GtkWidget *menubar; | static GtkWidget *menubar; |
| static guint menubar_timerid; | |
| #define EVENT_MASK (GDK_LEAVE_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK) | |
| static gboolean | |
| menubar_timeout(gpointer p) | |
| { | |
| UNUSED(p); | |
| if (menubar_timerid) { | |
| g_source_remove(menubar_timerid); | |
| menubar_timerid = 0; | |
| } | |
| if (scrnmode & SCRNMODE_FULLSCREEN) { | |
| xmenu_hide(); | |
| } | |
| return TRUE; | |
| } | |
| /* | |
| - Signal: gboolean GtkWidget::enter_notify_event (GtkWidget *widget, | |
| GdkEventCrossing *event, gpointer user_data) | |
| */ | |
| static gboolean | |
| enter_notify_evhandler(GtkWidget *w, GdkEventCrossing *ev, gpointer p) | |
| { | |
| UNUSED(w); | |
| UNUSED(ev); | |
| UNUSED(p); | |
| if (menubar_timerid) { | |
| g_source_remove(menubar_timerid); | |
| menubar_timerid = 0; | |
| } | |
| return TRUE; | |
| } | |
| /* | |
| - Signal: gboolean GtkWidget::leave_notify_event (GtkWidget *widget, | |
| GdkEventCrossing *event, gpointer user_data) | |
| */ | |
| static gboolean | |
| leave_notify_evhandler(GtkWidget *w, GdkEventCrossing *ev, gpointer p) | |
| { | |
| UNUSED(w); | |
| UNUSED(ev); | |
| UNUSED(p); | |
| if (menubar_timerid) { | |
| g_source_remove(menubar_timerid); | |
| menubar_timerid = 0; | |
| } | |
| if (scrnmode & SCRNMODE_FULLSCREEN) { | |
| menubar_timerid = g_timeout_add(1000, menubar_timeout, NULL); | |
| } | |
| return TRUE; | |
| } | |
| static void | static void |
| equip_fddrive(GtkUIManager *ui_manager, guint no) | equip_fddrive(GtkUIManager *ui_manager, guint no) |
| Line 1793 create_menu(void) | Line 1858 create_menu(void) |
| } | } |
| menubar = gtk_ui_manager_get_widget(menu_hdl.ui_manager, "/MainMenu"); | menubar = gtk_ui_manager_get_widget(menu_hdl.ui_manager, "/MainMenu"); |
| gtk_widget_add_events(menubar, EVENT_MASK); | |
| g_signal_connect(GTK_OBJECT(menubar), "enter_notify_event", | |
| GTK_SIGNAL_FUNC(enter_notify_evhandler), NULL); | |
| g_signal_connect(GTK_OBJECT(menubar), "leave_notify_event", | |
| GTK_SIGNAL_FUNC(leave_notify_evhandler), NULL); | |
| return menubar; | return menubar; |
| } | } |
| Line 1811 xmenu_show(void) | Line 1883 xmenu_show(void) |
| } | } |
| void | void |
| xmenu_toggle_menu(void) | |
| { | |
| if (GTK_WIDGET_VISIBLE(menubar)) | |
| xmenu_hide(); | |
| else | |
| xmenu_show(); | |
| } | |
| void | |
| xmenu_select_screen(UINT8 mode) | xmenu_select_screen(UINT8 mode) |
| { | { |