Package: emulator
-Version: 1.2.95
+Version: 1.2.100
OS: linux
Build-host-os: linux
Maintainer: Yeong-Kyoon Lee<yeongkyoon.lee@samsung.com>
Description: Tizen Emulator
Package: emulator
-Version: 1.2.95
+Version: 1.2.100
OS: windows
Build-host-os: windows
Maintainer: Yeong-Kyoon Lee<yeongkyoon.lee@samsung.com>
}
- hax_cpu_synchronize_state(env);
+ //hax_cpu_synchronize_state(env);
do {
int hax_ret;
break;
}
+#if 0
if (env->hax_vcpu_dirty) {
hax_vcpu_sync_state(env, 1);
env->hax_vcpu_dirty = 0;
}
+#endif
hax_vcpu_interrupt(env);
--audio-card-list=ac97 \
--enable-ldst-optimization \
--enable-maru \
+ --disable-vnc-jpeg \
+ --disable-vnc-png \
--enable-opengles \
--enable-gl \
--disable-pie
--enable-ldst-optimization \
--enable-hax \
--enable-maru \
+ --disable-vnc-jpeg \
+ --disable-vnc-png \
--enable-opengles \
--enable-gl
;;
int i;
for (i = 0; i < process->nb_states; i ++) {
if (process->glstates[i]->fake_ctxt == fake_ctxt) {
+ /*XXX: DestroyContext should not switch current context, or
+ * else guest still try to access it and cause qemu
+ * segfalt. But not sure if any corner case, so comment it
+ * for now and will remove it completely in future.
+ */
// this was our GLState...
- process->current_state = &process->default_state;
+ // process->current_state = &process->default_state;
int fake_shareList =
process->glstates[i]->fake_shareList;
static int _grab_finger_id = 0;
#define QEMU_MOUSE_PRESSED 1
#define QEMU_MOUSE_RELEASEED 0
-void maru_finger_processing(int touch_type, int origin_x, int origin_y, int x, int y)
+void maru_finger_processing_A(int touch_type, int origin_x, int origin_y, int x, int y)
{
MultiTouchState *mts = get_emul_multi_touch_state();
FingerPoint *finger = NULL;
} else if (touch_type == MOUSE_UP) { /* released */
_grab_finger_id = 0;
}
+}
+
+void maru_finger_processing_B(int touch_type, int origin_x, int origin_y, int x, int y)
+{
+ MultiTouchState *mts = get_emul_multi_touch_state();
+ FingerPoint *finger = NULL;
+ if (touch_type == MOUSE_DOWN || touch_type == MOUSE_DRAG) { /* pressed */
+ if (_grab_finger_id > 0) {
+ finger = get_finger_point_from_slot(_grab_finger_id - 1);
+ if (finger != NULL) {
+ int origin_distance_x = origin_x - finger->origin_x;
+ int origin_distance_y = origin_y - finger->origin_y;
+ int distance_x = x - finger->x;
+ int distance_y = y - finger->y;
+
+ int i = 0;
+ for( ; i < get_emul_multi_touch_state()->finger_cnt; i++) {
+ finger = get_finger_point_from_slot(i);
+
+ if (finger != NULL) {
+ finger->origin_x += origin_distance_x;
+ finger->origin_y += origin_distance_y;
+ finger->x += distance_x;
+ finger->y += distance_y;
+ if (finger->id != 0) {
+ kbd_mouse_event(finger->x, finger->y, i, QEMU_MOUSE_PRESSED);
+ TRACE("id %d finger multi-touch dragging = (%d, %d)\n", i + 1, finger->x, finger->y);
+ }
+#ifdef _WIN32
+ Sleep(2);
+#else
+ usleep(2000);
+#endif
+ }
+ }
+ }
+ return;
+ }
+
+ if (mts->finger_cnt == 0)
+ { //first finger touch input
+ if (_add_finger_point(origin_x, origin_y, x, y) == -1) {
+ return;
+ }
+ kbd_mouse_event(x, y, 0, QEMU_MOUSE_PRESSED);
+ }
+ else if ((finger = get_finger_point_search(x, y)) != NULL) //check the position of previous touch event
+ {
+ //finger point is selected
+ _grab_finger_id = finger->id;
+ TRACE("id %d finger is grabbed\n", _grab_finger_id);
+ }
+ else if (mts->finger_cnt == mts->finger_cnt_max) //Let's assume that this event is last finger touch input
+ {
+ //do nothing
+ }
+ else //one more finger
+ {
+ _add_finger_point(origin_x, origin_y, x, y) ;
+ kbd_mouse_event(x, y, mts->finger_cnt - 1, QEMU_MOUSE_PRESSED);
+ }
+
+ } else if (touch_type == MOUSE_UP) { /* released */
+ _grab_finger_id = 0;
+ }
}
void clear_finger_slot(void)
/* definitions relating to multi-touch */
//TODO : from arg
-#define MAX_FINGER_CNT 2
+#define MAX_FINGER_CNT 3
#define DEFAULT_FINGER_POINT_SIZE 32
#define DEFAULT_FINGER_POINT_COLOR 0x7E0F0F0F
#define DEFAULT_FINGER_POINT_OUTLINE_COLOR 0xDDDDDDDD
int get_multi_touch_enable(void);
FingerPoint *get_finger_point_from_slot(int index);
FingerPoint *get_finger_point_search(int x, int y);
-void maru_finger_processing(int touch_type, int origin_x, int origin_y, int x, int y);
+void maru_finger_processing_A(int touch_type, int origin_x, int origin_y, int x, int y);
+void maru_finger_processing_B(int touch_type, int origin_x, int origin_y, int x, int y);
void clear_finger_slot(void);
void cleanup_multi_touch_state(void);
/* draw multi-touch finger points */
MultiTouchState *mts = get_emul_multi_touch_state();
- if (mts->multitouch_enable == 1 && mts->finger_point_surface != NULL) {
+ if (mts->multitouch_enable != 0 && mts->finger_point_surface != NULL) {
FingerPoint *finger = NULL;
int finger_point_size_half = mts->finger_point_size / 2;
SDL_Rect rect;
private int currentLcdWidth;
private int currentLcdHeight;
private SkinRegion currentHoverRegion;
+ private SkinRegion currentPressedRegion;
private int pressedMouseX;
private int pressedMouseY;
shell.addMouseTrackListener( shellMouseTrackListener );
shellMouseMoveListener = new MouseMoveListener() {
-
@Override
public void mouseMove( MouseEvent e ) {
if ( EmulatorSkin.this.isMousePressed ) {
}
} else {
-
SkinRegion region = SkinUtil.getHardKeyArea( e.x, e.y, currentRotationId, currentScale );
if ( null == region ) {
}
isHoverState = true;
- GC gc = new GC( shell );
- gc.setLineWidth( 1 );
- gc.setForeground( hoverColor );
- gc.drawRectangle( region.x, region.y, region.width, region.height );
currentHoverRegion = region;
- gc.dispose();
- }
+ /* draw hover */
+ shell.getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ if (currentHoverRegion.width != 0 && currentHoverRegion.height != 0) {
+ GC gc = new GC(shell);
+ gc.setLineWidth(1);
+ gc.setForeground(hoverColor);
+ gc.drawRectangle(currentHoverRegion.x, currentHoverRegion.y, currentHoverRegion.width, currentHoverRegion.height);
+
+ gc.dispose();
+ }
+ }
+ });
+ }
}
- }
+ } //end of mouseMove
};
shell.addMouseMoveListener( shellMouseMoveListener );
shellMouseListener = new MouseListener() {
-
@Override
public void mouseUp( MouseEvent e ) {
if ( 1 == e.button ) { // left button
int keyCode = SkinUtil.getHardKeyCode( e.x, e.y, currentRotationId, currentScale );
if ( SkinUtil.UNKNOWN_KEYCODE != keyCode ) {
-
// null check : prevent from mouse up without a hover (ex. doing always on top in hardkey area)
- if( null != currentHoverRegion ) {
+ if ( null != currentHoverRegion ) {
if ( currentHoverRegion.width == 0 && currentHoverRegion.height == 0 ) {
shell.redraw();
} else {
currentHoverRegion.height + 1, false );
}
}
-
+
SkinUtil.trimShell( shell, currentImage );
KeyEventData keyEventData = new KeyEventData( KeyEventType.RELEASED.value(), keyCode, 0 );
int keyCode = SkinUtil.getHardKeyCode( e.x, e.y, currentRotationId, currentScale );
if ( SkinUtil.UNKNOWN_KEYCODE != keyCode ) {
- // draw the button region as the cropped keyPressed image area
- SkinRegion region = SkinUtil.getHardKeyArea( e.x, e.y, currentRotationId, currentScale );
-
- if ( null != currentKeyPressedImage ) {
- GC gc = new GC( shell );
- gc.drawImage( currentKeyPressedImage, region.x + 1, region.y + 1, region.width - 1,
- region.height - 1, // src
- region.x + 1, region.y + 1, region.width - 1, region.height - 1 ); // dst
- gc.dispose();
-
- SkinUtil.trimShell( shell, currentKeyPressedImage, region.x, region.y, region.width, region.height );
+ shell.setToolTipText(null);
+
+ /* draw the button region as the cropped keyPressed image area */
+ currentPressedRegion = SkinUtil.getHardKeyArea( e.x, e.y, currentRotationId, currentScale );
+ if (currentPressedRegion != null && currentPressedRegion.width != 0 && currentPressedRegion.height != 0) {
+ shell.getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ if ( null != currentKeyPressedImage ) {
+ GC gc = new GC( shell );
+
+ /* button */
+ gc.drawImage(currentKeyPressedImage,
+ currentPressedRegion.x + 1, currentPressedRegion.y + 1,
+ currentPressedRegion.width - 1, currentPressedRegion.height - 1, //src
+ currentPressedRegion.x + 1, currentPressedRegion.y + 1,
+ currentPressedRegion.width - 1, currentPressedRegion.height - 1); //dst
+
+ /* hover */
+ if (currentHoverRegion.width != 0 && currentHoverRegion.height != 0) {
+ gc.setLineWidth(1);
+ gc.setForeground(hoverColor);
+ gc.drawRectangle(currentHoverRegion.x, currentHoverRegion.y, currentHoverRegion.width, currentHoverRegion.height);
+ }
+
+ gc.dispose();
+
+ SkinUtil.trimShell(shell, currentKeyPressedImage,
+ currentPressedRegion.x, currentPressedRegion.y, currentPressedRegion.width, currentPressedRegion.height);
+
+ currentPressedRegion = null;
+ }
+ }
+ });
}
KeyEventData keyEventData = new KeyEventData( KeyEventType.PRESSED.value(), keyCode, 0 );
// readyToReopen( EmulatorSkin.this, isOnTop );
+ //internal/Library.java::arch()
String osArch = System.getProperty("os.arch"); //$NON-NLS-1$
- if (osArch.equals ("i386") || osArch.equals ("i686")) { //$NON-NLS-1$ $NON-NLS-2$ $NON-NLS-3$
+ logger.info(osArch);
+ if (osArch.equals("amd64") || osArch.equals("IA64N") || osArch.equals("IA64W")) { //$NON-NLS-1$ $NON-NLS-2$ $NON-NLS-3$
+ logger.info("64bit architecture");
+ setTopMost64(isOnTop); //64bit
+ } else {
logger.info("32bit architecture");
setTopMost32(isOnTop);
- } else { //64bit OS
- logger.info("64bit architecture");
- setTopMost64(isOnTop);
}
}
} );
logger.warning( "Cannot find user home path int java System properties." );
}
+ fileDialog.setOverwrite(true);
String filePath = fileDialog.open();
saveFile( filePath, fileDialog );
TRACE( "mouse_event event_type:%d, origin:(%d, %d), x:%d, y:%d, z:%d\n", event_type, origin_x, origin_y, x, y, z );
if (get_emul_multi_touch_state()->multitouch_enable == 1) {
- maru_finger_processing(event_type, origin_x, origin_y, x, y);
+ maru_finger_processing_A(event_type, origin_x, origin_y, x, y);
+ } else if (get_emul_multi_touch_state()->multitouch_enable == 2) {
+ maru_finger_processing_B(event_type, origin_x, origin_y, x, y);
}
else if ( MOUSE_DOWN == event_type || MOUSE_DRAG == event_type) { //single touch
kbd_mouse_event(x, y, z, 1);
if (keycode == JAVA_KEYCODE_BIT_CTRL) {
if (KEY_PRESSED == event_type) {
get_emul_multi_touch_state()->multitouch_enable = 1;
- INFO("multi-touch enabled\n");
+ INFO("multi-touch enabled = A\n");
} else if (KEY_RELEASED == event_type) {
get_emul_multi_touch_state()->multitouch_enable = 0;
clear_finger_slot();
clear_finger_slot();
INFO("multi-touch disabled\n");
}
+ } else if (keycode == (JAVA_KEYCODE_BIT_SHIFT | JAVA_KEYCODE_BIT_CTRL)) {
+ if (KEY_PRESSED == event_type) {
+ get_emul_multi_touch_state()->multitouch_enable = 2;
+ INFO("multi-touch enabled = B\n");
+ } else if (KEY_RELEASED == event_type) {
+ get_emul_multi_touch_state()->multitouch_enable = 1;
+ INFO("multi-touch enabled = A\n");
+ }
}
}