This patch was updated to add the gdi_handle_t to protocol.def and then uses it.

I just did a cvs update and these two patches, along with nine of the original
submissions, still patch and compile correctly.

server: add calls to get/set menu info
implements the get_menu_info, set_menu_info, create_menu and destroy_menu calls

Thomas Kho

---

 include/wine/server_protocol.h |  127 ++++++++++++++++++++++++++
 server/Makefile.in             |    1 
 server/menu.c                  |  195 ++++++++++++++++++++++++++++++++++++++++
 server/protocol.def            |   93 +++++++++++++++++++
 server/request.h               |    8 ++
 server/trace.c                 |   88 ++++++++++++++++++
 server/user.h                  |    4 +
 tools/make_requests            |    1 
 8 files changed, 513 insertions(+), 4 deletions(-)

diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h
index b8c8a7c..45bfb16 100644
--- a/include/wine/server_protocol.h
+++ b/include/wine/server_protocol.h
@@ -39,7 +39,7 @@ struct reply_header
 
 struct request_max_size
 {
-    int pad[16];
+    int pad[25];
 };
 
 #define FIRST_USER_HANDLE 0x0020
@@ -159,6 +159,13 @@ typedef struct
 
 typedef struct
 {
+    long x;
+    long y;
+} dimension_t;
+
+
+typedef struct
+{
     WCHAR          ch;
     unsigned short attr;
 } char_info_t;
@@ -3512,6 +3519,109 @@ struct set_global_windows_reply
 #define SET_GLOBAL_TASKMAN_WINDOW  0x04
 
 
+struct get_menu_info_request
+{
+    struct request_header __header;
+    user_handle_t  handle;
+};
+struct get_menu_info_reply
+{
+    struct reply_header __header;
+    unsigned short flags;
+    unsigned short magic;
+    unsigned short width;
+    unsigned short height;
+    unsigned int nitems;
+    user_handle_t hwnd;
+    void* items;
+    unsigned int focuseditem;
+    user_handle_t hwndowner;
+    unsigned short timetohide;
+    unsigned short scrolling;
+    unsigned int scrollpos;
+    unsigned int totalheight;
+
+    unsigned long style;
+    unsigned int cymax;
+    user_handle_t back;
+    unsigned long contexthelpid;
+    unsigned long menudata;
+    user_handle_t sysmenuowner;
+    dimension_t maxbmpsize;
+};
+
+
+struct set_menu_info_request
+{
+    struct request_header __header;
+    user_handle_t  handle;
+    unsigned int   mask;
+
+    unsigned short flags;
+    unsigned short magic;
+    unsigned short width;
+    unsigned short height;
+    unsigned int nitems;
+    user_handle_t hwnd;
+    void* items;
+    unsigned int focuseditem;
+    user_handle_t hwndowner;
+    unsigned short timetohide;
+    unsigned short scrolling;
+    unsigned int scrollpos;
+    unsigned int totalheight;
+
+    unsigned long style;
+    unsigned int cymax;
+    user_handle_t back;
+    unsigned long contexthelpid;
+    unsigned long menudata;
+    user_handle_t sysmenuowner;
+    dimension_t maxbmpsize;
+};
+struct set_menu_info_reply
+{
+    struct reply_header __header;
+};
+
+
+struct create_menu_request
+{
+    struct request_header __header;
+};
+struct create_menu_reply
+{
+    struct reply_header __header;
+    user_handle_t handle;
+};
+
+
+struct destroy_menu_request
+{
+    struct request_header __header;
+    user_handle_t  handle;
+};
+struct destroy_menu_reply
+{
+    struct reply_header __header;
+};
+
+#define SET_MI_FLAGS       0x80000000
+#define SET_MI_HWND        0x40000000
+#define SET_MI_SYSMENU     0x20000000
+#define SET_MI_OWNER       0x10000000
+#define SET_MI_FOCUSITEM   0x08000000
+#define SET_MI_TIMETOHIDE  0x04000000
+#define SET_MI_WIDTH       0x02000000
+#define SET_MI_HEIGHT      0x01000000
+#define SET_MI_SCROLLING   0x00800000
+#define SET_MI_SCROLLPOS   0x00400000
+#define SET_MI_TOTALHEIGHT 0x00200000
+#define SET_MI_MAXBMPSIZE  0x00100000
+#define SET_MI_ITEMS       0x00080000
+#define SET_MI_NITEMS      0x00040000
+
+
 struct adjust_token_privileges_request
 {
     struct request_header __header;
@@ -3948,6 +4058,10 @@ enum request
     REQ_set_clipboard_info,
     REQ_open_token,
     REQ_set_global_windows,
+    REQ_get_menu_info,
+    REQ_set_menu_info,
+    REQ_create_menu,
+    REQ_destroy_menu,
     REQ_adjust_token_privileges,
     REQ_get_token_privileges,
     REQ_check_token_privileges,
@@ -4169,6 +4283,10 @@ union generic_request
     struct set_clipboard_info_request set_clipboard_info_request;
     struct open_token_request open_token_request;
     struct set_global_windows_request set_global_windows_request;
+    struct get_menu_info_request get_menu_info_request;
+    struct set_menu_info_request set_menu_info_request;
+    struct create_menu_request create_menu_request;
+    struct destroy_menu_request destroy_menu_request;
     struct adjust_token_privileges_request adjust_token_privileges_request;
     struct get_token_privileges_request get_token_privileges_request;
     struct check_token_privileges_request check_token_privileges_request;
@@ -4388,6 +4506,10 @@ union generic_reply
     struct set_clipboard_info_reply set_clipboard_info_reply;
     struct open_token_reply open_token_reply;
     struct set_global_windows_reply set_global_windows_reply;
+    struct get_menu_info_reply get_menu_info_reply;
+    struct set_menu_info_reply set_menu_info_reply;
+    struct create_menu_reply create_menu_reply;
+    struct destroy_menu_reply destroy_menu_reply;
     struct adjust_token_privileges_reply adjust_token_privileges_reply;
     struct get_token_privileges_reply get_token_privileges_reply;
     struct check_token_privileges_reply check_token_privileges_reply;
@@ -4405,6 +4527,6 @@ union generic_reply
     struct query_symlink_reply query_symlink_reply;
 };
 
