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.uikit.NSLayoutManager 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.uikit;
/**/
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.coreanimation.*;
import com.bugvm.apple.coregraphics.*;
import com.bugvm.apple.coredata.*;
import com.bugvm.apple.coreimage.*;
import com.bugvm.apple.coretext.*;
import com.bugvm.apple.corelocation.*;
/* */
/**/
/**
* @since Available in iOS 7.0 and later.
*/
/* */
/**/@Library("UIKit") @NativeClass/* */
/**/public/* */ class /**/NSLayoutManager/* */
extends /**/NSObject/* */
/**/implements NSCoding/* */ {
/**/public static class NSLayoutManagerPtr extends Ptr {}/* */
/**/static { ObjCRuntime.bind(NSLayoutManager.class); }/* */
/**//* */
/**/
public NSLayoutManager() {}
protected NSLayoutManager(SkipInit skipInit) { super(skipInit); }
public NSLayoutManager(NSCoder coder) { super((SkipInit) null); initObject(init(coder)); }
/* */
/**/
@Property(selector = "textStorage")
public native NSTextStorage getTextStorage();
@Property(selector = "setTextStorage:", strongRef = true)
public native void setTextStorage(NSTextStorage v);
@Property(selector = "textContainers")
public native NSArray getTextContainers();
@Property(selector = "delegate")
public native NSLayoutManagerDelegate getDelegate();
@Property(selector = "setDelegate:", strongRef = true)
public native void setDelegate(NSLayoutManagerDelegate v);
@Property(selector = "showsInvisibleCharacters")
public native boolean showsInvisibleCharacters();
@Property(selector = "setShowsInvisibleCharacters:")
public native void setShowsInvisibleCharacters(boolean v);
@Property(selector = "showsControlCharacters")
public native boolean showsControlCharacters();
@Property(selector = "setShowsControlCharacters:")
public native void setShowsControlCharacters(boolean v);
@Property(selector = "hyphenationFactor")
public native @MachineSizedFloat double getHyphenationFactor();
@Property(selector = "setHyphenationFactor:")
public native void setHyphenationFactor(@MachineSizedFloat double v);
@Property(selector = "usesFontLeading")
public native boolean usesFontLeading();
@Property(selector = "setUsesFontLeading:")
public native void setUsesFontLeading(boolean v);
/**
* @since Available in iOS 7.0 and later.
*/
@Property(selector = "allowsNonContiguousLayout")
public native boolean allowsNonContiguousLayout();
/**
* @since Available in iOS 7.0 and later.
*/
@Property(selector = "setAllowsNonContiguousLayout:")
public native void setAllowsNonContiguousLayout(boolean v);
/**
* @since Available in iOS 7.0 and later.
*/
@Property(selector = "hasNonContiguousLayout")
public native boolean hasNonContiguousLayout();
@Property(selector = "numberOfGlyphs")
public native @MachineSizedUInt long getNumberOfGlyphs();
@Property(selector = "extraLineFragmentRect")
public native @ByVal CGRect getExtraLineFragmentRect();
@Property(selector = "extraLineFragmentUsedRect")
public native @ByVal CGRect getExtraLineFragmentUsedRect();
@Property(selector = "extraLineFragmentTextContainer")
public native NSTextContainer getExtraLineFragmentTextContainer();
/* */
/**//* */
public void showCGGlyphs(short[] glyphs, CGPoint[] positions, UIFont font, CGAffineTransform textMatrix, NSDictionary, ?> attributes, CGContext graphicsContext) {
if (glyphs == null) {
throw new NullPointerException("glyphs");
}
if (positions == null) {
throw new NullPointerException("positions");
}
if (glyphs.length != positions.length) {
throw new NullPointerException("glyphs.length != positions.length");
}
CGPoint positionsPtr = Struct.allocate(CGPoint.class, positions.length);
positionsPtr.update(positions);
showCGGlyphs(VM.getArrayValuesAddress(glyphs), positionsPtr, glyphs.length, font, textMatrix, attributes, graphicsContext);
}
public void fillBackground(CGRect[] rectArray, NSRange charRange, UIColor color) {
if (rectArray == null) {
throw new NullPointerException("rectArray");
}
CGRect rectArrayPtr = Struct.allocate(CGRect.class, rectArray.length);
rectArrayPtr.update(rectArray);
fillBackground(rectArrayPtr, rectArray.length, charRange, color);
}
/**/
@Method(selector = "initWithCoder:")
protected native @Pointer long init(NSCoder coder);
@Method(selector = "addTextContainer:")
public native void addTextContainer(NSTextContainer container);
@Method(selector = "insertTextContainer:atIndex:")
public native void insertTextContainer(NSTextContainer container, @MachineSizedUInt long index);
@Method(selector = "removeTextContainerAtIndex:")
public native void removeTextContainer(@MachineSizedUInt long index);
@Method(selector = "textContainerChangedGeometry:")
public native void textContainerChangedGeometry(NSTextContainer container);
@Method(selector = "invalidateGlyphsForCharacterRange:changeInLength:actualCharacterRange:")
public native void invalidateGlyphs(@ByVal NSRange charRange, @MachineSizedSInt long delta, NSRange actualCharRange);
/**
* @since Available in iOS 7.0 and later.
*/
@Method(selector = "invalidateLayoutForCharacterRange:actualCharacterRange:")
public native void invalidateLayout(@ByVal NSRange charRange, NSRange actualCharRange);
@Method(selector = "invalidateDisplayForCharacterRange:")
public native void invalidateDisplayForCharacterRange(@ByVal NSRange charRange);
@Method(selector = "invalidateDisplayForGlyphRange:")
public native void invalidateDisplayForGlyphRange(@ByVal NSRange glyphRange);
/**
* @since Available in iOS 7.0 and later.
*/
@Method(selector = "processEditingForTextStorage:edited:range:changeInLength:invalidatedRange:")
public native void processEditing(NSTextStorage textStorage, NSTextStorageEditActions editMask, @ByVal NSRange newCharRange, @MachineSizedSInt long delta, @ByVal NSRange invalidatedCharRange);
@Method(selector = "ensureGlyphsForCharacterRange:")
public native void ensureGlyphsForCharacterRange(@ByVal NSRange charRange);
@Method(selector = "ensureGlyphsForGlyphRange:")
public native void ensureGlyphsForGlyphRange(@ByVal NSRange glyphRange);
@Method(selector = "ensureLayoutForCharacterRange:")
public native void ensureLayoutForCharacterRange(@ByVal NSRange charRange);
@Method(selector = "ensureLayoutForGlyphRange:")
public native void ensureLayoutForGlyphRange(@ByVal NSRange glyphRange);
@Method(selector = "ensureLayoutForTextContainer:")
public native void ensureLayoutForTextContainer(NSTextContainer container);
@Method(selector = "ensureLayoutForBoundingRect:inTextContainer:")
public native void ensureLayoutForBoundingRect(@ByVal CGRect bounds, NSTextContainer container);
/**
* @since Available in iOS 7.0 and later.
*/
@Method(selector = "setGlyphs:properties:characterIndexes:font:forGlyphRange:")
public native void setGlyphs(ShortPtr glyphs, MachineSizedSIntPtr props, MachineSizedUIntPtr charIndexes, UIFont aFont, @ByVal NSRange glyphRange);
@Method(selector = "isValidGlyphIndex:")
public native boolean isValidGlyphIndex(@MachineSizedUInt long glyphIndex);
/**
* @since Available in iOS 7.0 and later.
*/
@Method(selector = "propertyForGlyphAtIndex:")
public native NSGlyphProperty getPropertyForGlyph(@MachineSizedUInt long glyphIndex);
@Method(selector = "characterIndexForGlyphAtIndex:")
public native @MachineSizedUInt long getCharacterIndexForGlyph(@MachineSizedUInt long glyphIndex);
@Method(selector = "glyphIndexForCharacterAtIndex:")
public native @MachineSizedUInt long getGlyphIndexForCharacter(@MachineSizedUInt long charIndex);
/**
* @since Available in iOS 7.0 and later.
*/
@Method(selector = "getGlyphsInRange:glyphs:properties:characterIndexes:bidiLevels:")
public native @MachineSizedUInt long getGlyphs(@ByVal NSRange glyphRange, ShortPtr glyphBuffer, MachineSizedSIntPtr props, MachineSizedUIntPtr charIndexBuffer, BytePtr bidiLevelBuffer);
@Method(selector = "setTextContainer:forGlyphRange:")
public native void setTextContainer(NSTextContainer container, @ByVal NSRange glyphRange);
@Method(selector = "setLineFragmentRect:forGlyphRange:usedRect:")
public native void setLineFragmentRect(@ByVal CGRect fragmentRect, @ByVal NSRange glyphRange, @ByVal CGRect usedRect);
@Method(selector = "setExtraLineFragmentRect:usedRect:textContainer:")
public native void setExtraLineFragmentRect(@ByVal CGRect fragmentRect, @ByVal CGRect usedRect, NSTextContainer container);
@Method(selector = "setLocation:forStartOfGlyphRange:")
public native void setLocation(@ByVal CGPoint location, @ByVal NSRange glyphRange);
@Method(selector = "setNotShownAttribute:forGlyphAtIndex:")
public native void setNotShownAttribute(boolean flag, @MachineSizedUInt long glyphIndex);
@Method(selector = "setDrawsOutsideLineFragment:forGlyphAtIndex:")
public native void setDrawsOutsideLineFragment(boolean flag, @MachineSizedUInt long glyphIndex);
@Method(selector = "setAttachmentSize:forGlyphRange:")
public native void setAttachmentSize(@ByVal CGSize attachmentSize, @ByVal NSRange glyphRange);
@Method(selector = "getFirstUnlaidCharacterIndex:glyphIndex:")
public native void getFirstUnlaidCharacterIndex(MachineSizedUIntPtr charIndex, MachineSizedUIntPtr glyphIndex);
@Method(selector = "firstUnlaidCharacterIndex")
public native @MachineSizedUInt long getFirstUnlaidCharacterIndex();
@Method(selector = "firstUnlaidGlyphIndex")
public native @MachineSizedUInt long getFirstUnlaidGlyphIndex();
@Method(selector = "textContainerForGlyphAtIndex:effectiveRange:")
public native NSTextContainer getTextContainer(@MachineSizedUInt long glyphIndex, NSRange effectiveGlyphRange);
/**
* @since Available in iOS 9.0 and later.
*/
@Method(selector = "textContainerForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:")
public native NSTextContainer getTextContainer(@MachineSizedUInt long glyphIndex, NSRange effectiveGlyphRange, boolean withoutAdditionalLayout);
@Method(selector = "usedRectForTextContainer:")
public native @ByVal CGRect getUsedRectForTextContainer(NSTextContainer container);
@Method(selector = "lineFragmentRectForGlyphAtIndex:effectiveRange:")
public native @ByVal CGRect getLineFragmentRect(@MachineSizedUInt long glyphIndex, NSRange effectiveGlyphRange);
/**
* @since Available in iOS 9.0 and later.
*/
@Method(selector = "lineFragmentRectForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:")
public native @ByVal CGRect getLineFragmentRect(@MachineSizedUInt long glyphIndex, NSRange effectiveGlyphRange, boolean withoutAdditionalLayout);
@Method(selector = "lineFragmentUsedRectForGlyphAtIndex:effectiveRange:")
public native @ByVal CGRect getLineFragmentUsedRect(@MachineSizedUInt long glyphIndex, NSRange effectiveGlyphRange);
/**
* @since Available in iOS 9.0 and later.
*/
@Method(selector = "lineFragmentUsedRectForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:")
public native @ByVal CGRect getLineFragmentUsedRect(@MachineSizedUInt long glyphIndex, NSRange effectiveGlyphRange, boolean withoutAdditionalLayout);
@Method(selector = "locationForGlyphAtIndex:")
public native @ByVal CGPoint getLocation(@MachineSizedUInt long glyphIndex);
@Method(selector = "notShownAttributeForGlyphAtIndex:")
public native boolean getNotShownAttribute(@MachineSizedUInt long glyphIndex);
@Method(selector = "drawsOutsideLineFragmentForGlyphAtIndex:")
public native boolean getDrawsOutsideLineFragment(@MachineSizedUInt long glyphIndex);
@Method(selector = "attachmentSizeForGlyphAtIndex:")
public native @ByVal CGSize getAttachmentSize(@MachineSizedUInt long glyphIndex);
/**
* @since Available in iOS 7.0 and later.
*/
@Method(selector = "truncatedGlyphRangeInLineFragmentForGlyphAtIndex:")
public native @ByVal NSRange getTruncatedGlyphRangeInLineFragment(@MachineSizedUInt long glyphIndex);
@Method(selector = "glyphRangeForCharacterRange:actualCharacterRange:")
public native @ByVal NSRange getGlyphRangeForCharacterRange(@ByVal NSRange charRange, NSRange actualCharRange);
@Method(selector = "characterRangeForGlyphRange:actualGlyphRange:")
public native @ByVal NSRange getCharacterRangeForGlyphRange(@ByVal NSRange glyphRange, NSRange actualGlyphRange);
@Method(selector = "glyphRangeForTextContainer:")
public native @ByVal NSRange glyphRangeForTextContainer(NSTextContainer container);
@Method(selector = "rangeOfNominallySpacedGlyphsContainingIndex:")
public native @ByVal NSRange getRangeOfNominallySpacedGlyphsContainingIndex(@MachineSizedUInt long glyphIndex);
@Method(selector = "boundingRectForGlyphRange:inTextContainer:")
public native @ByVal CGRect getBoundingRectForGlyphRange(@ByVal NSRange glyphRange, NSTextContainer container);
@Method(selector = "glyphRangeForBoundingRect:inTextContainer:")
public native @ByVal NSRange getGlyphRangeForBoundingRect(@ByVal CGRect bounds, NSTextContainer container);
@Method(selector = "glyphRangeForBoundingRectWithoutAdditionalLayout:inTextContainer:")
public native @ByVal NSRange getGlyphRangeForBoundingRectWithoutAdditionalLayout(@ByVal CGRect bounds, NSTextContainer container);
@Method(selector = "glyphIndexForPoint:inTextContainer:fractionOfDistanceThroughGlyph:")
public native @MachineSizedUInt long getSlyphIndexForPoint(@ByVal CGPoint point, NSTextContainer container, MachineSizedFloatPtr partialFraction);
@Method(selector = "glyphIndexForPoint:inTextContainer:")
public native @MachineSizedUInt long getSlyphIndexForPoint(@ByVal CGPoint point, NSTextContainer container);
@Method(selector = "fractionOfDistanceThroughGlyphForPoint:inTextContainer:")
public native @MachineSizedFloat double getFractionOfDistanceThroughGlyphForPoint(@ByVal CGPoint point, NSTextContainer container);
@Method(selector = "characterIndexForPoint:inTextContainer:fractionOfDistanceBetweenInsertionPoints:")
public native @MachineSizedUInt long getCharacterIndexForPoint(@ByVal CGPoint point, NSTextContainer container, MachineSizedFloatPtr partialFraction);
@Method(selector = "getLineFragmentInsertionPointsForCharacterAtIndex:alternatePositions:inDisplayOrder:positions:characterIndexes:")
public native @MachineSizedUInt long getLineFragmentInsertionPoints(@MachineSizedUInt long charIndex, boolean aFlag, boolean dFlag, MachineSizedFloatPtr positions, MachineSizedUIntPtr charIndexes);
/**
* @since Available in iOS 7.0 and later.
*/
@Method(selector = "enumerateLineFragmentsForGlyphRange:usingBlock:")
public native void enumerateLineFragments(@ByVal NSRange glyphRange, @Block("(@ByVal, @ByVal, , @ByVal, )") VoidBlock5 block);
/**
* @since Available in iOS 7.0 and later.
*/
@Method(selector = "enumerateEnclosingRectsForGlyphRange:withinSelectedGlyphRange:inTextContainer:usingBlock:")
public native void enumerateEnclosingRects(@ByVal NSRange glyphRange, @ByVal NSRange selectedRange, NSTextContainer textContainer, @Block("(@ByVal, )") VoidBlock2 block);
@Method(selector = "drawBackgroundForGlyphRange:atPoint:")
public native void drawBackground(@ByVal NSRange glyphsToShow, @ByVal CGPoint origin);
@Method(selector = "drawGlyphsForGlyphRange:atPoint:")
public native void drawGlyphs(@ByVal NSRange glyphsToShow, @ByVal CGPoint origin);
/**
* @since Available in iOS 7.0 and later.
*/
@Method(selector = "showCGGlyphs:positions:count:font:matrix:attributes:inContext:")
protected native void showCGGlyphs(@Pointer long glyphs, CGPoint positions, @MachineSizedUInt long glyphCount, UIFont font, @ByVal CGAffineTransform textMatrix, NSDictionary, ?> attributes, CGContext graphicsContext);
/**
* @since Available in iOS 7.0 and later.
*/
@Method(selector = "fillBackgroundRectArray:count:forCharacterRange:color:")
protected native void fillBackground(CGRect rectArray, @MachineSizedUInt long rectCount, @ByVal NSRange charRange, UIColor color);
@Method(selector = "drawUnderlineForGlyphRange:underlineType:baselineOffset:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:")
public native void drawUnderline(@ByVal NSRange glyphRange, NSUnderlineStyle underlineVal, @MachineSizedFloat double baselineOffset, @ByVal CGRect lineRect, @ByVal NSRange lineGlyphRange, @ByVal CGPoint containerOrigin);
@Method(selector = "underlineGlyphRange:underlineType:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:")
public native void underline(@ByVal NSRange glyphRange, NSUnderlineStyle underlineVal, @ByVal CGRect lineRect, @ByVal NSRange lineGlyphRange, @ByVal CGPoint containerOrigin);
@Method(selector = "drawStrikethroughForGlyphRange:strikethroughType:baselineOffset:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:")
public native void drawStrikethrough(@ByVal NSRange glyphRange, NSUnderlineStyle strikethroughVal, @MachineSizedFloat double baselineOffset, @ByVal CGRect lineRect, @ByVal NSRange lineGlyphRange, @ByVal CGPoint containerOrigin);
@Method(selector = "strikethroughGlyphRange:strikethroughType:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:")
public native void strikethrough(@ByVal NSRange glyphRange, NSUnderlineStyle strikethroughVal, @ByVal CGRect lineRect, @ByVal NSRange lineGlyphRange, @ByVal CGPoint containerOrigin);
@Method(selector = "glyphAtIndex:isValidIndex:")
public native short getGlyph(@MachineSizedUInt long glyphIndex, BooleanPtr isValidIndex);
@Method(selector = "glyphAtIndex:")
public native short getGlyph(@MachineSizedUInt long glyphIndex);
@Method(selector = "encodeWithCoder:")
public native void encode(NSCoder coder);
/* */
}