Blame gtk/gtktextlayout.h

Packit 98cdb6
/* GTK - The GIMP Toolkit
Packit 98cdb6
 * gtktextlayout.h
Packit 98cdb6
 *
Packit 98cdb6
 * Copyright (c) 1992-1994 The Regents of the University of California.
Packit 98cdb6
 * Copyright (c) 1994-1997 Sun Microsystems, Inc.
Packit 98cdb6
 * Copyright (c) 2000 Red Hat, Inc.
Packit 98cdb6
 * Tk->Gtk port by Havoc Pennington
Packit 98cdb6
 * Pango support by Owen Taylor
Packit 98cdb6
 *
Packit 98cdb6
 * This file can be used under your choice of two licenses, the LGPL
Packit 98cdb6
 * and the original Tk license.
Packit 98cdb6
 *
Packit 98cdb6
 * LGPL:
Packit 98cdb6
 *
Packit 98cdb6
 * This library is free software; you can redistribute it and/or
Packit 98cdb6
 * modify it under the terms of the GNU Lesser General Public
Packit 98cdb6
 * License as published by the Free Software Foundation; either
Packit 98cdb6
 * version 2 of the License, or (at your option) any later version.
Packit 98cdb6
 *
Packit 98cdb6
 * This library is distributed in the hope that it will be useful,
Packit 98cdb6
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 98cdb6
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 98cdb6
 * Lesser General Public License for more details.
Packit 98cdb6
 *
Packit 98cdb6
 * You should have received a copy of the GNU Lesser General Public
Packit 98cdb6
 * License along with this library; if not, write to the Free
Packit 98cdb6
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Packit 98cdb6
 *
Packit 98cdb6
 * Original Tk license:
Packit 98cdb6
 *
Packit 98cdb6
 * This software is copyrighted by the Regents of the University of
Packit 98cdb6
 * California, Sun Microsystems, Inc., and other parties.  The
Packit 98cdb6
 * following terms apply to all files associated with the software
Packit 98cdb6
 * unless explicitly disclaimed in individual files.
Packit 98cdb6
 *
Packit 98cdb6
 * The authors hereby grant permission to use, copy, modify,
Packit 98cdb6
 * distribute, and license this software and its documentation for any
Packit 98cdb6
 * purpose, provided that existing copyright notices are retained in
Packit 98cdb6
 * all copies and that this notice is included verbatim in any
Packit 98cdb6
 * distributions. No written agreement, license, or royalty fee is
Packit 98cdb6
 * required for any of the authorized uses.  Modifications to this
Packit 98cdb6
 * software may be copyrighted by their authors and need not follow
Packit 98cdb6
 * the licensing terms described here, provided that the new terms are
Packit 98cdb6
 * clearly indicated on the first page of each file where they apply.
Packit 98cdb6
 *
Packit 98cdb6
 * IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY
Packit 98cdb6
 * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
Packit 98cdb6
 * DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION,
Packit 98cdb6
 * OR ANY DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED
Packit 98cdb6
 * OF THE POSSIBILITY OF SUCH DAMAGE.
Packit 98cdb6
 *
Packit 98cdb6
 * THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
Packit 98cdb6
 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
Packit 98cdb6
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
Packit 98cdb6
 * NON-INFRINGEMENT.  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS,
Packit 98cdb6
 * AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
Packit 98cdb6
 * MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
Packit 98cdb6
 *
Packit 98cdb6
 * GOVERNMENT USE: If you are acquiring this software on behalf of the
Packit 98cdb6
 * U.S. government, the Government shall have only "Restricted Rights"
Packit 98cdb6
 * in the software and related documentation as defined in the Federal
Packit 98cdb6
 * Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2).  If you
Packit 98cdb6
 * are acquiring the software on behalf of the Department of Defense,
Packit 98cdb6
 * the software shall be classified as "Commercial Computer Software"
Packit 98cdb6
 * and the Government shall have only "Restricted Rights" as defined
Packit 98cdb6
 * in Clause 252.227-7013 (c) (1) of DFARs.  Notwithstanding the
Packit 98cdb6
 * foregoing, the authors grant the U.S. Government and others acting
Packit 98cdb6
 * in its behalf permission to use and distribute the software in
Packit 98cdb6
 * accordance with the terms specified in this license.
Packit 98cdb6
 *
Packit 98cdb6
 */
