No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 
 

97 líneas
6.0 KiB

  1. /* gtkrichtext.h
  2. *
  3. * Copyright (C) 2006 Imendio AB
  4. * Contact: Michael Natterer <mitch@imendio.com>
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Library General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Library General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Library General Public
  17. * License along with this library; if not, write to the
  18. * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  19. * Boston, MA 02111-1307, USA.
  20. */
  21. #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
  22. #error "Only <gtk/gtk.h> can be included directly."
  23. #endif
  24. #ifndef __GTK_TEXT_BUFFER_RICH_TEXT_H__
  25. #define __GTK_TEXT_BUFFER_RICH_TEXT_H__
  26. #include <gtk/gtktextbuffer.h>
  27. G_BEGIN_DECLS
  28. typedef guint8 * (* GtkTextBufferSerializeFunc) (GtkTextBuffer *register_buffer,
  29. GtkTextBuffer *content_buffer,
  30. const GtkTextIter *start,
  31. const GtkTextIter *end,
  32. gsize *length,
  33. gpointer user_data);
  34. typedef gboolean (* GtkTextBufferDeserializeFunc) (GtkTextBuffer *register_buffer,
  35. GtkTextBuffer *content_buffer,
  36. GtkTextIter *iter,
  37. const guint8 *data,
  38. gsize length,
  39. gboolean create_tags,
  40. gpointer user_data,
  41. GError **error);
  42. GdkAtom gtk_text_buffer_register_serialize_format (GtkTextBuffer *buffer,
  43. const gchar *mime_type,
  44. GtkTextBufferSerializeFunc function,
  45. gpointer user_data,
  46. GDestroyNotify user_data_destroy);
  47. GdkAtom gtk_text_buffer_register_serialize_tagset (GtkTextBuffer *buffer,
  48. const gchar *tagset_name);
  49. GdkAtom gtk_text_buffer_register_deserialize_format (GtkTextBuffer *buffer,
  50. const gchar *mime_type,
  51. GtkTextBufferDeserializeFunc function,
  52. gpointer user_data,
  53. GDestroyNotify user_data_destroy);
  54. GdkAtom gtk_text_buffer_register_deserialize_tagset (GtkTextBuffer *buffer,
  55. const gchar *tagset_name);
  56. void gtk_text_buffer_unregister_serialize_format (GtkTextBuffer *buffer,
  57. GdkAtom format);
  58. void gtk_text_buffer_unregister_deserialize_format (GtkTextBuffer *buffer,
  59. GdkAtom format);
  60. void gtk_text_buffer_deserialize_set_can_create_tags (GtkTextBuffer *buffer,
  61. GdkAtom format,
  62. gboolean can_create_tags);
  63. gboolean gtk_text_buffer_deserialize_get_can_create_tags (GtkTextBuffer *buffer,
  64. GdkAtom format);
  65. GdkAtom * gtk_text_buffer_get_serialize_formats (GtkTextBuffer *buffer,
  66. gint *n_formats);
  67. GdkAtom * gtk_text_buffer_get_deserialize_formats (GtkTextBuffer *buffer,
  68. gint *n_formats);
  69. guint8 * gtk_text_buffer_serialize (GtkTextBuffer *register_buffer,
  70. GtkTextBuffer *content_buffer,
  71. GdkAtom format,
  72. const GtkTextIter *start,
  73. const GtkTextIter *end,
  74. gsize *length);
  75. gboolean gtk_text_buffer_deserialize (GtkTextBuffer *register_buffer,
  76. GtkTextBuffer *content_buffer,
  77. GdkAtom format,
  78. GtkTextIter *iter,
  79. const guint8 *data,
  80. gsize length,
  81. GError **error);
  82. G_END_DECLS
  83. #endif /* __GTK_TEXT_BUFFER_RICH_TEXT_H__ */