hyprland/ipc: expose Hyprland toplevels

This commit is contained in:
Maeeen 2025-06-20 04:09:37 -07:00 committed by outfoxxed
parent c115df8d34
commit 362c8e1b69
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E
11 changed files with 685 additions and 43 deletions

View file

@ -28,6 +28,13 @@ HyprlandIpcQml::HyprlandIpcQml() {
this,
&HyprlandIpcQml::focusedMonitorChanged
);
QObject::connect(
instance,
&HyprlandIpc::activeToplevelChanged,
this,
&HyprlandIpcQml::activeToplevelChanged
);
}
void HyprlandIpcQml::dispatch(const QString& request) {
@ -51,6 +58,10 @@ QBindable<HyprlandWorkspace*> HyprlandIpcQml::bindableFocusedWorkspace() {
return HyprlandIpc::instance()->bindableFocusedWorkspace();
}
QBindable<HyprlandToplevel*> HyprlandIpcQml::bindableActiveToplevel() {
return HyprlandIpc::instance()->bindableActiveToplevel();
}
ObjectModel<HyprlandMonitor>* HyprlandIpcQml::monitors() {
return HyprlandIpc::instance()->monitors();
}
@ -59,4 +70,8 @@ ObjectModel<HyprlandWorkspace>* HyprlandIpcQml::workspaces() {
return HyprlandIpc::instance()->workspaces();
}
ObjectModel<HyprlandToplevel>* HyprlandIpcQml::toplevels() {
return HyprlandIpc::instance()->toplevels();
}
} // namespace qs::hyprland::ipc