-#define SERVER_PROTOCOL_VERSION 246
+#define SERVER_PROTOCOL_VERSION 247
 
 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */
diff --git a/server/Makefile.in b/server/Makefile.in
index f62bd1d..9ff8e6a 100644
--- a/server/Makefile.in
+++ b/server/Makefile.in
@@ -27,6 +27,7 @@ C_SRCS = \
 	mailslot.c \
 	main.c \
 	mapping.c \
+	menu.c \
 	mutex.c \
 	named_pipe.c \
 	object.c \
diff --git a/server/menu.c b/server/menu.c
new file mode 100644
index 0000000..39f4f5d
--- /dev/null
+++ b/server/menu.c
@@ -0,0 +1,195 @@
+/*
+ * Server-side menu handling
+ *
+ * Copyright (C) 2004 Ulrich Czekalla for CodeWeavers Inc.
+ * Copyright (C) 2006 Google (Thomas Kho)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "config.h"
+#include "wine/port.h"
+
+#include <stdarg.h>
+
+#include "ntstatus.h"
+#define WIN32_NO_STATUS
+#include "windef.h"
+#include "winbase.h"
+#include "wingdi.h"
+#include "winuser.h"
+#include "winternl.h"
+
+#include "object.h"
+#include "request.h"
+#include "user.h"
+#include "unicode.h"
+
+/* Popup menu structure */
+struct menu {
+    user_handle_t  handle;
+
+    unsigned short flags;      /* Menu flags (MF_POPUP, MF_SYSMENU) */
+    unsigned short width;      /* Width of the whole menu */
+    unsigned short height;     /* Height of the whole menu */
+    unsigned int nitems;       /* Number of items in the menu */
+    user_handle_t hwnd;        /* Window containing the menu */
+    void *items;               /* Array of menu items */
+    unsigned int focuseditem;  /* Currently focused item */
+    user_handle_t hwndowner;   /* window receiving the messages for ownerdraw */
+    unsigned short timetohide; /* Request hiding when receiving a second
+                                  click in the top-level menu item */
+    unsigned short scrolling;  /* Scroll arrows are active */
+    unsigned int scrollpos;    /* Current scroll position */
+    unsigned int totalheight;  /* Total height of menu items inside menu */
+
+    unsigned long style;         /* Extended menu style */
+    unsigned int cymax;          /* max height of the whole menu,
+                                    0 is screen height */
+    gdi_handle_t back;           /* brush for menu background */
+    unsigned long contexthelpid;
+    unsigned long menudata;      /* application defined value */
+    user_handle_t sysmenuowner;  /* Handle to the dummy sys menu holder */
+    dimension_t maxbmpsize;      /* Maximum size of the bitmap items */
+};
+
+
+/* (other menu->FocusedItem values give the position of the focused item) */
+#define NO_SELECTED_ITEM  0xffff
+
+
+/* retrive a pointer to a menu given its handle */
+static struct menu *get_menu(user_handle_t handle)
+{
+    struct menu *ret = get_user_object(handle, USER_MENU);
+    if (!ret) set_error( STATUS_INVALID_HANDLE );
+    return ret;
+}
+
+
+/* create a new menu structure */
+static struct menu *create_menu()
+{
+    struct menu *menu;
+
+    if (!(menu = mem_alloc(sizeof(struct menu))))
+        return NULL;
+
+    memset(menu, 0, sizeof(struct menu));
+
+    if (!(menu->handle = alloc_user_handle(menu, USER_MENU)))
+    {
+        free(menu);
+        return NULL;
+    }
+
+    return menu;
+}
+
+
+/* destroy a menu */
+static void destroy_menu(struct menu *menu)
+{
+    free_user_handle(menu->handle);
+    free(menu);
+}
+
+
+/* create a menu */
+DECL_HANDLER(create_menu)
+{
+    struct menu *menu;
+
+    reply->handle = 0;
+
+    if ((menu = create_menu()))
+    {
+        menu->focuseditem = NO_SELECTED_ITEM;
+        menu->timetohide = FALSE;
+        reply->handle = menu->handle;
+    }
+}
+
+
+/* destroy a menu */
+DECL_HANDLER(destroy_menu)
+{
+    struct menu *menu = get_menu(req->handle);
+
+    if (menu)
+        destroy_menu(menu);
+}
+
+
+/* validate the given menu handle and get menu info */
+DECL_HANDLER(get_menu_info)
+{
+    struct menu *menu;
+
+    if (!(menu = get_menu(req->handle)))
+        return;
+
+    reply->flags = menu->flags;
+    reply->width = menu->width;
+    reply->height = menu->height;
+    reply->nitems = menu->nitems;
+    reply->hwnd = menu->hwnd;
+    reply->items = menu->items;
+    reply->focuseditem = menu->focuseditem;
+    reply->hwndowner = menu->hwndowner;
+    reply->timetohide = menu->timetohide;
+    reply->scrolling = menu->scrolling;
+    reply->scrollpos = menu->scrollpos;
+    reply->totalheight = menu->totalheight;
+
+    reply->style = menu->style;
+    reply->cymax = menu->cymax;
+    reply->back = menu->back;
+    reply->contexthelpid = menu->contexthelpid;
+    reply->menudata = menu->menudata;
+    reply->sysmenuowner = menu->sysmenuowner;
+    reply->maxbmpsize = menu->maxbmpsize;
+}
+
+
+/* validate the given menu handle and set menu info */
+DECL_HANDLER(set_menu_info)
+{
+    struct menu *menu;
+
+    if (!(menu = get_menu(req->handle)))
+        set_error( STATUS_INVALID_HANDLE );
+
+    if (req->mask & SET_MI_FLAGS) menu->flags = req->flags;
+    if (req->mask & SET_MI_WIDTH) menu->width = req->width;
+    if (req->mask & SET_MI_HEIGHT) menu->height = req->height;
+    if (req->mask & SET_MI_NITEMS) menu->nitems = req->nitems;
+    if (req->mask & SET_MI_HWND) menu->hwnd = req->hwnd;
+    if (req->mask & SET_MI_ITEMS) menu->items = req->items;
+    if (req->mask & SET_MI_FOCUSITEM) menu->focuseditem = req->focuseditem;
+    if (req->mask & SET_MI_OWNER) menu->hwndowner = req->hwndowner;
+    if (req->mask & SET_MI_TIMETOHIDE) menu->timetohide = req->timetohide;
+    if (req->mask & SET_MI_SCROLLING) menu->scrolling = req->scrolling;
+    if (req->mask & SET_MI_SCROLLPOS) menu->scrollpos = req->scrollpos;
+    if (req->mask & SET_MI_TOTALHEIGHT) menu->totalheight = req->totalheight;
+
+    if (req->mask & MIM_STYLE) menu->style = req->style;
+    if (req->mask & MIM_MAXHEIGHT) menu->cymax = req->cymax;
+    if (req->mask & MIM_BACKGROUND) menu->back = req->back;
+    if (req->mask & MIM_HELPID) menu->contexthelpid = req->contexthelpid;
+    if (req->mask & MIM_MENUDATA) menu->menudata = req->menudata;
+    if (req->mask & SET_MI_SYSMENU) menu->sysmenuowner = req->sysmenuowner;
+    if (req->mask & SET_MI_MAXBMPSIZE) menu->maxbmpsize = req->maxbmpsize;
+}
diff --git a/server/protocol.def b/server/protocol.def
index 0d014dd..26ce1b1 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -172,6 +172,13 @@ typedef struct
     int  bottom;
 } rectangle_t;
 
