Mercurial > emacs
annotate oldXMenu/DelSel.c @ 69964:321089786c7b
Don't include gnu.h.
(x_io_error_quitter, x_draw_image_foreground_1): Remove prototypes.
(x_sync): Move to macfns.c.
[USE_CG_DRAWING] (mac_define_fringe_bitmap): Remove unused
variable `mask_bits'.
(mac_compute_glyph_string_overhangs): Avoid ambiguous `else'.
(x_draw_image_glyph_string): Remove unused variable `pixmap'.
(x_mac_to_emacs_modifiers): Remove function.
(XTset_vertical_scroll_bar, mac_handle_visibility_change)
(x_make_frame_visible, xlfdpat_create, mac_handle_command_event):
Add explicit braces to avoid ambiguous `else'.
(x_make_frame_visible): Remove unused variables `type',
`original_top', and `original_left'.
(mac_do_list_fonts, XTread_socket): Add parentheses around && within ||.
(x_load_font): Remove unused variables `full_name', and `value'.
(do_get_menus, do_init_managers, do_check_ram_size) [!MAC_OS8]:
Remove functions.
(do_zoom_window): Reorganize variables with respect to conditionals.
(init_command_handler): Remove unused variable `err'.
[MAC_OSX] (mac_check_bundle): Remove unused variable `child'.
author | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
---|---|
date | Wed, 12 Apr 2006 08:09:24 +0000 |
parents | e8a3fb527b77 |
children | ce127a46b1ca d04d8ccb3c41 c5406394f567 |
rev | line source |
---|---|
25858 | 1 #include "copyright.h" |
2 | |
3 /* Copyright Massachusetts Institute of Technology 1985 */ | |
68640
e8a3fb527b77
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
65000
diff
changeset
|
4 /* Copyright (C) 2002, 2003, 2004, 2005, |
e8a3fb527b77
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
65000
diff
changeset
|
5 2006 Free Software Foundation, Inc. */ |
25858 | 6 |
7 /* | |
8 * XMenu: MIT Project Athena, X Window system menu package | |
9 * | |
10 * XMenuDeleteSelection - Deletes a selection from an XMenu object. | |
11 * | |
12 * Author: Tony Della Fera, DEC | |
13 * 20-Nov-85 | |
14 * | |
15 */ | |
16 | |
17 #include "XMenuInt.h" | |
18 | |
19 int | |
20 XMenuDeleteSelection(display, menu, p_num, s_num) | |
21 register Display *display; /* Previously opened display. */ | |
22 register XMenu *menu; /* Menu object to be modified. */ | |
23 register int p_num; /* Pane number to be deleted. */ | |
24 register int s_num; /* Selection number to be deleted. */ | |
25 { | |
26 register XMPane *p_ptr; /* Pointer to pane being deleted. */ | |
27 register XMSelect *s_ptr; /* Pointer to selections being deleted. */ | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
28 |
25858 | 29 /* |
30 * Find the right pane. | |
31 */ | |
32 p_ptr = _XMGetPanePtr(menu, p_num); | |
33 if (p_ptr == NULL) return(XM_FAILURE); | |
34 | |
35 /* | |
36 * Find the right selection. | |
37 */ | |
38 s_ptr = _XMGetSelectionPtr(p_ptr, s_num); | |
39 if (s_ptr == NULL) return(XM_FAILURE); | |
40 | |
41 /* | |
42 * Remove the selection from the association table. | |
43 */ | |
44 XDeleteAssoc(display, menu->assoc_tab, s_ptr->window); | |
45 | |
46 /* | |
47 * Remove the selection from the parent pane's selection | |
48 * list and update the selection count. | |
49 */ | |
50 emacs_remque(s_ptr); | |
51 p_ptr->s_count--; | |
52 | |
53 /* | |
54 * Destroy the selection transparency. | |
55 */ | |
56 if (s_ptr->window) XDestroyWindow(display, s_ptr->window); | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
57 |
25858 | 58 /* |
59 * Free the selection's XMSelect structure. | |
60 */ | |
61 free(s_ptr); | |
62 | |
63 /* | |
64 * Schedule a recompute. | |
65 */ | |
66 menu->recompute = 1; | |
67 | |
68 /* | |
69 * Return the selection number just deleted. | |
70 */ | |
71 _XMErrorCode = XME_NO_ERROR; | |
72 return(s_num); | |
73 } | |
52401 | 74 |
75 /* arch-tag: 24ca2bc7-8a37-471a-8095-e6363fc1ed10 | |
76 (do not change this comment) */ |