/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.sun.glass.ui.gtk;

import com.sun.glass.ui.Robot;

/**
 *
 * @author martin
 */
class GtkRobot extends Robot {

    public GtkRobot() {
    }

    @Override
    protected native long _create();

    @Override
    protected native void _destroy(long ptr);

    @Override
    protected native void _keyPress(long ptr, int code);

    @Override
    protected native void _keyRelease(long ptr, int code);

    @Override
    protected native void _mouseMove(long ptr, int x, int y);

    @Override
    protected native void _mousePress(long ptr, int buttons);

    @Override
    protected native void _mouseRelease(long ptr, int buttons);

    @Override
    protected native void _mouseWheel(long ptr, int wheelAmt);

    @Override
    protected native int _getMouseX(long ptr);

    @Override
    protected native int _getMouseY(long ptr);

    @Override
    protected int _getPixelColor(long ptr, int x, int y) {
        int[] result = new int[1];
        _getScreenCapture(ptr, x, y, 1, 1, result);
        return result[0];
    }

    @Override
    protected native void _getScreenCapture(long ptr, int x, int y, int width, int height, int[] data);
    
}
