Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gdkpopuplayout.h
Go to the documentation of this file.
1/* GDK - The GIMP Drawing Kit
2 * Copyright (C) 2020 Red Hat
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 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 */
18
19#pragma once
20
21#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
22#error "Only <gdk/gdk.h> can be included directly."
23#endif
24
25#include <gdk/gdktypes.h>
26
28
29/**
30 * GdkAnchorHints:
31 * @GDK_ANCHOR_FLIP_X: allow flipping anchors horizontally
32 * @GDK_ANCHOR_FLIP_Y: allow flipping anchors vertically
33 * @GDK_ANCHOR_SLIDE_X: allow sliding surface horizontally
34 * @GDK_ANCHOR_SLIDE_Y: allow sliding surface vertically
35 * @GDK_ANCHOR_RESIZE_X: allow resizing surface horizontally
36 * @GDK_ANCHOR_RESIZE_Y: allow resizing surface vertically
37 * @GDK_ANCHOR_FLIP: allow flipping anchors on both axes
38 * @GDK_ANCHOR_SLIDE: allow sliding surface on both axes
39 * @GDK_ANCHOR_RESIZE: allow resizing surface on both axes
40 *
41 * Positioning hints for aligning a surface relative to a rectangle.
42 *
43 * These hints determine how the surface should be positioned in the case that
44 * the surface would fall off-screen if placed in its ideal position.
45 *
46 * For example, %GDK_ANCHOR_FLIP_X will replace %GDK_GRAVITY_NORTH_WEST with
47 * %GDK_GRAVITY_NORTH_EAST and vice versa if the surface extends beyond the left
48 * or right edges of the monitor.
49 *
50 * If %GDK_ANCHOR_SLIDE_X is set, the surface can be shifted horizontally to fit
51 * on-screen. If %GDK_ANCHOR_RESIZE_X is set, the surface can be shrunken
52 * horizontally to fit.
53 *
54 * In general, when multiple flags are set, flipping should take precedence over
55 * sliding, which should take precedence over resizing.
56 */
69
70typedef struct _GdkPopupLayout GdkPopupLayout;
71
72#define GDK_TYPE_POPUP_LAYOUT (gdk_popup_layout_get_type ())
73
76
79 GdkGravity rect_anchor,
80 GdkGravity surface_anchor);
81
84
87
90
93 GdkPopupLayout *other);
94
97 const GdkRectangle *anchor_rect);
98
101
104 GdkGravity anchor);
105
108
111 GdkGravity anchor);
112
115
118 GdkAnchorHints anchor_hints);
119
122
125 int dx,
126 int dy);
127
130 int *dx,
131 int *dy);
132
135 int left,
136 int right,
137 int top,
138 int bottom);
141 int *left,
142 int *right,
143 int *top,
144 int *bottom);
145
147
149
#define GDK_AVAILABLE_IN_4_2
#define GDK_AVAILABLE_IN_ALL
GdkGravity
Definition gdkenums.h:72
GDK_AVAILABLE_IN_ALL void gdk_popup_layout_get_offset(GdkPopupLayout *layout, int *dx, int *dy)
GDK_AVAILABLE_IN_ALL gboolean gdk_popup_layout_equal(GdkPopupLayout *layout, GdkPopupLayout *other)
GDK_AVAILABLE_IN_4_2 void gdk_popup_layout_get_shadow_width(GdkPopupLayout *layout, int *left, int *right, int *top, int *bottom)
GDK_AVAILABLE_IN_ALL GdkPopupLayout * gdk_popup_layout_ref(GdkPopupLayout *layout)
GDK_AVAILABLE_IN_ALL GdkAnchorHints gdk_popup_layout_get_anchor_hints(GdkPopupLayout *layout)
GDK_AVAILABLE_IN_ALL void gdk_popup_layout_unref(GdkPopupLayout *layout)
GDK_AVAILABLE_IN_ALL void gdk_popup_layout_set_anchor_hints(GdkPopupLayout *layout, GdkAnchorHints anchor_hints)
GDK_AVAILABLE_IN_ALL void gdk_popup_layout_set_rect_anchor(GdkPopupLayout *layout, GdkGravity anchor)
GDK_AVAILABLE_IN_ALL const GdkRectangle * gdk_popup_layout_get_anchor_rect(GdkPopupLayout *layout)
GDK_AVAILABLE_IN_ALL void gdk_popup_layout_set_offset(GdkPopupLayout *layout, int dx, int dy)
GDK_AVAILABLE_IN_ALL void gdk_popup_layout_set_surface_anchor(GdkPopupLayout *layout, GdkGravity anchor)
GDK_AVAILABLE_IN_4_2 void gdk_popup_layout_set_shadow_width(GdkPopupLayout *layout, int left, int right, int top, int bottom)
GDK_AVAILABLE_IN_ALL GType gdk_popup_layout_get_type(void)
GDK_AVAILABLE_IN_ALL GdkPopupLayout * gdk_popup_layout_new(const GdkRectangle *anchor_rect, GdkGravity rect_anchor, GdkGravity surface_anchor)
GDK_AVAILABLE_IN_ALL GdkGravity gdk_popup_layout_get_surface_anchor(GdkPopupLayout *layout)
GDK_AVAILABLE_IN_ALL void gdk_popup_layout_set_anchor_rect(GdkPopupLayout *layout, const GdkRectangle *anchor_rect)
GdkAnchorHints
@ GDK_ANCHOR_FLIP_X
@ GDK_ANCHOR_FLIP
@ GDK_ANCHOR_SLIDE_X
@ GDK_ANCHOR_SLIDE
@ GDK_ANCHOR_RESIZE_X
@ GDK_ANCHOR_FLIP_Y
@ GDK_ANCHOR_RESIZE_Y
@ GDK_ANCHOR_RESIZE
@ GDK_ANCHOR_SLIDE_Y
GDK_AVAILABLE_IN_ALL GdkGravity gdk_popup_layout_get_rect_anchor(GdkPopupLayout *layout)
struct _GdkPopupLayout GdkPopupLayout
GDK_AVAILABLE_IN_ALL GdkPopupLayout * gdk_popup_layout_copy(GdkPopupLayout *layout)
#define G_END_DECLS
Definition gmacros.h:910
#define G_BEGIN_DECLS
Definition gmacros.h:909
#define G_DEFINE_AUTOPTR_CLEANUP_FUNC(TypeName, func)
Definition gmacros.h:1400
gsize GType
Definition gtype.h:427
gint gboolean
Definition gtypes.h:56
lu_byte right
lu_byte left