Re: bool Gdk::Event::send_client_message(GdkNativeWindow winid) and others

Hi Benjamin.

At first I strongly advise *anybody* to read the gtk+ API documentation in parallel
to the gtkmm documentation because it can really help you understand what's
going on, in many many many many cases. You can find it at

Now let's go on: A GdkNativeWindow is a data type of gdk, not gdkmm. It hides
the lower level (native) type from you, which would be an X window if you're
running X (e.g. on Linux) or a HWND if you are running M$-Windows (your case).

Takeing a look at gdk_event_send_client_message and the others around, I'd say
it should work on M$-Windows as well, but best would be to try it out on your

Now for the Gdk::Display... The gtkmm documentation does not explain what it
is. Once again we visit the gtk web site.
A Gdk::Display would be a GdkDisplay in gtk+'s way of naming the world. And
here we are: "The GdkDisplay struct is the GDK representation of an X display.
All its fields are private and should not be accessed directly."

You'd pass the data in the data field (a union) of the GdkEventClient struct.

About IPC in general: Ask google. Lots of clever people have thought up lots
of more or less different ways to properly communicate between processes. But
be aware, that this topic is OS specific and for a crossplatform approach you'll
again need an additional abstraction layer (like gtk above X or M$-Windows).

Maybe the Glib namespace has some goodies for you. They have some threading
stuff at least, which tends for the same direction IMHO.

Best regards,


>Just a few question about the above function. Firstly, the documentation said
that this function sends an X ClientMessage event to the window represented
by winid, but since I am using the Win32 MinGW port of gtkmm, I am unsure whether
this function would work.
>Next, the documentation said to pass in a GdkNativeWindow winid. What is GdkNativeWindow?
I can't seem to find it's documentation, and the closest being the one where
it is typedefed to mean also NativeWindow in the Gdk namespace. Also, where
can I obtain this winid?
>Thirdly, the documentation also said that the target window must be on the
default Gdk::Display. What does this mean? What does Gdk::Display represent?

>Fourth, how do I specify the parameters of my event? Is this even possible?
And how would the target application receive my event? Through the event loop?
or do I have to set up a special connection?
>Lastly, if anyone knows a more convenient way to do inter-process communication,
and has a very much more convenient way of having  process locking as compared
to libassa's own (as it seems that libassa's is geard towards networking, whilst
I am writing a home user application), please let me know.
>Thank You
>Benjamin Lau
>P/s If you want to get an idea of what I need, it is actually regarding my
earlier post which involved MDI, IPC and Process Locking. Basically, I am writing
a single-instance MDI application. I have used a notebook to feign the MDI interface,
but am facing problems regarding IPC, so anyone's help on gtkmm-list would be
greatly appreciated :D (THANKS)
> Yahoo! Messenger
>- Log on with your mobile phone!
>gtkmm-list mailing list
>gtkmm-list gnome org

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