GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Fri Aug 29, 2014 6:05 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: How to send an external signal to a GTK+ gui app
PostPosted: Sun Oct 14, 2012 8:13 am 
Offline

Joined: Sun Oct 14, 2012 8:02 am
Posts: 1
I am writing a GTK gui, I would like to be able to send a signal from a damon process to this GTK gui, The damon process checks if a program is running, I want this damon process to update the gui, if the program is running or not, what is the best method to do this.

regards


Top
 Profile  
 
 Post subject: Re: How to send an external signal to a GTK+ gui app
PostPosted: Sun Oct 14, 2012 10:14 am 
Offline
Never Seen the Sunlight

Joined: Wed Jul 23, 2008 10:31 am
Posts: 2406
Location: Slovenia
Hello and welcome to the GTK+ forums!

I think that signals are too rudimentary form of IPC to be usable when it comes to apps written in GTK+. Can you use something else (like sockets, FIFOs, maybe even DBus)? All of these forms are directly supported by GLib in one form or another and can be even integrated into main loop for automatic pooling.

Cheers,
Tadej


Top
 Profile  
 
 Post subject: Re: How to send an external signal to a GTK+ gui app
PostPosted: Wed Oct 24, 2012 4:16 am 
Offline

Joined: Thu Jul 19, 2012 8:02 am
Posts: 3
if you implement keyboard shortcuts, you can use a shell script with xdotool or if you want to use C, xdotool has a library that you can use. If its too complicated for keys, you use gio to watch a file for changes.
http://developer.gnome.org/gio/2.32/GFileMonitor.html
This will also help prevent the daemon process from acting at an inopportune time


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group