imgui_markdown_wrapper.h 994 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #pragma once
  2. #include "imguiWrapperTypes.h"
  3. #ifdef __cplusplus
  4. extern "C"
  5. {
  6. #endif
  7. typedef struct {
  8. char* link;
  9. int link_len;
  10. } iggMarkdownLinkCallbackData;
  11. typedef struct {
  12. IggFont font;
  13. IggBool separator;
  14. } iggMarkdownHeaderData;
  15. typedef struct {
  16. IggTextureID texture;
  17. IggBool useLinkCallback;
  18. IggVec2 size;
  19. IggBool shouldScale; // if true, image will not be larger than available region
  20. IggVec2 uv0;
  21. IggVec2 uv1;
  22. IggVec4 tintColor;
  23. IggVec4 borderColor;
  24. } iggMarkdownImageData;
  25. extern iggMarkdownLinkCallbackData iggMarkdown(
  26. char *markdown_,
  27. iggMarkdownHeaderData fonts[], int numHeaderLevels
  28. );
  29. extern iggMarkdownImageData goMarkdownImageCallback(iggMarkdownLinkCallbackData);
  30. #ifdef __cplusplus
  31. }
  32. #endif