IMEditCoreUIControl.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /*
  2. * ImageMeter confidential
  3. *
  4. * Copyright (C) 2018-2019 by Dirk Farin, Kronenstr. 49b, 70174 Stuttgart, Germany
  5. * All Rights Reserved.
  6. *
  7. * NOTICE: All information contained herein is, and remains the property
  8. * of Dirk Farin. The intellectual and technical concepts contained
  9. * herein are proprietary to Dirk Farin and are protected by trade secret
  10. * and copyright law.
  11. * Dissemination of this information or reproduction of this material
  12. * is strictly forbidden unless prior written permission is obtained
  13. * from Dirk Farin.
  14. */
  15. #ifndef IMAGEMETER_IMEDITCOREUICONTROL_H
  16. #define IMAGEMETER_IMEDITCOREUICONTROL_H
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. #include <stdbool.h>
  21. struct IM_EditCoreUIControl;
  22. struct IM_GElement;
  23. // You may set unused callback functions to NULL.
  24. //
  25. struct IM_EditCoreUIControl_Callbacks
  26. {
  27. // iOS see: https://stackoverflow.com/questions/7747742/on-demand-opengl-es-rendering-using-glkit
  28. void (*needsRedraw)();
  29. void (*scheduleTouchTimerEvent)(double delay_secs);
  30. void (*addingGElementFinished)(bool success);
  31. void (*activateGElement)(const struct IM_GElement* element);
  32. void (*deactivateGElement)();
  33. void (*updateDeleteButtonState)();
  34. void (*updateUndoUIButtonStates)();
  35. // --- element value entry
  36. void (*editTextBox)(int elementID);
  37. // --- playing audio ---
  38. bool (*supportsAudioPlayback)();
  39. bool (*playAudio)(const char* filename);
  40. void (*stopAudio)(const char* filename);
  41. };
  42. void IM_EditCoreUIControl_Callbacks_clear(struct IM_EditCoreUIControl_Callbacks*);
  43. struct IM_EditCoreUIControl* IM_EditCoreUIControl_alloc(const struct IM_EditCoreUIControl_Callbacks*);
  44. void IM_EditCoreUIControl_release(struct IM_EditCoreUIControl*);
  45. #ifdef __cplusplus
  46. }
  47. #endif
  48. #endif //IMAGEMETER_IMEDITCORE_H