All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bugvm.apple.corefoundation.CFDateFormatter Maven / Gradle / Ivy

There is a newer version: 1.2.9
Show newest version
/*
 * 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.corefoundation;

/**/
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.dispatch.*;
import com.bugvm.apple.coreservices.*;
import com.bugvm.apple.coremedia.*;
import com.bugvm.apple.uikit.*;
import com.bugvm.apple.coretext.*;
/**/

/**/
/**/
/**/@Library("CoreFoundation")/**/
/**/public/**/ class /**/CFDateFormatter/**/ 
    extends /**/CFType/**/ 
    /**//**/ {

    /**/public static class CFDateFormatterPtr extends Ptr {}/**/
    /**/static { Bro.bind(CFDateFormatter.class); }/**/
    /**//**/
    /**/
    protected CFDateFormatter() {}
    /**/
    /**//**/
    /**//**/
    /**
     * @since Available in iOS 4.0 and later.
     */
    public static String getDateFormat(String tmplate, @MachineSizedUInt long options, CFLocale locale) {
        return getDateFormat(null, tmplate, options, locale);
    }
    public static CFDateFormatter create(CFLocale locale, CFDateFormatterStyle dateStyle, CFDateFormatterStyle timeStyle) {
        return create(null, locale, dateStyle, timeStyle);
    }
    public String format(CFDate date) {
        return format(null, this, date);
    }
    public String format(double at) {
        return format(null, this, at);
    }
    public CFDate parse(String string, CFRange rangep) {
        return parse(null, this, string, rangep);
    }
    public double getAbsoluteTime(String string, CFRange rangep) {
        DoublePtr ptr = new DoublePtr();
        getAbsoluteTime(string, rangep, ptr);
        return ptr.get();
    }
    /**/
    /**
     * @since Available in iOS 4.0 and later.
     */
    @Bridge(symbol="CFDateFormatterCreateDateFormatFromTemplate", optional=true)
    private static native @com.bugvm.rt.bro.annotation.Marshaler(CFString.AsStringNoRetainMarshaler.class) String getDateFormat(CFAllocator allocator, String tmplate, @MachineSizedUInt long options, CFLocale locale);
    @Bridge(symbol="CFDateFormatterGetTypeID", optional=true)
    public static native @MachineSizedUInt long getClassTypeID();
    @Bridge(symbol="CFDateFormatterCreate", optional=true)
    public static native @com.bugvm.rt.bro.annotation.Marshaler(CFType.NoRetainMarshaler.class) CFDateFormatter create(CFAllocator allocator, CFLocale locale, CFDateFormatterStyle dateStyle, CFDateFormatterStyle timeStyle);
    @Bridge(symbol="CFDateFormatterGetLocale", optional=true)
    public native CFLocale getLocale();
    @Bridge(symbol="CFDateFormatterGetDateStyle", optional=true)
    public native CFDateFormatterStyle getDateStyle();
    @Bridge(symbol="CFDateFormatterGetTimeStyle", optional=true)
    public native CFDateFormatterStyle getTimeStyle();
    @Bridge(symbol="CFDateFormatterGetFormat", optional=true)
    public native String getFormat();
    @Bridge(symbol="CFDateFormatterSetFormat", optional=true)
    public native void setFormat(String formatString);
    @Bridge(symbol="CFDateFormatterCreateStringWithDate", optional=true)
    private static native @com.bugvm.rt.bro.annotation.Marshaler(CFString.AsStringNoRetainMarshaler.class) String format(CFAllocator allocator, CFDateFormatter formatter, CFDate date);
    @Bridge(symbol="CFDateFormatterCreateStringWithAbsoluteTime", optional=true)
    private static native @com.bugvm.rt.bro.annotation.Marshaler(CFString.AsStringNoRetainMarshaler.class) String format(CFAllocator allocator, CFDateFormatter formatter, double at);
    @Bridge(symbol="CFDateFormatterCreateDateFromString", optional=true)
    private static native @com.bugvm.rt.bro.annotation.Marshaler(CFType.NoRetainMarshaler.class) CFDate parse(CFAllocator allocator, CFDateFormatter formatter, String string, CFRange rangep);
    @Bridge(symbol="CFDateFormatterGetAbsoluteTimeFromString", optional=true)
    private native boolean getAbsoluteTime(String string, CFRange rangep, DoublePtr atp);
    @Bridge(symbol="CFDateFormatterSetProperty", optional=true)
    public native void setProperty(CFDateFormatterProperty key, CFType value);
    @Bridge(symbol="CFDateFormatterCopyProperty", optional=true)
    public native @com.bugvm.rt.bro.annotation.Marshaler(CFType.NoRetainMarshaler.class) CFType getProperty(CFDateFormatterProperty key);
    /**/
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy