]> granicus.if.org Git - nethack/commitdiff
groundwork for an interface change
authornhmall <nhmall@nethack.org>
Thu, 23 Jun 2022 18:01:35 +0000 (14:01 -0400)
committernhmall <nhmall@nethack.org>
Thu, 23 Jun 2022 18:01:35 +0000 (14:01 -0400)
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.

17 files changed:
include/winX.h
include/wincurs.h
include/winprocs.h
include/wintty.h
include/wintype.h
src/windows.c
win/Qt/qt_bind.cpp
win/Qt/qt_bind.h
win/X11/winX.c
win/chain/wc_chainin.c
win/chain/wc_chainout.c
win/curses/cursmain.c
win/share/safeproc.c
win/shim/winshim.c
win/tty/wintty.c
win/win32/mswproc.c
win/win32/winMS.h

index 82efa3d425caec83cf241b8656e02bb886ea1c04..66bb9f506d2091b5e9b42bbc32420fc086493fd5 100644 (file)
@@ -450,7 +450,6 @@ extern void X11_add_menu(winid, const glyph_info *, const ANY_P *, char,
                          char, int, const char *, unsigned int);
 extern void X11_end_menu(winid, const char *);
 extern int X11_select_menu(winid, int, MENU_ITEM_P **);
-extern void X11_update_inventory(int);
 extern void X11_mark_synch(void);
 extern void X11_wait_synch(void);
 #ifdef CLIPPING
@@ -487,5 +486,7 @@ extern void genl_outrip(winid, int, time_t);
 #endif
 
 extern void X11_preference_update(const char *);
+extern void X11_update_inventory(int);
+extern perminvent_info *X11_update_invent_slot(winid, int, perminvent_info *);
 
 #endif /* WINX_H */
index 31b61256eeeffdd05e5f1aac265338e8f7ba22bb..1c3b60efdc99298e7cd4c0d35f32f81dad209fb0 100644 (file)
@@ -89,7 +89,6 @@ extern void curses_add_menu(winid wid, const glyph_info *,
                             const char *str, unsigned int itemflags);
 extern void curses_end_menu(winid wid, const char *prompt);
 extern int curses_select_menu(winid wid, int how, MENU_ITEM_P **selected);
-extern void curses_update_inventory(int);
 extern void curses_mark_synch(void);
 extern void curses_wait_synch(void);
 extern void curses_cliparound(int x, int y);
@@ -113,6 +112,8 @@ extern void curses_outrip(winid wid, int how, time_t when);
 extern void genl_outrip(winid tmpwin, int how, time_t when);
 extern void curses_preference_update(const char *pref);
 extern void curs_reset_windows(boolean, boolean);
+extern void curses_update_inventory(int);
+extern perminvent_info *curses_update_invent_slot(winid, int, perminvent_info *);
 
 /* curswins.c */
 
