1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
|
/* 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);
#ifdef GTK_SHARP_2_6
int pangosharp_attr_size_get_size (PangoAttrSize *attr);
gboolean pangosharp_attr_size_get_absolute (PangoAttrSize *attr);
#endif
/* */
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;
}
#ifdef GTK_SHARP_2_6
int
pangosharp_attr_size_get_size (PangoAttrSize *attr)
{
return attr->size;
}
gboolean
pangosharp_attr_size_get_absolute (PangoAttrSize *attr)
{
return attr->absolute;
}
#endif
|