s i s t e m a o p e r a c i o n a l m a g n u x l i n u x | ~/ · documentação · suporte · sobre |
Next
Previous
Contents
5. Programming for MGRThe MGR programmers manual, the C language applications interface, is found in the doc directory in troff/nroff form. It covers general concepts, the function/macro calls controlling the server, a sample application, with an index and glossary. Porting client code used with older versions of MGR sometimes requires the substitution of
for
and clients using old-style B_XOR, B_CLEAR, et al instead of
BIT_XOR, BIT_CLR, et al can be accommodated by writing
Compiling client code generally requires compiler options like the following.
One can get some interactive feel for the MGR server functions by
reading and experimenting with the The usual method of inquiring state from the server has the potential of stumbling on a race condition if the client also expects a large volume of event notifications. The problem arises if an (asynchronous) event notification arrives when a (synchronous) inquiry response was expected. If this arises in practice (unusual) then the MGR state inquiry functions would have to be integrated with your event handling loop. The only major drawing function missing from the MGR protocol, it seems, is an area fill for areas other than upright rectangles. There is new code for manipulating the global colormap, as well as (advisory) allocation and freeing of color indices owned by windows. If you are thinking of hacking on the server, you can find the mouse
driver in
Next Previous Contents |