ttt_multi_game_view.h 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. #pragma once
  2. #include <gui/view.h>
  3. #include <gui/elements.h>
  4. #include "../ttt_multi_custom_event.h"
  5. #include "../helpers/ttt_multi_game.h"
  6. typedef void (*TttMultiGameViewCallback)(void* context, TttMultiCustomEvent event);
  7. typedef struct TttMultiGameView TttMultiGameView;
  8. TttMultiGameView* ttt_multi_game_view_alloc();
  9. void ttt_multi_game_view_free(TttMultiGameView* game_view);
  10. View* ttt_multi_game_get_view(TttMultiGameView* game_view);
  11. void ttt_multi_game_view_move(TttMultiGameView* game_view, TttMultiGameMove* move);
  12. void ttt_multi_game_view_set_callback(
  13. TttMultiGameView* game_view,
  14. TttMultiGameViewCallback callback,
  15. void* context);
  16. void ttt_multi_game_view_set_remote_play(TttMultiGameView* game_view, TttMultiGamePlayer player);
  17. void ttt_multi_game_view_set_local_play(TttMultiGameView* game_view);
  18. void ttt_multi_game_view_get_last_move(TttMultiGameView* game_view, TttMultiGameMove* move);
  19. TttMultiGameResult ttt_multi_game_view_get_result(TttMultiGameView* game_view);
  20. void ttt_multi_game_view_reset(TttMultiGameView* game_view);