?? gui_touch.c
字號:
/*************************************************************************************************************
uC/GUI
嵌入式通用圖形軟件
File : GUITOUCH.C
Purpose : Touch screen manager
This module handles the touch screen. It is configured in the file
GUITouch.conf.h (Should be located in the Config\ directory).
*************************************************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "LCD_Private.H" /* private modul definitions & config */
#include "GUI_Protected.h"
/*************************************************************************************************************
static data
*************************************************************************************************************/
static GUI_HID_STATE _State;
/*************************************************************************************************************
GUI_TOUCH_GetState
*************************************************************************************************************/
int GUI_TOUCH_GetState(GUI_HID_STATE *pState)
{
*pState = _State;
return (_State.Pressed != 0) ? 1 : 0;
}
void GUI_TOUCH_StoreState(int x, int y)
{
#if GUI_SUPPORT_TOUCH
static int xPrev=-1, yPrev=-1;
_State.x = xPrev;
_State.y = yPrev;
_State.Pressed = ((x==-1) | (xPrev==-1)) ? 0 : 1;
if ((xPrev != x) || (yPrev != y)) {
GUI_HID_StoreState(&_State);
}
xPrev = x;
yPrev = y;
#else
GUI_USE_PARA(x);
GUI_USE_PARA(y);
#endif
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -