addrclip.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*
  2. * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
  3. * Copyright (C) 2002-2006 Match Grun and the Claws Mail team
  4. *
  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 2 of the License, or
  8. * (at your option) any later version.
  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
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  18. */
  19. /*
  20. * Address clip board selection.
  21. */
  22. #ifndef __ADDRESS_CLIP_H__
  23. #define __ADDRESS_CLIP_H__
  24. #include <stdio.h>
  25. #include <glib.h>
  26. #include "addrindex.h"
  27. #include "addrselect.h"
  28. /*
  29. * Selection data.
  30. */
  31. typedef struct _AddressClipboard_ AddressClipboard;
  32. struct _AddressClipboard_ {
  33. gboolean cutFlag; /* Indicates cut/copy operation */
  34. gboolean moveFlag; /* Internal move indicator for cut */
  35. AddressIndex *addressIndex; /* Reference to address index */
  36. GList *objectList; /* List of objects in clipboard */
  37. };
  38. /*
  39. * Function prototypes.
  40. */
  41. AddressClipboard *addrclip_create ( void );
  42. void addrclip_clear ( AddressClipboard *clipBoard );
  43. void addrclip_free ( AddressClipboard *clipBoard );
  44. void addrclip_set_index ( AddressClipboard *clipBoard,
  45. AddressIndex *addrIndex );
  46. void addrclip_add ( AddressClipboard *clipBoard,
  47. AddrSelectList *asl );
  48. /*
  49. void addrclip_add ( AddressClipboard *clipBoard,
  50. GList *addrList );
  51. */
  52. void addrclip_add_item ( AddressClipboard *clipBoard,
  53. AddrSelectItem *item );
  54. gboolean addrclip_is_empty ( AddressClipboard *clipBoard );
  55. void addrclip_list_show ( AddressClipboard *clipBoard,
  56. FILE *stream );
  57. void addrclip_delete_item ( AddressClipboard *clipBoard );
  58. GList *addrclip_paste_copy ( AddressClipboard *clipBoard,
  59. AddressBookFile *book,
  60. ItemFolder *folder );
  61. GList *addrclip_paste_cut ( AddressClipboard *clipBoard,
  62. AddressBookFile *book,
  63. ItemFolder *folder );
  64. void addrclip_delete_address ( AddressClipboard *clipBoard );
  65. gint addrclip_paste_person_copy ( AddressClipboard *clipBoard,
  66. AddressBookFile *book,
  67. ItemPerson *person );
  68. gint addrclip_paste_person_cut ( AddressClipboard *clipBoard,
  69. AddressBookFile *book,
  70. ItemPerson *person );
  71. #endif /* __ADDRRESS_CLIP_H__ */