Packit 98cdb6
/*
Packit 98cdb6
 * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
Packit 98cdb6
 * file for a list of people on the GTK+ Team.  See the ChangeLog
Packit 98cdb6
 * files for a list of changes.  These files are distributed with
Packit 98cdb6
 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
Packit 98cdb6
 */
Packit 98cdb6
Packit 98cdb6
#ifndef __GTK_TEXT_LAYOUT_H__
Packit 98cdb6
#define __GTK_TEXT_LAYOUT_H__
Packit 98cdb6
Packit 98cdb6
/* This is a "semi-private" header; it is intended for
Packit 98cdb6
 * use by the text widget, and the text canvas item,
Packit 98cdb6
 * but that's all. We may have to install it so the
Packit 98cdb6
 * canvas item can use it, but users are not supposed
Packit 98cdb6
 * to use it.
Packit 98cdb6
 */
Packit 98cdb6
#ifndef GTK_TEXT_USE_INTERNAL_UNSUPPORTED_API
Packit 98cdb6
#error "You are not supposed to be including this file; the equivalent public API is in gtktextview.h"
Packit 98cdb6
#endif
Packit 98cdb6
Packit 98cdb6
#include <gtk/gtk.h>
Packit 98cdb6
Packit 98cdb6
G_BEGIN_DECLS
Packit 98cdb6
Packit 98cdb6
/* forward declarations that have to be here to avoid including
Packit 98cdb6
 * gtktextbtree.h
Packit 98cdb6
 */
