001/* 002 * Copyright 2014 Cristian Rinaldi & Andres Testi. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package gwt.material.design.jquery.client.api; 017 018/* 019 * #%L 020 * GwtMaterial 021 * %% 022 * Copyright (C) 2015 - 2017 GwtMaterialDesign 023 * %% 024 * Licensed under the Apache License, Version 2.0 (the "License"); 025 * you may not use this file except in compliance with the License. 026 * You may obtain a copy of the License at 027 * 028 * http://www.apache.org/licenses/LICENSE-2.0 029 * 030 * Unless required by applicable law or agreed to in writing, software 031 * distributed under the License is distributed on an "AS IS" BASIS, 032 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 033 * See the License for the specific language governing permissions and 034 * limitations under the License. 035 * #L% 036 */ 037 038 039import gwt.material.design.jquery.client.api.Functions.FuncRet2; 040import jsinterop.annotations.JsType; 041 042/** 043 * Represent a JQuery Promise 044 * 045 * @author Cristian Rinaldi 046 */ 047@JsType(name = "Promise", isNative=true) 048public interface Promise { 049 050 Promise then(FuncRet2<Event, Object> f); 051 052 Promise done(FuncRet2<Event, Object> f); 053 054 Promise when(FuncRet2<Event, Object> f); 055 056 Promise fail(FuncRet2<Event, Object> f); 057 058 Promise always(FuncRet2<Event, Object> f); 059}