1 | /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ |
---|
2 | /* evolution-shell-component-dnd.h |
---|
3 | * |
---|
4 | * Copyright (C) 2000, 2001 Ximian, Inc. |
---|
5 | * |
---|
6 | * This program is free software; you can redistribute it and/or |
---|
7 | * modify it under the terms of version 2 of the GNU General Public |
---|
8 | * License as published by the Free Software Foundation. |
---|
9 | * |
---|
10 | * This program is distributed in the hope that it will be useful, |
---|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
13 | * General Public License for more details. |
---|
14 | * |
---|
15 | * You should have received a copy of the GNU General Public |
---|
16 | * License along with this program; if not, write to the |
---|
17 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
---|
18 | * Boston, MA 02111-1307, USA. |
---|
19 | * |
---|
20 | * Author: Chris Toshok |
---|
21 | */ |
---|
22 | |
---|
23 | #ifndef EVOLUTION_SHELL_COMPONENT_DND_H |
---|
24 | #define EVOLUTION_SHELL_COMPONENT_DND_H |
---|
25 | |
---|
26 | #include <bonobo/bonobo-object.h> |
---|
27 | #include "Evolution.h" |
---|
28 | |
---|
29 | #ifdef cplusplus |
---|
30 | extern "C" { |
---|
31 | #pragma } |
---|
32 | #endif /* cplusplus */ |
---|
33 | |
---|
34 | /* Source Folder stuff */ |
---|
35 | #define EVOLUTION_SHELL_COMPONENT_DND_SOURCE_FOLDER_TYPE (evolution_shell_component_dnd_source_folder_get_type ()) |
---|
36 | #define EVOLUTION_SHELL_COMPONENT_DND_SOURCE_FOLDER(obj) (GTK_CHECK_CAST ((obj), EVOLUTION_SHELL_COMPONENT_DND_SOURCE_FOLDER_TYPE, EvolutionShellComponentDndSourceFolder)) |
---|
37 | #define EVOLUTION_SHELL_COMPONENT_DND_SOURCE_FOLDER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EVOLUTION_SHELL_COMPONENT_DND_SOURCE_FOLDER_TYPE, EvolutionShellComponentDndSourceFolderClass)) |
---|
38 | #define IS_EVOLUTION_SHELL_COMPONENT_DND_SOURCE_FOLDER(obj) (GTK_CHECK_TYPE ((obj), EVOLUTION_SHELL_COMPONENT_DND_SOURCE_FOLDER_TYPE)) |
---|
39 | #define IS_EVOLUTION_SHELL_COMPONENT_DND_SOURCE_FOLDER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), EVOLUTION_SHELL_COMPONENT_DND_SOURCE_FOLDER_TYPE)) |
---|
40 | |
---|
41 | typedef struct _DndSourceFolderPrivate DndSourceFolderPrivate; |
---|
42 | typedef struct _EvolutionShellComponentDndSourceFolder EvolutionShellComponentDndSourceFolder; |
---|
43 | typedef struct _EvolutionShellComponentDndSourceFolderClass EvolutionShellComponentDndSourceFolderClass; |
---|
44 | |
---|
45 | typedef void (*DndSourceFolderBeginDragFn)(EvolutionShellComponentDndSourceFolder *folder, |
---|
46 | const char *physical_uri, |
---|
47 | const char *folder_type, |
---|
48 | GNOME_Evolution_ShellComponentDnd_ActionSet *possible_actions_return, |
---|
49 | GNOME_Evolution_ShellComponentDnd_Action *suggested_action_return, |
---|
50 | gpointer closure); |
---|
51 | typedef void (*DndSourceFolderGetDataFn)(EvolutionShellComponentDndSourceFolder *folder, |
---|
52 | const GNOME_Evolution_ShellComponentDnd_SourceFolder_Context * source_context, |
---|
53 | const GNOME_Evolution_ShellComponentDnd_Action action, |
---|
54 | const char * dnd_type, |
---|
55 | GNOME_Evolution_ShellComponentDnd_Data ** data_return, |
---|
56 | CORBA_Environment *ev, |
---|
57 | gpointer closure); |
---|
58 | typedef void (*DndSourceFolderDeleteDataFn)(EvolutionShellComponentDndSourceFolder *folder, |
---|
59 | const GNOME_Evolution_ShellComponentDnd_SourceFolder_Context *source_context, |
---|
60 | gpointer closure); |
---|
61 | typedef void (*DndSourceFolderEndDragFn)(EvolutionShellComponentDndSourceFolder *folder, |
---|
62 | const GNOME_Evolution_ShellComponentDnd_SourceFolder_Context *source_context, |
---|
63 | gpointer closure); |
---|
64 | |
---|
65 | struct _EvolutionShellComponentDndSourceFolder { |
---|
66 | BonoboObject object; |
---|
67 | DndSourceFolderPrivate *priv; |
---|
68 | }; |
---|
69 | |
---|
70 | struct _EvolutionShellComponentDndSourceFolderClass { |
---|
71 | BonoboObjectClass parent_class; |
---|
72 | }; |
---|
73 | |
---|
74 | GtkType evolution_shell_component_dnd_source_folder_get_type (void); |
---|
75 | |
---|
76 | EvolutionShellComponentDndSourceFolder* |
---|
77 | evolution_shell_component_dnd_source_folder_new (DndSourceFolderBeginDragFn begin_drag, |
---|
78 | DndSourceFolderGetDataFn get_data, |
---|
79 | DndSourceFolderDeleteDataFn delete_data, |
---|
80 | DndSourceFolderEndDragFn end_drag, |
---|
81 | gpointer user_data); |
---|
82 | |
---|
83 | |
---|
84 | |
---|
85 | /* Destination Folder stuff */ |
---|
86 | #define EVOLUTION_SHELL_COMPONENT_DND_DESTINATION_FOLDER_TYPE (evolution_shell_component_dnd_destination_folder_get_type ()) |
---|
87 | #define EVOLUTION_SHELL_COMPONENT_DND_DESTINATION_FOLDER(obj) (GTK_CHECK_CAST ((obj), EVOLUTION_SHELL_COMPONENT_DND_DESTINATION_FOLDER_TYPE, EvolutionShellComponentDndDestinationFolder)) |
---|
88 | #define EVOLUTION_SHELL_COMPONENT_DND_DESTINATION_FOLDER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EVOLUTION_SHELL_COMPONENT_DND_DESTINATION_FOLDER_TYPE, EvolutionShellComponentDndDestinationFolderClass)) |
---|
89 | #define IS_EVOLUTION_SHELL_COMPONENT_DND_DESTINATION_FOLDER(obj) (GTK_CHECK_TYPE ((obj), EVOLUTION_SHELL_COMPONENT_DND_DESTINATION_FOLDER_TYPE)) |
---|
90 | #define IS_EVOLUTION_SHELL_COMPONENT_DND_DESTINATION_FOLDER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), EVOLUTION_SHELL_COMPONENT_DND_DESTINATION_FOLDER_TYPE)) |
---|
91 | |
---|
92 | typedef struct _DndDestinationFolderPrivate DndDestinationFolderPrivate; |
---|
93 | typedef struct _EvolutionShellComponentDndDestinationFolder EvolutionShellComponentDndDestinationFolder; |
---|
94 | typedef struct _EvolutionShellComponentDndDestinationFolderClass EvolutionShellComponentDndDestinationFolderClass; |
---|
95 | |
---|
96 | typedef CORBA_boolean (*DndDestinationFolderHandleMotionFn)(EvolutionShellComponentDndDestinationFolder *folder, |
---|
97 | const char *physical_uri, |
---|
98 | const char *folder_type, |
---|
99 | const GNOME_Evolution_ShellComponentDnd_DestinationFolder_Context * destination_context, |
---|
100 | GNOME_Evolution_ShellComponentDnd_Action * suggested_action_return, |
---|
101 | gpointer closure); |
---|
102 | typedef CORBA_boolean (*DndDestinationFolderHandleDropFn)(EvolutionShellComponentDndDestinationFolder *folder, |
---|
103 | const char *physical_uri, |
---|
104 | const char *folder_type, |
---|
105 | const GNOME_Evolution_ShellComponentDnd_DestinationFolder_Context * destination_context, |
---|
106 | const GNOME_Evolution_ShellComponentDnd_Action action, |
---|
107 | const GNOME_Evolution_ShellComponentDnd_Data * data, |
---|
108 | gpointer closure); |
---|
109 | |
---|
110 | struct _EvolutionShellComponentDndDestinationFolder { |
---|
111 | BonoboObject object; |
---|
112 | DndDestinationFolderPrivate *priv; |
---|
113 | }; |
---|
114 | |
---|
115 | struct _EvolutionShellComponentDndDestinationFolderClass { |
---|
116 | BonoboObjectClass parent_class; |
---|
117 | }; |
---|
118 | |
---|
119 | GtkType evolution_shell_component_dnd_destination_folder_get_type (void); |
---|
120 | |
---|
121 | EvolutionShellComponentDndDestinationFolder* |
---|
122 | evolution_shell_component_dnd_destination_folder_new (DndDestinationFolderHandleMotionFn handle_motion, |
---|
123 | DndDestinationFolderHandleDropFn handle_drop, |
---|
124 | gpointer user_data); |
---|
125 | |
---|
126 | #ifdef cplusplus |
---|
127 | } |
---|
128 | #endif /* cplusplus */ |
---|
129 | |
---|
130 | #endif /* EVOLUTION_SHELL_COMPONENT_DND_H */ |
---|