Packit 98cdb6
typedef struct _GtkTextLine     GtkTextLine;
Packit 98cdb6
typedef struct _GtkTextLineData GtkTextLineData;
Packit 98cdb6
Packit 98cdb6
#define GTK_TYPE_TEXT_LAYOUT             (gtk_text_layout_get_type ())
Packit 98cdb6
#define GTK_TEXT_LAYOUT(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TEXT_LAYOUT, GtkTextLayout))
Packit 98cdb6
#define GTK_TEXT_LAYOUT_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TEXT_LAYOUT, GtkTextLayoutClass))
Packit 98cdb6
#define GTK_IS_TEXT_LAYOUT(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TEXT_LAYOUT))
Packit 98cdb6
#define GTK_IS_TEXT_LAYOUT_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TEXT_LAYOUT))
Packit 98cdb6
#define GTK_TEXT_LAYOUT_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TEXT_LAYOUT, GtkTextLayoutClass))
Packit 98cdb6
Packit 98cdb6
typedef struct _GtkTextLayout         GtkTextLayout;
Packit 98cdb6
typedef struct _GtkTextLayoutClass    GtkTextLayoutClass;
Packit 98cdb6
typedef struct _GtkTextLineDisplay    GtkTextLineDisplay;
Packit 98cdb6
typedef struct _GtkTextCursorDisplay  GtkTextCursorDisplay;
Packit 98cdb6
typedef struct _GtkTextAttrAppearance GtkTextAttrAppearance;
Packit 98cdb6
Packit 98cdb6
struct _GtkTextLayout
Packit 98cdb6
{
Packit 98cdb6
  GObject parent_instance;
Packit 98cdb6
Packit 98cdb6
  /* width of the display area on-screen,
Packit 98cdb6
   * i.e. pixels we should wrap to fit inside. */
Packit 98cdb6
  gint screen_width;
Packit 98cdb6
Packit 98cdb6
  /* width/height of the total logical area being layed out */
Packit 98cdb6
  gint width;
Packit 98cdb6
  gint height;
Packit 98cdb6
Packit 98cdb6
  /* Pixel offsets from the left and from the top to be used when we
Packit 98cdb6
   * draw; these allow us to create left/top margins. We don't need
Packit 98cdb6
   * anything special for bottom/right margins, because those don't
Packit 98cdb6
   * affect drawing.
Packit 98cdb6
   */
Packit 98cdb6
  /* gint left_edge; */
Packit 98cdb6
  /* gint top_edge; */
Packit 98cdb6
Packit 98cdb6
  GtkTextBuffer *buffer;
Packit 98cdb6
Packit 98cdb6
  /* Default style used if no tags override it */
Packit 98cdb6
  GtkTextAttributes *default_style;
Packit 98cdb6
Packit 98cdb6
  /* Pango contexts used for creating layouts */
Packit 98cdb6
  PangoContext *ltr_context;
Packit 98cdb6
  PangoContext *rtl_context;
Packit 98cdb6
Packit 98cdb6
  /* A cache of one style; this is used to ensure
Packit 98cdb6
   * we don't constantly regenerate the style
Packit 98cdb6
   * over long runs with the same style. */
Packit 98cdb6
  GtkTextAttributes *one_style_cache;
Packit 98cdb6
Packit 98cdb6
  /* A cache of one line display. Getting the same line
Packit 98cdb6
   * many times in a row is the most common case.
Packit 98cdb6
   */
Packit 98cdb6
  GtkTextLineDisplay *one_display_cache;
Packit 98cdb6
Packit 98cdb6
  /* Whether we are allowed to wrap right now */
Packit 98cdb6
  gint wrap_loop_count;
Packit 98cdb6
  
Packit 98cdb6
  /* Whether to show the insertion cursor */
Packit 98cdb6
  guint cursor_visible : 1;
Packit 98cdb6
Packit 98cdb6
  /* For what GtkTextDirection to draw cursor GTK_TEXT_DIR_NONE -
Packit 98cdb6
   * means draw both cursors.
Packit 98cdb6
   */
Packit 98cdb6
  guint cursor_direction : 2;
Packit 98cdb6
Packit 98cdb6
  /* The keyboard direction is used to default the alignment when
Packit 98cdb6
     there are no strong characters.
Packit 98cdb6
  */
Packit 98cdb6
  guint keyboard_direction : 2;
Packit 98cdb6
Packit 98cdb6
  /* The preedit string and attributes, if any */
Packit 98cdb6
Packit 98cdb6
  gchar *preedit_string;
Packit 98cdb6
  PangoAttrList *preedit_attrs;
Packit 98cdb6
  gint preedit_len;
Packit 98cdb6
  gint preedit_cursor;
Packit 98cdb6
Packit 98cdb6
  guint overwrite_mode : 1;
Packit 98cdb6
};
Packit 98cdb6
Packit 98cdb6
struct _GtkTextLayoutClass
Packit 98cdb6
{
Packit 98cdb6
  GObjectClass parent_class;
Packit 98cdb6
Packit 98cdb6
  /* Some portion of the layout was invalidated
Packit 98cdb6
   */
Packit 98cdb6
  void  (*invalidated)  (GtkTextLayout *layout);
Packit 98cdb6
Packit 98cdb6
  /* A range of the layout changed appearance and possibly height
Packit 98cdb6
   */
Packit 98cdb6
  void  (*changed)              (GtkTextLayout     *layout,
Packit 98cdb6
                                 gint               y,
Packit 98cdb6
                                 gint               old_height,
Packit 98cdb6
                                 gint               new_height);
Packit 98cdb6
  GtkTextLineData* (*wrap)      (GtkTextLayout     *layout,
Packit 98cdb6
                                 GtkTextLine       *line,
Packit 98cdb6
                                 GtkTextLineData   *line_data); /* may be NULL */
Packit 98cdb6
  void  (*get_log_attrs)        (GtkTextLayout     *layout,
Packit 98cdb6
                                 GtkTextLine       *line,
Packit 98cdb6
                                 PangoLogAttr     **attrs,
Packit 98cdb6
                                 gint              *n_attrs);
Packit 98cdb6
  void  (*invalidate)           (GtkTextLayout     *layout,
Packit 98cdb6
                                 const GtkTextIter *start,
Packit 98cdb6
                                 const GtkTextIter *end);
Packit 98cdb6
  void  (*free_line_data)       (GtkTextLayout     *layout,
Packit 98cdb6
                                 GtkTextLine       *line,
Packit 98cdb6
                                 GtkTextLineData   *line_data);
Packit 98cdb6
Packit 98cdb6
  void (*allocate_child)        (GtkTextLayout     *layout,
Packit 98cdb6
                                 GtkWidget         *child,
Packit 98cdb6
                                 gint               x,
Packit 98cdb6
                                 gint               y);
Packit 98cdb6
Packit 98cdb6
  void (*invalidate_cursors)    (GtkTextLayout     *layout,
Packit 98cdb6
                                 const GtkTextIter *start,
Packit 98cdb6
                                 const GtkTextIter *end);
Packit 98cdb6
Packit 98cdb6
  /* Padding for future expansion */
Packit 98cdb6
  void (*_gtk_reserved1) (void);
Packit 98cdb6
  void (*_gtk_reserved2) (void);
Packit 98cdb6
  void (*_gtk_reserved3) (void);
Packit 98cdb6
};
Packit 98cdb6
Packit 98cdb6
struct _GtkTextAttrAppearance
Packit 98cdb6
{
Packit 98cdb6
  PangoAttribute attr;
Packit 98cdb6
  GtkTextAppearance appearance;
Packit 98cdb6
};
Packit 98cdb6
struct _GtkTextCursorDisplay
Packit 98cdb6
{
Packit 98cdb6
  gint x;
Packit 98cdb6
  gint y;
Packit 98cdb6
  gint height;
Packit 98cdb6
  guint is_strong : 1;
Packit 98cdb6
  guint is_weak : 1;
Packit 98cdb6
};
Packit 98cdb6
struct _GtkTextLineDisplay
Packit 98cdb6
{
Packit 98cdb6
  PangoLayout *layout;
Packit 98cdb6
  GSList *cursors;
Packit 98cdb6
  GSList *shaped_objects;	/* Only for backwards compatibility */
Packit 98cdb6
  
Packit 98cdb6
  GtkTextDirection direction;
Packit 98cdb6
Packit 98cdb6
  gint width;                   /* Width of layout */
Packit 98cdb6
  gint total_width;             /* width - margins, if no width set on layout, if width set on layout, -1 */
Packit 98cdb6
  gint height;
Packit 98cdb6
  /* Amount layout is shifted from left edge - this is the left margin
Packit 98cdb6
   * plus any other factors, such as alignment or indentation.
Packit 98cdb6
   */
Packit 98cdb6
  gint x_offset;
Packit 98cdb6
  gint left_margin;
Packit 98cdb6
  gint right_margin;
Packit 98cdb6
  gint top_margin;
Packit 98cdb6
  gint bottom_margin;
Packit 98cdb6
  gint insert_index;		/* Byte index of insert cursor within para or -1 */
Packit 98cdb6
Packit 98cdb6
  gboolean size_only;
Packit 98cdb6
  GtkTextLine *line;
Packit 98cdb6
  
Packit 98cdb6
  GdkColor *pg_bg_color;
Packit 98cdb6
Packit 98cdb6
  GdkRectangle block_cursor;
Packit 98cdb6
  guint cursors_invalid : 1;
Packit 98cdb6
  guint has_block_cursor : 1;
Packit 98cdb6
  guint cursor_at_line_end : 1;
Packit 98cdb6
};
Packit 98cdb6
Packit 98cdb6
extern PangoAttrType gtk_text_attr_appearance_type;
Packit 98cdb6
Packit 98cdb6
GType         gtk_text_layout_get_type    (void) G_GNUC_CONST;
Packit 98cdb6
Packit 98cdb6
GtkTextLayout*     gtk_text_layout_new                   (void);
Packit 98cdb6
void               gtk_text_layout_set_buffer            (GtkTextLayout     *layout,
Packit 98cdb6
							  GtkTextBuffer     *buffer);
