Mercurial > emacs
annotate oldXMenu/Post.c @ 109635:fc7a8c411aa3
Add declarations to header files.
* src/keyboard.h (xmalloc_widget_value, digest_single_submenu): Remove
declarations, menu.h has them.
(QCbutton, QCtoggle, QCradio, QClabel, extra_keyboard_modifiers)
(Vinput_method_function, Qinput_method_function)
(Qevent_symbol_element_mask, last_event_timestamp):
* src/dispextern.h (Voverflow_newline_into_fringe):
* src/font.h (QCantialias, Qp, syms_of_ftfont, syms_of_xfns)
(syms_of_ftxfont, syms_of_xftfont, syms_of_bdffont)
(syms_of_w32font, syms_of_nsfont):
* src/fontset.h (find_font_encoding, Qlatin):
* src/frame.h (Qtooltip, Qrun_hook_with_args, Vmenu_bar_mode)
(Vtool_bar_mode, set_frame_menubar):
* src/ftfont.h (ftfont_font_format, ftfont_get_fc_charset):
* src/xterm.h (Qx_gtk_map_stock):
* src/keymap.h (meta_prefix_char): Add declarations.
* src/lisp.h: Remove HAVE_SHM code, unused.
(QCmap, QCrehash_size, QCrehash_threshold, QCsize, QCtest)
(QCweakness, Qabove_handle, Qbackquote, Qbar, Qbelow_handle)
(Qborder, Qbottom, Qbox, Qcircular_list, Qcomma, Qcomma_at)
(Qcomma_dot, Qcursor, Qdefault, Qdown, Qend_scroll, Qeq, Qeql)
(Qequal, Qfile_exists_p, Qfont_param, Qfringe, Qfunction)
(Qfunction_documentation, Qhandle, Qhbar, Qheader_line, Qhollow)
(Qidentity, Qleft_margin, Qmenu, Qmenu_bar_update_hook)
(Qmode_line_inactive, Qmouse, Qoverriding_local_map)
(Qoverriding_terminal_local_map, Qratio, Qregion, Qright_margin)
(Qscroll_bar, Qtool_bar, Qtop, Qup, Qvertical_border, Qwhen)
(Qwindow_scroll_functions, Vafter_load_alist)
(Vauto_save_list_file_name, Vface_alternative_font_family_alist)
(Vface_alternative_font_registry_alist, Vface_font_rescale_alist)
(Vface_ignored_fonts, Vinhibit_redisplay, Vminibuffer_list)
(Vprint_length, Vprint_level, Vscalable_fonts_allowed)
(Vshell_file_name, Vsystem_name, Vwindow_scroll_functions)
(Vwindow_system_version, Vx_no_window_manager, initial_argc)
(initial_argv, last_nonmenu_event, load_in_progress)
(noninteractive_need_newline, scroll_margin): Add declarations.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Thu, 05 Aug 2010 16:15:24 -0700 |
parents | 5cc91198ffb2 |
children | ef719132ddfa |
rev | line source |
---|---|
76174
fec5e03aaf59
Remove FSF copyright since file does not differ significantly from X11
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
1 /* Copyright Massachusetts Institute of Technology 1985 */ |
fec5e03aaf59
Remove FSF copyright since file does not differ significantly from X11
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
2 |
25858 | 3 #include "copyright.h" |
4 | |
5 | |
6 /* | |
7 * XMenu: MIT Project Athena, X Window system menu package | |
8 * | |
9 * XMenuPost - Maps a given menu to the display and activates | |
10 * the menu for user selection. The user is allowed to | |
11 * specify the mouse button event mask that will be used | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
27456
diff
changeset
|
12 * to identify a selection request. When a selection |
25858 | 13 * request is received (i.e., when the specified mouse |
14 * event occurs) the data returned will be either the | |
15 * data associated with the particular selection active | |
16 * at the time of the selection request or NULL if no | |
17 * selection was active. A menu selection is shown to | |
18 * be active by placing a highlight box around the | |
19 * selection as the mouse cursor enters its active | |
20 * region. Inactive selections will not be highlighted. | |
21 * As the mouse cursor moved from one menu pane | |
22 * to another menu pane the pane being entered is raised | |
23 * and activated and the pane being left is deactivated. | |
24 * If an error occurs NULL will be returned with the | |
25 * p_num set to POST_ERROR, s_num set to | |
26 * NO_SELECTION and _XMErrorCode set to an | |
27 * appropriate value. | |
28 * Every time the routine returns successfully the | |
29 * p_num and s_num indices will be set to indicate | |
30 * the currently active pane and/or selection. If the | |
31 * mouse was not in a selection window at the time | |
32 * s_num will be set to NO_SELECTION. | |
33 * | |
34 * Author: Tony Della Fera, DEC | |
35 * August, 1984 | |
36 * | |
37 */ | |
38 | |
39 #include "XMenuInt.h" | |
40 | |
41 char * | |
109124
5cc91198ffb2
Convert function definitions in oldXMenu to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
76174
diff
changeset
|
42 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) |
5cc91198ffb2
Convert function definitions in oldXMenu to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
76174
diff
changeset
|
43 /* Previously opened display. */ |
5cc91198ffb2
Convert function definitions in oldXMenu to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
76174
diff
changeset
|
44 /* Menu to post. */ |
5cc91198ffb2
Convert function definitions in oldXMenu to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
76174
diff
changeset
|
45 /* Pane number selected. */ |
5cc91198ffb2
Convert function definitions in oldXMenu to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
76174
diff
changeset
|
46 /* Selection number selected. */ |
5cc91198ffb2
Convert function definitions in oldXMenu to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
76174
diff
changeset
|
47 /* X coordinate of menu position. */ |
5cc91198ffb2
Convert function definitions in oldXMenu to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
76174
diff
changeset
|
48 /* Y coordinate of menu position. */ |
5cc91198ffb2
Convert function definitions in oldXMenu to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
76174
diff
changeset
|
49 /* Mouse button event mask. */ |
25858 | 50 { |
51 register int stat; /* Routine call return status. */ | |
52 char *data; /* Return data. */ | |
53 | |
54 /* | |
55 * Set up initial pane and selection assumptions. | |
56 */ | |
57 | |
58 /* | |
59 * Make the procedure call. | |
60 */ | |
61 stat = XMenuActivate( | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
27456
diff
changeset
|
62 display, |
25858 | 63 menu, |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
27456
diff
changeset
|
64 p_num, s_num, |
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
27456
diff
changeset
|
65 x_pos, y_pos, |
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
27456
diff
changeset
|
66 event_mask, |
27456
4a9ea0d1735b
(XMenuPost): Pass null help callback to XMenuActivate.
Gerd Moellmann <gerd@gnu.org>
parents:
25858
diff
changeset
|
67 &data, 0); |
25858 | 68 |
69 /* | |
70 * Check the return value and return accordingly. | |
71 */ | |
72 switch (stat) { | |
73 case XM_FAILURE: | |
74 *p_num = POST_ERROR; | |
75 *s_num = NO_SELECTION; | |
76 return(NULL); | |
77 case XM_NO_SELECT: | |
78 case XM_IA_SELECT: | |
79 *s_num = NO_SELECTION; | |
80 return(NULL); | |
81 case XM_SUCCESS: | |
82 default: | |
83 return(data); | |
84 } | |
85 } | |
52401 | 86 |
87 /* arch-tag: 7b6104e5-fa32-4342-aa17-05296a30dd70 | |
88 (do not change this comment) */ |