#include "config.h"
#include "gtkatspipangoprivate.h"
-#include "gtkpango.h"
+#include "gtkpangoprivate.h"
void
gtk_pango_get_font_attributes (PangoFontDescription *font,
#include "gtkentryprivate.h"
#include "gtkinscriptionprivate.h"
#include "gtklabelprivate.h"
-#include "gtkpango.h"
+#include "gtkpangoprivate.h"
#include "gtkpasswordentryprivate.h"
#include "gtksearchentryprivate.h"
#include "gtkspinbuttonprivate.h"
#include "gtkatspipangoprivate.h"
#include "gtktextbufferprivate.h"
#include "gtktextviewprivate.h"
-#include "gtkpango.h"
+#include "gtkpangoprivate.h"
void
gtk_text_view_add_default_attributes (GtkTextView *view,
#include "gsk/gsk.h"
#include "gsk/gskrendernodeprivate.h"
-#include "gskpango.h"
+#include "gskpangoprivate.h"
#include "gtksnapshotprivate.h"
#include "gtktextlayoutprivate.h"
#include "gtktextviewprivate.h"
+++ /dev/null
-/* GSK - The GTK Scene Kit
- *
- * Copyright 2017 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/>.
- */
-
-#ifndef __GSK_PANGO_H__
-#define __GSK_PANGO_H__
-
-#include <pango/pango.h>
-#include "gtk/gtksnapshot.h"
-
-G_BEGIN_DECLS
-
-#define GSK_TYPE_PANGO_RENDERER (gsk_pango_renderer_get_type ())
-#define GSK_PANGO_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSK_TYPE_PANGO_RENDERER, GskPangoRenderer))
-#define GSK_IS_PANGO_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSK_TYPE_PANGO_RENDERER))
-#define GSK_PANGO_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GSK_TYPE_PANGO_RENDERER, GskPangoRendererClass))
-#define GSK_IS_PANGO_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GSK_TYPE_PANGO_RENDERER))
-#define GSK_PANGO_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GSK_TYPE_PANGO_RENDERER, GskPangoRendererClass))
-
-typedef struct _GskPangoRenderer GskPangoRenderer;
-typedef struct _GskPangoRendererClass GskPangoRendererClass;
-
-typedef enum
-{
- GSK_PANGO_RENDERER_NORMAL,
- GSK_PANGO_RENDERER_SELECTED,
- GSK_PANGO_RENDERER_CURSOR
-} GskPangoRendererState;
-
-typedef gboolean (*GskPangoShapeHandler) (PangoAttrShape *attr,
- GdkSnapshot *snapshot,
- double width,
- double height);
-
-/*
- * This is a PangoRenderer implementation that translates all the draw calls to
- * gsk render nodes, using the GtkSnapshot helper class. Glyphs are translated
- * to text nodes, other draw calls may fall back to cairo nodes.
- */
-
-struct _GskPangoRenderer
-{
- PangoRenderer parent_instance;
-
- GtkWidget *widget;
- GtkSnapshot *snapshot;
- const GdkRGBA *fg_color;
-
- /* Error underline color for this widget */
- GdkRGBA *error_color;
-
- GskPangoRendererState state;
-
- guint is_cached_renderer : 1;
-
- GskPangoShapeHandler shape_handler;
-};
-
-struct _GskPangoRendererClass
-{
- PangoRendererClass parent_class;
-};
-
-GType gsk_pango_renderer_get_type (void) G_GNUC_CONST;
-void gsk_pango_renderer_set_state (GskPangoRenderer *crenderer,
- GskPangoRendererState state);
-void gsk_pango_renderer_set_shape_handler (GskPangoRenderer *crenderer,
- GskPangoShapeHandler handler);
-GskPangoRenderer *gsk_pango_renderer_acquire (void);
-void gsk_pango_renderer_release (GskPangoRenderer *crenderer);
-
-G_END_DECLS
-
-#endif /* __GSK_PANGO_H__ */
--- /dev/null
+/* GSK - The GTK Scene Kit
+ *
+ * Copyright 2017 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/>.
+ */
+
+#ifndef __GSK_PANGO_PRIVATE_H__
+#define __GSK_PANGO_PRIVATE_H__
+
+#include <pango/pango.h>
+#include "gtk/gtksnapshot.h"
+
+G_BEGIN_DECLS
+
+#define GSK_TYPE_PANGO_RENDERER (gsk_pango_renderer_get_type ())
+#define GSK_PANGO_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSK_TYPE_PANGO_RENDERER, GskPangoRenderer))
+#define GSK_IS_PANGO_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSK_TYPE_PANGO_RENDERER))
+#define GSK_PANGO_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GSK_TYPE_PANGO_RENDERER, GskPangoRendererClass))
+#define GSK_IS_PANGO_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GSK_TYPE_PANGO_RENDERER))
+#define GSK_PANGO_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GSK_TYPE_PANGO_RENDERER, GskPangoRendererClass))
+
+typedef struct _GskPangoRenderer GskPangoRenderer;
+typedef struct _GskPangoRendererClass GskPangoRendererClass;
+
+typedef enum
+{
+ GSK_PANGO_RENDERER_NORMAL,
+ GSK_PANGO_RENDERER_SELECTED,
+ GSK_PANGO_RENDERER_CURSOR
+} GskPangoRendererState;
+
+typedef gboolean (*GskPangoShapeHandler) (PangoAttrShape *attr,
+ GdkSnapshot *snapshot,
+ double width,
+ double height);
+
+/*
+ * This is a PangoRenderer implementation that translates all the draw calls to
+ * gsk render nodes, using the GtkSnapshot helper class. Glyphs are translated
+ * to text nodes, other draw calls may fall back to cairo nodes.
+ */
+
+struct _GskPangoRenderer
+{
+ PangoRenderer parent_instance;
+
+ GtkWidget *widget;
+ GtkSnapshot *snapshot;
+ const GdkRGBA *fg_color;
+
+ /* Error underline color for this widget */
+ GdkRGBA *error_color;
+
+ GskPangoRendererState state;
+
+ guint is_cached_renderer : 1;
+
+ GskPangoShapeHandler shape_handler;
+};
+
+struct _GskPangoRendererClass
+{
+ PangoRendererClass parent_class;
+};
+
+GType gsk_pango_renderer_get_type (void) G_GNUC_CONST;
+void gsk_pango_renderer_set_state (GskPangoRenderer *crenderer,
+ GskPangoRendererState state);
+void gsk_pango_renderer_set_shape_handler (GskPangoRenderer *crenderer,
+ GskPangoShapeHandler handler);
+GskPangoRenderer *gsk_pango_renderer_acquire (void);
+void gsk_pango_renderer_release (GskPangoRenderer *crenderer);
+
+G_END_DECLS
+
+#endif /* __GSK_PANGO_PRIVATE_H__ */
#include "gtkcssnumbervalueprivate.h"
#include "gtkcsscolorvalueprivate.h"
#include "gtksnapshotprivate.h"
-#include "gtkpango.h"
+#include "gtkpangoprivate.h"
#include "gsk/gskcairoblurprivate.h"
#include "gsk/gskroundedrectprivate.h"
#include "gtkimage.h"
#include "gtklabel.h"
#include "gtkrendernodepaintableprivate.h"
-#include "gtktextutil.h"
+#include "gtktextutilprivate.h"
/**
#include "gtklabel.h"
#include "gtkmain.h"
#include "gtkmarshalers.h"
-#include "gtkpango.h"
+#include "gtkpangoprivate.h"
#include "gtkpopover.h"
#include "gtkprivate.h"
#include "gtkprogressbar.h"
#include "gtksnapshot.h"
#include "gtktextprivate.h"
#include "gtktexthandleprivate.h"
-#include "gtktextutil.h"
+#include "gtktextutilprivate.h"
#include "gtktooltip.h"
#include "gtktypebuiltins.h"
#include "gtkwidgetprivate.h"
#include "gtkmessagedialog.h"
#include "gtkmountoperation.h"
#include "gtkpaned.h"
-#include "gtkpathbar.h"
+#include "gtkpathbarprivate.h"
#include "gtkplacessidebarprivate.h"
#include "gtkplacesviewprivate.h"
#include "gtkprivate.h"
#include "gtkfilechooserutils.h"
#include "gtkmarshalers.h"
-#include "gtktreedatalist.h"
+#include "gtktreedatalistprivate.h"
#include "gtktreednd.h"
#include "gtktreemodel.h"
#include "gtkfilter.h"
#include "gtkcssnodeprivate.h"
#include "gtkcssstylechangeprivate.h"
-#include "gtkpango.h"
+#include "gtkpangoprivate.h"
#include "gtksnapshot.h"
#include "gtktypebuiltins.h"
#include "gtkwidgetprivate.h"
#include <glib/gi18n-lib.h>
#include "gtkmarshalers.h"
#include "gtknotebook.h"
-#include "gtkpango.h"
+#include "gtkpangoprivate.h"
#include "gtkprivate.h"
#include "gtkshortcut.h"
#include "gtkshortcutcontroller.h"
#include "gtkshow.h"
#include "gtksnapshot.h"
#include "gtkstylecontextprivate.h"
-#include "gtktextutil.h"
+#include "gtktextutilprivate.h"
#include "gtktooltip.h"
#include "gtktypebuiltins.h"
#include "gtkwidgetprivate.h"
#include <gobject/gvaluecollector.h>
#include "gtktreemodel.h"
#include "gtkliststore.h"
-#include "gtktreedatalist.h"
+#include "gtktreedatalistprivate.h"
#include "gtktreednd.h"
#include "gtkbuildable.h"
#include "gtkbuilderprivate.h"
*/
#include "config.h"
-#include "gtkpango.h"
+#include "gtkpangoprivate.h"
#include <pango/pangocairo.h>
#include "gtkbuilderprivate.h"
+++ /dev/null
-/* GTK - The GIMP Toolkit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- *
- * 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_PANGO_H__
-#define __GTK_PANGO_H__
-
-#include <pango/pangocairo.h>
-#include "gtkbuildable.h"
-
-G_BEGIN_DECLS
-
-PangoAttrList *_gtk_pango_attr_list_merge (PangoAttrList *into,
- PangoAttrList *from) G_GNUC_WARN_UNUSED_RESULT;
-
-gboolean gtk_buildable_attribute_tag_start (GtkBuildable *buildable,
- GtkBuilder *builder,
- GObject *child,
- const char *tagname,
- GtkBuildableParser *parser,
- gpointer *data);
-
-typedef struct {
- GtkBuilder *builder;
- GObject *object;
- PangoAttrList *attrs;
-} GtkPangoAttributeParserData;
-
-void
-gtk_pango_attribute_start_element (GtkBuildableParseContext *context,
- const char *element_name,
- const char **names,
- const char **values,
- gpointer user_data,
- GError **error);
-
-const char *pango_wrap_mode_to_string (PangoWrapMode mode);
-const char *pango_underline_to_string (PangoUnderline underline);
-const char *pango_stretch_to_string (PangoStretch stretch);
-const char *pango_style_to_string (PangoStyle style);
-const char *pango_variant_to_string (PangoVariant variant);
-const char *pango_align_to_string (PangoAlignment align);
-
-G_END_DECLS
-
-#endif /* __GTK_PANGO_H__ */
--- /dev/null
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
+ *
+ * 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_PANGO_PRIVATE_H__
+#define __GTK_PANGO_PRIVATE_H__
+
+#include <pango/pangocairo.h>
+#include "gtkbuildable.h"
+
+G_BEGIN_DECLS
+
+PangoAttrList *_gtk_pango_attr_list_merge (PangoAttrList *into,
+ PangoAttrList *from) G_GNUC_WARN_UNUSED_RESULT;
+
+gboolean gtk_buildable_attribute_tag_start (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ GObject *child,
+ const char *tagname,
+ GtkBuildableParser *parser,
+ gpointer *data);
+
+typedef struct {
+ GtkBuilder *builder;
+ GObject *object;
+ PangoAttrList *attrs;
+} GtkPangoAttributeParserData;
+
+void
+gtk_pango_attribute_start_element (GtkBuildableParseContext *context,
+ const char *element_name,
+ const char **names,
+ const char **values,
+ gpointer user_data,
+ GError **error);
+
+const char *pango_wrap_mode_to_string (PangoWrapMode mode);
+const char *pango_underline_to_string (PangoUnderline underline);
+const char *pango_stretch_to_string (PangoStretch stretch);
+const char *pango_style_to_string (PangoStyle style);
+const char *pango_variant_to_string (PangoVariant variant);
+const char *pango_align_to_string (PangoAlignment align);
+
+G_END_DECLS
+
+#endif /* __GTK_PANGO_PRIVATE_H__ */
#include "config.h"
-#include "gtkpathbar.h"
+#include "gtkpathbarprivate.h"
#include <string.h>
+++ /dev/null
-/* gtkpathbar.h
- * Copyright (C) 2004 Red Hat, Inc., Jonathan Blandford <jrb@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library 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
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef __GTK_PATH_BAR_H__
-#define __GTK_PATH_BAR_H__
-
-#include "gtkwidget.h"
-
-G_BEGIN_DECLS
-
-#define GTK_TYPE_PATH_BAR (gtk_path_bar_get_type ())
-#define GTK_PATH_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_PATH_BAR, GtkPathBar))
-#define GTK_IS_PATH_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_PATH_BAR))
-
-typedef struct _GtkPathBar GtkPathBar;
-
-GDK_AVAILABLE_IN_ALL
-GType gtk_path_bar_get_type (void) G_GNUC_CONST;
-void _gtk_path_bar_set_file (GtkPathBar *path_bar,
- GFile *file,
- gboolean keep_trail);
-void _gtk_path_bar_up (GtkPathBar *path_bar);
-void _gtk_path_bar_down (GtkPathBar *path_bar);
-
-G_END_DECLS
-
-#endif /* __GTK_PATH_BAR_H__ */
--- /dev/null
+/* gtkpathbarprivate.h
+ * Copyright (C) 2004 Red Hat, Inc., Jonathan Blandford <jrb@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __GTK_PATH_BAR_PRIVATE_H__
+#define __GTK_PATH_BAR_PRIVATE_H__
+
+#include "gtkwidget.h"
+
+G_BEGIN_DECLS
+
+#define GTK_TYPE_PATH_BAR (gtk_path_bar_get_type ())
+#define GTK_PATH_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_PATH_BAR, GtkPathBar))
+#define GTK_IS_PATH_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_PATH_BAR))
+
+typedef struct _GtkPathBar GtkPathBar;
+
+GDK_AVAILABLE_IN_ALL
+GType gtk_path_bar_get_type (void) G_GNUC_CONST;
+void _gtk_path_bar_set_file (GtkPathBar *path_bar,
+ GFile *file,
+ gboolean keep_trail);
+void _gtk_path_bar_up (GtkPathBar *path_bar);
+void _gtk_path_bar_down (GtkPathBar *path_bar);
+
+G_END_DECLS
+
+#endif /* __GTK_PATH_BAR_PRIVATE_H__ */
#include "gtkmountoperation.h"
#include "gtkscrolledwindow.h"
#include "gtksettings.h"
-#include "gtktrashmonitor.h"
+#include "gtktrashmonitorprivate.h"
#include "gtktypebuiltins.h"
#include "gtkprivatetypebuiltins.h"
#include "gtkpopovermenu.h"
#include "gsk/gskrendernodeprivate.h"
#include "gsk/gskroundedrectprivate.h"
-#include "gtk/gskpango.h"
+#include "gtk/gskpangoprivate.h"
#define GDK_ARRAY_NAME gtk_snapshot_nodes
#define GDK_ARRAY_TYPE_NAME GtkSnapshotNodes
#include "gtkmagnifierprivate.h"
#include "gtkmain.h"
#include "gtkmarshalers.h"
-#include "gtkpango.h"
+#include "gtkpangoprivate.h"
#include "gtkpopovermenu.h"
#include "gtkprivate.h"
#include "gtksettings.h"
#include "gtkstylecontextprivate.h"
#include "gtktexthandleprivate.h"
#include "gtktexthistoryprivate.h"
-#include "gtktextutil.h"
+#include "gtktextutilprivate.h"
#include "gtktooltip.h"
#include "gtktypebuiltins.h"
#include "gtkwidgetprivate.h"
#include "config.h"
-#include "gtktextattributes.h"
+#include "gtktextattributesprivate.h"
#include "gtktexttagprivate.h"
/**
+++ /dev/null
-/* gtktextattributes.h - text attributes
- *
- * Copyright (c) 1992-1994 The Regents of the University of California.
- * Copyright (c) 1994-1997 Sun Microsystems, Inc.
- * Copyright (c) 2000 Red Hat, Inc.
- * Tk -> Gtk port by Havoc Pennington <hp@redhat.com>
- *
- * This software is copyrighted by the Regents of the University of
- * California, Sun Microsystems, Inc., and other parties. The
- * following terms apply to all files associated with the software
- * unless explicitly disclaimed in individual files.
- *
- * The authors hereby grant permission to use, copy, modify,
- * distribute, and license this software and its documentation for any
- * purpose, provided that existing copyright notices are retained in
- * all copies and that this notice is included verbatim in any
- * distributions. No written agreement, license, or royalty fee is
- * required for any of the authorized uses. Modifications to this
- * software may be copyrighted by their authors and need not follow
- * the licensing terms described here, provided that the new terms are
- * clearly indicated on the first page of each file where they apply.
- *
- * IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY
- * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
- * DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION,
- * OR ANY DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
- * NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS,
- * AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
- * MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * GOVERNMENT USE: If you are acquiring this software on behalf of the
- * U.S. government, the Government shall have only "Restricted Rights"
- * in the software and related documentation as defined in the Federal
- * Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
- * are acquiring the software on behalf of the Department of Defense,
- * the software shall be classified as "Commercial Computer Software"
- * and the Government shall have only "Restricted Rights" as defined
- * in Clause 252.227-7013 (c) (1) of DFARs. Notwithstanding the
- * foregoing, the authors grant the U.S. Government and others acting
- * in its behalf permission to use and distribute the software in
- * accordance with the terms specified in this license.
- *
- */
-
-#ifndef __GTK_TEXT_ATTRIBUTES_H__
-#define __GTK_TEXT_ATTRIBUTES_H__
-
-
-#include <gdk/gdk.h>
-#include <gtk/gtkenums.h>
-
-
-G_BEGIN_DECLS
-
-typedef struct _GtkTextAttributes GtkTextAttributes;
-typedef struct _GtkTextAppearance GtkTextAppearance;
-
-struct _GtkTextAppearance
-{
- GdkRGBA *bg_rgba;
- GdkRGBA *fg_rgba;
- GdkRGBA *underline_rgba;
- GdkRGBA *overline_rgba;
- GdkRGBA *strikethrough_rgba;
-
- /* super/subscript rise, can be negative */
- int rise;
-
- guint underline : 4; /* PangoUnderline */
- guint overline : 2; /* PangoOverline */
- guint strikethrough : 1;
-
- /* Whether to use background-related values; this is irrelevant for
- * the values struct when in a tag, but is used for the composite
- * values struct; it's true if any of the tags being composited
- * had background stuff set.
- */
- guint draw_bg : 1;
-
- /* These are only used when we are actually laying out and rendering
- * a paragraph; not when a GtkTextAppearance is part of a
- * GtkTextAttributes.
- */
- guint inside_selection : 1;
- guint is_text : 1;
-};
-
-/**
- * GtkTextAttributes:
- * @appearance: GtkTextAppearance for text.
- * @justification: GtkJustification for text.
- * @direction: GtkTextDirection for text.
- * @font: `PangoFontDescription` for text.
- * @font_scale: Font scale factor.
- * @left_margin: Width of the left margin in pixels.
- * @right_margin: Width of the right margin in pixels.
- * @indent: Amount to indent the paragraph, in pixels.
- * @pixels_above_lines: Pixels of blank space above paragraphs.
- * @pixels_below_lines: Pixels of blank space below paragraphs.
- * @pixels_inside_wrap: Pixels of blank space between wrapped lines in
- * a paragraph.
- * @tabs: Custom `PangoTabArray` for this text.
- * @wrap_mode: `GtkWrapMode` for text.
- * @language: `PangoLanguage` for text.
- * @invisible: Hide the text.
- * @bg_full_height: Background is fit to full line height rather than
- * baseline +/- ascent/descent (font height).
- * @editable: Can edit this text.
- * @no_fallback: Whether to disable font fallback.
- * @letter_spacing: Extra space to insert between graphemes, in Pango units
- *
- * Using GtkTextAttributes directly should rarely be necessary.
- * It’s primarily useful with gtk_text_iter_get_attributes().
- * As with most GTK structs, the fields in this struct should only
- * be read, never modified directly.
- */
-struct _GtkTextAttributes
-{
- guint refcount;
-
- GtkJustification justification;
- GtkTextDirection direction;
- GtkWrapMode wrap_mode;
-
- GtkTextAppearance appearance;
-
- PangoFontDescription *font;
- char *font_features;
-
- GdkRGBA *pg_bg_rgba;
-
- PangoTabArray *tabs;
- PangoLanguage *language;
-
- double font_scale;
-
- int left_margin;
- int right_margin;
- int indent;
-
- int pixels_above_lines;
- int pixels_below_lines;
- int pixels_inside_wrap;
-
- float line_height;
-
- int letter_spacing;
-
- guint invisible : 1;
- guint bg_full_height : 1;
- guint editable : 1;
- guint no_fallback: 1;
- guint no_breaks : 1;
- guint show_spaces : 3; /* PangoShowFlags */
- guint no_hyphens : 1;
- guint line_height_is_absolute : 1;
- guint text_transform : 3; /* PangoTextTransform */
- guint word : 1;
- guint sentence : 1;
-};
-
-GtkTextAttributes* gtk_text_attributes_new (void);
-GtkTextAttributes* gtk_text_attributes_copy (GtkTextAttributes *src);
-void gtk_text_attributes_copy_values (GtkTextAttributes *src,
- GtkTextAttributes *dest);
-void gtk_text_attributes_unref (GtkTextAttributes *values);
-GtkTextAttributes *gtk_text_attributes_ref (GtkTextAttributes *values);
-
-G_END_DECLS
-
-#endif
--- /dev/null
+/* gtktextattributes.h - text attributes
+ *
+ * Copyright (c) 1992-1994 The Regents of the University of California.
+ * Copyright (c) 1994-1997 Sun Microsystems, Inc.
+ * Copyright (c) 2000 Red Hat, Inc.
+ * Tk -> Gtk port by Havoc Pennington <hp@redhat.com>
+ *
+ * This software is copyrighted by the Regents of the University of
+ * California, Sun Microsystems, Inc., and other parties. The
+ * following terms apply to all files associated with the software
+ * unless explicitly disclaimed in individual files.
+ *
+ * The authors hereby grant permission to use, copy, modify,
+ * distribute, and license this software and its documentation for any
+ * purpose, provided that existing copyright notices are retained in
+ * all copies and that this notice is included verbatim in any
+ * distributions. No written agreement, license, or royalty fee is
+ * required for any of the authorized uses. Modifications to this
+ * software may be copyrighted by their authors and need not follow
+ * the licensing terms described here, provided that the new terms are
+ * clearly indicated on the first page of each file where they apply.
+ *
+ * IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY
+ * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
+ * DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION,
+ * OR ANY DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
+ * NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS,
+ * AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
+ * MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * GOVERNMENT USE: If you are acquiring this software on behalf of the
+ * U.S. government, the Government shall have only "Restricted Rights"
+ * in the software and related documentation as defined in the Federal
+ * Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
+ * are acquiring the software on behalf of the Department of Defense,
+ * the software shall be classified as "Commercial Computer Software"
+ * and the Government shall have only "Restricted Rights" as defined
+ * in Clause 252.227-7013 (c) (1) of DFARs. Notwithstanding the
+ * foregoing, the authors grant the U.S. Government and others acting
+ * in its behalf permission to use and distribute the software in
+ * accordance with the terms specified in this license.
+ *
+ */
+
+#ifndef __GTK_TEXT_ATTRIBUTES_PRIVATE_H__
+#define __GTK_TEXT_ATTRIBUTES_PRIVATE_H__
+
+
+#include <gdk/gdk.h>
+#include <gtk/gtkenums.h>
+
+
+G_BEGIN_DECLS
+
+typedef struct _GtkTextAttributes GtkTextAttributes;
+typedef struct _GtkTextAppearance GtkTextAppearance;
+
+struct _GtkTextAppearance
+{
+ GdkRGBA *bg_rgba;
+ GdkRGBA *fg_rgba;
+ GdkRGBA *underline_rgba;
+ GdkRGBA *overline_rgba;
+ GdkRGBA *strikethrough_rgba;
+
+ /* super/subscript rise, can be negative */
+ int rise;
+
+ guint underline : 4; /* PangoUnderline */
+ guint overline : 2; /* PangoOverline */
+ guint strikethrough : 1;
+
+ /* Whether to use background-related values; this is irrelevant for
+ * the values struct when in a tag, but is used for the composite
+ * values struct; it's true if any of the tags being composited
+ * had background stuff set.
+ */
+ guint draw_bg : 1;
+
+ /* These are only used when we are actually laying out and rendering
+ * a paragraph; not when a GtkTextAppearance is part of a
+ * GtkTextAttributes.
+ */
+ guint inside_selection : 1;
+ guint is_text : 1;
+};
+
+/**
+ * GtkTextAttributes:
+ * @appearance: GtkTextAppearance for text.
+ * @justification: GtkJustification for text.
+ * @direction: GtkTextDirection for text.
+ * @font: `PangoFontDescription` for text.
+ * @font_scale: Font scale factor.
+ * @left_margin: Width of the left margin in pixels.
+ * @right_margin: Width of the right margin in pixels.
+ * @indent: Amount to indent the paragraph, in pixels.
+ * @pixels_above_lines: Pixels of blank space above paragraphs.
+ * @pixels_below_lines: Pixels of blank space below paragraphs.
+ * @pixels_inside_wrap: Pixels of blank space between wrapped lines in
+ * a paragraph.
+ * @tabs: Custom `PangoTabArray` for this text.
+ * @wrap_mode: `GtkWrapMode` for text.
+ * @language: `PangoLanguage` for text.
+ * @invisible: Hide the text.
+ * @bg_full_height: Background is fit to full line height rather than
+ * baseline +/- ascent/descent (font height).
+ * @editable: Can edit this text.
+ * @no_fallback: Whether to disable font fallback.
+ * @letter_spacing: Extra space to insert between graphemes, in Pango units
+ *
+ * Using GtkTextAttributes directly should rarely be necessary.
+ * It’s primarily useful with gtk_text_iter_get_attributes().
+ * As with most GTK structs, the fields in this struct should only
+ * be read, never modified directly.
+ */
+struct _GtkTextAttributes
+{
+ guint refcount;
+
+ GtkJustification justification;
+ GtkTextDirection direction;
+ GtkWrapMode wrap_mode;
+
+ GtkTextAppearance appearance;
+
+ PangoFontDescription *font;
+ char *font_features;
+
+ GdkRGBA *pg_bg_rgba;
+
+ PangoTabArray *tabs;
+ PangoLanguage *language;
+
+ double font_scale;
+
+ int left_margin;
+ int right_margin;
+ int indent;
+
+ int pixels_above_lines;
+ int pixels_below_lines;
+ int pixels_inside_wrap;
+
+ float line_height;
+
+ int letter_spacing;
+
+ guint invisible : 1;
+ guint bg_full_height : 1;
+ guint editable : 1;
+ guint no_fallback: 1;
+ guint no_breaks : 1;
+ guint show_spaces : 3; /* PangoShowFlags */
+ guint no_hyphens : 1;
+ guint line_height_is_absolute : 1;
+ guint text_transform : 3; /* PangoTextTransform */
+ guint word : 1;
+ guint sentence : 1;
+};
+
+GtkTextAttributes* gtk_text_attributes_new (void);
+GtkTextAttributes* gtk_text_attributes_copy (GtkTextAttributes *src);
+void gtk_text_attributes_copy_values (GtkTextAttributes *src,
+ GtkTextAttributes *dest);
+void gtk_text_attributes_unref (GtkTextAttributes *values);
+GtkTextAttributes *gtk_text_attributes_ref (GtkTextAttributes *values);
+
+G_END_DECLS
+
+#endif
*/
#include "config.h"
-#include "gtktextbtree.h"
+#include "gtktextbtreeprivate.h"
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "gtktextiterprivate.h"
#include "gtkdebug.h"
#include "gtktextmarkprivate.h"
-#include "gtktextsegment.h"
-#include "gtkpango.h"
+#include "gtktextsegmentprivate.h"
+#include "gtkpangoprivate.h"
#include "gdkprivate.h"
/*
+++ /dev/null
-/* GTK - The GIMP Toolkit
- * gtktextbtree.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_BTREE_H__
-#define __GTK_TEXT_BTREE_H__
-
-#if 0
-#define DEBUG_VALIDATION_AND_SCROLLING
-#endif
-
-#ifdef DEBUG_VALIDATION_AND_SCROLLING
-#define DV(x) (x)
-#else
-#define DV(x)
-#endif
-
-#include <gtk/gtktextbuffer.h>
-#include <gtk/gtktexttag.h>
-#include <gtk/gtktextmark.h>
-#include <gtk/gtktextchild.h>
-#include <gtk/gtktextsegment.h>
-#include <gtk/gtktextiter.h>
-
-G_BEGIN_DECLS
-
-GtkTextBTree *_gtk_text_btree_new (GtkTextTagTable *table,
- GtkTextBuffer *buffer);
-void _gtk_text_btree_ref (GtkTextBTree *tree);
-void _gtk_text_btree_unref (GtkTextBTree *tree);
-GtkTextBuffer *_gtk_text_btree_get_buffer (GtkTextBTree *tree);
-
-
-guint _gtk_text_btree_get_chars_changed_stamp (GtkTextBTree *tree);
-guint _gtk_text_btree_get_segments_changed_stamp (GtkTextBTree *tree);
-void _gtk_text_btree_segments_changed (GtkTextBTree *tree);
-
-gboolean _gtk_text_btree_is_end (GtkTextBTree *tree,
- GtkTextLine *line,
- GtkTextLineSegment *seg,
- int byte_index,
- int char_offset);
-
-/* Indexable segment mutation */
-
-void _gtk_text_btree_delete (GtkTextIter *start,
- GtkTextIter *end);
-void _gtk_text_btree_insert (GtkTextIter *iter,
- const char *text,
- int len);
-void _gtk_text_btree_insert_paintable (GtkTextIter *iter,
- GdkPaintable *texture);
-
-void _gtk_text_btree_insert_child_anchor (GtkTextIter *iter,
- GtkTextChildAnchor *anchor);
-
-void _gtk_text_btree_unregister_child_anchor (GtkTextChildAnchor *anchor);
-
-/* View stuff */
-GtkTextLine *_gtk_text_btree_find_line_by_y (GtkTextBTree *tree,
- gpointer view_id,
- int ypixel,
- int *line_top_y);
-int _gtk_text_btree_find_line_top (GtkTextBTree *tree,
- GtkTextLine *line,
- gpointer view_id);
-void _gtk_text_btree_add_view (GtkTextBTree *tree,
- GtkTextLayout *layout);
-void _gtk_text_btree_remove_view (GtkTextBTree *tree,
- gpointer view_id);
-void _gtk_text_btree_invalidate_region (GtkTextBTree *tree,
- const GtkTextIter *start,
- const GtkTextIter *end,
- gboolean cursors_only);
-void _gtk_text_btree_get_view_size (GtkTextBTree *tree,
- gpointer view_id,
- int *width,
- int *height);
-gboolean _gtk_text_btree_is_valid (GtkTextBTree *tree,
- gpointer view_id);
-gboolean _gtk_text_btree_validate (GtkTextBTree *tree,
- gpointer view_id,
- int max_pixels,
- int *y,
- int *old_height,
- int *new_height);
-void _gtk_text_btree_validate_line (GtkTextBTree *tree,
- GtkTextLine *line,
- gpointer view_id);
-
-/* Tag */
-
-void _gtk_text_btree_tag (const GtkTextIter *start,
- const GtkTextIter *end,
- GtkTextTag *tag,
- gboolean apply);
-
-/* "Getters" */
-
-GtkTextLine * _gtk_text_btree_get_line (GtkTextBTree *tree,
- int line_number,
- int *real_line_number);
-GtkTextLine * _gtk_text_btree_get_line_no_last (GtkTextBTree *tree,
- int line_number,
- int *real_line_number);
-GtkTextLine * _gtk_text_btree_get_end_iter_line (GtkTextBTree *tree);
-GtkTextLine * _gtk_text_btree_get_line_at_char (GtkTextBTree *tree,
- int char_index,
- int *line_start_index,
- int *real_char_index);
-GPtrArray * _gtk_text_btree_get_tags (const GtkTextIter *iter);
-char *_gtk_text_btree_get_text (const GtkTextIter *start,
- const GtkTextIter *end,
- gboolean include_hidden,
- gboolean include_nonchars);
-int _gtk_text_btree_line_count (GtkTextBTree *tree);
-int _gtk_text_btree_char_count (GtkTextBTree *tree);
-gboolean _gtk_text_btree_char_is_invisible (const GtkTextIter *iter);
-
-
-
-/* Get iterators (these are implemented in gtktextiter.c) */
-void _gtk_text_btree_get_iter_at_char (GtkTextBTree *tree,
- GtkTextIter *iter,
- int char_index);
-void _gtk_text_btree_get_iter_at_line_char (GtkTextBTree *tree,
- GtkTextIter *iter,
- int line_number,
- int char_index);
-void _gtk_text_btree_get_iter_at_line_byte (GtkTextBTree *tree,
- GtkTextIter *iter,
- int line_number,
- int byte_index);
-gboolean _gtk_text_btree_get_iter_from_string (GtkTextBTree *tree,
- GtkTextIter *iter,
- const char *string);
-gboolean _gtk_text_btree_get_iter_at_mark_name (GtkTextBTree *tree,
- GtkTextIter *iter,
- const char *mark_name);
-void _gtk_text_btree_get_iter_at_mark (GtkTextBTree *tree,
- GtkTextIter *iter,
- GtkTextMark *mark);
-void _gtk_text_btree_get_iter_at_paintable (GtkTextBTree *tree,
- GtkTextIter *iter,
- GtkTextLineSegment *seg);
-void _gtk_text_btree_get_end_iter (GtkTextBTree *tree,
- GtkTextIter *iter);
-void _gtk_text_btree_get_iter_at_line (GtkTextBTree *tree,
- GtkTextIter *iter,
- GtkTextLine *line,
- int byte_offset);
-gboolean _gtk_text_btree_get_iter_at_first_toggle (GtkTextBTree *tree,
- GtkTextIter *iter,
- GtkTextTag *tag);
-gboolean _gtk_text_btree_get_iter_at_last_toggle (GtkTextBTree *tree,
- GtkTextIter *iter,
- GtkTextTag *tag);
-
-void _gtk_text_btree_get_iter_at_child_anchor (GtkTextBTree *tree,
- GtkTextIter *iter,
- GtkTextChildAnchor *anchor);
-
-
-
-/* Manipulate marks */
-GtkTextMark *_gtk_text_btree_set_mark (GtkTextBTree *tree,
- GtkTextMark *existing_mark,
- const char *name,
- gboolean left_gravity,
- const GtkTextIter *index,
- gboolean should_exist);
-void _gtk_text_btree_remove_mark_by_name (GtkTextBTree *tree,
- const char *name);
-void _gtk_text_btree_remove_mark (GtkTextBTree *tree,
- GtkTextMark *segment);
-gboolean _gtk_text_btree_get_selection_bounds (GtkTextBTree *tree,
- GtkTextIter *start,
- GtkTextIter *end);
-void _gtk_text_btree_place_cursor (GtkTextBTree *tree,
- const GtkTextIter *where);
-void _gtk_text_btree_select_range (GtkTextBTree *tree,
- const GtkTextIter *ins,
- const GtkTextIter *bound);
-gboolean _gtk_text_btree_mark_is_insert (GtkTextBTree *tree,
- GtkTextMark *segment);
-gboolean _gtk_text_btree_mark_is_selection_bound (GtkTextBTree *tree,
- GtkTextMark *segment);
-GtkTextMark *_gtk_text_btree_get_insert (GtkTextBTree *tree);
-GtkTextMark *_gtk_text_btree_get_selection_bound (GtkTextBTree *tree);
-GtkTextMark *_gtk_text_btree_get_mark_by_name (GtkTextBTree *tree,
- const char *name);
-GtkTextLine * _gtk_text_btree_first_could_contain_tag (GtkTextBTree *tree,
- GtkTextTag *tag);
-GtkTextLine * _gtk_text_btree_last_could_contain_tag (GtkTextBTree *tree,
- GtkTextTag *tag);
-
-/* Lines */
-
-/* Chunk of data associated with a line; views can use this to store
- info at the line. They should "subclass" the header struct here. */
-struct _GtkTextLineData {
- gpointer view_id;
- GtkTextLineData *next;
- int height;
- int top_ink : 16;
- int bottom_ink : 16;
- signed int width : 24;
- guint valid : 8; /* Actually a boolean */
-};
-
-/*
- * The data structure below defines a single line of text (from newline
- * to newline, not necessarily what appears on one line of the screen).
- *
- * You can consider this line a "paragraph" also
- */
-
-struct _GtkTextLine {
- GtkTextBTreeNode *parent; /* Pointer to parent node containing
- * line. */
- GtkTextLine *next; /* Next in linked list of lines with
- * same parent node in B-tree. NULL
- * means end of list. */
- GtkTextLineSegment *segments; /* First in ordered list of segments
- * that make up the line. */
- GtkTextLineData *views; /* data stored here by views */
- guchar dir_strong; /* BiDi algo dir of line */
- guchar dir_propagated_back; /* BiDi algo dir of next line */
- guchar dir_propagated_forward; /* BiDi algo dir of prev line */
-};
-
-
-int _gtk_text_line_get_number (GtkTextLine *line);
-gboolean _gtk_text_line_char_has_tag (GtkTextLine *line,
- GtkTextBTree *tree,
- int char_in_line,
- GtkTextTag *tag);
-gboolean _gtk_text_line_byte_has_tag (GtkTextLine *line,
- GtkTextBTree *tree,
- int byte_in_line,
- GtkTextTag *tag);
-gboolean _gtk_text_line_is_last (GtkTextLine *line,
- GtkTextBTree *tree);
-gboolean _gtk_text_line_contains_end_iter (GtkTextLine *line,
- GtkTextBTree *tree);
-GtkTextLine * _gtk_text_line_next (GtkTextLine *line);
-GtkTextLine * _gtk_text_line_next_excluding_last (GtkTextLine *line);
-GtkTextLine * _gtk_text_line_previous (GtkTextLine *line);
-void _gtk_text_line_add_data (GtkTextLine *line,
- GtkTextLineData *data);
-gpointer _gtk_text_line_remove_data (GtkTextLine *line,
- gpointer view_id);
-gpointer _gtk_text_line_get_data (GtkTextLine *line,
- gpointer view_id);
-void _gtk_text_line_invalidate_wrap (GtkTextLine *line,
- GtkTextLineData *ld);
-int _gtk_text_line_char_count (GtkTextLine *line);
-int _gtk_text_line_byte_count (GtkTextLine *line);
-int _gtk_text_line_char_index (GtkTextLine *line);
-GtkTextLineSegment *_gtk_text_line_byte_to_segment (GtkTextLine *line,
- int byte_offset,
- int *seg_offset);
-GtkTextLineSegment *_gtk_text_line_char_to_segment (GtkTextLine *line,
- int char_offset,
- int *seg_offset);
-gboolean _gtk_text_line_byte_locate (GtkTextLine *line,
- int byte_offset,
- GtkTextLineSegment **segment,
- GtkTextLineSegment **any_segment,
- int *seg_byte_offset,
- int *line_byte_offset);
-gboolean _gtk_text_line_char_locate (GtkTextLine *line,
- int char_offset,
- GtkTextLineSegment **segment,
- GtkTextLineSegment **any_segment,
- int *seg_char_offset,
- int *line_char_offset);
-void _gtk_text_line_byte_to_char_offsets (GtkTextLine *line,
- int byte_offset,
- int *line_char_offset,
- int *seg_char_offset);
-void _gtk_text_line_char_to_byte_offsets (GtkTextLine *line,
- int char_offset,
- int *line_byte_offset,
- int *seg_byte_offset);
-GtkTextLineSegment *_gtk_text_line_byte_to_any_segment (GtkTextLine *line,
- int byte_offset,
- int *seg_offset);
-GtkTextLineSegment *_gtk_text_line_char_to_any_segment (GtkTextLine *line,
- int char_offset,
- int *seg_offset);
-int _gtk_text_line_byte_to_char (GtkTextLine *line,
- int byte_offset);
-int _gtk_text_line_char_to_byte (GtkTextLine *line,
- int char_offset);
-GtkTextLine * _gtk_text_line_next_could_contain_tag (GtkTextLine *line,
- GtkTextBTree *tree,
- GtkTextTag *tag);
-GtkTextLine * _gtk_text_line_previous_could_contain_tag (GtkTextLine *line,
- GtkTextBTree *tree,
- GtkTextTag *tag);
-
-GtkTextLineData *_gtk_text_line_data_new (GtkTextLayout *layout,
- GtkTextLine *line);
-
-/* Debug */
-void _gtk_text_btree_check (GtkTextBTree *tree);
-void _gtk_text_btree_spew (GtkTextBTree *tree);
-extern gboolean _gtk_text_view_debug_btree;
-
-/* ignore, exported only for gtktextsegment.c */
-void _gtk_toggle_segment_check_func (GtkTextLineSegment *segPtr,
- GtkTextLine *line);
-void _gtk_change_node_toggle_count (GtkTextBTreeNode *node,
- GtkTextTagInfo *info,
- int delta);
-
-/* for gtktextmark.c */
-void _gtk_text_btree_release_mark_segment (GtkTextBTree *tree,
- GtkTextLineSegment *segment);
-
-/* for coordination with the tag table */
-void _gtk_text_btree_notify_will_remove_tag (GtkTextBTree *tree,
- GtkTextTag *tag);
-
-G_END_DECLS
-
-#endif
-
-
--- /dev/null
+/* GTK - The GIMP Toolkit
+ * gtktextbtree.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_BTREE_PRIVATE_H__
+#define __GTK_TEXT_BTREE_PRIVATE_H__
+
+#if 0
+#define DEBUG_VALIDATION_AND_SCROLLING
+#endif
+
+#ifdef DEBUG_VALIDATION_AND_SCROLLING
+#define DV(x) (x)
+#else
+#define DV(x)
+#endif
+
+#include <gtk/gtktextbuffer.h>
+#include <gtk/gtktexttag.h>
+#include <gtk/gtktextmark.h>
+#include <gtk/gtktextchild.h>
+#include <gtk/gtktextsegmentprivate.h>
+#include <gtk/gtktextiter.h>
+
+G_BEGIN_DECLS
+
+GtkTextBTree *_gtk_text_btree_new (GtkTextTagTable *table,
+ GtkTextBuffer *buffer);
+void _gtk_text_btree_ref (GtkTextBTree *tree);
+void _gtk_text_btree_unref (GtkTextBTree *tree);
+GtkTextBuffer *_gtk_text_btree_get_buffer (GtkTextBTree *tree);
+
+
+guint _gtk_text_btree_get_chars_changed_stamp (GtkTextBTree *tree);
+guint _gtk_text_btree_get_segments_changed_stamp (GtkTextBTree *tree);
+void _gtk_text_btree_segments_changed (GtkTextBTree *tree);
+
+gboolean _gtk_text_btree_is_end (GtkTextBTree *tree,
+ GtkTextLine *line,
+ GtkTextLineSegment *seg,
+ int byte_index,
+ int char_offset);
+
+/* Indexable segment mutation */
+
+void _gtk_text_btree_delete (GtkTextIter *start,
+ GtkTextIter *end);
+void _gtk_text_btree_insert (GtkTextIter *iter,
+ const char *text,
+ int len);
+void _gtk_text_btree_insert_paintable (GtkTextIter *iter,
+ GdkPaintable *texture);
+
+void _gtk_text_btree_insert_child_anchor (GtkTextIter *iter,
+ GtkTextChildAnchor *anchor);
+
+void _gtk_text_btree_unregister_child_anchor (GtkTextChildAnchor *anchor);
+
+/* View stuff */
+GtkTextLine *_gtk_text_btree_find_line_by_y (GtkTextBTree *tree,
+ gpointer view_id,
+ int ypixel,
+ int *line_top_y);
+int _gtk_text_btree_find_line_top (GtkTextBTree *tree,
+ GtkTextLine *line,
+ gpointer view_id);
+void _gtk_text_btree_add_view (GtkTextBTree *tree,
+ GtkTextLayout *layout);
+void _gtk_text_btree_remove_view (GtkTextBTree *tree,
+ gpointer view_id);
+void _gtk_text_btree_invalidate_region (GtkTextBTree *tree,
+ const GtkTextIter *start,
+ const GtkTextIter *end,
+ gboolean cursors_only);
+void _gtk_text_btree_get_view_size (GtkTextBTree *tree,
+ gpointer view_id,
+ int *width,
+ int *height);
+gboolean _gtk_text_btree_is_valid (GtkTextBTree *tree,
+ gpointer view_id);
+gboolean _gtk_text_btree_validate (GtkTextBTree *tree,
+ gpointer view_id,
+ int max_pixels,
+ int *y,
+ int *old_height,
+ int *new_height);
+void _gtk_text_btree_validate_line (GtkTextBTree *tree,
+ GtkTextLine *line,
+ gpointer view_id);
+
+/* Tag */
+
+void _gtk_text_btree_tag (const GtkTextIter *start,
+ const GtkTextIter *end,
+ GtkTextTag *tag,
+ gboolean apply);
+
+/* "Getters" */
+
+GtkTextLine * _gtk_text_btree_get_line (GtkTextBTree *tree,
+ int line_number,
+ int *real_line_number);
+GtkTextLine * _gtk_text_btree_get_line_no_last (GtkTextBTree *tree,
+ int line_number,
+ int *real_line_number);
+GtkTextLine * _gtk_text_btree_get_end_iter_line (GtkTextBTree *tree);
+GtkTextLine * _gtk_text_btree_get_line_at_char (GtkTextBTree *tree,
+ int char_index,
+ int *line_start_index,
+ int *real_char_index);
+GPtrArray * _gtk_text_btree_get_tags (const GtkTextIter *iter);
+char *_gtk_text_btree_get_text (const GtkTextIter *start,
+ const GtkTextIter *end,
+ gboolean include_hidden,
+ gboolean include_nonchars);
+int _gtk_text_btree_line_count (GtkTextBTree *tree);
+int _gtk_text_btree_char_count (GtkTextBTree *tree);
+gboolean _gtk_text_btree_char_is_invisible (const GtkTextIter *iter);
+
+
+
+/* Get iterators (these are implemented in gtktextiter.c) */
+void _gtk_text_btree_get_iter_at_char (GtkTextBTree *tree,
+ GtkTextIter *iter,
+ int char_index);
+void _gtk_text_btree_get_iter_at_line_char (GtkTextBTree *tree,
+ GtkTextIter *iter,
+ int line_number,
+ int char_index);
+void _gtk_text_btree_get_iter_at_line_byte (GtkTextBTree *tree,
+ GtkTextIter *iter,
+ int line_number,
+ int byte_index);
+gboolean _gtk_text_btree_get_iter_from_string (GtkTextBTree *tree,
+ GtkTextIter *iter,
+ const char *string);
+gboolean _gtk_text_btree_get_iter_at_mark_name (GtkTextBTree *tree,
+ GtkTextIter *iter,
+ const char *mark_name);
+void _gtk_text_btree_get_iter_at_mark (GtkTextBTree *tree,
+ GtkTextIter *iter,
+ GtkTextMark *mark);
+void _gtk_text_btree_get_iter_at_paintable (GtkTextBTree *tree,
+ GtkTextIter *iter,
+ GtkTextLineSegment *seg);
+void _gtk_text_btree_get_end_iter (GtkTextBTree *tree,
+ GtkTextIter *iter);
+void _gtk_text_btree_get_iter_at_line (GtkTextBTree *tree,
+ GtkTextIter *iter,
+ GtkTextLine *line,
+ int byte_offset);
+gboolean _gtk_text_btree_get_iter_at_first_toggle (GtkTextBTree *tree,
+ GtkTextIter *iter,
+ GtkTextTag *tag);
+gboolean _gtk_text_btree_get_iter_at_last_toggle (GtkTextBTree *tree,
+ GtkTextIter *iter,
+ GtkTextTag *tag);
+
+void _gtk_text_btree_get_iter_at_child_anchor (GtkTextBTree *tree,
+ GtkTextIter *iter,
+ GtkTextChildAnchor *anchor);
+
+
+
+/* Manipulate marks */
+GtkTextMark *_gtk_text_btree_set_mark (GtkTextBTree *tree,
+ GtkTextMark *existing_mark,
+ const char *name,
+ gboolean left_gravity,
+ const GtkTextIter *index,
+ gboolean should_exist);
+void _gtk_text_btree_remove_mark_by_name (GtkTextBTree *tree,
+ const char *name);
+void _gtk_text_btree_remove_mark (GtkTextBTree *tree,
+ GtkTextMark *segment);
+gboolean _gtk_text_btree_get_selection_bounds (GtkTextBTree *tree,
+ GtkTextIter *start,
+ GtkTextIter *end);
+void _gtk_text_btree_place_cursor (GtkTextBTree *tree,
+ const GtkTextIter *where);
+void _gtk_text_btree_select_range (GtkTextBTree *tree,
+ const GtkTextIter *ins,
+ const GtkTextIter *bound);
+gboolean _gtk_text_btree_mark_is_insert (GtkTextBTree *tree,
+ GtkTextMark *segment);
+gboolean _gtk_text_btree_mark_is_selection_bound (GtkTextBTree *tree,
+ GtkTextMark *segment);
+GtkTextMark *_gtk_text_btree_get_insert (GtkTextBTree *tree);
+GtkTextMark *_gtk_text_btree_get_selection_bound (GtkTextBTree *tree);
+GtkTextMark *_gtk_text_btree_get_mark_by_name (GtkTextBTree *tree,
+ const char *name);
+GtkTextLine * _gtk_text_btree_first_could_contain_tag (GtkTextBTree *tree,
+ GtkTextTag *tag);
+GtkTextLine * _gtk_text_btree_last_could_contain_tag (GtkTextBTree *tree,
+ GtkTextTag *tag);
+
+/* Lines */
+
+/* Chunk of data associated with a line; views can use this to store
+ info at the line. They should "subclass" the header struct here. */
+struct _GtkTextLineData {
+ gpointer view_id;
+ GtkTextLineData *next;
+ int height;
+ int top_ink : 16;
+ int bottom_ink : 16;
+ signed int width : 24;
+ guint valid : 8; /* Actually a boolean */
+};
+
+/*
+ * The data structure below defines a single line of text (from newline
+ * to newline, not necessarily what appears on one line of the screen).
+ *
+ * You can consider this line a "paragraph" also
+ */
+
+struct _GtkTextLine {
+ GtkTextBTreeNode *parent; /* Pointer to parent node containing
+ * line. */
+ GtkTextLine *next; /* Next in linked list of lines with
+ * same parent node in B-tree. NULL
+ * means end of list. */
+ GtkTextLineSegment *segments; /* First in ordered list of segments
+ * that make up the line. */
+ GtkTextLineData *views; /* data stored here by views */
+ guchar dir_strong; /* BiDi algo dir of line */
+ guchar dir_propagated_back; /* BiDi algo dir of next line */
+ guchar dir_propagated_forward; /* BiDi algo dir of prev line */
+};
+
+
+int _gtk_text_line_get_number (GtkTextLine *line);
+gboolean _gtk_text_line_char_has_tag (GtkTextLine *line,
+ GtkTextBTree *tree,
+ int char_in_line,
+ GtkTextTag *tag);
+gboolean _gtk_text_line_byte_has_tag (GtkTextLine *line,
+ GtkTextBTree *tree,
+ int byte_in_line,
+ GtkTextTag *tag);
+gboolean _gtk_text_line_is_last (GtkTextLine *line,
+ GtkTextBTree *tree);
+gboolean _gtk_text_line_contains_end_iter (GtkTextLine *line,
+ GtkTextBTree *tree);
+GtkTextLine * _gtk_text_line_next (GtkTextLine *line);
+GtkTextLine * _gtk_text_line_next_excluding_last (GtkTextLine *line);
+GtkTextLine * _gtk_text_line_previous (GtkTextLine *line);
+void _gtk_text_line_add_data (GtkTextLine *line,
+ GtkTextLineData *data);
+gpointer _gtk_text_line_remove_data (GtkTextLine *line,
+ gpointer view_id);
+gpointer _gtk_text_line_get_data (GtkTextLine *line,
+ gpointer view_id);
+void _gtk_text_line_invalidate_wrap (GtkTextLine *line,
+ GtkTextLineData *ld);
+int _gtk_text_line_char_count (GtkTextLine *line);
+int _gtk_text_line_byte_count (GtkTextLine *line);
+int _gtk_text_line_char_index (GtkTextLine *line);
+GtkTextLineSegment *_gtk_text_line_byte_to_segment (GtkTextLine *line,
+ int byte_offset,
+ int *seg_offset);
+GtkTextLineSegment *_gtk_text_line_char_to_segment (GtkTextLine *line,
+ int char_offset,
+ int *seg_offset);
+gboolean _gtk_text_line_byte_locate (GtkTextLine *line,
+ int byte_offset,
+ GtkTextLineSegment **segment,
+ GtkTextLineSegment **any_segment,
+ int *seg_byte_offset,
+ int *line_byte_offset);
+gboolean _gtk_text_line_char_locate (GtkTextLine *line,
+ int char_offset,
+ GtkTextLineSegment **segment,
+ GtkTextLineSegment **any_segment,
+ int *seg_char_offset,
+ int *line_char_offset);
+void _gtk_text_line_byte_to_char_offsets (GtkTextLine *line,
+ int byte_offset,
+ int *line_char_offset,
+ int *seg_char_offset);
+void _gtk_text_line_char_to_byte_offsets (GtkTextLine *line,
+ int char_offset,
+ int *line_byte_offset,
+ int *seg_byte_offset);
+GtkTextLineSegment *_gtk_text_line_byte_to_any_segment (GtkTextLine *line,
+ int byte_offset,
+ int *seg_offset);
+GtkTextLineSegment *_gtk_text_line_char_to_any_segment (GtkTextLine *line,
+ int char_offset,
+ int *seg_offset);
+int _gtk_text_line_byte_to_char (GtkTextLine *line,
+ int byte_offset);
+int _gtk_text_line_char_to_byte (GtkTextLine *line,
+ int char_offset);
+GtkTextLine * _gtk_text_line_next_could_contain_tag (GtkTextLine *line,
+ GtkTextBTree *tree,
+ GtkTextTag *tag);
+GtkTextLine * _gtk_text_line_previous_could_contain_tag (GtkTextLine *line,
+ GtkTextBTree *tree,
+ GtkTextTag *tag);
+
+GtkTextLineData *_gtk_text_line_data_new (GtkTextLayout *layout,
+ GtkTextLine *line);
+
+/* Debug */
+void _gtk_text_btree_check (GtkTextBTree *tree);
+void _gtk_text_btree_spew (GtkTextBTree *tree);
+extern gboolean _gtk_text_view_debug_btree;
+
+/* ignore, exported only for gtktextsegment.c */
+void _gtk_toggle_segment_check_func (GtkTextLineSegment *segPtr,
+ GtkTextLine *line);
+void _gtk_change_node_toggle_count (GtkTextBTreeNode *node,
+ GtkTextTagInfo *info,
+ int delta);
+
+/* for gtktextmark.c */
+void _gtk_text_btree_release_mark_segment (GtkTextBTree *tree,
+ GtkTextLineSegment *segment);
+
+/* for coordination with the tag table */
+void _gtk_text_btree_notify_will_remove_tag (GtkTextBTree *tree,
+ GtkTextTag *tag);
+
+G_END_DECLS
+
+#endif
+
+
#include "gtktextbuffer.h"
#include "gtktexthistoryprivate.h"
#include "gtktextbufferprivate.h"
-#include "gtktextbtree.h"
+#include "gtktextbtreeprivate.h"
#include "gtktextiterprivate.h"
#include "gtktexttagprivate.h"
#include "gtktexttagtableprivate.h"
-#include "gtkpango.h"
+#include "gtkpangoprivate.h"
#include "gtkprivate.h"
#define DEFAULT_MAX_UNDO 200
#define __GTK_TEXT_BUFFER_PRIVATE_H__
#include <gtk/gtktextbuffer.h>
-#include "gtktexttypes.h"
+#include "gtktexttypesprivate.h"
G_BEGIN_DECLS
#include "config.h"
#include "gtktextchild.h"
-#include "gtktextbtree.h"
+#include "gtktextbtreeprivate.h"
#include "gtktextlayoutprivate.h"
#include "gtkprivate.h"
#ifndef __GTK_TEXT_CHILD_PRIVATE_H__
#define __GTK_TEXT_CHILD_PRIVATE_H__
-#include <gtk/gtktexttypes.h>
+#include <gtk/gtktexttypesprivate.h>
G_BEGIN_DECLS
#include "config.h"
#include "gtktextiter.h"
-#include "gtktextbtree.h"
+#include "gtktextbtreeprivate.h"
#include "gtktextbufferprivate.h"
#include "gtktextiterprivate.h"
#include "gtkdebug.h"
G_BEGIN_DECLS
#include <gtk/gtktextiter.h>
-#include <gtk/gtktextbtree.h>
-#include <gtk/gtktextattributes.h>
+#include <gtk/gtktextbtreeprivate.h>
+#include <gtk/gtktextattributesprivate.h>
GtkTextLineSegment *_gtk_text_iter_get_indexable_segment (const GtkTextIter *iter);
GtkTextLineSegment *_gtk_text_iter_get_any_segment (const GtkTextIter *iter);
#include "gtkcsscolorvalueprivate.h"
#include "gtkmarshalers.h"
#include "gtkstylecontextprivate.h"
-#include "gtktextbtree.h"
+#include "gtktextbtreeprivate.h"
#include "gtktextbufferprivate.h"
#include "gtktextiterprivate.h"
#include "gtktextlinedisplaycacheprivate.h"
-#include "gtktextutil.h"
-#include "gskpango.h"
+#include "gtktextutilprivate.h"
+#include "gskpangoprivate.h"
#include "gtksnapshotprivate.h"
#include "gtkwidgetprivate.h"
#include "gtktextviewprivate.h"
#define __GTK_TEXT_LAYOUT_PRIVATE_H__
#include <gtk/gtk.h>
-#include <gtk/gtktextattributes.h>
+#include <gtk/gtktextattributesprivate.h>
G_BEGIN_DECLS
#include "config.h"
-#include "gtktextbtree.h"
+#include "gtktextbtreeprivate.h"
#include "gtktextbufferprivate.h"
#include "gtktextiterprivate.h"
#include "gtktextlinedisplaycacheprivate.h"
*/
#include "config.h"
-#include "gtktextbtree.h"
+#include "gtktextbtreeprivate.h"
#include "gtkprivate.h"
#ifndef __GTK_TEXT_MARK_PRIVATE_H__
#define __GTK_TEXT_MARK_PRIVATE_H__
-#include <gtk/gtktexttypes.h>
+#include <gtk/gtktexttypesprivate.h>
#include "gtktextlayoutprivate.h"
G_BEGIN_DECLS
*/
#include "config.h"
-#include "gtktextbtree.h"
+#include "gtktextbtreeprivate.h"
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
+++ /dev/null
-/* 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>
-#include <gtk/gtktextmarkprivate.h>
-#include <gtk/gtktextchild.h>
-#include <gtk/gtktextchildprivate.h>
-
-G_BEGIN_DECLS
-
-/*
- * Segments: each line is divided into one or more segments, where each
- * segment is one of several things, such as a group of characters, a
- * tag toggle, a mark, or an embedded widget. Each segment starts with
- * a standard header followed by a body that varies from type to type.
- */
-
-/* This header has the segment type, and two specific segments
- (character and toggle segments) */
-
-/* Information a BTree stores about a tag. */
-typedef struct _GtkTextTagInfo GtkTextTagInfo;
-struct _GtkTextTagInfo {
- GtkTextTag *tag;
- GtkTextBTreeNode *tag_root; /* highest-level node containing the tag */
- int toggle_count; /* total toggles of this tag below tag_root */
-};
-
-/* Body of a segment that toggles a tag on or off */
-struct _GtkTextToggleBody {
- GtkTextTagInfo *info; /* Tag that starts or ends here. */
- gboolean inNodeCounts; /* TRUE means this toggle has been
- * accounted for in node toggle
- * counts; FALSE means it hasn't, yet. */
-};
-
-
-/* Class struct for segments */
-
-/* Split seg at index, returning list of two new segments, and freeing seg */
-typedef GtkTextLineSegment* (*GtkTextSegSplitFunc) (GtkTextLineSegment *seg,
- int index);
-
-/* Delete seg which is contained in line; if tree_gone, the tree is being
- * freed in its entirety, which may matter for some reason (?)
- * Return TRUE if the segment is not deleteable, e.g. a mark.
- */
-typedef gboolean (*GtkTextSegDeleteFunc) (GtkTextLineSegment *seg,
- GtkTextLine *line,
- gboolean tree_gone);
-
-/* Called after segment structure of line changes, so segments can
- * cleanup (e.g. merge with adjacent segments). Returns a segment list
- * to replace the original segment list with. The line argument is
- * the current line.
- */
-typedef GtkTextLineSegment* (*GtkTextSegCleanupFunc) (GtkTextLineSegment *seg,
- GtkTextLine *line);
-
-/* Called when a segment moves from one line to another. CleanupFunc is also
- * called in that case, so many segments just use CleanupFunc, I'm not sure
- * what’s up with that (this function may not be needed...)
- */
-typedef void (*GtkTextSegLineChangeFunc) (GtkTextLineSegment *seg,
- GtkTextLine *line);
-
-/* Called to do debug checks on the segment. */
-typedef void (*GtkTextSegCheckFunc) (GtkTextLineSegment *seg,
- GtkTextLine *line);
-
-struct _GtkTextLineSegmentClass {
- const char *name; /* Name of this kind of segment. */
- gboolean leftGravity; /* If a segment has zero size (e.g. a
- * mark or tag toggle), does it
- * attach to character to its left
- * or right? 1 means left, 0 means
- * right. */
- GtkTextSegSplitFunc splitFunc; /* Procedure to split large segment
- * into two smaller ones. */
- 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). */
- 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. */
-
- GtkTextSegCheckFunc checkFunc; /* Called during consistency checks
- * to check internal consistency of
- * segment. */
-};
-
-/*
- * The data structure below defines line segments.
- */
-
-struct _GtkTextLineSegment {
- 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 {
- char chars[4]; /* Characters that make up character
- * info. Actual length varies to
- * hold as many characters as needed.*/
- GtkTextToggleBody toggle; /* Information about tag toggle. */
- GtkTextMarkBody mark; /* Information about mark. */
- GtkTextPaintable paintable; /* Child texture */
- GtkTextChildBody child; /* Child widget */
- } body;
-};
-
-
-GtkTextLineSegment *gtk_text_line_segment_split (const GtkTextIter *iter);
-
-GtkTextLineSegment *_gtk_char_segment_new (const char *text,
- guint len);
-GtkTextLineSegment *_gtk_char_segment_new_from_two_strings (const char *text1,
- guint len1,
- guint chars1,
- const char *text2,
- guint len2,
- guint chars2);
-GtkTextLineSegment *_gtk_toggle_segment_new (GtkTextTagInfo *info,
- gboolean on);
-
-void _gtk_toggle_segment_free (GtkTextLineSegment *seg);
-
-G_END_DECLS
-
-#endif
-
-
--- /dev/null
+/* 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_PRIVATE_H__
+#define __GTK_TEXT_SEGMENT_PRIVATE_H__
+
+#include <gtk/gtktexttag.h>
+#include <gtk/gtktextiter.h>
+#include <gtk/gtktextmarkprivate.h>
+#include <gtk/gtktextchild.h>
+#include <gtk/gtktextchildprivate.h>
+
+G_BEGIN_DECLS
+
+/*
+ * Segments: each line is divided into one or more segments, where each
+ * segment is one of several things, such as a group of characters, a
+ * tag toggle, a mark, or an embedded widget. Each segment starts with
+ * a standard header followed by a body that varies from type to type.
+ */
+
+/* This header has the segment type, and two specific segments
+ (character and toggle segments) */
+
+/* Information a BTree stores about a tag. */
+typedef struct _GtkTextTagInfo GtkTextTagInfo;
+struct _GtkTextTagInfo {
+ GtkTextTag *tag;
+ GtkTextBTreeNode *tag_root; /* highest-level node containing the tag */
+ int toggle_count; /* total toggles of this tag below tag_root */
+};
+
+/* Body of a segment that toggles a tag on or off */
+struct _GtkTextToggleBody {
+ GtkTextTagInfo *info; /* Tag that starts or ends here. */
+ gboolean inNodeCounts; /* TRUE means this toggle has been
+ * accounted for in node toggle
+ * counts; FALSE means it hasn't, yet. */
+};
+
+
+/* Class struct for segments */
+
+/* Split seg at index, returning list of two new segments, and freeing seg */
+typedef GtkTextLineSegment* (*GtkTextSegSplitFunc) (GtkTextLineSegment *seg,
+ int index);
+
+/* Delete seg which is contained in line; if tree_gone, the tree is being
+ * freed in its entirety, which may matter for some reason (?)
+ * Return TRUE if the segment is not deleteable, e.g. a mark.
+ */
+typedef gboolean (*GtkTextSegDeleteFunc) (GtkTextLineSegment *seg,
+ GtkTextLine *line,
+ gboolean tree_gone);
+
+/* Called after segment structure of line changes, so segments can
+ * cleanup (e.g. merge with adjacent segments). Returns a segment list
+ * to replace the original segment list with. The line argument is
+ * the current line.
+ */
+typedef GtkTextLineSegment* (*GtkTextSegCleanupFunc) (GtkTextLineSegment *seg,
+ GtkTextLine *line);
+
+/* Called when a segment moves from one line to another. CleanupFunc is also
+ * called in that case, so many segments just use CleanupFunc, I'm not sure
+ * what’s up with that (this function may not be needed...)
+ */
+typedef void (*GtkTextSegLineChangeFunc) (GtkTextLineSegment *seg,
+ GtkTextLine *line);
+
+/* Called to do debug checks on the segment. */
+typedef void (*GtkTextSegCheckFunc) (GtkTextLineSegment *seg,
+ GtkTextLine *line);
+
+struct _GtkTextLineSegmentClass {
+ const char *name; /* Name of this kind of segment. */
+ gboolean leftGravity; /* If a segment has zero size (e.g. a
+ * mark or tag toggle), does it
+ * attach to character to its left
+ * or right? 1 means left, 0 means
+ * right. */
+ GtkTextSegSplitFunc splitFunc; /* Procedure to split large segment
+ * into two smaller ones. */
+ 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). */
+ 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. */
+
+ GtkTextSegCheckFunc checkFunc; /* Called during consistency checks
+ * to check internal consistency of
+ * segment. */
+};
+
+/*
+ * The data structure below defines line segments.
+ */
+
+struct _GtkTextLineSegment {
+ 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 {
+ char chars[4]; /* Characters that make up character
+ * info. Actual length varies to
+ * hold as many characters as needed.*/
+ GtkTextToggleBody toggle; /* Information about tag toggle. */
+ GtkTextMarkBody mark; /* Information about mark. */
+ GtkTextPaintable paintable; /* Child texture */
+ GtkTextChildBody child; /* Child widget */
+ } body;
+};
+
+
+GtkTextLineSegment *gtk_text_line_segment_split (const GtkTextIter *iter);
+
+GtkTextLineSegment *_gtk_char_segment_new (const char *text,
+ guint len);
+GtkTextLineSegment *_gtk_char_segment_new_from_two_strings (const char *text1,
+ guint len1,
+ guint chars1,
+ const char *text2,
+ guint len2,
+ guint chars2);
+GtkTextLineSegment *_gtk_toggle_segment_new (GtkTextTagInfo *info,
+ gboolean on);
+
+void _gtk_toggle_segment_free (GtkTextLineSegment *seg);
+
+G_END_DECLS
+
+#endif
+
+
#include <string.h>
#include "gtktexttag.h"
-#include "gtktexttypes.h"
+#include "gtktexttypesprivate.h"
#include "gtktexttagtable.h"
#include "gtktexttagtableprivate.h"
#include "gtkmarshalers.h"
#define __GTK_TEXT_TAG_PRIVATE_H__
#include <gtk/gtk.h>
-#include <gtk/gtktextattributes.h>
+#include <gtk/gtktextattributesprivate.h>
typedef struct _GtkTextBTreeNode GtkTextBTreeNode;
*/
#include "config.h"
-#include "gtktexttypes.h"
+#include "gtktexttypesprivate.h"
/* These are used to represent embedded non-character objects
* if you return a string representation of a text buffer
+++ /dev/null
-/* GTK - The GIMP Toolkit
- * gtktexttypes.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_TYPES_H__
-#define __GTK_TEXT_TYPES_H__
-
-#include <gtk/gtk.h>
-#include <gtk/gtktexttagprivate.h>
-
-G_BEGIN_DECLS
-
-/*
- * This is the PUBLIC representation of a text buffer.
- * GtkTextBTree is the PRIVATE internal representation of it.
- */
-
-typedef struct _GtkTextBTree GtkTextBTree;
-
-typedef struct _GtkTextCounter GtkTextCounter;
-typedef struct _GtkTextLineSegment GtkTextLineSegment;
-typedef struct _GtkTextLineSegmentClass GtkTextLineSegmentClass;
-typedef struct _GtkTextToggleBody GtkTextToggleBody;
-typedef struct _GtkTextMarkBody GtkTextMarkBody;
-
-/*
- * Declarations for variables shared among the text-related files:
- */
-
-/* In gtktextbtree.c */
-extern G_GNUC_INTERNAL const GtkTextLineSegmentClass gtk_text_char_type;
-extern G_GNUC_INTERNAL const GtkTextLineSegmentClass gtk_text_toggle_on_type;
-extern G_GNUC_INTERNAL const GtkTextLineSegmentClass gtk_text_toggle_off_type;
-
-/* In gtktextmark.c */
-extern G_GNUC_INTERNAL const GtkTextLineSegmentClass gtk_text_left_mark_type;
-extern G_GNUC_INTERNAL const GtkTextLineSegmentClass gtk_text_right_mark_type;
-
-/* In gtktextchild.c */
-extern G_GNUC_INTERNAL const GtkTextLineSegmentClass gtk_text_paintable_type;
-extern G_GNUC_INTERNAL const GtkTextLineSegmentClass gtk_text_child_type;
-
-/*
- * UTF 8 Stubs
- */
-
-#define GTK_TEXT_UNKNOWN_CHAR 0xFFFC
-#define GTK_TEXT_UNKNOWN_CHAR_UTF8_LEN 3
-GDK_AVAILABLE_IN_ALL
-const char *gtk_text_unknown_char_utf8_gtk_tests_only (void);
-extern const char _gtk_text_unknown_char_utf8[GTK_TEXT_UNKNOWN_CHAR_UTF8_LEN+1];
-
-GDK_AVAILABLE_IN_ALL
-gboolean gtk_text_byte_begins_utf8_char (const char *byte);
-
-G_END_DECLS
-
-#endif
-
--- /dev/null
+/* GTK - The GIMP Toolkit
+ * gtktexttypes.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_TYPES_PRIVATE_H__
+#define __GTK_TEXT_TYPES_PRIVATE_H__
+
+#include <gtk/gtk.h>
+#include <gtk/gtktexttagprivate.h>
+
+G_BEGIN_DECLS
+
+/*
+ * This is the PUBLIC representation of a text buffer.
+ * GtkTextBTree is the PRIVATE internal representation of it.
+ */
+
+typedef struct _GtkTextBTree GtkTextBTree;
+
+typedef struct _GtkTextCounter GtkTextCounter;
+typedef struct _GtkTextLineSegment GtkTextLineSegment;
+typedef struct _GtkTextLineSegmentClass GtkTextLineSegmentClass;
+typedef struct _GtkTextToggleBody GtkTextToggleBody;
+typedef struct _GtkTextMarkBody GtkTextMarkBody;
+
+/*
+ * Declarations for variables shared among the text-related files:
+ */
+
+/* In gtktextbtree.c */
+extern G_GNUC_INTERNAL const GtkTextLineSegmentClass gtk_text_char_type;
+extern G_GNUC_INTERNAL const GtkTextLineSegmentClass gtk_text_toggle_on_type;
+extern G_GNUC_INTERNAL const GtkTextLineSegmentClass gtk_text_toggle_off_type;
+
+/* In gtktextmark.c */
+extern G_GNUC_INTERNAL const GtkTextLineSegmentClass gtk_text_left_mark_type;
+extern G_GNUC_INTERNAL const GtkTextLineSegmentClass gtk_text_right_mark_type;
+
+/* In gtktextchild.c */
+extern G_GNUC_INTERNAL const GtkTextLineSegmentClass gtk_text_paintable_type;
+extern G_GNUC_INTERNAL const GtkTextLineSegmentClass gtk_text_child_type;
+
+/*
+ * UTF 8 Stubs
+ */
+
+#define GTK_TEXT_UNKNOWN_CHAR 0xFFFC
+#define GTK_TEXT_UNKNOWN_CHAR_UTF8_LEN 3
+GDK_AVAILABLE_IN_ALL
+const char *gtk_text_unknown_char_utf8_gtk_tests_only (void);
+extern const char _gtk_text_unknown_char_utf8[GTK_TEXT_UNKNOWN_CHAR_UTF8_LEN+1];
+
+GDK_AVAILABLE_IN_ALL
+gboolean gtk_text_byte_begins_utf8_char (const char *byte);
+
+G_END_DECLS
+
+#endif
+
#include "config.h"
#include "gtktextview.h"
-#include "gtktextutil.h"
+#include "gtktextutilprivate.h"
#include "gtkcsscolorvalueprivate.h"
#include "gtkstylecontextprivate.h"
+++ /dev/null
-/* GTK - The GIMP Toolkit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- *
- * 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-2001. 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_UTIL_H__
-#define __GTK_TEXT_UTIL_H__
-
-G_BEGIN_DECLS
-
-#include "gtktextbuffer.h"
-
-/* This is a private uninstalled header shared between
- * GtkTextView and GtkEntry
- */
-
-GdkPaintable * gtk_text_util_create_drag_icon (GtkWidget *widget,
- char *text,
- gssize len);
-GdkPaintable * gtk_text_util_create_rich_drag_icon (GtkWidget *widget,
- GtkTextBuffer *buffer,
- GtkTextIter *start,
- GtkTextIter *end);
-
-gboolean _gtk_text_util_get_block_cursor_location (PangoLayout *layout,
- int index_,
- PangoRectangle *rectangle,
- gboolean *at_line_end);
-
-G_END_DECLS
-
-#endif /* __GTK_TEXT_UTIL_H__ */
--- /dev/null
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
+ *
+ * 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-2001. 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_UTIL_PRIVATE_H__
+#define __GTK_TEXT_UTIL_PRIVATE_H__
+
+G_BEGIN_DECLS
+
+#include "gtktextbuffer.h"
+
+/* This is a private uninstalled header shared between
+ * GtkTextView and GtkEntry
+ */
+
+GdkPaintable * gtk_text_util_create_drag_icon (GtkWidget *widget,
+ char *text,
+ gssize len);
+GdkPaintable * gtk_text_util_create_rich_drag_icon (GtkWidget *widget,
+ GtkTextBuffer *buffer,
+ GtkTextIter *start,
+ GtkTextIter *end);
+
+gboolean _gtk_text_util_get_block_cursor_location (PangoLayout *layout,
+ int index_,
+ PangoRectangle *rectangle,
+ gboolean *at_line_end);
+
+G_END_DECLS
+
+#endif /* __GTK_TEXT_UTIL_PRIVATE_H__ */
#include "gtktextiterprivate.h"
#include "gtkimmulticontext.h"
#include "gtkprivate.h"
-#include "gtktextutil.h"
+#include "gtktextutilprivate.h"
#include "gtkwidgetprivate.h"
#include "gtkwindow.h"
#include "gtkscrollable.h"
#include "gtkpopover.h"
#include "gtkmagnifierprivate.h"
#include "gtkemojichooser.h"
-#include "gtkpango.h"
+#include "gtkpangoprivate.h"
#include "gtknative.h"
#include "gtkwidgetprivate.h"
#include "gtkjoinedmenuprivate.h"
#define __GTK_TEXT_VIEW_PRIVATE_H__
#include "gtktextview.h"
-#include "gtktextattributes.h"
+#include "gtktextattributesprivate.h"
#include "gtkcssnodeprivate.h"
G_BEGIN_DECLS
#include "gtkprivate.h"
#include "gtkmarshalers.h"
-#include "gtktrashmonitor.h"
+#include "gtktrashmonitorprivate.h"
#define UPDATE_RATE_SECONDS 1
+++ /dev/null
-/* GTK - The GIMP Toolkit
- * gtktrashmonitor.h: Monitor the trash:/// folder to see if there is trash or not
- * Copyright (C) 2011 Suse
- *
- * This program 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.1 of the
- * License, or (at your option) any later version.
- *
- * This program 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 program; if not, see <http://www.gnu.org/licenses/>.
- *
- * Authors: Federico Mena Quintero <federico@gnome.org>
- */
-
-#ifndef __GTK_TRASH_MONITOR_H__
-#define __GTK_TRASH_MONITOR_H__
-
-#include <gio/gio.h>
-
-G_BEGIN_DECLS
-
-#define GTK_TYPE_TRASH_MONITOR (_gtk_trash_monitor_get_type ())
-#define GTK_TRASH_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TRASH_MONITOR, GtkTrashMonitor))
-#define GTK_TRASH_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TRASH_MONITOR, GtkTrashMonitorClass))
-#define GTK_IS_TRASH_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TRASH_MONITOR))
-#define GTK_IS_TRASH_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TRASH_MONITOR))
-#define GTK_TRASH_MONITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TRASH_MONITOR, GtkTrashMonitorClass))
-
-typedef struct _GtkTrashMonitor GtkTrashMonitor;
-typedef struct _GtkTrashMonitorClass GtkTrashMonitorClass;
-
-GType _gtk_trash_monitor_get_type (void);
-GtkTrashMonitor *_gtk_trash_monitor_get (void);
-
-GIcon *_gtk_trash_monitor_get_icon (GtkTrashMonitor *monitor);
-
-gboolean _gtk_trash_monitor_get_has_trash (GtkTrashMonitor *monitor);
-
-G_END_DECLS
-
-#endif /* __GTK_TRASH_MONITOR_H__ */
--- /dev/null
+/* GTK - The GIMP Toolkit
+ * gtktrashmonitor.h: Monitor the trash:/// folder to see if there is trash or not
+ * Copyright (C) 2011 Suse
+ *
+ * This program 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.1 of the
+ * License, or (at your option) any later version.
+ *
+ * This program 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 program; if not, see <http://www.gnu.org/licenses/>.
+ *
+ * Authors: Federico Mena Quintero <federico@gnome.org>
+ */
+
+#ifndef __GTK_TRASH_MONITOR_PRIVATE_H__
+#define __GTK_TRASH_MONITOR_PRIVATE_H__
+
+#include <gio/gio.h>
+
+G_BEGIN_DECLS
+
+#define GTK_TYPE_TRASH_MONITOR (_gtk_trash_monitor_get_type ())
+#define GTK_TRASH_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TRASH_MONITOR, GtkTrashMonitor))
+#define GTK_TRASH_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TRASH_MONITOR, GtkTrashMonitorClass))
+#define GTK_IS_TRASH_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TRASH_MONITOR))
+#define GTK_IS_TRASH_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TRASH_MONITOR))
+#define GTK_TRASH_MONITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TRASH_MONITOR, GtkTrashMonitorClass))
+
+typedef struct _GtkTrashMonitor GtkTrashMonitor;
+typedef struct _GtkTrashMonitorClass GtkTrashMonitorClass;
+
+GType _gtk_trash_monitor_get_type (void);
+GtkTrashMonitor *_gtk_trash_monitor_get (void);
+
+GIcon *_gtk_trash_monitor_get_icon (GtkTrashMonitor *monitor);
+
+gboolean _gtk_trash_monitor_get_has_trash (GtkTrashMonitor *monitor);
+
+G_END_DECLS
+
+#endif /* __GTK_TRASH_MONITOR_PRIVATE_H__ */
*/
#include "config.h"
-#include "gtktreedatalist.h"
+#include "gtktreedatalistprivate.h"
#include <string.h>
/* node allocation
+++ /dev/null
-/* gtktreedatalist.h
- * Copyright (C) 2000 Red Hat, Inc., Jonathan Blandford <jrb@redhat.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library 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
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef __GTK_TREE_DATA_LIST_H__
-#define __GTK_TREE_DATA_LIST_H__
-
-#include <gtk/gtktreemodel.h>
-#include <gtk/gtktreesortable.h>
-
-typedef struct _GtkTreeDataList GtkTreeDataList;
-struct _GtkTreeDataList
-{
- GtkTreeDataList *next;
-
- union {
- int v_int;
- gint8 v_char;
- guint8 v_uchar;
- guint v_uint;
- glong v_long;
- gulong v_ulong;
- gint64 v_int64;
- guint64 v_uint64;
- float v_float;
- double v_double;
- gpointer v_pointer;
- } data;
-};
-
-typedef struct _GtkTreeDataSortHeader
-{
- int sort_column_id;
- GtkTreeIterCompareFunc func;
- gpointer data;
- GDestroyNotify destroy;
-} GtkTreeDataSortHeader;
-
-GtkTreeDataList *_gtk_tree_data_list_alloc (void);
-void _gtk_tree_data_list_free (GtkTreeDataList *list,
- GType *column_headers);
-gboolean _gtk_tree_data_list_check_type (GType type);
-void _gtk_tree_data_list_node_to_value (GtkTreeDataList *list,
- GType type,
- GValue *value);
-void _gtk_tree_data_list_value_to_node (GtkTreeDataList *list,
- GValue *value);
-
-GtkTreeDataList *_gtk_tree_data_list_node_copy (GtkTreeDataList *list,
- GType type);
-
-/* Header code */
-int _gtk_tree_data_list_compare_func (GtkTreeModel *model,
- GtkTreeIter *a,
- GtkTreeIter *b,
- gpointer user_data);
-GList * _gtk_tree_data_list_header_new (int n_columns,
- GType *types);
-void _gtk_tree_data_list_header_free (GList *header_list);
-GtkTreeDataSortHeader *_gtk_tree_data_list_get_header (GList *header_list,
- int sort_column_id);
-GList *_gtk_tree_data_list_set_header (GList *header_list,
- int sort_column_id,
- GtkTreeIterCompareFunc func,
- gpointer data,
- GDestroyNotify destroy);
-
-#endif /* __GTK_TREE_DATA_LIST_H__ */
--- /dev/null
+/* gtktreedatalist.h
+ * Copyright (C) 2000 Red Hat, Inc., Jonathan Blandford <jrb@redhat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __GTK_TREE_DATA_LIST_PRIVATE_H__
+#define __GTK_TREE_DATA_LIST_PRIVATE_H__
+
+#include <gtk/gtktreemodel.h>
+#include <gtk/gtktreesortable.h>
+
+typedef struct _GtkTreeDataList GtkTreeDataList;
+struct _GtkTreeDataList
+{
+ GtkTreeDataList *next;
+
+ union {
+ int v_int;
+ gint8 v_char;
+ guint8 v_uchar;
+ guint v_uint;
+ glong v_long;
+ gulong v_ulong;
+ gint64 v_int64;
+ guint64 v_uint64;
+ float v_float;
+ double v_double;
+ gpointer v_pointer;
+ } data;
+};
+
+typedef struct _GtkTreeDataSortHeader
+{
+ int sort_column_id;
+ GtkTreeIterCompareFunc func;
+ gpointer data;
+ GDestroyNotify destroy;
+} GtkTreeDataSortHeader;
+
+GtkTreeDataList *_gtk_tree_data_list_alloc (void);
+void _gtk_tree_data_list_free (GtkTreeDataList *list,
+ GType *column_headers);
+gboolean _gtk_tree_data_list_check_type (GType type);
+void _gtk_tree_data_list_node_to_value (GtkTreeDataList *list,
+ GType type,
+ GValue *value);
+void _gtk_tree_data_list_value_to_node (GtkTreeDataList *list,
+ GValue *value);
+
+GtkTreeDataList *_gtk_tree_data_list_node_copy (GtkTreeDataList *list,
+ GType type);
+
+/* Header code */
+int _gtk_tree_data_list_compare_func (GtkTreeModel *model,
+ GtkTreeIter *a,
+ GtkTreeIter *b,
+ gpointer user_data);
+GList * _gtk_tree_data_list_header_new (int n_columns,
+ GType *types);
+void _gtk_tree_data_list_header_free (GList *header_list);
+GtkTreeDataSortHeader *_gtk_tree_data_list_get_header (GList *header_list,
+ int sort_column_id);
+GList *_gtk_tree_data_list_set_header (GList *header_list,
+ int sort_column_id,
+ GtkTreeIterCompareFunc func,
+ gpointer data,
+ GDestroyNotify destroy);
+
+#endif /* __GTK_TREE_DATA_LIST_PRIVATE_H__ */
#include "gtktreemodelsort.h"
#include "gtktreesortable.h"
#include "gtktreestore.h"
-#include "gtktreedatalist.h"
+#include "gtktreedatalistprivate.h"
#include "gtkprivate.h"
#include "gtktreednd.h"
#include <gobject/gvaluecollector.h>
#include "gtktreemodel.h"
#include "gtktreestore.h"
-#include "gtktreedatalist.h"
+#include "gtktreedatalistprivate.h"
#include "gtktreednd.h"
#include "gtkbuildable.h"
#include "gtkbuilderprivate.h"
#include <string.h>
#include <gtk/gtk.h>
-#include "gtk/gtktexttypes.h" /* Private header, for UNKNOWN_CHAR */
+#include "gtk/gtktexttypesprivate.h" /* Private header, for UNKNOWN_CHAR */
#include "gtk/gtktextbufferprivate.h" /* Private header */
static void