flip_trader_callback.h 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. #ifndef FLIP_TRADER_CALLBACK_H
  2. #define FLIP_TRADER_CALLBACK_H
  3. #define MAX_TOKENS 32 // Adjust based on expected JSON size (25)
  4. #include <flip_trader.h>
  5. #include <flip_storage/flip_trader_storage.h>
  6. // hold the price of the asset
  7. extern char asset_price[64];
  8. extern bool sent_get_request;
  9. extern bool get_request_success;
  10. extern bool request_processed;
  11. void flip_trader_request_error(Canvas *canvas);
  12. bool send_price_request();
  13. void process_asset_price();
  14. // Callback for drawing the main screen
  15. void flip_trader_view_draw_callback(Canvas *canvas, void *model);
  16. // Input callback for the view (async input handling)
  17. bool flip_trader_view_input_callback(InputEvent *event, void *context);
  18. void callback_submenu_choices(void *context, uint32_t index);
  19. void text_updated_ssid(void *context);
  20. void text_updated_password(void *context);
  21. uint32_t callback_to_submenu(void *context);
  22. uint32_t callback_to_wifi_settings(void *context);
  23. uint32_t callback_to_assets_submenu(void *context);
  24. void settings_item_selected(void *context, uint32_t index);
  25. #endif // FLIP_TRADER_CALLBACK_H