xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.

Changes between Initial Version and Version 1 of ClientPortingGuide

01/24/14 12:04:03 (8 years ago)
Antoine Martin



  • ClientPortingGuide

    v1 v1  
     1{{{#!div class="box"
     2= Client Porting Guide =
     5The best way to port xpra to new language or toolkit is to look at the [/wiki/Clients existing clients] and use one of them as a template.
     8{{{#!div class="box"
     9== Basics ==
     11At the very least you will need:
     12* a network layer capable of sending and receiving packets in the xpra protocol format. The network level packet is very simple: an 8 byte header which includes the packet size is followed by the packet data itself, the data is encoded using a bencoder-like format (the only notable difference is that unlike most other implementations, the dictionary keys are not in a specific order). Or optionally using [https://code.google.com/p/rencode/ rencode].
     13* a window implementation representing a server-side window, usually supporting controls like minimize/maximize/close
     14* the ability to update the content of this window with {{{RGB}}} pixel data
     15* the code should send a {{{hello}}} packet to the server and wait for the {{{hello}}} it sends back
     16* you must respond to {{{ping}}} packets to prevent automatic disconnection
     19{{{#!div class="box"
     20== Interactive ==
     22These are the things you will need to implement in order to be able to interact with your new client beyond just showing the windows:
     24* providing a keymap to the server so keyboard input works
     25* sending mouse events: mouse movements and clicks
     26* sending window focus changes
     27* window position changes, etc