/*
 * Copyright (c) 2014 Mario Guggenberger <mg@protyposis.net>
 *
 * This file is part of MediaPlayer-Extended.
 *
 * MediaPlayer-Extended is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * MediaPlayer-Extended is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with MediaPlayer-Extended.  If not, see <http://www.gnu.org/licenses/>.
 */

package net.protyposis.android.spectaculum.effects;

/**
 * Created by maguggen on 21.08.2014.
 */
public interface Parameter<T> {

    interface Delegate<T> {
        void setValue(T value);
    }

    interface Listener {
        void onParameterChanged(Parameter parameter);
    }

    enum Type {
        INTEGER,
        FLOAT,
        ENUM
    }

    Type getType();

    String getName();

    String getDescription();

    void reset();

    void setListener(Listener listener);

    /**
     * Sets a ParameterHandler on which parameter value changes will be executed. Parameter values
     * need to be set on the GL thread where the effect that the parameter belongs is active, and
     * this handler can be used to hand the parameter setting over to the GL thread.
     * If no handler is set, parameters will be set on the caller thread.
     * @param handler the parameter handler to set, or null to unset
     */
    void setHandler(ParameterHandler handler);
}

@@ -841,16 +841,58 @@
 s;%0A%0A/**%0A
+ * Interface to a parameter of an effect.%0A
  * Creat
@@ -1033,250 +1033,1064 @@
     
-interface Listener %7B%0A        void onParameterChanged(Parameter parameter);%0A    %7D%0A%0A    enum Type %7B%0A        INTEGER,%0A        FLOAT,%0A        ENUM%0A    %7D%0A%0A    Type getType();%0A%0A    String getName();%0A%0A    String getDescription();%0A%0A    void reset();%0A
+/**%0A     * Callback interface for parameter events.%0A     */%0A    interface Listener %7B%0A        /**%0A         * Gets called when the value of a parameter has changed.%0A         * @param parameter the parameter whose value has changed%0A         */%0A        void onParameterChanged(Parameter parameter);%0A    %7D%0A%0A    /**%0A     * The value type of a parameter. Used to distinguish parameter objects by their value type.%0A     */%0A    enum Type %7B%0A        INTEGER,%0A        FLOAT,%0A        ENUM%0A    %7D%0A%0A    /**%0A     * Gets the type of the parameter.%0A     */%0A    Type getType();%0A%0A    /**%0A     * Gets the name of the parameter.%0A     */%0A    String getName();%0A%0A    /**%0A     * Gets the description of the parameter. Returns null if no description has been set.%0A     */%0A    String getDescription();%0A%0A    /**%0A     * Resets the parameter to its default value.%0A     */%0A    void reset();%0A%0A    /**%0A     * Sets an event listener to listen for parameter value change events.%0A     * @see Listener#onParameterChanged(Parameter)%0A     * @param listener the listener to notify of events%0A     */
 %0A   

Add documentation to parameter interface