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 keyPressImpl(key);
110 }
111
112 @Override
113 public void keyReleaseUnicode( int key ) {
114 keyReleaseImpl(key);
115 }
116
117
118 @Override
119 public int getRGBPixel(int x, int y) {
120 int pixelArray[] = new int[1];
121 getRGBPixelsImpl(xgc, x, y, 1, 1, pixelArray, useGtk);
122 return pixelArray[0];
123 }
124
125 @Override
126 public int [] getRGBPixels(Rectangle bounds) {
127 int pixelArray[] = new int[bounds.width*bounds.height];
128 getRGBPixelsImpl(xgc, bounds.x, bounds.y, bounds.width, bounds.height,
129 pixelArray, useGtk);
130 return pixelArray;
131 }
132
133 private static synchronized native void setup(int numberOfButtons, int[] buttonDownMasks);
134 private static native void loadNativeLibraries();
135
136 private static synchronized native void mouseMoveImpl(X11GraphicsConfig xgc, int x, int y);
137 private static synchronized native void mousePressImpl(int buttons);
138 private static synchronized native void mouseReleaseImpl(int buttons);
|