Пример #1
0
EAPI Eina_Bool
ecore_x_e_comp_sync_supported_get(Ecore_X_Window root)
{
   Ecore_X_Window win, win2;
   int ret;
   
   LOGFN(__FILE__, __LINE__, __FUNCTION__);
   if (!root) root = DefaultRootWindow(_ecore_x_disp);
   ret = 
     ecore_x_window_prop_xid_get(root, 
                                 ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED,
                                 ECORE_X_ATOM_WINDOW,
                                 &win, 1);
   if ((ret == 1) && (win))
     {
        ret = 
          ecore_x_window_prop_xid_get(win, 
                                      ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED,
                                      ECORE_X_ATOM_WINDOW,
                                      &win2, 1);
        if ((ret == 1) && (win2 == win))
          {
             return 1;
          }
     }
   return 0;
}
Пример #2
0
EAPI void
ecore_x_e_comp_sync_supported_set(Ecore_X_Window root, Eina_Bool enabled)
{
   Ecore_X_Window win;

   if (!root) root = DefaultRootWindow(_ecore_x_disp);
   LOGFN(__FILE__, __LINE__, __FUNCTION__);
   if (enabled)
     {
        win = ecore_x_window_new(root, 1, 2, 3, 4);
        ecore_x_window_prop_xid_set(win, ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED,
                                     ECORE_X_ATOM_WINDOW, &win, 1);
        ecore_x_window_prop_xid_set(root, ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED,
                                     ECORE_X_ATOM_WINDOW, &win, 1);
     }
   else
     {
        int ret;
        
        ret = 
          ecore_x_window_prop_xid_get(root, 
                                      ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED,
                                      ECORE_X_ATOM_WINDOW,
                                      &win, 1);
        if ((ret == 1) && (win))
          {
             ecore_x_window_prop_property_del(root, ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED);
             ecore_x_window_free(win);
          }
     }
}
Пример #3
0
/*
 * Get Window (array) property
 *
 * At most len items are returned in val.
 * If the property was successfully fetched the number of items stored in
 * val is returned, otherwise -1 is returned.
 * Note: Return value 0 means that the property exists but has no elements.
 */
EAPI int
ecore_x_window_prop_window_get(Ecore_X_Window  win,
                               Ecore_X_Atom    atom,
                               Ecore_X_Window *list,
                               unsigned int    len)
{
   return ecore_x_window_prop_xid_get(win, atom, ECORE_X_ATOM_WINDOW, list, len);
} /* ecore_x_window_prop_window_get */
Пример #4
0
/*
 * Get Window (array) property
 *
 * At most len items are returned in val.
 * If the property was successfully fetched the number of items stored in
 * val is returned, otherwise -1 is returned.
 * Note: Return value 0 means that the property exists but has no elements.
 */
EAPI int
ecore_x_window_prop_window_get(Ecore_X_Window win,
                               Ecore_X_Atom atom,
                               Ecore_X_Window *lst,
                               unsigned int len)
{
   LOGFN(__FILE__, __LINE__, __FUNCTION__);
   return ecore_x_window_prop_xid_get(win, atom, XA_WINDOW, lst, len);
}
Пример #5
0
EAPI int
ecore_x_window_prop_atom_get(Ecore_X_Window win,
                             Ecore_X_Atom   atom,
                             Ecore_X_Atom  *list,
                             unsigned int   len)
{
   LOGFN(__FILE__, __LINE__, __FUNCTION__);

   return ecore_x_window_prop_xid_get(win, atom, ECORE_X_ATOM_ATOM, list, len);
}
Пример #6
0
/*
 * Get Atom (array) property
 *
 * At most len items are returned in val.
 * If the property was successfully fetched the number of items stored in
 * val is returned, otherwise -1 is returned.
 * Note: Return value 0 means that the property exists but has no elements.
 */
EAPI int
ecore_x_window_prop_atom_get(Ecore_X_Window win,
                             Ecore_X_Atom atom,
                             Ecore_X_Atom *lst,
                             unsigned int len)
{
   int ret;
   LOGFN(__FILE__, __LINE__, __FUNCTION__);
   ret = ecore_x_window_prop_xid_get(win, atom, XA_ATOM, lst, len);
   return ret;
}
Пример #7
0
EAPI Ecore_X_Sync_Counter
ecore_x_e_comp_sync_counter_get(Ecore_X_Window win)
{
   int ret = 0;
   Ecore_X_Sync_Counter counter = 0;

   LOGFN(__FILE__, __LINE__, __FUNCTION__);
   ret = 
     ecore_x_window_prop_xid_get(win, 
                                 ECORE_X_ATOM_E_COMP_SYNC_COUNTER,
                                 ECORE_X_ATOM_CARDINAL,
                                 &counter, 1);
   if (ret != 1) return 0;
   return counter;
}
Пример #8
0
EAPI Ecore_X_Pixmap
ecore_x_e_comp_pixmap_get(Ecore_X_Window win)
{
   int ret = 0;
   Ecore_X_Pixmap pixmap = 0;

   LOGFN(__FILE__, __LINE__, __FUNCTION__);
   ret =
     ecore_x_window_prop_xid_get(win,
                                 ECORE_X_ATOM_E_COMP_PIXMAP,
                                 ECORE_X_ATOM_PIXMAP,
                                 &pixmap, 1);
   if (ret != 1)
     return 0;

   return pixmap;
} /* ecore_x_e_comp_pixmap_get */