structures pointers confusion

I am working on a new ICQ client. I am trying to pass some login and password values to a function. 
I am still having problems with this

my code basically looks similar
I have a window with two text boxes and two buttons. one button is a login button. the other is an exit button
the exis button works fine. when i press the login button i want it to take the information typed into the two text
entries and place it in a structure and send the structure over to a callback where i can write the code to actually
log the person into the server. most everything is a callbcak function. the main program simply calls the login screen which
is just a function. 

/* callbacks file */

struct info {
	GtkWidget *UID;
	GtkWIdget *PASS;

gint do_login(GtkWidget *widget, struct info *myInfo) {
	gchar *user,*pass;
	user = gtk_entry_get_text(myInfo->UID);
	pass = gtk_entry_get_text(myInfo->PASS);
	/* print output to screen for now */

void login_screen(void) {
	struct info lgInfo;
	lgInfo.UID = gtk_entry_new();
	lgInfo.PASS = gtk_entry_new();

	gtk_signal_connect(GTK_OBJECT(login_button),"clicked",GTK_SIGNAL_FUNC(do_login), &myInfo );

/* main program */

int main(......) {
	return 0;

any help possible would be greatly appreciated--Delbert Martin IV

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]