From: devilhorns Date: Tue, 26 Jul 2011 06:44:12 +0000 (+0000) Subject: Ecore_X: Add a missing function for getting the count of screens. X-Git-Tag: build/2012-07-04.173327~998 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b563c25a790961a3bb6d41eecf85738be8a7794a;p=profile%2Fivi%2Fecore.git Ecore_X: Add a missing function for getting the count of screens. Bonus: Added doxy and the @since stuffs (for Tom) ;) NB: Needed for changes to ecore_evas as that was using xlib ScreenCount. This way we can just use ecore_x_screen_count_get and not have to worry if we are xcb/xlib/etc. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@61728 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/ecore_x/Ecore_X.h b/src/lib/ecore_x/Ecore_X.h index f0af0d1..261a078 100644 --- a/src/lib/ecore_x/Ecore_X.h +++ b/src/lib/ecore_x/Ecore_X.h @@ -1088,6 +1088,7 @@ EAPI Ecore_X_Connection * ecore_x_connection_get(void); EAPI int ecore_x_fd_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 int ecore_x_screen_count_get(void); EAPI void ecore_x_double_click_time_set(double t); EAPI double ecore_x_double_click_time_get(void); EAPI void ecore_x_flush(void); diff --git a/src/lib/ecore_x/xcb/ecore_xcb.c b/src/lib/ecore_x/xcb/ecore_xcb.c index 0980d3f..ff51905 100644 --- a/src/lib/ecore_x/xcb/ecore_xcb.c +++ b/src/lib/ecore_x/xcb/ecore_xcb.c @@ -1057,6 +1057,14 @@ ecore_x_screen_size_get(const Ecore_X_Screen *screen, int *w, int *h) if (h) *h = s->height_in_pixels; } +/** + * Retrieves the number of screens. + * + * @return The count of the number of screens. + * @ingroup Ecore_X_Display_Attr_Group + * + * @since 1.1 + */ EAPI int ecore_x_screen_count_get(void) { diff --git a/src/lib/ecore_x/xlib/ecore_x.c b/src/lib/ecore_x/xlib/ecore_x.c index fa427ab..346bb9f 100644 --- a/src/lib/ecore_x/xlib/ecore_x.c +++ b/src/lib/ecore_x/xlib/ecore_x.c @@ -712,6 +712,22 @@ ecore_x_screen_size_get(const Ecore_X_Screen *screen, int *w, int *h) } /** + * Retrieves the number of screens. + * + * @return The count of the number of screens. + * @ingroup Ecore_X_Display_Attr_Group + * + * @since 1.1 + */ +EAPI int +ecore_x_screen_count_get(void) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + return ScreenCount(_ecore_x_disp); +} + +/** * Sets the timeout for a double and triple clicks to be flagged. * * This sets the time between clicks before the double_click flag is