+ecore_x_randr_output_backlight_available() from Term <term@twistedpath.org>
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 3 Dec 2011 04:24:02 +0000 (04:24 +0000)
committerdiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 3 Dec 2011 04:24:02 +0000 (04:24 +0000)
also corresponding e17 usage

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@65837 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

ChangeLog
NEWS
src/lib/ecore_x/Ecore_X.h
src/lib/ecore_x/xlib/ecore_x_randr_12.c

index 0bcd928..4575941 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 2011-12-02 Mike Blumenkrantz
 
         * Use mempools for allocations
+
+2011-12-02 Term <term@twistedpath.org>
+
+        * added ecore_x_randr_output_backlight_available()
diff --git a/NEWS b/NEWS
index d716761..209d733 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,10 @@ Ecore 1.2.0
 Changes since Ecore 1.1.0:
 --------------------------
 
+Additions:
+    * ecore_x:
+     - ecore_x_randr_output_backlight_available()
+
 Improvements:
     * ecore:
      - most allocations moved to mempools
index 6588a75..ecd19f3 100644 (file)
@@ -3114,7 +3114,10 @@ EAPI Ecore_X_Randr_Edid_Display_Interface_Type
 ecore_x_randr_edid_display_interface_type_get(unsigned char *edid,
                                               unsigned long edid_length);
 
-/* ecore_x_randr_13.c */
+/* ecore_x_randr_12.c */
+
+EAPI Eina_Bool
+ecore_x_randr_output_backlight_available(void);
 EAPI void
 ecore_x_randr_screen_backlight_level_set(Ecore_X_Window root,
                                          double level);
index fb607d1..319f09f 100644 (file)
@@ -1965,6 +1965,26 @@ ecore_x_randr_screen_backlight_level_set(Ecore_X_Window root,
 }
 
 /*
+ * @brief check if a backlight is available
+ * @return whether a blacklight is available
+ */
+
+EAPI Eina_Bool
+ecore_x_randr_output_backlight_available(void)
+{
+#ifdef ECORE_XRANDR
+   RANDR_CHECK_1_2_RET(-1);
+   Atom _backlight;
+
+   _backlight = XInternAtom(_ecore_x_disp, RANDR_PROPERTY_BACKLIGHT, True);
+
+   return (_backlight == None) ? EINA_FALSE : EINA_TRUE;
+
+#endif
+   return EINA_FALSE;
+}
+
+/*
  * @brief get the backlight level of the given output
  * @param root window which's screen should be queried
  * @param output from which the backlight level should be retrieved