panel: Split away panel handling

This reduces ServerContextService to a mere handler of "docked mode" gsetting.
This commit is contained in:
Dorota Czaplejewicz
2022-01-30 19:13:35 +00:00
parent f6724c0948
commit 2eec3372f3
18 changed files with 486 additions and 275 deletions

21
src/panel.h Normal file
View File

@ -0,0 +1,21 @@
#pragma once
#include "eek/layersurface.h"
#include "src/layout.h"
#include "src/submission.h"
// Stores the objects that the panel and its widget will refer to
struct panel_manager {
EekboardContextService *state; // unowned
/// Needed for instantiating the widget
struct submission *submission; // unowned
struct squeek_layout_state *layout;
PhoshLayerSurface *window;
GtkWidget *widget; // nullable
// Those should be held in Rust
struct wl_output *current_output;
};
struct panel_manager panel_manager_new(EekboardContextService *state, struct submission *submission, struct squeek_layout_state *layout);