aboutsummaryrefslogtreecommitdiffstats
path: root/src/menu.h
diff options
context:
space:
mode:
authorPaul Eggert2011-05-12 13:23:33 -0700
committerPaul Eggert2011-05-12 13:23:33 -0700
commit08dc5ae68e9c699410256ca9052bd09f336ac87f (patch)
tree6572186aea70cb9f3f736743271c4d0b500650b6 /src/menu.h
parent86db42d22397effbb6e9edc5ae11d806847f0d3e (diff)
downloademacs-08dc5ae68e9c699410256ca9052bd09f336ac87f.tar.gz
emacs-08dc5ae68e9c699410256ca9052bd09f336ac87f.zip
Be more systematic about user-interface timestamps.
Before, the code sometimes used 'Time', sometimes 'unsigned long', and sometimes 'EMACS_UINT', to represent these timestamps. This change causes it to use 'Time' uniformly, as that's what X uses. This makes the code easier to follow, and makes it easier to catch integer overflow bugs such as Bug#8664. * frame.c (Fmouse_position, Fmouse_pixel_position): Use Time, not unsigned long, for user-interface timestamps. * keyboard.c (last_event_timestamp, kbd_buffer_get_event): Likewise. (button_down_time, make_lispy_position, make_lispy_movement): Likewise. * keyboard.h (last_event_timestamp): Likewise. * menu.c (Fx_popup_menu) [!HAVE_X_WINDOWS]: Likewise. * menu.h (xmenu_show): Likewise. * term.c (term_mouse_position): Likewise. * termhooks.h (struct input_event.timestamp): Likewise. (struct terminal.mouse_position_hook): Likewise. * xmenu.c (create_and_show_popup_menu, xmenu_show): Likewise. * xterm.c (XTmouse_position, x_scroll_bar_report_motion): Likewise. * systime.h (Time): New decl. Pull it in from <X11/X.h> if HAVE_X_WINDOWS, otherwise define it as unsigned long, which is what it was before. * menu.h, termhooks.h: Include "systime.h", for Time.
Diffstat (limited to 'src/menu.h')
-rw-r--r--src/menu.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/menu.h b/src/menu.h
index c3978dae8eb..451401b42d5 100644
--- a/src/menu.h
+++ b/src/menu.h
@@ -19,6 +19,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19#ifndef MENU_H 19#ifndef MENU_H
20#define MENU_H 20#define MENU_H
21 21
22#include "systime.h" /* for Time */
23
22extern void x_set_menu_bar_lines (struct frame *f, 24extern void x_set_menu_bar_lines (struct frame *f,
23 Lisp_Object value, 25 Lisp_Object value,
24 Lisp_Object oldval); 26 Lisp_Object oldval);
@@ -48,6 +50,5 @@ extern Lisp_Object w32_menu_show (FRAME_PTR, int, int, int, int,
48extern Lisp_Object ns_menu_show (FRAME_PTR, int, int, int, int, 50extern Lisp_Object ns_menu_show (FRAME_PTR, int, int, int, int,
49 Lisp_Object, const char **); 51 Lisp_Object, const char **);
50extern Lisp_Object xmenu_show (FRAME_PTR, int, int, int, int, 52extern Lisp_Object xmenu_show (FRAME_PTR, int, int, int, int,
51 Lisp_Object, const char **, EMACS_UINT); 53 Lisp_Object, const char **, Time);
52#endif /* MENU_H */ 54#endif /* MENU_H */
53