3 #define MT_MAX_CURSORS 10
5 /* we don't want to break any unrelated code */
6 #define m_createStroke m_createStrokes[0]
7 #define m_moveStroke m_moveStrokes[0]
15 typedef struct t_draw_event DrawEvent
;
24 typedef struct t_drag_event DragEvent
;
32 typedef struct t_pan_event PanEvent
;
41 typedef struct t_zoom_event ZoomEvent
;
44 struct t_delete_event
{
49 typedef struct t_delete_event DeleteEvent
;
52 struct t_cursor_event
{
56 typedef struct t_cursor_event CursorEvent
;
61 /* SDL_Events with one of the following have a DrawEvent as data1 */
62 SDL_NP_START_STROKE
= SDL_USEREVENT
+1,
70 SDL_NP_PREVIEW_CURSOR
,
72 /* SDL_Event with one of the following types have a CursorEvent as data1 */
75 /* SDL_Events with one of the following types have a DragEvent as data1 */
80 /* SDL_Events with one of the following types have a PanEvent as data1 */
83 /* SDL_Events with one of the following types have a ZoomEvent as data1 */
86 /* SDL_Events with one of the following types have a DeletEvent as data1 */
91 void queueStartStrokeEvent(int cursor_id
, int x
, int y
);
92 void queueAppendStrokeEvent(int cursor_id
, int x
, int y
);
93 void queueFinishStrokeEvent(int cursor_id
, int x
, int y
);
94 void queueCancelDrawEvent(int cursor_id
);
95 void queuePreviewCursorEvent(int cursor_id
, int x
, int y
);
96 void queueCursorEvent(int type
, int cursor_id
);
97 void queueStartRopeEvent(int cursor_id
, int x
, int y
);
98 void queueAppendRopeEvent(int cursor_id
, int x
, int y
);
99 void queueFinishRopeEvent(int cursor_id
, int x
, int y
);
100 void queueStartDragEvent(int cursor_id
, int x
, int y
);
101 void queueDragEvent(int cursor_id
, int x
, int y
);
102 void queueEndDragEvent(int cursor_id
, int x
, int y
);
103 void queuePanEvent(int xdiff
, int ydiff
);
104 void queueZoomEvent(int x
, int y
, float zoomfactor
);
105 void queueDeleteEvent(int x
, int y
);
106 void queueUserEvent(int type
, void *data1
, void *data2
);