tpl_display_get(tpl_handle_t native_dpy);
/**
+ * Get TPL display object for the given native display.
+ *
+ * If there's already existing TPL display for the given native display and backend type,
+ * then return the existed TPL display object.
+ *
+ * If the given backend type is TPL_BACKEND_UNKNWON,
+ * it behaves the same as tpl_display_get().
+ * Otherwise, it searches for the tpl_display created with the given type.
+ *
+ * @param type backend type of the given native display.
+ * @param native_dpy handle to the native display.
+ * @return pointer to the display on success, NULL on failure.
+ */
+tpl_display_t *
+tpl_display_get_with_backend_type(tpl_backend_type_t type,
+ tpl_handle_t native_dpy);
+
+/**
* Get the native display handle which the given TPL display is created for.
*
* @param display display to get native handle.
{
tpl_display_t *display;
- /* Search for an already connected display for the given native display. */
+ /* Search for an already created tpl_display for the given native display. */
display = __tpl_runtime_find_display(TPL_BACKEND_UNKNOWN, native_dpy);
return display;
}
+tpl_display_t *
+tpl_display_get_with_backend_type(tpl_backend_type_t type,
+ tpl_handle_t native_dpy)
+{
+ tpl_display_t *display;
+
+ /* Search for an already created tpl_display
+ * for the given native display and type. */
+ display = __tpl_runtime_find_display(type, native_dpy);
+
+ return display;
+}
+
tpl_handle_t
tpl_display_get_native_handle(tpl_display_t *display)
{