Mercurial > emacs
view oldXMenu/Post.c @ 83531:a387c138b28e
Merged from emacs@sv.gnu.org
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-305
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-306
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-307
Update from CVS: lispref/display.texi (Forcing Redisplay): Fix typo.
* emacs@sv.gnu.org/emacs--devo--0--patch-308
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-309
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-310
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-311
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-312
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-313
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-314
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-315
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-316
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-317
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-318
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-319
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-320
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-321
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-322
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-323
lisp/play/cookie1.el (cookie): Work properly when there's only one entry
* emacs@sv.gnu.org/emacs--devo--0--patch-324
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-325
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-326
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-327
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-328
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-329
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-330
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-105
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-106
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-107
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-108
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-109
Clean up merge mistakes
* emacs@sv.gnu.org/gnus--rel--5.10--patch-110
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-571
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Tue, 27 Jun 2006 15:06:36 +0000 |
parents | d04d8ccb3c41 |
children | 17e0dd217877 |
line wrap: on
line source
#include "copyright.h" /* Copyright Massachusetts Institute of Technology 1985 */ /* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. */ /* * 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(display, menu, p_num, s_num, x_pos, y_pos, event_mask) register Display *display; /* Previously opened display. */ register XMenu *menu; /* Menu to post. */ register int *p_num; /* Pane number selected. */ register int *s_num; /* Selection number selected. */ register int x_pos; /* X coordinate of menu position. */ register int y_pos; /* Y coordinate of menu position. */ int event_mask; /* 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) */