File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -177,6 +177,8 @@ class WayfirePanel::impl
177177 std::cerr << " Built without wireplumber support, mixer widget "
178178 " is not available." << std::endl;
179179#endif
180+ }
181+
180182 if (name == " light" )
181183 {
182184 return Widget (new WayfireLight (output));
Original file line number Diff line number Diff line change 1+ extern " C" {
2+ #include < ddcutil_c_api.h>
3+ #include < ddcutil_status_codes.h>
4+ }
15
6+ #include " light.hpp"
7+
8+ class WfLightDdcaControl : public WfLightControl
9+ {
10+ friend class DdcaSurveillor ;
11+
12+ private:
13+ DDCA_Display_Ref ref;
14+ };
15+
16+ class DdcaSurveillor {
17+ private:
18+ DdcaSurveillor (){
19+ ddca_enable_verify (true );
20+ DDCA_Display_Info_List *display_list = NULL ;
21+ ddca_get_display_info_list2 (false , &display_list);
22+
23+ for (int i = 0 ; i < display_list->ct ; i++){
24+ display_refs.push_back (display_list[i]);
25+ }
26+ }
27+
28+ std::vector<DDCA_Display_Info> display_refs;
29+ }
Original file line number Diff line number Diff line change @@ -120,6 +120,9 @@ void WayfireLight::init(Gtk::Box *container){
120120 container->append (*button);
121121
122122 setup_sysfs ();
123+ #ifdef HAVE_DDCUTIL
124+ setup_ddc ();
125+ #endif
123126
124127 update_icon ();
125128}
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class WfLightSysfsControl: public WfLightControl
2020 // if we exist, it means we can just read/write, as the files and permissions
2121 // have already been checked and are being monitored with inotify
2222
23- protected :
23+ private :
2424 std::string path, connector_name;
2525
2626 int get_max (){
You can’t perform that action at this time.
0 commit comments