+/* structure to specify planar dimensions */
+typedef struct
+{
+    long x;
+    long y;
+} dimension_t;
+
 /* structure for console char/attribute info */
 typedef struct
 {
@@ -2470,6 +2477,89 @@ enum message_type
 #define SET_GLOBAL_PROGMAN_WINDOW  0x02
 #define SET_GLOBAL_TASKMAN_WINDOW  0x04
 
+/* Get menu info */
+@REQ(get_menu_info)
+    user_handle_t  handle;
+@REPLY
+    unsigned short flags;
+    unsigned short magic;
+    unsigned short width;
+    unsigned short height;
+    unsigned int nitems;
+    user_handle_t hwnd;
+    void* items;
+    unsigned int focuseditem;
+    user_handle_t hwndowner;
+    unsigned short timetohide;
+    unsigned short scrolling;
+    unsigned int scrollpos;
+    unsigned int totalheight;
+
+    unsigned long style;
+    unsigned int cymax;
+    user_handle_t back;
+    unsigned long contexthelpid;
+    unsigned long menudata;
+    user_handle_t sysmenuowner;
+    dimension_t maxbmpsize;
+@END
+
+/* Set menu info */
+@REQ(set_menu_info)
+    user_handle_t  handle;
+    unsigned int   mask;
+
+    unsigned short flags;
+    unsigned short magic;
+    unsigned short width;
+    unsigned short height;
+    unsigned int nitems;
+    user_handle_t hwnd;
+    void* items;
+    unsigned int focuseditem;
+    user_handle_t hwndowner;
+    unsigned short timetohide;
+    unsigned short scrolling;
+    unsigned int scrollpos;
+    unsigned int totalheight;
+
+    unsigned long style;
+    unsigned int cymax;
+    user_handle_t back;
+    unsigned long contexthelpid;
+    unsigned long menudata;
+    user_handle_t sysmenuowner;
+    dimension_t maxbmpsize;
+@REPLY
+@END
+
+/* create a menu */
+@REQ(create_menu)
+@REPLY
+    user_handle_t handle;
+@END
+
+/* destroy menu */
+@REQ(destroy_menu)
+    user_handle_t  handle;
+@REPLY
+@END
+
+#define SET_MI_FLAGS       0x80000000
+#define SET_MI_HWND        0x40000000
+#define SET_MI_SYSMENU     0x20000000
+#define SET_MI_OWNER       0x10000000
+#define SET_MI_FOCUSITEM   0x08000000
+#define SET_MI_TIMETOHIDE  0x04000000
+#define SET_MI_WIDTH       0x02000000
+#define SET_MI_HEIGHT      0x01000000
+#define SET_MI_SCROLLING   0x00800000
+#define SET_MI_SCROLLPOS   0x00400000
+#define SET_MI_TOTALHEIGHT 0x00200000
+#define SET_MI_MAXBMPSIZE  0x00100000
+#define SET_MI_ITEMS       0x00080000
+#define SET_MI_NITEMS      0x00040000
+
 /* Adjust the privileges held by a token */
 @REQ(adjust_token_privileges)
     obj_handle_t  handle; /* handle to the token */
diff --git a/server/request.h b/server/request.h
index aad0387..21d853d 100644
--- a/server/request.h
+++ b/server/request.h
@@ -309,6 +309,10 @@ DECL_HANDLER(set_class_info);
 DECL_HANDLER(set_clipboard_info);
 DECL_HANDLER(open_token);
 DECL_HANDLER(set_global_windows);
+DECL_HANDLER(get_menu_info);
+DECL_HANDLER(set_menu_info);
+DECL_HANDLER(create_menu);
+DECL_HANDLER(destroy_menu);
 DECL_HANDLER(adjust_token_privileges);
 DECL_HANDLER(get_token_privileges);
 DECL_HANDLER(check_token_privileges);
@@ -529,6 +533,10 @@ static const req_handler req_handlers[RE
     (req_handler)req_set_clipboard_info,
     (req_handler)req_open_token,
     (req_handler)req_set_global_windows,
+    (req_handler)req_get_menu_info,
+    (req_handler)req_set_menu_info,
+    (req_handler)req_create_menu,
+    (req_handler)req_destroy_menu,
     (req_handler)req_adjust_token_privileges,
     (req_handler)req_get_token_privileges,
     (req_handler)req_check_token_privileges,
diff --git a/server/trace.c b/server/trace.c
index db93e82..582a0ea 100644
--- a/server/trace.c
+++ b/server/trace.c
@@ -89,6 +89,11 @@ static void dump_rectangle( const rectan
              rect->left, rect->top, rect->right, rect->bottom );
 }
 
+static void dump_dimension( const dimension_t *dim )
+{
+    fprintf( stderr, "(%ld,%ld)", dim->x, dim->y );
+}
+
 static void dump_char_info( const char_info_t *info )
 {
     fprintf( stderr, "{'" );
@@ -3062,6 +3067,77 @@ static void dump_set_global_windows_repl
     fprintf( stderr, " old_taskman_window=%p", req->old_taskman_window );
 }
 
+static void dump_get_menu_info_request( const struct get_menu_info_request *req )
+{
+    fprintf( stderr, " handle=%p", req->handle );
+}
+
+static void dump_get_menu_info_reply( const struct get_menu_info_reply *req )
+{
+    fprintf( stderr, " flags=%04x,", req->flags );
+    fprintf( stderr, " magic=%04x,", req->magic );
+    fprintf( stderr, " width=%04x,", req->width );
+    fprintf( stderr, " height=%04x,", req->height );
+    fprintf( stderr, " nitems=%08x,", req->nitems );
+    fprintf( stderr, " hwnd=%p,", req->hwnd );
+    fprintf( stderr, " items=%p,", req->items );
+    fprintf( stderr, " focuseditem=%08x,", req->focuseditem );
+    fprintf( stderr, " hwndowner=%p,", req->hwndowner );
+    fprintf( stderr, " timetohide=%04x,", req->timetohide );
+    fprintf( stderr, " scrolling=%04x,", req->scrolling );
+    fprintf( stderr, " scrollpos=%08x,", req->scrollpos );
+    fprintf( stderr, " totalheight=%08x,", req->totalheight );
+    fprintf( stderr, " style=%lx,", req->style );
+    fprintf( stderr, " cymax=%08x,", req->cymax );
+    fprintf( stderr, " back=%p,", req->back );
+    fprintf( stderr, " contexthelpid=%lx,", req->contexthelpid );
+    fprintf( stderr, " menudata=%lx,", req->menudata );
+    fprintf( stderr, " sysmenuowner=%p,", req->sysmenuowner );
+    fprintf( stderr, " maxbmpsize=" );
+    dump_dimension( &req->maxbmpsize );
+}
+
+static void dump_set_menu_info_request( const struct set_menu_info_request *req )
+{
+    fprintf( stderr, " handle=%p,", req->handle );
+    fprintf( stderr, " mask=%08x,", req->mask );
+    fprintf( stderr, " flags=%04x,", req->flags );
+    fprintf( stderr, " magic=%04x,", req->magic );
+    fprintf( stderr, " width=%04x,", req->width );
+    fprintf( stderr, " height=%04x,", req->height );
+    fprintf( stderr, " nitems=%08x,", req->nitems );
+    fprintf( stderr, " hwnd=%p,", req->hwnd );
+    fprintf( stderr, " items=%p,", req->items );
+    fprintf( stderr, " focuseditem=%08x,", req->focuseditem );
+    fprintf( stderr, " hwndowner=%p,", req->hwndowner );
+    fprintf( stderr, " timetohide=%04x,", req->timetohide );
+    fprintf( stderr, " scrolling=%04x,", req->scrolling );
+    fprintf( stderr, " scrollpos=%08x,", req->scrollpos );
+    fprintf( stderr, " totalheight=%08x,", req->totalheight );
+    fprintf( stderr, " style=%lx,", req->style );
+    fprintf( stderr, " cymax=%08x,", req->cymax );
+    fprintf( stderr, " back=%p,", req->back );
+    fprintf( stderr, " contexthelpid=%lx,", req->contexthelpid );
+    fprintf( stderr, " menudata=%lx,", req->menudata );
+    fprintf( stderr, " sysmenuowner=%p,", req->sysmenuowner );
+    fprintf( stderr, " maxbmpsize=" );
+    dump_dimension( &req->maxbmpsize );
+}
+
+static void dump_create_menu_request( const struct create_menu_request *req )
+{
+}
+
+static void dump_create_menu_reply( const struct create_menu_reply *req )
+{
+    fprintf( stderr, " handle=%p", req->handle );
+}
+
+static void dump_destroy_menu_request( const struct destroy_menu_request *req )
+{
+    fprintf( stderr, " handle=%p", req->handle );
+}
+
 static void dump_adjust_token_privileges_request( const struct adjust_token_privileges_request *req )
 {
     fprintf( stderr, " handle=%p,", req->handle );
@@ -3481,6 +3557,10 @@ static const dump_func req_dumpers[REQ_N
     (dump_func)dump_set_clipboard_info_request,
     (dump_func)dump_open_token_request,
     (dump_func)dump_set_global_windows_request,
+    (dump_func)dump_get_menu_info_request,
+    (dump_func)dump_set_menu_info_request,
+    (dump_func)dump_create_menu_request,
+    (dump_func)dump_destroy_menu_request,
     (dump_func)dump_adjust_token_privileges_request,
     (dump_func)dump_get_token_privileges_request,
     (dump_func)dump_check_token_privileges_request,
@@ -3698,6 +3778,10 @@ static const dump_func reply_dumpers[REQ
     (dump_func)dump_set_clipboard_info_reply,
     (dump_func)dump_open_token_reply,
     (dump_func)dump_set_global_windows_reply,
+    (dump_func)dump_get_menu_info_reply,
+    (dump_func)0,
+    (dump_func)dump_create_menu_reply,
+    (dump_func)0,
     (dump_func)dump_adjust_token_privileges_reply,
     (dump_func)dump_get_token_privileges_reply,
     (dump_func)dump_check_token_privileges_reply,
@@ -3915,6 +3999,10 @@ static const char * const req_names[REQ_
     "set_clipboard_info",
     "open_token",
     "set_global_windows",
+    "get_menu_info",
+    "set_menu_info",
+    "create_menu",
+    "destroy_menu",
     "adjust_token_privileges",
     "get_token_privileges",
     "check_token_privileges",
diff --git a/server/user.h b/server/user.h
index 946b578..46dfd55 100644
--- a/server/user.h
+++ b/server/user.h
@@ -32,10 +32,12 @@ struct window_class;
 struct atom_table;
 struct clipboard;
 
+/* from http://www.ddj.com/dept/windows/184416526?pgno=3 */
 enum user_object
 {
     USER_WINDOW = 1,
-    USER_HOOK
+    USER_MENU = 2,
+    USER_HOOK = 5
 };
 
 #define DESKTOP_ATOM  ((atom_t)32769)
diff --git a/tools/make_requests b/tools/make_requests
index ccef89b..6155660 100755
--- a/tools/make_requests
+++ b/tools/make_requests
@@ -42,6 +42,7 @@ my %formats =
     "abs_time_t"    => "&dump_abs_time",
     "rectangle_t"   => "&dump_rectangle",
     "char_info_t"   => "&dump_char_info",
+    "dimension_t"   => "&dump_dimension",
 );
 
 my @requests = ();