Packit 98cdb6
GtkTextBuffer     *gtk_text_layout_get_buffer            (GtkTextLayout     *layout);
Packit 98cdb6
void               gtk_text_layout_set_default_style     (GtkTextLayout     *layout,
Packit 98cdb6
							  GtkTextAttributes *values);
Packit 98cdb6
void               gtk_text_layout_set_contexts          (GtkTextLayout     *layout,
Packit 98cdb6
							  PangoContext      *ltr_context,
Packit 98cdb6
							  PangoContext      *rtl_context);
Packit 98cdb6
void               gtk_text_layout_set_cursor_direction  (GtkTextLayout     *layout,
Packit 98cdb6
                                                          GtkTextDirection   direction);
Packit 98cdb6
void		   gtk_text_layout_set_overwrite_mode	 (GtkTextLayout     *layout,
Packit 98cdb6
							  gboolean           overwrite);
Packit 98cdb6
void               gtk_text_layout_set_keyboard_direction (GtkTextLayout     *layout,
Packit 98cdb6
							   GtkTextDirection keyboard_dir);
Packit 98cdb6
void               gtk_text_layout_default_style_changed (GtkTextLayout     *layout);
Packit 98cdb6
Packit 98cdb6
void gtk_text_layout_set_screen_width       (GtkTextLayout     *layout,
Packit 98cdb6
                                             gint               width);
