@JSFunctor
public interface AjaxSuccessHandler<T extends JSObject> extends JSObject {

	void onSuccess(T data, JSString textStatus, JQueryXHR jqXHR);

} public abstract class JQueryAnimationOptions implements JSObject {

	@JSBody(params = {}, script = "return {}")
	public static native final JQueryAnimationOptions create();

	@JSProperty
	public abstract void setDuration(String value);

	@JSProperty
	public abstract void setDuration(int value);

	@JSProperty
	public abstract void setEasing(String value);

	@JSProperty
	public abstract void setComplete(JSVoidFunctor0 value);

	@JSProperty
	public abstract void setStep(JSVoidFunctor2<JSNumber, JSObject> value);

	@JSProperty
	public abstract void setProgress(JQueryPromise animation, int progress, int remainingMs);

	@JSProperty
	public abstract void setStart(JSVoidFunctor1<JQueryPromise> funcWithAnimationPromise);

	@JSProperty
	public abstract void setDone(
			JSVoidFunctor2<JQueryPromise, JSBoolean> funcWithAnimationPromiseAndJumpedToEndBoolean);

	@JSProperty
	public abstract void setFail(
			JSVoidFunctor2<JQueryPromise, JSBoolean> funcWithAnimationPromiseAndJumpedToEndBoolean);

	@JSProperty
	public abstract void setAlways(
			JSVoidFunctor2<JQueryPromise, JSBoolean> funcWithAnimationPromiseAndJumpedToEndBoolean);

	@JSProperty
	public abstract void setQueue(boolean value);

	@JSProperty
	public abstract void setQueue(String value);

	@JSProperty
	public abstract void setSpecialEasing(JSObject value);
} public interface JQueryCoordinates extends JSObject {

    @JSProperty
    int getTop();

    @JSProperty
    int getLeft();

    @JSProperty
    void setTop(int top);

    @JSProperty
    void setLeft(int left);
} @JSFunctor
public interface JQueryDomFilterFunction extends JSObject {

    public boolean apply(int index, Element element);
} @JSFunctor
public interface JQueryDomMapFunction extends JSObject {

    public JSObject apply(int index, Element element);

} @JSFunctor
public interface JQueryDomUpdateFunction extends JSObject {

    public <T extends JSObject> T apply(int index, String html);

} @JSFunctor
public interface JQueryDomWrapFunctionByJQuery extends JSObject {

    public JQueryObject apply(int index);
} @JSFunctor
public interface JQueryDomWrapFunctionByString extends JSObject {

	public String apply(int index);

} @JSFunctor
public interface JQueryEventHandler extends JSObject {

    public boolean apply(JQueryEventObject event);

} @JSFunctor
public interface JQueryEventHandlerWithExtraParameters extends JSObject {

    public boolean apply(JQueryEventObject event, JSArray<JSObject> extraParameters);

} public interface JQueryEventObject
        extends BaseJQueryEventObject, JQueryInputEventObject, JQueryMouseEventObject, JQueryKeyEventObject {

} @JSFunctor
public interface JQueryIndexValueFunctionReturnInt extends JSObject {

    int apply(int index, int value);

} @JSFunctor
public interface JQueryIndexValueFunctionReturnJSObject extends JSObject {

    JSObject apply(int index, int value);

} @JSFunctor
public interface JQueryIndexValueFunctionReturnString extends JSObject {

    String apply(int index, int value);

} @JSFunctor
public interface JQueryIndexValueStateFunctionReturnString extends JSObject {

    String apply(int index, int value, boolean state);

} @JSFunctor
public interface JQueryObjectAjaxErrorHandler extends JSObject {

    void onError(JQueryEventObject event, JQueryXHR jqXHR, JQueryAjaxSettingsObject settings, String thrownError);

} @JSFunctor
public interface JQueryObjectAjaxHandler extends JSObject {

