Commit Graph

13 Commits

Author SHA1 Message Date
Christian Hergert
f5935b38cf lib: handle any potential changes to type 2023-02-17 15:59:48 -08:00
Christian Hergert
ed03ea5148 lib: move PaintableListener into MksPaintable
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).
2023-02-10 16:14:51 -08:00
Christian Hergert
ed27fc97d8 build: fix various GObject Introspection notation 2023-02-10 10:29:29 -08:00
Christian Hergert
629cfd0e28 lib: add mks_screen_attach()
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.
2023-02-09 17:32:00 -08:00
Christian Hergert
9bb71b8ea8 lib: add MksScreenAttributes and mks_screen_configure()
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.
2023-02-09 15:39:03 -08:00
Christian Hergert
0478d202f8 lib: add session weak pointer to devices
This is handy because it gives devices the ability to locate/coordinate
with other subsystems.
2023-02-09 12:54:48 -08:00
Christian Hergert
8898636ac4 lib: add MksScreen:device-address
Can be handy when troubleshooting things, so wrap that too.
2023-02-09 03:21:43 -08:00
Christian Hergert
4d110d5791 lib: make MksDevice classes internal
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.
2023-02-09 02:23:18 -08:00
Christian Hergert
353a6d905d session: create MksScreen from GDBusObject
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.
2023-02-09 01:36:54 -08:00
Christian Hergert
169acba1bc screen: add MksScreen:number property
This correlates to "head" of the D-Bus interface, which makes for a
terribly non-descriptive property name.
2023-02-08 23:26:35 -08:00
Christian Hergert
d16440566b screen: add width and height properties
Keep them up to date when the underlying MksQemuConsole properties are
notified of having changed.
2023-02-08 23:21:06 -08:00
Christian Hergert
12edec8262 screen: add keyboard and mouse properties
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.
2023-02-08 21:58:35 -08:00
Christian Hergert
5d012259d9 initial commit
This library doesn't do much yet. It contains the scaffolding and the
rough shape of what I think the API should be in mks-types.h. Some of the
types have some skeleton implementation as well to hid the D-Bus API
behind those types.

The next steps are to fill out the other wrapper objects and see what
properties we should expose from the underlying D-Bus proxies.

Along with that, will be a GtkWidget which can have a number of properties
set on it to specify the MksScreen, MksKeyboard, and MksMouse devices. It
may make sense to attach the session + screen to the widget, so that it can
adapt to keyboard and mouse changes though.
2023-02-08 18:06:08 -08:00