X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=AFBClient.h;h=964e2b0d8f3a05a148001eb3e69d73777caff717;hb=d53c8301bf1d51d4001a93acdb54adf40c78e207;hp=05fa5a5e1687d4586a2e9e67f0414c7dc2d326f4;hpb=e91bb69cb8d5f239f1ad1d1d920b2d0141e21b5c;p=staging%2Fwindowmanager.git diff --git a/AFBClient.h b/AFBClient.h index 05fa5a5..964e2b0 100644 --- a/AFBClient.h +++ b/AFBClient.h @@ -3,11 +3,7 @@ #include -struct afb_wsj1; -struct sd_event; - -class AFBClient -{ +class AFBClient { AFBClient(); ~AFBClient(); @@ -15,13 +11,17 @@ class AFBClient AFBClient &operator=(const AFBClient &) = delete; public: + using handler_fun = std::function; + enum EventType { - Event_Active = 1, - Event_Inactive, - Event_Visible, - Event_Invisible, - Event_SyncDraw, - Event_FlushDraw, + Event_Active = 1, + Event_Inactive, + + Event_Visible, + Event_Invisible, + + Event_SyncDraw, + Event_FlushDraw, }; static AFBClient &instance(); @@ -35,11 +35,11 @@ public: int deactivateSurface(const char *label); int endDraw(const char *label); - void set_event_handler(enum EventType et, - std::function f); + void set_event_handler(enum EventType et, handler_fun f); + + struct Impl; private: - struct afb_wsj1 *wsj1; - struct sd_event *loop; + Impl *d; }; #endif // AFBCLIENT_H