Re: Many questions



Am Sat, 05 Mar 2011 01:58:06 -0500
schrieb Jacques Pelletier <jpelletier ieee org>:

Hi everybody,
good morning,

I have several questions:

1) How do we use the GThreadedSocketService and how do we specify the
function to run when the connection is established?

I'm using these function in a GUI application (see protocoltool on 
sourceforge); when the connection is made/closed, the GUI's controls
are enabled/disabled.

2) Can an application load a linux kernel module? For example, my
application may need i2c drivers. Does glib/gtk/gnome have anything
to load kernel modules? How can it be done?
yes they can. The program modprobe does this. I just did a strace of
modprobe when it load a module and discovered "init_module"
manpage: http://linux.die.net/man/2/init_module
Perhaps you read the source code of modprobe for more details.


3) Now, for unrelated questions, what are the hook functions used
for? They look interesting, but being an amateur programmer, I have
no idea of the context where they may be used. Are they useful in an
user application?
They are a sort of callback functions. A nice example are 
gtk_about_dialog_set_email_hook
gtk_about_dialog_set_url_hook

The hook functions get called called when the user press the email or
url link in the about dialog. Then in the hook function you can open
another program e.g. browser or emailclient.

hth
Alex

4) How do we properly use the g_cancellable functions and when are
these used? Are they useful in an user application?

Thanks!

JP

Note: please reply to this mailing list for convenience of other
users. 


_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



-- 

Alexander Nagel
E-mail: alexander acwn de
Homepage: 
http://www.acwn.de/
http://www.standspur-kadaver.de/



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