use wl_event_loop to support the event handling system
[platform/core/uifw/libtdm.git] / include / tdm_types.h
index e31a96b..5236982 100755 (executable)
@@ -224,6 +224,14 @@ typedef enum {
        TDM_OUTPUT_MODE_FLAG_CLKDIV2    = (1 << 13),
 } tdm_output_mode_flag;
 
+typedef enum
+{
+       TDM_EVENT_READABLE = (1 << 0),
+       TDM_EVENT_WRITABLE = (1 << 1),
+       TDM_EVENT_HANGUP   = (1 << 2),
+       TDM_EVENT_ERROR    = (1 << 3),
+} tdm_event_mask;
+
 /**
  * @brief The output mode structure
  */
@@ -355,6 +363,20 @@ typedef void (*tdm_output_commit_handler)(tdm_output *output, unsigned int seque
                                           unsigned int tv_sec, unsigned int tv_usec,
                                           void *user_data);
 
+/**
+ * @brief The tdm event source
+ */
+typedef void tdm_event_source;
+
+/**
+ * @brief The fd source handler
+ */
+typedef tdm_error (*tdm_event_fd_handler)(int fd, tdm_event_mask mask, void *user_data);
+
+/**
+ * @brief The timer source handler
+ */
+typedef tdm_error (*tdm_event_timer_handler)(void *user_data);
 
 #ifdef __cplusplus
 }