Packit 98cdb6
void gtk_text_layout_set_preedit_string     (GtkTextLayout     *layout,
Packit 98cdb6
 					     const gchar       *preedit_string,
Packit 98cdb6
 					     PangoAttrList     *preedit_attrs,
Packit 98cdb6
 					     gint               cursor_pos);
Packit 98cdb6
Packit 98cdb6
void     gtk_text_layout_set_cursor_visible (GtkTextLayout     *layout,
Packit 98cdb6
                                             gboolean           cursor_visible);
Packit 98cdb6
gboolean gtk_text_layout_get_cursor_visible (GtkTextLayout     *layout);
Packit 98cdb6
Packit 98cdb6
/* Getting the size or the lines potentially results in a call to
Packit 98cdb6
 * recompute, which is pretty massively expensive. Thus it should
Packit 98cdb6
 * basically only be done in an idle handler.
Packit 98cdb6
 *
Packit 98cdb6
 * Long-term, we would really like to be able to do these without
Packit 98cdb6
 * a full recompute so they may get cheaper over time.
Packit 98cdb6
 */
Packit 98cdb6
void    gtk_text_layout_get_size  (GtkTextLayout  *layout,
Packit 98cdb6
                                   gint           *width,
Packit 98cdb6
                                   gint           *height);
Packit 98cdb6
GSList* gtk_text_layout_get_lines (GtkTextLayout  *layout,
Packit 98cdb6
                                   /* [top_y, bottom_y) */
Packit 98cdb6
                                   gint            top_y,
Packit 98cdb6
                                   gint            bottom_y,
Packit 98cdb6
                                   gint           *first_line_y);
Packit 98cdb6
Packit 98cdb6
void gtk_text_layout_wrap_loop_start (GtkTextLayout *layout);
Packit 98cdb6
void gtk_text_layout_wrap_loop_end   (GtkTextLayout *layout);
Packit 98cdb6
Packit 98cdb6
GtkTextLineDisplay* gtk_text_layout_get_line_display  (GtkTextLayout      *layout,
Packit 98cdb6
                                                       GtkTextLine        *line,
Packit 98cdb6
                                                       gboolean            size_only);
Packit 98cdb6
void                gtk_text_layout_free_line_display (GtkTextLayout      *layout,
Packit 98cdb6
                                                       GtkTextLineDisplay *display);
