Manual_Input.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. //
  2. // Copyright (c) 2008-2020 the Urho3D project.
  3. //
  4. // Permission is hereby granted, free of charge, to any person obtaining a copy
  5. // of this software and associated documentation files (the "Software"), to deal
  6. // in the Software without restriction, including without limitation the rights
  7. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8. // copies of the Software, and to permit persons to whom the Software is
  9. // furnished to do so, subject to the following conditions:
  10. //
  11. // The above copyright notice and this permission notice shall be included in
  12. // all copies or substantial portions of the Software.
  13. //
  14. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  19. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  20. // THE SOFTWARE.
  21. //
  22. #pragma once
  23. #include "../Input/Input.h"
  24. namespace Urho3D
  25. {
  26. // bool Input::SaveGestures(Serializer &dest) | File: ../Input/Input.h
  27. bool InputSaveGestures(File* file, Input* ptr);
  28. // bool Input::SaveGestures(Serializer &dest) | File: ../Input/Input.h
  29. bool InputSaveGesturesVectorBuffer(VectorBuffer& buffer, Input* ptr);
  30. // bool Input::SaveGesture(Serializer &dest, unsigned gestureID) | File: ../Input/Input.h
  31. bool InputSaveGesture(File* file, unsigned gestureID, Input* ptr);
  32. // bool Input::SaveGesture(Serializer &dest, unsigned gestureID) | File: ../Input/Input.h
  33. bool InputSaveGestureVectorBuffer(VectorBuffer& buffer, unsigned gestureID, Input* ptr);
  34. // unsigned Input::LoadGestures(Deserializer &source) | File: ../Input/Input.h
  35. unsigned InputLoadGestures(File* file, Input* ptr);
  36. // unsigned Input::LoadGestures(Deserializer &source) | File: ../Input/Input.h
  37. unsigned InputLoadGesturesVectorBuffer(VectorBuffer& buffer, Input* ptr);
  38. // void Input::SetMouseGrabbed(bool grab, bool suppressEvent=false) | File: ../Input/Input.h
  39. void InputSetMouseGrabbed(bool enable, Input* ptr);
  40. // void Input::SetMouseMode(MouseMode mode, bool suppressEvent=false) | File: ../Input/Input.h
  41. void InputSetMouseMode(MouseMode mode, Input* ptr);
  42. // void Input::SetMouseVisible(bool enable, bool suppressEvent=false) | File: ../Input/Input.h
  43. void InputSetMouseVisible(bool enable, Input* ptr);
  44. #define REGISTER_MANUAL_PART_Input(T, className) \
  45. /* bool Input::SaveGestures(Serializer &dest) | File: ../Input/Input.h */ \
  46. engine->RegisterObjectMethod(className, "bool SaveGestures(File@+)", asFUNCTION(InputSaveGestures), asCALL_CDECL_OBJLAST); \
  47. /* bool Input::SaveGestures(Serializer &dest) | File: ../Input/Input.h */ \
  48. engine->RegisterObjectMethod(className, "bool SaveGestures(VectorBuffer&)", asFUNCTION(InputSaveGesturesVectorBuffer), asCALL_CDECL_OBJLAST); \
  49. /* bool Input::SaveGesture(Serializer &dest, unsigned gestureID) | File: ../Input/Input.h */ \
  50. engine->RegisterObjectMethod(className, "bool SaveGesture(File@+, uint)", asFUNCTION(InputSaveGesture), asCALL_CDECL_OBJLAST); \
  51. /* bool Input::SaveGesture(Serializer &dest, unsigned gestureID) | File: ../Input/Input.h */ \
  52. engine->RegisterObjectMethod(className, "bool SaveGesture(VectorBuffer&, uint)", asFUNCTION(InputSaveGestureVectorBuffer), asCALL_CDECL_OBJLAST); \
  53. /* unsigned Input::LoadGestures(Deserializer &source) | File: ../Input/Input.h */ \
  54. engine->RegisterObjectMethod(className, "uint LoadGestures(File@+)", asFUNCTION(InputLoadGestures), asCALL_CDECL_OBJLAST); \
  55. /* unsigned Input::LoadGestures(Deserializer &source) | File: ../Input/Input.h */ \
  56. engine->RegisterObjectMethod(className, "uint LoadGestures(VectorBuffer&)", asFUNCTION(InputLoadGesturesVectorBuffer), asCALL_CDECL_OBJLAST); \
  57. /* void Input::SetMouseGrabbed(bool grab, bool suppressEvent=false) | File: ../Input/Input.h */ \
  58. engine->RegisterObjectMethod(className, "void set_mouseGrabbed(bool)", asFUNCTION(InputSetMouseGrabbed), asCALL_CDECL_OBJLAST); \
  59. /* void Input::SetMouseMode(MouseMode mode, bool suppressEvent=false) | File: ../Input/Input.h */ \
  60. engine->RegisterObjectMethod(className, "void set_mouseMode(MouseMode)", asFUNCTION(InputSetMouseMode), asCALL_CDECL_OBJLAST); \
  61. /* void Input::SetMouseVisible(bool enable, bool suppressEvent=false) | File: ../Input/Input.h */ \
  62. engine->RegisterObjectMethod(className, "void set_mouseVisible(bool)", asFUNCTION(InputSetMouseVisible), asCALL_CDECL_OBJLAST);
  63. }