sizing: Create a standalone UI shape manager

The manager is used for sizing the layer surface. It promises never to exceed half the output height.

The selection of the current layout is not being done here, leading to worse behaviour in 1:1 scaling.

In the future, it could be used for sizing the keyboard itself and the suggestion box, as well as decide which layout to use, because layouts should have some sizing hints.
This commit is contained in:
Dorota Czaplejewicz
2020-02-29 14:54:40 +00:00
parent 24f709ab13
commit 3cd170acc3
9 changed files with 185 additions and 60 deletions

View File

@ -20,6 +20,7 @@
#include "src/layout.h"
#include "src/submission.h"
#include "ui_manager.h"
G_BEGIN_DECLS
@ -36,7 +37,7 @@ typedef struct _ServerContextService ServerContextService;
GType server_context_service_get_type
(void) G_GNUC_CONST;
ServerContextService *server_context_service_new(EekboardContextService *state, struct submission *submission, struct squeek_layout_state *layout);
ServerContextService *server_context_service_new(EekboardContextService *state, struct submission *submission, struct squeek_layout_state *layout, struct ui_manager *uiman);
enum squeek_arrangement_kind server_context_service_get_layout_type(ServerContextService *);
void server_context_service_show_keyboard (ServerContextService *context);
void server_context_service_hide_keyboard (ServerContextService *context);