#define TCL_OBJ_CMD_ARGS ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[] #define defcmd(func,name) \ Tcl_CreateObjCommand (interp, name, func, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL) #ifdef __WIN32__ # include # include # include # include # include "megaimage_shared.h" # include "win/platform.h" #else # include # include "megaimage_shared.h" # include "x/platform.h" #endif struct ntk { struct ntk_platform platform; Tcl_Interp *interp; struct { struct ntk_window **table; int total; int allocated; } windows; struct ntk_window *(*create_window) (struct ntk *ntk, Tcl_Interp *interp, int width, int height, int naked); void (*destroy_window) (struct ntk *ntk, struct ntk_window *win); void (*resize_window) (struct ntk *ntk, struct ntk_window *win, int width, int height); void (*map_window) (struct ntk *ntk, struct ntk_window *win); void (*unmap_window) (struct ntk *ntk, struct ntk_window *win); void (*move_window) (struct ntk *ntk, struct ntk_window *win, int x, int y); int (*put_image) (struct ntk *ntk, struct ntk_window *win, struct megaimage_info *info, unsigned char *b); void (*set_title) (struct ntk *ntk, struct ntk_window *win, Tcl_Obj *title); int (*get_clipboard_data) (struct ntk *ntk, struct ntk_window *win, Tcl_Obj **type, Tcl_Obj **result); int (*set_clipboard_data) (struct ntk *ntk, struct ntk_window *win, Tcl_Obj *type, Tcl_Obj *data); void (*create_event_handler) (struct ntk *ntk, struct ntk_window *win, Tcl_Obj *keypress, Tcl_Obj *keyrelease, Tcl_Obj *motion, Tcl_Obj *buttonpress, Tcl_Obj *buttonrelease, Tcl_Obj *configure); void (*set_focus) (struct ntk *ntk, struct ntk_window *win); };