21 this->__cb_push = NULL;
22 this->__cb_pop = NULL;
23 this->__cbpop_ptr = NULL;
24 this->__cbpush_ptr = NULL;
29 this->__cb_push = push;
30 this->__cbpush_ptr = ptr;
35 this->__cb_push = NULL;
36 this->__cbpush_ptr = NULL;
42 this->__cbpop_ptr = ptr;
47 this->__cb_pop = NULL;
48 this->__cbpop_ptr = NULL;
51 void NexTouch::push(
void)
55 __cb_push(__cbpush_ptr);
59 void NexTouch::pop(
void)
63 __cb_pop(__cbpop_ptr);
67 void NexTouch::iterate(
NexTouch **list, uint8_t pid, uint8_t cid, int32_t event)
77 for(i = 0; (e = list[i]) != NULL; i++)
79 if (e->getObjPid() == pid && e->getObjCid() == cid)
void detachPop(void)
Detach an callback function.
void attachPop(NexTouchEventCb pop, void *ptr=NULL)
Attach an callback function of pop touch event.
void(* NexTouchEventCb)(void *ptr)
Type of callback funciton when an touch event occurs.
void detachPush(void)
Detach an callback function.
#define NEX_EVENT_PUSH
Push touch event occuring when your finger or pen coming to Nextion touch pannel. ...
NexTouch(uint8_t pid, uint8_t cid, const char *name)
Constructor.
The definition of class NexTouch.
#define NEX_EVENT_POP
Pop touch event occuring when your finger or pen leaving from Nextion touch pannel.
Root class of all Nextion components.
Father class of the components with touch events.
void printObjInfo(void)
Print current object'address, page id, component id and name.
void attachPush(NexTouchEventCb push, void *ptr=NULL)
Attach an callback function of push touch event.