diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2025-04-16 08:38:25 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2025-04-16 08:38:25 (GMT) |
commit | 597ccba5285e5423bfe63d010b23293b62b452d4 (patch) | |
tree | 73b783e0259f6609b282c7f3fdc6ab62245256a1 /src/gtkext/grid.h | |
parent | 91ff093198c22d474d3fe0fd6fa290d95dbffb79 (diff) |
Rewrite the tiling layout using widgets.
Diffstat (limited to 'src/gtkext/grid.h')
-rw-r--r-- | src/gtkext/grid.h | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/src/gtkext/grid.h b/src/gtkext/grid.h index d9b7ef1..f02cf38 100644 --- a/src/gtkext/grid.h +++ b/src/gtkext/grid.h @@ -25,10 +25,10 @@ #define _GTKEXT_GRID_H +#include <stdbool.h> #include <gtk/gtk.h> -#include "dockstation.h" #include "panel.h" #include "../glibext/helpers.h" @@ -42,7 +42,48 @@ DECLARE_GTYPE(GtkTilingGrid, gtk_tiling_grid, GTK, TILING_GRID); /* Crée une nouvelle instance de conteneur avec tuiles. */ GtkWidget *gtk_tiling_grid_new(void); +/* Liste des zones de bordure */ +typedef enum _TilingGridBorder /*< skip (glib-mkenums) >*/ +{ + TGB_TOP, /* Zone supérieure */ + TGB_LEFT, /* Zone de gauche */ + TGB_RIGHT, /* Zone de droite */ + TGB_BOTTOM, /* Zone inférieure */ +} TilingGridBorder; + +/** + * Fixe le nombre de combinaisons sans le rendre visible dans l'énumération. + */ +#define TGB_COUNT (TGB_BOTTOM + 1) + +/* Affiche ou masque une zone du conteneur en tuiles. */ +void gtk_tiling_grid_set_visible(GtkTilingGrid *, TilingGridBorder, bool); + +/* Fournit la visibilité d'une zone du conteneur en tuiles. */ +bool gtk_tiling_grid_get_visible(GtkTilingGrid *, TilingGridBorder); + +/* Ajoute un panneau à un conteneur en tuiles. */ +void gtk_tiling_grid_add_panel(GtkTilingGrid *, GtkTiledPanel *, bool); + + + +/* --------------------- FORME GENERIQUE DE MISE EN DISPOSITION --------------------- */ + + +/* Options de dispositions cumulables */ +typedef enum _LayoutReachOptions /*< flags (glib-mkenums) >*/ +{ + LRO_NONE = (0 << 0), /* Aucune atteinte des bords */ + LRO_LEFT_TOP_REACH = (1 << 0), /* Atteinte du bord haut à G. */ + LRO_LEFT_BOTTOM_REACH = (1 << 1), /* Atteinte du bord bas à G. */ + LRO_RIGHT_TOP_REACH = (1 << 2), /* Atteinte du bord haut à D. */ + LRO_RIGHT_BOTTOM_REACH = (1 << 3), /* Atteinte du bord bas à D. */ + +} LayoutReachOptions; + +/* Met en place une disposition particulière de panneaux. */ +void apply_tiling_grid_layout(GtkGrid *, LayoutReachOptions, GtkWidget *[TGB_COUNT]); |