api_font.h 1009 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef __API_FONT_H
  2. #define __API_FONT_H
  3. #include <bfc/dispatch.h>
  4. class ifc_canvas;
  5. class NOVTABLE api_font : public Dispatchable
  6. {
  7. public:
  8. void font_textOut(ifc_canvas *c, int style, int x, int y, int w, int h, const wchar_t *txt);
  9. int font_getInfo(ifc_canvas *c, const wchar_t *font, int infoid, const wchar_t *txt, int *w, int *h);
  10. enum {
  11. API_FONT_FONT_TEXTOUT = 0,
  12. API_FONT_FONT_GETINFO = 10,
  13. };
  14. };
  15. inline void api_font::font_textOut(ifc_canvas *c, int style, int x, int y, int w, int h, const wchar_t *txt)
  16. {
  17. _voidcall(API_FONT_FONT_TEXTOUT, c, style, x, y, w, h, txt);
  18. }
  19. inline int api_font::font_getInfo(ifc_canvas *c, const wchar_t *font, int infoid, const wchar_t *txt, int *w, int *h)
  20. {
  21. return _call(API_FONT_FONT_GETINFO, (int)0, c, font, infoid, txt, w, h);
  22. }
  23. // {1FCA9C7E-5923-4b9c-8906-0F8C331DF21C}
  24. static const GUID fontApiServiceGuid =
  25. { 0x1fca9c7e, 0x5923, 0x4b9c, { 0x89, 0x6, 0xf, 0x8c, 0x33, 0x1d, 0xf2, 0x1c } };
  26. extern api_font *fontApi;
  27. #endif