Add ENABLE_TOUCH_SUPPORT macro

This commit is contained in:
Liu Chao
2017-04-25 22:14:32 +08:00
parent fd8629f305
commit b7fa783577
3 changed files with 5 additions and 0 deletions
+1
View File
@@ -75,6 +75,7 @@
#define USE_LIBPNG
#define USE_LIBJPEG
#define USE_LCUI_BUILDER
#define ENABLE_TOUCH_SUPPORT
#undef LCUI_THREAD_PTHREAD
#undef LCUI_VIDEO_DRIVER_FRAMEBUFFER
#else
+2
View File
@@ -162,7 +162,9 @@ static void OnCreateSurface( void *arg1, void *arg2 )
0, 0, NULL, NULL,
instance, NULL
);
#ifdef ENABLE_TOUCH_SUPPORT
RegisterTouchWindow( surface->hwnd, 0 );
#endif
surface->hdc_client = GetDC( surface->hwnd );
surface->hdc_fb = CreateCompatibleDC( surface->hdc_client );
surface->is_ready = TRUE;
+2
View File
@@ -99,6 +99,7 @@ static void OnMouseMessage( LCUI_Event ev, void *arg )
sys_ev.wheel.y = mouse_pos.y;
sys_ev.wheel.delta = GET_WHEEL_DELTA_WPARAM( msg->wParam );
break;
#ifdef ENABLE_TOUCH_SUPPORT
case WM_TOUCH: {
UINT i, n = LOWORD( msg->wParam );
PTOUCHINPUT inputs = NEW( TOUCHINPUT, n );
@@ -145,6 +146,7 @@ static void OnMouseMessage( LCUI_Event ev, void *arg )
}
break;
}
#endif
default: break;
}
if( sys_ev.type != LCUI_NONE ) {