add surface destroy callback add/remove api
[platform/core/uifw/libtbm.git] / src / tbm_bufmgr_int.h
index 85a9be1..fdbb16c 100644 (file)
@@ -246,10 +246,12 @@ struct _tbm_surface {
 
        struct list_head item_link; /* link of surface */
 
-       struct list_head user_data_list;        /* list of the user_date in surface */
+       struct list_head user_data_list;        /* list of the user_data in surface */
 
        struct list_head debug_data_list;       /* list of debug data */
 
+       struct list_head destroy_funcs; /* list of destory callback function */
+
        struct {
                int x;
                int y;
@@ -275,6 +277,13 @@ typedef struct {
        struct list_head item_link;
 } tbm_surface_debug_data;
 
+typedef struct _tbm_surface_destroy_func_info {
+       tbm_surface_internal_destroy_handler destroy_func;
+       void *user_data;
+
+       struct list_head item_link;
+} tbm_surface_destroy_func_info;
+
 tbm_bufmgr _tbm_bufmgr_get_bufmgr(void);
 int _tbm_bo_set_surface(tbm_bo bo, tbm_surface_h surface);
 int _tbm_surface_is_valid(tbm_surface_h surface);