go to www.geomview.org home page
 
Home

Overview
FAQ
Documentation

Download

Mailing List

Geomview For Windows?

Support
Users
Development

Bug Reporting
Contributing
Contact Us

Sponsors

 

Site Search

 

Advanced
Search

 
About the software@geom archive

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

[ REQ 5460]: Documentation for the Geom, Window and other libraries



This is a multi-part message in MIME format.

---------------------------------16344937294444193982131323655
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii

Hello,

	I have just begun using geomview and must say that it is really
remarkable application.  

	I have an application that I have written using HOOPS and would like 
to replace HOOPS with OOGL.  For this I would like to draw into an X11 Window
that I create and manage. The user interface for my application is rather 
complex and has been built using Tcl/Tk.  Is there any documentation or
examples on how to go about binding an X11 window to MG and then drawing into
it using OOGL ?

	I have tried using mgctxset to pass an X window to MG but this doesn't
seem to work.  I have attached the relevant code segment.

	Any help from your part would be appreciated.


Thanks,


Snehanshu Shah

s_shah at kla.com

---------------------------------16344937294444193982131323655
Content-Transfer-Encoding: 7bit
Content-Type: text/plain

#include "mg.h"
#include "mgP.h"
#include "mgx11P.h"
#include "window.h"
#include "windowP.h"
#include "mgx11windows.h"
#include <stdio.h>

static void CreateX11Window( Display **dpy, Window *x11Win )
{
	*dpy = XOpenDisplay( NULL );

	x11Win = XCreateSimpleWindow ( 	*dpy, 
					DefaultRootWindow ( *dpy ),
					0, 0, 50, 50, 
					1, 0, 0 );

	/* XMapWindow( dpy, x11Win ); */

}

main(int argc, char* argv[])
{
 	WnWindow* 	win;
	mgcontext* 	context;
	Window x11Win;
	Display* dpy;

	mgdevice_X11();

	win = WnCreate(	WN_NAME, "hello",
			WN_XSIZE, 600,
			WN_YSIZE, 400,
			WN_ENLARGE, 1, 
			WN_SHRINK, 1, 
			WN_END);

	CreateX11Window( &dpy, &x11Win );

	mgctxset ( 
		   MG_X11DISPLAY, dpy,
		   MG_X11WINID, x11Win,
		   MG_WINDOW, win, 
		   MG_END );

	sleep ( 10 );
}

---------------------------------16344937294444193982131323655--


 
Home | Overview | FAQ | Documentation | Support | Download | Mailing List
Windows? | Development | Bug Reporting | Contributing | Contact Us | Sponsors
 
site hosted by
SourceForge Logo