~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
//
// A few complementary classes for CoreAnimation
//
// Authors:
//   Geoff Norton
//   Miguel de Icaza
//
// Copyright 2009, Novell, Inc.
// Copyright 2010, Novell, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
// 
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
//
using System;
using MonoMac.Foundation;
using System.Drawing;
using System.Runtime.InteropServices;
using MonoMac.CoreGraphics;

namespace MonoMac.CoreAnimation {

	partial class CAAnimation {
		const string Linear = "linear";
		const string Discrete = "discrete";
		const string Paced = "paced";
		const string Cubic = "cubic";

		const string RotateAuto = "auto";
		const string RotateAutoReverse = "autoReverse";

		[DllImport(Constants.QuartzLibrary, EntryPoint="CACurrentMediaTime")]
		public extern static double CurrentMediaTime ();
	}

	public partial class CAFillMode {
		public const string Removed = "removed";
		public const string Forwards = "forwards";
		public const string Backwards = "backwards";
		public const string Both = "both";
		public const string Frozen = "frozen";
	}

	partial class CATransition {
		const string Fade = "fade";
		const string MoveIn = "moveIn";
		const string Push = "push";
		const string Reveal = "reveal";
		
		const string FromRight = "fromRight";
		const string FromLeft = "fromLeft";
		const string FromTop = "fromTop";
		const string FromBottom = "fromBottom";
	}

	public partial class CAGradientLayer {
		public CGColor CreateColor (IntPtr p)
		{
			return new CGColor (p);
		}
		
		public CGColor [] Colors {
			get {
				return NSArray.ArrayFromHandle<CGColor> (_Colors, CreateColor);
			}

			set {
				if (value == null)
					throw new ArgumentNullException ("value");
				
				IntPtr [] ptrs = new IntPtr [value.Length];
				for (int i = 0; i < ptrs.Length; i++)
					ptrs [i] = value [i].Handle;
				
				using (NSArray array = NSArray.FromIntPtrs (ptrs)){
					_Colors = array.Handle;
				}
			}
		}
	}

	[StructLayout (LayoutKind.Sequential)]
	public struct CABarBeatTime {
		public int Bar;
		public ushort Beat;
		public ushort Subbeat;
		public ushort SubbeatDivisor;
		public ushort Reserved;
	}

	public partial class CAKeyFrameAnimation {

		[Obsolete ("This method in the future will return a CAKeyFrameAnimation, update your source, or use GetFromKeyPath to avoid this warning for now")]
		public static CAPropertyAnimation FromKeyPath (string path)
		{
			return GetFromKeyPath (path);
		}
	}
	
}