FreeRDP
mf_event.h
1 
20 #ifndef FREERDP_SERVER_MAC_EVENT_H
21 #define FREERDP_SERVER_MAC_EVENT_H
22 
23 typedef struct mf_event mfEvent;
24 typedef struct mf_event_queue mfEventQueue;
25 typedef struct mf_event_region mfEventRegion;
26 
27 #include <pthread.h>
28 #include "mfreerdp.h"
29 
30 //#include "mf_peer.h"
31 
32 enum mf_event_type
33 {
34  FREERDP_SERVER_MAC_EVENT_TYPE_REGION,
35  FREERDP_SERVER_MAC_EVENT_TYPE_FRAME_TICK
36 };
37 
38 struct mf_event
39 {
40  int type;
41 };
42 
44 {
45  int size;
46  int count;
47  int pipe_fd[2];
48  mfEvent** events;
49  pthread_mutex_t mutex;
50 };
51 
53 {
54  int type;
55 
56  int x;
57  int y;
58  int width;
59  int height;
60 };
61 
62 void mf_event_push(mfEventQueue* event_queue, mfEvent* event);
63 mfEvent* mf_event_peek(mfEventQueue* event_queue);
64 mfEvent* mf_event_pop(mfEventQueue* event_queue);
65 
66 mfEventRegion* mf_event_region_new(int x, int y, int width, int height);
67 void mf_event_region_free(mfEventRegion* event_region);
68 
69 mfEvent* mf_event_new(int type);
70 void mf_event_free(mfEvent* event);
71 
72 mfEventQueue* mf_event_queue_new(void);
73 void mf_event_queue_free(mfEventQueue* event_queue);
74 
75 #endif /* FREERDP_SERVER_MAC_EVENT_H */