You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

107 lines
4.4 KiB

  1. /* gtktextmark.h - mark segments
  2. *
  3. * Copyright (c) 1994 The Regents of the University of California.
  4. * Copyright (c) 1994-1997 Sun Microsystems, Inc.
  5. * Copyright (c) 2000 Red Hat, Inc.
  6. * Tk -> Gtk port by Havoc Pennington <hp@redhat.com>
  7. *
  8. * This software is copyrighted by the Regents of the University of
  9. * California, Sun Microsystems, Inc., and other parties. The
  10. * following terms apply to all files associated with the software
  11. * unless explicitly disclaimed in individual files.
  12. *
  13. * The authors hereby grant permission to use, copy, modify,
  14. * distribute, and license this software and its documentation for any
  15. * purpose, provided that existing copyright notices are retained in
  16. * all copies and that this notice is included verbatim in any
  17. * distributions. No written agreement, license, or royalty fee is
  18. * required for any of the authorized uses. Modifications to this
  19. * software may be copyrighted by their authors and need not follow
  20. * the licensing terms described here, provided that the new terms are
  21. * clearly indicated on the first page of each file where they apply.
  22. *
  23. * IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY
  24. * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
  25. * DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION,
  26. * OR ANY DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED
  27. * OF THE POSSIBILITY OF SUCH DAMAGE.
  28. *
  29. * THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
  30. * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  31. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
  32. * NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS,
  33. * AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
  34. * MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  35. *
  36. * GOVERNMENT USE: If you are acquiring this software on behalf of the
  37. * U.S. government, the Government shall have only "Restricted Rights"
  38. * in the software and related documentation as defined in the Federal
  39. * Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
  40. * are acquiring the software on behalf of the Department of Defense,
  41. * the software shall be classified as "Commercial Computer Software"
  42. * and the Government shall have only "Restricted Rights" as defined
  43. * in Clause 252.227-7013 (c) (1) of DFARs. Notwithstanding the
  44. * foregoing, the authors grant the U.S. Government and others acting
  45. * in its behalf permission to use and distribute the software in
  46. * accordance with the terms specified in this license.
  47. *
  48. */
  49. #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
  50. #error "Only <gtk/gtk.h> can be included directly."
  51. #endif
  52. #ifndef __GTK_TEXT_MARK_H__
  53. #define __GTK_TEXT_MARK_H__
  54. G_BEGIN_DECLS
  55. /* The GtkTextMark data type */
  56. typedef struct _GtkTextMark GtkTextMark;
  57. typedef struct _GtkTextMarkClass GtkTextMarkClass;
  58. #define GTK_TYPE_TEXT_MARK (gtk_text_mark_get_type ())
  59. #define GTK_TEXT_MARK(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GTK_TYPE_TEXT_MARK, GtkTextMark))
  60. #define GTK_TEXT_MARK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TEXT_MARK, GtkTextMarkClass))
  61. #define GTK_IS_TEXT_MARK(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GTK_TYPE_TEXT_MARK))
  62. #define GTK_IS_TEXT_MARK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TEXT_MARK))
  63. #define GTK_TEXT_MARK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TEXT_MARK, GtkTextMarkClass))
  64. struct _GtkTextMark
  65. {
  66. GObject parent_instance;
  67. gpointer GSEAL (segment);
  68. };
  69. struct _GtkTextMarkClass
  70. {
  71. GObjectClass parent_class;
  72. /* Padding for future expansion */
  73. void (*_gtk_reserved1) (void);
  74. void (*_gtk_reserved2) (void);
  75. void (*_gtk_reserved3) (void);
  76. void (*_gtk_reserved4) (void);
  77. };
  78. GType gtk_text_mark_get_type (void) G_GNUC_CONST;
  79. void gtk_text_mark_set_visible (GtkTextMark *mark,
  80. gboolean setting);
  81. gboolean gtk_text_mark_get_visible (GtkTextMark *mark);
  82. GtkTextMark *gtk_text_mark_new (const gchar *name,
  83. gboolean left_gravity);
  84. G_CONST_RETURN gchar* gtk_text_mark_get_name (GtkTextMark *mark);
  85. gboolean gtk_text_mark_get_deleted (GtkTextMark *mark);
  86. GtkTextBuffer* gtk_text_mark_get_buffer (GtkTextMark *mark);
  87. gboolean gtk_text_mark_get_left_gravity (GtkTextMark *mark);
  88. G_END_DECLS
  89. #endif