Mercurial > emacs
annotate oldXMenu/DelPane.c @ 60632:fa8be36e244d
Include macterm.h instead of directly including Carbon.h.
[TARGET_API_MAC_CARBON] (Qstring, Qnumber, Qboolean, Qdate, Qdata)
(Qarray, Qdictionary): New variables.
(syms_of_mac) [TARGET_API_MAC_CARBON]: Initialize them.
[TARGET_API_MAC_CARBON] (Qutf_8): Add extern.
[TARGET_API_MAC_CARBON] (DECODE_UTF_8): New macro.
[TARGET_API_MAC_CARBON] (struct cfdict_context): New struct used in
callback for CFDictionaryApplyFunction.
[TARGET_API_MAC_CARBON] (cfdata_to_lisp, cfstring_to_lisp)
(cfnumber_to_lisp, cfdate_to_lisp, cfboolean_to_lisp)
(cfobject_desc_to_lisp, cfdictionary_add_to_list)
(cfdictionary_puthash, cfproperty_list_to_lisp): New functions.
[TARGET_API_MAC_CARBON] (Fmac_get_preference): New function.
(syms_of_mac) [TARGET_API_MAC_CARBON]: Defsubr it.
(P, LOOSE_BINDING, SINGLE_COMPONENT, HASHKEY_TERMINAL): New macro.
(skip_while_space, parse_comment, parse_include_file)
(parse_binding, parse_component, parse_resource_name, parse_value)
(parse_resource_line, xrm_create_database, xrm_q_put_resource)
(xrm_merge_string_database, xrm_q_get_resource, xrm_get_resource)
(xrm_cfproperty_list_to_value, xrm_get_preference_database): New
functions.
author | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
---|---|
date | Wed, 16 Mar 2005 08:05:56 +0000 |
parents | e8824c4f5f7e |
children | 3861ff8f4bf1 8e5779acd195 |
rev | line source |
---|---|
25858 | 1 #include "copyright.h" |
2 | |
3 /* Copyright Massachusetts Institute of Technology 1985 */ | |
4 | |
5 /* | |
6 * XMenu: MIT Project Athena, X Window system menu package | |
7 * | |
8 * XMenuDeletePane - Deletes a pane from an XMenu object. | |
9 * | |
10 * Author: Tony Della Fera, DEC | |
11 * 20-Nov-85 | |
12 * | |
13 */ | |
14 | |
15 #include "XMenuInt.h" | |
16 | |
17 int | |
18 XMenuDeletePane(display, menu, p_num) | |
19 register Display *display; /* Previously opened display */ | |
20 register XMenu *menu; /* Menu object to be modified. */ | |
21 register int p_num; /* Pane number to be deleted. */ | |
22 { | |
23 register XMPane *p_ptr; /* Pointer to pane being deleted. */ | |
24 register XMSelect *s_ptr; /* Pointer to selections being deleted. */ | |
25 register XMSelect *s_next; /* Pointer to next selection to be deleted. */ | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
26 |
25858 | 27 /* |
28 * Find the right pane. | |
29 */ | |
30 p_ptr = _XMGetPanePtr(menu, p_num); | |
31 if (p_ptr == NULL) return(XM_FAILURE); | |
32 | |
33 /* | |
34 * Remove the pane from the association table. | |
35 */ | |
36 XDeleteAssoc(display, menu->assoc_tab, p_ptr->window); | |
37 | |
38 /* | |
39 * Remove the pane from the pane list and update | |
40 * the pane count. | |
41 */ | |
42 emacs_remque(p_ptr); | |
43 menu->p_count--; | |
44 | |
45 /* | |
46 * Remove all the selections in the pane from the | |
47 * association table and free their XMSelect structures. | |
48 */ | |
49 for ( | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
50 s_ptr = p_ptr->s_list->next; |
25858 | 51 s_ptr != p_ptr->s_list; |
52 s_ptr = s_next | |
53 ) { | |
54 XDeleteAssoc(display, menu->assoc_tab, s_ptr->window); | |
55 s_next = s_ptr->next; | |
56 free(s_ptr); | |
57 } | |
58 free(p_ptr->s_list); | |
59 | |
60 if (p_ptr->window) { | |
61 /* | |
62 * Destroy the selection transparencies. | |
63 */ | |
64 XDestroySubwindows(display, p_ptr->window); | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
65 |
25858 | 66 /* |
67 * Destroy the pane window. | |
68 */ | |
69 XDestroyWindow(display, p_ptr->window); | |
70 } | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
71 |
25858 | 72 /* |
73 * Free the pane's XMPane structure. | |
74 */ | |
75 free(p_ptr); | |
76 | |
77 /* | |
78 * Schedule a recompute. | |
79 */ | |
80 menu->recompute = 1; | |
81 | |
82 /* | |
83 * Return the pane number just deleted. | |
84 */ | |
85 _XMErrorCode = XME_NO_ERROR; | |
86 return(p_num); | |
87 } | |
52401 | 88 |
89 /* arch-tag: 32a5bfd4-4bac-4090-bb53-844110f4908e | |
90 (do not change this comment) */ |