mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-25 07:45:42 +00:00
09c61ee026
* autogen.sh : error out with bootstrap help message. * bootstrap : replaces autogen.sh for the 2.5.x release line. * bootstrap-2.4 : replaces autogen.sh for the 1.9.x release line. * configure.in.in : renamed from configure.in and added substitution for version, dependencies, CFLAGS and CSFLAGS. * README : bootstrap docs * */*-api.raw : moved to api-2.6.raw for bootstrapping. * */*-api-2.4.raw : added 2.4 api files for bootstrapping. * */glue/Makefile.am : add GTK_SHARP_VERSION_CFLAGS. * pango/Attribute.cs : add a #if GTK_SHARP_2_6 block. * pango/glue/attribute.c : add a couple #ifdef GTK_SHARP_2_6 blocks. * sample/GtkDemo/* : make the 2.6 demos conditional. svn path=/trunk/gtk-sharp/; revision=44047
135 lines
3.4 KiB
C
135 lines
3.4 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);
|
|
#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
|
|
|