package org.tizen.gwt.sample.raphaelpaint.client.overlay;

import com.google.gwt.core.client.JavaScriptObject;

public abstract class JQueryHandler {
	
	private static final native JavaScriptObject createJsFunction(JQueryHandler handler) /*-{
		return function(event) {
			handler.@org.tizen.gwt.sample.raphaelpaint.client.overlay.JQueryHandler::onEvent(Lorg/tizen/gwt/sample/raphaelpaint/client/overlay/JQueryEvent;)(event);
		};
	}-*/;
	
	public final JavaScriptObject jsFunction;
	
	public JQueryHandler() {
		jsFunction = createJsFunction(this);
	}
	
	public abstract void onEvent(JQueryEvent event);
}