	void onComplete(JQueryEventObject event, JQueryXHR jqXHR, JQueryAjaxSettingsObject settings);

} @JSFunctor
public interface JQueryObjectAjaxSucessHandler extends JSObject {

	void onError(JQueryEventObject event, JQueryXHR jqXHR, JQueryAjaxSettingsObject settings, JSObject data);

} @JSFunctor
public interface JQueryOffsetHandler extends JSObject {

    public JQueryCoordinates apply(int index, JQueryCoordinates coords);

} public interface JQueryPromise extends JSObject {

    String state();

    JQueryPromise always(JQueryPromiseCallback1<?> alwaysCallback);

    JQueryPromise done(JQueryPromiseCallback1<?> doneCallback);

    JQueryPromise fail(JQueryPromiseCallback1<?> failCallback);

    JQueryPromise progress(JQueryPromiseCallback1<?> progressCallback);

    JQueryPromise then(JQueryPromiseCallback1<?> doneCallback);

    JQueryPromise then(JQueryPromiseCallback1<?> doneCallback, JQueryPromiseCallback1<?> failCallback);

    JQueryPromise then(JQueryPromiseCallback1<?> doneCallback, JQueryPromiseCallback1<?> failCallback,
            JQueryPromiseCallback1<?> progressCallback);

} @JSFunctor
public interface JSFunctor0<R extends JSObject> extends JSFunctorBase{

	public R apply();

} @JSFunctor
public interface JSFunctor1<T1 extends JSObject, R extends JSObject> extends JSFunctorBase {

	public R apply(T1 a);

} @JSFunctor
public interface JSVoidFunctor0 extends JSFunctorBase {

	public void apply();

} @JSFunctor
public interface JSVoidFunctor1<T1 extends JSObject> extends JSFunctorBase {

	public void apply(T1 a);

} @JSFunctor
public interface JSVoidFunctor2<T1 extends JSObject, T2 extends JSObject> extends JSFunctorBase {

	public void apply(T1 a, T2 b);

}
import org.teavm.jso.JSBody;
import org.teavm.jso.JSObject;
import org.teavm.jso.core.JSArray;
import org.teavm.jso.core.JSArrayReader;
import org.teavm.jso.core.JSNumber;
import org.teavm.jso.core.JSString;
import org.teavm.jso.dom.xml.Element;
import de.iterable.teavm.jquery.ajax.handler.AjaxSuccessHandler;
import de.iterable.teavm.jquery.types.JQueryAnimationOptions;
import de.iterable.teavm.jquery.types.JQueryCoordinates;
import de.iterable.teavm.jquery.types.JQueryDomFilterFunction;
import de.iterable.teavm.jquery.types.JQueryDomMapFunction;
import de.iterable.teavm.jquery.types.JQueryDomUpdateFunction;
import de.iterable.teavm.jquery.types.JQueryDomWrapFunctionByJQuery;
import de.iterable.teavm.jquery.types.JQueryDomWrapFunctionByString;
import de.iterable.teavm.jquery.types.JQueryEventHandler;
import de.iterable.teavm.jquery.types.JQueryEventHandlerWithExtraParameters;
import de.iterable.teavm.jquery.types.JQueryEventObject;
import de.iterable.teavm.jquery.types.JQueryIndexValueFunctionReturnInt;
import de.iterable.teavm.jquery.types.JQueryIndexValueFunctionReturnJSObject;
import de.iterable.teavm.jquery.types.JQueryIndexValueFunctionReturnString;
import de.iterable.teavm.jquery.types.JQueryIndexValueStateFunctionReturnString;
import de.iterable.teavm.jquery.types.JQueryObjectAjaxErrorHandler;
import de.iterable.teavm.jquery.types.JQueryObjectAjaxHandler;
import de.iterable.teavm.jquery.types.JQueryObjectAjaxSucessHandler;
import de.iterable.teavm.jquery.types.JQueryOffsetHandler;
import de.iterable.teavm.jquery.types.JQueryPromise;
import de.iterable.teavm.utils.functor.JSFunctor0;
import de.iterable.teavm.utils.functor.JSFunctor1;
import de.iterable.teavm.utils.functor.JSVoidFunctor0;
import de.iterable.teavm.utils.functor.JSVoidFunctor1;
import de.iterable.teavm.utils.functor.JSVoidFunctor2;
/*
 *  Copyright 2015 Jan-Felix Wittmann.
 *
 *  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 de.iterable.teavm.jquery;



/**
 *
 * @author Jan-Felix Wittmann
 */
