This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: (#pragma data-seg) equivalent in Linux ...


comp sci wrote:
Iam really not sure , but I think this is a
normal memory shared among multiple processes.In QT
based application(porting from MFC based app) this is
used in the following way:
I have a main window in which I register my
window handle (save the self referencing pointer) in a
shared variable.Later Iam starting a new window(sort
of plugin) using execl and I want this plugin to
register itself to the main window using the already
stored main window handle in shared variable.
In Windows this scenerio is implemented using
pragma

Ah. Linux (like Unix) uses functions, not pragmas, to set up shared memory segments. See e.g. the mmap() function. But shared memory is not used terribly often for communicating between GUI apps; there are other options.

The other options range from simple to mind-bogglingly complex.
It might be best to discuss this on the qt user's mailing list.

If you want the ugly details:
Qt itself uses X's  Inter-Client Exchange (ICE) Protocol
(via X's Session Management functions) to implement QSessionManager;
ICE is documented e.g. at http://nscp.upenn.edu/aix4.3html/x11/specs/pdf/ICElib.pdf
but may be too complicated for the average app.
Another document covering how X applications should communicate
(e.g. for cut and paste) is http://tronche.com/gui/x/icccm/
- Dan
--
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045


------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]