Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gtkconstraint.h
Go to the documentation of this file.
1/* gtkconstraint.h: Constraint between two widgets
2 * Copyright 2019 GNOME Foundation
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Author: Emmanuele Bassi
18 */
19
20#pragma once
21
22#include <gtk/gtktypes.h>
23#include <gtk/gtkenums.h>
24
26
27typedef struct _GtkConstraintTarget GtkConstraintTarget;
28
29#define GTK_TYPE_CONSTRAINT_TARGET (gtk_constraint_target_get_type ())
30
31/**
32 * GtkConstraintTarget:
33 *
34 * The `GtkConstraintTarget` interface is implemented by objects that
35 * can be used as source or target in `GtkConstraint`s.
36 *
37 * Besides `GtkWidget`, it is also implemented by `GtkConstraintGuide`.
38 */
39
41G_DECLARE_INTERFACE (GtkConstraintTarget, gtk_constraint_target, GTK, CONSTRAINT_TARGET, GObject)
42
43#define GTK_TYPE_CONSTRAINT (gtk_constraint_get_type ())
44
46G_DECLARE_FINAL_TYPE (GtkConstraint, gtk_constraint, GTK, CONSTRAINT, GObject)
47
49GtkConstraint * gtk_constraint_new (gpointer target,
50 GtkConstraintAttribute target_attribute,
51 GtkConstraintRelation relation,
52 gpointer source,
53 GtkConstraintAttribute source_attribute,
54 double multiplier,
55 double constant,
56 int strength);
58GtkConstraint * gtk_constraint_new_constant (gpointer target,
59 GtkConstraintAttribute target_attribute,
60 GtkConstraintRelation relation,
61 double constant,
62 int strength);
63
65GtkConstraintTarget * gtk_constraint_get_target (GtkConstraint *constraint);
69GtkConstraintTarget * gtk_constraint_get_source (GtkConstraint *constraint);
75double gtk_constraint_get_multiplier (GtkConstraint *constraint);
77double gtk_constraint_get_constant (GtkConstraint *constraint);
79int gtk_constraint_get_strength (GtkConstraint *constraint);
80
82gboolean gtk_constraint_is_required (GtkConstraint *constraint);
84gboolean gtk_constraint_is_attached (GtkConstraint *constraint);
86gboolean gtk_constraint_is_constant (GtkConstraint *constraint);
87
#define GDK_AVAILABLE_IN_ALL
#define G_END_DECLS
Definition gmacros.h:910
#define G_BEGIN_DECLS
Definition gmacros.h:909
typedefG_BEGIN_DECLS struct _GtkConstraintTarget GtkConstraintTarget
GDK_AVAILABLE_IN_ALL int gtk_constraint_get_strength(GtkConstraint *constraint)
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL GtkConstraint * gtk_constraint_new(gpointer target, GtkConstraintAttribute target_attribute, GtkConstraintRelation relation, gpointer source, GtkConstraintAttribute source_attribute, double multiplier, double constant, int strength)
GDK_AVAILABLE_IN_ALL GtkConstraint * gtk_constraint_new_constant(gpointer target, GtkConstraintAttribute target_attribute, GtkConstraintRelation relation, double constant, int strength)
GDK_AVAILABLE_IN_ALL double gtk_constraint_get_constant(GtkConstraint *constraint)
GDK_AVAILABLE_IN_ALL double gtk_constraint_get_multiplier(GtkConstraint *constraint)
GDK_AVAILABLE_IN_ALL gboolean gtk_constraint_is_attached(GtkConstraint *constraint)
GDK_AVAILABLE_IN_ALL GtkConstraintTarget * gtk_constraint_get_target(GtkConstraint *constraint)
GDK_AVAILABLE_IN_ALL GtkConstraintTarget * gtk_constraint_get_source(GtkConstraint *constraint)
GDK_AVAILABLE_IN_ALL gboolean gtk_constraint_is_required(GtkConstraint *constraint)
GDK_AVAILABLE_IN_ALL GtkConstraintRelation gtk_constraint_get_relation(GtkConstraint *constraint)
GDK_AVAILABLE_IN_ALL GtkConstraintAttribute gtk_constraint_get_source_attribute(GtkConstraint *constraint)
GDK_AVAILABLE_IN_ALL gboolean gtk_constraint_is_constant(GtkConstraint *constraint)
GDK_AVAILABLE_IN_ALL GtkConstraintAttribute gtk_constraint_get_target_attribute(GtkConstraint *constraint)
GtkConstraintAttribute
Definition gtkenums.h:1183
GtkConstraintRelation
Definition gtkenums.h:1132
#define G_DECLARE_FINAL_TYPE(ModuleObjName, module_obj_name, MODULE, OBJ_NAME, ParentName)
Definition gtype.h:1602
#define G_DECLARE_INTERFACE(ModuleObjName, module_obj_name, MODULE, OBJ_NAME, PrerequisiteName)
Definition gtype.h:1797
gint gboolean
Definition gtypes.h:56
void * gpointer
Definition gtypes.h:109