1 // Pango.AttrFontDesc - Pango.Attribute for Pango.FontDescription 2 // 3 // Copyright (c) 2005 Novell, Inc. 4 // 5 // This program is free software; you can redistribute it and/or 6 // modify it under the terms of version 2 of the Lesser GNU General 7 // Public License as published by the Free Software Foundation. 8 // 9 // This program is distributed in the hope that it will be useful, 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 // Lesser General Public License for more details. 13 // 14 // You should have received a copy of the GNU Lesser General Public 15 // License along with this program; if not, write to the 16 // Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 // Boston, MA 02111-1307, USA. 18 19 namespace Pango { 20 21 using System; 22 using System.Runtime.InteropServices; 23 24 public class AttrFontDesc : Attribute { 25 26 [DllImport("libpango-1.0-0.dll", CallingConvention=CallingConvention.Cdecl)] pango_attr_font_desc_new(IntPtr font_desc)27 static extern IntPtr pango_attr_font_desc_new (IntPtr font_desc); 28 29 [DllImport("libpango-1.0-0.dll", CallingConvention=CallingConvention.Cdecl)] pango_font_description_copy(IntPtr raw)30 static extern IntPtr pango_font_description_copy(IntPtr raw); 31 AttrFontDesc(Pango.FontDescription font_desc)32 public AttrFontDesc (Pango.FontDescription font_desc) : this (pango_attr_font_desc_new (pango_font_description_copy (font_desc.Handle)), true) {} 33 AttrFontDesc(IntPtr raw, bool owned)34 internal AttrFontDesc (IntPtr raw, bool owned) : base (raw, owned) {} 35 36 [DllImport("pangosharpglue-2", CallingConvention=CallingConvention.Cdecl)] pangosharp_attr_font_desc_get_desc(IntPtr raw)37 static extern IntPtr pangosharp_attr_font_desc_get_desc (IntPtr raw); 38 39 public Pango.FontDescription Desc { 40 get { 41 IntPtr raw_ret = pangosharp_attr_font_desc_get_desc (Handle); 42 return new Pango.FontDescription (raw_ret); 43 } 44 } 45 } 46 } 47