Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gtktreednd.h
Go to the documentation of this file.
1/* gtktreednd.h
2 * Copyright (C) 2001 Red Hat, Inc.
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library 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 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#pragma once
19
20#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
21#error "Only <gtk/gtk.h> can be included directly."
22#endif
23
25
27
28/**
29 * GTK_TYPE_TREE_ROW_DATA:
30 * Magic `GType` to use when dragging rows in a `GtkTreeModel`.
31 *
32 * Data in this format will be provided by gtk_tree_create_row_drag_content()
33 * and can be consumed via gtk_tree_get_row_drag_data().
34 */
35#define GTK_TYPE_TREE_ROW_DATA (gtk_tree_row_data_get_type ())
38
39
40#define GTK_TYPE_TREE_DRAG_SOURCE (gtk_tree_drag_source_get_type ())
41#define GTK_TREE_DRAG_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TREE_DRAG_SOURCE, GtkTreeDragSource))
42#define GTK_IS_TREE_DRAG_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TREE_DRAG_SOURCE))
43#define GTK_TREE_DRAG_SOURCE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GTK_TYPE_TREE_DRAG_SOURCE, GtkTreeDragSourceIface))
44
45typedef struct _GtkTreeDragSource GtkTreeDragSource; /* Dummy typedef */
47
48/**
49 * GtkTreeDragSourceIface:
50 * @row_draggable: Asks the `GtkTreeDragSource` whether a particular
51 * row can be used as the source of a DND operation.
52 * @drag_data_get: Asks the `GtkTreeDragSource` to fill in
53 * selection_data with a representation of the row at path.
54 * @drag_data_delete: Asks the `GtkTreeDragSource` to delete the row at
55 * path, because it was moved somewhere else via drag-and-drop.
56 */
58{
59 /*< private >*/
61
62 /*< public >*/
63
64 /* VTable - not signals */
65
67 GtkTreePath *path);
68
69 GdkContentProvider * (* drag_data_get)(GtkTreeDragSource *drag_source,
70 GtkTreePath *path);
71
73 GtkTreePath *path);
74};
75
78
79/* Returns whether the given row can be dragged */
82 GtkTreePath *path);
83
84/* Deletes the given row, or returns FALSE if it can't */
87 GtkTreePath *path);
88
89/* Fills in selection_data with type selection_data->target based on
90 * the row denoted by path, returns TRUE if it does anything
91 */
95 GtkTreePath *path);
96
97#define GTK_TYPE_TREE_DRAG_DEST (gtk_tree_drag_dest_get_type ())
98#define GTK_TREE_DRAG_DEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TREE_DRAG_DEST, GtkTreeDragDest))
99#define GTK_IS_TREE_DRAG_DEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TREE_DRAG_DEST))
100#define GTK_TREE_DRAG_DEST_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GTK_TYPE_TREE_DRAG_DEST, GtkTreeDragDestIface))
101
102typedef struct _GtkTreeDragDest GtkTreeDragDest; /* Dummy typedef */
104
105/**
106 * GtkTreeDragDestIface:
107 * @drag_data_received: Asks the `GtkTreeDragDest` to insert a row
108 * before the path dest, deriving the contents of the row from
109 * selection_data.
110 * @row_drop_possible: Determines whether a drop is possible before
111 * the given dest_path, at the same depth as dest_path.
112 */
114{
115 /*< private >*/
117
118 /*< public >*/
119
120 /* VTable - not signals */
121
123 GtkTreePath *dest,
124 const GValue *value);
125
127 GtkTreePath *dest_path,
128 const GValue *value);
129};
130
133
134/* Inserts a row before dest which contains data in selection_data,
135 * or returns FALSE if it can't
136 */
139 GtkTreePath *dest,
140 const GValue *value);
141
142
143/* Returns TRUE if we can drop before path; path may not exist. */
146 GtkTreePath *dest_path,
147 const GValue *value);
148
149
150/* The selection data would normally have target type GTK_TREE_MODEL_ROW in this
151 * case. If the target is wrong these functions return FALSE.
152 */
156 GtkTreePath *path);
159 GtkTreeModel **tree_model,
160 GtkTreePath **path);
161
164
166
#define GDK_DEPRECATED_IN_4_10
#define GDK_DEPRECATED_IN_4_10_FOR(f)
#define G_END_DECLS
Definition gmacros.h:910
#define G_BEGIN_DECLS
Definition gmacros.h:909
#define G_GNUC_CONST
Definition gmacros.h:637
#define G_DEFINE_AUTOPTR_CLEANUP_FUNC(TypeName, func)
Definition gmacros.h:1400
GOBJECT_AVAILABLE_IN_ALL void g_object_unref(gpointer object)
struct _GtkDragSource GtkDragSource
typedefG_BEGIN_DECLS struct _GtkDropTarget GtkDropTarget
GdkContentProvider * gtk_tree_create_row_drag_content(GtkTreeModel *tree_model, GtkTreePath *path)
GType gtk_tree_drag_dest_get_type(void) G_GNUC_CONST
gboolean gtk_tree_get_row_drag_data(const GValue *value, GtkTreeModel **tree_model, GtkTreePath **path)
struct _GtkTreeDragSource GtkTreeDragSource
Definition gtktreednd.h:45
GdkContentProvider * gtk_tree_drag_source_drag_data_get(GtkTreeDragSource *drag_source, GtkTreePath *path)
GDK_DEPRECATED_IN_4_10 GType gtk_tree_row_data_get_type(void) G_GNUC_CONST
gboolean gtk_tree_drag_dest_drag_data_received(GtkTreeDragDest *drag_dest, GtkTreePath *dest, const GValue *value)
gboolean gtk_tree_drag_dest_row_drop_possible(GtkTreeDragDest *drag_dest, GtkTreePath *dest_path, const GValue *value)
GType gtk_tree_drag_source_get_type(void) G_GNUC_CONST
gboolean gtk_tree_drag_source_row_draggable(GtkTreeDragSource *drag_source, GtkTreePath *path)
gboolean gtk_tree_drag_source_drag_data_delete(GtkTreeDragSource *drag_source, GtkTreePath *path)
struct _GtkTreeDragDest GtkTreeDragDest
Definition gtktreednd.h:102
struct _GtkTreePath GtkTreePath
struct _GtkTreeModel GtkTreeModel
gsize GType
Definition gtype.h:427
gint gboolean
Definition gtypes.h:56
int value
Definition lsqlite3.c:2155
GTypeInterface g_iface
Definition gtktreednd.h:116
gboolean(* drag_data_received)(GtkTreeDragDest *drag_dest, GtkTreePath *dest, const GValue *value)
Definition gtktreednd.h:122
gboolean(* row_drop_possible)(GtkTreeDragDest *drag_dest, GtkTreePath *dest_path, const GValue *value)
Definition gtktreednd.h:126
gboolean(* row_draggable)(GtkTreeDragSource *drag_source, GtkTreePath *path)
Definition gtktreednd.h:66
GTypeInterface g_iface
Definition gtktreednd.h:60
gboolean(* drag_data_delete)(GtkTreeDragSource *drag_source, GtkTreePath *path)
Definition gtktreednd.h:72