X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=AFBClient.h;h=964e2b0d8f3a05a148001eb3e69d73777caff717;hb=daac597f2ffe16f19b0669e69c91a323b0122d4b;hp=f42aeea99ae1bad0989c2a6abbd8160f63b4456b;hpb=6766079f68f6a7e2ccdd68b36e9eb206229dd4f7;p=staging%2Fwindowmanager.git diff --git a/AFBClient.h b/AFBClient.h index f42aeea..964e2b0 100644 --- a/AFBClient.h +++ b/AFBClient.h @@ -3,8 +3,7 @@ #include -class AFBClient -{ +class AFBClient { AFBClient(); ~AFBClient(); @@ -12,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(); @@ -32,8 +35,7 @@ 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;