Files
Serendipity f897536a45 refactor(config): 更新时间限制为30分钟并调整配置文件存储格式
refactor(globals): 移除不必要的GUI运行状态标志
refactor(gui): 更新注释以反映使用IUP库
refactor(ai): 修改威胁检测逻辑以提升威胁等级
refactor(config): 修改加载和保存配置的时间限制逻辑
refactor(network): 更新默认网络端口常量
refactor(record): 移除冗余注释并增强复盘步骤的合法性检查
2026-05-02 12:24:27 +08:00

43 lines
1.3 KiB
C

#ifndef GUI_INTERNAL_H
#define GUI_INTERNAL_H
#include <iup.h>
// 全局变量声明 (在 gui_core.c 中定义)
extern Ihandle *dlg;
extern Ihandle *board_canvas;
extern Ihandle *lbl_player;
extern Ihandle *lbl_status;
extern int gui_game_mode; // 0: PvP, 1: PvE, 2: Replay
extern int replay_total_steps; // 复盘总步数
// 绘图函数 (在 gui_draw.c 中定义)
void set_draw_color(Ihandle *ih, unsigned char r, unsigned char g, unsigned char b);
void draw_board_iup(Ihandle *ih);
void draw_stones_iup(Ihandle *ih);
// 核心功能 (在 gui_core.c 中定义)
void update_ui_labels();
int screen_to_board(int screen_x, int screen_y, int *board_x, int *board_y);
// 游戏窗口 (在 gui_game.c 中定义)
void create_game_window();
void start_pvp_game_gui();
void start_pve_game_gui();
void start_network_game_gui(); // 新增:启动网络对战游戏窗口
int action_cb(Ihandle *ih);
int button_cb(Ihandle *ih, int button, int pressed, int x, int y, char *status);
int k_any_cb(Ihandle *ih, int c);
int btn_back_cb(Ihandle *ih);
int btn_undo_cb(Ihandle *ih);
int btn_save_cb(Ihandle *ih);
// 复盘功能 (在 gui_replay.c 中定义)
void select_replay_file_gui();
int btn_replay_prev_cb(Ihandle *ih);
int btn_replay_next_cb(Ihandle *ih);
int btn_replay_sel_ok_cb(Ihandle *ih);
int btn_replay_sel_cancel_cb(Ihandle *ih);
#endif // GUI_INTERNAL_H