We need to handle a mouse that is not absolute positioned (the default it
seems) and this does that (crudely for the moment until we have some sort
of grab management).
Additionally, click events are propagated to the Qemu instance as well.
We don't want to go through get_bytestring() as this is a bit cleaner as
to ensure we're holding onto references for the rest of the function
lifetime. Otherwise, completing the operation could cause our parameters
to be released (at least theoretically).
We don't need to do this manually now that we have GtkPicture working
correctly with content-fit. We still want to maintain our own widget to
manage things like grabs and all that though.
This adds MksCairoFramebuffer which does tessellation to get damage regions
for the framebuffer. Still some bugs involved, but good enough to get some
bits on the screen which is what I'm looking for right now.
Because the other side is doing AUTHENTICATION_SERVER, which really it
has no business doing any flags, we have to connect asynchronously or we'd
block because it doesn't yet have our FD to communicate with.
So connect asynchronously, return our FD, and then process from there.
This is somewhat annoying because it means you can't connect your
object until the otherside already sees our connection. We delay message
processing to help with that though.
The goal here is to keep the MksPaintableListener inside of MksPaintable
so that we don't have to create API between the two. Additionally, the
MksPaintable can own it's own G-DBus connection as we don't want to share
them for updates with anything else (as they can have large data chunks
coming across).
This is intended to be the software fallback path where we have to take
Update() and Scanout() method invocations from the Qemu instance. It
implements paintable and tries to reuse a backing texture until a threshold
has been met at which point it does a full redraw.
The backing texture is reused between snapshots to increase the chance that
we may skip a followup VRAM upload to the GPU. The damage rectangles will
be re-uploaded each frame. There is some opportunity to optimize that
last part by keeping them around and adding a secondary damage region.
Of course, we would still want things to go the MksDmabufTexture path
when possible.
This is ultimately going to give us back a paintable, but it's only in
partial state right now. We need to figure out the right semantics for
ownership between the listener/paintable/screen/etc.
We may want the widget to be the owner of everything (and keep the
painable/listener internal API) which is likely the most convenient from
an object ownership standpoint.
This is an org.qemu.Listener using the gdbus-codegen generated skeleton as
the parent type.
What will probably happen here, is that we create a MksPaintable which is
given to the listener to call internal API upon.
The paintable code will be a bit more complex than originally anticipated
in that we are going to need to do our own tessellation so that we get
damage regions which are not the whole widget. Very similar to what I did
in the GdkMacosTile for gdk/macos/.
MksScreenAttributes is an opaque type with setters so that we can
potentially extend it in the future without ABI issues.
Furthermore, this adds a configure API for both sync and async to
MksScreen.
Currently, I get NOT_SUPPORTED back from Qemu, but I think that's because
I'm not even past the bootloader/EFI stage for tests.
We want to use the vfunc of the class to implement devices coming from a
Qemu object on D-Bus, but we don't want to expose that in public API.
Instead, we can keep the object instance and class internal but still
expose the subclasses as public API. We have to do old-style class
definitions to do that, but worth the ability to keep public API limited
so that we can make changes later.
This uses the object manager object instead of the proxy directly to
create the MksScreen instances.
We might want to move the object initialization to MksDevice since it
is likely to be copied across a number of device types.
This changes things to use the object manager to discover the VM instance.
We'll have to add support for other wrappers to use object managers so that
they can be added to the devices list as they are seen.
Adds MksKeyboard and MksMouse types. Setup a MksScreenKind for the
MksScreen based on MksQemuConsole:type property. Currently the keyboard
and mouse are not wired up, but here for scoping out the properties.