groundwork for an interface change
Add a new window-port interface function
perminvent_info *
update_invent_slot(winid window, int slot, perminvent_info *);
That should be nice and flexible and allow exchanges of useful
information between the core and the window port. Information
to be exchange can be easily modified in include/wintype.h as
things evolve.
Information useful to the core can be exchanged from the
window-port in struct to_core.
Information useful from the core to the window-port can be
passed in struct from_core.
I'm not going to update any docs until much later after things
are fully working and settled.
This also doesn't fix or have anything to do with existing
TTY_PERM_INVENT issues.
This commit is contained in:
+13
-1
@@ -490,6 +490,17 @@ void NetHackQtBind::qt_update_inventory(int arg UNUSED)
|
||||
*/
|
||||
}
|
||||
|
||||
perminvent_info *NetHackQtBind::qt_update_invent_slot(
|
||||
winid wid UNUSED, /* window to use, must be of type NHW_MENU */
|
||||
int inventory_slot UNUSED, /* slot id: 0 - info return to core */
|
||||
/* 1 - gold slot */
|
||||
/* 2 - 29 obj slots */
|
||||
perminvent_info *pi UNUSED)
|
||||
{
|
||||
NetHackQtWindow* window UNUSED =id_to_window[(int)wid];
|
||||
return (perminvent_info *) 0;
|
||||
}
|
||||
|
||||
void NetHackQtBind::qt_mark_synch()
|
||||
{
|
||||
}
|
||||
@@ -1053,7 +1064,6 @@ struct window_procs Qt_procs = {
|
||||
nethack_qt_::NetHackQtBind::qt_end_menu,
|
||||
nethack_qt_::NetHackQtBind::qt_select_menu,
|
||||
genl_message_menu, /* no need for Qt-specific handling */
|
||||
nethack_qt_::NetHackQtBind::qt_update_inventory,
|
||||
nethack_qt_::NetHackQtBind::qt_mark_synch,
|
||||
nethack_qt_::NetHackQtBind::qt_wait_synch,
|
||||
#ifdef CLIPPING
|
||||
@@ -1100,6 +1110,8 @@ struct window_procs Qt_procs = {
|
||||
genl_status_update,
|
||||
#endif
|
||||
genl_can_suspend_yes,
|
||||
nethack_qt_::NetHackQtBind::qt_update_inventory,
|
||||
nethack_qt_::NetHackQtBind::qt_update_invent_slot,
|
||||
};
|
||||
|
||||
#ifndef WIN32
|
||||
|
||||
+2
-1
@@ -58,7 +58,6 @@ public:
|
||||
const char *str, unsigned int itemflags);
|
||||
static void qt_end_menu(winid wid, const char *prompt);
|
||||
static int qt_select_menu(winid wid, int how, MENU_ITEM_P **menu_list);
|
||||
static void qt_update_inventory(int);
|
||||
static void qt_mark_synch();
|
||||
static void qt_wait_synch();
|
||||
|
||||
@@ -89,6 +88,8 @@ public:
|
||||
|
||||
static void qt_outrip(winid wid, int how, time_t when);
|
||||
static int qt_kbhit();
|
||||
static void qt_update_inventory(int);
|
||||
static perminvent_info *qt_update_invent_slot(winid, int, perminvent_info *);
|
||||
|
||||
static QWidget *mainWidget() { return main; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user