|
Packit |
78284e |
// Generated by gmmproc 2.49.5 -- DO NOT MODIFY!
|
|
Packit |
78284e |
|
|
Packit |
78284e |
|
|
Packit |
78284e |
#include <glibmm.h>
|
|
Packit |
78284e |
|
|
Packit |
78284e |
#include <pangomm/fontdescription.h>
|
|
Packit |
78284e |
#include <pangomm/private/fontdescription_p.h>
|
|
Packit |
78284e |
|
|
Packit |
78284e |
#include <pango/pango-enum-types.h>
|
|
Packit |
78284e |
|
|
Packit |
78284e |
// -*- c++ -*-
|
|
Packit |
78284e |
/* $Id: fontdescription.ccg,v 1.1 2003/01/21 13:41:03 murrayc Exp $ */
|
|
Packit |
78284e |
|
|
Packit |
78284e |
/*
|
|
Packit |
78284e |
*
|
|
Packit |
78284e |
* Copyright 1998-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 <glibmm/utility.h>
|
|
Packit |
78284e |
|
|
Packit |
78284e |
|
|
Packit |
78284e |
namespace Pango
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
|
|
Packit |
78284e |
FontDescription::FontDescription(const Glib::ustring& font_name)
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
gobject_ = pango_font_description_from_string(font_name.c_str());
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
} // namespace Pango
|
|
Packit |
78284e |
|
|
Packit |
78284e |
|
|
Packit |
78284e |
namespace
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
} // anonymous namespace
|
|
Packit |
78284e |
|
|
Packit |
78284e |
// static
|
|
Packit |
78284e |
GType Glib::Value<Pango::Style>::value_type()
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
return pango_style_get_type();
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
// static
|
|
Packit |
78284e |
GType Glib::Value<Pango::Variant>::value_type()
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
return pango_variant_get_type();
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
// static
|
|
Packit |
78284e |
GType Glib::Value<Pango::Stretch>::value_type()
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
return pango_stretch_get_type();
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
// static
|
|
Packit |
78284e |
GType Glib::Value<Pango::Weight>::value_type()
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
return pango_weight_get_type();
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
// static
|
|
Packit |
78284e |
GType Glib::Value<Pango::FontMask>::value_type()
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
return pango_font_mask_get_type();
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
// static
|
|
Packit |
78284e |
GType Glib::Value<Pango::Gravity>::value_type()
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
return pango_gravity_get_type();
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
|
|
Packit |
78284e |
namespace Glib
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
|
|
Packit |
78284e |
Pango::FontDescription wrap(PangoFontDescription* object, bool take_copy)
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
return Pango::FontDescription(object, take_copy);
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
} // namespace Glib
|
|
Packit |
78284e |
|
|
Packit |
78284e |
|
|
Packit |
78284e |
namespace Pango
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
|
|
Packit |
78284e |
|
|
Packit |
78284e |
// static
|
|
Packit |
78284e |
GType FontDescription::get_type()
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
return pango_font_description_get_type();
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
FontDescription::FontDescription()
|
|
Packit |
78284e |
:
|
|
Packit |
78284e |
gobject_ (pango_font_description_new())
|
|
Packit |
78284e |
{}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
FontDescription::FontDescription(const FontDescription& other)
|
|
Packit |
78284e |
:
|
|
Packit |
78284e |
gobject_ ((other.gobject_) ? pango_font_description_copy(other.gobject_) : nullptr)
|
|
Packit |
78284e |
{}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
FontDescription::FontDescription(FontDescription&& other) noexcept
|
|
Packit |
78284e |
:
|
|
Packit |
78284e |
gobject_(other.gobject_)
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
other.gobject_ = nullptr;
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
FontDescription& FontDescription::operator=(FontDescription&& other) noexcept
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
FontDescription temp (other);
|
|
Packit |
78284e |
swap(temp);
|
|
Packit |
78284e |
return *this;
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
FontDescription::FontDescription(PangoFontDescription* gobject, bool make_a_copy)
|
|
Packit |
78284e |
:
|
|
Packit |
78284e |
// For BoxedType wrappers, make_a_copy is true by default. The static
|
|
Packit |
78284e |
// BoxedType wrappers must always take a copy, thus make_a_copy = true
|
|
Packit |
78284e |
// ensures identical behaviour if the default argument is used.
|
|
Packit |
78284e |
gobject_ ((make_a_copy && gobject) ? pango_font_description_copy(gobject) : gobject)
|
|
Packit |
78284e |
{}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
FontDescription& FontDescription::operator=(const FontDescription& other)
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
FontDescription temp (other);
|
|
Packit |
78284e |
swap(temp);
|
|
Packit |
78284e |
return *this;
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
FontDescription::~FontDescription() noexcept
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
if(gobject_)
|
|
Packit |
78284e |
pango_font_description_free(gobject_);
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
void FontDescription::swap(FontDescription& other) noexcept
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
std::swap(gobject_, other.gobject_);
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
PangoFontDescription* FontDescription::gobj_copy() const
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
return pango_font_description_copy(gobject_);
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
|
|
Packit |
78284e |
guint FontDescription::hash() const
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
return pango_font_description_hash(const_cast<PangoFontDescription*>(gobj()));
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
void FontDescription::set_family(const Glib::ustring& family)
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
pango_font_description_set_family(gobj(), family.c_str());
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
Glib::ustring FontDescription::get_family() const
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
return Glib::convert_const_gchar_ptr_to_ustring(pango_font_description_get_family(const_cast<PangoFontDescription*>(gobj())));
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
void FontDescription::set_style(Style style)
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
pango_font_description_set_style(gobj(), ((PangoStyle)(style)));
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
Style FontDescription::get_style() const
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
return ((Style)(pango_font_description_get_style(const_cast<PangoFontDescription*>(gobj()))));
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
void FontDescription::set_variant(Variant variant)
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
pango_font_description_set_variant(gobj(), ((PangoVariant)(variant)));
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
Variant FontDescription::get_variant() const
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
return ((Variant)(pango_font_description_get_variant(const_cast<PangoFontDescription*>(gobj()))));
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
void FontDescription::set_weight(Weight weight)
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
pango_font_description_set_weight(gobj(), ((PangoWeight)(weight)));
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
Weight FontDescription::get_weight() const
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
return ((Weight)(pango_font_description_get_weight(const_cast<PangoFontDescription*>(gobj()))));
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
void FontDescription::set_stretch(Stretch stretch)
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
pango_font_description_set_stretch(gobj(), ((PangoStretch)(stretch)));
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
Stretch FontDescription::get_stretch() const
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
return ((Stretch)(pango_font_description_get_stretch(const_cast<PangoFontDescription*>(gobj()))));
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
void FontDescription::set_size(int size)
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
pango_font_description_set_size(gobj(), size);
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
int FontDescription::get_size() const
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
return pango_font_description_get_size(const_cast<PangoFontDescription*>(gobj()));
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
void FontDescription::set_absolute_size(double size)
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
pango_font_description_set_absolute_size(gobj(), size);
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
bool FontDescription::get_size_is_absolute() const
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
return pango_font_description_get_size_is_absolute(const_cast<PangoFontDescription*>(gobj()));
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
void FontDescription::set_gravity(Gravity gravity)
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
pango_font_description_set_gravity(gobj(), ((PangoGravity)(gravity)));
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
Gravity FontDescription::get_gravity() const
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
return ((Gravity)(pango_font_description_get_gravity(const_cast<PangoFontDescription*>(gobj()))));
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
FontMask FontDescription::get_set_fields() const
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
return ((FontMask)(pango_font_description_get_set_fields(const_cast<PangoFontDescription*>(gobj()))));
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
void FontDescription::unset_fields(FontMask to_unset)
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
pango_font_description_unset_fields(gobj(), ((PangoFontMask)(to_unset)));
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
void FontDescription::merge(const FontDescription& desc_to_merge, bool replace_existing)
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
pango_font_description_merge(gobj(), (desc_to_merge).gobj(), static_cast<int>(replace_existing));
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
bool FontDescription::better_match(const FontDescription& old_match, const FontDescription& new_match) const
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
return pango_font_description_better_match(const_cast<PangoFontDescription*>(gobj()), (old_match).gobj(), (new_match).gobj());
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
Glib::ustring FontDescription::to_string() const
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
return Glib::convert_return_gchar_ptr_to_ustring(pango_font_description_to_string(const_cast<PangoFontDescription*>(gobj())));
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
Glib::ustring FontDescription::to_filename() const
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
return Glib::convert_return_gchar_ptr_to_ustring(pango_font_description_to_filename(const_cast<PangoFontDescription*>(gobj())));
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
|
|
Packit |
78284e |
bool operator==(const FontDescription& lhs, const FontDescription& rhs)
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
return (pango_font_description_equal(lhs.gobj(), rhs.gobj()) != 0);
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
bool operator!=(const FontDescription& lhs, const FontDescription& rhs)
|
|
Packit |
78284e |
{
|
|
Packit |
78284e |
return (pango_font_description_equal(lhs.gobj(), rhs.gobj()) == 0);
|
|
Packit |
78284e |
}
|
|
Packit |
78284e |
|
|
Packit |
78284e |
|
|
Packit |
78284e |
} // namespace Pango
|
|
Packit |
78284e |
|
|
Packit |
78284e |
|