diff --git a/desmume/src/frontend/posix/gtk-glade/callbacks.cpp b/desmume/src/frontend/posix/gtk-glade/callbacks.cpp deleted file mode 100644 index cce96dc2d..000000000 --- a/desmume/src/frontend/posix/gtk-glade/callbacks.cpp +++ /dev/null @@ -1,545 +0,0 @@ -/* callbacks.c - this file is part of DeSmuME - * - * Copyright (C) 2007-2015 DeSmuME Team - * Copyright (C) 2007 Damien Nozay (damdoum) - * Copyright (C) 2007 Pascal Giard (evilynux) - * Author: damdoum at users.sourceforge.net - * - * This file 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 2, or (at your option) - * any later version. - * - * This file 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 this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "callbacks.h" - -#include "../GPU.h" - -#define SAVESTATE_SLOT(x) ((x) < 10 ? (x) : 0) - -/* globals */ -int Frameskip = 0; -gboolean ScreenRightForce=FALSE; -gboolean ScreenRight=FALSE; -gboolean ScreenGap=FALSE; -gboolean ScreenNoGap=FALSE; -gboolean ScreenInvert=FALSE; - -/* ******** Savestate menu items handling ******** */ - -static void set_menuitem_label(GtkWidget * w, char * text ) -{ - GtkLabel * child; - - if ( GTK_BIN(w)->child ) - { - child = (GtkLabel*)GTK_BIN(w)->child; - gtk_label_set_text(child, text); - } -} - -static void clear_savestate_menu(const char * cb_name, u8 num) -{ - GtkWidget * w; - char cb[40]; - char text[40]; - - sprintf( cb, "%s%d", cb_name, num); - sprintf( text, _("State %d (empty)"), num); - w = glade_xml_get_widget(xml, cb); - set_menuitem_label( w, text ); -} - -static void update_savestate_menu(const char * cb_name, u8 num) -{ - GtkWidget * w; - char cb[40]; - - snprintf( cb, 39, "%s%d", cb_name, num); - w = glade_xml_get_widget(xml, cb); - set_menuitem_label( w, savestates[SAVESTATE_SLOT(num)].date ); -} - -static void update_savestates_menu() -{ - u8 i; - - for( i = 1; i <= NB_STATES; i++ ) - { - if( savestates[SAVESTATE_SLOT(i)].exists == TRUE ) - { - update_savestate_menu("loadstate", i); - update_savestate_menu("savestate", i); - } - else - { - clear_savestate_menu("loadstate", i); - clear_savestate_menu("savestate", i); - } - } -} - -static void update_savestate(u8 num) -{ - desmume_pause(); - savestate_slot(SAVESTATE_SLOT(num)); - update_savestate_menu("savestate", num); - update_savestate_menu("loadstate", num); - desmume_resume(); -} - -/* inline & protos */ - -inline void SET_SENSITIVE(const gchar *w, gboolean b) { - gtk_widget_set_sensitive( - glade_xml_get_widget(xml, w), TRUE); -} - -void enable_rom_features() { - scan_savestates(); - update_savestates_menu(); - SET_SENSITIVE("menu_exec", TRUE); - SET_SENSITIVE("menu_pause", TRUE); - SET_SENSITIVE("menu_reset", TRUE); - SET_SENSITIVE("wgt_Exec", TRUE); - SET_SENSITIVE("wgt_Reset", TRUE); -} - -static void MAINWINDOW_RESIZE() { - GtkWidget * spacer1 = glade_xml_get_widget(xml, "misc_sep3"); - GtkWidget * spacer2 = glade_xml_get_widget(xml, "misc_sep4"); - int dim1,dim2; - BOOL rotate = (ScreenRotate==90.0 || ScreenRotate==270.0 ); - - dim1 = dim2 = 66 * ScreenCoeff_Size[0]; - - /* sees whether we want a gap */ - if (!ScreenGap) dim1 = dim2 = -1; - - if (ScreenNoGap) { - gtk_widget_hide (spacer1); - gtk_widget_hide (spacer2); - } - else - { - gtk_widget_show (spacer1); - gtk_widget_show (spacer2); - } - - if (ScreenRight == rotate) { - if (ScreenRight) - dim2 = -1; - else - dim1 = -1; - } else { - dim1 = dim2 = -1; - } - gtk_widget_set_usize(spacer1, dim1, -1); - gtk_widget_set_usize(spacer2, -1, dim2); - gtk_window_resize ((GtkWindow*)pWindow,1,1); -} - -/* MENU FILE ***** ***** ***** ***** */ -void inline ADD_FILTER(GtkWidget * filech, const char * pattern, const char * name) { - GtkFileFilter *pFilter; - pFilter = gtk_file_filter_new(); - gtk_file_filter_add_pattern(pFilter, pattern); - gtk_file_filter_set_name(pFilter, name); - gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(filech), pFilter); -} - -static void file_open() { - desmume_pause(); - - GtkWidget *pFileSelection; - GtkWidget *pParent; - gchar *sChemin; - - pParent = GTK_WIDGET(pWindow); - - /* Creating the selection window */ - pFileSelection = gtk_file_chooser_dialog_new(_("Open..."), - GTK_WINDOW(pParent), - GTK_FILE_CHOOSER_ACTION_OPEN, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OPEN, GTK_RESPONSE_OK, - NULL); - /* On limite les actions a cette fenetre */ - gtk_window_set_modal(GTK_WINDOW(pFileSelection), TRUE); - - ADD_FILTER(pFileSelection, "*.nds", _("Nds binary (.nds)")); - ADD_FILTER(pFileSelection, "*.ds.gba", _("Nds binary with loader (.ds.gba)")); - ADD_FILTER(pFileSelection, "*", _("All files")); - //ADD_FILTER(pFileSelection, "*.zip", "Nds zipped binary"); - - /* Affichage fenetre*/ - switch(gtk_dialog_run(GTK_DIALOG(pFileSelection))) - { - case GTK_RESPONSE_OK: - /* Recuperation du chemin */ - sChemin = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(pFileSelection)); - if(desmume_open((const char*)sChemin) < 0) - { - GtkWidget *pDialog = gtk_message_dialog_new(GTK_WINDOW(pFileSelection), - GTK_DIALOG_MODAL, - GTK_MESSAGE_ERROR, - GTK_BUTTONS_OK, - _("Unable to load :\n%s"), sChemin); - gtk_dialog_run(GTK_DIALOG(pDialog)); - gtk_widget_destroy(pDialog); - } else { - desmume_resume(); - enable_rom_features(); - } - - g_free(sChemin); - break; - default: - break; - } - gtk_widget_destroy(pFileSelection); -} - -void on_menu_open_activate (GtkMenuItem *menuitem, gpointer user_data) { file_open();} -void on_menu_quit_activate (GtkMenuItem *menuitem, gpointer user_data) { gtk_main_quit(); } - -#define SCREENS_PIXEL_SIZE 98304 - -static void Printscreen() -{ - GdkPixbuf *screenshot; - gchar *filename = NULL; - GError *error = NULL; - u8 *rgb; - u16 *gpuFramebuffer = (u16 *)GPU->GetDisplayInfo().masterNativeBuffer; - static int seq = 0; - - rgb = (u8 *) malloc(SCREENS_PIXEL_SIZE*3); - if (!rgb) - return; - for (int i = 0; i < SCREENS_PIXEL_SIZE; i++) { - rgb[(i * 3) + 0] = ((gpuFramebuffer[i] >> 0) & 0x1f) << 3; - rgb[(i * 3) + 1] = ((gpuFramebuffer[i] >> 5) & 0x1f) << 3; - rgb[(i * 3) + 2] = ((gpuFramebuffer[i] >> 10) & 0x1f) << 3; - } - - screenshot = gdk_pixbuf_new_from_data(rgb, - GDK_COLORSPACE_RGB, - FALSE, - 8, - 256, - 192*2, - 256*3, - NULL, - NULL); - - do { - g_free(filename); - filename = g_strdup_printf("./desmume-screenshot-%d.png", seq++); - } - while (g_file_test(filename, G_FILE_TEST_EXISTS)); - - gdk_pixbuf_save(screenshot, filename, "png", &error, NULL); - if (error) { - g_error_free (error); - g_printerr("Failed to save %s", filename); - seq--; - } - - free(rgb); - g_object_unref(screenshot); - g_free(filename); -} -void on_menu_pscreen_activate (GtkMenuItem *menuitem, gpointer user_data) { Printscreen(); } - - -/* MENU SAVES ***** ***** ***** ***** */ -void on_loadstateXX_activate (GtkMenuItem *m, gpointer d) { - int slot = dyn_CAST(int,d); - loadstate_slot(SAVESTATE_SLOT(slot)); -} -void on_savestateXX_activate (GtkMenuItem *m, gpointer d) { - int slot = dyn_CAST(int,d); - update_savestate(slot); -} -void on_savetypeXX_activate (GtkMenuItem *m, gpointer d) { - int type = dyn_CAST(int,d); - desmume_savetype(type); -} - - -/* MENU EMULATION ***** ***** ***** ***** */ -void on_menu_exec_activate (GtkMenuItem *menuitem, gpointer user_data) { desmume_resume(); } -void on_menu_pause_activate (GtkMenuItem *menuitem, gpointer user_data) { desmume_pause(); } -void on_menu_reset_activate (GtkMenuItem *menuitem, gpointer user_data) { desmume_reset(); } -void on_menu_layers_activate (GtkMenuItem *menuitem, gpointer user_data) { - /* we want to hide or show the checkbox for the layers */ - GtkWidget * w1 = glade_xml_get_widget(xml, "wvb_1_Main"); - GtkWidget * w2 = glade_xml_get_widget(xml, "wvb_2_Sub"); - if (gtk_check_menu_item_get_active((GtkCheckMenuItem*)menuitem)==TRUE) { - gtk_widget_show(w1); - gtk_widget_show(w2); - } else { - gtk_widget_hide(w1); - gtk_widget_hide(w2); - } - /* pack the window */ - MAINWINDOW_RESIZE(); -} - -/* SUBMENU FRAMESKIP ***** ***** ***** ***** */ -void on_fsXX_activate (GtkMenuItem *menuitem,gpointer user_data) { - Frameskip = dyn_CAST(int,user_data); -// printf ("setting FS %d %d\n", Frameskip, user_data); -} - - -/* SUBMENU SIZE ***** ***** ***** ***** */ - -static void gtk_table_reattach(GtkTable * table, GtkWidget * w, - guint left_attach, guint right_attach, guint top_attach, guint bottom_attach, - GtkAttachOptions xoptions, GtkAttachOptions yoptions, - guint xpadding, guint ypadding) { - GList *list; - for (list = table->children; list; list = list->next) - { - GtkTableChild *table_child; - table_child = (GtkTableChild *) list->data; - if (table_child->widget == w) { - table_child->left_attach = left_attach; - table_child->right_attach = right_attach; - table_child->top_attach = top_attach; - table_child->bottom_attach = bottom_attach; - table_child->xexpand = (xoptions & GTK_EXPAND) != 0; - table_child->xshrink = (xoptions & GTK_SHRINK) != 0; - table_child->xfill = (xoptions & GTK_FILL) != 0; - table_child->xpadding = xpadding; - table_child->yexpand = (yoptions & GTK_EXPAND) != 0; - table_child->yshrink = (yoptions & GTK_SHRINK) != 0; - table_child->yfill = (yoptions & GTK_FILL) != 0; - table_child->ypadding = ypadding; - break; - } - } -} - -static void rightscreen(BOOL apply) { - GtkWidget *chk = glade_xml_get_widget(xml, "wvb_2_Sub"); - GtkTable *table = (GtkTable *)glade_xml_get_widget(xml, "table_layout"); - - ScreenRight = apply || ScreenRightForce; - if (ScreenRight) { - /* we want to change the layout, lower screen goes right */ - gtk_table_reattach(table, pDrawingArea2, - 3,4, 0,1, (GtkAttachOptions) 0, (GtkAttachOptions) 0, 0,0); - gtk_table_reattach(table, chk, - 4,5, 0,1, (GtkAttachOptions) 0, (GtkAttachOptions) 0, 0,0); - } else { - /* we want to change the layout, lower screen goes down */ - gtk_table_reattach(table, pDrawingArea2, - 1,2, 2,3, (GtkAttachOptions) 0, (GtkAttachOptions) 0, 0,0); - gtk_table_reattach(table, chk, - 0,1, 2,3, (GtkAttachOptions) 0, (GtkAttachOptions) 0, 0,0); - ScreenRight = FALSE; - } - - gtk_widget_queue_resize (GTK_WIDGET (table)); - - /* pack the window */ - MAINWINDOW_RESIZE(); -} -int H=192, W=256; -void resize (float Size1, float Size2) { - // not ready yet to handle different zoom factors - Size2 = Size1; - /* we want to scale drawing areas by a factor (1x,2x or 3x) */ - gtk_widget_set_size_request (pDrawingArea, W * Size1, H * Size1); - gtk_widget_set_size_request (pDrawingArea2, W * Size2, H * Size2); - ScreenCoeff_Size[0] = Size1; - ScreenCoeff_Size[1] = Size2; - /* remove artifacts */ - black_screen(); - /* pack the window */ - MAINWINDOW_RESIZE(); -} -void rotate(float angle) { - BOOL rotated; - if (angle >= 360.0) angle -= 360.0; - ScreenRotate = angle; - rotated = (ScreenRotate==90.0 || ScreenRotate==270.0); - ScreenInvert = (ScreenRotate >= 180.0); - if (rotated) { - H=256; W=192; - } else { - W=256; H=192; - } - rightscreen(rotated); - resize(ScreenCoeff_Size[0],ScreenCoeff_Size[1]); -} - -void on_sizeXX_activate (GtkMenuItem *menuitem, gpointer user_data) { - float f = dyn_CAST(float,user_data); -// printf("setting ZOOM %f\n",f); - resize(f,f); -} - - - -/* MENU CONFIG ***** ***** ***** ***** */ - -void on_menu_controls_activate (GtkMenuItem *menuitem, gpointer user_data) { - edit_controls(); -} - -/* Show joystick controls configuration dialog - FIXME: sdl doesn't detect unplugged joysticks!! */ -void on_menu_joy_controls_activate (GtkMenuItem *menuitem, gpointer -user_data) -{ - GtkDialog * dlg; - GtkDialog * msgbox; - char * text; - - /* At least one joystick connected? - Can't configure joystick if SDL Event loop is already running. */ - if( (nbr_joy < 1) || desmume_running() ) - { - if( nbr_joy < 1 ) - text = _("You don't have any joystick!"); - else - text = _("Can't configure joystick while the game is running!"); - - dlg = (GtkDialog*)glade_xml_get_widget(xml, "wMainW"); - msgbox = (GtkDialog*) - gtk_message_dialog_new((GtkWindow*)dlg, - (GtkDialogFlags) (GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT), - GTK_MESSAGE_INFO, - GTK_BUTTONS_CLOSE, - "%s", - text); - g_signal_connect(G_OBJECT(msgbox), "response", G_CALLBACK(gtk_widget_destroy), NULL); - - gtk_dialog_run( msgbox ); - } - else - { - dlg = (GtkDialog*)glade_xml_get_widget(xml, "wJoyConfDlg"); - init_joy_labels(); - gtk_dialog_run(dlg); - } -} - -void on_menu_audio_on_activate (GtkMenuItem *menuitem, gpointer user_data) { - /* we want set audio emulation ON or OFF */ - if (gtk_check_menu_item_get_active((GtkCheckMenuItem*)menuitem)) { - SPU_Pause(0); - } else { - SPU_Pause(1); - } -} - -void on_menu_gapscreen_activate (GtkMenuItem *menuitem, gpointer user_data) { - /* we want to add a gap between screens */ - ScreenGap = gtk_check_menu_item_get_active((GtkCheckMenuItem*)menuitem); - - /* pack the window */ - MAINWINDOW_RESIZE(); -} - -void on_menu_nogap_activate (GtkMenuItem *menuitem, gpointer user_data) { - /* we'll make both gaps visibility false */ - ScreenNoGap = gtk_check_menu_item_get_active((GtkCheckMenuItem*)menuitem); - - /* pack the window */ - MAINWINDOW_RESIZE(); -} - -void on_menu_rightscreen_activate (GtkMenuItem *menuitem, gpointer user_data) { - ScreenRightForce=gtk_check_menu_item_get_active((GtkCheckMenuItem*)menuitem); - rightscreen(ScreenRightForce); -} - -void on_menu_rotatescreen_activate (GtkMenuItem *menuitem, gpointer user_data) { - /* we want to rotate the screen */ - float angle = dyn_CAST(float,user_data); - rotate(angle); -} - -/* MENU TOOLS ***** ***** ***** ***** */ -void on_menu_IO_regs_activate (GtkMenuItem *menuitem, gpointer user_data) { - GtkWidget * dlg = glade_xml_get_widget(xml_tools, "wtools_1_IOregs"); - gtk_widget_show(dlg); -} -void on_menu_memview_activate (GtkMenuItem *menuitem, gpointer user_data) { - GtkWidget * dlg = glade_xml_get_widget(xml_tools, "wtools_2_MemView"); - gtk_widget_show(dlg); -} -void on_menu_palview_activate (GtkMenuItem *menuitem, gpointer user_data) { - GtkWidget * dlg = glade_xml_get_widget(xml_tools, "wtools_3_PalView"); - gtk_widget_show(dlg); -} -#ifdef GTKGLEXT_AVAILABLE -void on_menu_tileview_activate (GtkMenuItem *menuitem, gpointer user_data) { - GtkWidget * dlg = glade_xml_get_widget(xml_tools, "wtools_4_TileView"); - gtk_widget_show(dlg); -} -#else -void on_menu_tileview_activate (GtkMenuItem *menuitem, gpointer user_data) { - g_printerr("You need gtkglext for the tile viewer\n"); -} -#endif -void on_menu_wtoolsXX_activate (GtkMenuItem *menuitem, gpointer user_data) { - GtkWidget * w = (GtkWidget *) user_data; - gtk_widget_show(w); -} - - -/* MENU ? ***** ***** ***** ***** */ -/* About dialog - FIXME: Add proper copyright */ -void on_menu_apropos_activate (GtkMenuItem *menuitem, gpointer user_data) { - GtkWidget * wAbout = glade_xml_get_widget(xml, "wAboutDlg"); - gtk_about_dialog_set_version((GtkAboutDialog *)wAbout, VERSION); - gtk_widget_show(wAbout); -} - - -/* TOOLBAR ***** ***** ***** ***** */ -void on_wgt_Open_clicked (GtkToolButton *toolbutton, gpointer user_data) { file_open(); } -void on_wgt_Reset_clicked (GtkToolButton *toolbutton, gpointer user_data) { desmume_reset(); } -void on_wgt_Quit_clicked (GtkToolButton *toolbutton, gpointer user_data) { gtk_main_quit(); } -void on_wgt_Exec_toggled (GtkToggleToolButton *toggletoolbutton, gpointer user_data) { - if (gtk_toggle_tool_button_get_active(toggletoolbutton)==TRUE) - desmume_resume(); - else - desmume_pause(); -} - - - -/* LAYERS ***** ***** ***** ***** */ -static void change_bgx_layer(int layer, gboolean state, GPUEngineBase *gpuEngine) { - //if(!desmume_running()) return; - - gpuEngine->SetLayerEnableState(layer, (state) ? true : false); - - //fprintf(stderr,"Changed Layer %s to %d\n",layer,state); -} -void on_wc_1_BGXX_toggled (GtkToggleButton *togglebutton, gpointer user_data) { - int layer = dyn_CAST(int,user_data); - change_bgx_layer(layer, gtk_toggle_button_get_active(togglebutton), GPU->GetEngineMain()); -} -void on_wc_2_BGXX_toggled (GtkToggleButton *togglebutton, gpointer user_data) { - int layer = dyn_CAST(int,user_data); - change_bgx_layer(layer, gtk_toggle_button_get_active(togglebutton), GPU->GetEngineSub()); -} diff --git a/desmume/src/frontend/posix/gtk-glade/callbacks.h b/desmume/src/frontend/posix/gtk-glade/callbacks.h deleted file mode 100644 index 266a22c40..000000000 --- a/desmume/src/frontend/posix/gtk-glade/callbacks.h +++ /dev/null @@ -1,75 +0,0 @@ -/* callbacks.h - this file is part of DeSmuME - * - * Copyright (C) 2007 Damien Nozay (damdoum) - * Author: damdoum at users.sourceforge.net - * - * This file 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 2, or (at your option) - * any later version. - * - * This file 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 this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "globals.h" - -extern "C" { - -/* MENU FILE */ -G_MODULE_EXPORT void on_menu_open_activate (GtkMenuItem *menuitem, gpointer user_data); -G_MODULE_EXPORT void on_menu_pscreen_activate (GtkMenuItem *menuitem, gpointer user_data); -G_MODULE_EXPORT void on_menu_quit_activate (GtkMenuItem *menuitem, gpointer user_data); - -/* MENU SAVES */ -G_MODULE_EXPORT void on_loadstateXX_activate (GtkMenuItem *, gpointer ); -G_MODULE_EXPORT void on_savestateXX_activate (GtkMenuItem *, gpointer ); -G_MODULE_EXPORT void on_savetypeXX_activate (GtkMenuItem *, gpointer ); - -/* MENU EMULATION */ -G_MODULE_EXPORT void on_menu_exec_activate (GtkMenuItem *menuitem, gpointer user_data); -G_MODULE_EXPORT void on_menu_pause_activate (GtkMenuItem *menuitem, gpointer user_data); -G_MODULE_EXPORT void on_menu_reset_activate (GtkMenuItem *menuitem, gpointer user_data); -G_MODULE_EXPORT void on_menu_layers_activate (GtkMenuItem *menuitem, gpointer user_data); -G_MODULE_EXPORT void on_fsXX_activate (GtkMenuItem *menuitem, gpointer user_data); -G_MODULE_EXPORT void on_sizeXX_activate (GtkMenuItem *menuitem, gpointer user_data); - -/* MENU CONFIG */ -G_MODULE_EXPORT void on_menu_controls_activate (GtkMenuItem *menuitem, gpointer user_data); -G_MODULE_EXPORT void on_menu_joy_controls_activate (GtkMenuItem *menuitem, gpointer user_data); -G_MODULE_EXPORT void on_menu_audio_on_activate (GtkMenuItem *menuitem, gpointer user_data); -G_MODULE_EXPORT void on_menu_gapscreen_activate (GtkMenuItem *menuitem, gpointer user_data); -G_MODULE_EXPORT void on_menu_nogap_activate (GtkMenuItem *menuitem, gpointer user_data); -G_MODULE_EXPORT void on_menu_rightscreen_activate (GtkMenuItem *menuitem, gpointer user_data); -G_MODULE_EXPORT void on_menu_rotatescreen_activate (GtkMenuItem *menuitem, gpointer user_data); - -/* MENU TOOLS */ -G_MODULE_EXPORT void on_menu_wtoolsXX_activate (GtkMenuItem *menuitem, gpointer user_data); -G_MODULE_EXPORT void on_menu_IO_regs_activate (GtkMenuItem *menuitem, gpointer user_data); -G_MODULE_EXPORT void on_menu_memview_activate (GtkMenuItem *menuitem, gpointer user_data); -G_MODULE_EXPORT void on_menu_palview_activate (GtkMenuItem *menuitem, gpointer user_data); -G_MODULE_EXPORT void on_menu_tileview_activate (GtkMenuItem *menuitem, gpointer user_data); - -/* MENU ? */ -G_MODULE_EXPORT void on_menu_apropos_activate (GtkMenuItem *menuitem, gpointer user_data); - - -/* TOOLBAR */ -G_MODULE_EXPORT void on_wgt_Open_clicked (GtkToolButton *toolbutton, gpointer user_data); -G_MODULE_EXPORT void on_wgt_Exec_toggled (GtkToggleToolButton *toggletoolbutton, - gpointer user_data); -G_MODULE_EXPORT void on_wgt_Reset_clicked (GtkToolButton *toolbutton, gpointer user_data); -G_MODULE_EXPORT void on_wgt_Quit_clicked (GtkToolButton *toolbutton, gpointer user_data); - -/* LAYERS TOGGLE */ -G_MODULE_EXPORT void on_wc_1_BGXX_toggled (GtkToggleButton *togglebutton, gpointer user_data); -G_MODULE_EXPORT void on_wc_2_BGXX_toggled (GtkToggleButton *togglebutton, gpointer user_data); - -} diff --git a/desmume/src/frontend/posix/gtk-glade/callbacks_IO.cpp b/desmume/src/frontend/posix/gtk-glade/callbacks_IO.cpp deleted file mode 100644 index 8e6db542c..000000000 --- a/desmume/src/frontend/posix/gtk-glade/callbacks_IO.cpp +++ /dev/null @@ -1,409 +0,0 @@ -/* callbacks_IO.c - this file is part of DeSmuME - * - * Copyright (C) 2007-2015 DeSmuME Team - * Copyright (C) 2007 Damien Nozay (damdoum) - * Copyright (C) 2007 Pascal Giard (evilynux) - * Author: damdoum at users.sourceforge.net - * - * This file 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 2, or (at your option) - * any later version. - * - * This file 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 this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "callbacks_IO.h" -#include "keyval_names.h" - -static u16 Cur_Keypad = 0; -float ScreenCoeff_Size[2]={1.0,1.0}; -float ScreenRotate=0.0; -gboolean Boost=FALSE; -int BoostFS=20; -int saveFS; - -/* ***** ***** INPUT BUTTONS / KEYBOARD ***** ***** */ -gboolean on_wMainW_key_press_event (GtkWidget *widget, GdkEventKey *event, gpointer user_data) { - u16 Key = lookup_key(event->keyval); - guint mask; - mask = GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK | GDK_MOD5_MASK; // shift,ctrl, both alts - if( (event->state & mask) == 0){ - if (event->keyval == keyboard_cfg[KEY_BOOST-1]) { - Boost = !Boost; - if (Boost) { - saveFS = Frameskip; - Frameskip = BoostFS; - } else { - Frameskip = saveFS; - } - return 1; - } - if(Key){ - ADD_KEY( Cur_Keypad, Key ); - if(desmume_running()) update_keypad(Cur_Keypad); - return 1; - } - } - return 0; -} - -gboolean on_wMainW_key_release_event (GtkWidget *widget, GdkEventKey *event, gpointer user_data) { - u16 Key = lookup_key(event->keyval); - RM_KEY( Cur_Keypad, Key ); - if(desmume_running()) update_keypad(Cur_Keypad); - return 1; -} - - - -/* ***** ***** SCREEN DRAWING ***** ***** */ -#define RAW_W 256 -#define RAW_H 192 -#define RAW_OFFSET 256*192*sizeof(u16) -#define MAX_SIZE 3 -u32 on_screen_image32[RAW_W*RAW_H*2*MAX_SIZE*MAX_SIZE]; - -int inline screen_size() { - int sz = ScreenCoeff_Size[0]; - return RAW_W*RAW_H*2*sz*sz*sizeof(u32); -} -int inline offset_pixels_lower_screen() { - return screen_size()/2; -} - -void black_screen () { - /* removes artifacts when resizing with scanlines */ - memset(on_screen_image32,0,screen_size()); -} - -#ifndef GTKGLEXT_AVAILABLE -// they are empty if no opengl -// else see gdk_gl.c / gdk_gl.h -BOOL my_gl_Begin (int screen) { return FALSE; } -void my_gl_End (int screen) {} -void reshape (GtkWidget * widget, int screen) {} -void init_GL_capabilities( int use_software_convert) {} - -int has_pix_col_map=0; -u32 pix_col_map[0x8000]; - -static void init_pix_col_map() { - // precalc factors - int a,b,c,A,B,C,rA,rB,rC; - if (has_pix_col_map) return; - for (a=0; a<0x20; a++) { - A=a<<10; rA=A<<9; - for (b=0; b<0x20; b++) { - B=b<<5; rB=B<<6; - for (c=0; c<0x20; c++) { - C=c; rC=C<<3; - pix_col_map[A|B|C]=rA|rB|rC; - } - } - } - has_pix_col_map=1; -} - -static void decode_screen () { - - int x,y, m, W,H,L,BL; - u32 image[RAW_H*2][RAW_W], pix; - - const NDSDisplayInfo &displayInfo = GPU->GetDisplayInfo(); - const size_t pixCount = GPU_FRAMEBUFFER_NATIVE_WIDTH * GPU_FRAMEBUFFER_NATIVE_HEIGHT; - u16 * pixel = (u16 *)displayInfo.masterNativeBuffer; - u32 * rgb32 = &on_screen_image32[0]; - - ColorspaceApplyIntensityToBuffer16(pixel, pixCount, displayInfo.backlightIntensity[NDSDisplayID_Main]); - ColorspaceApplyIntensityToBuffer16(pixel + pixCount, pixCount, displayInfo.backlightIntensity[NDSDisplayID_Touch]); - - /* decode colors */ - init_pix_col_map(); - for (y=0; y= 0, x--, y=0, y < RAW_H, y++) - LOOP(x=RAW_W-1, x >= 0, x--, y=RAW_H, y < RAW_H*2, y++) - } else { - H=RAW_H*2; W=RAW_W; - LOOP(y=0, y < RAW_H*2, y++, x=0, x < RAW_W, x++) - } -} - -gboolean screen (GtkWidget * widget, int off) { - int H,W,L; - if (off==0) - decode_screen(); - - if (ScreenRotate) { - W=RAW_H; H=RAW_W; - } else { - H=RAW_H; W=RAW_W; - } - L=W*ScreenCoeff_Size[0]*sizeof(u32); - off*= offset_pixels_lower_screen(); - - gdk_draw_rgb_32_image (widget->window, - widget->style->fg_gc[widget->state],0,0, - W*ScreenCoeff_Size[0], H*ScreenCoeff_Size[0], - GDK_RGB_DITHER_NONE,((guchar*)on_screen_image32)+off,L); - return TRUE; -} -#endif /* if GTKGLEXT_AVAILABLE */ - - -/* OUTPUT SCREENS */ -gboolean on_wDrawScreen_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer user_data) { - NDSDisplayID displayID = (NDSDisplayID)dyn_CAST(int,user_data); - return screen(widget, displayID); -} -gboolean on_wDrawScreen_configure_event(GtkWidget *widget, GdkEventConfigure *event, gpointer user_data) { - NDSDisplayID displayID = (NDSDisplayID)dyn_CAST(int,user_data); - reshape(widget, displayID); - return TRUE; -} - - - - - -/* ***** ***** INPUT STYLUS / MOUSE ***** ***** */ - -static void resize_incremental(int i, GdkEventScroll *event) { -#ifdef GTKGLEXT_AVAILABLE - float zoom_inc=.125, zoom_min=0.25, zoom_max=5.0; -#else - float zoom_inc=1.0, zoom_min=1.0, zoom_max=3.0; -#endif - switch (event->direction) { - case GDK_SCROLL_UP: - ScreenCoeff_Size[i]=MIN(ScreenCoeff_Size[i]+zoom_inc,zoom_max); break; - case GDK_SCROLL_DOWN: - ScreenCoeff_Size[i]=MAX(ScreenCoeff_Size[i]-zoom_inc,zoom_min); break; - case GDK_SCROLL_LEFT: - case GDK_SCROLL_RIGHT: - return; - } - resize(ScreenCoeff_Size[0],ScreenCoeff_Size[1]); -} - -gboolean on_wDrawScreen_scroll_event (GtkWidget *widget, GdkEvent *event, gpointer user_data) { - int scr = dyn_CAST(int,user_data); - // separate zoom factors not supported yet - scr = 0; - resize_incremental(scr,(GdkEventScroll*)event); - - return TRUE; -} - -static void set_touch_pos (int x, int y) { - s32 EmuX, EmuY; - x /= ScreenCoeff_Size[1]; - y /= ScreenCoeff_Size[1]; - EmuX = x; EmuY = y; - if (ScreenRotate==90.0 || ScreenRotate==270.0) { EmuX = 256-y; EmuY = x; } - if(EmuX<0) EmuX = 0; else if(EmuX>255) EmuX = 255; - if(EmuY<0) EmuY = 0; else if(EmuY>192) EmuY = 192; - if (ScreenInvert) { - EmuX = 255-EmuX; - EmuY = 192-EmuY; - } - NDS_setTouchPos(EmuX, EmuY); -} - -gboolean on_wDrawScreen_button_press_event (GtkWidget *widget, GdkEventButton *event, gpointer user_data) { - int scr = dyn_CAST(int,user_data); - GdkModifierType state; - gint x,y; - - switch (event->button) { - case 1: - if (((scr==1) ^ ScreenInvert) && desmume_running()) { - click = TRUE; - gdk_window_get_pointer(widget->window, &x, &y, &state); - if (state & GDK_BUTTON1_MASK) - set_touch_pos(x,y); - } - break; - case 3: break; - case 2: - // filter out 2x / 3x clicks - if (event->type==GDK_BUTTON_PRESS) - rotate(ScreenRotate + 90.0); break; - } - return TRUE; -} - -gboolean on_wDrawScreen_button_release_event (GtkWidget *widget, GdkEventButton *event, gpointer user_data) { - int scr = dyn_CAST(int,user_data); - if ((scr==1) ^ ScreenInvert) { - if (click) NDS_releaseTouch(); - click = FALSE; - } - return TRUE; -} - -gboolean on_wDrawScreen_motion_notify_event (GtkWidget *widget, GdkEventMotion *event, gpointer user_data) { - int scr = dyn_CAST(int,user_data); - GdkModifierType state; - gint x,y; - - if (((scr==1) ^ ScreenInvert) && click) - { - if(event->is_hint) - gdk_window_get_pointer(widget->window, &x, &y, &state); - else - { - x= (gint)event->x; - y= (gint)event->y; - state=(GdkModifierType)event->state; - } - // fprintf(stderr,"X=%d, Y=%d, S&1=%d\n", x,y,state&GDK_BUTTON1_MASK); - if(state & GDK_BUTTON1_MASK) - set_touch_pos(x,y); - } - return TRUE; -} - - - - - -/* ***** ***** KEYBOARD CONFIG / KEY DEFINITION ***** ***** */ -u16 Keypad_Temp[NB_KEYS]; -guint temp_Key=0; - -static void init_labels() { - int i; - char text[50], bname[20]; - GtkButton *b; - for (i=0; ikeyval; - current_key_label(); - return TRUE; -} - -static void ask(GtkButton*b, int key) { - char text[50]; - GtkDialog * dlg = (GtkDialog*)glade_xml_get_widget(xml, "wKeyDlg"); - key--; /* key = bit position, start with 1 */ - temp_Key = Keypad_Temp[key]; - current_key_label(); - switch (gtk_dialog_run(dlg)) - { - case GTK_RESPONSE_OK: - Keypad_Temp[key]=temp_Key; - snprintf(text, 50, "%s : %s",key_names[key],KEYNAME(temp_Key)); - gtk_button_set_label(b,text); - break; - case GTK_RESPONSE_CANCEL: - case GTK_RESPONSE_NONE: - break; - } - gtk_widget_hide((GtkWidget*)dlg); -} - -/* Joystick configuration / Key definition */ -static void ask_joy_key(GtkButton*b, int key) -{ - char text[50]; - u16 joykey; - - GtkWidget * dlg = (GtkWidget*)glade_xml_get_widget(xml, "wJoyDlg"); - - key--; /* remove 1 to get index */ - gtk_widget_show_now(dlg); - /* Need to force event processing. Otherwise, popup won't show up. */ - while ( gtk_events_pending() ) gtk_main_iteration(); - joykey = get_set_joy_key(key); - snprintf(text, 50, "%s : %d",key_names[key],joykey); - gtk_button_set_label(b,text); - gtk_widget_hide((GtkWidget*)dlg); -} - -/* Bind a keyboard key to a keypad key */ -void on_button_kb_key_clicked (GtkButton *b, gpointer user_data) -{ - int key = dyn_CAST( int, user_data ); - ask( b, key ); -} - -/* Bind a joystick button to a keypad key */ -void on_button_joy_key_clicked (GtkButton *b, gpointer user_data) -{ - int key = dyn_CAST( int, user_data ); - ask_joy_key( b, key ); -} diff --git a/desmume/src/frontend/posix/gtk-glade/callbacks_IO.h b/desmume/src/frontend/posix/gtk-glade/callbacks_IO.h deleted file mode 100644 index 5c5ace8a4..000000000 --- a/desmume/src/frontend/posix/gtk-glade/callbacks_IO.h +++ /dev/null @@ -1,51 +0,0 @@ -/* callbacks_IO.h - this file is part of DeSmuME - * - * Copyright (C) 2007 Damien Nozay (damdoum) - * Copyright (C) 2007 Pascal Giard (evilynux) - * Author: damdoum at users.sourceforge.net - * - * This file 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 2, or (at your option) - * any later version. - * - * This file 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 this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "globals.h" -#include "gdk_gl.h" - -extern "C" { - -/* INPUT BUTTONS / KEYBOARD */ -G_MODULE_EXPORT gboolean on_wMainW_key_press_event (GtkWidget *widget, GdkEventKey *event, gpointer user_data); -G_MODULE_EXPORT gboolean on_wMainW_key_release_event (GtkWidget *widget, GdkEventKey *event, gpointer user_data); - -/* OUTPUT SCREENS */ -G_MODULE_EXPORT gboolean on_wDrawScreen_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer user_data); -G_MODULE_EXPORT gboolean on_wDrawScreen_configure_event(GtkWidget *widget, GdkEventConfigure *event, gpointer data); - - -/* INPUT STYLUS / MOUSE */ -G_MODULE_EXPORT gboolean on_wDrawScreen_motion_notify_event (GtkWidget *widget, GdkEventMotion *event, gpointer user_data); -G_MODULE_EXPORT gboolean on_wDrawScreen_button_release_event(GtkWidget *widget, GdkEventButton *event, gpointer user_data); -G_MODULE_EXPORT gboolean on_wDrawScreen_button_press_event (GtkWidget *widget, GdkEventButton *event, gpointer user_data); -G_MODULE_EXPORT gboolean on_wDrawScreen_scroll_event (GtkWidget *widget, GdkEvent *event, gpointer user_data); - -/* KEYBOARD CONFIG / KEY DEFINITION */ -G_MODULE_EXPORT gboolean on_wKeyDlg_key_press_event (GtkWidget *widget, GdkEventKey *event, gpointer user_data); -G_MODULE_EXPORT void on_wKeybConfDlg_response (GtkDialog *dialog, gint arg1, gpointer user_data); -G_MODULE_EXPORT void on_button_kb_key_clicked (GtkButton *button, gpointer user_data); - -/* Joystick configuration / Key definition */ -G_MODULE_EXPORT void on_button_joy_key_clicked (GtkButton *button, gpointer user_data); - -} diff --git a/desmume/src/frontend/posix/gtk-glade/dTools/callbacks_1_ioregs.cpp b/desmume/src/frontend/posix/gtk-glade/dTools/callbacks_1_ioregs.cpp deleted file mode 100644 index 6088ede6a..000000000 --- a/desmume/src/frontend/posix/gtk-glade/dTools/callbacks_1_ioregs.cpp +++ /dev/null @@ -1,163 +0,0 @@ -/* callbacks_1_ioregs.cpp - this file is part of DeSmuME - * - * Copyright (C) 2007 Damien Nozay (damdoum) - * Copyright (C) 2007 Pascal Giard (evilynux) - * Author: damdoum at users.sourceforge.net - * - * This file 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 2, or (at your option) - * any later version. - * - * This file 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 this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "callbacks_dtools.h" -#include "dTools_display.h" - -/* ***** ***** IO REGISTERS ***** ***** */ -static int cpu=0; -static BOOL init=FALSE; -static int size_=0; -static dTools_dsp dsp; - -static void update_regs_fast(); -static void update_regs(); - -/* Register name list */ -#define NBR_IO_REGS 7 - -typedef struct -{ - char name[20]; - u32 addr; - BOOL trunc; -} reg_name_addr; - -const reg_name_addr Reg_Names_Addr[NBR_IO_REGS] = - { - { "REG_IPCFIFOCNT", REG_IPCFIFOCNT, TRUE }, - { "REG_SPICNT", REG_SPICNT, TRUE }, - { "REG_IME", REG_IME, TRUE }, - { "REG_IE", REG_IE, FALSE }, - { "REG_IF", REG_IF, FALSE }, - { "REG_POWCNT1", REG_POWCNT1, TRUE }, - { "REG_DISPCAPCNT", REG_DISPA_DISPCAPCNT, FALSE } - }; - -/* update */ - -static void wtools_1_update () { - update_regs_fast(); -} - - - -/* Update register display */ - -static u32 mem[NBR_IO_REGS]; - -static void update_regs_fast(){ - char text[11]; - int i; u32 w, m; - for( i = 0; i < NBR_IO_REGS; i++ ) - { - w = MMU_read32(cpu,Reg_Names_Addr[i].addr); - m = mem[i]; - if ( Reg_Names_Addr[i].trunc ) { - w &= 0xFFFF; - m &= 0xFFFF; - } - mem[i] = w; - if (w == m) continue; - - if ( Reg_Names_Addr[i].trunc ) - sprintf(text, " 0x%04X", w); - else - sprintf(text, "0x%08X", w); - - dTools_display_select_attr(&dsp, 2); - dTools_display_clear_char(&dsp, size_+3, i, 10); - dTools_display_draw_text(&dsp, size_+3, i, text); - } -} - -static void update_regs() -{ - char text[80]; - int len, i; - - if (init==FALSE) { - GtkWidget * wPaint = glade_xml_get_widget(xml_tools, "wtools_1_draw"); - - for( i = 0; i < NBR_IO_REGS; i++ ) { - len = strlen(Reg_Names_Addr[i].name); - if (size_ "); - dTools_display_add_markup(&dsp, "0x00000000"); - dTools_display_add_markup(&dsp, "0x00000000"); - init=TRUE; - } - - dTools_display_clear(&dsp); - for( i = 0; i < NBR_IO_REGS; i++ ) - { - mem[i] = MMU_read32(cpu,Reg_Names_Addr[i].addr); - if ( Reg_Names_Addr[i].trunc ) - sprintf(text, " 0x%04X", mem[i]); - else - sprintf(text, "0x%08X", mem[i]); - - dTools_display_select_attr(&dsp, 0); - dTools_display_draw_text(&dsp, 0, i, Reg_Names_Addr[i].name); - dTools_display_draw_text(&dsp, size_, i, " : "); - dTools_display_select_attr(&dsp, 1); - dTools_display_draw_text(&dsp, size_+3, i, text); - } -} - -gboolean on_wtools_1_draw_button_release_event(GtkWidget *widget, GdkEventButton *event, gpointer user_data) { - // clear the red marks :) - if (event->button==1) - update_regs(); - return TRUE; -} -gboolean on_wtools_1_draw_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer user_data) { - update_regs(); - return TRUE; -} - - -void on_wtools_1_combo_cpu_changed (GtkComboBox *widget, gpointer user_data) { - /* c == 0 means ARM9 */ - cpu=gtk_combo_box_get_active(widget); - update_regs(); -} - -/* show, register, unregister */ -void on_wtools_1_IOregs_show (GtkWidget *widget, gpointer user_data) { - GtkWidget * combo = glade_xml_get_widget(xml_tools, "wtools_1_combo_cpu"); - - // do as if we had selected this button and ARM7 cpu - gtk_combo_box_set_active((GtkComboBox*)combo, 0); - register_Tool(wtools_1_update); -} - -gboolean on_wtools_1_IOregs_close (GtkWidget *widget, ...) { - unregister_Tool(wtools_1_update); - gtk_widget_hide(widget); - return TRUE; -} - diff --git a/desmume/src/frontend/posix/gtk-glade/dTools/callbacks_2_memview.cpp b/desmume/src/frontend/posix/gtk-glade/dTools/callbacks_2_memview.cpp deleted file mode 100644 index 3e5a18ecf..000000000 --- a/desmume/src/frontend/posix/gtk-glade/dTools/callbacks_2_memview.cpp +++ /dev/null @@ -1,289 +0,0 @@ -/* callbacks_2_memview.cpp - this file is part of DeSmuME - * - * Copyright (C) 2007 Damien Nozay (damdoum) - * Author: damdoum at users.sourceforge.net - * - * This file 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 2, or (at your option) - * any later version. - * - * This file 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 this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "callbacks_dtools.h" -#include "dTools_display.h" - -/* ***** ***** MEMORY VIEWER ***** ***** */ - -enum SHOW { - Bit8, - Bit16, - Bit32 -}; - -static BOOL init=FALSE; -static enum SHOW packmode=Bit8; -static u32 address=0, tmpaddr=0; -int cpu=0; -static char patt[512]; -static u8 mem[0x100]; -static dTools_dsp dsp; - -static GtkEntry *wAddress; -static GtkRange *wRange; - -static void refresh(); -static void initialize(); - - -/* update */ - -static void wtools_2_update() { - int i,j; - u8 m8, *mem8 =mem; - u16 m16, *mem16=(u16*)mem; - u32 m32, *mem32=(u32*)mem; - u32 addr; - char txt[16]; - - // red - dTools_display_select_attr(&dsp, 3); - - addr = address; - switch (packmode) { - case Bit8: - for (i=0; i<0x10; i++) { - for (j=0; j<16; j++, addr++,mem8++) { - m8 = *mem8; *mem8 = MMU_read8(cpu, addr); - if (m8 != *mem8) { - sprintf(txt, "%02X", *mem8); - dTools_display_clear_char(&dsp, 12+3*j, i, 3); - dTools_display_draw_text(&dsp, 12+3*j, i, txt); - } - } - } - break; - case Bit16: - for (i=0; i<0x10; i++) { - for (j=0; j<16; j+=2, addr+=2,mem16++) { - m16 = *mem16; *mem16 = MMU_read16(cpu, addr); - if (m16 != *mem16) { - sprintf(txt, " %04X", *mem16); - dTools_display_clear_char(&dsp, 12+3*j, i, 6); - dTools_display_draw_text(&dsp, 12+3*j, i, txt); - } - } - } - break; - case Bit32: - for (i=0; i<0x10; i++) { - for (j=0; j<16; j+=4, addr+=4,mem32++) { - m32 = *mem32; *mem32 = MMU_read32(cpu, addr); - if (m32 != *mem32) { - sprintf(txt, " %08X", *mem32); - dTools_display_clear_char(&dsp, 12+3*j, i, 12); - dTools_display_draw_text(&dsp, 12+3*j, i, txt); - } - } - } - break; - } -} - -gboolean on_wtools_2_draw_button_release_event(GtkWidget *widget, GdkEventButton *event, gpointer user_data) { - // clear the red marks :) - if (event->button==1) - refresh(); - - return TRUE; -} - - - - -/* which cpu we look into */ - -void on_wtools_2_cpu_changed (GtkComboBox *widget, gpointer user_data) { - /* c == 0 means ARM9 */ - cpu=gtk_combo_box_get_active(widget); - refresh(); -} - - -/* how to pack bytes */ - -void on_wtools_2_r8_toggled (GtkToggleButton *togglebutton, gpointer user_data) { packmode=Bit8; refresh(); } -void on_wtools_2_r16_toggled (GtkToggleButton *togglebutton, gpointer user_data) { packmode=Bit16; refresh(); } -void on_wtools_2_r32_toggled (GtkToggleButton *togglebutton, gpointer user_data) { packmode=Bit32; refresh(); } - -/* which address */ -#define RANGE_MIN 0 -#define RANGE_MAX 0x10000000 -#define ADDR_MASK 0xFFFFFFF -#define STEP_ONE_LINE 0x1 -#define STEP_ONE_PAGE 0x10 -#define STEP_x10_PAGE 0x100 - -static void scroll_address(u32 addr) { - address = (addr & ADDR_MASK); - refresh(); -} -static void change_address(u32 addr) { - addr /= 0x10; - gtk_range_set_value(wRange, addr); -} -static void add_to_address(s32 inc) { - u32 addr = (address+inc) & ADDR_MASK; - gtk_range_set_value(wRange, addr); -} - -void on_wtools_2_GotoAddress_activate (GtkEntry *entry, gpointer user_data) { - change_address(strtol(gtk_entry_get_text(entry),NULL,0)); -} -void on_wtools_2_GotoAddress_changed (GtkEntry *entry, gpointer user_data) { - tmpaddr=strtol(gtk_entry_get_text(entry),NULL,0); -} -void on_wtools_2_GotoButton_clicked (GtkButton *button, gpointer user_data) { - change_address(tmpaddr); -} - - -/* show, register, unregister */ - -void on_wtools_2_MemView_show (GtkWidget *widget, gpointer user_data) { - initialize(); - register_Tool(wtools_2_update); -} -gboolean on_wtools_2_MemView_close (GtkWidget *widget, ...) { - unregister_Tool(wtools_2_update); - dTools_display_free(&dsp); - gtk_widget_hide(widget); - return TRUE; -} - - -/* scroll functions :D */ - -void on_wtools_2_scroll_value_changed (GtkRange *range, gpointer user_data) { - u32 addr=(u32)gtk_range_get_value(range); - scroll_address(addr); -} -gboolean on_wtools_2_draw_scroll_event (GtkWidget *widget, GdkEventScroll *event, gpointer user_data) { - switch (event->direction) { - case GDK_SCROLL_UP: - add_to_address(-STEP_ONE_PAGE); break; - case GDK_SCROLL_DOWN: - add_to_address(+STEP_ONE_PAGE); break; - case GDK_SCROLL_LEFT: - case GDK_SCROLL_RIGHT: - default: - break; - } - return TRUE; -} -gboolean on_wtools_2_draw_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer user_data) { refresh(); return TRUE; } - - - - - -/* initialise what we have to */ - -static void initialize() { - GtkWidget * combo; - GtkWidget * wPaint; - GtkAdjustment *adj; - - if (init) return; - combo = glade_xml_get_widget(xml_tools, "wtools_2_cpu"); - adj = (GtkAdjustment *)gtk_adjustment_new (RANGE_MIN, RANGE_MIN, RANGE_MAX, - STEP_ONE_LINE, STEP_x10_PAGE, STEP_ONE_PAGE); - - // get widget reference - wAddress = (GtkEntry*)glade_xml_get_widget(xml_tools, "wtools_2_GotoAddress"); - wRange = (GtkRange*)glade_xml_get_widget(xml_tools, "wtools_2_scroll"); - wPaint = glade_xml_get_widget(xml_tools, "wtools_2_draw"); - - dTools_display_init(&dsp, wPaint, 80, 16, 5); - -#define PATT(x) x"" x "" -#define DUP(x) x x - sprintf(patt, "0000:0000 | %s| 0123456789ABCDEF", DUP(DUP(DUP(PATT("00_")))) ); - dTools_display_add_markup(&dsp, patt); - sprintf(patt, "0000:0000 | %s| 0123456789ABCDEF", DUP(DUP(PATT("_0000_"))) ); - dTools_display_add_markup(&dsp, patt); - sprintf(patt, "0000:0000 | %s| 0123456789ABCDEF", DUP(PATT("__00000000__")) ); - dTools_display_add_markup(&dsp, patt); -#undef DUP -#undef PATT - strcpy(patt, "__00000000__"); - dTools_display_add_markup(&dsp, patt); - - init = TRUE; - gtk_combo_box_set_active((GtkComboBox*)combo, 0); - gtk_range_set_adjustment(wRange, adj); - change_address(RANGE_MIN); -} - -/* PAINT memory panel */ -static void refresh() { - int i,j,addr; - u8 c; - u8 *mem8=mem; - u16 *mem16=(u16*)mem; - u32 *mem32=(u32*)mem; - - char *ptxt, txt[]="0000:0000 | 00 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF | 0123456789ABCDEF\0"; - - if (!init) return; - - addr=address * 0x10; - for (i=0; i<0x100; i++) - mem[i] = MMU_read8(cpu, addr+i); - - dTools_display_clear(&dsp); - switch(packmode) { - case Bit8: dTools_display_select_attr(&dsp, 0); break; - case Bit16: dTools_display_select_attr(&dsp, 1); break; - case Bit32: dTools_display_select_attr(&dsp, 2); break; - } - - -// draw memory content here - for (i=0; i<0x10; i++) { - ptxt = txt; - sprintf(ptxt, "%04X:%04X | ", (addr>>16)&0xFFFF, addr&0xFFFF); ptxt+=12; - switch(packmode) { - case Bit8: - for (j=0; j<16; j++,ptxt+=3) - sprintf(ptxt, "%02X ", mem8[j]); - break; - case Bit16: - for (j=0; j<16; j+=2,ptxt+=6, mem16++) - sprintf(ptxt, " %04X ", *mem16); - break; - case Bit32: - for (j=0; j<16; j+=4,ptxt+=12, mem32++) - sprintf(ptxt, " %08X ", *mem32); - break; - } - sprintf(ptxt, "| "); ptxt +=2; - for (j=0; j<16; j++,ptxt++) - // only ASCII printable - sprintf(ptxt, "%c", ((c=mem8[j])<0x20)?'.':((c>=0x7F)?'.':c)); - addr += 16; - mem8 +=16; - *(ptxt)=0; - - dTools_display_draw_text(&dsp, 0, i, txt); - } -} diff --git a/desmume/src/frontend/posix/gtk-glade/dTools/callbacks_3_palview.cpp b/desmume/src/frontend/posix/gtk-glade/dTools/callbacks_3_palview.cpp deleted file mode 100644 index ae7d3c877..000000000 --- a/desmume/src/frontend/posix/gtk-glade/dTools/callbacks_3_palview.cpp +++ /dev/null @@ -1,167 +0,0 @@ -/* callbacks_3_palview.cpp - this file is part of DeSmuME - * - * Copyright (C) 2007 Damien Nozay (damdoum) - * Author: damdoum at users.sourceforge.net - * - * This file 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 2, or (at your option) - * any later version. - * - * This file 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 this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "callbacks_dtools.h" - -void init_combo_palette(GtkComboBox *combo, u16 ** addresses) { - GtkTreeIter iter; - GtkListStore* model = gtk_list_store_new(1, G_TYPE_STRING); - gtk_combo_box_set_model(combo, (GtkTreeModel*)model); - - int i=0; - -#define DO(str,addr,r) \ - gtk_list_store_append (model, &iter); \ - gtk_list_store_set (model, &iter, 0, str,-1); \ - addresses[i]=((u16*)(addr) r); i++; - - DO("Main screen BG PAL", MMU.ARM9_VMEM,) - DO("Main screen SPR PAL", MMU.ARM9_VMEM,+0x100) - DO("Sub screen BG PAL", MMU.ARM9_VMEM,+0x200) - DO("Sub screen SPR PAL", MMU.ARM9_VMEM,+0x300) - DO("Main screen ExtPAL 0", MMU.ExtPal[0][0],) - DO("Main screen ExtPAL 1", MMU.ExtPal[0][1],) - DO("Main screen ExtPAL 2", MMU.ExtPal[0][2],) - DO("Main screen ExtPAL 3", MMU.ExtPal[0][3],) - DO("Sub screen ExtPAL 0", MMU.ExtPal[1][0],) - DO("Sub screen ExtPAL 1", MMU.ExtPal[1][1],) - DO("Sub screen ExtPAL 2", MMU.ExtPal[1][2],) - DO("Sub screen ExtPAL 3", MMU.ExtPal[1][3],) - DO("Main screen SPR ExtPAL 0", MMU.ObjExtPal[0][0],) - DO("Main screen SPR ExtPAL 1", MMU.ObjExtPal[0][1],) - DO("Sub screen SPR ExtPAL 0", MMU.ObjExtPal[1][0],) - DO("Sub screen SPR ExtPAL 1", MMU.ObjExtPal[1][1],) - DO("Texture PAL 0", MMU.texInfo.texPalSlot[0],) - DO("Texture PAL 1", MMU.texInfo.texPalSlot[1],) - DO("Texture PAL 2", MMU.texInfo.texPalSlot[2],) - DO("Texture PAL 3", MMU.texInfo.texPalSlot[3],) -#undef DO - gtk_combo_box_set_active(combo,0); -} - -static u16* base_addr[20]; -static BOOL init=FALSE; -static int palnum=0; -static int palindex=0; -static void refresh(); -static GtkWidget * wPaint; -static GtkSpinButton * wSpin; -static u16 mem[0x100]; - - -//static COLOR c; -//static COLOR32 c32; -static GdkGC * gdkGC; - -static inline void paint_col(int x, int y, u16 col) { - //c.val = col; - //COLOR_16_32(c,c32) - //gdk_rgb_gc_set_foreground(gdkGC, c32.val); - //gdk_draw_rectangle(wPaint->window, gdkGC, TRUE, x, y, 15, 15); -} -static inline void paint_cross(int x, int y) { - gdk_rgb_gc_set_foreground(gdkGC, 0x808080); - gdk_draw_rectangle(wPaint->window, gdkGC, TRUE, x, y, 15, 15); - gdk_rgb_gc_set_foreground(gdkGC, 0xFF0000); - gdk_draw_line(wPaint->window, gdkGC, x+14, y+1, x+1, y+14); - gdk_draw_line(wPaint->window, gdkGC, x+1, y+1, x+14, y+14); -} - - -static void wtools_3_update() { - int i,x,y,X,Y; - u16 * addr = base_addr[palindex], tmp; - - gdkGC = gdk_gc_new(wPaint->window); - if (addr) { - memcpy(mem, addr, 0x100*sizeof(u16)); - i=0; - for(y=Y= 0; y < 16; y++,Y+=16) - for(x=X= 0; x < 16; x++,X+=16) { - tmp=mem[i]; - if (tmp != (mem[i]=*(addr+Y+x+0x100*palnum))) - paint_col(X,Y,mem[i]); - } - } else { - for(y=Y= 0; y < 16; y++,Y+=16) - for(x=X= 0; x < 16; x++,X+=16) - paint_cross(X,Y); - } - g_object_unref(gdkGC); -} - - -static void refresh() { - int x,y,X,Y; u16 * addr = base_addr[palindex]; - - gdkGC = gdk_gc_new(wPaint->window); - if (addr) { - memcpy(mem, addr, 0x100*sizeof(u16)); - for(y=Y= 0; y < 16; y++,Y+=16) - for(x=X= 0; x < 16; x++,X+=16) - paint_col(X,Y,*(addr+Y+x+0x100*palnum)); - } else { - for(y=Y= 0; y < 16; y++,Y+=16) - for(x=X= 0; x < 16; x++,X+=16) - paint_cross(X,Y); - } - g_object_unref(gdkGC); -} - -static void initialize() { - GtkComboBox * combo; - if (init) return; - - wPaint= glade_xml_get_widget(xml_tools, "wtools_3_draw"); - wSpin = (GtkSpinButton*)glade_xml_get_widget(xml_tools, "wtools_3_palnum"); - combo = (GtkComboBox*)glade_xml_get_widget(xml_tools, "wtools_3_palette"); - - init_combo_palette(combo, base_addr); - - init=TRUE; -} - - -void on_wtools_3_PalView_show (GtkWidget *widget, gpointer data) { - initialize(); - register_Tool(wtools_3_update); -} -gboolean on_wtools_3_PalView_close (GtkWidget *widget, ...) { - unregister_Tool(wtools_3_update); - gtk_widget_hide(widget); - return TRUE; -} - - -gboolean on_wtools_3_draw_expose_event (GtkWidget * widget, GdkEventExpose *event, gpointer user_data) { - refresh(); - return TRUE; -} -void on_wtools_3_palette_changed (GtkComboBox *combo, gpointer user_data) { - palindex = gtk_combo_box_get_active(combo); - gtk_widget_set_sensitive((GtkWidget*)wSpin,(palindex >=4)); - gtk_spin_button_set_value(wSpin,0); - refresh(); -} -void on_wtools_3_palnum_value_changed (GtkSpinButton *spin, gpointer user_data) { - palnum = gtk_spin_button_get_value_as_int(spin); - refresh(); -} diff --git a/desmume/src/frontend/posix/gtk-glade/dTools/callbacks_4_tileview.cpp b/desmume/src/frontend/posix/gtk-glade/dTools/callbacks_4_tileview.cpp deleted file mode 100644 index 2213db07c..000000000 --- a/desmume/src/frontend/posix/gtk-glade/dTools/callbacks_4_tileview.cpp +++ /dev/null @@ -1,329 +0,0 @@ -/* callbacks_3_palview.cpp - this file is part of DeSmuME - * - * Copyright (C) 2007 Damien Nozay (damdoum) - * Author: damdoum at users.sourceforge.net - * - * This file 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 2, or (at your option) - * any later version. - * - * This file 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 this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "callbacks_dtools.h" -#ifdef GTKGLEXT_AVAILABLE -#include "../gdk_gl.h" - -void init_combo_memory(GtkComboBox *combo, u8 ** addresses) { - GtkTreeIter iter; - GtkListStore* model = gtk_list_store_new(1, G_TYPE_STRING); - gtk_combo_box_set_model(combo, (GtkTreeModel*)model); - int i=0; - -#define DO(str,addr,r) \ - gtk_list_store_append (model, &iter); \ - gtk_list_store_set (model, &iter, 0, str,-1); \ - addresses[i]=(addr r); i++; - -// FIXME: update tileview to actually work -// DO("A-BG - 0x6000000",MMU.ARM9_ABG,) -// DO("A-BG - 0x6010000",MMU.ARM9_ABG,+0x10000) -// DO("A-BG - 0x6020000",MMU.ARM9_ABG,+0x20000) -// DO("A-BG - 0x6030000",MMU.ARM9_ABG,+0x30000) -// DO("A-BG - 0x6040000",MMU.ARM9_ABG,+0x40000) -// DO("A-BG - 0x6050000",MMU.ARM9_ABG,+0x50000) -// DO("A-BG - 0x6060000",MMU.ARM9_ABG,+0x60000) -// DO("A-BG - 0x6070000",MMU.ARM9_ABG,+0x70000) - -// DO("B-BG - 0x6200000",MMU.ARM9_BBG,) -// DO("B-BG - 0x6210000",MMU.ARM9_BBG,+0x10000) - -// DO("A-OBJ- 0x6400000",MMU.ARM9_AOBJ,) -// DO("A-OBJ- 0x6410000",MMU.ARM9_AOBJ,+0x10000) -// DO("A-OBJ- 0x6420000",MMU.ARM9_AOBJ,+0x20000) -// DO("A-OBJ- 0x6430000",MMU.ARM9_AOBJ,+0x30000) - -// DO("B-OBJ- 0x6600000",MMU.ARM9_BOBJ,) -// DO("B-OBJ- 0x6610000",MMU.ARM9_BOBJ,+0x10000) - - DO("LCD - 0x6800000",MMU.ARM9_LCD,) - DO("LCD - 0x6810000",MMU.ARM9_LCD,+0x10000) - DO("LCD - 0x6820000",MMU.ARM9_LCD,+0x20000) - DO("LCD - 0x6830000",MMU.ARM9_LCD,+0x30000) - DO("LCD - 0x6840000",MMU.ARM9_LCD,+0x40000) - DO("LCD - 0x6850000",MMU.ARM9_LCD,+0x50000) - DO("LCD - 0x6860000",MMU.ARM9_LCD,+0x60000) - DO("LCD - 0x6870000",MMU.ARM9_LCD,+0x70000) - DO("LCD - 0x6880000",MMU.ARM9_LCD,+0x80000) - DO("LCD - 0x6890000",MMU.ARM9_LCD,+0x90000) -#undef DO - gtk_combo_box_set_active(combo,0); -} - -static u16* pal_addr[20]; -static u8* mem_addr[26]; -static BOOL init=FALSE; -static int palnum=0; -static int palindex=0; -static int memnum=0; -static int colnum=0; -static void refresh(); -static GtkWidget * wPaint; -static GtkSpinButton * wSpin; -static NDSDisplayID gl_context_num = NDSDisplayID_Main; - -#define TILE_NUM_MAX 1024 -#define TILE_W_SZ 8 -#define TILE_H_SZ 8 - -static void wtools_4_update() { - -} - -typedef u16 tileBMP[8*8]; - -static void refresh() { - u16 palette_16[64]; - u16 palette_256[64]; - u8 * index16, * index256, * indexBMP; - u16 * pal; - int tile_n, index; - guint Textures; - if (!init) return; - - index16 = index256 = indexBMP = mem_addr[memnum]; - - // this little thing doesnt display properly - // nothing drawn... - // seems that is the context is not shared there is a pb switching context -/* - if (!my_gl_Begin(gl_context_num)) return; - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - my_gl_DrawBeautifulQuad(); - my_gl_End(gl_context_num); - return; - -*/ - if (!my_gl_Begin(gl_context_num)) return; - - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); -#if 1 - glEnable(GL_TEXTURE_2D); - glGenTextures(1, &Textures); - - //proxy - glBindTexture(GL_TEXTURE_2D, Textures); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, - 256, 256, 0, - GL_RGBA, GL_UNSIGNED_SHORT_1_5_5_5_REV, indexBMP); - - glBegin(GL_QUADS); - glTexCoord2f(0.0, 0.0); glVertex2d(-1.0, 1.0); - glTexCoord2f(1.0, 0.0); glVertex2d( 1.0, 1.0); - glTexCoord2f(1.0, 1.0); glVertex2d( 1.0,-1.0); - glTexCoord2f(0.0, 1.0); glVertex2d(-1.0,-1.0); - glEnd(); - - glDeleteTextures(1, &Textures); - - my_gl_End(gl_context_num); - return; - - glTexImage2D(GL_PROXY_TEXTURE_2D, 0, GL_RGBA, - 256, 256, 0, - GL_RGBA, GL_UNSIGNED_SHORT_1_5_5_5_REV, NULL); - - - switch(colnum) { - case 0: //BMP - for (tile_n=0; tile_n> 5)<<3, - 8, 8, GL_RGBA, - GL_UNSIGNED_SHORT_1_5_5_5_REV, indexBMP); - indexBMP +=64; - } - break; - case 1: //256c - pal = pal_addr[palindex]; - if (pal) { - pal += palnum*256; - for (tile_n=0; tile_n<1024; tile_n++) { - for (index=0; index<64; index++) { - palette_256[index]=pal[*index256]; - index256++; - } - glTexSubImage2D(GL_TEXTURE_2D, 0, - (tile_n & 0x1F)<<3, (tile_n >> 5)<<3, - 8, 8, GL_RGBA, - GL_UNSIGNED_SHORT_1_5_5_5_REV, palette_256); - } - } - break; - case 2: //16c - pal = pal_addr[palindex]; - if (pal) { - pal += palnum*16; - for (tile_n=0; tile_n<1024; tile_n++) { - for (index=0; index<64-1; index++) { - if (index & 1) continue; - palette_16[index] =pal[*index16 & 15]; - palette_16[index+1]=pal[*index16 >> 4]; - index16++; - } - glTexSubImage2D(GL_TEXTURE_2D, 0, - (tile_n & 0x1F)<<3, (tile_n >> 5)<<3, - 8, 8, GL_RGBA, - GL_UNSIGNED_SHORT_1_5_5_5_REV, palette_16); - } - } - break; - } - - glBegin(GL_QUADS); - glTexCoord2f(0.0, 0.0); glVertex2d(-0.5, 0.5); - glTexCoord2f(0.0, 1.0); glVertex2d(-0.5,-0.5); - glTexCoord2f(1.0, 1.0); glVertex2d( 0.5,-0.5); - glTexCoord2f(1.0, 0.0); glVertex2d( 0.5, 0.5); - glEnd(); - - glDeleteTextures(1, &Textures); -#else - glDisable(GL_LIGHTING); - glDisable(GL_BLEND); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glColor4ub(255,255,255,255); - switch(colnum) { - case 0: //BMP - { - tileBMP tiles * = indexBMP; - - for (tile_n=0; tile_n<1024; tile_n++) { - i = (tile_n & 0x1F) << 4; - j = (tile_n >> 5) << 12; - memcpy(bmp + j + i, indexBMP, 16); indexBMP += 16; j+=512; - memcpy(bmp + j + i, indexBMP, 16); indexBMP += 16; j+=512; - memcpy(bmp + j + i, indexBMP, 16); indexBMP += 16; j+=512; - memcpy(bmp + j + i, indexBMP, 16); indexBMP += 16; j+=512; - memcpy(bmp + j + i, indexBMP, 16); indexBMP += 16; j+=512; - memcpy(bmp + j + i, indexBMP, 16); indexBMP += 16; j+=512; - memcpy(bmp + j + i, indexBMP, 16); indexBMP += 16; j+=512; - memcpy(bmp + j + i, indexBMP, 16); indexBMP += 16; - } - glRasterPos2i(0,0); - glDrawPixels(256,256,GL_RGBA,GL_UNSIGNED_SHORT_1_5_5_5_REV, bmp); - } - break; - case 1: //256c - if (pal = pal_addr[palindex]) { - pal += palnum*256; - for (tile_n=0; tile_n<1024; tile_n++) { - for (index=0; index<64; index++) { - palette_256[index]=pal[*index256]; - index256++; - } - glRasterPos2i((tile_n & 0x1F)<<3, (tile_n >> 5)<<3); - glDrawPixels(8,8,GL_RGBA,GL_UNSIGNED_SHORT_1_5_5_5_REV, palette_256); - } - } - break; - case 2: //16c - if (pal = pal_addr[palindex]) { - pal += palnum*16; - for (tile_n=0; tile_n<1024; tile_n++) { - for (index=0; index<64; index++) { - if (index & 1) continue; - palette_16[index] =pal[*index16 & 15]; - palette_16[index+1]=pal[*index16 >> 4]; - index16++; - } - glRasterPos2i((tile_n & 0x1F)<<3, (tile_n >> 5)<<3); - glDrawPixels(8,8,GL_RGBA,GL_UNSIGNED_SHORT_1_5_5_5_REV, palette_16); - } - } - break; - } -#endif - my_gl_End(gl_context_num); -} - -static void initialize() { - GtkComboBox * combo; - if (init) return; - - wPaint= glade_xml_get_widget(xml_tools, "wDraw_Tile"); - wSpin = (GtkSpinButton*)glade_xml_get_widget(xml_tools, "wtools_4_palnum"); - combo = (GtkComboBox*)glade_xml_get_widget(xml_tools, "wtools_4_palette"); - init_combo_palette(combo, pal_addr); - combo = (GtkComboBox*)glade_xml_get_widget(xml_tools, "wtools_4_memory"); - init_combo_memory(combo, mem_addr); - - gl_context_num = init_GL_free_s(wPaint, NDSDisplayID_Main); - reshape(wPaint, gl_context_num); - gtk_widget_show(wPaint); - init=TRUE; -} - - -void on_wtools_4_TileView_show (GtkWidget *widget, gpointer data) { - initialize(); - register_Tool(wtools_4_update); -} -gboolean on_wtools_4_TileView_close (GtkWidget *widget, ...) { - unregister_Tool(wtools_4_update); - gtk_widget_hide(widget); - return TRUE; -} - -void on_wtools_4_palette_changed (GtkComboBox *combo, gpointer user_data) { - palindex = gtk_combo_box_get_active(combo); - gtk_widget_set_sensitive((GtkWidget*)wSpin,(palindex >=4)); - gtk_spin_button_set_value(wSpin,0); - gtk_widget_queue_draw(wPaint); -} -void on_wtools_4_palnum_value_changed (GtkSpinButton *spin, gpointer user_data) { - palnum = gtk_spin_button_get_value_as_int(spin); - gtk_widget_queue_draw(wPaint); -} -void on_wtools_4_memory_changed (GtkComboBox *combo, gpointer user_data) { - memnum = gtk_combo_box_get_active(combo); - gtk_widget_queue_draw(wPaint); -} -void on_wtools_4_rXX_toggled (GtkToggleButton *togglebutton, gpointer user_data) { - colnum = dyn_CAST(int,user_data); - gtk_widget_queue_draw(wPaint); -} -gboolean on_wDraw_Tile_expose_event (GtkWidget * w, GdkEventExpose * e, gpointer user_data) { - refresh(); - return TRUE; -} -#else -void on_wtools_4_TileView_show (GtkWidget *widget, gpointer data) { -} -gboolean on_wtools_4_TileView_close (GtkWidget *widget, ...) { - return FALSE; -} -void on_wtools_4_palette_changed (GtkComboBox *combo, gpointer user_data) { -} -void on_wtools_4_palnum_value_changed (GtkSpinButton *spin, gpointer user_data) { -} -void on_wtools_4_memory_changed (GtkComboBox *combo, gpointer user_data) { -} -void on_wtools_4_rXX_toggled (GtkToggleButton *togglebutton, gpointer user_data) { -} -gboolean on_wDraw_Tile_expose_event (GtkWidget * w, GdkEventExpose * e, gpointer user_data) { - return FALSE; -} -#endif diff --git a/desmume/src/frontend/posix/gtk-glade/dTools/callbacks_dtools.h b/desmume/src/frontend/posix/gtk-glade/dTools/callbacks_dtools.h deleted file mode 100644 index b94dfe355..000000000 --- a/desmume/src/frontend/posix/gtk-glade/dTools/callbacks_dtools.h +++ /dev/null @@ -1,79 +0,0 @@ -/* callbacks_dtools.h - this file is part of DeSmuME - * - * Copyright (C) 2007 Damien Nozay (damdoum) - * Author: damdoum at users.sourceforge.net - * - * This file 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 2, or (at your option) - * any later version. - * - * This file 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 this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __CALLBACKS_DTOOLS_H__ -#define __CALLBACKS_DTOOLS_H__ - -#include "../globals.h" - -extern "C" { - -/* ***** ***** IO REGISTERS ***** ***** */ -G_MODULE_EXPORT void on_wtools_1_combo_cpu_changed (GtkComboBox *, gpointer ); -G_MODULE_EXPORT void on_wtools_1_IOregs_show (GtkWidget *, gpointer ); -G_MODULE_EXPORT gboolean on_wtools_1_IOregs_close (GtkWidget *, ...); -G_MODULE_EXPORT gboolean on_wtools_1_draw_button_release_event(GtkWidget *, GdkEventButton *, gpointer ); -G_MODULE_EXPORT gboolean on_wtools_1_draw_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer user_data); - -/* ***** ***** MEMORY VIEWER ***** ***** */ -G_MODULE_EXPORT void on_wtools_2_MemView_show (GtkWidget *, gpointer ); -G_MODULE_EXPORT gboolean on_wtools_2_MemView_close (GtkWidget *, ...); - -G_MODULE_EXPORT void on_wtools_2_cpu_changed (GtkComboBox *, gpointer ); -G_MODULE_EXPORT void on_wtools_2_r8_toggled (GtkToggleButton *, gpointer ); -G_MODULE_EXPORT void on_wtools_2_r16_toggled (GtkToggleButton *, gpointer ); -G_MODULE_EXPORT void on_wtools_2_r32_toggled (GtkToggleButton *, gpointer ); -G_MODULE_EXPORT void on_wtools_2_GotoAddress_activate (GtkEntry *, gpointer ); -G_MODULE_EXPORT void on_wtools_2_GotoAddress_changed (GtkEntry *, gpointer ); -G_MODULE_EXPORT void on_wtools_2_GotoButton_clicked (GtkButton *, gpointer ); -G_MODULE_EXPORT void on_wtools_2_scroll_value_changed (GtkRange *, gpointer ); -G_MODULE_EXPORT gboolean on_wtools_2_draw_button_release_event(GtkWidget *, GdkEventButton *, gpointer ); -G_MODULE_EXPORT gboolean on_wtools_2_draw_expose_event (GtkWidget *, GdkEventExpose *, gpointer ); -G_MODULE_EXPORT gboolean on_wtools_2_draw_scroll_event (GtkWidget *, GdkEventScroll *, gpointer ); - -/* ***** ***** PALETTE VIEWER ***** ***** */ -// initialise combo box for all palettes -void init_combo_palette(GtkComboBox *combo, u16 ** addresses); - -G_MODULE_EXPORT void on_wtools_3_PalView_show (GtkWidget *, gpointer ); -G_MODULE_EXPORT gboolean on_wtools_3_PalView_close (GtkWidget *, ...); -G_MODULE_EXPORT gboolean on_wtools_3_PalView_delete_event (GtkWidget *, GdkEvent *, gpointer ); -G_MODULE_EXPORT gboolean on_wtools_3_draw_expose_event (GtkWidget *, GdkEventExpose *, gpointer ); -G_MODULE_EXPORT void on_wtools_3_palette_changed (GtkComboBox *, gpointer ); -G_MODULE_EXPORT void on_wtools_3_palnum_value_changed (GtkSpinButton *, gpointer ); - - -/* ***** ***** TILE VIEWER ***** ***** */ -// initialise combo box for all palettes -void init_combo_memory(GtkComboBox *combo, u8 ** addresses); - -G_MODULE_EXPORT void on_wtools_4_TileView_show (GtkWidget *, gpointer ); -G_MODULE_EXPORT gboolean on_wtools_4_TileView_close (GtkWidget *, ...); -G_MODULE_EXPORT gboolean on_wtools_4_TileView_delete_event (GtkWidget *, GdkEvent *, gpointer ); -G_MODULE_EXPORT void on_wtools_4_memory_changed (GtkComboBox *, gpointer ); -G_MODULE_EXPORT void on_wtools_4_palette_changed (GtkComboBox *, gpointer ); -G_MODULE_EXPORT void on_wtools_4_palnum_value_changed (GtkSpinButton *, gpointer ); -G_MODULE_EXPORT void on_wtools_4_rXX_toggled (GtkToggleButton *togglebutton, gpointer user_data); -G_MODULE_EXPORT gboolean on_wDraw_Tile_expose_event (GtkWidget *, GdkEventExpose *, gpointer ); - -} - -#endif diff --git a/desmume/src/frontend/posix/gtk-glade/dTools/dTools_display.h b/desmume/src/frontend/posix/gtk-glade/dTools/dTools_display.h deleted file mode 100644 index 0da3e5e33..000000000 --- a/desmume/src/frontend/posix/gtk-glade/dTools/dTools_display.h +++ /dev/null @@ -1,110 +0,0 @@ -/* dTools_display.c - * - * Copyright (C) 2007 Damien Nozay (damdoum) - * Author: damdoum at users.sourceforge.net - * - * This file 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 2, or (at your option) - * any later version. - * - * This file 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 this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef _DTOOLS_DISPLAY_H_ -#define _DTOOLS_DISPLAY_H_ - -#include - -typedef struct { - GtkWidget *widget; - GdkDrawable *draw; - GdkGC *gc_fg; - GdkGC *gc_bg; - PangoLayout* playout; - int size_w, size_h; - int char_w, char_h, padding; - GList * colors_rgb; - GList * attr_list; - PangoAttrList * curr_attr; -} dTools_dsp; - -static void inline dTools_display_set_size(dTools_dsp * dsp, int w, int h, int pad) { - dsp->size_w = w; - dsp->size_h = h; - dsp->padding = pad; -// gtk_widget_set_size_request(dsp->widget, -// dsp->char_w * w + pad * 2, dsp->char_h * h + pad * 2); - gtk_widget_set_usize(dsp->widget, - dsp->char_w * w + pad * 2, dsp->char_h * h + pad * 2); -} - -static void inline dTools_display_init(dTools_dsp * dsp, GtkWidget * widget, int w, int h, int pad) { - dsp->widget = widget; - dsp->draw = widget->window; - dsp->gc_fg = widget->style->fg_gc[widget->state]; - dsp->gc_bg = widget->style->white_gc; - dsp->playout = gtk_widget_create_pango_layout(widget, NULL); - - dsp->colors_rgb = NULL; - dsp->attr_list = NULL; - dsp->curr_attr = NULL; - - pango_layout_set_markup(dsp->playout, "X",-1); - pango_layout_get_pixel_size(dsp->playout, &dsp->char_w, &dsp->char_h); - dTools_display_set_size(dsp, w, h, pad); -} - -// void unref (gpointer data, ...) { -// pango_attr_list_unref(data); -// } - -static void inline dTools_display_free(dTools_dsp * dsp) { -// g_list_foreach(dsp->attr_list, (GFunc)unref, NULL); -// g_object_unref(dsp->playout); // not alloc -} - -static void inline dTools_display_add_markup(dTools_dsp * dsp, const char * markup) { - PangoAttrList *attr; - pango_parse_markup (markup, -1, 0, &attr, NULL, NULL, NULL); - dsp->attr_list = g_list_append(dsp->attr_list, attr); - dsp->curr_attr = attr; -} - -static void inline dTools_display_clear(dTools_dsp * dsp) { - gdk_draw_rectangle(dsp->draw, dsp->gc_bg, TRUE, 0, 0, - dsp->widget->allocation.width, dsp->widget->allocation.height); -} - -static void inline dTools_display_clear_char(dTools_dsp * dsp, int x, int y, int nb) { - gdk_draw_rectangle(dsp->draw, dsp->gc_bg, TRUE, - x * dsp->char_w + dsp->padding, y * dsp->char_h + dsp->padding, - nb * dsp->char_w, dsp->char_h); -} - -static void inline dTools_display_select_attr(dTools_dsp * dsp, int index) { - PangoAttrList *attr = NULL; - attr = (PangoAttrList*) g_list_nth_data(dsp->attr_list, index); - if (attr != NULL) { - dsp->curr_attr = attr; - } - pango_layout_set_attributes(dsp->playout, dsp->curr_attr); -} - -static void inline dTools_display_draw_text(dTools_dsp * dsp, int x, int y, const char * txt) { - pango_layout_set_text(dsp->playout, txt, -1); - gdk_draw_layout(dsp->draw, dsp->gc_fg, - x * dsp->char_w + dsp->padding, - y * dsp->char_h + dsp->padding, - dsp->playout); -} - -#endif diff --git a/desmume/src/frontend/posix/gtk-glade/desmume-glade.desktop b/desmume/src/frontend/posix/gtk-glade/desmume-glade.desktop deleted file mode 100644 index 64a73637a..000000000 --- a/desmume/src/frontend/posix/gtk-glade/desmume-glade.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Version=1.0 -Type=Application -Name=DeSmuME (Gtk-Glade) -Comment=Nintento DS emulator -TryExec=desmume-glade -Exec=desmume-glade -Icon=DeSmuME -Categories=GNOME;GTK;Game;Emulator; diff --git a/desmume/src/frontend/posix/gtk-glade/desmume.cpp b/desmume/src/frontend/posix/gtk-glade/desmume.cpp deleted file mode 100644 index 81c3293b8..000000000 --- a/desmume/src/frontend/posix/gtk-glade/desmume.cpp +++ /dev/null @@ -1,170 +0,0 @@ -/* desmume.c - this file is part of DeSmuME - * - * Copyright (C) 2007-2015 DeSmuME Team - * Copyright (C) 2007 Pascal Giard (evilynux) - * - * This file 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 2, or (at your option) - * any later version. - * - * This file 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 this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "desmume.h" - -#define EMULOOP_PRIO (G_PRIORITY_HIGH_IDLE + 20) -gboolean EmuLoop(gpointer data); -static BOOL regMainLoop = FALSE; - -#define TICKS_PER_FRAME 17 - - -static BOOL noticed_3D=FALSE; -volatile bool execute = false; -BOOL click = FALSE; - -void desmume_mem_init(); - -u8 *desmume_rom_data = NULL; -u32 desmume_last_cycle; - -void desmume_init() -{ - NDS_Init(); - SPU_ChangeSoundCore(SNDCORE_SDL, 735 * 4); - execute = false; -} - -void desmume_free() -{ - execute = false; - NDS_DeInit(); -} - -int desmume_open(const char *filename) -{ - int i; - noticed_3D=FALSE; - clear_savestates(); - i = NDS_LoadROM(filename); - return i; -} - -void desmume_savetype(int type) { - backup_setManualBackupType(type); -} - - -void desmume_pause() -{ - execute = false; - SPU_Pause(1); -} - -void desmume_resume() -{ - SPU_Pause(0); - execute = true; - if(!regMainLoop) - g_idle_add_full(EMULOOP_PRIO, &EmuLoop, NULL, NULL); - regMainLoop = TRUE; -} - -void desmume_reset() -{ - noticed_3D=FALSE; - NDS_Reset(); - desmume_resume(); -} - -void desmume_toggle() -{ - execute ^= true; -} -/*INLINE BOOL desmume_running() -{ - return execute; -}*/ - -INLINE void desmume_cycle() -{ - u16 keypad; - /* Joystick events */ - /* Retrieve old value: can use joysticks w/ another device (from our side) */ - keypad = get_keypad(); - /* Process joystick events if any */ - process_joystick_events( &keypad); - /* Update keypad value */ - update_keypad(keypad); - - NDS_exec(); - SPU_Emulate_user(); -} - - -Uint32 fps, fps_SecStart, fps_FrameCount; -Uint32 fsFrameCount = 0; -Uint32 ticksPrevFrame = 0, ticksCurFrame = 0; -static void Draw() -{ -} - -gboolean EmuLoop(gpointer data) -{ - if(desmume_running()) /* Si on est en train d'executer le programme ... */ - { - if(Frameskip != 0 && (fsFrameCount % (Frameskip+1)) != 0) - NDS_SkipNextFrame(); - - fsFrameCount++; - - fps_FrameCount++; - if(!fps_SecStart) fps_SecStart = SDL_GetTicks(); - if(SDL_GetTicks() - fps_SecStart >= 1000) - { - fps_SecStart = SDL_GetTicks(); - fps = fps_FrameCount; - fps_FrameCount = 0; - - char Title[32]; - sprintf(Title, "Desmume - %dfps", fps); - gtk_window_set_title(GTK_WINDOW(pWindow), Title); - } - - desmume_cycle(); /* Emule ! */ - //for(i = 0; i < Frameskip; i++) desmume_cycle(); /* cycles supplémentaires pour le frameskip */ - - Draw(); - - notify_Tools(); - gtk_widget_queue_draw(pDrawingArea); - gtk_widget_queue_draw(pDrawingArea2); - - ticksCurFrame = SDL_GetTicks(); - - if(!glade_fps_limiter_disabled) - { - if((ticksCurFrame - ticksPrevFrame) < TICKS_PER_FRAME) - while((ticksCurFrame - ticksPrevFrame) < TICKS_PER_FRAME) - ticksCurFrame = SDL_GetTicks(); - } - - ticksPrevFrame = SDL_GetTicks(); - - return TRUE; - } - gtk_widget_queue_draw(pDrawingArea); - gtk_widget_queue_draw(pDrawingArea2); - regMainLoop = FALSE; - return FALSE; -} - diff --git a/desmume/src/frontend/posix/gtk-glade/desmume.h b/desmume/src/frontend/posix/gtk-glade/desmume.h deleted file mode 100644 index 150cf6b6a..000000000 --- a/desmume/src/frontend/posix/gtk-glade/desmume.h +++ /dev/null @@ -1,47 +0,0 @@ -/* desmume.h - this file is part of DeSmuME - * - * Copyright (C) 2007-2015 DeSmuME Team - * - * This file 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 2, or (at your option) - * any later version. - * - * This file 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 this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __DESMUME_H__ -#define __DESMUME_H__ - -#include "globals.h" - -#define FPS_LIMITER_FRAME_PERIOD 5 -extern SDL_sem *glade_fps_limiter_semaphore; -extern int glade_fps_limiter_disabled; - -extern void desmume_init( void); -extern void desmume_free( void); - -extern int desmume_open(const char *filename); -extern void desmume_savetype(int type); -extern void desmume_pause( void); -extern void desmume_resume( void); -extern void desmume_reset( void); -extern void desmume_toggle( void); -//extern BOOL desmume_running( void); -INLINE BOOL desmume_running(void) -{ - return execute; -} - -extern INLINE void desmume_cycle( void); -#endif /*__DESMUME_H__*/ - diff --git a/desmume/src/frontend/posix/gtk-glade/doc/desmume-glade.1 b/desmume/src/frontend/posix/gtk-glade/doc/desmume-glade.1 deleted file mode 100644 index 2376378f8..000000000 --- a/desmume/src/frontend/posix/gtk-glade/doc/desmume-glade.1 +++ /dev/null @@ -1,115 +0,0 @@ -.\" Hey, EMACS: -*- nroff -*- -.\" First parameter, NAME, should be all caps -.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection -.\" other parameters are allowed: see man(7), man(1) -.TH DESMUME 1 "June 26, 2007" -.\" Please adjust this date whenever revising the manpage. -.\" -.\" Some roff macros, for reference: -.\" .nh disable hyphenation -.\" .hy enable hyphenation -.\" .ad l left justify -.\" .ad b justify to both left and right margins -.\" .nf disable filling -.\" .fi enable filling -.\" .br insert line break -.\" .sp insert n+1 empty lines -.\" for manpage-specific macros, see man(7) -.SH NAME -desmume-glade \- Nintendo DS emulator -.SH SYNOPSIS -.B desmume-glade -.RI [ options ] " files" ... -.SH DESCRIPTION -This manual page documents briefly the -.B desmume-glade -program -.PP -.\" TeX users may be more comfortable with the \fB\fP and -.\" \fI\fP escape sequences to invode bold face and italics, -.\" respectively. -\fBdesmume\fP is a Nintendo DS emulator running homebrew demos and commercial games. -.SH OPTIONS -These programs follow the usual GNU command line syntax, with long -options starting with two dashes (`-'). -A summary of options is included below. -.TP -.B \-\-load-slot=NUM -Loads savegame from slot NUM -.TP -.B \-\-soft-convert -Use software colour conversion during OpenGL screen rendering. May produce better or worse frame rates depending on hardware. -.TP -.B \-\-3d-engine=ENGINE -Select available 3d emulation: -.RS -0 = 3d disabled -.RE -.RS -1 = internal desmume software rasterizer (default) -.RE -.RS -2 = osmesa or gtkglext opengl (if available, depending on compilation options, see desmume \-\-help) -.RE -.TP -.B \-\-disable-limiter -Disables the 60 fps limiter -.TP -.B \-\-arm9gdb=PORT_NUM -Enable the ARM9 GDB stub on the given port -.TP -.B \-\-arm7gdb=PORT_NUM -Enable the ARM7 GDB stub on the given port -.TP -.B \-h, \-\-help -Show summary of options. -.TP -.B \-v, \-\-version -Show version of program. -.SH INPUT -Mouse cursor acts as stylus, mouse click replaces stylus touch. -.PP -Keyboard can be configured and by default works as follows: -.RS -F1-F10 load savegame from slot 1-10 -.RE -.RS -Shift+F1-F10 save game to slot 1-10 -.RE -.RS -Non-keypad arrows act as d-pad -.RE -.RS -z = A -.RE -.RS -x = B -.RE -.RS -a = Y -.RE -.RS -s = X -.RE -.RS -q = L -.RE -.RS -w = R -.RE -.RS -Enter = START -.RE -.RS -Left Shift = SELECT -.RE -.RS -Backspace = LID -.RE -.PP -Desmume accepts joystick events, which can be configured by user. -.SH AUTHOR -desmume was written by DeSmuME team -(http://sourceforge.net/projects/desmume). -.PP -This manual page was written by Pascal Giard , for the Debian project (but may be used by others). diff --git a/desmume/src/frontend/posix/gtk-glade/gdk_3Demu.cpp b/desmume/src/frontend/posix/gtk-glade/gdk_3Demu.cpp deleted file mode 100644 index e979965f7..000000000 --- a/desmume/src/frontend/posix/gtk-glade/gdk_3Demu.cpp +++ /dev/null @@ -1,208 +0,0 @@ -/* $Id: gdk_3Demu.c,v 1.4 2007-07-15 21:50:30 evilynux Exp $ - */ -/* - Copyright (C) 2006-2007 Ben Jaques - - This file is part of DeSmuME - - DeSmuME 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 2 of the License, or - (at your option) any later version. - - DeSmuME 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 DeSmuME; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -#ifdef GTKGLEXT_AVAILABLE - -#include -#include - -// Localization -#include -#define _(String) gettext (String) - -#include "../types.h" -#include "../render3D.h" -#include "../OGLRender.h" -#include "gdk_3Demu.h" - -/* - * The GDK 3D emulation. - * This uses the OpenGL Collector plugin, using gdkGLext for the platform - * specific helper functions. - */ - - -static GdkPixmap *target_pixmap; -static GdkGLContext *glcontext = NULL; -static GdkGLDrawable *gldrawable; - - -#if 0 /* not used */ -static void -print_gl_config_attrib (GdkGLConfig *glconfig, - const gchar *attrib_str, - int attrib, - gboolean is_boolean) -{ - int value; - - g_print ("%s = ", attrib_str); - if (gdk_gl_config_get_attrib (glconfig, attrib, &value)) - { - if (is_boolean) - g_print ("%s\n", value == TRUE ? "TRUE" : "FALSE"); - else - g_print ("%d\n", value); - } - else - g_print (_("*** Cannot get %s attribute value\n"), attrib_str); -} - - -static void -examine_gl_config_attrib (GdkGLConfig *glconfig) -{ - g_print ("\nOpenGL visual configurations :\n\n"); - - g_print ("gdk_gl_config_is_rgba (glconfig) = %s\n", - gdk_gl_config_is_rgba (glconfig) ? "TRUE" : "FALSE"); - g_print ("gdk_gl_config_is_double_buffered (glconfig) = %s\n", - gdk_gl_config_is_double_buffered (glconfig) ? "TRUE" : "FALSE"); - g_print ("gdk_gl_config_is_stereo (glconfig) = %s\n", - gdk_gl_config_is_stereo (glconfig) ? "TRUE" : "FALSE"); - g_print ("gdk_gl_config_has_alpha (glconfig) = %s\n", - gdk_gl_config_has_alpha (glconfig) ? "TRUE" : "FALSE"); - g_print ("gdk_gl_config_has_depth_buffer (glconfig) = %s\n", - gdk_gl_config_has_depth_buffer (glconfig) ? "TRUE" : "FALSE"); - g_print ("gdk_gl_config_has_stencil_buffer (glconfig) = %s\n", - gdk_gl_config_has_stencil_buffer (glconfig) ? "TRUE" : "FALSE"); - g_print ("gdk_gl_config_has_accum_buffer (glconfig) = %s\n", - gdk_gl_config_has_accum_buffer (glconfig) ? "TRUE" : "FALSE"); - - g_print ("\n"); - - print_gl_config_attrib (glconfig, "GDK_GL_USE_GL", - GDK_GL_USE_GL, TRUE); - print_gl_config_attrib (glconfig, "GDK_GL_BUFFER_SIZE", - GDK_GL_BUFFER_SIZE, FALSE); - print_gl_config_attrib (glconfig, "GDK_GL_LEVEL", - GDK_GL_LEVEL, FALSE); - print_gl_config_attrib (glconfig, "GDK_GL_RGBA", - GDK_GL_RGBA, TRUE); - print_gl_config_attrib (glconfig, "GDK_GL_DOUBLEBUFFER", - GDK_GL_DOUBLEBUFFER, TRUE); - print_gl_config_attrib (glconfig, "GDK_GL_STEREO", - GDK_GL_STEREO, TRUE); - print_gl_config_attrib (glconfig, "GDK_GL_AUX_BUFFERS", - GDK_GL_AUX_BUFFERS, FALSE); - print_gl_config_attrib (glconfig, "GDK_GL_RED_SIZE", - GDK_GL_RED_SIZE, FALSE); - print_gl_config_attrib (glconfig, "GDK_GL_GREEN_SIZE", - GDK_GL_GREEN_SIZE, FALSE); - print_gl_config_attrib (glconfig, "GDK_GL_BLUE_SIZE", - GDK_GL_BLUE_SIZE, FALSE); - print_gl_config_attrib (glconfig, "GDK_GL_ALPHA_SIZE", - GDK_GL_ALPHA_SIZE, FALSE); - print_gl_config_attrib (glconfig, "GDK_GL_DEPTH_SIZE", - GDK_GL_DEPTH_SIZE, FALSE); - print_gl_config_attrib (glconfig, "GDK_GL_STENCIL_SIZE", - GDK_GL_STENCIL_SIZE, FALSE); - print_gl_config_attrib (glconfig, "GDK_GL_ACCUM_RED_SIZE", - GDK_GL_ACCUM_RED_SIZE, FALSE); - print_gl_config_attrib (glconfig, "GDK_GL_ACCUM_GREEN_SIZE", - GDK_GL_ACCUM_GREEN_SIZE, FALSE); - print_gl_config_attrib (glconfig, "GDK_GL_ACCUM_BLUE_SIZE", - GDK_GL_ACCUM_BLUE_SIZE, FALSE); - print_gl_config_attrib (glconfig, "GDK_GL_ACCUM_ALPHA_SIZE", - GDK_GL_ACCUM_ALPHA_SIZE, FALSE); - - g_print ("\n"); -} -#endif - -static bool -begin_opengl_region_gdk_3d( void) { - bool failed = false; - - gdk_error_trap_push(); - failed = !gdk_gl_drawable_gl_begin(gldrawable, glcontext); - gdk_flush(); - failed = failed | gdk_error_trap_pop(); - - if (failed) return false; - - return true; -} - -static void -end_opengl_region_gdk_3d( void) { - gdk_gl_drawable_gl_end (gldrawable); -} - -static bool -initialise_gdk_3d( void) { - /* this does nothing */ - return true; -} - -int -init_opengl_gdk_3Demu( GdkDrawable * drawable) { - GdkGLConfig *glconfig; - - /* create the off screen pixmap */ - target_pixmap = gdk_pixmap_new ( drawable, 256, 192, -1); - - if ( target_pixmap == NULL) { - g_print (_("*** Failed to create pixmap.\n")); - return 0; - } - - glconfig = gdk_gl_config_new_by_mode ((GdkGLConfigMode) (GDK_GL_MODE_RGBA | - GDK_GL_MODE_DEPTH | - GDK_GL_MODE_STENCIL | - GDK_GL_MODE_SINGLE)); - if (glconfig == NULL) - { - g_print (_("*** No appropriate OpenGL-capable visual found.\n")); - return 0; - } - - /* - * Set OpenGL-capability to the pixmap - */ - - gldrawable = GDK_GL_DRAWABLE (gdk_pixmap_set_gl_capability (target_pixmap, - glconfig, - NULL)); - - if ( gldrawable == NULL) { - g_print (_("Failed to create the GdkGLPixmap\n")); - return 0; - } - - glcontext = gdk_gl_context_new (gldrawable, - NULL, - FALSE, - GDK_GL_RGBA_TYPE); - if (glcontext == NULL) - { - g_print (_("Connot create the OpenGL rendering context\n")); - return 0; - } - - oglrender_init = initialise_gdk_3d; - oglrender_beginOpenGL = begin_opengl_region_gdk_3d; - oglrender_endOpenGL = end_opengl_region_gdk_3d; - - return 1; -} - -#endif diff --git a/desmume/src/frontend/posix/gtk-glade/gdk_3Demu.h b/desmume/src/frontend/posix/gtk-glade/gdk_3Demu.h deleted file mode 100644 index 42cced988..000000000 --- a/desmume/src/frontend/posix/gtk-glade/gdk_3Demu.h +++ /dev/null @@ -1,32 +0,0 @@ -/* $Id: gdk_3Demu.h,v 1.1 2007-04-21 19:45:07 evilynux Exp $ - */ -/* - Copyright (C) 2006-2007 Ben Jaques - - This file is part of DeSmuME - - DeSmuME 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 2 of the License, or - (at your option) any later version. - - DeSmuME 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 DeSmuME; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -#ifdef GTKGLEXT_AVAILABLE -/* - * The GDK 3D emulation. - * This uses the OpenGL Collector plugin, using gdkGLext for the platform - * specific helper functions. - */ - -int -init_opengl_gdk_3Demu( GdkDrawable * drawable); - -#endif diff --git a/desmume/src/frontend/posix/gtk-glade/gdk_gl.cpp b/desmume/src/frontend/posix/gtk-glade/gdk_gl.cpp deleted file mode 100644 index 767f4ebc4..000000000 --- a/desmume/src/frontend/posix/gtk-glade/gdk_gl.cpp +++ /dev/null @@ -1,296 +0,0 @@ -/* gdk_gl.cpp - this file is part of DeSmuME - * - * Copyright (C) 2007-2017 DeSmuME Team - * Copyright (C) 2007 Damien Nozay (damdoum) - * Author: damdoum at users.sourceforge.net - * - * This file 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 2, or (at your option) - * any later version. - * - * This file 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 this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "gdk_gl.h" - -#ifdef GTKGLEXT_AVAILABLE - -#include -#include - -#define _DUP8(a) a,a,a,a, a,a,a,a -#define _DUP4(a) a,a,a,a -#define _DUP2(a) a,a - -// free number we can use in tools 0-1 reserved for screens -static int free_gl_drawable=2; -GdkGLConfig *my_glConfig=NULL; -GdkGLContext *my_glContext[8]={_DUP8(NULL)}; -GdkGLDrawable *my_glDrawable[8]={_DUP8(NULL)}; -GtkWidget *pDrawingTexArea; - -GLuint screen_texture[2]; - -#undef _DUP8 -#undef _DUP4 -#undef _DUP2 - -/************************************************/ -/* BEGIN & END */ -/************************************************/ - -BOOL my_gl_Begin (NDSDisplayID displayID) -{ - return gdk_gl_drawable_gl_begin(my_glDrawable[displayID], my_glContext[displayID]); -} - -void my_gl_End (NDSDisplayID displayID) -{ - if (gdk_gl_drawable_is_double_buffered (my_glDrawable[displayID])) - gdk_gl_drawable_swap_buffers (my_glDrawable[displayID]); - else - glFlush(); - gdk_gl_drawable_gl_end(my_glDrawable[displayID]); -} - -/************************************************/ -/* OTHER GL COMMANDS */ -/************************************************/ - -void my_gl_Identity() -{ - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - -void my_gl_Clear(NDSDisplayID displayID) -{ - if (!my_gl_Begin(displayID)) - return; - - /* Set the background black */ - glClearColor(0.0f, 0.0f, 0.0f, 0.0f); - glClear(GL_COLOR_BUFFER_BIT); - - my_gl_End(displayID); -} - -/************************************************/ -/* INITIALIZATION */ -/************************************************/ - -void init_GL(GtkWidget *widget, NDSDisplayID displayID, NDSDisplayID sharedContextDisplayID) -{ -// for (n=gtk_events_pending(); n>0; n--) -// gtk_main_iteration(); - // init GL capability - my_glContext[displayID] = NULL; - my_glDrawable[displayID] = NULL; - if (!gtk_widget_set_gl_capability( - widget, my_glConfig, - my_glContext[sharedContextDisplayID], - //NULL, - TRUE, - GDK_GL_RGBA_TYPE)) { - printf ("gtk_widget_set_gl_capability\n"); - exit(1); - } - // realize so that we get a GdkWindow - gtk_widget_realize(widget); - // make sure we realize - gdk_flush(); - - my_glDrawable[displayID] = gtk_widget_get_gl_drawable(widget); - - if (displayID == sharedContextDisplayID) - { - my_glContext[displayID] = gtk_widget_get_gl_context(widget); - } - else - { - my_glContext[displayID] = my_glContext[sharedContextDisplayID]; - return; - } - - reshape(widget, displayID); -} - -NDSDisplayID init_GL_free_s(GtkWidget *widget, NDSDisplayID sharedContextDisplayID) -{ - NDSDisplayID r = (NDSDisplayID)free_gl_drawable; - my_glContext[r] = NULL; - my_glDrawable[r] = NULL; - init_GL(widget, r, sharedContextDisplayID); - free_gl_drawable++; - return r; -} - -NDSDisplayID init_GL_free(GtkWidget *widget) -{ - NDSDisplayID r = (NDSDisplayID)free_gl_drawable; - my_glContext[r] = NULL; - my_glDrawable[r] = NULL; - init_GL(widget, r, r); - free_gl_drawable++; - return r; -} - -void init_GL_capabilities() { - - uint16_t blank_texture[256 * 256]; - memset(blank_texture, 0, sizeof(blank_texture)); - - my_glConfig = gdk_gl_config_new_by_mode ( - (GdkGLConfigMode) (GDK_GL_MODE_RGBA - | GDK_GL_MODE_DEPTH - | GDK_GL_MODE_DOUBLE) - ); - - // initialize 1st drawing area - init_GL(pDrawingArea, NDSDisplayID_Main, NDSDisplayID_Main); - my_gl_Clear(NDSDisplayID_Main); - - if (!my_gl_Begin(NDSDisplayID_Main)) - return; - - glEnable(GL_TEXTURE_2D); - glGenTextures(2, screen_texture); - - /* Generate The Texture */ - for (int i = 0; i < 2; i++) - { - glBindTexture(GL_TEXTURE_2D, screen_texture[i]); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - -#define MyFILTER GL_LINEAR -//#define MyFILTER GL_NEAREST - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, MyFILTER); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, MyFILTER); -#undef MyFILTER - - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 256, 256, - 0, GL_RGBA, - GL_UNSIGNED_SHORT_1_5_5_5_REV, - blank_texture); - } - - my_gl_End(NDSDisplayID_Main); - - // initialize 2nd drawing area (sharing context) - init_GL(pDrawingArea2, NDSDisplayID_Touch, NDSDisplayID_Main); - my_gl_Clear(NDSDisplayID_Touch); -} - -/************************************************/ -/* RESHAPE */ -/************************************************/ - -void reshape(GtkWidget *widget, NDSDisplayID displayID) -{ - if (my_glDrawable[displayID] == NULL || !my_gl_Begin(displayID)) - return; - - glViewport (0, 0, widget->allocation.width, widget->allocation.height); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - my_gl_End(displayID); -} - -/************************************************/ -/* TEXTURING */ -/************************************************/ - -static void -my_gl_ScreenTex() -{ - const NDSDisplayInfo &displayInfo = GPU->GetDisplayInfo(); - - glBindTexture(GL_TEXTURE_2D, screen_texture[NDSDisplayID_Main]); - glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 256, 192, - GL_RGBA, - GL_UNSIGNED_SHORT_1_5_5_5_REV, - displayInfo.renderedBuffer[NDSDisplayID_Main]); - - glBindTexture(GL_TEXTURE_2D, screen_texture[NDSDisplayID_Touch]); - glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 256, 192, - GL_RGBA, - GL_UNSIGNED_SHORT_1_5_5_5_REV, - displayInfo.renderedBuffer[NDSDisplayID_Touch]); -} - -static void my_gl_ScreenTexApply(NDSDisplayID displayID) -{ - const NDSDisplayInfo &displayInfo = GPU->GetDisplayInfo(); - - GLfloat backlightIntensity = displayInfo.backlightIntensity[displayID]; - - glBindTexture(GL_TEXTURE_2D, screen_texture[displayID]); - glBegin(GL_QUADS); - glColor3f(backlightIntensity, backlightIntensity, backlightIntensity); glTexCoord2f(0.00f, 0.00f); glVertex2f(-1.0f, 1.0f); - glColor3f(backlightIntensity, backlightIntensity, backlightIntensity); glTexCoord2f(1.00f, 0.00f); glVertex2f( 1.0f, 1.0f); - glColor3f(backlightIntensity, backlightIntensity, backlightIntensity); glTexCoord2f(1.00f, 0.75f); glVertex2f( 1.0f, -1.0f); - glColor3f(backlightIntensity, backlightIntensity, backlightIntensity); glTexCoord2f(0.00f, 0.75f); glVertex2f(-1.0f, -1.0f); - glEnd(); -} - -/************************************************/ -/* RENDERING */ -/************************************************/ - -gboolean screen(GtkWidget *widget, NDSDisplayID displayID) -{ - NDSDisplayID displayToDraw = displayID; - - // we take care to draw the right thing the right place - // we need to rearrange widgets not to use this trick - if (ScreenInvert) - { - displayToDraw = (displayID == NDSDisplayID_Main) ? NDSDisplayID_Touch : NDSDisplayID_Main; - } - - if (!my_gl_Begin(displayID)) - return TRUE; - - glLoadIdentity(); - - // clear screen - glClearColor(0.0f,0.0f,0.0f,1.0f); - glClear(GL_COLOR_BUFFER_BIT); - - glEnable(GL_TEXTURE_2D); - glDisable(GL_BLEND); - glDisable(GL_DEPTH_TEST); - glDisable(GL_DITHER); - glDisable(GL_STENCIL_TEST); - - if (desmume_running()) - { - // rotate - glRotatef(ScreenRotate, 0.0, 0.0, 1.0); - if (displayID == NDSDisplayID_Main) - { - my_gl_ScreenTex(); - } - } - - // apply part of the texture - my_gl_ScreenTexApply(displayToDraw); - - my_gl_End(displayID); - - return TRUE; -} - -#endif /* if GTKGLEXT_AVAILABLE */ diff --git a/desmume/src/frontend/posix/gtk-glade/gdk_gl.h b/desmume/src/frontend/posix/gtk-glade/gdk_gl.h deleted file mode 100644 index 504736c38..000000000 --- a/desmume/src/frontend/posix/gtk-glade/gdk_gl.h +++ /dev/null @@ -1,49 +0,0 @@ -/* gdk_gl.h - this file is part of DeSmuME - * - * Copyright (C) 2007 Damien Nozay (damdoum) - * Author: damdoum at users.sourceforge.net - * - * This file 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 2, or (at your option) - * any later version. - * - * This file 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 this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __GDKGL_H__ -#define __GDKGL_H__ - -#include "globals.h" - -#ifdef GTKGLEXT_AVAILABLE - #include - #include - #include - #include -#endif - -#include "../GPU.h" - -BOOL my_gl_Begin (NDSDisplayID displayID); -void my_gl_End (NDSDisplayID displayID); -void my_gl_Clear(NDSDisplayID displayID); -void my_gl_DrawBeautifulQuad( void); -void my_gl_Identity( void); - -void init_GL_capabilities(); -void init_GL(GtkWidget *widget, NDSDisplayID displayID, NDSDisplayID sharedContextDisplayID); -NDSDisplayID init_GL_free_s(GtkWidget *widget, NDSDisplayID sharedContextDisplayID); -NDSDisplayID init_GL_free(GtkWidget *widget); -void reshape(GtkWidget *widget, NDSDisplayID displayID); -gboolean screen(GtkWidget *widget, NDSDisplayID displayID); - -#endif diff --git a/desmume/src/frontend/posix/gtk-glade/glade-xml.cpp b/desmume/src/frontend/posix/gtk-glade/glade-xml.cpp deleted file mode 100644 index c884fb041..000000000 --- a/desmume/src/frontend/posix/gtk-glade/glade-xml.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * libglade - a library for building interfaces from XML files at runtime - * Copyright (C) 1998-2002 James Henstridge - * - * glade-xml.c: implementation of core public interface functions - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "globals.h" -#include -#include -#include -#include - -typedef struct _GladeXMLPrivate nopriv_GladeXMLPrivate; -struct _GladeXMLPrivate { - GladeInterface *tree; /* the tree for this GladeXML */ - GtkTooltips *tooltips; /* if not NULL, holds all tooltip info */ - GHashTable *name_hash; - GHashTable *signals; - GtkWindow *toplevel; - GtkAccelGroup *accel_group; - GtkWidget *focus_widget; - GtkWidget *default_widget; - GList *deferred_props; -}; - -typedef struct _GladeSignalData GladeSignalData; - -struct _GladeSignalData { - GObject *signal_object; - char *signal_name; - char *connect_object; /* or NULL if there is none */ - gboolean signal_after; -}; - -static void -autoconnect_foreach_StringObject(const char *signal_handler, - GList * signals, GModule * allsymbols) -{ - GCallback func; - - if (!g_module_symbol(allsymbols, signal_handler, (void **) &func)) - g_warning(_("could not find signal handler '%s'."), - signal_handler); - else - for (; signals != NULL; signals = signals->next) { - GladeSignalData *data = (GladeSignalData *) signals->data; - if (data->connect_object) { - GladeXML *self = - glade_get_widget_tree(GTK_WIDGET(data->signal_object)); - char format[] = "%_\0\0"; - if (sscanf(data->connect_object, "%%%c:", &format[1])) { - - // this should solve 64bit problems but now memory gets - // (it should get) deallocated when program is destroyed - gpointer argument = g_malloc(sizeof(callback_arg)); - sscanf(data->connect_object + 3, format, argument); - -// printf ("%f \n",obj); - if (data->signal_after) - g_signal_connect_after(data->signal_object, data->signal_name, func, argument); - else - g_signal_connect(data->signal_object, data->signal_name, func, argument); - } else { - - GObject *other = (GObject *) g_hash_table_lookup( - self->priv->name_hash, - data->connect_object); - g_signal_connect_object(data->signal_object, data->signal_name, func, other, - (GConnectFlags) ((data->signal_after ? G_CONNECT_AFTER : 0) | G_CONNECT_SWAPPED)); - } - - } else { - - /* the signal_data argument is just a string, but may - * be helpful for someone */ - if (data->signal_after) - g_signal_connect_after(data->signal_object, data->signal_name, func, NULL); - else - g_signal_connect(data->signal_object, data->signal_name, func, NULL); - } - } -} - -/** - * glade_xml_signal_autoconnect_StringObject: - * @self: the GladeXML object. - * - * This function is a variation of glade_xml_signal_connect. It uses - * gmodule's introspective features (by openning the module %NULL) to - * look at the application's symbol table. From here it tries to match - * the signal handler names given in the interface description with - * symbols in the application and connects the signals. - * - * Note that this function will not work correctly if gmodule is not - * supported on the platform. - */ - -void glade_xml_signal_autoconnect_StringObject(GladeXML * self) -{ - GModule *allsymbols; - nopriv_GladeXMLPrivate *priv; - - g_return_if_fail(self != NULL); - if (!g_module_supported()) - g_error("glade_xml_signal_autoconnect requires working gmodule"); - - /* get a handle on the main executable -- use this to find symbols */ - allsymbols = g_module_open(NULL, (GModuleFlags) 0); - priv = (nopriv_GladeXMLPrivate *) self->priv; - g_hash_table_foreach(priv->signals, - (GHFunc) autoconnect_foreach_StringObject, - allsymbols); -} diff --git a/desmume/src/frontend/posix/gtk-glade/glade/DeSmuME.xpm b/desmume/src/frontend/posix/gtk-glade/glade/DeSmuME.xpm deleted file mode 100644 index d1ce27621..000000000 --- a/desmume/src/frontend/posix/gtk-glade/glade/DeSmuME.xpm +++ /dev/null @@ -1,50 +0,0 @@ -/* XPM */ -static const char * DeSmuME_xpm[] = { -"32 32 15 1", -" c None", -". c #000000", -"+ c #F6F6FB", -"@ c #ECECF6", -"# c #E2E2F1", -"$ c #D8D8EC", -"% c #CFCFE7", -"& c #C5C5E2", -"* c #BBBBDE", -"= c #B1B1D9", -"- c #A8A8D4", -"; c #9E9ECF", -"> c #9494CA", -", c #8A8AC5", -"' c #8080C0", -" .................... ", -" .................... ", -".....++..+++++..+++++.. ", -".....++..++.....++..... ", -"..@@@@@..@@@@@..@@@@@.. ", -"..@@.@@..@@........@@.. ", -"..##.##..##.##..##.##.. ", -"..##.##..##.##..##.##.. ", -"..$$.$$..$$.$$..$$.$$.. ", -"..$$.$$..$$.$$..$$.$$.. ", -"..%%.%%..%%.%%..%%.%%.. ", -"..%%.%%..%%.%%..%%.%%.. ", -"..&&&&&..&&&&&..&&&&&.. ", -"....................... ", -".......********.**.**.. ", -" ..==.==.==.==.==.. ", -" ..==.==.==.==.==.. ", -" ..--.--.--.--.--.. ", -" ..--.--.--.--.--.. ", -" ..;;.;;.;;.;;;;;.. ", -" ..................... ", -" ..................... ", -" ..>>>>>>>>.>>>>>.. ", -" ..>>.>>.>>.>>..... ", -" ..,,.,,.,,.,,,,,.. ", -" ..,,.,,.,,.,,..... ", -" ..''.''.''.''.''.. ", -" ..''.''.''.''.''.. ", -" ..''.''.''.''.''.. ", -" ..''.''.''.'''''.. ", -" .................. ", -" .................. "}; diff --git a/desmume/src/frontend/posix/gtk-glade/glade/DeSmuMe.glade b/desmume/src/frontend/posix/gtk-glade/glade/DeSmuMe.glade deleted file mode 100644 index 04c57d995..000000000 --- a/desmume/src/frontend/posix/gtk-glade/glade/DeSmuMe.glade +++ /dev/null @@ -1,2389 +0,0 @@ - - - - - - - True - GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK - DeSmuME - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_CENTER - False - False - False - DeSmuME.xpm - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - - - - - - - True - False - 0 - - - - True - GTK_PACK_DIRECTION_LTR - GTK_PACK_DIRECTION_LTR - - - - True - _File - True - - - - - - - True - gtk-open - True - - - - - - - True - Save State - True - - - - - - - True - State 1 - True - - - - - - - - True - State 2 - True - - - - - - - - True - State 3 - True - - - - - - - - True - State 4 - True - - - - - - - - True - State 5 - True - - - - - - - - True - State 6 - True - - - - - - - - True - State 7 - True - - - - - - - - True - State 8 - True - - - - - - - - True - State 9 - True - - - - - - - - True - State 10 - True - - - - - - - - - - - - True - Load State - True - - - - - - - True - State 1 - True - - - - - - - - True - State 2 - True - - - - - - - - True - State 3 - True - - - - - - - - True - State 4 - True - - - - - - - - True - State 5 - True - - - - - - - - True - State 6 - True - - - - - - - - True - State 7 - True - - - - - - - - True - State 8 - True - - - - - - - - True - State 9 - True - - - - - - - - True - State 10 - True - - - - - - - - - - - - True - _PrintScreen - True - - - - - - - True - gtk-quit - True - - - - - - - - - - - True - _Emulation - True - - - - - - - True - False - gtk-execute - True - - - - - - - True - False - gtk-media-pause - True - - - - - - - True - False - Reset - True - - - - - True - gtk-refresh - 1 - 0.5 - 0.5 - 0 - 0 - - - - - - - - True - Layers - True - False - - - - - - - True - FrameSkip - True - - - - - - - True - 0 - True - True - - - - - - - True - 1 - True - False - fs0 - - - - - - - True - 2 - True - False - fs0 - - - - - - - True - 3 - True - False - fs0 - - - - - - - True - 4 - True - False - fs0 - - - - - - - True - 5 - True - False - fs0 - - - - - - - True - 6 - True - False - fs0 - - - - - - - True - 7 - True - False - fs0 - - - - - - - True - 8 - True - False - fs0 - - - - - - - True - 9 - True - False - fs0 - - - - - - - - - - - True - Size - True - - - - - - - True - 1x - True - True - - - - - - - True - 2x - True - False - size1x - - - - - - - True - 3x - True - False - size1x - - - - - - - - - - - - - - - True - Config - True - - - - - - - True - _Saves - True - - - - - - - True - TYPE: Auto (1B) - True - True - - - - - - - True - TYPE: EEPROM1 (4kB) - True - False - savetype1 - - - - - - - True - TYPE: EEPROM2 (64kB) - True - False - savetype1 - - - - - - - True - TYPE: EEPROM2 (512kB) - True - False - savetype1 - - - - - - - True - TYPE: FLASH (256kB) - True - False - savetype1 - - - - - - - True - TYPE: FRAM (2MB) - True - False - savetype1 - - - - - - - True - TYPE: FRAM (4MB) - True - False - savetype1 - - - - - - - - - - - True - Keyboard controls - True - - - - - True - gtk-preferences - 1 - 0.5 - 0.5 - 0 - 0 - - - - - - - - True - Joystick controls - True - - - - - True - gtk-preferences - 1 - 0.5 - 0.5 - 0 - 0 - - - - - - - - True - Audio On - True - True - - - - - - - True - True Gap - True - False - - - - - - - True - No Gap - True - False - - - - - - - True - Right Screen - True - False - - - - - - - True - Rotate Screen 0 - True - True - - - - - - - True - Rotate Screen 90 - True - False - menu_rotatescreen0 - - - - - - - True - Rotate Screen 180 - True - False - menu_rotatescreen0 - - - - - - - True - Rotate Screen 270 - True - False - menu_rotatescreen0 - - - - - - - - - - - True - Tools - True - - - - - - - True - IO regs - True - - - - - True - gtk-properties - 1 - 0.5 - 0.5 - 0 - 0 - - - - - - - - True - View Memory - True - - - - - True - gtk-properties - 1 - 0.5 - 0.5 - 0 - 0 - - - - - - - - True - View Palette - True - - - - - True - gtk-properties - 1 - 0.5 - 0.5 - 0 - 0 - - - - - - - - True - View Tiles - True - - - - - True - gtk-properties - 1 - 0.5 - 0.5 - 0 - 0 - - - - - - - - - - - - True - ? - True - - - - - - - True - gtk-about - True - - - - - - - - - - 0 - False - False - - - - - - GTK_ORIENTATION_HORIZONTAL - GTK_TOOLBAR_BOTH - True - True - - - - True - gtk-open - True - True - False - - - - False - True - - - - - - True - True - True - True - - - False - False - - - - - - True - False - gtk-execute - True - True - False - False - - - - False - True - - - - - - True - False - Reset - True - gtk-refresh - True - True - False - - - - False - True - - - - - - True - True - True - True - - - False - False - - - - - - True - gtk-quit - True - True - False - - - - False - True - - - - - 0 - False - False - - - - - - True - 3 - 5 - False - 0 - 0 - - - - 256 - 192 - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_EXPOSURE_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK - - - - - - - - - 1 - 2 - 0 - 1 - - - - - - - - 256 - 192 - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_EXPOSURE_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK - - - - - - - - - 1 - 2 - 2 - 3 - - - - - - - - False - False - 0 - - - - True - True - BG0 - True - GTK_RELIEF_NORMAL - True - True - False - True - - - - 0 - False - False - - - - - - True - True - BG1 - True - GTK_RELIEF_NORMAL - True - True - False - True - - - - 0 - False - False - - - - - - True - True - BG2 - True - GTK_RELIEF_NORMAL - True - True - False - True - - - - 0 - False - False - - - - - - True - True - BG3 - True - GTK_RELIEF_NORMAL - True - True - False - True - - - - 0 - False - False - - - - - - True - True - OBJ - True - GTK_RELIEF_NORMAL - True - True - False - True - - - - 0 - False - False - - - - - 0 - 1 - 2 - 3 - - - - - - - - False - False - 0 - - - - True - True - BG0 - True - GTK_RELIEF_NORMAL - True - True - False - True - - - - 0 - False - False - - - - - - True - True - BG1 - True - GTK_RELIEF_NORMAL - True - True - False - True - - - - 0 - False - False - - - - - - True - True - BG2 - True - GTK_RELIEF_NORMAL - True - True - False - True - - - - 0 - False - False - - - - - - True - True - BG3 - True - GTK_RELIEF_NORMAL - True - True - False - True - - - - 0 - False - False - - - - - - True - True - OBJ - True - GTK_RELIEF_NORMAL - True - True - False - True - - - - 0 - False - False - - - - - 0 - 1 - 0 - 1 - - - - - - - - True - - - 2 - 3 - 0 - 1 - - fill - - - - - - True - - - 1 - 2 - 1 - 2 - fill - - - - - - 0 - False - False - - - - - - True - True - - - 0 - False - False - - - - - - - - False - DeSmuME - Nintendo DS emulator based on work by Yopyop - False - http://desmume.org - http://desmume.org - Original author: - yopyop (now inactive) - -Current team: - Allustar - amponzi - ape - delfare - Guillaume Duhamel - Normmatt - Romain Vallet - shash - Theo Berkau - thoduv - Tim Seidel (Mighty Max) - Damien Nozay (damdoum) - Pascal Giard (evilynux) - -Contributors: - Anthony Molinaro - translator-credits - DeSmuME.xpm - - - - - - - Keyboard Config - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_CENTER_ON_PARENT - False - True - True - DeSmuME.xpm - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - False - True - - - - - - True - False - 0 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - gtk-cancel - True - GTK_RELIEF_NORMAL - True - -6 - - - - - - True - True - True - gtk-ok - True - GTK_RELIEF_NORMAL - True - -5 - - - - - 0 - False - True - GTK_PACK_END - - - - - - True - 6 - 7 - False - 0 - 0 - - - - True - True - Left : - True - GTK_RELIEF_NORMAL - True - - - - 0 - 1 - 4 - 5 - fill - - - - - - - True - True - Up : - True - GTK_RELIEF_NORMAL - True - - - - 1 - 2 - 3 - 4 - fill - - - - - - - True - True - Right : - True - GTK_RELIEF_NORMAL - True - - - - 2 - 3 - 4 - 5 - fill - - - - - - - True - True - Y : - True - GTK_RELIEF_NORMAL - True - - - - 4 - 5 - 4 - 5 - fill - - - - - - - True - True - X : - True - GTK_RELIEF_NORMAL - True - - - - 5 - 6 - 3 - 4 - fill - - - - - - - True - True - A : - True - GTK_RELIEF_NORMAL - True - - - - 6 - 7 - 4 - 5 - fill - - - - - - - True - True - Down : - True - GTK_RELIEF_NORMAL - True - - - - 1 - 2 - 5 - 6 - fill - - - - - - - True - True - B : - True - GTK_RELIEF_NORMAL - True - - - - 5 - 6 - 5 - 6 - fill - - - - - - True - True - Lid : - True - GTK_RELIEF_NORMAL - True - - - - 4 - 5 - 2 - 3 - fill - - - - - - - True - True - Select : - True - GTK_RELIEF_NORMAL - True - - - - 3 - 4 - 2 - 3 - fill - - - - - - - True - True - L : - True - GTK_RELIEF_NORMAL - True - - - - 0 - 2 - 1 - 2 - fill - - - - - - - True - True - R : - True - GTK_RELIEF_NORMAL - True - - - - 5 - 7 - 1 - 2 - fill - - - - - - - True - True - Debug : - True - GTK_RELIEF_NORMAL - True - - - - 2 - 3 - 1 - 2 - fill - - - - - - - True - True - Start : - True - GTK_RELIEF_NORMAL - True - - - - 3 - 4 - 1 - 2 - fill - - - - - - - True - True - Boost : - True - GTK_RELIEF_NORMAL - True - - - - 4 - 5 - 1 - 2 - fill - - - - - - 0 - True - True - - - - - - - - GDK_KEY_RELEASE_MASK - Key definition - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_CENTER_ON_PARENT - True - True - True - DeSmuME.xpm - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - False - True - - - - - True - False - 0 - - - - True - GTK_BUTTONBOX_END - - - - True - gtk-cancel - True - GTK_RELIEF_NORMAL - False - -6 - - - - - - True - gtk-ok - True - GTK_RELIEF_NORMAL - False - -5 - - - - - 0 - False - True - GTK_PACK_END - - - - - - True - Press a key... - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - - - Joystick Config - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_CENTER_ON_PARENT - False - True - True - DeSmuME.xpm - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - False - True - - - - - - True - False - 0 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - gtk-cancel - True - GTK_RELIEF_NORMAL - True - -6 - - - - - - True - True - True - gtk-ok - True - GTK_RELIEF_NORMAL - True - -5 - - - - - 0 - False - True - GTK_PACK_END - - - - - - True - 5 - 7 - True - 0 - 0 - - - - True - True - Y : - True - GTK_RELIEF_NORMAL - True - - - - 4 - 5 - 3 - 4 - fill - - - - - - - True - True - X : - True - GTK_RELIEF_NORMAL - True - - - - 5 - 6 - 2 - 3 - fill - - - - - - - True - True - A : - True - GTK_RELIEF_NORMAL - True - - - - 6 - 7 - 3 - 4 - fill - - - - - - - True - True - B : - True - GTK_RELIEF_NORMAL - True - - - - 5 - 6 - 4 - 5 - fill - - - - - - - True - True - Select : - True - GTK_RELIEF_NORMAL - True - - - - 3 - 4 - 1 - 2 - fill - - - - - - True - True - Lid : - True - GTK_RELIEF_NORMAL - True - - - - 4 - 5 - 1 - 2 - fill - - - - - - - True - True - L : - True - GTK_RELIEF_NORMAL - True - - - - 0 - 2 - 0 - 1 - fill - - - - - - - True - True - R : - True - GTK_RELIEF_NORMAL - True - - - - 5 - 7 - 0 - 1 - fill - - - - - - - True - True - Debug : - True - GTK_RELIEF_NORMAL - True - - - - 2 - 3 - 0 - 1 - fill - - - - - - - True - True - Start : - True - GTK_RELIEF_NORMAL - True - - - - 3 - 4 - 0 - 1 - fill - - - - - - - True - True - Boost : - True - GTK_RELIEF_NORMAL - True - - - - 4 - 5 - 0 - 1 - fill - - - - - - - True - True - Axis : - True - GTK_RELIEF_NORMAL - True - - - - 1 - 2 - 2 - 3 - fill - - - - - - - True - True - Axis : - True - GTK_RELIEF_NORMAL - True - - - - 1 - 2 - 4 - 5 - fill - - - - - - - True - True - Axis : - True - GTK_RELIEF_NORMAL - True - - - - 0 - 1 - 3 - 4 - fill - - - - - - - True - True - Axis : - True - GTK_RELIEF_NORMAL - True - - - - 2 - 3 - 3 - 4 - fill - - - - - - 0 - True - True - - - - - - - - GDK_KEY_RELEASE_MASK - Key definition - GTK_WINDOW_POPUP - GTK_WIN_POS_CENTER_ALWAYS - True - False - False - DeSmuME.xpm - False - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - False - False - - - - True - False - 0 - - - - True - GTK_BUTTONBOX_END - - - 0 - False - True - GTK_PACK_END - - - - - - True - Press a button... - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - True - True - - - - - - - - 3D rom - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_CENTER - True - False - False - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - False - True - - - - - - True - False - 0 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - gtk-ok - True - GTK_RELIEF_NORMAL - True - -5 - - - - - 0 - False - True - GTK_PACK_END - - - - - - 250 - 20 - True - 3D operation detected - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 10 - True - True - - - - - - - diff --git a/desmume/src/frontend/posix/gtk-glade/glade/DeSmuMe_Dtools.glade b/desmume/src/frontend/posix/gtk-glade/glade/DeSmuMe_Dtools.glade deleted file mode 100644 index 6439ec531..000000000 --- a/desmume/src/frontend/posix/gtk-glade/glade/DeSmuMe_Dtools.glade +++ /dev/null @@ -1,537 +0,0 @@ - - - - - - IO registers - True - GDK_WINDOW_TYPE_HINT_DIALOG - - - - - - True - - - True - 2 - 2 - 5 - - - - - - True - GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - - - 2 - 1 - 2 - GTK_FILL - - - - - True - cpu : ARM9 -cpu : ARM7 - - - - GTK_FILL - GTK_FILL - - - - - 2 - - - - - True - GTK_BUTTONBOX_END - - - True - True - True - gtk-ok - True - -5 - - - - - False - GTK_PACK_END - - - - - - - memory viewer - DeSmuME.xpm - GDK_WINDOW_TYPE_HINT_DIALOG - - - - - - True - - - True - 2 - 2 - - - - - - True - - - True - True - 8 bit - True - True - True - - - - False - False - - - - - True - True - 16 bit - True - True - wtools_2_r8 - - - - False - False - 1 - - - - - True - True - 32 bit - True - True - wtools_2_r8 - - - - False - False - 2 - - - - - True - ARM9 cpu -ARM7 cpu - - - - False - False - 3 - - - - - True - 0.000000 - GoTo: - GTK_JUSTIFY_RIGHT - - - False - 4 - - - - - True - True - 10 - - 0x00000000 - - - - - False - 5 - - - - - True - True - Go! - True - - - - False - False - 6 - - - - - GTK_FILL - GTK_FILL - - - - - True - GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - - - - 1 - 2 - - - - - True - 0 0 0 0 0 0 - - - - 1 - 2 - 1 - 2 - GTK_FILL - GTK_FILL - - - - - 2 - - - - - True - GTK_BUTTONBOX_END - - - True - True - True - gtk-close - True - -7 - - - - - False - GTK_PACK_END - - - - - - - Palette Viewer - DeSmuME.xpm - GDK_WINDOW_TYPE_HINT_DIALOG - - - - - - True - - - True - 2 - 3 - - - 256 - 256 - True - - - - 3 - 1 - 2 - - - - - - - True - 0.000000 - Palette : - GTK_JUSTIFY_RIGHT - - - 1 - 2 - GTK_FILL - - - - - - True - True - 0 0 15 1 2 0 - 1 - - - - 2 - 3 - GTK_FILL - - - - - - True - - - - - GTK_FILL - - - - - 2 - - - - - True - GTK_BUTTONBOX_END - - - True - True - True - gtk-close - True - -7 - - - - - False - GTK_PACK_END - - - - - - - Tile viewer - False - GDK_WINDOW_TYPE_HINT_DIALOG - - - - - - True - - - True - 3 - 4 - - - - - - - - - True - - - - - 1 - 2 - GTK_FILL - - - - - True - True - BMP - True - True - True - wtools_4_r16 - - - - 1 - 2 - 1 - 2 - GTK_FILL - - - - - - True - True - 256c - True - True - True - wtools_4_r16 - - - - 2 - 3 - 1 - 2 - GTK_FILL - - - - - - True - True - 16c - True - True - True - - - - 3 - 4 - 1 - 2 - GTK_FILL - - - - - - True - 0.000000 - Palette : - GTK_JUSTIFY_RIGHT - - - 2 - 3 - GTK_FILL - - - - - - True - True - 0 0 15 1 2 0 - 1 - - - - 3 - 4 - - - - - - 256 - 256 - GDK_EXPOSURE_MASK | GDK_STRUCTURE_MASK - - - - 3 - 2 - 3 - - - - - - - True - - - - - GTK_FILL - - - - - 2 - - - - - True - GTK_BUTTONBOX_END - - - True - True - True - gtk-close - True - -7 - - - - - False - GTK_PACK_END - - - - - - diff --git a/desmume/src/frontend/posix/gtk-glade/globals.h b/desmume/src/frontend/posix/gtk-glade/globals.h deleted file mode 100644 index f896bcf46..000000000 --- a/desmume/src/frontend/posix/gtk-glade/globals.h +++ /dev/null @@ -1,132 +0,0 @@ -/* globals.h - this file is part of DeSmuME - * - * Copyright (C) 2007-2015 DeSmuME Team - * Copyright (C) 2007 Damien Nozay (damdoum) - * Author: damdoum at users.sourceforge.net - * - * This file 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 2, or (at your option) - * any later version. - * - * This file 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 this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __GLOBALS_H__ -#define __GLOBALS_H__ - -#ifndef GTK_UI -#define GTK_UI -#endif - -#include -#include -#include -#include - -// Localization -#include -#define _(String) gettext (String) - -#include - -// fix gtk-glade on windows with no configure -#ifndef DATADIR -#define DATADIR " " -#endif -#ifndef GLADEUI_UNINSTALLED_DIR -#define GLADEUI_UNINSTALLED_DIR "glade/" -#endif - -#include -#include -#include -#include - - -typedef union _callback_arg{ - gpointer my_pointer; - gconstpointer my_constpointer; - - gfloat my_float; - gdouble my_double; - gsize my_size; - gssize my_ssize; - - gboolean my_boolean; - - guchar my_uchar; - guint my_uint; - guint8 my_uint8; - guint16 my_uint16; - guint32 my_uint32; - guint64 my_uint64; - gushort my_ushort; - gulong my_ulong; - - gchar my_char; - gint my_int; - gint8 my_int8; - gint16 my_int16; - gint32 my_int32; - gint64 my_int64; - gshort my_short; - glong my_long; -} callback_arg; -#define dyn_CAST(gtype,var) (((callback_arg*)var)->my_##gtype) - -#include "../MMU.h" -#include "../registers.h" -#include "../armcpu.h" -#include "../NDSSystem.h" -#include "../GPU.h" -#include "../shared/sndsdl.h" -#include "../shared/ctrlssdl.h" -#include "../types.h" -#include "../saves.h" -#include "../render3D.h" -#include "desmume.h" - -// autoconnect with strings as user_data - -void -glade_xml_signal_autoconnect_StringObject (GladeXML *self); - -//--- - -extern int Frameskip; - -/* main.cpp */ -extern GtkWidget * pWindow; -extern GtkWidget * pDrawingArea, * pDrawingArea2; -extern GladeXML * xml, * xml_tools; - -typedef void (*VoidFunPtr)(); -void notify_Tools(); -void register_Tool(VoidFunPtr fun); -void unregister_Tool(VoidFunPtr fun); -gchar * get_ui_file (const char *filename); - -/* callbacks.cpp */ -void enable_rom_features(); -void resize (float Size1, float Size2); -void rotate(float angle); -extern gboolean ScreenInvert; - -/* callbacks_IO.cpp */ -extern float ScreenCoeff_Size[2]; -extern float ScreenRotate; - -void black_screen (); -void edit_controls(); -void init_joy_labels(); - -#endif /* __GLOBALS_H__ */ diff --git a/desmume/src/frontend/posix/gtk-glade/keyval_names.cpp b/desmume/src/frontend/posix/gtk-glade/keyval_names.cpp deleted file mode 100644 index 65c94f12e..000000000 --- a/desmume/src/frontend/posix/gtk-glade/keyval_names.cpp +++ /dev/null @@ -1,1384 +0,0 @@ -/* keyval_names.cpp - this file is part of DeSmuME - * - * Copyright (C) 2007 Damien Nozay (damdoum) - * Author: damdoum at users.sourceforge.net - * - * This file 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 2, or (at your option) - * any later version. - * - * This file 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 this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "keyval_names.h" -/* see */ - -const char * unknown="(unknown)"; -const char * KEYVAL_NAMES[0x10000]; - -const char * KEYNAME(int k) { - const char * s = unknown; - s = KEYVAL_NAMES[k & 0xFFFF]; - return s; -} - -static void KEYVAL(int k, const char * name) { - if (KEYVAL_NAMES[k] == unknown) - KEYVAL_NAMES[k] = name; -} - -void init_keyvals() { - int i; - for (i=0; i<0x10000; i++) - KEYVAL_NAMES[i]=unknown; - - KEYVAL ( 0x0020 , "space" ); - KEYVAL ( 0x0021 , "exclam" ); - KEYVAL ( 0x0022 , "quotedbl" ); - KEYVAL ( 0x0023 , "numbersign" ); - KEYVAL ( 0x0024 , "dollar" ); - KEYVAL ( 0x0025 , "percent" ); - KEYVAL ( 0x0026 , "ampersand" ); - KEYVAL ( 0x0027 , "apostrophe" ); - KEYVAL ( 0x0027 , "quoteright" ); - KEYVAL ( 0x0028 , "parenleft" ); - KEYVAL ( 0x0029 , "parenright" ); - KEYVAL ( 0x002a , "asterisk" ); - KEYVAL ( 0x002b , "plus" ); - KEYVAL ( 0x002c , "comma" ); - KEYVAL ( 0x002d , "minus" ); - KEYVAL ( 0x002e , "period" ); - KEYVAL ( 0x002f , "slash" ); - KEYVAL ( 0x0030 , "0" ); - KEYVAL ( 0x0031 , "1" ); - KEYVAL ( 0x0032 , "2" ); - KEYVAL ( 0x0033 , "3" ); - KEYVAL ( 0x0034 , "4" ); - KEYVAL ( 0x0035 , "5" ); - KEYVAL ( 0x0036 , "6" ); - KEYVAL ( 0x0037 , "7" ); - KEYVAL ( 0x0038 , "8" ); - KEYVAL ( 0x0039 , "9" ); - KEYVAL ( 0x003a , "colon" ); - KEYVAL ( 0x003b , "semicolon" ); - KEYVAL ( 0x003c , "less" ); - KEYVAL ( 0x003d , "equal" ); - KEYVAL ( 0x003e , "greater" ); - KEYVAL ( 0x003f , "question" ); - KEYVAL ( 0x0040 , "at" ); - KEYVAL ( 0x0041 , "A" ); - KEYVAL ( 0x0042 , "B" ); - KEYVAL ( 0x0043 , "C" ); - KEYVAL ( 0x0044 , "D" ); - KEYVAL ( 0x0045 , "E" ); - KEYVAL ( 0x0046 , "F" ); - KEYVAL ( 0x0047 , "G" ); - KEYVAL ( 0x0048 , "H" ); - KEYVAL ( 0x0049 , "I" ); - KEYVAL ( 0x004a , "J" ); - KEYVAL ( 0x004b , "K" ); - KEYVAL ( 0x004c , "L" ); - KEYVAL ( 0x004d , "M" ); - KEYVAL ( 0x004e , "N" ); - KEYVAL ( 0x004f , "O" ); - KEYVAL ( 0x0050 , "P" ); - KEYVAL ( 0x0051 , "Q" ); - KEYVAL ( 0x0052 , "R" ); - KEYVAL ( 0x0053 , "S" ); - KEYVAL ( 0x0054 , "T" ); - KEYVAL ( 0x0055 , "U" ); - KEYVAL ( 0x0056 , "V" ); - KEYVAL ( 0x0057 , "W" ); - KEYVAL ( 0x0058 , "X" ); - KEYVAL ( 0x0059 , "Y" ); - KEYVAL ( 0x005a , "Z" ); - KEYVAL ( 0x005b , "bracketleft" ); - KEYVAL ( 0x005c , "backslash" ); - KEYVAL ( 0x005d , "bracketright" ); - KEYVAL ( 0x005e , "asciicircum" ); - KEYVAL ( 0x005f , "underscore" ); - KEYVAL ( 0x0060 , "grave" ); - KEYVAL ( 0x0060 , "quoteleft" ); - KEYVAL ( 0x0061 , "a" ); - KEYVAL ( 0x0062 , "b" ); - KEYVAL ( 0x0063 , "c" ); - KEYVAL ( 0x0064 , "d" ); - KEYVAL ( 0x0065 , "e" ); - KEYVAL ( 0x0066 , "f" ); - KEYVAL ( 0x0067 , "g" ); - KEYVAL ( 0x0068 , "h" ); - KEYVAL ( 0x0069 , "i" ); - KEYVAL ( 0x006a , "j" ); - KEYVAL ( 0x006b , "k" ); - KEYVAL ( 0x006c , "l" ); - KEYVAL ( 0x006d , "m" ); - KEYVAL ( 0x006e , "n" ); - KEYVAL ( 0x006f , "o" ); - KEYVAL ( 0x0070 , "p" ); - KEYVAL ( 0x0071 , "q" ); - KEYVAL ( 0x0072 , "r" ); - KEYVAL ( 0x0073 , "s" ); - KEYVAL ( 0x0074 , "t" ); - KEYVAL ( 0x0075 , "u" ); - KEYVAL ( 0x0076 , "v" ); - KEYVAL ( 0x0077 , "w" ); - KEYVAL ( 0x0078 , "x" ); - KEYVAL ( 0x0079 , "y" ); - KEYVAL ( 0x007a , "z" ); - KEYVAL ( 0x007b , "braceleft" ); - KEYVAL ( 0x007c , "bar" ); - KEYVAL ( 0x007d , "braceright" ); - KEYVAL ( 0x007e , "asciitilde" ); - KEYVAL ( 0x00a0 , "nobreakspace" ); - KEYVAL ( 0x00a1 , "exclamdown" ); - KEYVAL ( 0x00a2 , "cent" ); - KEYVAL ( 0x00a3 , "sterling" ); - KEYVAL ( 0x00a4 , "currency" ); - KEYVAL ( 0x00a5 , "yen" ); - KEYVAL ( 0x00a6 , "brokenbar" ); - KEYVAL ( 0x00a7 , "section" ); - KEYVAL ( 0x00a8 , "diaeresis" ); - KEYVAL ( 0x00a9 , "copyright" ); - KEYVAL ( 0x00aa , "ordfeminine" ); - KEYVAL ( 0x00ab , "guillemotleft" ); - KEYVAL ( 0x00ac , "notsign" ); - KEYVAL ( 0x00ad , "hyphen" ); - KEYVAL ( 0x00ae , "registered" ); - KEYVAL ( 0x00af , "macron" ); - KEYVAL ( 0x00b0 , "degree" ); - KEYVAL ( 0x00b1 , "plusminus" ); - KEYVAL ( 0x00b2 , "twosuperior" ); - KEYVAL ( 0x00b3 , "threesuperior" ); - KEYVAL ( 0x00b4 , "acute" ); - KEYVAL ( 0x00b5 , "mu" ); - KEYVAL ( 0x00b6 , "paragraph" ); - KEYVAL ( 0x00b7 , "periodcentered" ); - KEYVAL ( 0x00b8 , "cedilla" ); - KEYVAL ( 0x00b9 , "onesuperior" ); - KEYVAL ( 0x00ba , "masculine" ); - KEYVAL ( 0x00bb , "guillemotright" ); - KEYVAL ( 0x00bc , "onequarter" ); - KEYVAL ( 0x00bd , "onehalf" ); - KEYVAL ( 0x00be , "threequarters" ); - KEYVAL ( 0x00bf , "questiondown" ); - KEYVAL ( 0x00c0 , "Agrave" ); - KEYVAL ( 0x00c1 , "Aacute" ); - KEYVAL ( 0x00c2 , "Acircumflex" ); - KEYVAL ( 0x00c3 , "Atilde" ); - KEYVAL ( 0x00c4 , "Adiaeresis" ); - KEYVAL ( 0x00c5 , "Aring" ); - KEYVAL ( 0x00c6 , "AE" ); - KEYVAL ( 0x00c7 , "Ccedilla" ); - KEYVAL ( 0x00c8 , "Egrave" ); - KEYVAL ( 0x00c9 , "Eacute" ); - KEYVAL ( 0x00ca , "Ecircumflex" ); - KEYVAL ( 0x00cb , "Ediaeresis" ); - KEYVAL ( 0x00cc , "Igrave" ); - KEYVAL ( 0x00cd , "Iacute" ); - KEYVAL ( 0x00ce , "Icircumflex" ); - KEYVAL ( 0x00cf , "Idiaeresis" ); - KEYVAL ( 0x00d0 , "ETH" ); - KEYVAL ( 0x00d0 , "Eth" ); - KEYVAL ( 0x00d1 , "Ntilde" ); - KEYVAL ( 0x00d2 , "Ograve" ); - KEYVAL ( 0x00d3 , "Oacute" ); - KEYVAL ( 0x00d4 , "Ocircumflex" ); - KEYVAL ( 0x00d5 , "Otilde" ); - KEYVAL ( 0x00d6 , "Odiaeresis" ); - KEYVAL ( 0x00d7 , "multiply" ); - KEYVAL ( 0x00d8 , "Ooblique" ); - KEYVAL ( 0x00d9 , "Ugrave" ); - KEYVAL ( 0x00da , "Uacute" ); - KEYVAL ( 0x00db , "Ucircumflex" ); - KEYVAL ( 0x00dc , "Udiaeresis" ); - KEYVAL ( 0x00dd , "Yacute" ); - KEYVAL ( 0x00de , "THORN" ); - KEYVAL ( 0x00de , "Thorn" ); - KEYVAL ( 0x00df , "ssharp" ); - KEYVAL ( 0x00e0 , "agrave" ); - KEYVAL ( 0x00e1 , "aacute" ); - KEYVAL ( 0x00e2 , "acircumflex" ); - KEYVAL ( 0x00e3 , "atilde" ); - KEYVAL ( 0x00e4 , "adiaeresis" ); - KEYVAL ( 0x00e5 , "aring" ); - KEYVAL ( 0x00e6 , "ae" ); - KEYVAL ( 0x00e7 , "ccedilla" ); - KEYVAL ( 0x00e8 , "egrave" ); - KEYVAL ( 0x00e9 , "eacute" ); - KEYVAL ( 0x00ea , "ecircumflex" ); - KEYVAL ( 0x00eb , "ediaeresis" ); - KEYVAL ( 0x00ec , "igrave" ); - KEYVAL ( 0x00ed , "iacute" ); - KEYVAL ( 0x00ee , "icircumflex" ); - KEYVAL ( 0x00ef , "idiaeresis" ); - KEYVAL ( 0x00f0 , "eth" ); - KEYVAL ( 0x00f1 , "ntilde" ); - KEYVAL ( 0x00f2 , "ograve" ); - KEYVAL ( 0x00f3 , "oacute" ); - KEYVAL ( 0x00f4 , "ocircumflex" ); - KEYVAL ( 0x00f5 , "otilde" ); - KEYVAL ( 0x00f6 , "odiaeresis" ); - KEYVAL ( 0x00f7 , "division" ); - KEYVAL ( 0x00f8 , "oslash" ); - KEYVAL ( 0x00f9 , "ugrave" ); - KEYVAL ( 0x00fa , "uacute" ); - KEYVAL ( 0x00fb , "ucircumflex" ); - KEYVAL ( 0x00fc , "udiaeresis" ); - KEYVAL ( 0x00fd , "yacute" ); - KEYVAL ( 0x00fe , "thorn" ); - KEYVAL ( 0x00ff , "ydiaeresis" ); - KEYVAL ( 0x01a1 , "Aogonek" ); - KEYVAL ( 0x01a2 , "breve" ); - KEYVAL ( 0x01a3 , "Lstroke" ); - KEYVAL ( 0x01a5 , "Lcaron" ); - KEYVAL ( 0x01a6 , "Sacute" ); - KEYVAL ( 0x01a9 , "Scaron" ); - KEYVAL ( 0x01aa , "Scedilla" ); - KEYVAL ( 0x01ab , "Tcaron" ); - KEYVAL ( 0x01ac , "Zacute" ); - KEYVAL ( 0x01ae , "Zcaron" ); - KEYVAL ( 0x01af , "Zabovedot" ); - KEYVAL ( 0x01b1 , "aogonek" ); - KEYVAL ( 0x01b2 , "ogonek" ); - KEYVAL ( 0x01b3 , "lstroke" ); - KEYVAL ( 0x01b5 , "lcaron" ); - KEYVAL ( 0x01b6 , "sacute" ); - KEYVAL ( 0x01b7 , "caron" ); - KEYVAL ( 0x01b9 , "scaron" ); - KEYVAL ( 0x01ba , "scedilla" ); - KEYVAL ( 0x01bb , "tcaron" ); - KEYVAL ( 0x01bc , "zacute" ); - KEYVAL ( 0x01bd , "doubleacute" ); - KEYVAL ( 0x01be , "zcaron" ); - KEYVAL ( 0x01bf , "zabovedot" ); - KEYVAL ( 0x01c0 , "Racute" ); - KEYVAL ( 0x01c3 , "Abreve" ); - KEYVAL ( 0x01c5 , "Lacute" ); - KEYVAL ( 0x01c6 , "Cacute" ); - KEYVAL ( 0x01c8 , "Ccaron" ); - KEYVAL ( 0x01ca , "Eogonek" ); - KEYVAL ( 0x01cc , "Ecaron" ); - KEYVAL ( 0x01cf , "Dcaron" ); - KEYVAL ( 0x01d0 , "Dstroke" ); - KEYVAL ( 0x01d1 , "Nacute" ); - KEYVAL ( 0x01d2 , "Ncaron" ); - KEYVAL ( 0x01d5 , "Odoubleacute" ); - KEYVAL ( 0x01d8 , "Rcaron" ); - KEYVAL ( 0x01d9 , "Uring" ); - KEYVAL ( 0x01db , "Udoubleacute" ); - KEYVAL ( 0x01de , "Tcedilla" ); - KEYVAL ( 0x01e0 , "racute" ); - KEYVAL ( 0x01e3 , "abreve" ); - KEYVAL ( 0x01e5 , "lacute" ); - KEYVAL ( 0x01e6 , "cacute" ); - KEYVAL ( 0x01e8 , "ccaron" ); - KEYVAL ( 0x01ea , "eogonek" ); - KEYVAL ( 0x01ec , "ecaron" ); - KEYVAL ( 0x01ef , "dcaron" ); - KEYVAL ( 0x01f0 , "dstroke" ); - KEYVAL ( 0x01f1 , "nacute" ); - KEYVAL ( 0x01f2 , "ncaron" ); - KEYVAL ( 0x01f5 , "odoubleacute" ); - KEYVAL ( 0x01f8 , "rcaron" ); - KEYVAL ( 0x01f9 , "uring" ); - KEYVAL ( 0x01fb , "udoubleacute" ); - KEYVAL ( 0x01fe , "tcedilla" ); - KEYVAL ( 0x01ff , "abovedot" ); - KEYVAL ( 0x02a1 , "Hstroke" ); - KEYVAL ( 0x02a6 , "Hcircumflex" ); - KEYVAL ( 0x02a9 , "Iabovedot" ); - KEYVAL ( 0x02ab , "Gbreve" ); - KEYVAL ( 0x02ac , "Jcircumflex" ); - KEYVAL ( 0x02b1 , "hstroke" ); - KEYVAL ( 0x02b6 , "hcircumflex" ); - KEYVAL ( 0x02b9 , "idotless" ); - KEYVAL ( 0x02bb , "gbreve" ); - KEYVAL ( 0x02bc , "jcircumflex" ); - KEYVAL ( 0x02c5 , "Cabovedot" ); - KEYVAL ( 0x02c6 , "Ccircumflex" ); - KEYVAL ( 0x02d5 , "Gabovedot" ); - KEYVAL ( 0x02d8 , "Gcircumflex" ); - KEYVAL ( 0x02dd , "Ubreve" ); - KEYVAL ( 0x02de , "Scircumflex" ); - KEYVAL ( 0x02e5 , "cabovedot" ); - KEYVAL ( 0x02e6 , "ccircumflex" ); - KEYVAL ( 0x02f5 , "gabovedot" ); - KEYVAL ( 0x02f8 , "gcircumflex" ); - KEYVAL ( 0x02fd , "ubreve" ); - KEYVAL ( 0x02fe , "scircumflex" ); - KEYVAL ( 0x03a2 , "kappa" ); - KEYVAL ( 0x03a2 , "kra" ); - KEYVAL ( 0x03a3 , "Rcedilla" ); - KEYVAL ( 0x03a5 , "Itilde" ); - KEYVAL ( 0x03a6 , "Lcedilla" ); - KEYVAL ( 0x03aa , "Emacron" ); - KEYVAL ( 0x03ab , "Gcedilla" ); - KEYVAL ( 0x03ac , "Tslash" ); - KEYVAL ( 0x03b3 , "rcedilla" ); - KEYVAL ( 0x03b5 , "itilde" ); - KEYVAL ( 0x03b6 , "lcedilla" ); - KEYVAL ( 0x03ba , "emacron" ); - KEYVAL ( 0x03bb , "gcedilla" ); - KEYVAL ( 0x03bc , "tslash" ); - KEYVAL ( 0x03bd , "ENG" ); - KEYVAL ( 0x03bf , "eng" ); - KEYVAL ( 0x03c0 , "Amacron" ); - KEYVAL ( 0x03c7 , "Iogonek" ); - KEYVAL ( 0x03cc , "Eabovedot" ); - KEYVAL ( 0x03cf , "Imacron" ); - KEYVAL ( 0x03d1 , "Ncedilla" ); - KEYVAL ( 0x03d2 , "Omacron" ); - KEYVAL ( 0x03d3 , "Kcedilla" ); - KEYVAL ( 0x03d9 , "Uogonek" ); - KEYVAL ( 0x03dd , "Utilde" ); - KEYVAL ( 0x03de , "Umacron" ); - KEYVAL ( 0x03e0 , "amacron" ); - KEYVAL ( 0x03e7 , "iogonek" ); - KEYVAL ( 0x03ec , "eabovedot" ); - KEYVAL ( 0x03ef , "imacron" ); - KEYVAL ( 0x03f1 , "ncedilla" ); - KEYVAL ( 0x03f2 , "omacron" ); - KEYVAL ( 0x03f3 , "kcedilla" ); - KEYVAL ( 0x03f9 , "uogonek" ); - KEYVAL ( 0x03fd , "utilde" ); - KEYVAL ( 0x03fe , "umacron" ); - KEYVAL ( 0x047e , "overline" ); - KEYVAL ( 0x04a1 , "kana_fullstop" ); - KEYVAL ( 0x04a2 , "kana_openingbracket" ); - KEYVAL ( 0x04a3 , "kana_closingbracket" ); - KEYVAL ( 0x04a4 , "kana_comma" ); - KEYVAL ( 0x04a5 , "kana_conjunctive" ); - KEYVAL ( 0x04a5 , "kana_middledot" ); - KEYVAL ( 0x04a6 , "kana_WO" ); - KEYVAL ( 0x04a7 , "kana_a" ); - KEYVAL ( 0x04a8 , "kana_i" ); - KEYVAL ( 0x04a9 , "kana_u" ); - KEYVAL ( 0x04aa , "kana_e" ); - KEYVAL ( 0x04ab , "kana_o" ); - KEYVAL ( 0x04ac , "kana_ya" ); - KEYVAL ( 0x04ad , "kana_yu" ); - KEYVAL ( 0x04ae , "kana_yo" ); - KEYVAL ( 0x04af , "kana_tsu" ); - KEYVAL ( 0x04af , "kana_tu" ); - KEYVAL ( 0x04b0 , "prolongedsound" ); - KEYVAL ( 0x04b1 , "kana_A" ); - KEYVAL ( 0x04b2 , "kana_I" ); - KEYVAL ( 0x04b3 , "kana_U" ); - KEYVAL ( 0x04b4 , "kana_E" ); - KEYVAL ( 0x04b5 , "kana_O" ); - KEYVAL ( 0x04b6 , "kana_KA" ); - KEYVAL ( 0x04b7 , "kana_KI" ); - KEYVAL ( 0x04b8 , "kana_KU" ); - KEYVAL ( 0x04b9 , "kana_KE" ); - KEYVAL ( 0x04ba , "kana_KO" ); - KEYVAL ( 0x04bb , "kana_SA" ); - KEYVAL ( 0x04bc , "kana_SHI" ); - KEYVAL ( 0x04bd , "kana_SU" ); - KEYVAL ( 0x04be , "kana_SE" ); - KEYVAL ( 0x04bf , "kana_SO" ); - KEYVAL ( 0x04c0 , "kana_TA" ); - KEYVAL ( 0x04c1 , "kana_CHI" ); - KEYVAL ( 0x04c1 , "kana_TI" ); - KEYVAL ( 0x04c2 , "kana_TSU" ); - KEYVAL ( 0x04c2 , "kana_TU" ); - KEYVAL ( 0x04c3 , "kana_TE" ); - KEYVAL ( 0x04c4 , "kana_TO" ); - KEYVAL ( 0x04c5 , "kana_NA" ); - KEYVAL ( 0x04c6 , "kana_NI" ); - KEYVAL ( 0x04c7 , "kana_NU" ); - KEYVAL ( 0x04c8 , "kana_NE" ); - KEYVAL ( 0x04c9 , "kana_NO" ); - KEYVAL ( 0x04ca , "kana_HA" ); - KEYVAL ( 0x04cb , "kana_HI" ); - KEYVAL ( 0x04cc , "kana_FU" ); - KEYVAL ( 0x04cc , "kana_HU" ); - KEYVAL ( 0x04cd , "kana_HE" ); - KEYVAL ( 0x04ce , "kana_HO" ); - KEYVAL ( 0x04cf , "kana_MA" ); - KEYVAL ( 0x04d0 , "kana_MI" ); - KEYVAL ( 0x04d1 , "kana_MU" ); - KEYVAL ( 0x04d2 , "kana_ME" ); - KEYVAL ( 0x04d3 , "kana_MO" ); - KEYVAL ( 0x04d4 , "kana_YA" ); - KEYVAL ( 0x04d5 , "kana_YU" ); - KEYVAL ( 0x04d6 , "kana_YO" ); - KEYVAL ( 0x04d7 , "kana_RA" ); - KEYVAL ( 0x04d8 , "kana_RI" ); - KEYVAL ( 0x04d9 , "kana_RU" ); - KEYVAL ( 0x04da , "kana_RE" ); - KEYVAL ( 0x04db , "kana_RO" ); - KEYVAL ( 0x04dc , "kana_WA" ); - KEYVAL ( 0x04dd , "kana_N" ); - KEYVAL ( 0x04de , "voicedsound" ); - KEYVAL ( 0x04df , "semivoicedsound" ); - KEYVAL ( 0x05ac , "Arabic_comma" ); - KEYVAL ( 0x05bb , "Arabic_semicolon" ); - KEYVAL ( 0x05bf , "Arabic_question_mark" ); - KEYVAL ( 0x05c1 , "Arabic_hamza" ); - KEYVAL ( 0x05c2 , "Arabic_maddaonalef" ); - KEYVAL ( 0x05c3 , "Arabic_hamzaonalef" ); - KEYVAL ( 0x05c4 , "Arabic_hamzaonwaw" ); - KEYVAL ( 0x05c5 , "Arabic_hamzaunderalef" ); - KEYVAL ( 0x05c6 , "Arabic_hamzaonyeh" ); - KEYVAL ( 0x05c7 , "Arabic_alef" ); - KEYVAL ( 0x05c8 , "Arabic_beh" ); - KEYVAL ( 0x05c9 , "Arabic_tehmarbuta" ); - KEYVAL ( 0x05ca , "Arabic_teh" ); - KEYVAL ( 0x05cb , "Arabic_theh" ); - KEYVAL ( 0x05cc , "Arabic_jeem" ); - KEYVAL ( 0x05cd , "Arabic_hah" ); - KEYVAL ( 0x05ce , "Arabic_khah" ); - KEYVAL ( 0x05cf , "Arabic_dal" ); - KEYVAL ( 0x05d0 , "Arabic_thal" ); - KEYVAL ( 0x05d1 , "Arabic_ra" ); - KEYVAL ( 0x05d2 , "Arabic_zain" ); - KEYVAL ( 0x05d3 , "Arabic_seen" ); - KEYVAL ( 0x05d4 , "Arabic_sheen" ); - KEYVAL ( 0x05d5 , "Arabic_sad" ); - KEYVAL ( 0x05d6 , "Arabic_dad" ); - KEYVAL ( 0x05d7 , "Arabic_tah" ); - KEYVAL ( 0x05d8 , "Arabic_zah" ); - KEYVAL ( 0x05d9 , "Arabic_ain" ); - KEYVAL ( 0x05da , "Arabic_ghain" ); - KEYVAL ( 0x05e0 , "Arabic_tatweel" ); - KEYVAL ( 0x05e1 , "Arabic_feh" ); - KEYVAL ( 0x05e2 , "Arabic_qaf" ); - KEYVAL ( 0x05e3 , "Arabic_kaf" ); - KEYVAL ( 0x05e4 , "Arabic_lam" ); - KEYVAL ( 0x05e5 , "Arabic_meem" ); - KEYVAL ( 0x05e6 , "Arabic_noon" ); - KEYVAL ( 0x05e7 , "Arabic_ha" ); - KEYVAL ( 0x05e7 , "Arabic_heh" ); - KEYVAL ( 0x05e8 , "Arabic_waw" ); - KEYVAL ( 0x05e9 , "Arabic_alefmaksura" ); - KEYVAL ( 0x05ea , "Arabic_yeh" ); - KEYVAL ( 0x05eb , "Arabic_fathatan" ); - KEYVAL ( 0x05ec , "Arabic_dammatan" ); - KEYVAL ( 0x05ed , "Arabic_kasratan" ); - KEYVAL ( 0x05ee , "Arabic_fatha" ); - KEYVAL ( 0x05ef , "Arabic_damma" ); - KEYVAL ( 0x05f0 , "Arabic_kasra" ); - KEYVAL ( 0x05f1 , "Arabic_shadda" ); - KEYVAL ( 0x05f2 , "Arabic_sukun" ); - KEYVAL ( 0x06a1 , "Serbian_dje" ); - KEYVAL ( 0x06a2 , "Macedonia_gje" ); - KEYVAL ( 0x06a3 , "Cyrillic_io" ); - KEYVAL ( 0x06a4 , "Ukrainian_ie" ); - KEYVAL ( 0x06a4 , "Ukranian_je" ); - KEYVAL ( 0x06a5 , "Macedonia_dse" ); - KEYVAL ( 0x06a6 , "Ukrainian_i" ); - KEYVAL ( 0x06a6 , "Ukranian_i" ); - KEYVAL ( 0x06a7 , "Ukrainian_yi" ); - KEYVAL ( 0x06a7 , "Ukranian_yi" ); - KEYVAL ( 0x06a8 , "Cyrillic_je" ); - KEYVAL ( 0x06a8 , "Serbian_je" ); - KEYVAL ( 0x06a9 , "Cyrillic_lje" ); - KEYVAL ( 0x06a9 , "Serbian_lje" ); - KEYVAL ( 0x06aa , "Cyrillic_nje" ); - KEYVAL ( 0x06aa , "Serbian_nje" ); - KEYVAL ( 0x06ab , "Serbian_tshe" ); - KEYVAL ( 0x06ac , "Macedonia_kje" ); - KEYVAL ( 0x06ad , "Ukrainian_ghe_with_upturn" ); - KEYVAL ( 0x06ae , "Byelorussian_shortu" ); - KEYVAL ( 0x06af , "Cyrillic_dzhe" ); - KEYVAL ( 0x06af , "Serbian_dze" ); - KEYVAL ( 0x06b0 , "numerosign" ); - KEYVAL ( 0x06b1 , "Serbian_DJE" ); - KEYVAL ( 0x06b2 , "Macedonia_GJE" ); - KEYVAL ( 0x06b3 , "Cyrillic_IO" ); - KEYVAL ( 0x06b4 , "Ukrainian_IE" ); - KEYVAL ( 0x06b4 , "Ukranian_JE" ); - KEYVAL ( 0x06b5 , "Macedonia_DSE" ); - KEYVAL ( 0x06b6 , "Ukrainian_I" ); - KEYVAL ( 0x06b6 , "Ukranian_I" ); - KEYVAL ( 0x06b7 , "Ukrainian_YI" ); - KEYVAL ( 0x06b7 , "Ukranian_YI" ); - KEYVAL ( 0x06b8 , "Cyrillic_JE" ); - KEYVAL ( 0x06b8 , "Serbian_JE" ); - KEYVAL ( 0x06b9 , "Cyrillic_LJE" ); - KEYVAL ( 0x06b9 , "Serbian_LJE" ); - KEYVAL ( 0x06ba , "Cyrillic_NJE" ); - KEYVAL ( 0x06ba , "Serbian_NJE" ); - KEYVAL ( 0x06bb , "Serbian_TSHE" ); - KEYVAL ( 0x06bc , "Macedonia_KJE" ); - KEYVAL ( 0x06bd , "Ukrainian_GHE_WITH_UPTURN" ); - KEYVAL ( 0x06be , "Byelorussian_SHORTU" ); - KEYVAL ( 0x06bf , "Cyrillic_DZHE" ); - KEYVAL ( 0x06bf , "Serbian_DZE" ); - KEYVAL ( 0x06c0 , "Cyrillic_yu" ); - KEYVAL ( 0x06c1 , "Cyrillic_a" ); - KEYVAL ( 0x06c2 , "Cyrillic_be" ); - KEYVAL ( 0x06c3 , "Cyrillic_tse" ); - KEYVAL ( 0x06c4 , "Cyrillic_de" ); - KEYVAL ( 0x06c5 , "Cyrillic_ie" ); - KEYVAL ( 0x06c6 , "Cyrillic_ef" ); - KEYVAL ( 0x06c7 , "Cyrillic_ghe" ); - KEYVAL ( 0x06c8 , "Cyrillic_ha" ); - KEYVAL ( 0x06c9 , "Cyrillic_i" ); - KEYVAL ( 0x06ca , "Cyrillic_shorti" ); - KEYVAL ( 0x06cb , "Cyrillic_ka" ); - KEYVAL ( 0x06cc , "Cyrillic_el" ); - KEYVAL ( 0x06cd , "Cyrillic_em" ); - KEYVAL ( 0x06ce , "Cyrillic_en" ); - KEYVAL ( 0x06cf , "Cyrillic_o" ); - KEYVAL ( 0x06d0 , "Cyrillic_pe" ); - KEYVAL ( 0x06d1 , "Cyrillic_ya" ); - KEYVAL ( 0x06d2 , "Cyrillic_er" ); - KEYVAL ( 0x06d3 , "Cyrillic_es" ); - KEYVAL ( 0x06d4 , "Cyrillic_te" ); - KEYVAL ( 0x06d5 , "Cyrillic_u" ); - KEYVAL ( 0x06d6 , "Cyrillic_zhe" ); - KEYVAL ( 0x06d7 , "Cyrillic_ve" ); - KEYVAL ( 0x06d8 , "Cyrillic_softsign" ); - KEYVAL ( 0x06d9 , "Cyrillic_yeru" ); - KEYVAL ( 0x06da , "Cyrillic_ze" ); - KEYVAL ( 0x06db , "Cyrillic_sha" ); - KEYVAL ( 0x06dc , "Cyrillic_e" ); - KEYVAL ( 0x06dd , "Cyrillic_shcha" ); - KEYVAL ( 0x06de , "Cyrillic_che" ); - KEYVAL ( 0x06df , "Cyrillic_hardsign" ); - KEYVAL ( 0x06e0 , "Cyrillic_YU" ); - KEYVAL ( 0x06e1 , "Cyrillic_A" ); - KEYVAL ( 0x06e2 , "Cyrillic_BE" ); - KEYVAL ( 0x06e3 , "Cyrillic_TSE" ); - KEYVAL ( 0x06e4 , "Cyrillic_DE" ); - KEYVAL ( 0x06e5 , "Cyrillic_IE" ); - KEYVAL ( 0x06e6 , "Cyrillic_EF" ); - KEYVAL ( 0x06e7 , "Cyrillic_GHE" ); - KEYVAL ( 0x06e8 , "Cyrillic_HA" ); - KEYVAL ( 0x06e9 , "Cyrillic_I" ); - KEYVAL ( 0x06ea , "Cyrillic_SHORTI" ); - KEYVAL ( 0x06eb , "Cyrillic_KA" ); - KEYVAL ( 0x06ec , "Cyrillic_EL" ); - KEYVAL ( 0x06ed , "Cyrillic_EM" ); - KEYVAL ( 0x06ee , "Cyrillic_EN" ); - KEYVAL ( 0x06ef , "Cyrillic_O" ); - KEYVAL ( 0x06f0 , "Cyrillic_PE" ); - KEYVAL ( 0x06f1 , "Cyrillic_YA" ); - KEYVAL ( 0x06f2 , "Cyrillic_ER" ); - KEYVAL ( 0x06f3 , "Cyrillic_ES" ); - KEYVAL ( 0x06f4 , "Cyrillic_TE" ); - KEYVAL ( 0x06f5 , "Cyrillic_U" ); - KEYVAL ( 0x06f6 , "Cyrillic_ZHE" ); - KEYVAL ( 0x06f7 , "Cyrillic_VE" ); - KEYVAL ( 0x06f8 , "Cyrillic_SOFTSIGN" ); - KEYVAL ( 0x06f9 , "Cyrillic_YERU" ); - KEYVAL ( 0x06fa , "Cyrillic_ZE" ); - KEYVAL ( 0x06fb , "Cyrillic_SHA" ); - KEYVAL ( 0x06fc , "Cyrillic_E" ); - KEYVAL ( 0x06fd , "Cyrillic_SHCHA" ); - KEYVAL ( 0x06fe , "Cyrillic_CHE" ); - KEYVAL ( 0x06ff , "Cyrillic_HARDSIGN" ); - KEYVAL ( 0x07a1 , "Greek_ALPHAaccent" ); - KEYVAL ( 0x07a2 , "Greek_EPSILONaccent" ); - KEYVAL ( 0x07a3 , "Greek_ETAaccent" ); - KEYVAL ( 0x07a4 , "Greek_IOTAaccent" ); - KEYVAL ( 0x07a5 , "Greek_IOTAdieresis" ); - KEYVAL ( 0x07a7 , "Greek_OMICRONaccent" ); - KEYVAL ( 0x07a8 , "Greek_UPSILONaccent" ); - KEYVAL ( 0x07a9 , "Greek_UPSILONdieresis" ); - KEYVAL ( 0x07ab , "Greek_OMEGAaccent" ); - KEYVAL ( 0x07ae , "Greek_accentdieresis" ); - KEYVAL ( 0x07af , "Greek_horizbar" ); - KEYVAL ( 0x07b1 , "Greek_alphaaccent" ); - KEYVAL ( 0x07b2 , "Greek_epsilonaccent" ); - KEYVAL ( 0x07b3 , "Greek_etaaccent" ); - KEYVAL ( 0x07b4 , "Greek_iotaaccent" ); - KEYVAL ( 0x07b5 , "Greek_iotadieresis" ); - KEYVAL ( 0x07b6 , "Greek_iotaaccentdieresis" ); - KEYVAL ( 0x07b7 , "Greek_omicronaccent" ); - KEYVAL ( 0x07b8 , "Greek_upsilonaccent" ); - KEYVAL ( 0x07b9 , "Greek_upsilondieresis" ); - KEYVAL ( 0x07ba , "Greek_upsilonaccentdieresis" ); - KEYVAL ( 0x07bb , "Greek_omegaaccent" ); - KEYVAL ( 0x07c1 , "Greek_ALPHA" ); - KEYVAL ( 0x07c2 , "Greek_BETA" ); - KEYVAL ( 0x07c3 , "Greek_GAMMA" ); - KEYVAL ( 0x07c4 , "Greek_DELTA" ); - KEYVAL ( 0x07c5 , "Greek_EPSILON" ); - KEYVAL ( 0x07c6 , "Greek_ZETA" ); - KEYVAL ( 0x07c7 , "Greek_ETA" ); - KEYVAL ( 0x07c8 , "Greek_THETA" ); - KEYVAL ( 0x07c9 , "Greek_IOTA" ); - KEYVAL ( 0x07ca , "Greek_KAPPA" ); - KEYVAL ( 0x07cb , "Greek_LAMBDA" ); - KEYVAL ( 0x07cb , "Greek_LAMDA" ); - KEYVAL ( 0x07cc , "Greek_MU" ); - KEYVAL ( 0x07cd , "Greek_NU" ); - KEYVAL ( 0x07ce , "Greek_XI" ); - KEYVAL ( 0x07cf , "Greek_OMICRON" ); - KEYVAL ( 0x07d0 , "Greek_PI" ); - KEYVAL ( 0x07d1 , "Greek_RHO" ); - KEYVAL ( 0x07d2 , "Greek_SIGMA" ); - KEYVAL ( 0x07d4 , "Greek_TAU" ); - KEYVAL ( 0x07d5 , "Greek_UPSILON" ); - KEYVAL ( 0x07d6 , "Greek_PHI" ); - KEYVAL ( 0x07d7 , "Greek_CHI" ); - KEYVAL ( 0x07d8 , "Greek_PSI" ); - KEYVAL ( 0x07d9 , "Greek_OMEGA" ); - KEYVAL ( 0x07e1 , "Greek_alpha" ); - KEYVAL ( 0x07e2 , "Greek_beta" ); - KEYVAL ( 0x07e3 , "Greek_gamma" ); - KEYVAL ( 0x07e4 , "Greek_delta" ); - KEYVAL ( 0x07e5 , "Greek_epsilon" ); - KEYVAL ( 0x07e6 , "Greek_zeta" ); - KEYVAL ( 0x07e7 , "Greek_eta" ); - KEYVAL ( 0x07e8 , "Greek_theta" ); - KEYVAL ( 0x07e9 , "Greek_iota" ); - KEYVAL ( 0x07ea , "Greek_kappa" ); - KEYVAL ( 0x07eb , "Greek_lambda" ); - KEYVAL ( 0x07eb , "Greek_lamda" ); - KEYVAL ( 0x07ec , "Greek_mu" ); - KEYVAL ( 0x07ed , "Greek_nu" ); - KEYVAL ( 0x07ee , "Greek_xi" ); - KEYVAL ( 0x07ef , "Greek_omicron" ); - KEYVAL ( 0x07f0 , "Greek_pi" ); - KEYVAL ( 0x07f1 , "Greek_rho" ); - KEYVAL ( 0x07f2 , "Greek_sigma" ); - KEYVAL ( 0x07f3 , "Greek_finalsmallsigma" ); - KEYVAL ( 0x07f4 , "Greek_tau" ); - KEYVAL ( 0x07f5 , "Greek_upsilon" ); - KEYVAL ( 0x07f6 , "Greek_phi" ); - KEYVAL ( 0x07f7 , "Greek_chi" ); - KEYVAL ( 0x07f8 , "Greek_psi" ); - KEYVAL ( 0x07f9 , "Greek_omega" ); - KEYVAL ( 0x08a1 , "leftradical" ); - KEYVAL ( 0x08a2 , "topleftradical" ); - KEYVAL ( 0x08a3 , "horizconnector" ); - KEYVAL ( 0x08a4 , "topintegral" ); - KEYVAL ( 0x08a5 , "botintegral" ); - KEYVAL ( 0x08a6 , "vertconnector" ); - KEYVAL ( 0x08a7 , "topleftsqbracket" ); - KEYVAL ( 0x08a8 , "botleftsqbracket" ); - KEYVAL ( 0x08a9 , "toprightsqbracket" ); - KEYVAL ( 0x08aa , "botrightsqbracket" ); - KEYVAL ( 0x08ab , "topleftparens" ); - KEYVAL ( 0x08ac , "botleftparens" ); - KEYVAL ( 0x08ad , "toprightparens" ); - KEYVAL ( 0x08ae , "botrightparens" ); - KEYVAL ( 0x08af , "leftmiddlecurlybrace" ); - KEYVAL ( 0x08b0 , "rightmiddlecurlybrace" ); - KEYVAL ( 0x08b1 , "topleftsummation" ); - KEYVAL ( 0x08b2 , "botleftsummation" ); - KEYVAL ( 0x08b3 , "topvertsummationconnector" ); - KEYVAL ( 0x08b4 , "botvertsummationconnector" ); - KEYVAL ( 0x08b5 , "toprightsummation" ); - KEYVAL ( 0x08b6 , "botrightsummation" ); - KEYVAL ( 0x08b7 , "rightmiddlesummation" ); - KEYVAL ( 0x08bc , "lessthanequal" ); - KEYVAL ( 0x08bd , "notequal" ); - KEYVAL ( 0x08be , "greaterthanequal" ); - KEYVAL ( 0x08bf , "integral" ); - KEYVAL ( 0x08c0 , "therefore" ); - KEYVAL ( 0x08c1 , "variation" ); - KEYVAL ( 0x08c2 , "infinity" ); - KEYVAL ( 0x08c5 , "nabla" ); - KEYVAL ( 0x08c8 , "approximate" ); - KEYVAL ( 0x08c9 , "similarequal" ); - KEYVAL ( 0x08cd , "ifonlyif" ); - KEYVAL ( 0x08ce , "implies" ); - KEYVAL ( 0x08cf , "identical" ); - KEYVAL ( 0x08d6 , "radical" ); - KEYVAL ( 0x08da , "includedin" ); - KEYVAL ( 0x08db , "includes" ); - KEYVAL ( 0x08dc , "intersection" ); - KEYVAL ( 0x08dd , "union" ); - KEYVAL ( 0x08de , "logicaland" ); - KEYVAL ( 0x08df , "logicalor" ); - KEYVAL ( 0x08ef , "partialderivative" ); - KEYVAL ( 0x08f6 , "function" ); - KEYVAL ( 0x08fb , "leftarrow" ); - KEYVAL ( 0x08fc , "uparrow" ); - KEYVAL ( 0x08fd , "rightarrow" ); - KEYVAL ( 0x08fe , "downarrow" ); - KEYVAL ( 0x09df , "blank" ); - KEYVAL ( 0x09e0 , "soliddiamond" ); - KEYVAL ( 0x09e1 , "checkerboard" ); - KEYVAL ( 0x09e2 , "ht" ); - KEYVAL ( 0x09e3 , "ff" ); - KEYVAL ( 0x09e4 , "cr" ); - KEYVAL ( 0x09e5 , "lf" ); - KEYVAL ( 0x09e8 , "nl" ); - KEYVAL ( 0x09e9 , "vt" ); - KEYVAL ( 0x09ea , "lowrightcorner" ); - KEYVAL ( 0x09eb , "uprightcorner" ); - KEYVAL ( 0x09ec , "upleftcorner" ); - KEYVAL ( 0x09ed , "lowleftcorner" ); - KEYVAL ( 0x09ee , "crossinglines" ); - KEYVAL ( 0x09ef , "horizlinescan1" ); - KEYVAL ( 0x09f0 , "horizlinescan3" ); - KEYVAL ( 0x09f1 , "horizlinescan5" ); - KEYVAL ( 0x09f2 , "horizlinescan7" ); - KEYVAL ( 0x09f3 , "horizlinescan9" ); - KEYVAL ( 0x09f4 , "leftt" ); - KEYVAL ( 0x09f5 , "rightt" ); - KEYVAL ( 0x09f6 , "bott" ); - KEYVAL ( 0x09f7 , "topt" ); - KEYVAL ( 0x09f8 , "vertbar" ); - KEYVAL ( 0x0aa1 , "emspace" ); - KEYVAL ( 0x0aa2 , "enspace" ); - KEYVAL ( 0x0aa3 , "em3space" ); - KEYVAL ( 0x0aa4 , "em4space" ); - KEYVAL ( 0x0aa5 , "digitspace" ); - KEYVAL ( 0x0aa6 , "punctspace" ); - KEYVAL ( 0x0aa7 , "thinspace" ); - KEYVAL ( 0x0aa8 , "hairspace" ); - KEYVAL ( 0x0aa9 , "emdash" ); - KEYVAL ( 0x0aaa , "endash" ); - KEYVAL ( 0x0aac , "signifblank" ); - KEYVAL ( 0x0aae , "ellipsis" ); - KEYVAL ( 0x0aaf , "doubbaselinedot" ); - KEYVAL ( 0x0ab0 , "onethird" ); - KEYVAL ( 0x0ab1 , "twothirds" ); - KEYVAL ( 0x0ab2 , "onefifth" ); - KEYVAL ( 0x0ab3 , "twofifths" ); - KEYVAL ( 0x0ab4 , "threefifths" ); - KEYVAL ( 0x0ab5 , "fourfifths" ); - KEYVAL ( 0x0ab6 , "onesixth" ); - KEYVAL ( 0x0ab7 , "fivesixths" ); - KEYVAL ( 0x0ab8 , "careof" ); - KEYVAL ( 0x0abb , "figdash" ); - KEYVAL ( 0x0abc , "leftanglebracket" ); - KEYVAL ( 0x0abd , "decimalpoint" ); - KEYVAL ( 0x0abe , "rightanglebracket" ); - KEYVAL ( 0x0abf , "marker" ); - KEYVAL ( 0x0ac3 , "oneeighth" ); - KEYVAL ( 0x0ac4 , "threeeighths" ); - KEYVAL ( 0x0ac5 , "fiveeighths" ); - KEYVAL ( 0x0ac6 , "seveneighths" ); - KEYVAL ( 0x0ac9 , "trademark" ); - KEYVAL ( 0x0aca , "signaturemark" ); - KEYVAL ( 0x0acb , "trademarkincircle" ); - KEYVAL ( 0x0acc , "leftopentriangle" ); - KEYVAL ( 0x0acd , "rightopentriangle" ); - KEYVAL ( 0x0ace , "emopencircle" ); - KEYVAL ( 0x0acf , "emopenrectangle" ); - KEYVAL ( 0x0ad0 , "leftsinglequotemark" ); - KEYVAL ( 0x0ad1 , "rightsinglequotemark" ); - KEYVAL ( 0x0ad2 , "leftdoublequotemark" ); - KEYVAL ( 0x0ad3 , "rightdoublequotemark" ); - KEYVAL ( 0x0ad4 , "prescription" ); - KEYVAL ( 0x0ad6 , "minutes" ); - KEYVAL ( 0x0ad7 , "seconds" ); - KEYVAL ( 0x0ad9 , "latincross" ); - KEYVAL ( 0x0ada , "hexagram" ); - KEYVAL ( 0x0adb , "filledrectbullet" ); - KEYVAL ( 0x0adc , "filledlefttribullet" ); - KEYVAL ( 0x0add , "filledrighttribullet" ); - KEYVAL ( 0x0ade , "emfilledcircle" ); - KEYVAL ( 0x0adf , "emfilledrect" ); - KEYVAL ( 0x0ae0 , "enopencircbullet" ); - KEYVAL ( 0x0ae1 , "enopensquarebullet" ); - KEYVAL ( 0x0ae2 , "openrectbullet" ); - KEYVAL ( 0x0ae3 , "opentribulletup" ); - KEYVAL ( 0x0ae4 , "opentribulletdown" ); - KEYVAL ( 0x0ae5 , "openstar" ); - KEYVAL ( 0x0ae6 , "enfilledcircbullet" ); - KEYVAL ( 0x0ae7 , "enfilledsqbullet" ); - KEYVAL ( 0x0ae8 , "filledtribulletup" ); - KEYVAL ( 0x0ae9 , "filledtribulletdown" ); - KEYVAL ( 0x0aea , "leftpointer" ); - KEYVAL ( 0x0aeb , "rightpointer" ); - KEYVAL ( 0x0aec , "club" ); - KEYVAL ( 0x0aed , "diamond" ); - KEYVAL ( 0x0aee , "heart" ); - KEYVAL ( 0x0af0 , "maltesecross" ); - KEYVAL ( 0x0af1 , "dagger" ); - KEYVAL ( 0x0af2 , "doubledagger" ); - KEYVAL ( 0x0af3 , "checkmark" ); - KEYVAL ( 0x0af4 , "ballotcross" ); - KEYVAL ( 0x0af5 , "musicalsharp" ); - KEYVAL ( 0x0af6 , "musicalflat" ); - KEYVAL ( 0x0af7 , "malesymbol" ); - KEYVAL ( 0x0af8 , "femalesymbol" ); - KEYVAL ( 0x0af9 , "telephone" ); - KEYVAL ( 0x0afa , "telephonerecorder" ); - KEYVAL ( 0x0afb , "phonographcopyright" ); - KEYVAL ( 0x0afc , "caret" ); - KEYVAL ( 0x0afd , "singlelowquotemark" ); - KEYVAL ( 0x0afe , "doublelowquotemark" ); - KEYVAL ( 0x0aff , "cursor" ); - KEYVAL ( 0x0ba3 , "leftcaret" ); - KEYVAL ( 0x0ba6 , "rightcaret" ); - KEYVAL ( 0x0ba8 , "downcaret" ); - KEYVAL ( 0x0ba9 , "upcaret" ); - KEYVAL ( 0x0bc0 , "overbar" ); - KEYVAL ( 0x0bc2 , "downtack" ); - KEYVAL ( 0x0bc3 , "upshoe" ); - KEYVAL ( 0x0bc4 , "downstile" ); - KEYVAL ( 0x0bc6 , "underbar" ); - KEYVAL ( 0x0bca , "jot" ); - KEYVAL ( 0x0bcc , "quad" ); - KEYVAL ( 0x0bce , "uptack" ); - KEYVAL ( 0x0bcf , "circle" ); - KEYVAL ( 0x0bd3 , "upstile" ); - KEYVAL ( 0x0bd6 , "downshoe" ); - KEYVAL ( 0x0bd8 , "rightshoe" ); - KEYVAL ( 0x0bda , "leftshoe" ); - KEYVAL ( 0x0bdc , "lefttack" ); - KEYVAL ( 0x0bfc , "righttack" ); - KEYVAL ( 0x0cdf , "hebrew_doublelowline" ); - KEYVAL ( 0x0ce0 , "hebrew_aleph" ); - KEYVAL ( 0x0ce1 , "hebrew_bet" ); - KEYVAL ( 0x0ce1 , "hebrew_beth" ); - KEYVAL ( 0x0ce2 , "hebrew_gimel" ); - KEYVAL ( 0x0ce2 , "hebrew_gimmel" ); - KEYVAL ( 0x0ce3 , "hebrew_dalet" ); - KEYVAL ( 0x0ce3 , "hebrew_daleth" ); - KEYVAL ( 0x0ce4 , "hebrew_he" ); - KEYVAL ( 0x0ce5 , "hebrew_waw" ); - KEYVAL ( 0x0ce6 , "hebrew_zain" ); - KEYVAL ( 0x0ce6 , "hebrew_zayin" ); - KEYVAL ( 0x0ce7 , "hebrew_chet" ); - KEYVAL ( 0x0ce7 , "hebrew_het" ); - KEYVAL ( 0x0ce8 , "hebrew_tet" ); - KEYVAL ( 0x0ce8 , "hebrew_teth" ); - KEYVAL ( 0x0ce9 , "hebrew_yod" ); - KEYVAL ( 0x0cea , "hebrew_finalkaph" ); - KEYVAL ( 0x0ceb , "hebrew_kaph" ); - KEYVAL ( 0x0cec , "hebrew_lamed" ); - KEYVAL ( 0x0ced , "hebrew_finalmem" ); - KEYVAL ( 0x0cee , "hebrew_mem" ); - KEYVAL ( 0x0cef , "hebrew_finalnun" ); - KEYVAL ( 0x0cf0 , "hebrew_nun" ); - KEYVAL ( 0x0cf1 , "hebrew_samech" ); - KEYVAL ( 0x0cf1 , "hebrew_samekh" ); - KEYVAL ( 0x0cf2 , "hebrew_ayin" ); - KEYVAL ( 0x0cf3 , "hebrew_finalpe" ); - KEYVAL ( 0x0cf4 , "hebrew_pe" ); - KEYVAL ( 0x0cf5 , "hebrew_finalzade" ); - KEYVAL ( 0x0cf5 , "hebrew_finalzadi" ); - KEYVAL ( 0x0cf6 , "hebrew_zade" ); - KEYVAL ( 0x0cf6 , "hebrew_zadi" ); - KEYVAL ( 0x0cf7 , "hebrew_kuf" ); - KEYVAL ( 0x0cf7 , "hebrew_qoph" ); - KEYVAL ( 0x0cf8 , "hebrew_resh" ); - KEYVAL ( 0x0cf9 , "hebrew_shin" ); - KEYVAL ( 0x0cfa , "hebrew_taf" ); - KEYVAL ( 0x0cfa , "hebrew_taw" ); - KEYVAL ( 0x0da1 , "Thai_kokai" ); - KEYVAL ( 0x0da2 , "Thai_khokhai" ); - KEYVAL ( 0x0da3 , "Thai_khokhuat" ); - KEYVAL ( 0x0da4 , "Thai_khokhwai" ); - KEYVAL ( 0x0da5 , "Thai_khokhon" ); - KEYVAL ( 0x0da6 , "Thai_khorakhang" ); - KEYVAL ( 0x0da7 , "Thai_ngongu" ); - KEYVAL ( 0x0da8 , "Thai_chochan" ); - KEYVAL ( 0x0da9 , "Thai_choching" ); - KEYVAL ( 0x0daa , "Thai_chochang" ); - KEYVAL ( 0x0dab , "Thai_soso" ); - KEYVAL ( 0x0dac , "Thai_chochoe" ); - KEYVAL ( 0x0dad , "Thai_yoying" ); - KEYVAL ( 0x0dae , "Thai_dochada" ); - KEYVAL ( 0x0daf , "Thai_topatak" ); - KEYVAL ( 0x0db0 , "Thai_thothan" ); - KEYVAL ( 0x0db1 , "Thai_thonangmontho" ); - KEYVAL ( 0x0db2 , "Thai_thophuthao" ); - KEYVAL ( 0x0db3 , "Thai_nonen" ); - KEYVAL ( 0x0db4 , "Thai_dodek" ); - KEYVAL ( 0x0db5 , "Thai_totao" ); - KEYVAL ( 0x0db6 , "Thai_thothung" ); - KEYVAL ( 0x0db7 , "Thai_thothahan" ); - KEYVAL ( 0x0db8 , "Thai_thothong" ); - KEYVAL ( 0x0db9 , "Thai_nonu" ); - KEYVAL ( 0x0dba , "Thai_bobaimai" ); - KEYVAL ( 0x0dbb , "Thai_popla" ); - KEYVAL ( 0x0dbc , "Thai_phophung" ); - KEYVAL ( 0x0dbd , "Thai_fofa" ); - KEYVAL ( 0x0dbe , "Thai_phophan" ); - KEYVAL ( 0x0dbf , "Thai_fofan" ); - KEYVAL ( 0x0dc0 , "Thai_phosamphao" ); - KEYVAL ( 0x0dc1 , "Thai_moma" ); - KEYVAL ( 0x0dc2 , "Thai_yoyak" ); - KEYVAL ( 0x0dc3 , "Thai_rorua" ); - KEYVAL ( 0x0dc4 , "Thai_ru" ); - KEYVAL ( 0x0dc5 , "Thai_loling" ); - KEYVAL ( 0x0dc6 , "Thai_lu" ); - KEYVAL ( 0x0dc7 , "Thai_wowaen" ); - KEYVAL ( 0x0dc8 , "Thai_sosala" ); - KEYVAL ( 0x0dc9 , "Thai_sorusi" ); - KEYVAL ( 0x0dca , "Thai_sosua" ); - KEYVAL ( 0x0dcb , "Thai_hohip" ); - KEYVAL ( 0x0dcc , "Thai_lochula" ); - KEYVAL ( 0x0dcd , "Thai_oang" ); - KEYVAL ( 0x0dce , "Thai_honokhuk" ); - KEYVAL ( 0x0dcf , "Thai_paiyannoi" ); - KEYVAL ( 0x0dd0 , "Thai_saraa" ); - KEYVAL ( 0x0dd1 , "Thai_maihanakat" ); - KEYVAL ( 0x0dd2 , "Thai_saraaa" ); - KEYVAL ( 0x0dd3 , "Thai_saraam" ); - KEYVAL ( 0x0dd4 , "Thai_sarai" ); - KEYVAL ( 0x0dd5 , "Thai_saraii" ); - KEYVAL ( 0x0dd6 , "Thai_saraue" ); - KEYVAL ( 0x0dd7 , "Thai_sarauee" ); - KEYVAL ( 0x0dd8 , "Thai_sarau" ); - KEYVAL ( 0x0dd9 , "Thai_sarauu" ); - KEYVAL ( 0x0dda , "Thai_phinthu" ); - KEYVAL ( 0x0dde , "Thai_maihanakat_maitho" ); - KEYVAL ( 0x0ddf , "Thai_baht" ); - KEYVAL ( 0x0de0 , "Thai_sarae" ); - KEYVAL ( 0x0de1 , "Thai_saraae" ); - KEYVAL ( 0x0de2 , "Thai_sarao" ); - KEYVAL ( 0x0de3 , "Thai_saraaimaimuan" ); - KEYVAL ( 0x0de4 , "Thai_saraaimaimalai" ); - KEYVAL ( 0x0de5 , "Thai_lakkhangyao" ); - KEYVAL ( 0x0de6 , "Thai_maiyamok" ); - KEYVAL ( 0x0de7 , "Thai_maitaikhu" ); - KEYVAL ( 0x0de8 , "Thai_maiek" ); - KEYVAL ( 0x0de9 , "Thai_maitho" ); - KEYVAL ( 0x0dea , "Thai_maitri" ); - KEYVAL ( 0x0deb , "Thai_maichattawa" ); - KEYVAL ( 0x0dec , "Thai_thanthakhat" ); - KEYVAL ( 0x0ded , "Thai_nikhahit" ); - KEYVAL ( 0x0df0 , "Thai_leksun" ); - KEYVAL ( 0x0df1 , "Thai_leknung" ); - KEYVAL ( 0x0df2 , "Thai_leksong" ); - KEYVAL ( 0x0df3 , "Thai_leksam" ); - KEYVAL ( 0x0df4 , "Thai_leksi" ); - KEYVAL ( 0x0df5 , "Thai_lekha" ); - KEYVAL ( 0x0df6 , "Thai_lekhok" ); - KEYVAL ( 0x0df7 , "Thai_lekchet" ); - KEYVAL ( 0x0df8 , "Thai_lekpaet" ); - KEYVAL ( 0x0df9 , "Thai_lekkao" ); - KEYVAL ( 0x0ea1 , "Hangul_Kiyeog" ); - KEYVAL ( 0x0ea2 , "Hangul_SsangKiyeog" ); - KEYVAL ( 0x0ea3 , "Hangul_KiyeogSios" ); - KEYVAL ( 0x0ea4 , "Hangul_Nieun" ); - KEYVAL ( 0x0ea5 , "Hangul_NieunJieuj" ); - KEYVAL ( 0x0ea6 , "Hangul_NieunHieuh" ); - KEYVAL ( 0x0ea7 , "Hangul_Dikeud" ); - KEYVAL ( 0x0ea8 , "Hangul_SsangDikeud" ); - KEYVAL ( 0x0ea9 , "Hangul_Rieul" ); - KEYVAL ( 0x0eaa , "Hangul_RieulKiyeog" ); - KEYVAL ( 0x0eab , "Hangul_RieulMieum" ); - KEYVAL ( 0x0eac , "Hangul_RieulPieub" ); - KEYVAL ( 0x0ead , "Hangul_RieulSios" ); - KEYVAL ( 0x0eae , "Hangul_RieulTieut" ); - KEYVAL ( 0x0eaf , "Hangul_RieulPhieuf" ); - KEYVAL ( 0x0eb0 , "Hangul_RieulHieuh" ); - KEYVAL ( 0x0eb1 , "Hangul_Mieum" ); - KEYVAL ( 0x0eb2 , "Hangul_Pieub" ); - KEYVAL ( 0x0eb3 , "Hangul_SsangPieub" ); - KEYVAL ( 0x0eb4 , "Hangul_PieubSios" ); - KEYVAL ( 0x0eb5 , "Hangul_Sios" ); - KEYVAL ( 0x0eb6 , "Hangul_SsangSios" ); - KEYVAL ( 0x0eb7 , "Hangul_Ieung" ); - KEYVAL ( 0x0eb8 , "Hangul_Jieuj" ); - KEYVAL ( 0x0eb9 , "Hangul_SsangJieuj" ); - KEYVAL ( 0x0eba , "Hangul_Cieuc" ); - KEYVAL ( 0x0ebb , "Hangul_Khieuq" ); - KEYVAL ( 0x0ebc , "Hangul_Tieut" ); - KEYVAL ( 0x0ebd , "Hangul_Phieuf" ); - KEYVAL ( 0x0ebe , "Hangul_Hieuh" ); - KEYVAL ( 0x0ebf , "Hangul_A" ); - KEYVAL ( 0x0ec0 , "Hangul_AE" ); - KEYVAL ( 0x0ec1 , "Hangul_YA" ); - KEYVAL ( 0x0ec2 , "Hangul_YAE" ); - KEYVAL ( 0x0ec3 , "Hangul_EO" ); - KEYVAL ( 0x0ec4 , "Hangul_E" ); - KEYVAL ( 0x0ec5 , "Hangul_YEO" ); - KEYVAL ( 0x0ec6 , "Hangul_YE" ); - KEYVAL ( 0x0ec7 , "Hangul_O" ); - KEYVAL ( 0x0ec8 , "Hangul_WA" ); - KEYVAL ( 0x0ec9 , "Hangul_WAE" ); - KEYVAL ( 0x0eca , "Hangul_OE" ); - KEYVAL ( 0x0ecb , "Hangul_YO" ); - KEYVAL ( 0x0ecc , "Hangul_U" ); - KEYVAL ( 0x0ecd , "Hangul_WEO" ); - KEYVAL ( 0x0ece , "Hangul_WE" ); - KEYVAL ( 0x0ecf , "Hangul_WI" ); - KEYVAL ( 0x0ed0 , "Hangul_YU" ); - KEYVAL ( 0x0ed1 , "Hangul_EU" ); - KEYVAL ( 0x0ed2 , "Hangul_YI" ); - KEYVAL ( 0x0ed3 , "Hangul_I" ); - KEYVAL ( 0x0ed4 , "Hangul_J_Kiyeog" ); - KEYVAL ( 0x0ed5 , "Hangul_J_SsangKiyeog" ); - KEYVAL ( 0x0ed6 , "Hangul_J_KiyeogSios" ); - KEYVAL ( 0x0ed7 , "Hangul_J_Nieun" ); - KEYVAL ( 0x0ed8 , "Hangul_J_NieunJieuj" ); - KEYVAL ( 0x0ed9 , "Hangul_J_NieunHieuh" ); - KEYVAL ( 0x0eda , "Hangul_J_Dikeud" ); - KEYVAL ( 0x0edb , "Hangul_J_Rieul" ); - KEYVAL ( 0x0edc , "Hangul_J_RieulKiyeog" ); - KEYVAL ( 0x0edd , "Hangul_J_RieulMieum" ); - KEYVAL ( 0x0ede , "Hangul_J_RieulPieub" ); - KEYVAL ( 0x0edf , "Hangul_J_RieulSios" ); - KEYVAL ( 0x0ee0 , "Hangul_J_RieulTieut" ); - KEYVAL ( 0x0ee1 , "Hangul_J_RieulPhieuf" ); - KEYVAL ( 0x0ee2 , "Hangul_J_RieulHieuh" ); - KEYVAL ( 0x0ee3 , "Hangul_J_Mieum" ); - KEYVAL ( 0x0ee4 , "Hangul_J_Pieub" ); - KEYVAL ( 0x0ee5 , "Hangul_J_PieubSios" ); - KEYVAL ( 0x0ee6 , "Hangul_J_Sios" ); - KEYVAL ( 0x0ee7 , "Hangul_J_SsangSios" ); - KEYVAL ( 0x0ee8 , "Hangul_J_Ieung" ); - KEYVAL ( 0x0ee9 , "Hangul_J_Jieuj" ); - KEYVAL ( 0x0eea , "Hangul_J_Cieuc" ); - KEYVAL ( 0x0eeb , "Hangul_J_Khieuq" ); - KEYVAL ( 0x0eec , "Hangul_J_Tieut" ); - KEYVAL ( 0x0eed , "Hangul_J_Phieuf" ); - KEYVAL ( 0x0eee , "Hangul_J_Hieuh" ); - KEYVAL ( 0x0eef , "Hangul_RieulYeorinHieuh" ); - KEYVAL ( 0x0ef0 , "Hangul_SunkyeongeumMieum" ); - KEYVAL ( 0x0ef1 , "Hangul_SunkyeongeumPieub" ); - KEYVAL ( 0x0ef2 , "Hangul_PanSios" ); - KEYVAL ( 0x0ef3 , "Hangul_KkogjiDalrinIeung" ); - KEYVAL ( 0x0ef4 , "Hangul_SunkyeongeumPhieuf" ); - KEYVAL ( 0x0ef5 , "Hangul_YeorinHieuh" ); - KEYVAL ( 0x0ef6 , "Hangul_AraeA" ); - KEYVAL ( 0x0ef7 , "Hangul_AraeAE" ); - KEYVAL ( 0x0ef8 , "Hangul_J_PanSios" ); - KEYVAL ( 0x0ef9 , "Hangul_J_KkogjiDalrinIeung" ); - KEYVAL ( 0x0efa , "Hangul_J_YeorinHieuh" ); - KEYVAL ( 0x0eff , "Korean_Won" ); - KEYVAL ( 0x13bc , "OE" ); - KEYVAL ( 0x13bd , "oe" ); - KEYVAL ( 0x13be , "Ydiaeresis" ); - KEYVAL ( 0x20a0 , "EcuSign" ); - KEYVAL ( 0x20a1 , "ColonSign" ); - KEYVAL ( 0x20a2 , "CruzeiroSign" ); - KEYVAL ( 0x20a3 , "FFrancSign" ); - KEYVAL ( 0x20a4 , "LiraSign" ); - KEYVAL ( 0x20a5 , "MillSign" ); - KEYVAL ( 0x20a6 , "NairaSign" ); - KEYVAL ( 0x20a7 , "PesetaSign" ); - KEYVAL ( 0x20a8 , "RupeeSign" ); - KEYVAL ( 0x20a9 , "WonSign" ); - KEYVAL ( 0x20aa , "NewSheqelSign" ); - KEYVAL ( 0x20ab , "DongSign" ); - KEYVAL ( 0x20ac , "EuroSign" ); - KEYVAL ( 0xFD01 , "3270_Duplicate" ); - KEYVAL ( 0xFD02 , "3270_FieldMark" ); - KEYVAL ( 0xFD03 , "3270_Right2" ); - KEYVAL ( 0xFD04 , "3270_Left2" ); - KEYVAL ( 0xFD05 , "3270_BackTab" ); - KEYVAL ( 0xFD06 , "3270_EraseEOF" ); - KEYVAL ( 0xFD07 , "3270_EraseInput" ); - KEYVAL ( 0xFD08 , "3270_Reset" ); - KEYVAL ( 0xFD09 , "3270_Quit" ); - KEYVAL ( 0xFD0A , "3270_PA1" ); - KEYVAL ( 0xFD0B , "3270_PA2" ); - KEYVAL ( 0xFD0C , "3270_PA3" ); - KEYVAL ( 0xFD0D , "3270_Test" ); - KEYVAL ( 0xFD0E , "3270_Attn" ); - KEYVAL ( 0xFD0F , "3270_CursorBlink" ); - KEYVAL ( 0xFD10 , "3270_AltCursor" ); - KEYVAL ( 0xFD11 , "3270_KeyClick" ); - KEYVAL ( 0xFD12 , "3270_Jump" ); - KEYVAL ( 0xFD13 , "3270_Ident" ); - KEYVAL ( 0xFD14 , "3270_Rule" ); - KEYVAL ( 0xFD15 , "3270_Copy" ); - KEYVAL ( 0xFD16 , "3270_Play" ); - KEYVAL ( 0xFD17 , "3270_Setup" ); - KEYVAL ( 0xFD18 , "3270_Record" ); - KEYVAL ( 0xFD19 , "3270_ChangeScreen" ); - KEYVAL ( 0xFD1A , "3270_DeleteWord" ); - KEYVAL ( 0xFD1B , "3270_ExSelect" ); - KEYVAL ( 0xFD1C , "3270_CursorSelect" ); - KEYVAL ( 0xFD1D , "3270_PrintScreen" ); - KEYVAL ( 0xFD1E , "3270_Enter" ); - KEYVAL ( 0xFE01 , "ISO_Lock" ); - KEYVAL ( 0xFE02 , "ISO_Level2_Latch" ); - KEYVAL ( 0xFE03 , "ISO_Level3_Shift" ); - KEYVAL ( 0xFE04 , "ISO_Level3_Latch" ); - KEYVAL ( 0xFE05 , "ISO_Level3_Lock" ); - KEYVAL ( 0xFE06 , "ISO_Group_Latch" ); - KEYVAL ( 0xFE07 , "ISO_Group_Lock" ); - KEYVAL ( 0xFE08 , "ISO_Next_Group" ); - KEYVAL ( 0xFE09 , "ISO_Next_Group_Lock" ); - KEYVAL ( 0xFE0A , "ISO_Prev_Group" ); - KEYVAL ( 0xFE0B , "ISO_Prev_Group_Lock" ); - KEYVAL ( 0xFE0C , "ISO_First_Group" ); - KEYVAL ( 0xFE0D , "ISO_First_Group_Lock" ); - KEYVAL ( 0xFE0E , "ISO_Last_Group" ); - KEYVAL ( 0xFE0F , "ISO_Last_Group_Lock" ); - KEYVAL ( 0xFE20 , "ISO_Left_Tab" ); - KEYVAL ( 0xFE21 , "ISO_Move_Line_Up" ); - KEYVAL ( 0xFE22 , "ISO_Move_Line_Down" ); - KEYVAL ( 0xFE23 , "ISO_Partial_Line_Up" ); - KEYVAL ( 0xFE24 , "ISO_Partial_Line_Down" ); - KEYVAL ( 0xFE25 , "ISO_Partial_Space_Left" ); - KEYVAL ( 0xFE26 , "ISO_Partial_Space_Right" ); - KEYVAL ( 0xFE27 , "ISO_Set_Margin_Left" ); - KEYVAL ( 0xFE28 , "ISO_Set_Margin_Right" ); - KEYVAL ( 0xFE29 , "ISO_Release_Margin_Left" ); - KEYVAL ( 0xFE2A , "ISO_Release_Margin_Right" ); - KEYVAL ( 0xFE2B , "ISO_Release_Both_Margins" ); - KEYVAL ( 0xFE2C , "ISO_Fast_Cursor_Left" ); - KEYVAL ( 0xFE2D , "ISO_Fast_Cursor_Right" ); - KEYVAL ( 0xFE2E , "ISO_Fast_Cursor_Up" ); - KEYVAL ( 0xFE2F , "ISO_Fast_Cursor_Down" ); - KEYVAL ( 0xFE30 , "ISO_Continuous_Underline" ); - KEYVAL ( 0xFE31 , "ISO_Discontinuous_Underline" ); - KEYVAL ( 0xFE32 , "ISO_Emphasize" ); - KEYVAL ( 0xFE33 , "ISO_Center_Object" ); - KEYVAL ( 0xFE34 , "ISO_Enter" ); - KEYVAL ( 0xFE50 , "dead_grave" ); - KEYVAL ( 0xFE51 , "dead_acute" ); - KEYVAL ( 0xFE52 , "dead_circumflex" ); - KEYVAL ( 0xFE53 , "dead_tilde" ); - KEYVAL ( 0xFE54 , "dead_macron" ); - KEYVAL ( 0xFE55 , "dead_breve" ); - KEYVAL ( 0xFE56 , "dead_abovedot" ); - KEYVAL ( 0xFE57 , "dead_diaeresis" ); - KEYVAL ( 0xFE58 , "dead_abovering" ); - KEYVAL ( 0xFE59 , "dead_doubleacute" ); - KEYVAL ( 0xFE5A , "dead_caron" ); - KEYVAL ( 0xFE5B , "dead_cedilla" ); - KEYVAL ( 0xFE5C , "dead_ogonek" ); - KEYVAL ( 0xFE5D , "dead_iota" ); - KEYVAL ( 0xFE5E , "dead_voiced_sound" ); - KEYVAL ( 0xFE5F , "dead_semivoiced_sound" ); - KEYVAL ( 0xFE60 , "dead_belowdot" ); - KEYVAL ( 0xFE61 , "dead_hook" ); - KEYVAL ( 0xFE62 , "dead_horn" ); - KEYVAL ( 0xFE70 , "AccessX_Enable" ); - KEYVAL ( 0xFE71 , "AccessX_Feedback_Enable" ); - KEYVAL ( 0xFE72 , "RepeatKeys_Enable" ); - KEYVAL ( 0xFE73 , "SlowKeys_Enable" ); - KEYVAL ( 0xFE74 , "BounceKeys_Enable" ); - KEYVAL ( 0xFE75 , "StickyKeys_Enable" ); - KEYVAL ( 0xFE76 , "MouseKeys_Enable" ); - KEYVAL ( 0xFE77 , "MouseKeys_Accel_Enable" ); - KEYVAL ( 0xFE78 , "Overlay1_Enable" ); - KEYVAL ( 0xFE79 , "Overlay2_Enable" ); - KEYVAL ( 0xFE7A , "AudibleBell_Enable" ); - KEYVAL ( 0xFED0 , "First_Virtual_Screen" ); - KEYVAL ( 0xFED1 , "Prev_Virtual_Screen" ); - KEYVAL ( 0xFED2 , "Next_Virtual_Screen" ); - KEYVAL ( 0xFED4 , "Last_Virtual_Screen" ); - KEYVAL ( 0xFED5 , "Terminate_Server" ); - KEYVAL ( 0xFEE0 , "Pointer_Left" ); - KEYVAL ( 0xFEE1 , "Pointer_Right" ); - KEYVAL ( 0xFEE2 , "Pointer_Up" ); - KEYVAL ( 0xFEE3 , "Pointer_Down" ); - KEYVAL ( 0xFEE4 , "Pointer_UpLeft" ); - KEYVAL ( 0xFEE5 , "Pointer_UpRight" ); - KEYVAL ( 0xFEE6 , "Pointer_DownLeft" ); - KEYVAL ( 0xFEE7 , "Pointer_DownRight" ); - KEYVAL ( 0xFEE8 , "Pointer_Button_Dflt" ); - KEYVAL ( 0xFEE9 , "Pointer_Button1" ); - KEYVAL ( 0xFEEA , "Pointer_Button2" ); - KEYVAL ( 0xFEEB , "Pointer_Button3" ); - KEYVAL ( 0xFEEC , "Pointer_Button4" ); - KEYVAL ( 0xFEED , "Pointer_Button5" ); - KEYVAL ( 0xFEEE , "Pointer_DblClick_Dflt" ); - KEYVAL ( 0xFEEF , "Pointer_DblClick1" ); - KEYVAL ( 0xFEF0 , "Pointer_DblClick2" ); - KEYVAL ( 0xFEF1 , "Pointer_DblClick3" ); - KEYVAL ( 0xFEF2 , "Pointer_DblClick4" ); - KEYVAL ( 0xFEF3 , "Pointer_DblClick5" ); - KEYVAL ( 0xFEF4 , "Pointer_Drag_Dflt" ); - KEYVAL ( 0xFEF5 , "Pointer_Drag1" ); - KEYVAL ( 0xFEF6 , "Pointer_Drag2" ); - KEYVAL ( 0xFEF7 , "Pointer_Drag3" ); - KEYVAL ( 0xFEF8 , "Pointer_Drag4" ); - KEYVAL ( 0xFEF9 , "Pointer_EnableKeys" ); - KEYVAL ( 0xFEFA , "Pointer_Accelerate" ); - KEYVAL ( 0xFEFB , "Pointer_DfltBtnNext" ); - KEYVAL ( 0xFEFC , "Pointer_DfltBtnPrev" ); - KEYVAL ( 0xFEFD , "Pointer_Drag5" ); - KEYVAL ( 0xFF08 , "BackSpace" ); - KEYVAL ( 0xFF09 , "Tab" ); - KEYVAL ( 0xFF0A , "Linefeed" ); - KEYVAL ( 0xFF0B , "Clear" ); - KEYVAL ( 0xFF0D , "Return" ); - KEYVAL ( 0xFF13 , "Pause" ); - KEYVAL ( 0xFF14 , "Scroll_Lock" ); - KEYVAL ( 0xFF15 , "Sys_Req" ); - KEYVAL ( 0xFF1B , "Escape" ); - KEYVAL ( 0xFF20 , "Multi_key" ); - KEYVAL ( 0xFF21 , "Kanji" ); - KEYVAL ( 0xFF22 , "Muhenkan" ); - KEYVAL ( 0xFF23 , "Henkan" ); - KEYVAL ( 0xFF23 , "Henkan_Mode" ); - KEYVAL ( 0xFF24 , "Romaji" ); - KEYVAL ( 0xFF25 , "Hiragana" ); - KEYVAL ( 0xFF26 , "Katakana" ); - KEYVAL ( 0xFF27 , "Hiragana_Katakana" ); - KEYVAL ( 0xFF28 , "Zenkaku" ); - KEYVAL ( 0xFF29 , "Hankaku" ); - KEYVAL ( 0xFF2A , "Zenkaku_Hankaku" ); - KEYVAL ( 0xFF2B , "Touroku" ); - KEYVAL ( 0xFF2C , "Massyo" ); - KEYVAL ( 0xFF2D , "Kana_Lock" ); - KEYVAL ( 0xFF2E , "Kana_Shift" ); - KEYVAL ( 0xFF2F , "Eisu_Shift" ); - KEYVAL ( 0xFF30 , "Eisu_toggle" ); - KEYVAL ( 0xff31 , "Hangul" ); - KEYVAL ( 0xff32 , "Hangul_Start" ); - KEYVAL ( 0xff33 , "Hangul_End" ); - KEYVAL ( 0xff34 , "Hangul_Hanja" ); - KEYVAL ( 0xff35 , "Hangul_Jamo" ); - KEYVAL ( 0xff36 , "Hangul_Romaja" ); - KEYVAL ( 0xFF37 , "Codeinput" ); - KEYVAL ( 0xff37 , "Hangul_Codeinput" ); - KEYVAL ( 0xFF37 , "Kanji_Bangou" ); - KEYVAL ( 0xff38 , "Hangul_Jeonja" ); - KEYVAL ( 0xff39 , "Hangul_Banja" ); - KEYVAL ( 0xff3a , "Hangul_PreHanja" ); - KEYVAL ( 0xff3b , "Hangul_PostHanja" ); - KEYVAL ( 0xff3c , "Hangul_SingleCandidate" ); - KEYVAL ( 0xFF3C , "SingleCandidate" ); - KEYVAL ( 0xff3d , "Hangul_MultipleCandidate" ); - KEYVAL ( 0xFF3D , "MultipleCandidate" ); - KEYVAL ( 0xFF3D , "Zen_Koho" ); - KEYVAL ( 0xff3e , "Hangul_PreviousCandidate" ); - KEYVAL ( 0xFF3E , "Mae_Koho" ); - KEYVAL ( 0xFF3E , "PreviousCandidate" ); - KEYVAL ( 0xff3f , "Hangul_Special" ); - KEYVAL ( 0xFF50 , "Home" ); - KEYVAL ( 0xFF51 , "Left" ); - KEYVAL ( 0xFF52 , "Up" ); - KEYVAL ( 0xFF53 , "Right" ); - KEYVAL ( 0xFF54 , "Down" ); - KEYVAL ( 0xFF55 , "Page_Up" ); - KEYVAL ( 0xFF55 , "Prior" ); - KEYVAL ( 0xFF56 , "Next" ); - KEYVAL ( 0xFF56 , "Page_Down" ); - KEYVAL ( 0xFF57 , "End" ); - KEYVAL ( 0xFF58 , "Begin" ); - KEYVAL ( 0xFF60 , "Select" ); - KEYVAL ( 0xFF61 , "Print" ); - KEYVAL ( 0xFF62 , "Execute" ); - KEYVAL ( 0xFF63 , "Insert" ); - KEYVAL ( 0xFF65 , "Undo" ); - KEYVAL ( 0xFF66 , "Redo" ); - KEYVAL ( 0xFF67 , "Menu" ); - KEYVAL ( 0xFF68 , "Find" ); - KEYVAL ( 0xFF69 , "Cancel" ); - KEYVAL ( 0xFF6A , "Help" ); - KEYVAL ( 0xFF6B , "Break" ); - KEYVAL ( 0xFF7E , "Arabic_switch" ); - KEYVAL ( 0xFF7E , "Greek_switch" ); - KEYVAL ( 0xFF7E , "Hangul_switch" ); - KEYVAL ( 0xFF7E , "Hebrew_switch" ); - KEYVAL ( 0xFF7E , "ISO_Group_Shift" ); - KEYVAL ( 0xFF7E , "kana_switch" ); - KEYVAL ( 0xFF7E , "Mode_switch" ); - KEYVAL ( 0xFF7E , "script_switch" ); - KEYVAL ( 0xFF7F , "Num_Lock" ); - KEYVAL ( 0xFF80 , "KP_Space" ); - KEYVAL ( 0xFF89 , "KP_Tab" ); - KEYVAL ( 0xFF8D , "KP_Enter" ); - KEYVAL ( 0xFF91 , "KP_F1" ); - KEYVAL ( 0xFF92 , "KP_F2" ); - KEYVAL ( 0xFF93 , "KP_F3" ); - KEYVAL ( 0xFF94 , "KP_F4" ); - KEYVAL ( 0xFF95 , "KP_Home" ); - KEYVAL ( 0xFF96 , "KP_Left" ); - KEYVAL ( 0xFF97 , "KP_Up" ); - KEYVAL ( 0xFF98 , "KP_Right" ); - KEYVAL ( 0xFF99 , "KP_Down" ); - KEYVAL ( 0xFF9A , "KP_Page_Up" ); - KEYVAL ( 0xFF9A , "KP_Prior" ); - KEYVAL ( 0xFF9B , "KP_Next" ); - KEYVAL ( 0xFF9B , "KP_Page_Down" ); - KEYVAL ( 0xFF9C , "KP_End" ); - KEYVAL ( 0xFF9D , "KP_Begin" ); - KEYVAL ( 0xFF9E , "KP_Insert" ); - KEYVAL ( 0xFF9F , "KP_Delete" ); - KEYVAL ( 0xFFAA , "KP_Multiply" ); - KEYVAL ( 0xFFAB , "KP_Add" ); - KEYVAL ( 0xFFAC , "KP_Separator" ); - KEYVAL ( 0xFFAD , "KP_Subtract" ); - KEYVAL ( 0xFFAE , "KP_Decimal" ); - KEYVAL ( 0xFFAF , "KP_Divide" ); - KEYVAL ( 0xFFB0 , "KP_0" ); - KEYVAL ( 0xFFB1 , "KP_1" ); - KEYVAL ( 0xFFB2 , "KP_2" ); - KEYVAL ( 0xFFB3 , "KP_3" ); - KEYVAL ( 0xFFB4 , "KP_4" ); - KEYVAL ( 0xFFB5 , "KP_5" ); - KEYVAL ( 0xFFB6 , "KP_6" ); - KEYVAL ( 0xFFB7 , "KP_7" ); - KEYVAL ( 0xFFB8 , "KP_8" ); - KEYVAL ( 0xFFB9 , "KP_9" ); - KEYVAL ( 0xFFBD , "KP_Equal" ); - KEYVAL ( 0xFFBE , "F1" ); - KEYVAL ( 0xFFBF , "F2" ); - KEYVAL ( 0xFFC0 , "F3" ); - KEYVAL ( 0xFFC1 , "F4" ); - KEYVAL ( 0xFFC2 , "F5" ); - KEYVAL ( 0xFFC3 , "F6" ); - KEYVAL ( 0xFFC4 , "F7" ); - KEYVAL ( 0xFFC5 , "F8" ); - KEYVAL ( 0xFFC6 , "F9" ); - KEYVAL ( 0xFFC7 , "F10" ); - KEYVAL ( 0xFFC8 , "F11" ); - KEYVAL ( 0xFFC8 , "L1" ); - KEYVAL ( 0xFFC9 , "F12" ); - KEYVAL ( 0xFFC9 , "L2" ); - KEYVAL ( 0xFFCA , "F13" ); - KEYVAL ( 0xFFCA , "L3" ); - KEYVAL ( 0xFFCB , "F14" ); - KEYVAL ( 0xFFCB , "L4" ); - KEYVAL ( 0xFFCC , "F15" ); - KEYVAL ( 0xFFCC , "L5" ); - KEYVAL ( 0xFFCD , "F16" ); - KEYVAL ( 0xFFCD , "L6" ); - KEYVAL ( 0xFFCE , "F17" ); - KEYVAL ( 0xFFCE , "L7" ); - KEYVAL ( 0xFFCF , "F18" ); - KEYVAL ( 0xFFCF , "L8" ); - KEYVAL ( 0xFFD0 , "F19" ); - KEYVAL ( 0xFFD0 , "L9" ); - KEYVAL ( 0xFFD1 , "F20" ); - KEYVAL ( 0xFFD1 , "L10" ); - KEYVAL ( 0xFFD2 , "F21" ); - KEYVAL ( 0xFFD2 , "R1" ); - KEYVAL ( 0xFFD3 , "F22" ); - KEYVAL ( 0xFFD3 , "R2" ); - KEYVAL ( 0xFFD4 , "F23" ); - KEYVAL ( 0xFFD4 , "R3" ); - KEYVAL ( 0xFFD5 , "F24" ); - KEYVAL ( 0xFFD5 , "R4" ); - KEYVAL ( 0xFFD6 , "F25" ); - KEYVAL ( 0xFFD6 , "R5" ); - KEYVAL ( 0xFFD7 , "F26" ); - KEYVAL ( 0xFFD7 , "R6" ); - KEYVAL ( 0xFFD8 , "F27" ); - KEYVAL ( 0xFFD8 , "R7" ); - KEYVAL ( 0xFFD9 , "F28" ); - KEYVAL ( 0xFFD9 , "R8" ); - KEYVAL ( 0xFFDA , "F29" ); - KEYVAL ( 0xFFDA , "R9" ); - KEYVAL ( 0xFFDB , "F30" ); - KEYVAL ( 0xFFDB , "R10" ); - KEYVAL ( 0xFFDC , "F31" ); - KEYVAL ( 0xFFDC , "R11" ); - KEYVAL ( 0xFFDD , "F32" ); - KEYVAL ( 0xFFDD , "R12" ); - KEYVAL ( 0xFFDE , "F33" ); - KEYVAL ( 0xFFDE , "R13" ); - KEYVAL ( 0xFFDF , "F34" ); - KEYVAL ( 0xFFDF , "R14" ); - KEYVAL ( 0xFFE0 , "F35" ); - KEYVAL ( 0xFFE0 , "R15" ); - KEYVAL ( 0xFFE1 , "Shift_L" ); - KEYVAL ( 0xFFE2 , "Shift_R" ); - KEYVAL ( 0xFFE3 , "Control_L" ); - KEYVAL ( 0xFFE4 , "Control_R" ); - KEYVAL ( 0xFFE5 , "Caps_Lock" ); - KEYVAL ( 0xFFE6 , "Shift_Lock" ); - KEYVAL ( 0xFFE7 , "Meta_L" ); - KEYVAL ( 0xFFE8 , "Meta_R" ); - KEYVAL ( 0xFFE9 , "Alt_L" ); - KEYVAL ( 0xFFEA , "Alt_R" ); - KEYVAL ( 0xFFEB , "Super_L" ); - KEYVAL ( 0xFFEC , "Super_R" ); - KEYVAL ( 0xFFED , "Hyper_L" ); - KEYVAL ( 0xFFEE , "Hyper_R" ); - KEYVAL ( 0xFFFF , "Delete" ); - -/* 0xFFFFFF "VoidSymbol" */ -} diff --git a/desmume/src/frontend/posix/gtk-glade/keyval_names.h b/desmume/src/frontend/posix/gtk-glade/keyval_names.h deleted file mode 100644 index af314b3ff..000000000 --- a/desmume/src/frontend/posix/gtk-glade/keyval_names.h +++ /dev/null @@ -1,23 +0,0 @@ -/* keyval_names.h - this file is part of DeSmuME - * - * Copyright (C) 2007 Damien Nozay (damdoum) - * Author: damdoum at users.sourceforge.net - * - * This file 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 2, or (at your option) - * any later version. - * - * This file 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 this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -const char * KEYNAME(int k); -void init_keyvals(); diff --git a/desmume/src/frontend/posix/gtk-glade/main.cpp b/desmume/src/frontend/posix/gtk-glade/main.cpp deleted file mode 100644 index 796bfb0d6..000000000 --- a/desmume/src/frontend/posix/gtk-glade/main.cpp +++ /dev/null @@ -1,566 +0,0 @@ -/* main.c - this file is part of DeSmuME - * - * Copyright (C) 2007-2019 DeSmuME Team - * Copyright (C) 2007 Damien Nozay (damdoum) - * Copyright (C) 2007 Pascal Giard (evilynux) - * Author: damdoum at users.sourceforge.net - * - * This file 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 2, or (at your option) - * any later version. - * - * This file 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 this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include - -#include "callbacks.h" -#include "callbacks_IO.h" -#include "dTools/callbacks_dtools.h" -#include "globals.h" -#include "keyval_names.h" -#include "rasterize.h" -#include "desmume.h" -#include "firmware.h" -#include "../shared/desmume_config.h" - -#ifdef GDB_STUB -#include "../armcpu.h" -#include "../gdbstub.h" -#endif - -#ifdef GTKGLEXT_AVAILABLE -#include -#include "../OGLRender.h" -#include "gdk_3Demu.h" -#endif - -int glade_fps_limiter_disabled = 0; - -GtkWidget * pWindow; -GtkWidget * pDrawingArea, * pDrawingArea2; -GladeXML * xml, * xml_tools; - -const u16 gtk_kb_cfg[NB_KEYS] = - { - GDK_x, // A - GDK_z, // B - GDK_Shift_R, // select - GDK_Return, // start - GDK_Right, // Right - GDK_Left, // Left - GDK_Up, // Up - GDK_Down, // Down - GDK_w, // R - GDK_q, // L - GDK_s, // X - GDK_a, // Y - GDK_p, // DEBUG - GDK_o, // BOOST - GDK_BackSpace, // Lid - }; - -SoundInterface_struct *SNDCoreList[] = { -&SNDDummy, -&SNDDummy, -&SNDSDL, -NULL -}; - -GPU3DInterface *core3DList[] = { -&gpu3DNull, -&gpu3DRasterize -#ifdef GTKGLEXT_AVAILABLE - , - &gpu3Dgl -#endif -}; - -/* - * - * Command line handling - * - */ -struct configured_features { - int load_slot; - int opengl_2d; - int engine_3d; - int disable_limiter; - int savetype; - - u16 arm9_gdb_port; - u16 arm7_gdb_port; - - int firmware_language; - - const char *nds_file; -}; - -static void -init_configured_features( struct configured_features *config) { - config->load_slot = 0; - config->arm9_gdb_port = 0; - config->arm7_gdb_port = 0; - - config->opengl_2d = 0; - config->engine_3d = 1; - - config->disable_limiter = 0; - config->savetype = 0; - - config->nds_file = NULL; - - /* use the default language */ - config->firmware_language = -1; -} - -static int -fill_configured_features( struct configured_features *config, - int argc, char ** argv) { - int good_args = 1; - int print_usage = 0; - int i; - - for ( i = 1; i < argc && good_args; i++) { - if ( strcmp( argv[i], "--help") == 0) { - g_print( _("USAGE: %s [OPTIONS] [nds-file]\n"), argv[0]); - g_print( _("OPTIONS:\n")); - g_print( _("\ - --load-slot=NUM Load game saved under NUM position.\n\n")); - g_print( _("\ - --3d-engine=ENGINE Selects 3D rendering engine\n\ - 0 = disabled\n\ - 1 = internal desmume rasterizer (default)\n")); -#ifdef GTKGLEXT_AVAILABLE - g_print( _("\ - 2 = gtkglext off-screen 3d opengl\n\n")); -#endif - g_print( _("\ - --disable-limiter Disables the 60 fps limiter\n\n")); - g_print( _("\ - --save-type=TYPE Selects savetype:\n\ - 0 = Autodetect (default)\n\ - 1 = EEPROM 4kbit\n\ - 2 = EEPROM 64kbit\n\ - 3 = EEPROM 512kbit\n\ - 4 = FRAM 256kbit\n\ - 5 = FLASH 2mbit\n\ - 6 = FLASH 4mbit\n\ - \n")); - g_print( _("\ - --fwlang=LANG Set the language in the firmware, LANG as follows:\n\ - 0 = Japanese\n\ - 1 = English\n\ - 2 = French\n\ - 3 = German\n\ - 4 = Italian\n\ - 5 = Spanish\n\n")); -#ifdef GDB_STUB - g_print( _("\ - --arm9gdb=PORT_NUM Enable the ARM9 GDB stub on the given port\n\ - --arm7gdb=PORT_NUM Enable the ARM7 GDB stub on the given port\n\n")); -#endif - g_print( _("\ - --help Display this message\n")); - //g_print(" --sticky Enable sticky keys and stylus\n"); - good_args = 0; - } - else if ( strncmp( argv[i], "--load-slot=", 12) == 0) { - char *end_char; - int slot = strtoul( &argv[i][12], &end_char, 10); - - if ( slot >= 0 && slot <= 10) { - config->load_slot = slot; - } - else { - g_printerr( _("I only know how to load from slots 1-10.\n")); - good_args = 0; - } - } -#ifdef GTKGLEXT_AVAILABLE - else if ( strcmp( argv[i], "--opengl-2d") == 0) { - // FIXME: to be implemented - config->opengl_2d = 1; - } -#define MAX3DEMU 2 -#else -#define MAX3DEMU 1 -#endif - else if ( strncmp( argv[i], "--3d-engine=", 12) == 0) { - char *end_char; - int engine = strtoul( &argv[i][12], &end_char, 10); - - if ( engine >= 0 && engine <= MAX3DEMU) { - config->engine_3d = engine; - } - else { - g_printerr( _("Supported 3d engines: 0, 1, and on some machines 2; use --help option for details\n")); - good_args = 0; - } - } - else if ( strncmp( argv[i], "--save-type=", 12) == 0) { - char *end_char; - int type = strtoul( &argv[i][12], &end_char, 10); - - if ( type >= 0 && type <= 6) { - config->savetype = type; - } - else { - g_printerr( _("select savetype from 0 to 6; use --help option for details\n")); - good_args = 0; - } - } - else if ( strncmp( argv[i], "--fwlang=", 9) == 0) { - char *end_char; - int lang = strtoul( &argv[i][9], &end_char, 10); - - if ( lang >= 0 && lang <= 5) { - config->firmware_language = lang; - } - else { - g_printerr( _("Firmware language must be set to a value from 0 to 5.\n")); - good_args = 0; - } - } -#ifdef GDB_STUB - else if ( strncmp( argv[i], "--arm9gdb=", 10) == 0) { - char *end_char; - unsigned long port_num = strtoul( &argv[i][10], &end_char, 10); - - if ( port_num > 0 && port_num < 65536) { - config->arm9_gdb_port = port_num; - } - else { - g_print( _("ARM9 GDB stub port must be in the range 1 to 65535\n")); - good_args = 0; - } - } - else if ( strncmp( argv[i], "--arm7gdb=", 10) == 0) { - char *end_char; - unsigned long port_num = strtoul( &argv[i][10], &end_char, 10); - - if ( port_num > 0 && port_num < 65536) { - config->arm7_gdb_port = port_num; - } - else { - g_print( _("ARM7 GDB stub port must be in the range 1 to 65535\n")); - good_args = 0; - } - } -#endif - else if ( strcmp( argv[i], "--disable-limiter") == 0) { - config->disable_limiter = 1; - } - else { - if ( config->nds_file == NULL) { - config->nds_file = argv[i]; - } - else { - g_print( _("NDS file (\"%s\") already set\n"), config->nds_file); - good_args = 0; - } - } - } - - if ( good_args) { - /* - * check if the configured features are consistant - */ - } - - if ( print_usage) { - g_print( _("USAGE: %s [options] [nds-file]\n"), argv[0]); - g_print( _("USAGE: %s --help - for help\n"), argv[0]); - } - - return good_args; -} - - - -/* ***** ***** TOOLS ***** ***** */ - -GList * tools_to_update = NULL; - -// register tool -void register_Tool(VoidFunPtr fun) { - tools_to_update = g_list_append(tools_to_update, (void *) fun); -} -void unregister_Tool(VoidFunPtr fun) { - if (tools_to_update == NULL) return; - tools_to_update = g_list_remove(tools_to_update, (void *) fun); -} - -static void notify_Tool (VoidFunPtr fun, gpointer func_data) { - fun(); -} - -void notify_Tools() { - g_list_foreach(tools_to_update, (GFunc)notify_Tool, NULL); -} - -/* Return the glade directory. - Note: See configure.ac for the value of GLADEUI_UNINSTALLED_DIR. */ -gchar * get_ui_file (const char *filename) -{ - gchar *path; - - /* looking in uninstalled (aka building) dir first */ - path = g_build_filename (GLADEUI_UNINSTALLED_DIR, filename, NULL); - if (g_file_test (path, G_FILE_TEST_IS_REGULAR)) return path; - g_free (path); - - /* looking in installed dir */ - path = g_build_filename (DATADIR, filename, NULL); - if (g_file_test (path, G_FILE_TEST_IS_REGULAR)) return path; - g_free (path); - - printf ("Failed to find ui file, \"%s\", in %s or %s\n", - filename ? filename : "", GLADEUI_UNINSTALLED_DIR, DATADIR); - /* not found */ - return NULL; -} - - -/* - * The thread handling functions needed by the GDB stub code. - */ -#ifdef GDB_STUB -void * -createThread_gdb( void (*thread_function)( void *data), - void *thread_data) { - GThread *new_thread = g_thread_new(NULL, (GThreadFunc)thread_function, - thread_data); - - return new_thread; -} - -void -joinThread_gdb( void *thread_handle) { - g_thread_join((GThread *) thread_handle); -} -#endif - - -/* ***** ***** MAIN ***** ***** */ - -static int -common_gtk_glade_main( struct configured_features *my_config) { - gchar *uifile; - GKeyFile *keyfile; - - /* use any language set on the command line */ - if ( my_config->firmware_language != -1) { - CommonSettings.fwConfig.language = my_config->firmware_language; - } - desmume_savetype(my_config->savetype); - -#ifdef GTKGLEXT_AVAILABLE -// check if you have GTHREAD when running configure script - //g_thread_init(NULL); - //register_gl_fun(my_gl_Begin,my_gl_End); -#endif - init_keyvals(); - - if(SDL_Init( SDL_INIT_TIMER | SDL_INIT_VIDEO) == -1) - { - fprintf(stderr, _("Error trying to initialize SDL: %s\n"), - SDL_GetError()); - return 1; - } - - desmume_init(); - - /* - * Activate the GDB stubs - * This has to come after the NDS_Init (called in desmume_init) - * where the cpus are set up. - */ -#ifdef GDB_STUB - gdbstub_mutex_init(); - - gdbstub_handle_t arm9_gdb_stub = NULL; - gdbstub_handle_t arm7_gdb_stub = NULL; - - if ( my_config->arm9_gdb_port > 0) { - arm9_gdb_stub = createStub_gdb( my_config->arm9_gdb_port, - &NDS_ARM9, - &arm9_direct_memory_iface); - - if ( arm9_gdb_stub == NULL) { - g_printerr("Failed to create ARM9 gdbstub on port %d\n", - my_config->arm9_gdb_port); - exit( -1); - } - else { - activateStub_gdb( arm9_gdb_stub); - } - } - if ( my_config->arm7_gdb_port > 0) { - arm7_gdb_stub = createStub_gdb( my_config->arm7_gdb_port, - &NDS_ARM7, - &arm7_base_memory_iface); - - if ( arm7_gdb_stub == NULL) { - g_printerr("Failed to create ARM7 gdbstub on port %d\n", - my_config->arm7_gdb_port); - exit( -1); - } - else { - activateStub_gdb( arm7_gdb_stub); - } - } -#endif - - /* Initialize joysticks */ - if(!init_joy()) return 1; - - keyfile = desmume_config_read_file(gtk_kb_cfg); - - /* load the interface */ - uifile = get_ui_file("DeSmuMe.glade"); - xml = glade_xml_new(uifile, NULL, NULL); - g_free (uifile); - uifile = get_ui_file("DeSmuMe_Dtools.glade"); - xml_tools = glade_xml_new(uifile, NULL, NULL); - g_free (uifile); - pWindow = glade_xml_get_widget(xml, "wMainW"); - pDrawingArea = glade_xml_get_widget(xml, "wDraw_Main"); - pDrawingArea2 = glade_xml_get_widget(xml, "wDraw_Sub"); - - { - char wdgName[40]; - snprintf(wdgName, 39, "savetype%d", my_config->savetype+1); - GtkWidget * wdgt = glade_xml_get_widget(xml, wdgName); - gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (wdgt), TRUE); - } - - /* connect the signals in the interface */ - glade_xml_signal_autoconnect_StringObject(xml); - glade_xml_signal_autoconnect_StringObject(xml_tools); - - init_GL_capabilities(); - - /* check command line file */ - if( my_config->nds_file) { - if(desmume_open( my_config->nds_file) >= 0) { - loadstate_slot( my_config->load_slot); - desmume_resume(); - enable_rom_features(); - } else { - GtkWidget *pDialog = gtk_message_dialog_new(GTK_WINDOW(pWindow), - GTK_DIALOG_MODAL, - GTK_MESSAGE_INFO, - GTK_BUTTONS_OK, - _("Unable to load :\n%s"), my_config->nds_file); - gtk_dialog_run(GTK_DIALOG(pDialog)); - gtk_widget_destroy(pDialog); - } - } - - gtk_widget_show(pDrawingArea); - gtk_widget_show(pDrawingArea2); - - { - int engine = my_config->engine_3d; - -#ifdef GTKGLEXT_AVAILABLE - if ( my_config->engine_3d==2 ) - /* setup the gdk 3D emulation */ - if(!init_opengl_gdk_3Demu(GDK_DRAWABLE(pWindow->window))){ - fprintf( stderr, _("Failed to initialise openGL 3D emulation; " - "removing 3D support\n")); - engine = 0; - } -#endif - if (!GPU->Change3DRendererByID(engine)) { - GPU->Change3DRendererByID(RENDERID_SOFTRASTERIZER); - fprintf(stderr, _("3D renderer initialization failed!\nFalling back to 3D core: %s\n"), core3DList[RENDERID_SOFTRASTERIZER]->name); - } - } - -// on_menu_tileview_activate(NULL,NULL); - - /* setup the frame limiter and indicate if it is disabled */ - glade_fps_limiter_disabled = my_config->disable_limiter; - - /* start event loop */ - gtk_main(); - desmume_free(); - -#ifdef GDB_STUB - destroyStub_gdb( arm9_gdb_stub); - arm9_gdb_stub = NULL; - - destroyStub_gdb( arm7_gdb_stub); - arm7_gdb_stub = NULL; - - gdbstub_mutex_destroy(); -#endif - - /* Unload joystick */ - uninit_joy(); - - SDL_Quit(); - desmume_config_update_keys(keyfile); - desmume_config_update_joykeys(keyfile); - desmume_config_dispose(keyfile); - return EXIT_SUCCESS; -} - -int main(int argc, char *argv[]) { - struct configured_features my_config; - - // Localization - bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); - bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); - textdomain (GETTEXT_PACKAGE); - - init_configured_features( &my_config); - - /* X11 multi-threading support */ - if(!XInitThreads()) - { - fprintf(stderr, "Warning: X11 not thread-safe\n"); - } - - gtk_init(&argc, &argv); - -#ifdef GTKGLEXT_AVAILABLE - gtk_gl_init( &argc, &argv); -#endif - - if ( !fill_configured_features( &my_config, argc, argv)) { - exit(0); - } - - return common_gtk_glade_main( &my_config); -} - - -#ifdef WIN32 -int WinMain ( HINSTANCE hThisInstance, HINSTANCE hPrevInstance, - LPSTR lpszArgument, int nFunsterStil) -{ - int argc = 0; - char *argv[] = NULL; - - /* - * FIXME: - * Emulate the argc and argv main parameters. Could do this using - * CommandLineToArgvW and then convert the wide chars to thin chars. - * Or parse the wide chars directly and call common_gtk_glade_main with a - * filled configuration structure. - */ - main( argc, argv); -} -#endif diff --git a/desmume/src/frontend/posix/gtk-glade/meson.build b/desmume/src/frontend/posix/gtk-glade/meson.build deleted file mode 100644 index d23e5d414..000000000 --- a/desmume/src/frontend/posix/gtk-glade/meson.build +++ /dev/null @@ -1,46 +0,0 @@ -dep_gtk2 = dependency('gtk+-2.0') -dep_glade = dependency('libglade-2.0') -dep_gmodule = dependency('gmodule-2.0') -dep_gtkglext = dependency('gtkglext-1.0') -dep_x11 = dependency('x11') - -gtk_dependencies = dependencies + [dep_gtk2, dep_glade, dep_gmodule, dep_gtkglext, dep_x11] - -desmume_src = [ - 'glade-xml.cpp', - 'callbacks.cpp', - 'callbacks_IO.cpp', - 'desmume.cpp', - 'keyval_names.cpp', - 'main.cpp', - 'gdk_gl.cpp', - 'dTools/callbacks_1_ioregs.cpp', - 'dTools/callbacks_2_memview.cpp', - 'dTools/callbacks_3_palview.cpp', - 'dTools/callbacks_4_tileview.cpp', - 'gdk_3Demu.cpp', - '../shared/sndsdl.cpp', - '../shared/ctrlssdl.cpp', - '../../../driver.cpp', -] - -# TODO: why do we have to redeclare it here with one more fs level? -includes = include_directories( - '../../../../src', - '../../../../src/libretro-common/include', - '../../../../src/frontend', -) - -executable('desmume-glade', - desmume_src, - cpp_args: ['-DGETTEXT_PACKAGE="desmume"', '-DLOCALEDIR="' + get_option('localedir') + '"', '-DVERSION="Unknown version"', '-DGTKGLEXT_AVAILABLE'], - dependencies: gtk_dependencies, - include_directories: includes, - link_with: libdesmume, - install: true, -) - -install_data('desmume-glade.desktop', install_dir: join_paths(get_option('datadir'), 'applications')) -install_data('glade/DeSmuME.xpm', install_dir: join_paths(get_option('datadir'), 'pixmaps')) -install_man('doc/desmume-glade.1') -install_data(['glade/DeSmuMe_Dtools.glade', 'glade/DeSmuMe.glade', 'glade/DeSmuME.xpm'], install_dir: join_paths(get_option('datadir'), 'glade')) diff --git a/desmume/src/frontend/posix/meson.build b/desmume/src/frontend/posix/meson.build index e1d105cc3..ec29e6d68 100644 --- a/desmume/src/frontend/posix/meson.build +++ b/desmume/src/frontend/posix/meson.build @@ -252,6 +252,3 @@ endif if get_option('frontend-gtk') subdir('gtk') endif -if get_option('frontend-glade') - subdir('gtk-glade') -endif diff --git a/desmume/src/frontend/posix/meson_options.txt b/desmume/src/frontend/posix/meson_options.txt index fe46876aa..1deece7f0 100644 --- a/desmume/src/frontend/posix/meson_options.txt +++ b/desmume/src/frontend/posix/meson_options.txt @@ -13,11 +13,6 @@ option('frontend-cli', value: true, description: 'Enable CLI frontend', ) -option('frontend-glade', - type: 'boolean', - value: false, - description: 'Enable glade frontend', -) option('wifi', type: 'boolean', value: false,