Mercurial > hg > xemacs-beta
annotate lwlib/xlwmenuP.h @ 5167:e374ea766cc1
clean up, rearrange allocation statistics code
-------------------- ChangeLog entries follow: --------------------
src/ChangeLog addition:
2010-03-21 Ben Wing <ben@xemacs.org>
* alloc.c:
* alloc.c (assert_proper_sizing):
* alloc.c (c_readonly):
* alloc.c (malloced_storage_size):
* alloc.c (fixed_type_block_overhead):
* alloc.c (lisp_object_storage_size):
* alloc.c (inc_lrecord_stats):
* alloc.c (dec_lrecord_stats):
* alloc.c (pluralize_word):
* alloc.c (object_memory_usage_stats):
* alloc.c (Fobject_memory_usage):
* alloc.c (compute_memusage_stats_length):
* alloc.c (disksave_object_finalization_1):
* alloc.c (Fgarbage_collect):
* mc-alloc.c:
* mc-alloc.c (mc_alloced_storage_size):
* mc-alloc.h:
No functionality change here. Collect the allocations-statistics
code that was scattered throughout alloc.c into one place. Add
remaining section headings so that all sections have headings
clearly identifying the start of the section and its purpose.
Expose mc_alloced_storage_size() even when not MEMORY_USAGE_STATS;
this fixes build problems and is related to the export of
lisp_object_storage_size() and malloced_storage_size() when
non-MEMORY_USAGE_STATS in the previous change set.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Sun, 21 Mar 2010 04:41:49 -0500 |
parents | a6c778975d7d |
children | ade4c7e2c6cb |
rev | line source |
---|---|
440 | 1 #ifndef INCLUDED_xlwmenuP_h_ |
2 #define INCLUDED_xlwmenuP_h_ | |
428 | 3 |
4 #include "xlwmenu.h" | |
5 #include <X11/CoreP.h> | |
6 | |
4916
a6c778975d7d
split USE_XFT into HAVE_XFT/USE_XFT
Ben Wing <ben@xemacs.org>
parents:
3685
diff
changeset
|
7 #ifdef HAVE_XFT_MENUBARS |
3094 | 8 #include <X11/Xft/Xft.h> |
9 #endif | |
10 | |
11 | |
428 | 12 /* Elements in the stack arrays. */ |
13 typedef struct _window_state | |
14 { | |
15 Window window; | |
16 Position x; | |
17 Position y; | |
18 Dimension width; | |
19 Dimension height; | |
20 Dimension label_width; | |
21 Dimension toggle_width; | |
22 } window_state; | |
23 | |
24 | |
25 /* New fields for the XlwMenu widget instance record */ | |
26 typedef struct _XlwMenu_part | |
27 { | |
28 /* slots set by the resources */ | |
29 | |
4916
a6c778975d7d
split USE_XFT into HAVE_XFT/USE_XFT
Ben Wing <ben@xemacs.org>
parents:
3685
diff
changeset
|
30 #if defined(NEED_MOTIF) && !defined(HAVE_XFT_MENUBARS) |
428 | 31 XmFontList font_list; |
32 XmFontList font_list_2; | |
33 XmFontList fallback_font_list; | |
34 #else | |
35 XFontStruct * font; | |
4916
a6c778975d7d
split USE_XFT into HAVE_XFT/USE_XFT
Ben Wing <ben@xemacs.org>
parents:
3685
diff
changeset
|
36 #ifdef HAVE_XFT_MENUBARS |
3397 | 37 String fcFontName; |
3685 | 38 String xftFontName; |
3094 | 39 XftFont *renderFont; |
40 #endif | |
428 | 41 # ifdef USE_XFONTSET |
42 XFontSet font_set; | |
43 # endif | |
44 #endif | |
45 Dimension font_ascent, font_descent; /* extracted from font/fontlist */ | |
46 | |
47 Pixel foreground; | |
48 Pixel button_foreground; | |
49 Pixel highlight_foreground; | |
50 Pixel title_foreground; | |
51 Dimension margin; | |
52 Dimension horizontal_margin; | |
53 Dimension vertical_margin; | |
54 Dimension column_spacing; | |
55 Dimension shadow_thickness; | |
56 Dimension indicator_size; | |
57 Pixel top_shadow_color; | |
58 Pixel bottom_shadow_color; | |
59 Pixel select_color; | |
4916
a6c778975d7d
split USE_XFT into HAVE_XFT/USE_XFT
Ben Wing <ben@xemacs.org>
parents:
3685
diff
changeset
|
60 #ifdef HAVE_XFT_MENUBARS |
3094 | 61 #endif |
428 | 62 Pixmap top_shadow_pixmap; |
63 Pixmap bottom_shadow_pixmap; | |
64 Cursor cursor_shape; | |
65 XtCallbackList open; | |
66 XtCallbackList select; | |
67 widget_value* contents; | |
68 int horizontal; | |
69 Boolean use_backing_store; | |
70 Boolean bounce_down; | |
71 Boolean lookup_labels; | |
72 | |
73 /* State of the XlwMenu */ | |
74 int old_depth; | |
75 widget_value** old_stack; | |
76 int old_stack_length; | |
77 | |
78 /* New state after the user moved */ | |
79 int new_depth; | |
80 widget_value** new_stack; | |
81 int new_stack_length; | |
82 | |
83 /* Window resources */ | |
84 window_state* windows; | |
85 int windows_length; | |
86 | |
87 /* Internal part, set by the XlwMenu */ | |
88 GC foreground_gc; | |
89 GC button_gc; | |
90 GC background_gc; | |
91 GC inactive_gc; | |
92 GC inactive_button_gc; | |
93 GC shadow_top_gc; | |
94 GC shadow_bottom_gc; | |
95 GC select_gc; | |
96 GC highlight_gc; | |
97 GC title_gc; | |
98 Cursor cursor; | |
99 Boolean popped_up; | |
100 Pixmap gray_pixmap; | |
101 | |
102 /* Stay-up stuff */ | |
103 Boolean pointer_grabbed; | |
104 Boolean next_release_must_exit; | |
105 Time menu_post_time, menu_bounce_time; | |
106 widget_value * last_selected_val; | |
107 } XlwMenuPart; | |
108 | |
109 /* Full instance record declaration */ | |
110 typedef struct _XlwMenuRec | |
111 { | |
112 CorePart core; | |
113 XlwMenuPart menu; | |
114 } XlwMenuRec; | |
115 | |
116 /* New fields for the XlwMenu widget class record */ | |
117 typedef struct | |
118 { | |
119 int dummy; | |
120 } XlwMenuClassPart; | |
121 | |
122 /* Full class record declaration. */ | |
123 typedef struct _XlwMenuClassRec | |
124 { | |
125 CoreClassPart core_class; | |
126 XlwMenuClassPart menu_class; | |
127 } XlwMenuClassRec; | |
128 | |
129 /* Class pointer. */ | |
130 extern XlwMenuClassRec xlwMenuClassRec; | |
131 | |
440 | 132 #endif /* INCLUDED_xlwmenuP_h_ */ |