tried to fix 64b problem with callback arguments

changed glade layout for better "rightscreen" implementation
fixed a little problem with double clicks
This commit is contained in:
damdoum 2007-02-11 15:06:38 +00:00
parent eef54629a0
commit ffe08e1972
7 changed files with 376 additions and 419 deletions

View File

@ -133,15 +133,15 @@ void on_menu_quit_activate (GtkMenuItem *menuitem, gpointer user_data) { gtk
/* MENU SAVES ***** ***** ***** ***** */
void on_loadstateXX_activate (GtkMenuItem *m, gpointer d) {
int slot = (int)d;
int slot = dyn_CAST(int,d);
loadstate_slot(slot);
}
void on_savestateXX_activate (GtkMenuItem *m, gpointer d) {
int slot = (int)d;
int slot = dyn_CAST(int,d);
update_savestate(slot);
}
void on_savetypeXX_activate (GtkMenuItem *m, gpointer d) {
int type = (int)d;
int type = dyn_CAST(int,d);
desmume_savetype(type);
}
@ -167,27 +167,58 @@ void on_menu_layers_activate (GtkMenuItem *menuitem, gpointer user_data) {
/* SUBMENU FRAMESKIP ***** ***** ***** ***** */
void on_fsXX_activate (GtkMenuItem *menuitem,gpointer user_data) {
Frameskip = (int)user_data;
Frameskip = dyn_CAST(int,user_data);
// printf ("setting FS %d %d\n", Frameskip, user_data);
}
/* SUBMENU SIZE ***** ***** ***** ***** */
void rightscreen(BOOL apply) {
GtkBox * sbox = (GtkBox*)glade_xml_get_widget(xml, "whb_Sub");
GtkWidget * mbox = glade_xml_get_widget(xml, "whb_Main");
GtkWidget * vbox = glade_xml_get_widget(xml, "wvb_Layout");
GtkWidget * w = glade_xml_get_widget(xml, "wvb_2_Sub");
/* we want to change the layout, lower screen goes right */
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 = 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;
}
}
}
void rightscreen(BOOL apply) {
GtkWidget *chk = glade_xml_get_widget(xml, "wvb_2_Sub");
GtkTable *table = glade_xml_get_widget(xml, "table_layout");
if (apply) {
gtk_box_reorder_child(sbox,w,-1);
gtk_widget_reparent((GtkWidget*)sbox,mbox);
/* we want to change the layout, lower screen goes right */
gtk_table_reattach(table, pDrawingArea2,
3,4, 0,1, 0,0, 0,0);
gtk_table_reattach(table, chk,
4,5, 0,1, 0,0, 0,0);
} else if (!ScreenRight) {
/* we want to change the layout, lower screen goes down */
gtk_box_reorder_child(sbox,w,0);
gtk_widget_reparent((GtkWidget*)sbox,vbox);
gtk_table_reattach(table, pDrawingArea2,
1,2, 2,3, 0,0, 0,0);
gtk_table_reattach(table, chk,
0,1, 2,3, 0,0, 0,0);
}
/* pack the window */
MAINWINDOW_RESIZE();
}
@ -220,7 +251,6 @@ void rotate(float angle) {
resize(ScreenCoeff_Size[0],ScreenCoeff_Size[1]);
}
/* FIXME: Totally broken for 64bit; dyn_CAST won't work. */
void on_sizeXX_activate (GtkMenuItem *menuitem, gpointer user_data) {
float f = dyn_CAST(float,user_data);
// printf("setting ZOOM %f\n",f);
@ -296,7 +326,6 @@ void on_menu_rightscreen_activate (GtkMenuItem *menuitem, gpointer user_data)
rightscreen(ScreenRight);
}
/* FIXME: Totally broken for 64bit; dyn_CAST won't work. */
void on_menu_rotatescreen_activate (GtkMenuItem *menuitem, gpointer user_data) {
/* we want to rotate the screen */
float angle = dyn_CAST(float,user_data);
@ -359,10 +388,10 @@ void change_bgx_layer(int layer, gboolean state, NDS_Screen scr) {
//fprintf(stderr,"Changed Layer %s to %d\n",layer,state);
}
void on_wc_1_BGXX_toggled (GtkToggleButton *togglebutton, gpointer user_data) {
int layer = (int)user_data;
int layer = dyn_CAST(int,user_data);
change_bgx_layer(layer, gtk_toggle_button_get_active(togglebutton), MainScreen);
}
void on_wc_2_BGXX_toggled (GtkToggleButton *togglebutton, gpointer user_data) {
int layer = (int)user_data;
int layer = dyn_CAST(int,user_data);
change_bgx_layer(layer, gtk_toggle_button_get_active(togglebutton), SubScreen);
}

View File

@ -170,11 +170,11 @@ gboolean screen (GtkWidget * widget, int off) {
/* OUTPUT SCREENS */
gboolean on_wDrawScreen_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer user_data) {
int scr = (int)user_data;
int scr = dyn_CAST(int,user_data);
return screen(widget, scr);
}
gboolean on_wDrawScreen_configure_event(GtkWidget *widget, GdkEventConfigure *event, gpointer user_data) {
int scr = (int)user_data;
int scr = dyn_CAST(int,user_data);
reshape(widget, scr); return TRUE;
}
@ -203,7 +203,7 @@ static void resize_incremental(int i, GdkEventScroll *event) {
}
gboolean on_wDrawScreen_scroll_event (GtkWidget *widget, GdkEvent *event, gpointer user_data) {
int scr = (int)user_data;
int scr = dyn_CAST(int,user_data);
// separate zoom factors not supported yet
scr = 0;
resize_incremental(scr,event);
@ -225,7 +225,7 @@ void set_touch_pos (int x, int y) {
}
gboolean on_wDrawScreen_button_press_event (GtkWidget *widget, GdkEventButton *event, gpointer user_data) {
int scr = (int)user_data;
int scr = dyn_CAST(int,user_data);
GdkModifierType state;
gint x,y;
@ -239,13 +239,16 @@ gboolean on_wDrawScreen_button_press_event (GtkWidget *widget, GdkEventButton
}
break;
case 3: break;
case 2: rotate(ScreenRotate + 90.0); 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 = (int)user_data;
int scr = dyn_CAST(int,user_data);
if ((scr==1) ^ ScreenInvert) {
if (click) NDS_releasTouch();
click = FALSE;
@ -254,7 +257,7 @@ gboolean on_wDrawScreen_button_release_event (GtkWidget *widget, GdkEventButton
}
gboolean on_wDrawScreen_motion_notify_event (GtkWidget *widget, GdkEventMotion *event, gpointer user_data) {
int scr = (int)user_data;
int scr = dyn_CAST(int,user_data);
GdkModifierType state;
gint x,y;

View File

@ -143,10 +143,9 @@ gboolean EmuLoop(gpointer data)
notify_Tools();
gtk_widget_queue_draw(pDrawingArea);
gtk_widget_queue_draw(pDrawingArea2);
return TRUE;
}
regMainLoop = FALSE;
return FALSE;
}

View File

@ -39,6 +39,7 @@ INLINE void my_gl_Identity() {
INLINE void my_gl_DrawBeautifulQuad() {
// beautiful quad
glColor4ub(255,255,255,128);
glBegin(GL_QUADS);
glColor3ub(255,0,0); glVertex2d(-0.75,-0.75);
glColor3ub(128,255,0); glVertex2d(-0.75, 0.75);
@ -53,9 +54,10 @@ BOOL my_gl_Begin (int screen) {
}
void my_gl_End (int screen) {
glFlush ();
if (gdk_gl_drawable_is_double_buffered (my_glDrawable[screen]))
gdk_gl_drawable_swap_buffers (my_glDrawable[screen]);
else
glFlush ();
gdk_gl_drawable_gl_end(my_glDrawable[screen]);
}
@ -71,7 +73,7 @@ void init_GL(GtkWidget * widget, int screen) {
// realize so that we get a GdkWindow
gtk_widget_realize(widget);
// make sure we realize
gtk_events_pending();
while (gtk_events_pending()) gtk_main_iteration();
my_glDrawable[screen] = gtk_widget_get_gl_drawable(widget);
// shared context
@ -81,11 +83,9 @@ void init_GL(GtkWidget * widget, int screen) {
if (!my_gl_Begin(screen)) return;
/* Set the background black */
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
my_gl_DrawBeautifulQuad();
// generated ONE texture (display)
glEnable(GL_TEXTURE_2D);
glGenTextures(1, &Textures[0]);
@ -112,7 +112,8 @@ void reshape (GtkWidget * widget, int screen) {
!my_gl_Begin(screen)) return;
glViewport (0, 0, widget->allocation.width, widget->allocation.height);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
my_gl_End(screen);
}
@ -154,16 +155,18 @@ gboolean screen (GtkWidget * widget, int viewportscreen) {
glLoadIdentity();
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
if (desmume_running()) {
// rotate
glRotatef(ScreenRotate, 0.0, 0.0, 1.0);
// draw screen
my_gl_Texture2D();
if (viewportscreen==0) my_gl_ScreenTex();
my_gl_ScreenTexApply(screen);
}
my_gl_DrawBeautifulQuad();
// rotate
glRotatef(ScreenRotate, 0.0, 0.0, 1.0);
// draw screen
my_gl_Texture2D();
if (viewportscreen==0) my_gl_ScreenTex();
my_gl_ScreenTexApply(screen);
my_gl_End(viewportscreen);
return TRUE;
}

View File

@ -63,15 +63,18 @@ autoconnect_foreach_StringObject(const char *signal_handler, GList *signals,
GTK_WIDGET(data->signal_object));
char format[]="%_\0\0";
if (sscanf(data->connect_object,"%%%c:", &format[1])) {
float obj;
sscanf(data->connect_object+3,format, &obj);
// 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, dyn_CAST(gpointer,obj));
func, argument);
else
g_signal_connect(data->signal_object, data->signal_name,
func, dyn_CAST(gpointer,obj));
func, argument);
} else {
GObject *other = g_hash_table_lookup(self->priv->name_hash,

View File

@ -960,122 +960,76 @@
</child>
<child>
<widget class="GtkVBox" id="wvb_Layout">
<widget class="GtkTable" id="table_layout">
<property name="visible">True</property>
<property name="n_rows">3</property>
<property name="n_columns">5</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<property name="row_spacing">0</property>
<property name="column_spacing">0</property>
<child>
<widget class="GtkHBox" id="whb_Main">
<widget class="GtkDrawingArea" id="wDraw_Main">
<property name="width_request">256</property>
<property name="height_request">192</property>
<property name="events">GDK_EXPOSURE_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
<signal name="configure_event" handler="on_wDrawScreen_configure_event" object="%d:0" last_modification_time="Mon, 05 Feb 2007 00:49:24 GMT"/>
<signal name="expose_event" handler="on_wDrawScreen_expose_event" object="%d:0" last_modification_time="Tue, 02 Jan 2007 10:27:18 GMT"/>
<signal name="button_release_event" handler="on_wDrawScreen_button_release_event" object="%d:0" last_modification_time="Wed, 07 Feb 2007 17:32:00 GMT"/>
<signal name="button_press_event" handler="on_wDrawScreen_button_press_event" object="%d:0" last_modification_time="Wed, 07 Feb 2007 17:32:57 GMT"/>
<signal name="scroll_event" handler="on_wDrawScreen_scroll_event" object="%d:0" last_modification_time="Wed, 07 Feb 2007 19:18:23 GMT"/>
<signal name="motion_notify_event" handler="on_wDrawScreen_motion_notify_event" object="%d:0" last_modification_time="Tue, 02 Jan 2007 10:28:32 GMT"/>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">0</property>
<property name="bottom_attach">1</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkDrawingArea" id="wDraw_Sub">
<property name="width_request">256</property>
<property name="height_request">192</property>
<property name="events">GDK_EXPOSURE_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
<signal name="configure_event" handler="on_wDrawScreen_configure_event" object="%d:1" last_modification_time="Mon, 05 Feb 2007 00:49:24 GMT"/>
<signal name="expose_event" handler="on_wDrawScreen_expose_event" object="%d:1" last_modification_time="Tue, 02 Jan 2007 10:27:18 GMT"/>
<signal name="button_release_event" handler="on_wDrawScreen_button_release_event" object="%d:1" last_modification_time="Wed, 07 Feb 2007 17:32:00 GMT"/>
<signal name="button_press_event" handler="on_wDrawScreen_button_press_event" object="%d:1" last_modification_time="Wed, 07 Feb 2007 17:32:57 GMT"/>
<signal name="scroll_event" handler="on_wDrawScreen_scroll_event" object="%d:1" last_modification_time="Wed, 07 Feb 2007 19:18:23 GMT"/>
<signal name="motion_notify_event" handler="on_wDrawScreen_motion_notify_event" object="%d:1" last_modification_time="Tue, 02 Jan 2007 10:28:32 GMT"/>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkVBox" id="wvb_2_Sub">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkVBox" id="wvb_1_Main">
<widget class="GtkCheckButton" id="wc_2_BG0">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkCheckButton" id="wc_1_BG0">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">BG0</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">True</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_wc_1_BGXX_toggled" object="%d:0" last_modification_time="Mon, 01 Jan 2007 21:03:49 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="wc_1_BG1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">BG1</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">True</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_wc_1_BGXX_toggled" object="%d:1" last_modification_time="Mon, 01 Jan 2007 21:03:49 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="wc_1_BG2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">BG2</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">True</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_wc_1_BGXX_toggled" object="%d:2" last_modification_time="Mon, 01 Jan 2007 21:03:49 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="wc_1_BG3">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">BG3</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">True</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_wc_1_BGXX_toggled" object="%d:3" last_modification_time="Mon, 01 Jan 2007 21:03:49 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="wc_1_OBJ">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">OBJ</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">True</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_wc_1_BGXX_toggled" object="%d:4" last_modification_time="Mon, 01 Jan 2007 21:03:49 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<property name="can_focus">True</property>
<property name="label" translatable="yes">BG0</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">True</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_wc_2_BGXX_toggled" object="%d:0" last_modification_time="Mon, 01 Jan 2007 21:03:49 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
@ -1085,16 +1039,17 @@
</child>
<child>
<widget class="GtkDrawingArea" id="wDraw_Main">
<property name="width_request">256</property>
<property name="height_request">192</property>
<property name="events">GDK_EXPOSURE_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
<signal name="configure_event" handler="on_wDrawScreen_configure_event" object="%d:0" last_modification_time="Mon, 05 Feb 2007 00:49:24 GMT"/>
<signal name="expose_event" handler="on_wDrawScreen_expose_event" object="%d:0" last_modification_time="Tue, 02 Jan 2007 10:27:18 GMT"/>
<signal name="button_release_event" handler="on_wDrawScreen_button_release_event" object="%d:0" last_modification_time="Wed, 07 Feb 2007 17:32:00 GMT"/>
<signal name="button_press_event" handler="on_wDrawScreen_button_press_event" object="%d:0" last_modification_time="Wed, 07 Feb 2007 17:32:57 GMT"/>
<signal name="scroll_event" handler="on_wDrawScreen_scroll_event" object="%d:0" last_modification_time="Wed, 07 Feb 2007 19:18:23 GMT"/>
<signal name="motion_notify_event" handler="on_wDrawScreen_motion_notify_event" object="%d:0" last_modification_time="Tue, 02 Jan 2007 10:28:32 GMT"/>
<widget class="GtkCheckButton" id="wc_2_BG1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">BG1</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">True</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_wc_2_BGXX_toggled" object="%d:1" last_modification_time="Mon, 01 Jan 2007 21:03:49 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
@ -1104,8 +1059,57 @@
</child>
<child>
<widget class="GtkVSeparator" id="misc_sep3">
<widget class="GtkCheckButton" id="wc_2_BG2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">BG2</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">True</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_wc_2_BGXX_toggled" object="%d:2" last_modification_time="Mon, 01 Jan 2007 21:03:49 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="wc_2_BG3">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">BG3</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">True</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_wc_2_BGXX_toggled" object="%d:3" last_modification_time="Mon, 01 Jan 2007 21:03:49 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="wc_2_OBJ">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">OBJ</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">True</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_wc_2_BGXX_toggled" object="%d:4" last_modification_time="Mon, 01 Jan 2007 21:03:49 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
@ -1115,9 +1119,142 @@
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkVBox" id="wvb_1_Main">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkCheckButton" id="wc_1_BG0">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">BG0</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">True</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_wc_1_BGXX_toggled" object="%d:0" last_modification_time="Mon, 01 Jan 2007 21:03:49 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="wc_1_BG1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">BG1</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">True</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_wc_1_BGXX_toggled" object="%d:1" last_modification_time="Mon, 01 Jan 2007 21:03:49 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="wc_1_BG2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">BG2</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">True</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_wc_1_BGXX_toggled" object="%d:2" last_modification_time="Mon, 01 Jan 2007 21:03:49 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="wc_1_BG3">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">BG3</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">True</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_wc_1_BGXX_toggled" object="%d:3" last_modification_time="Mon, 01 Jan 2007 21:03:49 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="wc_1_OBJ">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">OBJ</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">True</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_wc_1_BGXX_toggled" object="%d:4" last_modification_time="Mon, 01 Jan 2007 21:03:49 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
<property name="top_attach">0</property>
<property name="bottom_attach">1</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkVSeparator" id="misc_sep3">
<property name="visible">True</property>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">0</property>
<property name="bottom_attach">1</property>
<property name="x_options"></property>
<property name="y_options">fill</property>
</packing>
</child>
@ -1126,154 +1263,12 @@
<property name="visible">True</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="whb_Sub">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkVBox" id="wvb_2_Sub">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkCheckButton" id="wc_2_BG0">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">BG0</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">True</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_wc_2_BGXX_toggled" object="%d:0" last_modification_time="Mon, 01 Jan 2007 21:03:49 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="wc_2_BG1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">BG1</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">True</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_wc_2_BGXX_toggled" object="%d:1" last_modification_time="Mon, 01 Jan 2007 21:03:49 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="wc_2_BG2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">BG2</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">True</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_wc_2_BGXX_toggled" object="%d:2" last_modification_time="Mon, 01 Jan 2007 21:03:49 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="wc_2_BG3">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">BG3</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">True</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_wc_2_BGXX_toggled" object="%d:3" last_modification_time="Mon, 01 Jan 2007 21:03:49 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="wc_2_OBJ">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">OBJ</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">True</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_wc_2_BGXX_toggled" object="%d:4" last_modification_time="Mon, 01 Jan 2007 21:03:49 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkDrawingArea" id="wDraw_Sub">
<property name="width_request">256</property>
<property name="height_request">192</property>
<property name="events">GDK_EXPOSURE_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
<signal name="configure_event" handler="on_wDrawScreen_configure_event" object="%d:1" last_modification_time="Mon, 05 Feb 2007 00:49:24 GMT"/>
<signal name="expose_event" handler="on_wDrawScreen_expose_event" object="%d:1" last_modification_time="Tue, 02 Jan 2007 10:27:18 GMT"/>
<signal name="button_release_event" handler="on_wDrawScreen_button_release_event" object="%d:1" last_modification_time="Wed, 07 Feb 2007 17:32:00 GMT"/>
<signal name="button_press_event" handler="on_wDrawScreen_button_press_event" object="%d:1" last_modification_time="Wed, 07 Feb 2007 17:32:57 GMT"/>
<signal name="scroll_event" handler="on_wDrawScreen_scroll_event" object="%d:1" last_modification_time="Wed, 07 Feb 2007 19:18:23 GMT"/>
<signal name="motion_notify_event" handler="on_wDrawScreen_motion_notify_event" object="%d:1" last_modification_time="Tue, 02 Jan 2007 10:28:32 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
</widget>
@ -2214,110 +2209,5 @@
</widget>
</child>
</widget>
<!--
<widget class="GtkMenu" id="wPopMenu">
<child>
<widget class="GtkImageMenuItem" id="pop_pause">
<property name="visible">True</property>
<property name="label">gtk-media-pause</property>
<property name="use_stock">True</property>
<signal name="activate" handler="on_pop_pause_activate" last_modification_time="Wed, 07 Feb 2007 17:29:36 GMT"/>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="pop_rightscreen">
<property name="visible">True</property>
<property name="label" translatable="yes">Right Screen</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_pop_rightscreen_activate" last_modification_time="Wed, 07 Feb 2007 17:35:26 GMT"/>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="pop_true_gap">
<property name="visible">True</property>
<property name="label" translatable="yes">True Gap</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_pop_true_gap_activate" last_modification_time="Wed, 07 Feb 2007 17:35:26 GMT"/>
</widget>
</child>
<child>
<widget class="GtkSeparatorMenuItem" id="séparateur2">
<property name="visible">True</property>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="pop_rotate0">
<property name="visible">True</property>
<property name="label" translatable="yes">Rotate 0</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_pop_rotate0_activate" last_modification_time="Wed, 07 Feb 2007 17:29:36 GMT"/>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="pop_rotate1">
<property name="visible">True</property>
<property name="label" translatable="yes">Rotate 90</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_pop_rotate1_activate" last_modification_time="Wed, 07 Feb 2007 17:29:36 GMT"/>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="pop_rotate2">
<property name="visible">True</property>
<property name="label" translatable="yes">Rotate 180</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_pop_rotate2_activate" last_modification_time="Wed, 07 Feb 2007 17:29:36 GMT"/>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="pop_rotate3">
<property name="visible">True</property>
<property name="label" translatable="yes">Rotate 270</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_pop_rotate3_activate" last_modification_time="Wed, 07 Feb 2007 17:29:36 GMT"/>
</widget>
</child>
<child>
<widget class="GtkSeparatorMenuItem" id="séparateur3">
<property name="visible">True</property>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="pop_zoom100">
<property name="visible">True</property>
<property name="label">gtk-zoom-100</property>
<property name="use_stock">True</property>
<signal name="activate" handler="on_pop_zoom100_activate" last_modification_time="Wed, 07 Feb 2007 17:29:36 GMT"/>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="pop_zoom_in">
<property name="visible">True</property>
<property name="label">gtk-zoom-in</property>
<property name="use_stock">True</property>
<signal name="activate" handler="on_pop_zoom_in_activate" last_modification_time="Wed, 07 Feb 2007 17:29:36 GMT"/>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="pop_zoom_out">
<property name="visible">True</property>
<property name="label">gtk-zoom-out</property>
<property name="use_stock">True</property>
<signal name="activate" handler="on_pop_zoom_out_activate" last_modification_time="Wed, 07 Feb 2007 17:29:36 GMT"/>
</widget>
</child>
</widget>
-->
</glade-interface>

View File

@ -49,7 +49,37 @@
#include <glade/glade.h>
#include <glade/glade-xml.h>
#define dyn_CAST(type,var) (*((type*)(&var)))
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"