88 public void mouseRelease(int buttons) { 89 mouseReleaseImpl(buttons); 90 } 91 92 @Override 93 public void mouseWheel(int wheelAmt) { 94 mouseWheelImpl(wheelAmt); 95 } 96 97 @Override 98 public void keyPress(int keycode) { 99 keyPressImpl(keycode); 100 } 101 102 @Override 103 public void keyRelease(int keycode) { 104 keyReleaseImpl(keycode); 105 } 106 107 @Override 108 public int getRGBPixel(int x, int y) { 109 int pixelArray[] = new int[1]; 110 getRGBPixelsImpl(xgc, x, y, 1, 1, pixelArray, useGtk); 111 return pixelArray[0]; 112 } 113 114 @Override 115 public int [] getRGBPixels(Rectangle bounds) { 116 int pixelArray[] = new int[bounds.width*bounds.height]; 117 getRGBPixelsImpl(xgc, bounds.x, bounds.y, bounds.width, bounds.height, 118 pixelArray, useGtk); 119 return pixelArray; 120 } 121 122 private static synchronized native void setup(int numberOfButtons, int[] buttonDownMasks); 123 private static native void loadNativeLibraries(); 124 125 private static synchronized native void mouseMoveImpl(X11GraphicsConfig xgc, int x, int y); 126 private static synchronized native void mousePressImpl(int buttons); 127 private static synchronized native void mouseReleaseImpl(int buttons); | 88 public void mouseRelease(int buttons) { 89 mouseReleaseImpl(buttons); 90 } 91 92 @Override 93 public void mouseWheel(int wheelAmt) { 94 mouseWheelImpl(wheelAmt); 95 } 96 97 @Override 98 public void keyPress(int keycode) { 99 keyPressImpl(keycode); 100 } 101 102 @Override 103 public void keyRelease(int keycode) { 104 keyReleaseImpl(keycode); 105 } 106 107 @Override 108 public void keyPressUnicode( int key ) { 109 // No special functions that implements a unicode key press 110 // and release in linux platform. Hence falls back to the 111 // default ASCII key press/release functions. 112 keyPressImpl(key); 113 } 114 115 @Override 116 public void keyReleaseUnicode( int key ) { 117 // No special functions that implements a unicode key press 118 // and release in linux platform. Hence falls back to the 119 // default ASCII key press/release functions. 120 keyReleaseImpl(key); 121 } 122 123 124 @Override 125 public int getRGBPixel(int x, int y) { 126 int pixelArray[] = new int[1]; 127 getRGBPixelsImpl(xgc, x, y, 1, 1, pixelArray, useGtk); 128 return pixelArray[0]; 129 } 130 131 @Override 132 public int [] getRGBPixels(Rectangle bounds) { 133 int pixelArray[] = new int[bounds.width*bounds.height]; 134 getRGBPixelsImpl(xgc, bounds.x, bounds.y, bounds.width, bounds.height, 135 pixelArray, useGtk); 136 return pixelArray; 137 } 138 139 private static synchronized native void setup(int numberOfButtons, int[] buttonDownMasks); 140 private static native void loadNativeLibraries(); 141 142 private static synchronized native void mouseMoveImpl(X11GraphicsConfig xgc, int x, int y); 143 private static synchronized native void mousePressImpl(int buttons); 144 private static synchronized native void mouseReleaseImpl(int buttons); |