forked from enlightenment/efl
provide a way to query screen size (just the default screen right now).
NOTE: I don't have xcb, so it's untested. It is supposed to work given http://www.x.org/releases/X11R7.5/doc/libxcb/tutorial/#DefaultScreen SVN revision: 59760
This commit is contained in:
parent
a2e1a187e6
commit
7233dba9d8
|
@ -1069,6 +1069,7 @@ EAPI Ecore_X_Display * ecore_x_display_get(void);
|
||||||
EAPI Ecore_X_Connection * ecore_x_connection_get(void);
|
EAPI Ecore_X_Connection * ecore_x_connection_get(void);
|
||||||
EAPI int ecore_x_fd_get(void);
|
EAPI int ecore_x_fd_get(void);
|
||||||
EAPI Ecore_X_Screen * ecore_x_default_screen_get(void);
|
EAPI Ecore_X_Screen * ecore_x_default_screen_get(void);
|
||||||
|
EAPI void ecore_x_screen_size_get(const Ecore_X_Screen *screen, int *w, int *h);
|
||||||
EAPI void ecore_x_double_click_time_set(double t);
|
EAPI void ecore_x_double_click_time_set(double t);
|
||||||
EAPI double ecore_x_double_click_time_get(void);
|
EAPI double ecore_x_double_click_time_get(void);
|
||||||
EAPI void ecore_x_flush(void);
|
EAPI void ecore_x_flush(void);
|
||||||
|
|
|
@ -783,6 +783,26 @@ ecore_x_default_screen_get(void)
|
||||||
return (Ecore_X_Screen *)_ecore_xcb_screen;
|
return (Ecore_X_Screen *)_ecore_xcb_screen;
|
||||||
} /* ecore_x_default_screen_get */
|
} /* ecore_x_default_screen_get */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the size of an Ecore_X_Screen.
|
||||||
|
* @param screen the handle to the screen to query.
|
||||||
|
* @param w where to return the width. May be NULL. Returns 0 on errors.
|
||||||
|
* @param h where to return the height. May be NULL. Returns 0 on errors.
|
||||||
|
* @ingroup Ecore_X_Display_Attr_Group
|
||||||
|
* @see ecore_x_default_screen_get()
|
||||||
|
*/
|
||||||
|
EAPI void
|
||||||
|
ecore_x_screen_size_get(const Ecore_X_Screen *screen, int *w, int *h)
|
||||||
|
{
|
||||||
|
xcb_screen_t *s = (xcb_screen_t *)screen;
|
||||||
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
if (w) *w = 0;
|
||||||
|
if (h) *h = 0;
|
||||||
|
if (!s) return;
|
||||||
|
if (w) *w = s->width_in_pixels;
|
||||||
|
if (h) *h = s->height_in_pixels;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the timeout for a double and triple clicks to be flagged.
|
* Sets the timeout for a double and triple clicks to be flagged.
|
||||||
*
|
*
|
||||||
|
|
|
@ -753,6 +753,26 @@ ecore_x_default_screen_get(void)
|
||||||
return (Ecore_X_Screen *)DefaultScreenOfDisplay(_ecore_x_disp);
|
return (Ecore_X_Screen *)DefaultScreenOfDisplay(_ecore_x_disp);
|
||||||
} /* ecore_x_default_screen_get */
|
} /* ecore_x_default_screen_get */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the size of an Ecore_X_Screen.
|
||||||
|
* @param screen the handle to the screen to query.
|
||||||
|
* @param w where to return the width. May be NULL. Returns 0 on errors.
|
||||||
|
* @param h where to return the height. May be NULL. Returns 0 on errors.
|
||||||
|
* @ingroup Ecore_X_Display_Attr_Group
|
||||||
|
* @see ecore_x_default_screen_get()
|
||||||
|
*/
|
||||||
|
EAPI void
|
||||||
|
ecore_x_screen_size_get(const Ecore_X_Screen *screen, int *w, int *h)
|
||||||
|
{
|
||||||
|
Screen *s = (Screen *)screen;
|
||||||
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
if (w) *w = 0;
|
||||||
|
if (h) *h = 0;
|
||||||
|
if (!s) return;
|
||||||
|
if (w) *w = s->width;
|
||||||
|
if (h) *h = s->height;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the timeout for a double and triple clicks to be flagged.
|
* Sets the timeout for a double and triple clicks to be flagged.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue