Blame pango/pango-item.h

Packit 0ec9dd
/* Pango
Packit 0ec9dd
 * pango-item.h: Structure for storing run information
Packit 0ec9dd
 *
Packit 0ec9dd
 * Copyright (C) 2000 Red Hat Software
Packit 0ec9dd
 *
Packit 0ec9dd
 * This library is free software; you can redistribute it and/or
Packit 0ec9dd
 * modify it under the terms of the GNU Library General Public
Packit 0ec9dd
 * License as published by the Free Software Foundation; either
Packit 0ec9dd
 * version 2 of the License, or (at your option) any later version.
Packit 0ec9dd
 *
Packit 0ec9dd
 * This library is distributed in the hope that it will be useful,
Packit 0ec9dd
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 0ec9dd
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
Packit 0ec9dd
 * Library General Public License for more details.
Packit 0ec9dd
 *
Packit 0ec9dd
 * You should have received a copy of the GNU Library General Public
Packit 0ec9dd
 * License along with this library; if not, write to the
Packit 0ec9dd
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Packit 0ec9dd
 * Boston, MA 02111-1307, USA.
Packit 0ec9dd
 */
Packit 0ec9dd
Packit 0ec9dd
#ifndef __PANGO_ITEM_H__
Packit 0ec9dd
#define __PANGO_ITEM_H__
Packit 0ec9dd
Packit 0ec9dd
#include <pango/pango-types.h>
Packit 0ec9dd
Packit 0ec9dd
G_BEGIN_DECLS
Packit 0ec9dd
Packit 0ec9dd
typedef struct _PangoAnalysis PangoAnalysis;
Packit 0ec9dd
typedef struct _PangoItem PangoItem;
Packit 0ec9dd
Packit 0ec9dd
/**
Packit 0ec9dd
 * PANGO_ANALYSIS_FLAG_CENTERED_BASELINE:
Packit 0ec9dd
 *
Packit 0ec9dd
 * Whether the segment should be shifted to center around the baseline.
Packit 0ec9dd
 * Used in vertical writing directions mostly.
Packit 0ec9dd
 *
Packit 0ec9dd
 * Since: 1.16
Packit 0ec9dd
 */
Packit 0ec9dd
#define PANGO_ANALYSIS_FLAG_CENTERED_BASELINE (1 << 0)
Packit 0ec9dd
Packit 0ec9dd
/**
Packit 0ec9dd
 * PANGO_ANALYSIS_FLAG_IS_ELLIPSIS:
Packit 0ec9dd
 *
Packit 0ec9dd
 * This flag is used to mark runs that hold ellipsized text,
Packit 0ec9dd
 * in an ellipsized layout.
Packit 0ec9dd
 *
Packit 0ec9dd
 * Since: 1.36.7
Packit 0ec9dd
 */
Packit 0ec9dd
#define PANGO_ANALYSIS_FLAG_IS_ELLIPSIS (1 << 1)
Packit 0ec9dd
Packit 0ec9dd
/**
Packit 0ec9dd
 * PangoAnalysis:
Packit 0ec9dd
 * @shape_engine: the engine for doing rendering-system-dependent processing.
Packit 0ec9dd
 * @lang_engine: the engine for doing rendering-system-independent processing.
Packit 0ec9dd
 * @font: the font for this segment.
Packit 0ec9dd
 * @level: the bidirectional level for this segment.
Packit 0ec9dd
 * @gravity: the glyph orientation for this segment (A #PangoGravity).
Packit 0ec9dd
 * @flags: boolean flags for this segment (currently only one) (Since: 1.16).
Packit 0ec9dd
 * @script: the detected script for this segment (A #PangoScript) (Since: 1.18).
Packit 0ec9dd
 * @language: the detected language for this segment.
Packit 0ec9dd
 * @extra_attrs: extra attributes for this segment.
Packit 0ec9dd
 *
Packit 0ec9dd
 * The #PangoAnalysis structure stores information about
Packit 0ec9dd
 * the properties of a segment of text.
Packit 0ec9dd
 */
Packit 0ec9dd
struct _PangoAnalysis
Packit 0ec9dd
{
Packit 0ec9dd
  PangoEngineShape *shape_engine;
Packit 0ec9dd
  PangoEngineLang  *lang_engine;
Packit 0ec9dd
  PangoFont *font;
Packit 0ec9dd
Packit 0ec9dd
  guint8 level;
Packit 0ec9dd
  guint8 gravity; /* PangoGravity */
Packit 0ec9dd
  guint8 flags;
Packit 0ec9dd
Packit 0ec9dd
  guint8 script; /* PangoScript */
Packit 0ec9dd
  PangoLanguage *language;
Packit 0ec9dd
Packit 0ec9dd
  GSList *extra_attrs;
Packit 0ec9dd
};
Packit 0ec9dd
Packit 0ec9dd
/**
Packit 0ec9dd
 * PangoItem:
Packit 0ec9dd
 * @offset: byte offset of the start of this item in text.
Packit 0ec9dd
 * @length: length of this item in bytes.
Packit 0ec9dd
 * @num_chars: number of Unicode characters in the item.
Packit 0ec9dd
 * @analysis: analysis results for the item.
Packit 0ec9dd
 *
Packit 0ec9dd
 * The #PangoItem structure stores information about a segment of text.
Packit 0ec9dd
 */
Packit 0ec9dd
struct _PangoItem
Packit 0ec9dd
{
Packit 0ec9dd
  gint offset;
Packit 0ec9dd
  gint length;
Packit 0ec9dd
  gint num_chars;
Packit 0ec9dd
  PangoAnalysis analysis;
Packit 0ec9dd
};
Packit 0ec9dd
Packit 0ec9dd
#define PANGO_TYPE_ITEM (pango_item_get_type ())
Packit 0ec9dd
Packit 0ec9dd
PANGO_AVAILABLE_IN_ALL
Packit 0ec9dd
GType pango_item_get_type (void) G_GNUC_CONST;
Packit 0ec9dd
Packit 0ec9dd
PANGO_AVAILABLE_IN_ALL
Packit 0ec9dd
PangoItem *pango_item_new   (void);
Packit 0ec9dd
PANGO_AVAILABLE_IN_ALL
Packit 0ec9dd
PangoItem *pango_item_copy  (PangoItem  *item);
Packit 0ec9dd
PANGO_AVAILABLE_IN_ALL
Packit 0ec9dd
void       pango_item_free  (PangoItem  *item);
Packit 0ec9dd
PANGO_AVAILABLE_IN_ALL
Packit 0ec9dd
PangoItem *pango_item_split (PangoItem  *orig,
Packit 0ec9dd
			     int         split_index,
Packit 0ec9dd
			     int         split_offset);
Packit 0ec9dd
Packit 0ec9dd
G_END_DECLS
Packit 0ec9dd
Packit 0ec9dd
#endif /* __PANGO_ITEM_H__ */