On Wed, 2010-03-31 at 14:44 +0200, Gerd Hoffmann wrote: > > struct SpiceImplementation { > > SpiceBaseInterface *interface; > > }; > > > > struct SpiceKeyboard { > > SpiceImplementation parent; > > }; > > Those two are pretty simliar to SpiceInterfaceState and SpiceKbdState. > > > struct KeyboardInterface { > > SpiceBaseInterface base; > > > > void (*push_scan_freg)(SpiceKeyboard *keyboard, uint8_t frag); > > uint8_t (*get_leds)(SpiceKeyboard *keyboard); > > }; > > I've considered something simliar, but decided to *not* do this. > > I don't want to make the SpiceKbdState struct layout part of the > library > interface, so we can easily extend it as needed without breaking the > ABI.
I don't mean that SpiceKeyboard is the same as SpiceKbdState, i mean for it to be exactly the struct above. Its just useful to get a pointer to the interface from the instance. There would still be a separate spice-side state object like SpiceKbdState. And if we want to be able to pair the two we could return it from spice_server_add() just like in your proposal. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Alexander Larsson Red Hat, Inc al...@redhat.com alexander.lars...@gmail.com He's a one-legged native American barbarian on a search for his missing sister. She's a supernatural wisecracking barmaid with the power to bend men's minds. They fight crime! _______________________________________________ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel