Fix CID 1596595: Resource leak
[claws.git] / src / addrclip.h
blob9ddb054a5cbb396e9b2983c8e938d8a202d6305a
1 /*
2 * Claws Mail -- a GTK based, lightweight, and fast e-mail client
3 * Copyright (C) 2002-2022 Match Grun and the Claws Mail team
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
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
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 * Address clip board selection.
23 #ifndef __ADDRESS_CLIP_H__
24 #define __ADDRESS_CLIP_H__
26 #include <stdio.h>
27 #include <glib.h>
29 #include "addrindex.h"
30 #include "addrselect.h"
33 * Selection data.
35 typedef struct _AddressClipboard_ AddressClipboard;
36 struct _AddressClipboard_ {
37 gboolean cutFlag; /* Indicates cut/copy operation */
38 gboolean moveFlag; /* Internal move indicator for cut */
39 AddressIndex *addressIndex; /* Reference to address index */
40 GList *objectList; /* List of objects in clipboard */
44 * Function prototypes.
46 AddressClipboard *addrclip_create ( void );
47 void addrclip_clear ( AddressClipboard *clipBoard );
48 void addrclip_free ( AddressClipboard *clipBoard );
49 void addrclip_set_index ( AddressClipboard *clipBoard,
50 AddressIndex *addrIndex );
51 void addrclip_add ( AddressClipboard *clipBoard,
52 AddrSelectList *asl );
53 gboolean addrclip_is_empty ( AddressClipboard *clipBoard );
54 #ifdef DEBUG_ADDRBOOK
55 void addrclip_list_show ( AddressClipboard *clipBoard,
56 FILE *stream );
57 #endif
58 void addrclip_delete_item ( AddressClipboard *clipBoard );
59 GList *addrclip_paste_copy ( AddressClipboard *clipBoard,
60 AddressBookFile *book,
61 ItemFolder *folder );
62 GList *addrclip_paste_cut ( AddressClipboard *clipBoard,
63 AddressBookFile *book,
64 ItemFolder *folder );
66 #endif /* __ADDRRESS_CLIP_H__ */