Files
gtk/gtk/gtkgridconstraintprivate.h
Matthias Clasen 5e8d5dafc1 Add a constraint-based grid
This is implemented as a auxiliary object that
generates a bunch of constraints (and variables)
when added to a constraint layout.

Maybe this could be generalized to a 'constraint
set' concept, if we come up with other layouts
that we want to reimplement in this way.
2019-06-27 17:04:41 +00:00

48 lines
1.4 KiB
C

/*
* Copyright 2019 Red Hat, inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
* Author: Matthias Clasen
*/
#include "gtkgridconstraint.h"
#include "gtkconstraintsolverprivate.h"
typedef struct {
GtkWidget *child;
int left;
int right;
int top;
int bottom;
} GtkGridConstraintChild;
struct _GtkGridConstraint {
GObject parent;
gboolean row_homogeneous;
gboolean column_homogeneous;
GPtrArray *children;
GtkConstraintSolver *solver;
GPtrArray *refs;
};
gboolean gtk_grid_constraint_is_attached (GtkGridConstraint *constraint);
void gtk_grid_constraint_attach (GtkGridConstraint *constraint,
GtkConstraintSolver *solver,
GPtrArray *refs);
void gtk_grid_constraint_detach (GtkGridConstraint *constraint);