X and MS .Net

billh zephod@drizzle.com
Mon Oct 9 17:06:00 GMT 2006


Hi,
    There is quite a lot of difference between displaying a client in 
your C# code and embedding an X server in it!  Displaying clients in 
other programs actually has some history in X.org in the Broadway 
extension to the X server.  Basically this is an extension that gives 
you some of the hooks you need to be able to take the native window 
handle of a window in another Windows or Mac application and use it in 
the X server as a client X window handle.  When I worked for WRQ, I 
implemented this feature for their Broadway extension.

    Any effort to do the other project, porting the whole X server code 
base to another language, is an enormous project if your goal is to 
obtain the same levels of performance and reliability.  Generally it 
takes a team of 3 or 4 almost a year to add a DDX layer to support a new 
graphics hardware device, much less port the DIX layers below that.

    Doing something along the lines of the Broadway extension is much 
cleaner, as long as you can run a standard X Server on its own, either 
on your device as another process or even on a separate machine.  The X 
client is the only process that will absolutely need to run on the 
device that owns the window you want to display in.

    One hint though if you go this route.  Find a copy of the ICCCM and 
make sure that the environment that hosts your X Client conforms to any 
pertinent parts of this document.  It is the document that describes how 
X Window Managers are supposed to behave.  Your X Client host will have 
to act like a window manager to the extent that the client is dependent 
on the behavior of window managers to display correctly.

Bill

Asmodehn Shade wrote:

> Hi,
>
> Thanks for the quick reply ;-)
>
> Well my program will not be entirely C# I guess as I dont plan to
> rewrite everything ;-)
>
> The goal is just to display a remote X client inside a .Net GUI... I m
> just looking for the best place to plug my code, so I dont have to
> reinvent the wheel once more :-p
>
> Thanks for the tip, but as I havent read the doc yet, can you give me
> a quick description about what a DDX is ??
> ;-)
>
> I will read the doc soon enough
>
> Thanks a lot !
>
>
> 2006/10/8, James Supancic <arrummzen@gmail.com>:
>
>> On 10/8/06, Asmodehn Shade <asmodehn@gmail.com> wrote:
>> > However, I now have to, somehow, embed a Xserver inside a .Net/C#
>> > application for my work... and I am wondering how I should do that. I
>> > just feel like a cat with a mouse bigger than him ;)
>> > Has anyone an idea or just a clue about this ? I just fetched the
>> > source, and I am browsing it now...
>> > If on the way there are stuff you need help with, that may be related
>> > to it, just let me know ;-)
>>
>> Are you sure there is no way around this? Why exactly do you want to
>> do this? The Xorg reference implementation is written in unmanned C.
>> There are DDXs that operate like that, but they are integrated with
>> the X server and written in C. If your program doesn't have to be
>> entirely .NET/C#, you *might* be able to use C# to implement the DDX
>> (or at least part of it)....
>>
>> > Sorry if this kind of question has already been asked, but I found
>> > nothing about it, neither with google, or mailing lists... ( by the
>> > way is there a subscription scheme to those ? )
>>
>> I think the NoMachine NX client is an Xorg DDX based upon the Xnest
>> DDX. I don't think they used C#, but they did build an application
>> around an X server, you might look into how they did it.
>>
>> If you can't use any unmanned code, you can will either have to write
>> a translator to convert the C in Xorg code to C#, find some other X
>> server you can use (I am not aware of any free X servers other than
>> Xorg) or implement a new X server from scratch.
>>
>> Thank you for your time,
>> James Steven Supancic III
>>
>
> -- 
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:       http://cygwin.com/problems.html
> Documentation:         http://x.cygwin.com/docs/
> FAQ:                   http://x.cygwin.com/docs/faq/
>
>

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/



More information about the Cygwin-xfree mailing list