123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229(**************************************************************************)(* Lablgtk *)(* *)(* This program is free software; you can redistribute it *)(* and/or modify it under the terms of the GNU Library General *)(* Public License as published by the Free Software Foundation *)(* version 2, with the exception described in file COPYING which *)(* comes with the library. *)(* *)(* 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 Library General Public License for more details. *)(* *)(* You should have received a copy of the GNU Library 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 *)(* *)(* *)(**************************************************************************)(* $Id$ *)openGauxopenGobjecttypecontext=[`pangocontext]objtypefont=[`pangofont]objtypefont_map=[`pangofontmap]objtypefont_descriptiontypefont_metricstypelanguagetypelayout=[`pangolayout]objtypeunits=inttyperectangle={x:int;y:int;width:int;height:int}external_pango_init:unit->unit="ml_pango_init"let()=_pango_init()moduleTags=structtypestyle=[`NORMAL|`OBLIQUE|`ITALIC]typeweight_internal=[`ULTRALIGHT|`LIGHT|`NORMAL|`BOLD|`ULTRABOLD|`HEAVY]typeweight=[weight_internal|`CUSTOMofint]typevariant=[`NORMAL|`SMALL_CAPS]typestretch=[`ULTRA_CONDENSED|`EXTRA_CONDENSED|`CONDENSED|`SEMI_CONDENSED|`NORMAL|`SEMI_EXPANDED|`EXPANDED|`EXTRA_EXPANDED|`ULTRA_EXPANDED]typescale=[`XX_SMALL|`X_SMALL|`SMALL|`MEDIUM|`LARGE|`X_LARGE|`XX_LARGE|`CUSTOMoffloat]externalscale_to_float:scale->float="ml_Pango_scale_val"typeunderline=[`NONE|`SINGLE|`DOUBLE|`LOW]typewrap_mode=[`WORD|`CHAR|`WORD_CHAR]typeellipsize_mode=[`NONE|`START|`MIDDLE|`END]openGpointerexternal_get_tables:unit->stylevariant_table*weight_internalvariant_table*variantvariant_table*stretchvariant_table*underlinevariant_table*wrap_modevariant_table*ellipsize_modevariant_table="ml_pango_get_tables"letstyle,weight,variant,stretch,underline,wrap_mode,ellipsize_mode=_get_tables()letweight_to_int(w:weight)=matchwwith|`CUSTOMb->b|#weight_internalasw->encode_variantweightwendmoduleFont=structopenTagsexternalfrom_string:string->font_description="ml_pango_font_description_from_string"externalto_string:font_description->string="ml_pango_font_description_to_string"externalcopy:font_description->font_description="ml_pango_font_description_copy"externalset_family:font_description->string->unit="ml_pango_font_description_set_family"externalget_family:font_description->string="ml_pango_font_description_get_family"externalset_style:font_description->style->unit="ml_pango_font_description_set_style"externalget_style:font_description->style="ml_pango_font_description_get_style"externalset_variant:font_description->variant->unit="ml_pango_font_description_set_variant"externalget_variant:font_description->variant="ml_pango_font_description_get_variant"externalset_weight:font_description->int->unit="ml_pango_font_description_set_weight"letset_weightfdw=set_weightfd(weight_to_intw)externalget_weight:font_description->int="ml_pango_font_description_get_weight"externalset_stretch:font_description->stretch->unit="ml_pango_font_description_set_stretch"externalget_stretch:font_description->stretch="ml_pango_font_description_get_stretch"externalset_size:font_description->int->unit="ml_pango_font_description_set_size"externalget_size:font_description->int="ml_pango_font_description_get_size"externalset_absolute_size:font_description->float->unit="ml_pango_font_description_set_absolute_size"externalget_size_is_absolute:font_description->bool="ml_pango_font_description_get_size_is_absolute"letmodifyfd?family?style?variant?weight?stretch?size?absolute_size()=letmay_setset_xx=mayx~f:(set_xfd)inmay_setset_familyfamily;may_setset_stylestyle;may_setset_stretchstretch;may_setset_variantvariant;may_setset_weightweight;may_setset_sizesize;may_setset_absolute_sizeabsolute_sizeexternalget_metrics:font->language->font_metrics="ml_pango_font_get_metrics"externalget_ascent:font_metrics->units="ml_pango_font_metrics_get_ascent"externalget_descent:font_metrics->units="ml_pango_font_metrics_get_descent"externalget_approximate_char_width:font_metrics->units="ml_pango_font_metrics_get_approximate_char_width"externalget_approximate_digit_width:font_metrics->units="ml_pango_font_metrics_get_approximate_digit_width"endmoduleFontMap=structexternalload_font:font_map->context->font_description->font="ml_pango_font_map_load_font"endmoduleLanguage=structexternalfrom_string:string->language="ml_pango_language_from_string"externalto_string:language->string="ml_pango_language_to_string"externalmatches:language->string->bool="ml_pango_language_matches"letnone:language=Obj.magicGpointer.boxed_nullendmoduleContext=structletcastw:context=Gobject.try_castw"PangoContext"externalget_font_description:context->font_description="ml_pango_context_get_font_description"externalset_font_description:context->font_description->unit="ml_pango_context_set_font_description"externalget_language:context->language="ml_pango_context_get_language"externalset_language:context->language->unit="ml_pango_context_set_language"externalload_font:context->font_description->font="ml_pango_context_load_font"externalload_fontset:context->font_description->language->font="ml_pango_context_load_fontset"externalget_metrics:context->font_description->languageoption->font_metrics="ml_pango_context_get_metrics"endexternalscale:unit->int="ml_PANGO_SCALE"letscale=scale()moduleLayout=structopenTagsletcastw:layout=Gobject.try_castw"PangoLayout"externalcreate:context->layout="ml_pango_layout_new"externalcopy:layout->layout="ml_pango_layout_copy"externalget_context:layout->context="ml_pango_layout_get_context"externalget_text:layout->string="ml_pango_layout_get_text"externalset_text:layout->string->unit="ml_pango_layout_set_text"externalset_markup:layout->string->unit="ml_pango_layout_set_markup"externalset_markup_with_accel:layout->string->Glib.unichar->unit="ml_pango_layout_set_markup_with_accel"externalget_font_description:layout->font_description="ml_pango_layout_get_font_description"externalset_font_description:layout->font_description->unit="ml_pango_layout_set_font_description"externalget_width:layout->int="ml_pango_layout_get_width"externalset_width:layout->int->unit="ml_pango_layout_set_width"externalget_indent:layout->int="ml_pango_layout_get_indent"externalset_indent:layout->int->unit="ml_pango_layout_set_indent"externalget_spacing:layout->int="ml_pango_layout_get_spacing"externalset_spacing:layout->int->unit="ml_pango_layout_set_spacing"externalget_wrap:layout->wrap_mode="ml_pango_layout_get_wrap"externalset_wrap:layout->wrap_mode->unit="ml_pango_layout_set_wrap"externalget_justify:layout->bool="ml_pango_layout_get_justify"externalset_justify:layout->bool->unit="ml_pango_layout_set_justify"externalget_single_paragraph_mode:layout->bool="ml_pango_layout_get_single_paragraph_mode"externalset_single_paragraph_mode:layout->bool->unit="ml_pango_layout_set_single_paragraph_mode"externalcontext_changed:layout->unit="ml_pango_layout_context_changed"externalget_size:layout->units*units="ml_pango_layout_get_size"externalget_pixel_size:layout->int*int="ml_pango_layout_get_pixel_size"externalget_extent:layout->rectangle="ml_pango_layout_get_extent"externalget_pixel_extent:layout->rectangle="ml_pango_layout_get_pixel_extent"externalindex_to_pos:layout->int->rectangle="ml_pango_layout_index_to_pos"externalxy_to_index:layout->x:int->y:int->int*int*bool="ml_pango_layout_xy_to_index"externalset_ellipsize:layout->ellipsize_mode->unit="ml_pango_layout_set_ellipsize"externalget_ellipsize:layout->ellipsize_mode="ml_pango_layout_get_ellipsize"end