-
Notifications
You must be signed in to change notification settings - Fork 395
/
CMTimeRange.java
173 lines (164 loc) · 6.77 KB
/
CMTimeRange.java
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
/*
* Copyright (C) 2014 Trillian Mobile AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.robovm.apple.coremedia;
/*<imports>*/
import java.io.*;
import java.nio.*;
import java.util.*;
import org.robovm.objc.*;
import org.robovm.objc.annotation.*;
import org.robovm.objc.block.*;
import org.robovm.rt.*;
import org.robovm.rt.bro.*;
import org.robovm.rt.bro.annotation.*;
import org.robovm.rt.bro.ptr.*;
import org.robovm.apple.foundation.*;
import org.robovm.apple.corefoundation.*;
import org.robovm.apple.dispatch.*;
import org.robovm.apple.coreaudio.*;
import org.robovm.apple.coreanimation.*;
import org.robovm.apple.coregraphics.*;
import org.robovm.apple.corevideo.*;
import org.robovm.apple.audiotoolbox.*;
/*</imports>*/
/*<javadoc>*/
/*</javadoc>*/
/*<annotations>*/@Library("CoreMedia")/*</annotations>*/
/*<visibility>*/public/*</visibility>*/ class /*<name>*/CMTimeRange/*</name>*/
extends /*<extends>*/Struct<CMTimeRange>/*</extends>*/
/*<implements>*//*</implements>*/ {
public static class AsValuedListMarshaler {
@SuppressWarnings("unchecked")
@MarshalsPointer
public static List<CMTimeRange> toObject(Class<? extends NSObject> cls, long handle, long flags) {
NSArray<NSValue> o = (NSArray<NSValue>) NSObject.Marshaler.toObject(cls, handle, flags);
if (o == null) {
return null;
}
List<CMTimeRange> list = new ArrayList<>();
for (NSValue v : o) {
list.add(v.timeRangeValue());
}
return list;
}
@MarshalsPointer
public static long toNative(List<CMTimeRange> l, long flags) {
if (l == null) {
return 0L;
}
NSMutableArray<NSValue> array = new NSMutableArray<>();
for (CMTimeRange i : l) {
array.add(NSValue.valueOf(i));
}
return NSObject.Marshaler.toNative(array, flags);
}
}
/*<ptr>*/public static class CMTimeRangePtr extends Ptr<CMTimeRange, CMTimeRangePtr> {}/*</ptr>*/
/*<bind>*/static { Bro.bind(CMTimeRange.class); }/*</bind>*/
/*<constants>*//*</constants>*/
/*<constructors>*/
public CMTimeRange() {}
public CMTimeRange(CMTime start, CMTime duration) {
this.setStart(start);
this.setDuration(duration);
}
/*</constructors>*/
/*<properties>*//*</properties>*/
/*<members>*/
@StructMember(0) public native @ByVal CMTime getStart();
@StructMember(0) public native CMTimeRange setStart(@ByVal CMTime start);
@Deprecated
@StructMember(0) public native @ByVal CMTime start();
@Deprecated
@StructMember(0) public native CMTimeRange start(@ByVal CMTime start);
@StructMember(1) public native @ByVal CMTime getDuration();
@StructMember(1) public native CMTimeRange setDuration(@ByVal CMTime duration);
@Deprecated
@StructMember(1) public native @ByVal CMTime duration();
@Deprecated
@StructMember(1) public native CMTimeRange duration(@ByVal CMTime duration);
/*</members>*/
/*<methods>*/
/**
* @since Available in iOS 4.0 and later.
*/
@Bridge(symbol="CMTimeRangeMake", optional=true)
public static native @ByVal CMTimeRange create(@ByVal CMTime start, @ByVal CMTime duration);
/**
* @since Available in iOS 4.0 and later.
*/
public CMTimeRange union(CMTimeRange range2) { return union(this, range2); }
@Bridge(symbol="CMTimeRangeGetUnion", optional=true)
private static native @ByVal CMTimeRange union(@ByVal CMTimeRange range1, @ByVal CMTimeRange range2);
/**
* @since Available in iOS 4.0 and later.
*/
public CMTimeRange intersection(CMTimeRange range2) { return intersection(this, range2); }
@Bridge(symbol="CMTimeRangeGetIntersection", optional=true)
private static native @ByVal CMTimeRange intersection(@ByVal CMTimeRange range1, @ByVal CMTimeRange range2);
/**
* @since Available in iOS 4.0 and later.
*/
public boolean equals(CMTimeRange range2) { return equals(this, range2); }
@Bridge(symbol="CMTimeRangeEqual", optional=true)
private static native boolean equals(@ByVal CMTimeRange range1, @ByVal CMTimeRange range2);
/**
* @since Available in iOS 4.0 and later.
*/
public boolean containsTime(CMTime time) { return containsTime(this, time); }
@Bridge(symbol="CMTimeRangeContainsTime", optional=true)
private static native boolean containsTime(@ByVal CMTimeRange range, @ByVal CMTime time);
/**
* @since Available in iOS 4.0 and later.
*/
public boolean containsTimeRange(CMTimeRange range2) { return containsTimeRange(this, range2); }
@Bridge(symbol="CMTimeRangeContainsTimeRange", optional=true)
private static native boolean containsTimeRange(@ByVal CMTimeRange range1, @ByVal CMTimeRange range2);
/**
* @since Available in iOS 4.0 and later.
*/
public CMTime getEnd() { return getEnd(this); }
@Bridge(symbol="CMTimeRangeGetEnd", optional=true)
private static native @ByVal CMTime getEnd(@ByVal CMTimeRange range);
/**
* @since Available in iOS 4.0 and later.
*/
@Bridge(symbol="CMTimeRangeFromTimeToTime", optional=true)
public static native @ByVal CMTimeRange fromTimeToTime(@ByVal CMTime start, @ByVal CMTime end);
/**
* @since Available in iOS 4.0 and later.
*/
public NSDictionary<?, ?> copyAsDictionary(CFAllocator allocator) { return copyAsDictionary(this, allocator); }
@Bridge(symbol="CMTimeRangeCopyAsDictionary", optional=true)
private static native NSDictionary<?, ?> copyAsDictionary(@ByVal CMTimeRange range, CFAllocator allocator);
/**
* @since Available in iOS 4.0 and later.
*/
@Bridge(symbol="CMTimeRangeMakeFromDictionary", optional=true)
public static native @ByVal CMTimeRange create(NSDictionary<?, ?> dict);
/**
* @since Available in iOS 4.0 and later.
*/
@Bridge(symbol="CMTimeRangeCopyDescription", optional=true)
public static native String copyDescription(CFAllocator allocator, @ByVal CMTimeRange range);
/**
* @since Available in iOS 4.0 and later.
*/
public void show() { show(this); }
@Bridge(symbol="CMTimeRangeShow", optional=true)
private static native void show(@ByVal CMTimeRange range);
/*</methods>*/
}