Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.bugvm.apple.coremedia.CMTextFormatDescription Maven / Gradle / Ivy
/*
* Copyright (C) 2013-2015 RoboVM 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 com.bugvm.apple.coremedia;
/**/
import java.io.*;
import java.nio.*;
import java.util.*;
import com.bugvm.objc.*;
import com.bugvm.objc.annotation.*;
import com.bugvm.objc.block.*;
import com.bugvm.rt.*;
import com.bugvm.rt.annotation.*;
import com.bugvm.rt.bro.*;
import com.bugvm.rt.bro.annotation.*;
import com.bugvm.rt.bro.ptr.*;
import com.bugvm.apple.foundation.*;
import com.bugvm.apple.corefoundation.*;
import com.bugvm.apple.dispatch.*;
import com.bugvm.apple.coreaudio.*;
import com.bugvm.apple.coregraphics.*;
import com.bugvm.apple.corevideo.*;
import com.bugvm.apple.audiotoolbox.*;
/* */
/**/
/* */
/**/@Library("CoreMedia")/* */
/**/public/* */ class /**/CMTextFormatDescription/* */
extends /**/CMFormatDescription/* */
/**//* */ {
/**/public static class CMTextFormatDescriptionPtr extends Ptr {}/* */
/**/static { Bro.bind(CMTextFormatDescription.class); }/* */
/**//* */
/**//* */
/**//* */
/**//* */
public static CMTextFormatDescription create(CMMediaType mediaType, CMTextFormatType mediaSubtype, CMTextFormatDescriptionExtension extensions) throws OSStatusException {
CMFormatDescriptionPtr ptr = new CMFormatDescriptionPtr();
OSStatus status = create0(null, mediaType, (int)mediaSubtype.value(), extensions.getDictionary(), ptr);
if (OSStatusException.throwIfNecessary(status)) {
return ptr.get().as(CMTextFormatDescription.class);
}
return null;
}
public CMTextFormatDescriptionExtension getExtensions() {
return new CMTextFormatDescriptionExtension(getExtensionDictionary());
}
public CMTextFormatType getTextFormatType() {
return CMTextFormatType.valueOf(getMediaSubType());
}
/**
* @throws OSStatusException
* @since Available in iOS 8.0 and later.
*/
public static CMTextFormatDescription createFromBigEndianTextDescriptionData(BytePtr textDescriptionData, @MachineSizedUInt long textDescriptionSize, String textDescriptionFlavor, CMMediaType mediaType) throws OSStatusException {
CMTextFormatDescription.CMTextFormatDescriptionPtr ptr = new CMTextFormatDescription.CMTextFormatDescriptionPtr();
OSStatus status = createFromBigEndianTextDescriptionData0(null, textDescriptionData, textDescriptionSize, textDescriptionFlavor, mediaType, ptr);
OSStatusException.throwIfNecessary(status);
return ptr.get();
}
/**
* @throws OSStatusException
* @since Available in iOS 8.0 and later.
*/
public static CMTextFormatDescription createFromBigEndianTextDescriptionBlockBuffer(CMBlockBuffer textDescriptionBlockBuffer, String textDescriptionFlavor, CMMediaType mediaType) throws OSStatusException {
CMTextFormatDescription.CMTextFormatDescriptionPtr ptr = new CMTextFormatDescription.CMTextFormatDescriptionPtr();
OSStatus status = createFromBigEndianTextDescriptionBlockBuffer0(null, textDescriptionBlockBuffer, textDescriptionFlavor, mediaType, ptr);
OSStatusException.throwIfNecessary(status);
return ptr.get();
}
/**
* @throws OSStatusException
* @since Available in iOS 4.0 and later.
*/
public CMTextDisplayFlags getDisplayFlags() throws OSStatusException {
IntPtr ptr = new IntPtr();
OSStatus status = getDisplayFlags0(ptr);
OSStatusException.throwIfNecessary(status);
return new CMTextDisplayFlags(ptr.get());
}
/**
* @throws OSStatusException
* @since Available in iOS 4.0 and later.
*/
public CMTextJustification getHorizontalJustification() throws OSStatusException {
BytePtr ptr = new BytePtr();
OSStatus status = getJustification0(ptr, null);
OSStatusException.throwIfNecessary(status);
return CMTextJustification.valueOf(ptr.get());
}
/**
* @throws OSStatusException
* @since Available in iOS 4.0 and later.
*/
public CMTextJustification getVerticalJustification() throws OSStatusException {
BytePtr ptr = new BytePtr();
OSStatus status = getJustification0(null, ptr);
OSStatusException.throwIfNecessary(status);
return CMTextJustification.valueOf(ptr.get());
}
/**
* @throws OSStatusException
* @since Available in iOS 4.0 and later.
*/
@WeaklyLinked
public @ByVal CGRect getDefaultTextBox(boolean originIsAtTopLeft, @MachineSizedFloat double heightOfTextTrack) throws OSStatusException {
CGRect.CGRectPtr ptr = new CGRect.CGRectPtr();
OSStatus status = getDefaultTextBox0(originIsAtTopLeft, heightOfTextTrack, ptr);
OSStatusException.throwIfNecessary(status);
return ptr.get();
}
/**
* @throws OSStatusException
* @since Available in iOS 4.0 and later.
*/
public short getDefaultStyleLocalFontID() throws OSStatusException {
ShortPtr ptr = new ShortPtr();
OSStatus status = getDefaultStyle0(ptr, null, null, null, null, null);
OSStatusException.throwIfNecessary(status);
return ptr.get();
}
/**
* @throws OSStatusException
* @since Available in iOS 4.0 and later.
*/
public boolean isDefaultStyleBold() throws OSStatusException {
BooleanPtr ptr = new BooleanPtr();
OSStatus status = getDefaultStyle0(null, ptr, null, null, null, null);
OSStatusException.throwIfNecessary(status);
return ptr.get();
}
/**
* @throws OSStatusException
* @since Available in iOS 4.0 and later.
*/
public boolean isDefaultStyleItalic() throws OSStatusException {
BooleanPtr ptr = new BooleanPtr();
OSStatus status = getDefaultStyle0(null, null, ptr, null, null, null);
OSStatusException.throwIfNecessary(status);
return ptr.get();
}
/**
* @throws OSStatusException
* @since Available in iOS 4.0 and later.
*/
public boolean isDefaultStyleUnderline() throws OSStatusException {
BooleanPtr ptr = new BooleanPtr();
OSStatus status = getDefaultStyle0(null, null, null, ptr, null, null);
OSStatusException.throwIfNecessary(status);
return ptr.get();
}
/**
* @throws OSStatusException
* @since Available in iOS 4.0 and later.
*/
@WeaklyLinked
public @MachineSizedFloat double getDefaultStyleFontSize() throws OSStatusException {
MachineSizedFloatPtr ptr = new MachineSizedFloatPtr();
OSStatus status = getDefaultStyle0(null, null, null, null, ptr, null);
OSStatusException.throwIfNecessary(status);
return ptr.get();
}
/**
* @throws OSStatusException
* @since Available in iOS 8.0 and later.
*/
public CMBlockBuffer copyAsBigEndianTextDescriptionBlockBuffer(String textDescriptionFlavor) throws OSStatusException {
CMBlockBuffer.CMBlockBufferPtr ptr = new CMBlockBuffer.CMBlockBufferPtr();
OSStatus status = copyAsBigEndianTextDescriptionBlockBuffer0(null, this, textDescriptionFlavor, ptr);
OSStatusException.throwIfNecessary(status);
return ptr.get();
}
/**/
/**
* @since Available in iOS 4.0 and later.
*/
@Bridge(symbol="CMTextFormatDescriptionGetDisplayFlags", optional=true)
protected native OSStatus getDisplayFlags0(IntPtr outDisplayFlags);
/**
* @since Available in iOS 4.0 and later.
*/
@Bridge(symbol="CMTextFormatDescriptionGetJustification", optional=true)
protected native OSStatus getJustification0(BytePtr outHorizontalJust, BytePtr outVerticalJust);
/**
* @since Available in iOS 4.0 and later.
*/
@WeaklyLinked
@Bridge(symbol="CMTextFormatDescriptionGetDefaultTextBox", optional=true)
protected native OSStatus getDefaultTextBox0(boolean originIsAtTopLeft, @MachineSizedFloat double heightOfTextTrack, CGRect.CGRectPtr outDefaultTextBox);
/**
* @since Available in iOS 4.0 and later.
*/
@Bridge(symbol="CMTextFormatDescriptionGetDefaultStyle", optional=true)
protected native OSStatus getDefaultStyle0(ShortPtr outLocalFontID, BooleanPtr outBold, BooleanPtr outItalic, BooleanPtr outUnderline, MachineSizedFloatPtr outFontSize, MachineSizedFloatPtr outColorComponents);
/**
* @since Available in iOS 4.0 and later.
*/
@Bridge(symbol="CMTextFormatDescriptionGetFontName", optional=true)
protected native OSStatus getFontName0(short localFontID, CFString.CFStringPtr outFontName);
/**
* @since Available in iOS 8.0 and later.
*/
@Bridge(symbol="CMTextFormatDescriptionCreateFromBigEndianTextDescriptionData", optional=true)
private static native OSStatus createFromBigEndianTextDescriptionData0(CFAllocator allocator, BytePtr textDescriptionData, @MachineSizedUInt long textDescriptionSize, String textDescriptionFlavor, CMMediaType mediaType, CMTextFormatDescription.CMTextFormatDescriptionPtr textFormatDescriptionOut);
/**
* @since Available in iOS 8.0 and later.
*/
@Bridge(symbol="CMTextFormatDescriptionCreateFromBigEndianTextDescriptionBlockBuffer", optional=true)
private static native OSStatus createFromBigEndianTextDescriptionBlockBuffer0(CFAllocator allocator, CMBlockBuffer textDescriptionBlockBuffer, String textDescriptionFlavor, CMMediaType mediaType, CMTextFormatDescription.CMTextFormatDescriptionPtr textFormatDescriptionOut);
/**
* @since Available in iOS 8.0 and later.
*/
@Bridge(symbol="CMTextFormatDescriptionCopyAsBigEndianTextDescriptionBlockBuffer", optional=true)
private static native OSStatus copyAsBigEndianTextDescriptionBlockBuffer0(CFAllocator allocator, CMTextFormatDescription textFormatDescription, String textDescriptionFlavor, CMBlockBuffer.CMBlockBufferPtr textDescriptionBlockBufferOut);
/* */
}