public abstract class JQueryObject<J extends JQueryObject<J>> implements JSObject, JSArrayReader<Element> {

	public abstract J load(String url);

	public abstract J load(String url, JSObject data);

	public abstract J load(String url, String data);

	public abstract J load(String url, AjaxSuccessHandler<JSString> handler);

	public abstract J load(String url, JSObject data, AjaxSuccessHandler<JSString> handler);

	public abstract J load(String url, String data, AjaxSuccessHandler<JSString> handler);

	public abstract J ajaxComplete(JQueryObjectAjaxHandler handler);

	public abstract J ajaxError(JQueryObjectAjaxErrorHandler handler);

	public abstract J ajaxSend(JQueryObjectAjaxHandler handler);

	public abstract J ajaxStart(JSVoidFunctor0 handler);

	public abstract J ajaxStop(JSVoidFunctor0 handler);

	public abstract J ajaxSuccess(JQueryObjectAjaxSucessHandler handler);

	public abstract String serialize();

	public abstract JSArray<JSObject> serializeArray();

	public abstract J addClass(String className);

	public abstract J addClass(JQueryIndexValueFunctionReturnString funct);

	public abstract String attr(String attributeName);

	public abstract J attr(String attributeName, String value);

	public abstract J attr(String attributeName, int value);

	public abstract J attr(JSObject values);

	public abstract J attr(JQueryIndexValueFunctionReturnString funct);

	public abstract boolean hasClass(String className);

	public abstract String html();

	public abstract J html(String text);

	public abstract JSObject prop(String propertyName);

	public abstract J prop(String propertyName, JSObject value);

	public abstract J prop(JSObject properties);

	public abstract J prop(JQueryIndexValueFunctionReturnJSObject funct);

	public abstract J removeAttr(String attributeName);

	public abstract J removeClass();

	public abstract J removeClass(String className);

	public abstract J removeClass(JQueryIndexValueFunctionReturnString funct);

	public abstract J removeProp(String propertyName);

	public abstract J toggleClass(String className);

	public abstract J toggleClass(String className, boolean state);

	public abstract J toggleClass(boolean state);

	public abstract J toggleClass();

	public abstract J toggleClass(JQueryIndexValueStateFunctionReturnString func);

	public abstract JSObject val();

	public abstract J val(String value);

	public abstract J val(int value);

	public abstract J val(String[] value);

	public abstract J val(JQueryIndexValueFunctionReturnString funct);

	public abstract String css(String propertyName);

	public abstract String css(String[] propertyNames);

	public abstract J css(String propertyName, String value);

	public abstract J css(String propertyName, Number propertyValue);

	public abstract J css(JSObject properties);

	public abstract J css(String propertyName, JQueryIndexValueFunctionReturnInt func);

	public abstract J css(String propertyName, JQueryIndexValueFunctionReturnString func);

	public abstract int height();

	public abstract J height(int value);

	public abstract J height(String value);

	public abstract J height(JQueryIndexValueFunctionReturnString funct);

	public abstract J height(JQueryIndexValueFunctionReturnInt funct);

	public abstract int innerHeight();

	public abstract J innerHeight(int value);

	public abstract J innerHeight(String value);

	public abstract J innerHeight(JQueryIndexValueFunctionReturnString funct);

	public abstract J innerHeight(JQueryIndexValueFunctionReturnInt funct);

	public abstract int innerWidth();

	public abstract JQueryCoordinates offset();