Mercurial > emacs
view oldXMenu/Post.c @ 58634:95d38c47c806
* keyboard.c: Don't undef SIGIO
* s/darwin.h (NO_SOCK_SIGIO): Define NO_SOCK_SIGIO on carbon
* Makefile.in (mac.o): Depend on blockinput.h and atimer.h.
(macfns.o): Don't depend on ccl.h.
* macfns.c (mac_frame_parm_handlers): Set handlers for
Qleft_fringe and Qright_fringe.
* macterm.c (mac_fill_rectangle_to_pixmap)
(mac_draw_rectangle_to_pixmap, mac_copy_area_to_pixmap)
(mac_copy_area_with_mask_to_pixmap, x_draw_image_foreground_1):
Put in #if 0.
(mac_scroll_area) [TARGET_API_MAC_CARBON]: Use ScrollWindowRect.
(x_flush) [TARGET_API_MAC_CARBON]: Don't traverse frames.
(XFlush) [TARGET_API_MAC_CARBON]: Define to an empty replacement.
(x_draw_glyph_string_background, x_draw_glyph_string_foreground)
[!MAC_OS8]: Added ifdef'd out code for os8. Don't use
XDrawImageString. Always draw background and foreground separately.
(x_draw_image_foreground): Use clipping instead of computing the
intersection rectangle.
(x_draw_image_glyph_string): Don't draw an image with mask to a
pixmap.
(x_redisplay_interface): Set flush_display_optional member to 0.
(XTread_socket): Correctly reset the TEConverter
object.
author | Steven Tamm <steventamm@mac.com> |
---|---|
date | Tue, 30 Nov 2004 05:57:27 +0000 |
parents | e8824c4f5f7e |
children | 3861ff8f4bf1 8e5779acd195 |
line wrap: on
line source
#include "copyright.h" /* Copyright Massachusetts Institute of Technology 1985 */ /* * 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) */