Re: gtk_init outside main



>I am writing plugins for a proprietary CAD-program (Pro/Engineer).
>The target platforms currently are HP UX, SGI IRIX, IBM AIX and Windows NT.
>Existing code (not from me) is written in C using TCL scripts for GUIs that 
>cannot be generated with the API of the CAD-program, which only provides 
>menus and simple text input/output for user interaction.
>Communication with the TCL-scripts is done with temporary files (sigh).
>
>As I want to get rid of this TCL-stuff, I decided to use GTK as a replacement.
>Pro/Engineer gives you the choice to write your plugins as standalone 
>programs ("exe"s) or dynamic libraries ("dll"s). As EXEs communicate with 
>ProE via RPC, we'd prefer to make DLLs (where the functions are called 
>directly) for better performance.

you *probably* can't do this. does ProE have its own GUI? if so, it
has a connection to the X server already.

its very difficult to have multiple connections to the same X server
within a single address space unless the program is written very
carefully and with this idea fully in mind. i doubt that ProE was
written this way. since it almost certainly does not use GTK, that
means that *its* X server connection is conflicting with the one your
plugin is creating. probably. likely. perhaps.

we've faced this issue and stared it down over the linux-audio-dev
list, where we'd like to have hosts that load plugins that come with
their own GUI but without telling the plugin author that it has to be
written using a specific toolkit. you can't do that without some gross
hacks, and by gross, i mean really really gross. so we've had to
be happy with designs that use some kind of RPC.

--p



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