3 #endif /* ifdef HAVE_CONFIG_H */
5 #include "ecore_x_private.h"
8 static int _damage_available;
10 static int _damage_major, _damage_minor;
11 #endif /* ifdef ECORE_XDAMAGE */
14 _ecore_x_damage_init(void)
20 LOGFN(__FILE__, __LINE__, __FUNCTION__);
21 if (XDamageQueryVersion(_ecore_x_disp, &_damage_major, &_damage_minor))
22 _damage_available = 1;
24 _damage_available = 0;
26 #else /* ifdef ECORE_XDAMAGE */
27 _damage_available = 0;
28 #endif /* ifdef ECORE_XDAMAGE */
29 } /* _ecore_x_damage_init */
32 ecore_x_damage_query(void)
34 return _damage_available;
35 } /* ecore_x_damage_query */
38 ecore_x_damage_new(Ecore_X_Drawable d, Ecore_X_Damage_Report_Level level)
41 Ecore_X_Damage damage;
43 LOGFN(__FILE__, __LINE__, __FUNCTION__);
44 damage = XDamageCreate(_ecore_x_disp, d, level);
46 #else /* ifdef ECORE_XDAMAGE */
48 #endif /* ifdef ECORE_XDAMAGE */
49 } /* ecore_x_damage_new */
52 ecore_x_damage_free(Ecore_X_Damage damage)
55 LOGFN(__FILE__, __LINE__, __FUNCTION__);
56 XDamageDestroy(_ecore_x_disp, damage);
57 #endif /* ifdef ECORE_XDAMAGE */
58 } /* ecore_x_damage_free */
61 ecore_x_damage_subtract(Ecore_X_Damage damage,
62 Ecore_X_Region repair,
66 LOGFN(__FILE__, __LINE__, __FUNCTION__);
67 XDamageSubtract(_ecore_x_disp, damage, repair, parts);
68 #endif /* ifdef ECORE_XDAMAGE */
69 } /* ecore_x_damage_subtract */