Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gtkcustomlayout.h
Go to the documentation of this file.
1/* gtkcustomlayout.h: Simple layout manager
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#pragma once
18
20
22
23#define GTK_TYPE_CUSTOM_LAYOUT (gtk_custom_layout_get_type ())
24
25/**
26 * GtkCustomRequestModeFunc:
27 * @widget: the widget to be queried
28 *
29 * Queries a widget for its preferred size request mode.
30 *
31 * Returns: the size request mode
32 */
34
35/**
36 * GtkCustomMeasureFunc:
37 * @widget: the widget to be measured
38 * @orientation: the direction to be measured
39 * @for_size: the size to be measured for
40 * @minimum: (out): the measured minimum size of the widget
41 * @natural: (out): the measured natural size of the widget
42 * @minimum_baseline: (out): the measured minimum baseline of the widget
43 * @natural_baseline: (out): the measured natural baseline of the widget
44 *
45 * A function to be used by `GtkCustomLayout` to measure a widget.
46 */
47typedef void (* GtkCustomMeasureFunc) (GtkWidget *widget,
48 GtkOrientation orientation,
49 int for_size,
50 int *minimum,
51 int *natural,
52 int *minimum_baseline,
53 int *natural_baseline);
54
55/**
56 * GtkCustomAllocateFunc:
57 * @widget: the widget to allocate
58 * @width: the new width of the widget
59 * @height: the new height of the widget
60 * @baseline: the new baseline of the widget, or -1
61 *
62 * A function to be used by `GtkCustomLayout` to allocate a widget.
63 */
64typedef void (* GtkCustomAllocateFunc) (GtkWidget *widget,
65 int width,
66 int height,
67 int baseline);
68
70G_DECLARE_FINAL_TYPE (GtkCustomLayout, gtk_custom_layout, GTK, CUSTOM_LAYOUT, GtkLayoutManager)
71
75 GtkCustomAllocateFunc allocate);
76
#define GDK_AVAILABLE_IN_ALL
#define G_END_DECLS
Definition gmacros.h:910
#define G_BEGIN_DECLS
Definition gmacros.h:909
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL GtkLayoutManager * gtk_custom_layout_new(GtkCustomRequestModeFunc request_mode, GtkCustomMeasureFunc measure, GtkCustomAllocateFunc allocate)
void(* GtkCustomAllocateFunc)(GtkWidget *widget, int width, int height, int baseline)
void(* GtkCustomMeasureFunc)(GtkWidget *widget, GtkOrientation orientation, int for_size, int *minimum, int *natural, int *minimum_baseline, int *natural_baseline)
GtkSizeRequestMode(* GtkCustomRequestModeFunc)(GtkWidget *widget)
GtkOrientation
Definition gtkenums.h:438
GtkSizeRequestMode
Definition gtkenums.h:812
struct _GtkLayoutManager GtkLayoutManager
Definition gtktypes.h:49
#define G_DECLARE_FINAL_TYPE(ModuleObjName, module_obj_name, MODULE, OBJ_NAME, ParentName)
Definition gtype.h:1602