dotgnu-pnet
[Top][All Lists]
Advanced

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

Re: [Pnet-developers] Question about pnetc access to Xwindows


From: James Michael DuPont
Subject: Re: [Pnet-developers] Question about pnetc access to Xwindows
Date: Sun, 21 Nov 2004 00:25:19 -0800 (PST)

--- Rhys Weatherley <address@hidden> wrote:

> Changing an error into a warning is not a fix.  The real fix would be
> to 
> modify "BinarySem", "RelationalSem", and other similar functions in 
> "c_oper.tc" to mark the output of an operator as a dynamic constant
> if either 
> operand is a dynamic constant and the other is a normal or dynamic
> constant.  
> A potential change will be needed wherever "ILNode_EvalConst" is
> called in 
> that file (there are a lot of affected operators).  Please try again
> (and 
> yes, I'm asking you to attempt this).

Thats fine, I am prepared to do the needed patching and help out as I
can. 


> <ModuleExtern> is a directive to the linker to find the C function in
> any 
> properly-marked module.  It should "just work" with the straight
> pinvoke 
> declaration if you have marked "libXsharp" properly.  Which in this
> case, you 
> haven't.  The file "pnet/doc/c_language_abi.html" describes all the
> marker 
> attributes that you will need.
> 
> Rather than mess with raw IL, I suggest that you use the pnetC
> compiler to 
> generate the pinvoke library layer.  Create a .c file with
> declarations such 
> as follows:
> 
>     extern Display *XOpenDisplay(const char *display)
>         __attribute__((__pinvoke__("X11"), __cdecl__));
> 
> Then compile that into dll library form using the pnetC compiler. 
> The result 
> should have all of the proper markings to link correctly.

Ahhh, that is much easier! thanks.

> As I indicated, you won't get access to Winforms controls this way. 
> But if 
> your app is bare X, then it may work.  But only on X11 systems.

Great. My plan is to be able to get it running, and then package it in
such a way that it will be able to draw in some control, a graph
control. 

The current implementation has plugins for xwindows and for postscript
output. The horrible xvcg gui is part of that as well. 

The code can be refactored to send generic drawing events to a WinForms
control, maybe via some callback system. I need to look into the
details.


Thanks for your advice,

mike

=====
James Michael DuPont
http://introspector.sourceforge.net/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]