Mercurial > emacs
view oldXMenu/Post.c @ 110505:e67da919e2b5
Fix uses of int instead of EMACS_INT in intervals.c.
intervals.c (traverse_intervals, rotate_right, rotate_left)
(balance_an_interval, split_interval_right, split_interval_left)
(find_interval, next_interval, update_interval)
(adjust_intervals_for_insertion, delete_node, delete_interval)
(interval_deletion_adjustment, adjust_intervals_for_deletion)
(offset_intervals, merge_interval_right, merge_interval_left)
(graft_intervals_into_buffer, adjust_for_invis_intang)
(move_if_not_intangible, get_local_map, copy_intervals)
(copy_intervals_to_string, compare_string_intervals)
(set_intervals_multibyte_1): Use EMACS_INT for buffer positions
and EMACS_UINT for interval tree size.
intervals.h (traverse_intervals, split_interval_right)
(split_interval_left, find_interval, offset_intervals)
(graft_intervals_into_buffer, copy_intervals)
(copy_intervals_to_string, move_if_not_intangible, get_local_map)
(update_interval): Adjust prototypes.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Thu, 23 Sep 2010 11:46:54 -0400 |
parents | 5cc91198ffb2 |
children | ef719132ddfa |
line wrap: on
line source
/* Copyright Massachusetts Institute of Technology 1985 */ #include "copyright.h" /* * XMenu: MIT Project Athena, X Window system menu package * * XMenuPost - Maps a given menu to the display and activates * the menu for user selection. The user is allowed to * specify the mouse button event mask that will be used * to identify a selection request. When a selection * request is received (i.e., when the specified mouse * event occurs) the data returned will be either the * data associated with the particular selection active * at the time of the selection request or NULL if no * selection was active. A menu selection is shown to * be active by placing a highlight box around the * selection as the mouse cursor enters its active * region. Inactive selections will not be highlighted. * As the mouse cursor moved from one menu pane * to another menu pane the pane being entered is raised * and activated and the pane being left is deactivated. * If an error occurs NULL will be returned with the * p_num set to POST_ERROR, s_num set to * NO_SELECTION and _XMErrorCode set to an * appropriate value. * Every time the routine returns successfully the * p_num and s_num indices will be set to indicate * the currently active pane and/or selection. If the * mouse was not in a selection window at the time * s_num will be set to NO_SELECTION. * * Author: Tony Della Fera, DEC * August, 1984 * */ #include "XMenuInt.h" char * XMenuPost(register Display *display, register XMenu *menu, register int *p_num, register int *s_num, register int x_pos, register int y_pos, int event_mask) /* Previously opened display. */ /* Menu to post. */ /* Pane number selected. */ /* Selection number selected. */ /* X coordinate of menu position. */ /* Y coordinate of menu position. */ /* Mouse button event mask. */ { register int stat; /* Routine call return status. */ char *data; /* Return data. */ /* * Set up initial pane and selection assumptions. */ /* * Make the procedure call. */ stat = XMenuActivate( display, menu, p_num, s_num, x_pos, y_pos, event_mask, &data, 0); /* * Check the return value and return accordingly. */ switch (stat) { case XM_FAILURE: *p_num = POST_ERROR; *s_num = NO_SELECTION; return(NULL); case XM_NO_SELECT: case XM_IA_SELECT: *s_num = NO_SELECTION; return(NULL); case XM_SUCCESS: default: return(data); } } /* arch-tag: 7b6104e5-fa32-4342-aa17-05296a30dd70 (do not change this comment) */