]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtktextsegment.h
filechooser: Also convert get_uris() to returning native paths
[~andy/gtk] / gtk / gtktextsegment.h
index c6930295ad50896ebc5782a9aab30dcf55e0c9f1..42c0c28200dd8526983f6818dce0d29c7945aaaa 100644 (file)
@@ -1,5 +1,29 @@
-#ifndef GTK_TEXT_SEGMENT_H
-#define GTK_TEXT_SEGMENT_H
+/* GTK - The GIMP Toolkit
+ * gtktextsegment.h Copyright (C) 2000 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
+ * file for a list of people on the GTK+ Team.  See the ChangeLog
+ * files for a list of changes.  These files are distributed with
+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
+ */
+
+#ifndef __GTK_TEXT_SEGMENT_H__
+#define __GTK_TEXT_SEGMENT_H__
 
 #include <gtk/gtktexttag.h>
 #include <gtk/gtktextiter.h>
@@ -7,9 +31,7 @@
 #include <gtk/gtktextchild.h>
 #include <gtk/gtktextchildprivate.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
+G_BEGIN_DECLS
 
 /*
  * Segments: each line is divided into one or more segments, where each
@@ -83,23 +105,23 @@ struct _GtkTextLineSegmentClass {
   GtkTextSegDeleteFunc deleteFunc;      /* Procedure to call to delete
                                          * segment. */
   GtkTextSegCleanupFunc cleanupFunc;   /* After any change to a line, this
-                                         * procedure is invoked for all
-                                         * segments left in the line to
-                                         * perform any cleanup they wish
-                                         * (e.g. joining neighboring
-                                         * segments). */
+                                        * procedure is invoked for all
+                                        * segments left in the line to
+                                        * perform any cleanup they wish
+                                        * (e.g. joining neighboring
+                                        * segments). */
   GtkTextSegLineChangeFunc lineChangeFunc;
-                                         /* Invoked when a segment is about
-                                          * to be moved from its current line
-                                          * to an earlier line because of
-                                          * a deletion.  The line is that
-                                          * for the segment's old line.
-                                          * CleanupFunc will be invoked after
-                                          * the deletion is finished. */
+  /* Invoked when a segment is about
+   * to be moved from its current line
+   * to an earlier line because of
+   * a deletion.  The line is that
+   * for the segment's old line.
+   * CleanupFunc will be invoked after
+   * the deletion is finished. */
 
   GtkTextSegCheckFunc checkFunc;       /* Called during consistency checks
-                                         * to check internal consistency of
-                                         * segment. */
+                                        * to check internal consistency of
+                                        * segment. */
 };
 
 /*
@@ -107,13 +129,13 @@ struct _GtkTextLineSegmentClass {
  */
 
 struct _GtkTextLineSegment {
-  GtkTextLineSegmentClass *type;                /* Pointer to record describing
-                                                 * segment's type. */
-  GtkTextLineSegment *next;                /* Next in list of segments for this
-                                            * line, or NULL for end of list. */
+  const GtkTextLineSegmentClass *type;  /* Pointer to record describing
+                                         * segment's type. */
+  GtkTextLineSegment *next;             /* Next in list of segments for this
+                                         * line, or NULL for end of list. */
 
   int char_count;                       /* # of chars of index space occupied */
-  
+
   int byte_count;                       /* Size of this segment (# of bytes
                                          * of index space it occupies). */
   union {
@@ -134,15 +156,15 @@ GtkTextLineSegment *_gtk_char_segment_new                  (const gchar    *text
                                                             guint           len);
 GtkTextLineSegment *_gtk_char_segment_new_from_two_strings (const gchar    *text1,
                                                             guint           len1,
+                                                           guint           chars1,
                                                             const gchar    *text2,
-                                                            guint           len2);
+                                                            guint           len2,
+                                                           guint           chars2);
 GtkTextLineSegment *_gtk_toggle_segment_new                (GtkTextTagInfo *info,
                                                             gboolean        on);
 
 
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
+G_END_DECLS
 
 #endif