Packit 98cdb6
Packit 98cdb6
void gtk_text_layout_get_line_at_y     (GtkTextLayout     *layout,
Packit 98cdb6
                                        GtkTextIter       *target_iter,
Packit 98cdb6
                                        gint               y,
Packit 98cdb6
                                        gint              *line_top);
Packit 98cdb6
void gtk_text_layout_get_iter_at_pixel (GtkTextLayout     *layout,
Packit 98cdb6
                                        GtkTextIter       *iter,
Packit 98cdb6
                                        gint               x,
Packit 98cdb6
                                        gint               y);
Packit 98cdb6
void gtk_text_layout_get_iter_at_position (GtkTextLayout     *layout,
Packit 98cdb6
					   GtkTextIter       *iter,
Packit 98cdb6
					   gint              *trailing,
Packit 98cdb6
					   gint               x,
Packit 98cdb6
					   gint               y);
Packit 98cdb6
void gtk_text_layout_invalidate        (GtkTextLayout     *layout,
Packit 98cdb6
                                        const GtkTextIter *start,
Packit 98cdb6
                                        const GtkTextIter *end);
Packit 98cdb6
void gtk_text_layout_invalidate_cursors(GtkTextLayout     *layout,
Packit 98cdb6
                                        const GtkTextIter *start,
Packit 98cdb6
                                        const GtkTextIter *end);
Packit 98cdb6
void gtk_text_layout_free_line_data    (GtkTextLayout     *layout,
Packit 98cdb6
                                        GtkTextLine       *line,
Packit 98cdb6
                                        GtkTextLineData   *line_data);
Packit 98cdb6
Packit 98cdb6
gboolean gtk_text_layout_is_valid        (GtkTextLayout *layout);
Packit 98cdb6
void     gtk_text_layout_validate_yrange (GtkTextLayout *layout,
Packit 98cdb6
                                          GtkTextIter   *anchor_line,
Packit 98cdb6
                                          gint           y0_,
Packit 98cdb6
                                          gint           y1_);
Packit 98cdb6
void     gtk_text_layout_validate        (GtkTextLayout *layout,
Packit 98cdb6
                                          gint           max_pixels);
Packit 98cdb6
Packit 98cdb6
/* This function should return the passed-in line data,
Packit 98cdb6
 * OR remove the existing line data from the line, and
Packit 98cdb6
 * return a NEW line data after adding it to the line.
Packit 98cdb6
 * That is, invariant after calling the callback is that
Packit 98cdb6
 * there should be exactly one line data for this view
Packit 98cdb6
 * stored on the btree line.
Packit 98cdb6
 */
Packit 98cdb6
GtkTextLineData* gtk_text_layout_wrap  (GtkTextLayout   *layout,
Packit 98cdb6
                                        GtkTextLine     *line,
Packit 98cdb6
                                        GtkTextLineData *line_data); /* may be NULL */
Packit 98cdb6
void     gtk_text_layout_changed              (GtkTextLayout     *layout,
Packit 98cdb6
                                               gint               y,
Packit 98cdb6
                                               gint               old_height,
Packit 98cdb6
                                               gint               new_height);
Packit 98cdb6
void     gtk_text_layout_cursors_changed      (GtkTextLayout     *layout,
Packit 98cdb6
                                               gint               y,
Packit 98cdb6
                                               gint               old_height,
Packit 98cdb6
                                               gint               new_height);
Packit 98cdb6
void     gtk_text_layout_get_iter_location    (GtkTextLayout     *layout,
Packit 98cdb6
                                               const GtkTextIter *iter,
Packit 98cdb6
                                               GdkRectangle      *rect);
Packit 98cdb6
void     gtk_text_layout_get_line_yrange      (GtkTextLayout     *layout,
Packit 98cdb6
                                               const GtkTextIter *iter,
Packit 98cdb6
                                               gint              *y,
Packit 98cdb6
                                               gint              *height);
Packit 98cdb6
void     _gtk_text_layout_get_line_xrange     (GtkTextLayout     *layout,
Packit 98cdb6
                                               const GtkTextIter *iter,
Packit 98cdb6
                                               gint              *x,
Packit 98cdb6
                                               gint              *width);