index 08f9ebc7248bdd1ce522336037e85415ac61176b..3f6442837a29ac02bfda0bc77f8619f13e1b790d 100644 (file)
@@ -37,7 +37,6 @@ struct window_procs {
     void (*win_end_menu)(winid, const char *);
     int (*win_select_menu)(winid, int, MENU_ITEM_P **);
     char (*win_message_menu)(char, int, const char *);
-    void (*win_update_inventory)(int);
     void (*win_mark_synch)(void);
     void (*win_wait_synch)(void);
 #ifdef CLIPPING
@@ -83,6 +82,8 @@ struct window_procs {
     void (*win_status_update)(int, genericptr_t, int, int, int,
                               unsigned long *);
     boolean (*win_can_suspend)(void);
+    void (*win_update_inventory)(int);
+    perminvent_info *(*win_update_invent_slot)(winid, int, perminvent_info *);
 };
 
 extern
@@ -164,6 +165,7 @@ extern
  */
 #define status_enablefield (*windowprocs.win_status_enablefield)
 #define status_update (*windowprocs.win_status_update)
+#define update_invent_slot (*windowprocs.win_update_invent_slot)
 
 /*
  * WINCAP
@@ -421,7 +423,6 @@ extern void safe_add_menu(winid, const glyph_info *, const ANY_P *,
 extern void safe_end_menu(winid, const char *);
 extern int safe_select_menu(winid, int, MENU_ITEM_P **);
 extern char safe_message_menu(char, int, const char *);
-extern void safe_update_inventory(int);
 extern void safe_mark_synch(void);
 extern void safe_wait_synch(void);
 #ifdef CLIPPING
@@ -468,6 +469,8 @@ extern void stdio_raw_print(const char *);
 extern void stdio_nonl_raw_print(const char *);
 extern void stdio_raw_print_bold(const char *);
 extern void stdio_wait_synch(void);
+extern void safe_update_inventory(int);
+extern perminvent_info *safe_update_invent_slot(winid, int, perminvent_info *);
 extern int stdio_nhgetch(void);
 #endif /* SAFEPROCS */
 #endif /* WINPROCS_H */
index 1c7bf527ecc75e1d6e899f2cefd938afc56356d2..0baa4477f8edca6221bee1d1baf43cd7c5d39859 100644 (file)
@@ -242,7 +242,6 @@ E void tty_add_menu(winid, const glyph_info *, const ANY_P *, char, char,
 E void tty_end_menu(winid, const char *);
 E int tty_select_menu(winid, int, MENU_ITEM_P **);
 E char tty_message_menu(char, int, const char *);
-E void tty_update_inventory(int);
 E void tty_mark_synch(void);
 E void tty_wait_synch(void);
 #ifdef CLIPPING
@@ -284,6 +283,8 @@ E void genl_outrip(winid, int, time_t);
 
 E char *tty_getmsghistory(boolean);
 E void tty_putmsghistory(const char *, boolean);
+E void tty_update_inventory(int);
+E perminvent_info *tty_update_invent_slot(winid, int, perminvent_info *);
 
 #ifdef TTY_PERM_INVENT
 E void tty_refresh_inventory(int start, int stop, int y);
index 9e54c21e1652137f6fad9a046e264d73028930d4..e262b1aa97e17b3f0d94d3bca8e3d34f844047f5 100644 (file)
@@ -162,6 +162,28 @@ typedef struct gi {
 
 #define MENU_BEHAVE_STANDARD      0x0000000U
 
+struct to_core {
+    boolean active;
+    boolean use_update_inventory;    /* disable the newer slot interface */
+    int slotcount;
+    int low_slot_num, high_slot_num;
+    int max_slot_text;
+};
+
+struct from_core {
+    long piflags;
+    int slot;           /* which inventory slot; 0 means info exchange only */
+    int invlet;
+    const char *text;   /* the text to display */
+};
+
+struct perminvent_info_t {
+    struct to_core tocore;
+    struct from_core fromcore;
+};
+
+typedef struct perminvent_info_t perminvent_info;
+
 /* clang-format on */
 
 #endif /* WINTYPE_H */
index c0b680c3759ac355582c37619d5e6113254e51dc..863b368a8bb1dd45aedf9c9e90c797a213116732 100644 (file)
@@ -536,6 +536,7 @@ static void hup_void_fdecl_int(int);
 static void hup_void_fdecl_winid(winid);
 static void hup_void_fdecl_winid_ulong(winid, unsigned long);
 static void hup_void_fdecl_constchar_p(const char *);
+static perminvent_info *hup_update_invent_slot(winid, int, perminvent_info *);
 
 static struct window_procs hup_procs = {
     "hup", 0L, 0L,
@@ -551,7 +552,6 @@ static struct window_procs hup_procs = {
     hup_curs, hup_putstr, hup_putstr,                  /* putmixed */
     hup_display_file, hup_void_fdecl_winid_ulong,      /* start_menu */
     hup_add_menu, hup_end_menu, hup_select_menu, genl_message_menu,
-    hup_void_fdecl_int,                                /* update_inventory */
     hup_void_ndecl,                                    /* mark_synch */
     hup_void_ndecl,                                    /* wait_synch */
 #ifdef CLIPPING
@@ -584,6 +584,8 @@ static struct window_procs hup_procs = {
     hup_void_ndecl,                                   /* status_finish */
     genl_status_enablefield, hup_status_update,
     genl_can_suspend_no,
+    hup_void_fdecl_int,                                /* update_inventory */
+    hup_update_invent_slot,                            /* update_invent_slot */
 };
 
 static void (*previnterface_exit_nhwindows)(const char *) = 0;
@@ -837,6 +839,18 @@ hup_void_fdecl_constchar_p(const char *string UNUSED)
     return;
 }
 
+/*ARGUSED*/
+perminvent_info *
+hup_update_invent_slot(
+    winid window 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)
+{
+    return (perminvent_info *) 0;
+}
+
 #endif /* HANGUPHANDLING */
 
 
index b5ee273cbf2ca8c551dc2edf902c589f1a0b08e0..07229b6d31bfe13b1772af6c0f1b86f02f4f1f54 100644 (file)
@@ -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
index f00f8644081112b7e94f748520d300ba87b95528..112da9f0dd3b6a53ca88b9a62dd33c3e96406126 100644 (file)
@@ -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; }
 
index 6a0a20705ab211d89666965a88dd4bafb6c806a2..12e605b2b03865eb85b226412d6aad39892d380a 100644 (file)
@@ -117,7 +117,7 @@ struct window_procs X11_procs = {
     X11_putstr, genl_putmixed, X11_display_file, X11_start_menu, X11_add_menu,
     X11_end_menu, X11_select_menu,
     genl_message_menu, /* no need for X-specific handling */
-    X11_update_inventory, X11_mark_synch, X11_wait_synch,
+    X11_mark_synch, X11_wait_synch,
 #ifdef CLIPPING
     X11_cliparound,
 #endif
@@ -141,6 +141,8 @@ struct window_procs X11_procs = {
     X11_status_init, X11_status_finish, X11_status_enablefield,
     X11_status_update,
     genl_can_suspend_no, /* XXX may not always be correct */
+    X11_update_inventory,
+    X11_update_invent_slot,
 };
 
 /*
@@ -1270,6 +1272,17 @@ X11_update_inventory(int arg)
     return;
 }
 
+perminvent_info *
+X11_update_invent_slot(
+    winid window 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)
+{
+    return (perminvent_info *) 0;
+}
+
 /* The current implementation has all of the saved lines on the screen. */
 int
 X11_doprev_message(void)
index 312ada5ae6700a47e6b79b2b786b6fcac8ba37ea..e990222c906cc7d7a402440b27a2b0f8b9b3f191 100644 (file)
@@ -29,7 +29,6 @@ void chainin_add_menu(winid, const glyph_info *, const ANY_P *,
 void chainin_end_menu(winid, const char *);
 int chainin_select_menu(winid, int, MENU_ITEM_P **);
 char chainin_message_menu(char, int, const char *);
-void chainin_update_inventory(int);
 void chainin_mark_synch(void);
 void chainin_wait_synch(void);
 #ifdef CLIPPING
@@ -75,6 +74,8 @@ void chainin_status_update(int, genericptr_t, int, int, int,
                            unsigned long *);
 
 boolean chainin_can_suspend(void);
+void chainin_update_inventory(int);
+perminvent_info *chainin_update_invent_slot(winid, int, perminvent_info *);
 
 void *chainin_procs_chain(int cmd, int n, void *me, void *nextprocs, void *nextdata);
 void chainin_procs_init(int dir);
@@ -576,6 +577,21 @@ chainin_can_suspend(void)
     return rv;
 }
 
+perminvent_info *
+chainin_update_invent_slot(
+    winid window,  /* window to use, must be of type NHW_MENU */
+    int inventory_slot,                 /* slot id: 0 - info return to core */
+                                        /*          1 - gold slot */
+                                        /*          2 - 29 obj slots */
+    perminvent_info *pi)
+{
+    boolean rv;
+
+    rv = (*cibase->nprocs->win_update_invent_slot)(cibase->ndata, window,
+                                                   inventory_slot, pi);
+    return rv;
+}
+
 struct window_procs chainin_procs = {
     "-chainin", 0, /* wincap */
     0,             /* wincap2 */
@@ -621,4 +637,6 @@ struct window_procs chainin_procs = {
     chainin_status_init, chainin_status_finish, chainin_status_enablefield,
     chainin_status_update,
     chainin_can_suspend,
+    chainin_update_inventory,
+    chainin_update_invent_slot,
 };
index 4b122ffa938c2bba3f43fa84cf75ee8e4b12caa8..2a118608a246a113a630e675519e81bb3f07589d 100644 (file)
@@ -29,7 +29,6 @@ void chainout_add_menu(void *,winid, const glyph_info *, const ANY_P *,
 void chainout_end_menu(void *,winid, const char *);
 int chainout_select_menu(void *,winid, int, MENU_ITEM_P **);
 char chainout_message_menu(void *,char, int, const char *);
-void chainout_update_inventory(void *,int);
 void chainout_mark_synch(void *);
 void chainout_wait_synch(void *);
 #ifdef CLIPPING
@@ -75,6 +74,8 @@ void chainout_status_update(void *,int, genericptr_t, int, int, int,
                            unsigned long *);
 
 boolean chainout_can_suspend(void *);
+void chainout_update_inventory(void *, int);
+perminvent_info *chainout_update_invent_slot(void *, winid, int, perminvent_info *);
 
 void chainout_procs_init(int dir);
 void *chainout_procs_chain(int cmd, int n, void *me, void *nextprocs, void *nextdata);
@@ -698,6 +699,22 @@ chainout_can_suspend(void *vp)
     return rv;
 }
 
+perminvent_info *
+chainout_update_invent_slot(
+    winid window,  /* window to use, must be of type NHW_MENU */
+    int inventory_slot,                 /* slot id: 0 - info return to core */
+                                        /*          1 - gold slot */
+                                        /*          2 - 29 obj slots */
+    perminvent_info *pi)
+{
+    struct chainout_data *tdp = vp;
+    boolean rv;
+
+    rv = (*tdp->nprocs->win_update_invent_slot)(window,
+                                                inventory_slot, pi);
+    return rv;
+}
+
 struct chain_procs chainout_procs = {
     "-chainout", 0, /* wincap */
     0,              /* wincap2 */
@@ -744,4 +761,6 @@ struct chain_procs chainout_procs = {
     chainout_status_init, chainout_status_finish, chainout_status_enablefield,
     chainout_status_update,
     chainout_can_suspend,
+    chainout_update_inventory,
+    chainout_update_invent_slot,
 };
index 56b7a23aefc0e0425bfb1c991dc32ebe99ecd5af..df56cae3784bc7b8e0fe6c0e312d6304761e3db0 100644 (file)
@@ -77,7 +77,6 @@ struct window_procs curses_procs = {
     curses_end_menu,
     curses_select_menu,
     genl_message_menu,
-    curses_update_inventory,
     curses_mark_synch,
     curses_wait_synch,
 #ifdef CLIPPING
@@ -117,6 +116,8 @@ struct window_procs curses_procs = {
     genl_status_enablefield,
     curses_status_update,
     genl_can_suspend_yes,
+    curses_update_inventory,
+    curses_update_invent_slot,
 };
 
 /*
@@ -693,6 +694,17 @@ curses_update_inventory(int arg)
     }
 }
 
+perminvent_info *
+curses_update_invent_slot(
+    winid window 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)
+{
+    return (perminvent_info *) 0;
+}
+
 /*
 mark_synch()    -- Don't go beyond this point in I/O on any channel until
                    all channels are caught up to here.  Can be an empty call
index 28cfb37a7c87a8703d38f9aa39dc0130790b5394..5c442d2775528c333ff81873a78f39209f300747 100644 (file)
@@ -74,7 +74,7 @@ struct window_procs safe_procs = {
     safe_create_nhwindow, safe_clear_nhwindow, safe_display_nhwindow,
     safe_destroy_nhwindow, safe_curs, safe_putstr, safe_putmixed,
     safe_display_file, safe_start_menu, safe_add_menu, safe_end_menu,
-    safe_select_menu, safe_message_menu, safe_update_inventory,
+    safe_select_menu, safe_message_menu,
     safe_mark_synch,
     safe_wait_synch,
 #ifdef CLIPPING
@@ -100,6 +100,8 @@ struct window_procs safe_procs = {
     safe_status_finish, safe_status_enablefield,
     safe_status_update,
     safe_can_suspend,
+    safe_update_inventory,
+    safe_update_invent_slot,
 };
 
 struct window_procs *
@@ -270,12 +272,6 @@ safe_message_menu(
     return '\033';
 }
 
-void
-safe_update_inventory(int arg UNUSED)
-{
-    return;
-}
-
 void
 safe_mark_synch(void)
 {
@@ -476,6 +472,23 @@ safe_status_update(
 {
 }
 
+void
+safe_update_inventory(int arg UNUSED)
+{
+    return;
+}
+
+perminvent_info *
+safe_update_invent_slot(
+    winid window,  /* window to use, must be of type NHW_MENU */
+    int inventory_slot,                 /* slot id: 0 - info return to core */
+                                        /*          1 - gold slot */
+                                        /*          2 - 29 obj slots */
+    perminvent_info *pi)
+{
+    return (perminvent_info *) 0;
+}
+
 /**************************************************************
  * These are some optionally selectable routines that add
  * some base functionality over the safe_* versions above.
index 4f9fccf423320a3c6fac3b3691fedf805c1e0730..2c44549688cc0663516cea169be0d9d865c36080 100644 (file)
@@ -183,8 +183,21 @@ void shim_update_inventory(int a1 UNUSED) {
         display_inventory(NULL, FALSE);
     }
 }
+perminvent_info *
+shim_update_invent_slot(
+    winid window 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) {
+    return (perminvent_info *) 0;
+}
 #else /* !__EMSCRIPTEN__ */
-VDECLCB(shim_update_inventory,(int a1 UNUSED), "v")
+VDECLCB(shim_update_inventory,(int a1 UNUSED)
+DECLB(perminvent_info *, shim_update_invent_slot,
+    (winid window, int inventory_slot, perminvent_info *pi),
+    "viip",
+    A2P window UNUSED, A2P inventory_slot UNUSED, P2V pi UNUSED)
 #endif
 
 /* Interface definition used in windows.c */
@@ -212,7 +225,7 @@ struct window_procs shim_procs = {
     shim_create_nhwindow, shim_clear_nhwindow, shim_display_nhwindow,
     shim_destroy_nhwindow, shim_curs, shim_putstr, genl_putmixed,
     shim_display_file, shim_start_menu, shim_add_menu, shim_end_menu,
-    shim_select_menu, shim_message_menu, shim_update_inventory, shim_mark_synch,
+    shim_select_menu, shim_message_menu, shim_mark_synch,
     shim_wait_synch,
 #ifdef CLIPPING
     shim_cliparound,
@@ -243,6 +256,8 @@ struct window_procs shim_procs = {
     genl_status_update,
 #endif
     genl_can_suspend_yes,
+    shim_update_inventory,
+    shim_update_invent_slot,
 };
 
 #ifdef __EMSCRIPTEN__
index b4809569a261427a3ba6972392d31b2051687f00..7a7bb1b861b12656639a6b323bf04aa1c83982e4 100644 (file)
@@ -135,7 +135,7 @@ struct window_procs tty_procs = {
     tty_destroy_nhwindow, tty_curs, tty_putstr,
     tty_putmixed,
     tty_display_file, tty_start_menu, tty_add_menu, tty_end_menu,
-    tty_select_menu, tty_message_menu, tty_update_inventory, tty_mark_synch,
+    tty_select_menu, tty_message_menu, tty_mark_synch,
     tty_wait_synch,
 #ifdef CLIPPING
     tty_cliparound,
@@ -166,6 +166,8 @@ struct window_procs tty_procs = {
     genl_status_update,
 #endif
     genl_can_suspend_yes,
+    tty_update_inventory,
+    tty_update_invent_slot,
 };
 
 winid BASE_WINDOW;
@@ -3597,6 +3599,17 @@ tty_update_inventory(int arg UNUSED)
     return;
 }
 
+perminvent_info *
+tty_update_invent_slot(
+    winid window 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)
+{
+    return (perminvent_info *) 0;
+}
+
 #ifdef TTY_PERM_INVENT
 
 /* put the formatted object description for one item into a particular row
index eef79cd92fb0921987519cd455c838604fd8dd7e..29507a3d284e9d8ca97e9c78548bee56cd779a13 100644 (file)
@@ -100,7 +100,7 @@ struct window_procs mswin_procs = {
     genl_putmixed, mswin_display_file, mswin_start_menu, mswin_add_menu,
     mswin_end_menu, mswin_select_menu,
     genl_message_menu, /* no need for X-specific handling */
-    mswin_update_inventory, mswin_mark_synch, mswin_wait_synch,
+    mswin_mark_synch, mswin_wait_synch,
 #ifdef CLIPPING
     mswin_cliparound,
 #endif
@@ -119,6 +119,8 @@ struct window_procs mswin_procs = {
     mswin_status_init, mswin_status_finish, mswin_status_enablefield,
     mswin_status_update,
     genl_can_suspend_yes,
+    mswin_update_inventory,
+    mswin_update_invent_slot,
 };
 
 /*
@@ -1241,6 +1243,17 @@ mswin_update_inventory(int arg)
         display_inventory(NULL, FALSE);
 }
 
+perminvent_info *
+mswin_update_invent_slot(
+    winid window,  /* window to use, must be of type NHW_MENU */
+    int inventory_slot,                 /* slot id: 0 - info return to core */
+                                        /*          1 - gold slot */
+                                        /*          2 - 29 obj slots */
+    perminvent_info *pi)
+{
+    return (perminvent_info *) 0;
+}
+
 /*
 mark_synch()    -- Don't go beyond this point in I/O on any channel until
                    all channels are caught up to here.  Can be an empty call
index 5d6b53c501b22a436bd24a8cc1a992bd4aeb5521..be2f6fec75ff074899319256a36197e58274d74a 100644 (file)
@@ -161,7 +161,6 @@ void mswin_add_menu(winid wid, const glyph_info *glyphinfo,
                     const char *str, unsigned int itemflags);
 void mswin_end_menu(winid wid, const char *prompt);
 int mswin_select_menu(winid wid, int how, MENU_ITEM_P **selected);
-void mswin_update_inventory(int);
 void mswin_mark_synch(void);
 void mswin_wait_synch(void);
 void mswin_cliparound(int x, int y);
@@ -193,6 +192,8 @@ void mswin_status_finish(void);
 void mswin_status_enablefield(int fieldidx, const char *nm, const char *fmt,
                               boolean enable);
 void mswin_status_update(int idx, genericptr_t ptr, int chg, int percent, int color, unsigned long *colormasks);
+void mswin_update_inventory(int);
+perminvent_info *mswin_update_invent_slot(winid, int, perminvent_info *);
 
 /* helper function */
 HWND mswin_hwnd_from_winid(winid wid);