/*
 * Java-Gnome Bindings Library
 *
 * Copyright 1998-2004 the Java-Gnome Team, all rights reserved.
 *
 * The Java-Gnome bindings library is free software distributed under
 * the terms of the GNU Library General Public License version 2.
 */

package org.gnu.gdk;
import org.gnu.glib.Boxed;
import org.gnu.glib.Handle;
public class Cursor extends Boxed {

	/**
	*	Creates a new cursor from the set of builtin cursors.
	*/
	public Cursor(CursorType ctype) {
		handle = gdk_cursor_new(ctype.getValue());
	}

	/**
	 * Create a new cursor from a pixmap.
	 */
	public Cursor(Pixmap source, Pixmap mask, Color fg, Color bg, int x, int y) {
		handle = gdk_cursor_new_from_pixmap(source.getHandle(), mask.getHandle(),
				fg.getHandle(), bg.getHandle(), x, y);
	}

	/****************************************
	 * BEGINNING OF JNI CODE
	 ****************************************/
	native static final protected int getType(Handle obj);
	native static final protected Handle gdk_cursor_new(int cursorType);
	native static final protected Handle gdk_cursor_new_from_pixmap(Handle source,
	        Handle mask, Handle fg, Handle bg, int x, int y);
	native static final protected Handle gdk_cursor_ref(Handle cursor);
	native static final protected void gdk_cursor_unref(Handle cursor);
	/****************************************
	 * END OF JNI CODE
	 ****************************************/
}
