* Taeheon Kim <th908.kim@samsung.com>,
* YoungJun Cho <yj44.cho@samsung.com>,
* SooChan Lim <sc1.lim@samsung.com>,
- * Boram Park <sc1.lim@samsung.com>
+ * Boram Park <boram1288.park@samsung.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
#ifndef _TDM_CLIENT_H_
#define _TDM_CLIENT_H_
+#include "tdm_client_types.h"
+
#ifdef __cplusplus
extern "C" {
#endif
* @endcode
*/
-#include <tdm_client_types.h>
-
/**
* @brief Create a TDM client object.
* @param[out] error #TDM_ERROR_NONE if success. Otherwise, error value.
tdm_client_handle_events(tdm_client *client);
/**
+ * @brief Handle the events of the given file descriptor with millisecond timeout
+ * @details
+ * -1: infinite. 0: return immediately. Otherwise, waiting for ms_timeout milliseconds.
+ * @param[in] client A TDM client object
+ * @param[in] ms_timeout timeout value.
+ * @return #TDM_ERROR_NONE if success. Otherwise, error value.
+ * @see #tdm_client_get_fd
+ */
+tdm_error
+tdm_client_handle_events_timeout(tdm_client *client, int ms_timeout);
+
+/**
* @brief @b Deprecated. Wait for VBLANK.
* @deprecated
* @details After interval vblanks, a client vblank handler will be called.
tdm_client_output_get_refresh_rate(tdm_client_output *output, unsigned int *refresh);
/**
+ * @brief Get the width and height of the given client output mode
+ * @param[in] output The client output object
+ * @param[out] width The width of output mode
+ * @param[out] height The height of output mode
+ * @return #TDM_ERROR_NONE if success. Otherwise, error value.
+ */
+tdm_error
+tdm_client_output_get_mode(tdm_client_output *output, unsigned int *width, unsigned int *height);
+
+/**
* @brief Get the connection status of the given client output
* @param[in] output The client output object
* @param[out] status The connection status
tdm_error
tdm_client_vblank_wait_seq(tdm_client_vblank *vblank, unsigned int sequence, tdm_client_vblank_handler func, void *user_data);
+/**
+ * @brief Check if the client vblank object is waiting a vblank event
+ * @param[in] vblank The client vblank object
+ * @return 1 if waiting. 0 if not waiting.
+ */
+unsigned int
+tdm_client_vblank_is_waiting(tdm_client_vblank *vblank);
+
+
+/* Virtual Output */
+tdm_client_voutput *
+tdm_client_create_voutput(tdm_client *client, const char *name, tdm_error *error);
+
+void
+tdm_client_voutput_destroy(tdm_client_voutput *voutput);
+
+tdm_error
+tdm_client_voutput_set_available_modes(tdm_client_voutput *voutput, const tdm_client_output_mode *modes, int count);
+
+tdm_error
+tdm_client_voutput_set_physical_size(tdm_client_voutput *voutput, unsigned int mmWidth, unsigned int mmHeight);
+
+tdm_error
+tdm_client_voutput_add_commit_handler(tdm_client_voutput *voutput, tdm_client_voutput_commit_handler func, void *user_data);
+
+void
+tdm_client_voutput_remove_commit_handler(tdm_client_voutput *voutput, tdm_client_voutput_commit_handler func, void *user_data);
+
+tdm_error
+tdm_client_voutput_get_committed_tbm_surface(tdm_client_voutput *voutput, tbm_surface_h surface);
+
+tdm_error
+tdm_client_voutput_commit_done(tdm_client_voutput *voutput);
+
+tdm_client_output *
+tdm_client_voutput_get_client_output(tdm_client_voutput *voutput, tdm_error *error);
+
+tdm_error
+tdm_client_voutput_set_mode(tdm_client_voutput *voutput, int index);
+
+tdm_error
+tdm_client_voutput_connect(tdm_client_voutput *voutput);
+
+tdm_error
+tdm_client_voutput_disconnect(tdm_client_voutput *voutput);
+/* End of Virtual Output */
+
#ifdef __cplusplus
}
#endif