[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] HELP: XputImage on window in eclipse (Linux)

Hi All:

I am writing a plugin to eclipse on Linux which would take the "handle" created by Eclipse swt on Linux and use that handle to put image for my application using another C++ library. So, the code is a JNI code which uses the handle:

Here is what I have done to extract the window from the "handle" (which is defined in org.eclipse.swt.widgets.Widget):

Window SetHostHandle(handle) {
   GtkWidget *widget = (GtkWidget *)handle;
   myWindow = widget->window;
   window = GDK_WINDOW_XWINDOW(myWindow);
   return window;
}

Then I create my image using XCreateImage and put the created impage on
to the window by calling


XPutImage (display, window, draw, ximage, targetX, targeyY, targetX, targetY, ximgae->width, ximage->height);

However, nothing comes on the window where the eclipse launches my plugin.

The window is suppose to come in the area that plugin would have created for this image. But nothing comes on the screen (within my plugin) nor does that crash.

I am unable to get a clue as to whats going wrong.

Can someone help please and show me some direction?

Thanks a lot!
Regards
Prakash