I've created a custom widget, which is basically a specialized button. It seems to be working for the most part, but I'm trying to make sure I handle the "MOVED_OUT" condition.
What message should I be looking for in my custom widget callback to send the WM_NOTIFICATION_MOVED_OUT to the parent?
Based on the documentation, it seems that I should be looking at the WM_TOUCH message, casting the data to a GUI_PID_STATE, and testing to see if the x,y values are greater than/less then the widget's size. This doesn't seem to be working.
When sliding my finger off my widget (while pressed), the WM_TOUCH message is sent to the widget callback, but when I cast the data to a GUI_PID_STATE, my values are a little crazy:
Pressed:185, Layer: 2, X value: 536903680, Y value: 685
When I see this, I call
Sometimes this can lead to a hard fault.
Can anybody offer some advice?
What message should I be looking for in my custom widget callback to send the WM_NOTIFICATION_MOVED_OUT to the parent?
Based on the documentation, it seems that I should be looking at the WM_TOUCH message, casting the data to a GUI_PID_STATE, and testing to see if the x,y values are greater than/less then the widget's size. This doesn't seem to be working.
When sliding my finger off my widget (while pressed), the WM_TOUCH message is sent to the widget callback, but when I cast the data to a GUI_PID_STATE, my values are a little crazy:
Pressed:185, Layer: 2, X value: 536903680, Y value: 685
When I see this, I call
Sometimes this can lead to a hard fault.
Can anybody offer some advice?