svc_accessibility.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef _SVC_ACCESSIBILITY_H
  2. #define _SVC_ACCESSIBILITY_H
  3. #include <bfc/dispatch.h>
  4. #include <api/service/services.h>
  5. class Accessible;
  6. class ifc_window;
  7. class NOVTABLE svc_accessibility : public Dispatchable {
  8. public:
  9. static FOURCC getServiceType() { return WaSvc::ACCESSIBILITY; }
  10. Accessible *createAccessibleObject(ifc_window *w);
  11. enum {
  12. SVC_ACCESSIBILITY_CREATEACCESSIBLEOBJECT=10,
  13. };
  14. };
  15. inline Accessible *svc_accessibility::createAccessibleObject(ifc_window *w) {
  16. return _call(SVC_ACCESSIBILITY_CREATEACCESSIBLEOBJECT, (Accessible *)NULL, w);
  17. }
  18. class NOVTABLE svc_accessibilityI: public svc_accessibility {
  19. public:
  20. virtual Accessible *createAccessibleObject(ifc_window *w)=0;
  21. protected:
  22. RECVS_DISPATCH;
  23. };
  24. #include <api/service/servicei.h>
  25. template <class T>
  26. class AccessibilityCreatorSingle : public waServiceFactoryTSingle<svc_accessibility, T> {
  27. public:
  28. svc_accessibility *getHandler() {
  29. return waServiceFactoryTSingle<svc_accessibility, T>::getSingleService();
  30. }
  31. };
  32. #endif