package imseProc.core;

import java.util.List;

import org.eclipse.swt.widgets.Composite;

public interface ImgSink {
	
	public void setSource(ImgSource source);
	
	public ImgSource getConnectedSource();
	
	public void setSelectedSourceIndex(int index);
	
	public int getSelectedSourceIndex();
	
	/** Notifications from the connected source, that one or more of the
	 * images has changed (to a different image, this isn't called when
	 * an image's content changes) */
	public void notifySourceChanged();
	
	/**
	 * @param interfacingClass	Composite.class for an SWT controller
	 * @param args	Depends on interfacingClass
	 * @param controlSink true is the requester is looking at a sink, false if a source
	 * @return
	 */
	public ImagePipeController createSinkController(Class interfacingClass, Object args[]);
	
	public List<ImagePipeController> getControllers();
	
	public void imageChanged(int idx);
	
	/** True only when nothing has changed and everything is ready and synced */
	public boolean isIdle();
}
