Blame pango/src/attributes.hg

Packit 78284e
/* attributes.h
Packit 78284e
 *
Packit 78284e
 * Copyright (C) 2002 The gtkmm Development Team
Packit 78284e
 *
Packit 78284e
 * This library is free software; you can redistribute it and/or
Packit 78284e
 * modify it under the terms of the GNU Lesser General Public
Packit 78284e
 * License as published by the Free Software Foundation; either
Packit 78284e
 * version 2.1 of the License, or (at your option) any later version.
Packit 78284e
 *
Packit 78284e
 * This library is distributed in the hope that it will be useful,
Packit 78284e
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 78284e
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 78284e
 * Lesser General Public License for more details.
Packit 78284e
 *
Packit 78284e
 * You should have received a copy of the GNU Lesser General Public
Packit 78284e
 * License along with this library; if not, write to the Free
Packit 78284e
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Packit 78284e
 */
Packit 78284e
Packit 78284e
#include <pangomm/language.h>
Packit 78284e
#include <pangomm/rectangle.h>
Packit 78284e
#include <pangomm/color.h>
Packit 78284e
#include <pangomm/fontdescription.h>
Packit 78284e
#include <pango/pango-attributes.h>
Packit 78284e
#include <glibmm/slisthandle.h>
Packit 78284e
Packit 78284e
_DEFS(pangomm,pango)
Packit 78284e
Packit 78284e
namespace Pango
Packit 78284e
{
Packit 78284e
Packit 78284e
_CC_INCLUDE(pango/pango-enum-types.h)
Packit 78284e
Packit 78284e
/** Pango::AttrType distinguishes between different types of attributes.
Packit 78284e
 * Along with the predefined values, it is possible to allocate additional values for
Packit 78284e
 * custom attributes using Pango::Attribute::register_type(). The predefined values
Packit 78284e
 * are given below.
Packit 78284e
 */
Packit 78284e
_WRAP_ENUM(AttrType, PangoAttrType)
Packit 78284e
Packit 78284e
Packit 78284e
/** A Pango::Underline is used to specify whether text should be underlined, and if so, the type of underlining.
Packit 78284e
 */
Packit 78284e
_WRAP_ENUM(Underline, PangoUnderline)
Packit 78284e
Packit 78284e
Packit 78284e
/** A Pango::LogAttr stores information about the attributes of a single character.
Packit 78284e
 */
Packit 78284e
typedef PangoLogAttr LogAttr;
Packit 78284e
Packit 78284e
Packit 78284e
class AttrString;
Packit 78284e
class AttrLanguage;
Packit 78284e
class AttrColor;
Packit 78284e
class AttrInt;
Packit 78284e
class AttrFloat;
Packit 78284e
class AttrFontDesc;
Packit 78284e
class AttrShape;
Packit 78284e
Packit 78284e
/** The Pango::Attribute structure represents the common portions of all attributes.
Packit 78284e
 * Particular types of attributes derive this class. It holds the range in which the
Packit 78284e
 * value in the type-specific part of the attribute applies.
Packit 78284e
 *
Packit 78284e
 * Attributed text is used in a number of places in pango. It is used as the input to
Packit 78284e
 * the itemization process and also when creating a Pango::Layout.
Packit 78284e
 */
Packit 78284e
class Attribute
Packit 78284e
{
Packit 78284e
  _CLASS_GENERIC(Attribute, PangoAttribute)
Packit 78284e
  _IGNORE(pango_attribute_copy,pango_attribute_destroy)
Packit 78284e
Packit 78284e
public:
Packit 78284e
  /** Constructs an invalid attribute.
Packit 78284e
   */
Packit 78284e
  Attribute();
Packit 78284e
Packit 78284e
  Attribute(const Attribute& src);
Packit 78284e
  explicit Attribute(PangoAttribute* castitem, bool take_copy=true);
Packit 78284e
  ~Attribute();
Packit 78284e
Packit 78284e
  Attribute& operator=(const Attribute& src);
Packit 78284e
Packit 78284e
  /** Gets the type ID for this attribute.
Packit 78284e
   * @return The type ID for this attribute or ATTR_INVALID if the attribute is invalid.
Packit 78284e
   */
Packit 78284e
  AttrType get_type() const;
Packit 78284e
Packit 78284e
  /** Allocate a new attribute type ID.
Packit 78284e
   * @param name An identifier for the type (currently unused).
Packit 78284e
   * @return The new type ID.
Packit 78284e
   */
Packit 78284e
  static AttrType register_type(const Glib::ustring& name);
Packit 78284e
Packit 78284e
  /** Gets the start index of the range.
Packit 78284e
   * @return The start index of the range.
Packit 78284e
   */
Packit 78284e
  _MEMBER_GET(start_index, start_index, unsigned int, guint)
Packit 78284e
Packit 78284e
  /** Gets the end index of the range. The character at this index is not included in the range.
Packit 78284e
   * @return The end index of the range.
Packit 78284e
   */
Packit 78284e
  _MEMBER_GET(end_index, end_index, unsigned int, guint)
Packit 78284e
Packit 78284e
  /** Sets the start index of the range.
Packit 78284e
   * @param value The new start index (in bytes).
Packit 78284e
   */
Packit 78284e
  _MEMBER_SET(start_index, start_index, unsigned int, guint)
Packit 78284e
Packit 78284e
  /** Sets the end index of the range. The character at this index is not included in the range.
Packit 78284e
   * @param value The new end index (in bytes).
Packit 78284e
   */
Packit 78284e
  _MEMBER_SET(end_index, end_index, unsigned int, guint)
Packit 78284e
Packit 78284e
  _WRAP_METHOD(bool equal(const Attribute& attr2) const, pango_attribute_equal)
Packit 78284e
Packit 78284e
  /// Provides access to the underlying C GObject.  
Packit 78284e
  PangoAttribute*       gobj()       { return gobject_; }
Packit 78284e
  /// Provides access to the underlying C GObject.
Packit 78284e
  const PangoAttribute* gobj() const { return gobject_; }
Packit 78284e
Packit 78284e
  /** Create a new font family attribute.
Packit 78284e
   * @param family The family or comma separated list of families.
Packit 78284e
   * @return An attribute of type AttrString.
Packit 78284e
   */
Packit 78284e
  static AttrString create_attr_family(const Glib::ustring& family);
Packit 78284e
Packit 78284e
  /** Create a new language tag attribute
Packit 78284e
   * @param language The language tag.
Packit 78284e
   * @return An attribute of type AttrLanguage.
Packit 78284e
   */
Packit 78284e
  static AttrLanguage create_attr_language(const Language& language);
Packit 78284e
Packit 78284e
  /** Create a new foreground color attribute.
Packit 78284e
   * @param red The red value (ranging from 0 to 65535).
Packit 78284e
   * @param green The green value (ranging from 0 to 65535).
Packit 78284e
   * @param blue The blue value (ranging from 0 to 65535).
Packit 78284e
   * @return An attribute of type AttrColor.
Packit 78284e
   */
Packit 78284e
  static AttrColor create_attr_foreground(guint16 red, guint16 green, guint16 blue);
Packit 78284e
Packit 78284e
  /** Create a new background color attribute.
Packit 78284e
   * @param red The red value (ranging from 0 to 65535).
Packit 78284e
   * @param green The green value (ranging from 0 to 65535).
Packit 78284e
   * @param blue The blue value (ranging from 0 to 65535).
Packit 78284e
   * @return An attribute of type AttrColor.
Packit 78284e
   */
Packit 78284e
  static AttrColor create_attr_background(guint16 red, guint16 green, guint16 blue);
Packit 78284e
Packit 78284e
  /** Create a new foreground alpha attribute.
Packit 78284e
   * @param alpha The alpha value, between 1 and 65536.
Packit 78284e
   */
Packit 78284e
  static AttrInt create_attr_foreground_alpha(guint16 alpha);
Packit 78284e
Packit 78284e
  /** Create a new background alpha attribute.
Packit 78284e
   * @param alpha The alpha value, between 1 and 65536.
Packit 78284e
   */
Packit 78284e
  static AttrInt create_attr_background_alpha(guint16 alpha);
Packit 78284e
Packit 78284e
  /** Create a new font-size attribute.
Packit 78284e
   * @param size The font size, in 1000ths of a point.
Packit 78284e
   * @return An attribute of type AttrInt.
Packit 78284e
   */
Packit 78284e
  static AttrInt create_attr_size(int size);
Packit 78284e
Packit 78284e
  /** Create a new font slant style attribute.
Packit 78284e
   * @param style The slant style.
Packit 78284e
   * @return An attribute of type AttrInt.
Packit 78284e
   */
Packit 78284e
  static AttrInt create_attr_style(Style style);
Packit 78284e
Packit 78284e
  /** Create a new font weight attribute.
Packit 78284e
   * @param weight The weight.
Packit 78284e
   * @return An attribute of type AttrInt.
Packit 78284e
   */
Packit 78284e
  static AttrInt create_attr_weight(Weight weight);
Packit 78284e
Packit 78284e
  /** Create a new font variant attribute (normal or small caps).
Packit 78284e
   * @param variant The variant.
Packit 78284e
   * @return An attribute of type AttrInt.
Packit 78284e
   */
Packit 78284e
  static AttrInt create_attr_variant(Variant variant);
Packit 78284e
Packit 78284e
  /** Create a new font stretch attribute.
Packit 78284e
   * @param stretch The stretch.
Packit 78284e
   * @return An attribute of type AttrInt.
Packit 78284e
   */
Packit 78284e
  static AttrInt create_attr_stretch(Stretch stretch);
Packit 78284e
Packit 78284e
  /** Create a new font description attribute.
Packit 78284e
   * This attribute allows setting family, style, weight, variant, stretch, and size simultaneously.
Packit 78284e
   * @param desc The font description.
Packit 78284e
   * @return An attribute of type AttrFontDesc.
Packit 78284e
   */
Packit 78284e
  static AttrFontDesc create_attr_font_desc(const FontDescription& desc);
Packit 78284e
Packit 78284e
  /** Create a new underline-style object.
Packit 78284e
   * @param underline The underline style.
Packit 78284e
   * @return An attribute of type AttrInt.
Packit 78284e
   */
Packit 78284e
  static AttrInt create_attr_underline(Underline underline);
Packit 78284e
Packit 78284e
  /** Create a new font strike-through attribute.
Packit 78284e
   * @param strikethrough True indicates the text should be struck-through.
Packit 78284e
   * @return An attribute of type AttrInt.
Packit 78284e
   */
Packit 78284e
  static AttrInt create_attr_strikethrough(bool strikethrough);
Packit 78284e
Packit 78284e
  /** Create a new baseline displacement attribute.
Packit 78284e
   * @param rise The amount that the text should be displaced vertically, in 10'000ths of an em. Positive values displace the text upwards.
Packit 78284e
   * @return An attribute of type AttrInt.
Packit 78284e
   */
Packit 78284e
  static AttrInt create_attr_rise(int rise);
Packit 78284e
Packit 78284e
  /** Create a new font size scale attribute.
Packit 78284e
   * The base font for the affected text will have its size multiplied by scale_factor.
Packit 78284e
   * @param scale_factor Factor to scale the font.
Packit 78284e
   * @return An attribute of type AttrFloat.
Packit 78284e
   */
Packit 78284e
  static AttrFloat create_attr_scale(double scale_factor);
Packit 78284e
Packit 78284e
  /** Create a new shape attribute.
Packit 78284e
   * A shape is used to impose a particular ink and logical rect on the result of shaping a particular glyph.
Packit 78284e
   * This might be used, for instance, for embedding a picture or a widget inside a PangoLayout.
Packit 78284e
   * @param ink_rect Ink rectangle to assign to each character.
Packit 78284e
   * @param logical_rect Logical rectangle assign to each character.
Packit 78284e
   * @return An attribute of type AttrShape.
Packit 78284e
   */
Packit 78284e
  static AttrShape create_attr_shape(const Rectangle& ink_rect, const Rectangle& logical_rect);
Packit 78284e
Packit 78284e
protected:
Packit 78284e
  PangoAttribute* gobject_;
Packit 78284e
};
Packit 78284e
Packit 78284e
/** @relates Pango::Attribute */
Packit 78284e
inline bool operator==(const Attribute& lhs, const Attribute& rhs)
Packit 78284e
{
Packit 78284e
  return lhs.equal(rhs);
Packit 78284e
}
Packit 78284e
Packit 78284e
/** @relates Pango::Attribute */
Packit 78284e
inline bool operator!=(const Attribute& lhs, const Attribute& rhs)
Packit 78284e
{
Packit 78284e
  return !lhs.equal(rhs);
Packit 78284e
}
Packit 78284e
Packit 78284e
Packit 78284e
/** A Pango::AttrString is used to represent an attribute with a string value.
Packit 78284e
 */
Packit 78284e
class AttrString : public Attribute
Packit 78284e
{
Packit 78284e
  _CLASS_GENERIC(AttrString, PangoAttrString)
Packit 78284e
Packit 78284e
protected:
Packit 78284e
  AttrString();
Packit 78284e
public:
Packit 78284e
  AttrString(const AttrString& src);
Packit 78284e
  explicit AttrString(PangoAttrString* castitem, bool take_copy=true);
Packit 78284e
Packit 78284e
  AttrString& operator=(const AttrString& src);
Packit 78284e
Packit 78284e
  /** Gets the string which is the value of the attribute.
Packit 78284e
   * @return The string value of the attribute.
Packit 78284e
   */
Packit 78284e
  _MEMBER_GET(string, value, Glib::ustring, char*)
Packit 78284e
Packit 78284e
  /** Sets the string which is the value of the attribute.
Packit 78284e
   * @param string The new string value for the attribute.
Packit 78284e
   */
Packit 78284e
  void set_string(const Glib::ustring& string);
Packit 78284e
Packit 78284e
  /// Provides access to the underlying C GObject.  
Packit 78284e
  PangoAttrString*       gobj()       { return reinterpret_cast<PangoAttrString*>(gobject_); }
Packit 78284e
  /// Provides access to the underlying C GObject.
Packit 78284e
  const PangoAttrString* gobj() const { return reinterpret_cast<const PangoAttrString*>(gobject_); }
Packit 78284e
};
Packit 78284e
Packit 78284e
Packit 78284e
/** A Pango::AttrLanguage is used to represent an attribute that is a language.
Packit 78284e
 */
Packit 78284e
class AttrLanguage : public Attribute
Packit 78284e
{
Packit 78284e
  _CLASS_GENERIC(AttrLanguage, PangoAttrLanguage)
Packit 78284e
Packit 78284e
protected:
Packit 78284e
  AttrLanguage();
Packit 78284e
public:
Packit 78284e
  AttrLanguage(const AttrLanguage& src);
Packit 78284e
  explicit AttrLanguage(PangoAttrLanguage* castitem, bool take_copy=true);
Packit 78284e
Packit 78284e
  AttrLanguage& operator=(const AttrLanguage& src);
Packit 78284e
Packit 78284e
  /** Gets the language which is the value of the attribute.
Packit 78284e
   * @return The language tag of the attribute.
Packit 78284e
   */
Packit 78284e
  _MEMBER_GET(language, value, Language, PangoLanguage*)
Packit 78284e
Packit 78284e
  /** Sets the language which is the value of the attribute.
Packit 78284e
   * @param value The new language tag for the attribute.
Packit 78284e
   */
Packit 78284e
  _MEMBER_SET_PTR(language, value, const Language&, PangoLanguage*)
Packit 78284e
Packit 78284e
  /// Provides access to the underlying C GObject.  
Packit 78284e
  PangoAttrLanguage*       gobj()       { return reinterpret_cast<PangoAttrLanguage*>(gobject_); }
Packit 78284e
  /// Provides access to the underlying C GObject.
Packit 78284e
  const PangoAttrLanguage* gobj() const { return reinterpret_cast<const PangoAttrLanguage*>(gobject_); }
Packit 78284e
};
Packit 78284e
Packit 78284e
Packit 78284e
/** A Pango::AttrColor is used to represent an attribute which is a color.
Packit 78284e
 */
Packit 78284e
class AttrColor : public Attribute
Packit 78284e
{
Packit 78284e
  _CLASS_GENERIC(AttrColor, PangoAttrColor)
Packit 78284e
Packit 78284e
protected:
Packit 78284e
  AttrColor();
Packit 78284e
public:
Packit 78284e
  AttrColor(const AttrColor& src);
Packit 78284e
  explicit AttrColor(PangoAttrColor* castitem, bool take_copy=true);
Packit 78284e
Packit 78284e
  AttrColor& operator=(const AttrColor& src);
Packit 78284e
Packit 78284e
  /** Gets the color which is the value of the attribute.
Packit 78284e
   * @return The color value of the attribute.
Packit 78284e
   */
Packit 78284e
  _MEMBER_GET(color, color, Color, PangoColor)
Packit 78284e
Packit 78284e
  /** Sets the color which is the value of the attribute.
Packit 78284e
   * @param value The new color value for the attribute.
Packit 78284e
   */
Packit 78284e
  _MEMBER_SET(color, color, Color, PangoColor)
Packit 78284e
Packit 78284e
  /// Provides access to the underlying C GObject.  
Packit 78284e
  PangoAttrColor*       gobj()       { return reinterpret_cast<PangoAttrColor*>(gobject_); }
Packit 78284e
  /// Provides access to the underlying C GObject.
Packit 78284e
  const PangoAttrColor* gobj() const { return reinterpret_cast<const PangoAttrColor*>(gobject_); }
Packit 78284e
};
Packit 78284e
Packit 78284e
Packit 78284e
/** A Pango::AttrInt is used to represent an attribute with an integer or enumeration value.
Packit 78284e
 */
Packit 78284e
class AttrInt : public Attribute
Packit 78284e
{
Packit 78284e
  _CLASS_GENERIC(AttrInt, PangoAttrInt)
Packit 78284e
Packit 78284e
protected:
Packit 78284e
  AttrInt();
Packit 78284e
public:
Packit 78284e
  AttrInt(const AttrInt& src);
Packit 78284e
  explicit AttrInt(PangoAttrInt* castitem, bool take_copy=true);
Packit 78284e
Packit 78284e
  AttrInt& operator=(const AttrInt& src);
Packit 78284e
Packit 78284e
  /** Gets the integer value of the attribute.
Packit 78284e
   * @return The integer value of the attribute.
Packit 78284e
   */
Packit 78284e
  _MEMBER_GET(value, value, int, int)
Packit 78284e
Packit 78284e
  /** Sets the integer value of the attribute.
Packit 78284e
   * @param value The new integer value for the attribute.
Packit 78284e
   */
Packit 78284e
  _MEMBER_SET(value, value, int, int)
Packit 78284e
Packit 78284e
  /// Provides access to the underlying C GObject.  
Packit 78284e
  PangoAttrInt*       gobj()       { return reinterpret_cast<PangoAttrInt*>(gobject_); }
Packit 78284e
  /// Provides access to the underlying C GObject.
Packit 78284e
  const PangoAttrInt* gobj() const { return reinterpret_cast<const PangoAttrInt*>(gobject_); }
Packit 78284e
};
Packit 78284e
Packit 78284e
Packit 78284e
/** A Pango::AttrFloat is used to represent an attribute with a float or double value.
Packit 78284e
 */
Packit 78284e
class AttrFloat : public Attribute
Packit 78284e
{
Packit 78284e
  _CLASS_GENERIC(AttrFloat, PangoAttrFloat)
Packit 78284e
Packit 78284e
protected:
Packit 78284e
  AttrFloat();
Packit 78284e
public:
Packit 78284e
  AttrFloat(const AttrFloat& src);
Packit 78284e
  explicit AttrFloat(PangoAttrFloat* castitem, bool take_copy=true);
Packit 78284e
Packit 78284e
  AttrFloat& operator=(const AttrFloat& src);
Packit 78284e
Packit 78284e
  /** Gets the floating point value of the attribute.
Packit 78284e
   * @return The floating point value of the attribute.
Packit 78284e
   */
Packit 78284e
  _MEMBER_GET(value, value, double, double)
Packit 78284e
Packit 78284e
  /** Sets the floating point value of the attribute.
Packit 78284e
   * @param value The new floating point value for the attribute.
Packit 78284e
   */
Packit 78284e
  _MEMBER_SET(value, value, double, double)
Packit 78284e
Packit 78284e
  /// Provides access to the underlying C GObject.
Packit 78284e
  PangoAttrFloat*       gobj()       { return reinterpret_cast<PangoAttrFloat*>(gobject_); }
Packit 78284e
  /// Provides access to the underlying C GObject.
Packit 78284e
  const PangoAttrFloat* gobj() const { return reinterpret_cast<const PangoAttrFloat*>(gobject_); }
Packit 78284e
};
Packit 78284e
Packit 78284e
Packit 78284e
/** A Pango::AttrFontDesc is used to represent an attribute that sets all aspects of the font description at once.
Packit 78284e
 */
Packit 78284e
class AttrFontDesc : public Attribute
Packit 78284e
{
Packit 78284e
  _CLASS_GENERIC(AttrFontDesc, PangoAttrFontDesc)
Packit 78284e
Packit 78284e
protected:
Packit 78284e
  AttrFontDesc();
Packit 78284e
public:
Packit 78284e
  AttrFontDesc(const AttrFontDesc& src);
Packit 78284e
  explicit AttrFontDesc(PangoAttrFontDesc* castitem, bool take_copy=true);
Packit 78284e
Packit 78284e
  AttrFontDesc& operator=(const AttrFontDesc& src);
Packit 78284e
Packit 78284e
  /** Gets the font description which is the value of the attribute.
Packit 78284e
   * @return The font description of the attribute.
Packit 78284e
   */
Packit 78284e
  _MEMBER_GET(desc, desc, FontDescription, PangoFontDescription*)
Packit 78284e
Packit 78284e
  /** Sets the font description which is the value of the attribute.
Packit 78284e
   * @param desc The new font description for the attribute.
Packit 78284e
   */
Packit 78284e
  void set_desc(const FontDescription& desc);
Packit 78284e
  
Packit 78284e
  /// Provides access to the underlying C GObject.
Packit 78284e
  PangoAttrFontDesc*       gobj()       { return reinterpret_cast<PangoAttrFontDesc*>(gobject_); }
Packit 78284e
  /// Provides access to the underlying C GObject.
Packit 78284e
  const PangoAttrFontDesc* gobj() const { return reinterpret_cast<const PangoAttrFontDesc*>(gobject_); }
Packit 78284e
};
Packit 78284e
Packit 78284e
Packit 78284e
/** A Pango::AttrShape structure is used to represent an attribute which imposes shape restrictions.
Packit 78284e
 */
Packit 78284e
class AttrShape : public Attribute
Packit 78284e
{
Packit 78284e
  _CLASS_GENERIC(AttrShape, PangoAttrShape)
Packit 78284e
Packit 78284e
protected:
Packit 78284e
  AttrShape();
Packit 78284e
public:
Packit 78284e
  AttrShape(const AttrShape& src);
Packit 78284e
  explicit AttrShape(PangoAttrShape* castitem, bool take_copy=true);
Packit 78284e
Packit 78284e
  AttrShape& operator=(const AttrShape& src);
Packit 78284e
Packit 78284e
  /** Gets the ink rectangle to restrict to.
Packit 78284e
   * @return The ink rectangle of the attribute.
Packit 78284e
   */
Packit 78284e
  _MEMBER_GET(ink_rect, ink_rect, Rectangle, PangoRectangle)
Packit 78284e
Packit 78284e
  /** Gets the logical rectangle to restrict to.
Packit 78284e
   * @return The logical rectangle of the attribute.
Packit 78284e
   */
Packit 78284e
  _MEMBER_GET(logical_rect, logical_rect, Rectangle, PangoRectangle)
Packit 78284e
Packit 78284e
  /** Sets the ink rectangle to restrict to.
Packit 78284e
   * @param value The new ink rectangle for the attribute.
Packit 78284e
   */
Packit 78284e
  _MEMBER_SET(ink_rect, ink_rect, Rectangle, PangoRectangle)
Packit 78284e
Packit 78284e
  /** Sets the logical rectangle to restrict to.
Packit 78284e
   * @param value The new logical rectangle for the attribute.
Packit 78284e
   */
Packit 78284e
  _MEMBER_SET(logical_rect, logical_rect, Rectangle, PangoRectangle)
Packit 78284e
Packit 78284e
  /// Provides access to the underlying C GObject.  
Packit 78284e
  PangoAttrShape*       gobj()       { return reinterpret_cast<PangoAttrShape*>(gobject_); }
Packit 78284e
  /// Provides access to the underlying C GObject.
Packit 78284e
  const PangoAttrShape* gobj() const { return reinterpret_cast<const PangoAttrShape*>(gobject_); }
Packit 78284e
};
Packit 78284e
Packit 78284e
Packit 78284e
struct AttributeTraits
Packit 78284e
{
Packit 78284e
  typedef Pango::Attribute      CppType;
Packit 78284e
  typedef const PangoAttribute* CType;
Packit 78284e
  typedef PangoAttribute*       CTypeNonConst;
Packit 78284e
Packit 78284e
  static CType   to_c_type      (const CppType& obj) { return obj.gobj(); }
Packit 78284e
  static CType   to_c_type      (CType ptr) { return ptr; }
Packit 78284e
  static CppType to_cpp_type    (CType ptr) { return CppType(const_cast<CTypeNonConst>(ptr), true); }
Packit 78284e
  static void    release_c_type (CType ptr) { pango_attribute_destroy(const_cast<CTypeNonConst>(ptr)); }
Packit 78284e
};
Packit 78284e
Packit 78284e
typedef Glib::SListHandle<Attribute, AttributeTraits> SListHandle_Attribute;
Packit 78284e
Packit 78284e
} // namespace Pango
Packit 78284e
Packit 78284e
Packit 78284e
namespace Glib
Packit 78284e
{
Packit 78284e
Packit 78284e
/** @relates Pango::Attribute */
Packit 78284e
Pango::Attribute wrap(PangoAttribute* object, bool take_copy = false);
Packit 78284e
Packit 78284e
/** @relates Pango::AttrString */
Packit 78284e
Pango::AttrString wrap(PangoAttrString* object, bool take_copy = false);
Packit 78284e
Packit 78284e
/** @relates Pango::AttrLanguage */
Packit 78284e
Pango::AttrLanguage wrap(PangoAttrLanguage* object, bool take_copy = false);
Packit 78284e
Packit 78284e
/** @relates Pango::AttrColor */
Packit 78284e
Pango::AttrColor wrap(PangoAttrColor* object, bool take_copy = false);
Packit 78284e
Packit 78284e
/** @relates Pango::AttrInt */
Packit 78284e
Pango::AttrInt wrap(PangoAttrInt* object, bool take_copy = false);
Packit 78284e
Packit 78284e
/** @relates Pango::AttrFloat */
Packit 78284e
Pango::AttrFloat wrap(PangoAttrFloat* object, bool take_copy = false);
Packit 78284e
Packit 78284e
/** @relates Pango::AttrFontDesc */
Packit 78284e
Pango::AttrFontDesc wrap(PangoAttrFontDesc* object, bool take_copy = false);
Packit 78284e
Packit 78284e
/** @relates Pango::AttrShape */
Packit 78284e
Pango::AttrShape wrap(PangoAttrShape* object, bool take_copy = false);
Packit 78284e
Packit 78284e
} //namespace Glib
Packit 78284e