b4a4db44dd
Gdk.Event * pango/pango-symbols.xml: explain how to marshal PangoAttribute. * pango/AttrBackground.cs: * pango/AttrFallback.cs: * pango/AttrFamily.cs: * pango/AttrFontDesc.cs: * pango/AttrForeground.cs: * pango/AttrLanguage.cs: * pango/AttrLetterSpacing.cs: * pango/AttrRise.cs: * pango/AttrScale.cs: * pango/AttrShape.cs: * pango/AttrSize.cs: * pango/AttrStretch.cs: * pango/AttrStrikethrough.cs: * pango/AttrStrikethroughColor.cs: * pango/AttrStyle.cs: * pango/AttrUnderline.cs: * pango/AttrUnderlineColor.cs: * pango/AttrVariant.cs: * pango/AttrWeight.cs: subclasses of Attribute, with proper constructors. These don't actually correspond one-to-one with the underlying types, but they're nicer this way. * pango/Pango.metadata: Hide Attribute and its subclasses from the generator. Also hide "Attr" (which previously contained non-working badly-named static methods to create Attributes) and AttrClass (which is not really useful outside of pango itself). * pango/AttrIterator.custom: use Pango.Attribute.GetAttribute. * pango/glue/attribute.c: glue for Attribute and its subclasses [Fixes #52575 and its semi-dup #46552] svn path=/trunk/gtk-sharp/; revision=43520
130 lines
3.3 KiB
C
130 lines
3.3 KiB
C
/* attribute.c : Glue to access fields in PangoAttribute and
|
|
* subclasses.
|
|
*
|
|
* Copyright (c) 2005 Novell, Inc.
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of version 2 of the Lesser GNU General
|
|
* Public License as published by the Free Software Foundation.
|
|
*
|
|
* 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, write to the
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
* Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
#include <pango/pango-attributes.h>
|
|
|
|
/* Forward declarations */
|
|
PangoAttrType pangosharp_attribute_get_attr_type (PangoAttribute *attr);
|
|
guint pangosharp_attribute_get_start_index (PangoAttribute *attr);
|
|
void pangosharp_attribute_set_start_index (PangoAttribute *attr, guint ind);
|
|
guint pangosharp_attribute_get_end_index (PangoAttribute *attr);
|
|
void pangosharp_attribute_set_end_index (PangoAttribute *attr, guint ind);
|
|
const char *pangosharp_attr_string_get_value (PangoAttrString *attr);
|
|
PangoLanguage *pangosharp_attr_language_get_value (PangoAttrLanguage *attr);
|
|
PangoColor pangosharp_attr_color_get_color (PangoAttrColor *attr);
|
|
int pangosharp_attr_int_get_value (PangoAttrInt *attr);
|
|
double pangosharp_attr_float_get_value (PangoAttrFloat *attr);
|
|
PangoFontDescription *pangosharp_attr_font_desc_get_desc (PangoAttrFontDesc *attr);
|
|
PangoRectangle pangosharp_attr_shape_get_ink_rect (PangoAttrShape *attr);
|
|
PangoRectangle pangosharp_attr_shape_get_logical_rect (PangoAttrShape *attr);
|
|
int pangosharp_attr_size_get_size (PangoAttrSize *attr);
|
|
gboolean pangosharp_attr_size_get_absolute (PangoAttrSize *attr);
|
|
/* */
|
|
|
|
PangoAttrType
|
|
pangosharp_attribute_get_attr_type (PangoAttribute *attr)
|
|
{
|
|
return attr->klass->type;
|
|
}
|
|
|
|
guint
|
|
pangosharp_attribute_get_start_index (PangoAttribute *attr)
|
|
{
|
|
return attr->start_index;
|
|
}
|
|
|
|
void
|
|
pangosharp_attribute_set_start_index (PangoAttribute *attr, guint ind)
|
|
{
|
|
attr->start_index = ind;
|
|
}
|
|
|
|
guint
|
|
pangosharp_attribute_get_end_index (PangoAttribute *attr)
|
|
{
|
|
return attr->end_index;
|
|
}
|
|
|
|
void
|
|
pangosharp_attribute_set_end_index (PangoAttribute *attr, guint ind)
|
|
{
|
|
attr->end_index = ind;
|
|
}
|
|
|
|
const char *
|
|
pangosharp_attr_string_get_value (PangoAttrString *attr)
|
|
{
|
|
return attr->value;
|
|
}
|
|
|
|
PangoLanguage *
|
|
pangosharp_attr_language_get_value (PangoAttrLanguage *attr)
|
|
{
|
|
return attr->value;
|
|
}
|
|
|
|
PangoColor
|
|
pangosharp_attr_color_get_color (PangoAttrColor *attr)
|
|
{
|
|
return attr->color;
|
|
}
|
|
|
|
int
|
|
pangosharp_attr_int_get_value (PangoAttrInt *attr)
|
|
{
|
|
return attr->value;
|
|
}
|
|
|
|
double
|
|
pangosharp_attr_float_get_value (PangoAttrFloat *attr)
|
|
{
|
|
return attr->value;
|
|
}
|
|
|
|
PangoFontDescription *
|
|
pangosharp_attr_font_desc_get_desc (PangoAttrFontDesc *attr)
|
|
{
|
|
return attr->desc;
|
|
}
|
|
|
|
PangoRectangle
|
|
pangosharp_attr_shape_get_ink_rect (PangoAttrShape *attr)
|
|
{
|
|
return attr->ink_rect;
|
|
}
|
|
|
|
PangoRectangle
|
|
pangosharp_attr_shape_get_logical_rect (PangoAttrShape *attr)
|
|
{
|
|
return attr->logical_rect;
|
|
}
|
|
|
|
int
|
|
pangosharp_attr_size_get_size (PangoAttrSize *attr)
|
|
{
|
|
return attr->size;
|
|
}
|
|
|
|
gboolean
|
|
pangosharp_attr_size_get_absolute (PangoAttrSize *attr)
|
|
{
|
|
return attr->absolute;
|
|
}
|
|
|