Re: Pixmap Problem
- From: Pablo Mejia <pjm cctechnol com>
- To: gtk-list redhat com
- Subject: Re: Pixmap Problem
- Date: 27 Aug 1999 17:34:12 -0500
>>>>> "Jiang" == Jiang XU <jiang.xu@echostar.com> writes:
Jiang> Actually, what I am trying to do is let the different
Jiang> process (running at the same time) shared pixmap. Which
Jiang> means, one application create a GdkPixmap and pass the
Jiang> address of it to another application, so the other
Jiang> application can use that GdkPixmap.
Jiang> I can successfully pass the address to different
Jiang> application, but other application who do not create that
Jiang> GdkPixmap can not use that. So I wonder, whehter there is
Jiang> osme way to do that?
If I understand you correctly, you want an application to provide
pixmap caching for other apps. For a single xpm you want all your
apps to use a single pixmap. It is important to note that the
GdkPixmap doesn't have the image data, so sharing that is not really
important. The _server_ side pixmap is what needs to be shared as it
has the actual image data.
I really doubt gtk allows you to share gtk/gdk objects between
processes via shared memory. This is roughly equivalent to using
threads in a single gtk/gdk application and raises all the same
locking issues. So I don't think you are going to make this work by
trying to share the GdkPixmap.
I would get the XID of the GdkPixmap and try to build a new GdkPixmap
from that XID. The actual _server_ side object will be the same. I
don't know how to get gdk to make a GdkPixmap from an XID, but you
could ask around. I think it will take some gdk hacking though as you
basically need a gdk_pixmap_create_from_xid() function.
You _might_ run into problems with this approach as well if gdk is
using the shared memory extension to deal with pixmaps.
Pablo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]