#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>


struct _datos_toma{
	int valor;
	int a;
	int b;
};


int x, y,z;


GtkWidget *ventana ;
GtkWidget *fondo ;
GtkWidget *toma;
GtkWidget *toma1;
GtkWidget *texto;
GtkWidget *boton ;


/****************************  PROBLEM !!!!    ***************************************************/	

gint  datos( GtkWidget *widget,GdkEvent *event,gpointer *data )

{

	gtk_widget_set_uposition(widget,x,y);
	
	g_print ("el valord de VALOR es =%d \n",data->datos_toma->valor);

return 0;

}

/****************************  PROBLEM !!!!    ***************************************************/	



void f_toma(GtkWidget *Widget ,gpointer  data )
{


struct _datos_toma *datos_toma;

printf (" z= %d \n ",z );
	
	toma = gtk_button_new_with_label ("toma 1");
	gtk_widget_set_uposition(toma,100,100);
  	gtk_fixed_put (GTK_FIXED (fondo), toma, 10, 10);
	gtk_widget_show (toma);
	
	
/****************************  PROBLEM !!!!    ***************************************************/	
	
	gtk_signal_connect (GTK_OBJECT (toma),"button_press_event",GTK_SIGNAL_FUNC (datos),(gpointer)datos_toma );

/****************************  PROBLEM !!!!    ***************************************************/		
	
}




int main(int argc, char *argv[])
{



gtk_init (&argc,&argv);

	ventana = gtk_window_new (GTK_WINDOW_TOPLEVEL);
		gtk_widget_set_usize (ventana, 300, 300);


	fondo = gtk_fixed_new();
		gtk_container_add (GTK_CONTAINER (ventana), fondo);
		gtk_widget_show (fondo);

	
  boton  = gtk_button_new_with_label ("boton a");
		gtk_widget_set_uposition(boton,150,150);
		gtk_fixed_put (GTK_FIXED(fondo),boton,1,1);
		gtk_widget_show(boton);
	 	gtk_signal_connect (GTK_OBJECT(boton),"clicked",GTK_SIGNAL_FUNC(f_toma),fondo);
	
gtk_widget_show(boton);
gtk_widget_show(ventana);
gtk_main();

  return 0;
}
