Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > GTK newbie help on G_CALLBACK

Reply
Thread Tools

GTK newbie help on G_CALLBACK

 
 
bnrj.rudra@gmail.com
Guest
Posts: n/a
 
      05-06-2012
Dear Friends,
This is a question on GTK, but failed to find a forum on that. Since GTK is based on C, posting here with fingers crossed.
I have taken a project (my own, not homework) to develop a table. I
generally work with fortran, dont know C that much.
What I want is a gtk clist to pop up when I press a button, via
callback. The button widget in my code is


/* Create first button */
button = gtk_button_new_with_label ("B1");

/* When the button is clicked, we call the "callback" function
* with a pointer to "button 1" as its argument */
g_signal_connect (button, "clicked",
G_CALLBACK (callback), (gpointer) "B1");


/* Insert button 1 into the upper left quadrant of the table */
gtk_table_attach_defaults (GTK_TABLE (table), button, 0, 1, 0, 1);

gtk_widget_show (button);
The definations are mostly based on
http://developer.gnome.org/gtk-tutorial/2.24/x344.html

What I want to do is callback to execute another gtk file(a clist),
rather than what shown in the example

Code:
static void callback( GtkWidget *widget,
gpointer data ) {
g_print ("Hello again - %s was pressed\n", (gchar *) data);
}
Can you please show me how I can get this?
 
Reply With Quote
 
 
 
 
Jens Thoms Toerring
Guest
Posts: n/a
 
      05-06-2012
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> Dear Friends,
> This is a question on GTK, but failed to find a forum on that.


What about all the mailing lists about GTK+ you find at

http://www.gtk.org/mailing-lists.php

There also seem to be some fora but I have no idea how
good they are (and e.g. www.gtkforums.com seems to suffer
from a massive attack by spammers at the moment).

> Since GTK is based on C, posting here with fingers crossed.


No luck This is all about how to use a certain library out
of probably millions written in C. You will need people with
knowledge about this specific library (beside C) to solve your
problem so I guess you will really be better off if you ask
in a place where discussions about GTK+ is the main topic.

Regards, Jens
--
\ Jens Thoms Toerring ___ (E-Mail Removed)
\__________________________ http://toerring.de
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ruby GTK Fortune Cookies (gtk-fortune-0.1.1) Alex Shulgin Ruby 1 11-21-2007 01:05 AM
GTK+, segmentation fault in gtK-editable_get_chars zombek@gmail.com C Programming 2 05-29-2007 03:27 PM
compiling ruby under windows (+ gtk stuff, is the gtk list dead?) Gergely Kontra Ruby 2 06-18-2004 10:20 PM
[newbie] GTK+/QT/Tkinter ? Alexandre Rogers Python 4 11-08-2003 11:02 AM
GTK help ads Python 1 09-17-2003 09:23 AM



Advertisments