[ gpsdrive ] gpsDrive as library ?

Jim Gruen jgruen at gmail.com
Thu Jan 17 04:15:00 AKST 2008


On Jan 16, 2008, at 10:35 AM, Joerg Ostertag (gpsdrive Munich/Germany)  
wrote:
> The patch is in SVN HEAD
>
> But don't ask me how to use it ....

Is this referring to my "embedding" patch I posted a little over a  
week ago?  If so, I haven't seen it applied in SVN, but I have  
included an updated patch attached to this email.

Basically, this adds an extra command-line option '-m' that takes an  
additional argument of 0, 1, or 2 (this is the new part).  0 is the  
default, normal behavior.  1 and 2 make GpsDrive embeddable into  
another GTK application.  The only difference here is that if you use  
'-m 2', then you cannot use the Quit command from the menu to quit,  
nor does GpsDrive quit when the window containing the embedded  
GpsDrive disappears (the reason for this?  I had some trouble with  
GpsDrive exiting when I hid my GpsDrive window; apparently a GTK  
"destroy" signal was being sent to the GpsDrive application somehow).   
Of course, you can still kill GpsDrive by sending a SIGTERM or SIGKILL  
to the process itself.

So how to use this when you specify '-m 1' or '-m 2'?  When you do  
this, the main GUI window will not immediately appear; rather, the X  
window ID of GpsDrive will be printed to standard output.  In the  
application you want GpsDrive to appear in, you will use a GTK  
"Socket" container where you want GpsDrive to appear.  Simply pass the  
Socket the ID that was printed to standard output, and GpsDrive should  
appear in your target application.

Cheers,
-Jim

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gpsdrive_embed_v3.diff
Type: application/octet-stream
Size: 4883 bytes
Desc: not available
Url : http://lists.gpsdrivers.org/pipermail/gpsdrive/attachments/20080117/8d238dd8/attachment.obj 
-------------- next part --------------



--
Jim Gruen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
Url : http://lists.gpsdrivers.org/pipermail/gpsdrive/attachments/20080117/8d238dd8/attachment.bin 


More information about the GPSdrive mailing list