Packit 98cdb6
void     gtk_text_layout_get_cursor_locations (GtkTextLayout     *layout,
Packit 98cdb6
                                               GtkTextIter       *iter,
Packit 98cdb6
                                               GdkRectangle      *strong_pos,
Packit 98cdb6
                                               GdkRectangle      *weak_pos);
Packit 98cdb6
gboolean _gtk_text_layout_get_block_cursor    (GtkTextLayout     *layout,
Packit 98cdb6
					       GdkRectangle      *pos);
Packit 98cdb6
gboolean gtk_text_layout_clamp_iter_to_vrange (GtkTextLayout     *layout,
Packit 98cdb6
                                               GtkTextIter       *iter,
Packit 98cdb6
                                               gint               top,
Packit 98cdb6
                                               gint               bottom);
Packit 98cdb6
Packit 98cdb6
gboolean gtk_text_layout_move_iter_to_line_end      (GtkTextLayout *layout,
Packit 98cdb6
                                                     GtkTextIter   *iter,
Packit 98cdb6
                                                     gint           direction);
Packit 98cdb6
gboolean gtk_text_layout_move_iter_to_previous_line (GtkTextLayout *layout,
Packit 98cdb6
                                                     GtkTextIter   *iter);
Packit 98cdb6
gboolean gtk_text_layout_move_iter_to_next_line     (GtkTextLayout *layout,
Packit 98cdb6
                                                     GtkTextIter   *iter);
Packit 98cdb6
void     gtk_text_layout_move_iter_to_x             (GtkTextLayout *layout,
Packit 98cdb6
                                                     GtkTextIter   *iter,
Packit 98cdb6
                                                     gint           x);
Packit 98cdb6
gboolean gtk_text_layout_move_iter_visually         (GtkTextLayout *layout,
Packit 98cdb6
                                                     GtkTextIter   *iter,
Packit 98cdb6
                                                     gint           count);
Packit 98cdb6
Packit 98cdb6
gboolean gtk_text_layout_iter_starts_line           (GtkTextLayout       *layout,
Packit 98cdb6
                                                     const GtkTextIter   *iter);
Packit 98cdb6
Packit 98cdb6
void     gtk_text_layout_get_iter_at_line           (GtkTextLayout *layout,
Packit 98cdb6
                                                     GtkTextIter    *iter,
Packit 98cdb6
                                                     GtkTextLine    *line,
Packit 98cdb6
                                                     gint            byte_offset);
Packit 98cdb6
Packit 98cdb6
/* Don't use these. Use gtk_text_view_add_child_at_anchor().
Packit 98cdb6
 * These functions are defined in gtktextchild.c, but here
Packit 98cdb6
 * since they are semi-public and require GtkTextLayout to
Packit 98cdb6
 * be declared.
Packit 98cdb6
 */
Packit 98cdb6
void gtk_text_child_anchor_register_child   (GtkTextChildAnchor *anchor,
Packit 98cdb6
                                             GtkWidget          *child,
Packit 98cdb6
                                             GtkTextLayout      *layout);
Packit 98cdb6
void gtk_text_child_anchor_unregister_child (GtkTextChildAnchor *anchor,
Packit 98cdb6
                                             GtkWidget          *child);
Packit 98cdb6
Packit 98cdb6
void gtk_text_child_anchor_queue_resize     (GtkTextChildAnchor *anchor,
Packit 98cdb6
                                             GtkTextLayout      *layout);
Packit 98cdb6
Packit 98cdb6
void gtk_text_anchored_child_set_layout     (GtkWidget          *child,
Packit 98cdb6
                                             GtkTextLayout      *layout);
Packit 98cdb6
Packit 98cdb6
void gtk_text_layout_spew (GtkTextLayout *layout);
Packit 98cdb6
Packit 98cdb6
G_END_DECLS
Packit 98cdb6
Packit 98cdb6
#endif  /* __GTK_TEXT_LAYOUT_H__ */