nanogui: Thread: Using Gd* functions in NanoX app


[<<] [<] Page 1 of 1 [>] [>>]
Subject: Using Gd* functions in NanoX app
From: Leonid Romanov ####@####.####
Date: 17 Jan 2002 16:07:18 -0000
Message-Id: <1011283433.22078.9.camel@mars>

Hi!
Is it safe (right) to use Gd* functions in NanoX application or should I
stick to Gr* ones, introducing new Gr* functions in proper way if
necessary? If so, then why?

Thanks. 



Subject: Re: [nanogui] Using Gd* functions in NanoX app
From: Jordan Crouse ####@####.####
Date: 17 Jan 2002 16:27:05 -0000
Message-Id: <E16RFKn-0005mF-00@ns.censoft.com>

If you recall from reading the architecture document, Microwindows is 
comprised of three layers:  the drivers, the engine and the API(s).  The Gd* 
functions that you discuss are part of the Microwindows engine, and are used 
by the two API layers to actually make things work.   The Gr* functions are 
the actual nano-X API calls suitable for calling in client applications.  You 
should only use Gr* functions in client applications (even if you link the 
client with the server).
 
As you decide to add new client entry points, remember that small size is the 
cornerstone of Microwindows.  We don't want to go around adding a whole lot 
of stuff just because we can.  This especially goes for the server - since 
every line of code adds to the size of the binary.  Its a little easier to 
get away with new client functions, because you have a little more control 
over wether or not they are included.

So, here are a few handy questions to ask your self:

1.  Can what I want be accomplished with several server calls?  For example, 
there is an X function called XResizeAndMove().  Instead of implementing 
something similar in Nano-X, just use a GrResizeWindow() followed by a 
GrMoveWindow().

2.  Can what I want be accomplished with just a client call?   If there is 
special conversion you want done, can it be accomplished with a client call 
instead of a server call?  For example, see the functions in 
src/nanox/nxutil.c and src/nanox/nxdraw.c - These are functions that only use 
existing server functions.  

3.  If you feel it is absolutely necessary to implement a Gr* server call, 
then write up a quick description and send it to the list.  We might be able 
to figure out a way to do it without adding new server calls, or, we may have 
already implemented it.

Happy hacking,
Jordan

On Thursday 17 January 2002 09:03, Leonid Romanov mentioned:
> Hi!
> Is it safe (right) to use Gd* functions in NanoX application or should I
> stick to Gr* ones, introducing new Gr* functions in proper way if
> necessary? If so, then why?
>
> Thanks.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.