comparison oldXMenu/Activate.c @ 109350:c11d07f3d731

merge trunk
author Kenichi Handa <handa@etlken>
date Thu, 08 Jul 2010 17:09:35 +0900
parents 5cc91198ffb2
children 417b1e4d63cd
comparison
equal deleted inserted replaced
109349:c82f3023b7f2 109350:c11d07f3d731
101 #include <X11/keysym.h> 101 #include <X11/keysym.h>
102 102
103 /* For debug, set this to 0 to not grab the keyboard on menu popup */ 103 /* For debug, set this to 0 to not grab the keyboard on menu popup */
104 int x_menu_grab_keyboard = 1; 104 int x_menu_grab_keyboard = 1;
105 105
106 typedef void (*Wait_func)();
107
108 static Wait_func wait_func; 106 static Wait_func wait_func;
109 static void* wait_data; 107 static void* wait_data;
110 108
111 void 109 void
112 XMenuActivateSetWaitFunction (func, data) 110 XMenuActivateSetWaitFunction (Wait_func func, void *data)
113 Wait_func func;
114 void *data;
115 { 111 {
116 wait_func = func; 112 wait_func = func;
117 wait_data = data; 113 wait_data = data;
118 } 114 }
119 115
120 int 116 int
121 XMenuActivate(display, menu, p_num, s_num, x_pos, y_pos, event_mask, data, 117 XMenuActivate(
122 help_callback) 118 register Display *display, /* Display to put menu on. */
123 register Display *display; /* Display to put menu on. */ 119 register XMenu *menu, /* Menu to activate. */
124 register XMenu *menu; /* Menu to activate. */ 120 int *p_num, /* Pane number selected. */
125 int *p_num; /* Pane number selected. */ 121 int *s_num, /* Selection number selected. */
126 int *s_num; /* Selection number selected. */ 122 int x_pos, /* X coordinate of menu position. */
127 int x_pos; /* X coordinate of menu position. */ 123 int y_pos, /* Y coordinate of menu position. */
128 int y_pos; /* Y coordinate of menu position. */ 124 unsigned int event_mask, /* Mouse button event mask. */
129 unsigned int event_mask; /* Mouse button event mask. */ 125 char **data, /* Pointer to return data value. */
130 char **data; /* Pointer to return data value. */ 126 void (* help_callback) (char *, int, int)) /* Help callback. */
131 void (* help_callback) (); /* Help callback. */
132 { 127 {
133 int status; /* X routine call status. */ 128 int status; /* X routine call status. */
134 int orig_x; /* Upper left menu origin X coord. */ 129 int orig_x; /* Upper left menu origin X coord. */
135 int orig_y; /* Upper left menu origin Y coord. */ 130 int orig_y; /* Upper left menu origin Y coord. */
136 int ret_val; /* Return value. */ 131 int ret_val; /* Return value. */