/TotalCrossVM/src/nm/ui/wp8/cppwrapper.h

https://github.com/TotalCross/totalcross · C Header · 112 lines · 75 code · 23 blank · 14 comment · 0 complexity · 08606e737f137c07805a34e02e833579 MD5 · raw file

  1. #ifndef __CPPWRAPPER_H__
  2. #define __CPPWRAPPER_H__
  3. #pragma once
  4. #define HAS_TCHAR
  5. #include <basetsd.h>
  6. #include "../Window.h"
  7. #include "tcclass.h"
  8. #include "../GraphicsPrimitives.h"
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. struct eventQueueMember
  13. {
  14. int type;
  15. int key;
  16. int x;
  17. int y;
  18. int modifiers;
  19. int count;
  20. };
  21. char *GetAppPathWP8();
  22. char *GetVmPathWP8();
  23. char *GetDisplayNameWP8();
  24. // WP8 keyboard functions
  25. void windowSetSIP(enum TCSIP kb);
  26. // Dummy functions?
  27. void windowSetDeviceTitle(TCObject titleObj);
  28. // Vm
  29. DWORD32 getRemainingBatery();
  30. void vibrate(DWORD32 milliseconds);
  31. DWORD32 getFreeMemoryWP8();
  32. DWORD32 getUsedMemoryWP8();
  33. void alertCPP(JCharP jCharStr);
  34. void vmSetAutoOffCPP(bool enable);
  35. int32 vmExec(TCHARP szCommand, TCHARP szArgs, int32 launchCode, bool wait);
  36. // Dial
  37. void dialNumberCPP(JCharP number);
  38. // SMS
  39. void smsSendCPP(JCharP szMessage, JCharP szDestination);
  40. // RadioDevice
  41. int rdGetStateCPP(int type);
  42. // ConnectionManager
  43. bool isAvailableCPP(int type);
  44. // GPS
  45. bool nativeStartGPSCPP();
  46. int nativeUpdateLocationCPP(Context context, TCObject gpsObject);
  47. void nativeStopGPSCPP();
  48. // File
  49. bool fileIsCardInsertedCPP();
  50. //Event Queue functions
  51. void eventQueuePush(int type, int key, int x, int y, int modifiers);
  52. struct eventQueueMember eventQueuePop(void);
  53. int eventQueueEmpty(void);
  54. void dxGetPixels(Pixel* dstPixels, int32 srcX, int32 srcY, int32 width, int32 height, int32 pitch);
  55. void dxUpdateScreen();
  56. void dxDrawLines(Context currentContext, TCObject g, int32* x, int32* y, int32 n, int32 tx, int32 ty, int32 color, bool fill);
  57. void dxDrawLine(int x1, int y1, int x2, int y2, int color);
  58. void dxFillRect(int x1, int y1, int x2, int y2, int color);
  59. void dxDrawPixelColors(int32* x, int32* y, PixelConv* colors, int32 n);
  60. void dxDrawPixels(float *glXYA, int count, int color);
  61. bool dxLoadTexture(Context currentContext, TCObject img, int32* textureId, Pixel *pixels, int32 width, int32 height, bool onlyAlpha);
  62. void dxDeleteTexture(TCObject img, int32* textureId);
  63. void dxDrawTexture(int32* textureId, int32 x, int32 y, int32 w, int32 h, int32 dstX, int32 dstY, int32 dstW, int32 dstH, int32 imgW, int32 imgH, PixelConv* color, int32 alphaMask);
  64. void dxFillShadedRect(TCObject g, int32 x, int32 y, int32 w, int32 h, PixelConv c1, PixelConv c2, bool horiz);
  65. int32 dxGetSipHeight();
  66. int32 dxGetScreenSize();
  67. void dxprivateScreenChange();
  68. void cameraClick(NMParams p);
  69. // Media
  70. void nativeSoundPlayCPP(CharP filename);
  71. // Etc
  72. double getFontHeightCPP();
  73. void privateWindowSetSIP(bool visible);
  74. bool privateWindowGetSIP();
  75. void appExit();
  76. void appSetFullScreen();
  77. // Settings
  78. bool isVirtualKeyboard();
  79. int getOSVersion();
  80. double getDpiX();
  81. double getDpiY();
  82. void getDeviceIdCPP(CharP buf);
  83. void getRomSerialNumberCPP(CharP buf);
  84. // Map
  85. bool showMap(JCharP originStr, int32 originLen, JCharP destinationStr, int32 destinationLen);
  86. #ifdef __cplusplus
  87. }
  88. #endif
  89. #endif