1 // Pango.AttrStretch - Pango.Attribute for Pango.Stretch
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 AttrStretch : Attribute {
25 
26 		[DllImport("libpango-1.0-0.dll", CallingConvention=CallingConvention.Cdecl)]
pango_attr_stretch_new(Pango.Stretch stretch)27 		static extern IntPtr pango_attr_stretch_new (Pango.Stretch stretch);
28 
AttrStretch(Pango.Stretch stretch)29 		public AttrStretch (Pango.Stretch stretch) : this (pango_attr_stretch_new (stretch), true) {}
30 
AttrStretch(IntPtr raw, bool owned)31 		internal AttrStretch (IntPtr raw, bool owned) : base (raw, owned) {}
32 
33 		[DllImport("pangosharpglue-2", CallingConvention=CallingConvention.Cdecl)]
pangosharp_attr_int_get_value(IntPtr raw)34 		static extern int pangosharp_attr_int_get_value (IntPtr raw);
35 
36 		public Pango.Stretch Stretch {
37 			get {
38 				return (Pango.Stretch)pangosharp_attr_int_get_value (Handle);
39 			}
40 		}
41 	}
42 }
43