1 // Pango.AttrGravity - Pango.Attribute for Gravity
2 //
3 // Copyright (c) 2007 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 AttrGravity : Attribute {
25 
26 		[DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
pango_attr_gravity_new(int gravity)27 		static extern IntPtr pango_attr_gravity_new (int gravity);
28 
AttrGravity(Gravity gravity)29 		public AttrGravity (Gravity gravity) : this (pango_attr_gravity_new ((int) gravity)) {}
30 
AttrGravity(IntPtr raw)31 		internal AttrGravity (IntPtr raw) : base (raw) {}
32 
33 		public Gravity Gravity {
34 			get {
35 				return (Gravity) (AttrInt.New (Handle).Value);
36 			}
37 		}
38 	}
39 }
40