diff options
| author | Dave Love | 1999-09-30 21:29:02 +0000 |
|---|---|---|
| committer | Dave Love | 1999-09-30 21:29:02 +0000 |
| commit | a08cb76c5a7501b8da3926e752559801bccbc0d4 (patch) | |
| tree | 13e737cc3af2020f3b17c5e4576b7b6ef6e8f07f | |
| parent | 8cc3881faf5a8595d8f62ba80b7b7e3b43c642f4 (diff) | |
| download | emacs-a08cb76c5a7501b8da3926e752559801bccbc0d4.tar.gz emacs-a08cb76c5a7501b8da3926e752559801bccbc0d4.zip | |
#
| -rw-r--r-- | lwlib/ChangeLog | 642 | ||||
| -rw-r--r-- | lwlib/Imakefile | 244 | ||||
| -rw-r--r-- | lwlib/README | 5 | ||||
| -rw-r--r-- | lwlib/dispatch.h | 2 | ||||
| -rw-r--r-- | lwlib/xrdb-cpp.c | 184 | ||||
| -rw-r--r-- | lwlib/xrdb.c | 70 |
6 files changed, 1147 insertions, 0 deletions
diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog new file mode 100644 index 00000000000..6bf25d6fbcb --- /dev/null +++ b/lwlib/ChangeLog | |||
| @@ -0,0 +1,642 @@ | |||
| 1 | 1999-07-12 Richard Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * Version 20.4 released. | ||
| 4 | |||
| 5 | 1998-08-19 Richard Stallman <rms@psilocin.ai.mit.edu> | ||
| 6 | |||
| 7 | * Version 20.3 released. | ||
| 8 | |||
| 9 | 1998-07-30 Paul Eggert <eggert@twinsun.com> | ||
| 10 | |||
| 11 | * lwlib/Makefile.in (lwlib-utils.o, lwlib.o, lwlib-Xlw.o) | ||
| 12 | (lwlib-Xaw.o, lwlib-Xm.o, lwlib-Xol.o, lwlib-Xolmb.o): | ||
| 13 | Add dependencies to corresponding .c files. for Solaris 2.x VPATH make. | ||
| 14 | |||
| 15 | 1998-04-06 Andreas Schwab <schwab@gnu.org> | ||
| 16 | |||
| 17 | * lwlib.c: Always declare xmalloc. | ||
| 18 | [USE_XAW]: Include <X11/Xaw/Paned.h>. | ||
| 19 | (lwlib_memset, lwlib_bcopy): Explicitly declare return type. | ||
| 20 | |||
| 21 | 1997-12-20 Richard Stallman <rms@delysid.gnu.org> | ||
| 22 | |||
| 23 | * lwlib-Xm.c (update_one_menu_entry): | ||
| 24 | Add conditional in case XmNpositionIndex is missing. | ||
| 25 | |||
| 26 | 1997-12-20 Richard Stallman <rms@psilocin.gnu.org> | ||
| 27 | |||
| 28 | * lwlib-Xm.c (update_one_menu_entry): | ||
| 29 | Add conditional in case XmNpositionIndex is missing. | ||
| 30 | |||
| 31 | 1997-09-19 Richard Stallman <rms@psilocin.gnu.ai.mit.edu> | ||
| 32 | |||
| 33 | * Version 20.2 released. | ||
| 34 | |||
| 35 | * xlwmenu.c (motion_event_is_in_menu): Extend the left and | ||
| 36 | top windows by the shadow width. | ||
| 37 | |||
| 38 | 1997-09-15 Richard Stallman <rms@psilocin.gnu.ai.mit.edu> | ||
| 39 | |||
| 40 | * Version 20.1 released. | ||
| 41 | |||
| 42 | 1997-07-23 Richard Stallman <rms@psilocin.gnu.ai.mit.edu> | ||
| 43 | |||
| 44 | * xlwmenu.c (display_menu): If an item is disabled, | ||
| 45 | don't display its submenu (if any). | ||
| 46 | |||
| 47 | 1997-05-01 Richard Stallman <rms@psilocin.gnu.ai.mit.edu> | ||
| 48 | |||
| 49 | * xlwmenu.c (pop_up_menu): Update the call to x_catch_errors. | ||
| 50 | |||
| 51 | 1997-01-21 Richard Stallman <rms@psilocin.gnu.ai.mit.edu> | ||
| 52 | |||
| 53 | * xlwmenu.c (fit_to_screen): If new menu would overlap the previous | ||
| 54 | one from the side, try moving it up or down. | ||
| 55 | |||
| 56 | 1996-08-11 Richard Stallman <rms@psilocin.gnu.ai.mit.edu> | ||
| 57 | |||
| 58 | * Version 19.33 released. | ||
| 59 | |||
| 60 | * lwlib-Xm.c (update_one_menu_entry): Fix previous change: | ||
| 61 | When XmIsCascadeButton, don't call XmCreateCascadeButtonGadget, | ||
| 62 | just modify the existing one. | ||
| 63 | |||
| 64 | 1996-08-09 Marcus Daniels <marcus@sayre.sysc.pdx.edu> | ||
| 65 | |||
| 66 | * lwlib.c (merge_widget_value): Undo previous change. | ||
| 67 | |||
| 68 | * lwlib-Xm.c (update_one_menu_entry): When creating a pulldown | ||
| 69 | in an existing but empty menu item, in order to get a new functional | ||
| 70 | pulldown, the menu item must be switched from an XmPushButtonGadget | ||
| 71 | into a XmCascadeButtonGadget. | ||
| 72 | |||
| 73 | 1996-07-31 Richard Stallman <rms@psilocin.gnu.ai.mit.edu> | ||
| 74 | |||
| 75 | * Version 19.32 released. | ||
| 76 | |||
| 77 | 1996-07-31 Marcus Daniels <marcus@sayre.sysc.pdx.edu> | ||
| 78 | |||
| 79 | * lwlib-Xm.c (make_menubar): Turn off menu accelerator. | ||
| 80 | |||
| 81 | 1996-07-24 Marcus Daniels <marcus@sayre.sysc.pdx.edu> | ||
| 82 | |||
| 83 | * lwlib.c (merge_widget_value) [USE_MOTIF]: Pass along the change | ||
| 84 | flag from merged_contents. | ||
| 85 | |||
| 86 | 1996-07-13 Karl Heuer <kwzh@gnu.ai.mit.edu> | ||
| 87 | |||
| 88 | * lwlib-Xm.c (xm_update_menu): Fix loop termination test. | ||
| 89 | |||
| 90 | 1996-07-07 Karl Heuer <kwzh@gnu.ai.mit.edu> | ||
| 91 | |||
| 92 | * lwlib-Xm.h, lwlib-Xm.c, lwlib.h, lwlib.c: Undo previous change. | ||
| 93 | |||
| 94 | 1996-07-03 Marcus Daniels <marcus@sayre.sysc.pdx.edu> | ||
| 95 | |||
| 96 | * lwlib-Xm.h: Declare lw_motif_menu_related_event_p. | ||
| 97 | |||
| 98 | * lwlib-Xm.c (lw_motif_menu_related_event_p): A predicate to | ||
| 99 | identify keyboard events intended only for menus. | ||
| 100 | |||
| 101 | * lwlib.h: Declare lw_toolkit_related_event_p. | ||
| 102 | |||
| 103 | * lwlib.c (lw_toolkit_related_event_p): A predicate to identify | ||
| 104 | toolkit-specific events. | ||
| 105 | |||
| 106 | 1996-06-07 Marcus Daniels <marcus@sayre.sysc.pdx.edu> | ||
| 107 | |||
| 108 | * lwlib-Xm.c (make_menu_in_widget): Set mapping delay | ||
| 109 | for cascade buttons to zero. | ||
| 110 | |||
| 111 | 1996-05-25 Karl Heuer <kwzh@gnu.ai.mit.edu> | ||
| 112 | |||
| 113 | * Version 19.31 released. | ||
| 114 | |||
| 115 | 1996-03-31 Richard Stallman <rms@mole.gnu.ai.mit.edu> | ||
| 116 | |||
| 117 | * lwlib-Xm.c (destroy_all_children): When freeing a cascade button, | ||
| 118 | free its submenu too. | ||
| 119 | (make_menu_in_widget): Use a cascade button gadget, not a widget. | ||
| 120 | Include Xm/CascadeBG.h. | ||
| 121 | |||
| 122 | 1996-03-29 Richard Stallman <rms@mole.gnu.ai.mit.edu> | ||
| 123 | |||
| 124 | * Makefile.in (tags): New target. | ||
| 125 | |||
| 126 | 1996-03-28 Richard Stallman <rms@mole.gnu.ai.mit.edu> | ||
| 127 | |||
| 128 | * Makefile.in (TAGS): Renamed from `tags' and fixed to work. | ||
| 129 | |||
| 130 | 1996-03-26 Richard Stallman <rms@mole.gnu.ai.mit.edu> | ||
| 131 | |||
| 132 | * Makefile.in (xlwmenu.o): New explicit target. | ||
| 133 | |||
| 134 | 1996-03-24 Richard Stallman <rms@mole.gnu.ai.mit.edu> | ||
| 135 | |||
| 136 | * lwlib.h (struct widget_value): New field this_one_change. | ||
| 137 | * lwlib.c (merge_widget_value): Set the this_one_change field. | ||
| 138 | * lwlib-Xm.c (destroy_all_children): New arg first_child_to_destroy. | ||
| 139 | (make_menu_in_widget): New arg keep_first_children. | ||
| 140 | (xm_update_menu): Preserve the first children even if later ones | ||
| 141 | have a structural change. | ||
| 142 | (update_one_menu_entry): Use this_one_change field. | ||
| 143 | |||
| 144 | 1996-03-01 Richard Stallman <rms@mole.gnu.ai.mit.edu> | ||
| 145 | |||
| 146 | * xlwmenu.c (motion_event_is_in_menu): Make x and y signed. | ||
| 147 | |||
| 148 | 1996-02-25 Richard Stallman <rms@mole.gnu.ai.mit.edu> | ||
| 149 | |||
| 150 | * lwlib.c (lw_window_is_in_menubar) [USE_MOTIF]: | ||
| 151 | With Motif, the window WIN can be the menu bar widget itself. | ||
| 152 | |||
| 153 | 1996-02-21 Richard Stallman <rms@whiz-bang.gnu.ai.mit.edu> | ||
| 154 | |||
| 155 | * lwlib.c (free_widget_value_tree, merge_widget_value): | ||
| 156 | Use XtFree for the toolkit_data. | ||
| 157 | |||
| 158 | 1996-02-19 Karl Heuer <kwzh@gnu.ai.mit.edu> | ||
| 159 | |||
| 160 | * lwlib.c (lw_internal_update_other_instances): Move static var | ||
| 161 | outside the function, and rename it to lwlib_updating. | ||
| 162 | |||
| 163 | 1996-01-04 Paul Eggert <eggert@twinsun.com> | ||
| 164 | |||
| 165 | * lwlib.c (instantiate_widget_instance): Renamed from | ||
| 166 | instanciate_widget_instance (spelling correction). | ||
| 167 | All callers changed. | ||
| 168 | |||
| 169 | 1995-12-31 Richard Stallman <rms@mole.gnu.ai.mit.edu> | ||
| 170 | |||
| 171 | * xlwmenu.c (xlwMenuActionsList): Add "key" and "nothing". | ||
| 172 | (xlwMenuTranslations): Add translations for Key, KeyUp, | ||
| 173 | and for the modifier keysyms. | ||
| 174 | (Nothing, Key): New functions. | ||
| 175 | |||
| 176 | 1995-12-24 Richard Stallman <rms@mole.gnu.ai.mit.edu> | ||
| 177 | |||
| 178 | * xlwmenu.c (XlwMenuSetValues): Do redisplay if non-null contents | ||
| 179 | get replaced by empty contents. | ||
| 180 | |||
| 181 | * lwlib.c (merge_widget_value): Treat disappearance of entire contents | ||
| 182 | as a STRUCTURAL_CHANGE. | ||
| 183 | |||
| 184 | 1995-12-20 Richard Stallman <rms@whiz-bang.gnu.ai.mit.edu> | ||
| 185 | |||
| 186 | * lwlib-utils.c: Add #undef for index and rindex. | ||
| 187 | |||
| 188 | 1995-11-24 Richard Stallman <rms@mole.gnu.ai.mit.edu> | ||
| 189 | |||
| 190 | * Version 19.30 released. | ||
| 191 | |||
| 192 | 1995-11-13 Richard Stallman <rms@mole.gnu.ai.mit.edu> | ||
| 193 | |||
| 194 | * xlwmenu.c (display_menu_item): Fix previous change. | ||
| 195 | |||
| 196 | 1995-11-04 Richard Stallman <rms@whiz-bang.gnu.ai.mit.edu> | ||
| 197 | |||
| 198 | * xlwmenu.c (display_menu_item): Don't treat buttons specially. | ||
| 199 | |||
| 200 | 1995-08-14 Richard Stallman <rms@mole.gnu.ai.mit.edu> | ||
| 201 | |||
| 202 | * Makefile.in (RANLIB): Get this var from configure. | ||
| 203 | |||
| 204 | 1995-08-02 Richard Stallman <rms@mole.gnu.ai.mit.edu> | ||
| 205 | |||
| 206 | * lwlib.c (lw_popup_menu): New arg `event', passed along. | ||
| 207 | * lwlib-Xlw.c (xlw_popup_menu): New arg `event'. | ||
| 208 | * lwlib-Xm.c (xm_popup_menu): New arg `event'. | ||
| 209 | |||
| 210 | 1995-06-19 Richard Stallman <rms@mole.gnu.ai.mit.edu> | ||
| 211 | |||
| 212 | * Version 19.29 released. | ||
| 213 | |||
| 214 | 1995-06-11 Richard Stallman <rms@gnu.ai.mit.edu> | ||
| 215 | |||
| 216 | * lwlib.c (lwlib_toolkit_type): New variable. | ||
| 217 | |||
| 218 | 1995-05-26 Richard Stallman <rms@gnu.ai.mit.edu> | ||
| 219 | |||
| 220 | * xlwmenu.c (Drag): Do nothing unless menu.popped_up field is set. | ||
| 221 | |||
| 222 | 1995-05-22 Karl Heuer <kwzh@hal.gnu.ai.mit.edu> | ||
| 223 | |||
| 224 | * xlwmenu.c (XlwMenuInitialize): Cast XCreatePixmapFromBitmapData args. | ||
| 225 | |||
| 226 | 1995-05-20 Karl Heuer <kwzh@nutrimat.gnu.ai.mit.edu> | ||
| 227 | |||
| 228 | * lwlib.c: Don't use prototype. | ||
| 229 | * lwlib-Xm.c (activate_button, xm_update_cascadebutton): Likewise. | ||
| 230 | |||
| 231 | 1995-05-05 Richard Stallman <rms@mole.gnu.ai.mit.edu> | ||
| 232 | |||
| 233 | * lwlib.c (lw_refigure_widget) [USE_MOTIF]: Fix backward if. | ||
| 234 | |||
| 235 | 1995-05-04 Richard Stallman <rms@mole.gnu.ai.mit.edu> | ||
| 236 | |||
| 237 | * Makefile.in (ALL_CFLAGS): Add -I../src. | ||
| 238 | |||
| 239 | 1995-05-03 Morten Welinder <terra+@cs.cmu.edu> | ||
| 240 | |||
| 241 | * lwlib.c [__osf__]: Include string.h and stdlib.h. | ||
| 242 | [__osf__] (xmalloc): Declared. | ||
| 243 | |||
| 244 | 1995-04-13 Richard Stallman <rms@mole.gnu.ai.mit.edu> | ||
| 245 | |||
| 246 | * lwlib-Xm.c (update_one_menu_entry, make_menu_in_widget): | ||
| 247 | Specify more useful names in XmCreatePulldownMenu calls. | ||
| 248 | |||
| 249 | * lwlib-Xaw.c (xaw_pop_instance): Make x, y, w, h unsigned. | ||
| 250 | |||
| 251 | * xlwmenu.c (size_menu): Make height and label_width unsigned. | ||
| 252 | (fit_to_screen): Make screen_width and screen_height unsigned. | ||
| 253 | (motion_event_is_in_menu): Make x, y unsigned. | ||
| 254 | |||
| 255 | 1995-04-09 Richard Stallman <rms@mole.gnu.ai.mit.edu> | ||
| 256 | |||
| 257 | * lwlib-utils.c: If HAVE_CONFIG_H, include config.h. | ||
| 258 | |||
| 259 | * Makefile.in (ALL_CFLAGS): Define HAVE_CONFIG_H. | ||
| 260 | Add -I${srcdir}/../src. | ||
| 261 | |||
| 262 | 1995-04-08 Paul Reilly <pmr@geech.gnu.ai.mit.edu> | ||
| 263 | |||
| 264 | * lwlib-Xm.c: Remove function prototypes. | ||
| 265 | (xm_pop_down_callback): Call the deactivation callback only when | ||
| 266 | popping down the top level submenu. | ||
| 267 | |||
| 268 | 1995-04-07 Richard Stallman <rms@mole.gnu.ai.mit.edu> | ||
| 269 | |||
| 270 | * Makefile.in (lwlib.o): Depend on Makefile. | ||
| 271 | |||
| 272 | * lwlib-Xm.h: Remove function prototypes. | ||
| 273 | |||
| 274 | * lwlib-Xm.c (remove_grabs): Use type Widget for `menu'. | ||
| 275 | |||
| 276 | 1995-02-15 Paul Reilly <pmr@geech.gnu.ai.mit.edu> | ||
| 277 | |||
| 278 | * Makefile.in (ALL_CFLAGS): Allow include files to be found in | ||
| 279 | `srcdir'. | ||
| 280 | |||
| 281 | 1995-02-07 Richard Stallman <rms@pogo.gnu.ai.mit.edu> | ||
| 282 | |||
| 283 | * Makefile.in (maintainer-clean): Renamed from realclean. | ||
| 284 | |||
| 285 | 1994-11-28 Richard Stallman <rms@bethel> | ||
| 286 | |||
| 287 | * lwlib-int.h (safe_strdup): Don't use ANSI argument prototype. | ||
| 288 | |||
| 289 | 1994-11-15 Paul Reilly <pmr@duality.gnu.ai.mit.edu> | ||
| 290 | |||
| 291 | * lwlib.c (lw_refigure_widget): Use the macro USE_XAW rather than XAW. | ||
| 292 | |||
| 293 | 1994-11-08 Paul Reilly <pmr@duality.gnu.ai.mit.edu> | ||
| 294 | |||
| 295 | * lwlib-Xm.c (make_menu_in_widget): Differentiate a separator | ||
| 296 | entry ("--") from a title. | ||
| 297 | (xm_pop_down_callback): Filter all but the last pop down callbacks. | ||
| 298 | |||
| 299 | 1994-11-07 Paul Reilly <pmr@duality.gnu.ai.mit.edu> | ||
| 300 | |||
| 301 | * lwlib-Xm.c (update_one_menu_entry): Use the parent of the | ||
| 302 | cascade button as the parent of the pulldown, rather than the | ||
| 303 | cascade button itself. This works around a Motif SIGSEGV in the | ||
| 304 | function `InSharedMenuHierarchy'. | ||
| 305 | |||
| 306 | 1994-10-29 Richard Stallman <rms@duality.gnu.ai.mit.edu> | ||
| 307 | |||
| 308 | * xlwmenu.c (xlwmenu_default_font): New global variable. | ||
| 309 | (XlwMenuInitialize): Use xlwmenu_default_font to default | ||
| 310 | the font if necessary. Make mw, itself, an argument. | ||
| 311 | |||
| 312 | 1994-10-26 Richard Stallman <rms@duality.gnu.ai.mit.edu> | ||
| 313 | |||
| 314 | * xlwmenu.c (pop_up_menu): Pass a Display * to x_catch_errors, etc. | ||
| 315 | |||
| 316 | 1994-10-26 Richard Stallman <rms@mole.gnu.ai.mit.edu> | ||
| 317 | |||
| 318 | * xlwmenu.c (xlwmenu_default_font): New global variable. | ||
| 319 | (XlwMenuInitialize): Use xlwmenu_default_font to default | ||
| 320 | the font if necessary. Make mw, itself, an argument. | ||
| 321 | |||
| 322 | * xlwmenu.c (pop_up_menu): Pass a Display * to x_catch_errors, etc. | ||
| 323 | |||
| 324 | 1994-10-08 Richard Stallman <rms@mole.gnu.ai.mit.edu> | ||
| 325 | |||
| 326 | * xlwmenu.c (fit_to_screen): Don't put the menu off the left or top. | ||
| 327 | |||
| 328 | 1994-10-02 Paul Reilly <pmr@geech.gnu.ai.mit.edu> | ||
| 329 | |||
| 330 | * xlwmenu.c (display_menu_item): Add support for displaying the | ||
| 331 | title in pop up menus. | ||
| 332 | |||
| 333 | * lwlib.c (lw_set_main_areas): Use xm_set_main_areas(). | ||
| 334 | (lw_manage_resizing): Use xm_manage_resizing() for Emacs/Motif. | ||
| 335 | |||
| 336 | 1994-09-25 Paul Reilly <pmr@geech.gnu.ai.mit.edu> | ||
| 337 | |||
| 338 | * lwlib-Xaw.c (xaw_create_main): New function to support the | ||
| 339 | toolkit independent creation of the main Emacs widget. * | ||
| 340 | lwlib-Xlw.c (xlw_create_menubar): When compiling under Emacs, set | ||
| 341 | resizing resources to disable showGrip and to enable both | ||
| 342 | resizeToPreferred and allowShellResize. | ||
| 343 | |||
| 344 | * lwlib-Xm.h: Declare xm_set_main_areas, xm_manage_resizing. | ||
| 345 | |||
| 346 | * lwlib-Xm.c: (make_menu_in_widget): Add support for displaying a | ||
| 347 | title in pop up menus. | ||
| 348 | (make_main, xm_set_main_areas, xm_manage_resizing): New functions to | ||
| 349 | create and manage a Motif Main Window widget. | ||
| 350 | |||
| 351 | * xlwmenu.c: Add #include <X11/ObjectP.h> for X11R4. | ||
| 352 | |||
| 353 | 1994-09-18 Fred Pierresteguy <F.Pierresteguy@frcl.bull.fr> | ||
| 354 | |||
| 355 | * lwlib-Xm.c (make_dialog): When there is more than two pushbuttons, | ||
| 356 | set XmPACK_TIGHT and XmHORIZONTAL to the rowcolumn. Also add a | ||
| 357 | margin of 10 pixels. | ||
| 358 | |||
| 359 | 1994-09-16 Paul Reilly <pmr@geech.gnu.ai.mit.edu> | ||
| 360 | |||
| 361 | * lwlib-Xm.c (make_main): New function to support toolkit | ||
| 362 | independent creation of the main Emacs widget. | ||
| 363 | (make_destroyed_instance): Use safe_strdup() instead of strdup(). | ||
| 364 | |||
| 365 | * lwlib-int.h: Declare safe_strdup. | ||
| 366 | |||
| 367 | * lwlib.c (lw_refigure_widget): New function. Handle geometry | ||
| 368 | management inside lwlib instead of in Emacs. | ||
| 369 | (lw_window_is_in_menubar): New function. Determine if the pointer | ||
| 370 | is in a menubar. | ||
| 371 | (lw_set_main_areas): New function. Set the main window widgets for | ||
| 372 | Motif. | ||
| 373 | |||
| 374 | * lwlib.h: Declare lw_refigure_widget(), lw_window_is_in_menubar(), | ||
| 375 | lw_set_main_areas(). | ||
| 376 | |||
| 377 | * xlwmenu.h: Define Xt{Ns,CS}howGrip, Xt{Nr,CR}esizeToPreferred, and | ||
| 378 | Xt{Na,CA}llowResize. | ||
| 379 | |||
| 380 | * xlwmenu.c (Start): Use pop_up_menu() to post the submenus. | ||
| 381 | (Select): Remove the pointer grab when popping down a menubar | ||
| 382 | submenu. | ||
| 383 | (pop_up_menu): Handle popping up submenus from a menubar, i.e. when | ||
| 384 | the menu widget parent is not a shell widget. | ||
| 385 | |||
| 386 | 1994-08-25 Richard Stallman <rms@mole.gnu.ai.mit.edu> | ||
| 387 | |||
| 388 | * xlwmenu.c (pop_up_menu): Clear next_release_must_exit. | ||
| 389 | (Start): Clear next_release_must_exit when popping up the menu. | ||
| 390 | |||
| 391 | 1994-08-24 Richard Stallman <rms@mole.gnu.ai.mit.edu> | ||
| 392 | |||
| 393 | * xlwmenu.c (Start): Set menu_post_event or next_release_must_exit. | ||
| 394 | (Select): Do nothing if the menu should be left posted. | ||
| 395 | |||
| 396 | 1994-07-28 Richard Stallman <rms@mole.gnu.ai.mit.edu> | ||
| 397 | |||
| 398 | * xlwmenu.c (make_windows_if_needed, pop_up_menu): | ||
| 399 | Enable mouse motion events even when no button down. | ||
| 400 | |||
| 401 | 1994-07-11 Richard Stallman (rms@mole.gnu.ai.mit.edu) | ||
| 402 | |||
| 403 | * xlwmenu.c (pointer_grabbed): New variable. | ||
| 404 | (pop_up_menu): Set the variable. | ||
| 405 | (XlwMenuDestroy): Maybe call XtUngrabPointer. | ||
| 406 | |||
| 407 | 1994-05-25 Richard Stallman (rms@mole.gnu.ai.mit.edu) | ||
| 408 | |||
| 409 | * lwlib.c (max): Function deleted. Define as macro instead, | ||
| 410 | but only if not already defined. | ||
| 411 | |||
| 412 | 1994-05-20 Richard Stallman (rms@mole.gnu.ai.mit.edu) | ||
| 413 | |||
| 414 | * xlwmenu.c (xlwMenuResources): Use XtRDimension for shadow thickness. | ||
| 415 | |||
| 416 | 1994-05-19 Richard Stallman (rms@mole.gnu.ai.mit.edu) | ||
| 417 | |||
| 418 | * lwlib-Xaw.c (xaw_pop_instance): Use XtSetValues, not XtMoveWidget. | ||
| 419 | |||
| 420 | 1994-05-16 Richard Stallman (rms@mole.gnu.ai.mit.edu) | ||
| 421 | |||
| 422 | * lwlib.c (lwlib_memset: New function, used instead of memset. | ||
| 423 | All callers changed. | ||
| 424 | * lwlib.c (lwlib_bcopy): New function. | ||
| 425 | * lwlib-utils.c (XtApplyToWidgets): Use lwlib_bcopy. | ||
| 426 | |||
| 427 | * lwlib.c: Delete definitions for use of alloca. | ||
| 428 | (name_to_widget): Use xmalloc, not alloca. | ||
| 429 | |||
| 430 | 1994-05-12 Richard Stallman (rms@mole.gnu.ai.mit.edu) | ||
| 431 | |||
| 432 | * xlwmenu.c (XlwMenuDestroy): Set new var submenu_destroyed. | ||
| 433 | (XlwMenuRedisplay): If it's set, truncate the old_depth to 1. | ||
| 434 | |||
| 435 | 1994-05-09 Richard Stallman (rms@mole.gnu.ai.mit.edu) | ||
| 436 | |||
| 437 | * xrdb-cpp.c: Don't include string.h, unistd.h, stdlib.h. | ||
| 438 | * lwlib-Xaw.c: Don't include string.h, unistd.h, stdlib.h. | ||
| 439 | * lwlib-utils.c (XtApplyToWidgets): Use bcopy, not memcpy. | ||
| 440 | * lwlib-utils.c: Don't include string.h, unistd.h, stdlib.h, memory.h. | ||
| 441 | * xlwmenu.c: Don't include string.h, unistd.h, stdlib.h. | ||
| 442 | * lwlib.c: Don't include string.h, unistd.h, stdlib.h. | ||
| 443 | (safe_strdup): No longer static. | ||
| 444 | * lwlib-Xm.c: Use safe_strdup, not strdup. | ||
| 445 | |||
| 446 | * xlwmenu.c (string_width): No longer static. | ||
| 447 | |||
| 448 | 1994-05-06 Richard Stallman (rms@mole.gnu.ai.mit.edu) | ||
| 449 | |||
| 450 | * xlwmenuP.h (struct _XlwMenu_part): Use Pixel and Cursor | ||
| 451 | for foreground and cursor_shape fields. | ||
| 452 | |||
| 453 | * xlwmenu.c (XlwMenuSetValues): Check for change of font. | ||
| 454 | |||
| 455 | 1994-04-28 Richard Stallman (rms@mole.gnu.ai.mit.edu) | ||
| 456 | |||
| 457 | * Makefile.in: Delete all SRCS variables (unused). | ||
| 458 | (lwlib.o, xrdb-cpp.o): Mention srcdir in dep. | ||
| 459 | |||
| 460 | 1994-04-15 Richard Stallman (rms@mole.gnu.ai.mit.edu) | ||
| 461 | |||
| 462 | * Makefile.in (ALL_CFLAGS): Don't define THIS_IS_X11R4. | ||
| 463 | |||
| 464 | * xrdb.c: Define HAVE_X11R5 as in xterm.h. | ||
| 465 | Include X11/Xlib.h, X11/cursorfont.h and X11/Xutil.h. | ||
| 466 | (_XtDisplayInitialize): Test HAVE_X11R5. | ||
| 467 | |||
| 468 | * dispatch.c: Define HAVE_X11R5 as in xterm.h. | ||
| 469 | Include X11/Xlib.h, X11/cursorfont.h and X11/Xutil.h. | ||
| 470 | (_XtConvertTypeToMask): Conditionalize on HAVE_X11R5. | ||
| 471 | (WouldDispatchEvent): Likewise. | ||
| 472 | |||
| 473 | 1994-04-12 Richard Stallman (rms@mole.gnu.ai.mit.edu) | ||
| 474 | |||
| 475 | * lwlib-Xaw.c (xaw_generic_callback): Declare without arg names. | ||
| 476 | |||
| 477 | 1994-04-01 Frederic Pierresteguy (fp@hal.gnu.ai.mit.edu) | ||
| 478 | |||
| 479 | * lwlib-Xaw.c (make_dialog): Don't allow any geometry request from the | ||
| 480 | user. | ||
| 481 | |||
| 482 | 1994-03-22 Frederic Pierresteguy (fp@mole.gnu.ai.mit.edu) | ||
| 483 | |||
| 484 | * xlwmenu.c (XlwMenuResize): Don't allow the popup menu to resize | ||
| 485 | itself. Therefore reset the size to its initial value. | ||
| 486 | |||
| 487 | 1994-03-19 Richard Stallman (rms@mole.gnu.ai.mit.edu) | ||
| 488 | |||
| 489 | * lwlib-Xaw.c (xaw_update_one_widget): Finish replacing XtVaSetValues. | ||
| 490 | Don't test for scrollbar widget. | ||
| 491 | |||
| 492 | 1994-03-14 Frederic Pierresteguy (fp@gnu.ai.mit.edu) | ||
| 493 | |||
| 494 | * lwlib-int.h: Declare lw_get_widget_info. | ||
| 495 | |||
| 496 | * lwlib.c (lw_get_widget_info): Comment out arg in function decl. | ||
| 497 | |||
| 498 | * lwlib-Xaw.h: Comment out args in function decls. | ||
| 499 | * lwlib-Xaw.c: Convert all function definitions to non-prototype K&R. | ||
| 500 | (xaw_update_one_widget - case dialogWidgetClass): Call XtSetValues, | ||
| 501 | not XtVaSetValues. | ||
| 502 | |||
| 503 | 1994-03-11 Frederic Pierresteguy (F.Pierresteguy@frcl.bull.fr) | ||
| 504 | |||
| 505 | * xlwmenu.c (display_menu_item): Modify parameters to draw_arrow to | ||
| 506 | right justify the arrow in the pane. | ||
| 507 | |||
| 508 | * lwlib.c: If not defined USE_MOTIF and defined USE_LUCID then | ||
| 509 | define USE_XAW. | ||
| 510 | |||
| 511 | * Makefile.in (LUCID_SRCS, LUCID_OBJS): Add the target lwlib-Xaw.[oc]. | ||
| 512 | |||
| 513 | * lwlib.c, lwlib-int.h: Merged from Lucid 19.9 release. | ||
| 514 | * lwlib.c (_AIX): Replace the AIXV3 directive. | ||
| 515 | (USE_XAW): New macro to conditionalize the use of the athena toolkit. | ||
| 516 | (lw_get_widget_info): New function. | ||
| 517 | (set_one_value): Handle USE_XAW. | ||
| 518 | (instanciate_widget_instance): Likewise. | ||
| 519 | (destroy_one_instance): Likewise. | ||
| 520 | (lw_pop_all_widgets): Likewise. | ||
| 521 | (lw_pop_down_all_widgets): Likewise. | ||
| 522 | (get_one_value): Likewise. | ||
| 523 | |||
| 524 | * lwlib-Xaw.c, lwlib-Xaw.h: New files. | ||
| 525 | |||
| 526 | 1994-02-23 Richard Stallman (rms@mole.gnu.ai.mit.edu) | ||
| 527 | |||
| 528 | * xlwmenu.c (XlwMenuInitialize, XlwMenuDestroy): Undo previous changes. | ||
| 529 | |||
| 530 | * lwlib-Xlw.c (xlw_create_menubar, xlw_create_popup_menu): | ||
| 531 | Use XtCreate..., not XtVaCreate... | ||
| 532 | No need to copy instance->info->val any more. | ||
| 533 | (xlw_update_one_widget): Use XtSetValues, not XtVaSetValues. | ||
| 534 | |||
| 535 | 1994-02-21 Richard Stallman (rms@mole.gnu.ai.mit.edu) | ||
| 536 | |||
| 537 | * xlwmenu.c (pop_up_menu): Call XtUngrabPointer if XtGrabPointer fails. | ||
| 538 | |||
| 539 | 1994-02-19 Richard Stallman (rms@mole.gnu.ai.mit.edu) | ||
| 540 | |||
| 541 | * Makefile.in (xrdb-cpp.o, lwlib.o): Put ALL_CFLAGS after other flags. | ||
| 542 | |||
| 543 | * lwlib-Xlw.c (xlw_create_menubar): Don't call free_widget_value. | ||
| 544 | Use malloc for allocation. | ||
| 545 | (xlw_create_popup_menu): Likewise. | ||
| 546 | |||
| 547 | 1994-02-18 Frederic Pierresteguy (fp@mole.gnu.ai.mit.edu) | ||
| 548 | |||
| 549 | * lwlib.c (malloc_cpt): New static variable. | ||
| 550 | (malloc_widget_value): Increment malloc_cpt when allocating a cell. | ||
| 551 | (free_widget_value): Really free the cells when the number of | ||
| 552 | allocated ones is bigger than 25. | ||
| 553 | |||
| 554 | * lwlib-Xlw.c (xlw_create_menubar): Call malloc_widget_value and | ||
| 555 | free_widget_value instead of XtMalloc and XtFree. | ||
| 556 | (xlw_create_popup_menu): Likewise. | ||
| 557 | |||
| 558 | 1994-02-17 Richard Stallman (rms@mole.gnu.ai.mit.edu) | ||
| 559 | |||
| 560 | * Makefile.in (ALL_CFLAGS): Specify -Demacs. | ||
| 561 | |||
| 562 | * xlwmenu.c (pop_up_menu) [emacs]: Catch and ignore X protocol errors | ||
| 563 | in XtGrabPointer. | ||
| 564 | |||
| 565 | 1994-02-17 Frederic Pierresteguy (fp@mole.gnu.ai.mit.edu) | ||
| 566 | |||
| 567 | * lwlib-Xlw.c (xlw_create_popup_menu): Pass tem to | ||
| 568 | XtVaCreateManagedWidget, not instance->info->val. | ||
| 569 | (xlw_create_menubar): Likewise. | ||
| 570 | |||
| 571 | 1994-02-15 Frederic Pierresteguy (fp@mole.gnu.ai.mit.edu) | ||
| 572 | |||
| 573 | * lwlib-Xlw.c (xlw_create_popup_menu): Copy instance->info->val | ||
| 574 | before calling XtVaCreateManagedWidget and then free the copy. | ||
| 575 | (xlw_create_menubar): Likewise. | ||
| 576 | |||
| 577 | 1994-02-11 Richard Stallman (rms@mole.gnu.ai.mit.edu) | ||
| 578 | |||
| 579 | * xlwmenu.c (XlwMenuInitialize): Copy mw->menu.contents. | ||
| 580 | (XlwMenuDestroy): Free mw->menu.contents. | ||
| 581 | |||
| 582 | 1994-02-09 Frederic Pierresteguy (fp@mole.gnu.ai.mit.edu) | ||
| 583 | |||
| 584 | * xlwmenu.c (display_menu_item): Call draw_shadow_rectangle to make | ||
| 585 | visible/invisible the selection of the menubar items. | ||
| 586 | |||
| 587 | 1994-02-08 Roland McGrath (roland@churchy.gnu.ai.mit.edu) | ||
| 588 | |||
| 589 | * lwlib.c (strcasecmp): Renamed to my_strcasecmp. | ||
| 590 | (find_in_table): Changed only caller. | ||
| 591 | |||
| 592 | 1994-02-04 Frederic Pierresteguy (fp@mole.gnu.ai.mit.edu) | ||
| 593 | |||
| 594 | * xlwmenu.c (display_menu_item): When dealing with the menubar, | ||
| 595 | always call XDrawRectangle to clear the selection after popping down | ||
| 596 | the pulldown menu. | ||
| 597 | |||
| 598 | 1994-02-01 Richard Stallman (rms@mole.gnu.ai.mit.edu) | ||
| 599 | |||
| 600 | * lwlib.c: Include ctype.h. | ||
| 601 | |||
| 602 | 1994-01-31 Richard Stallman (rms@mole.gnu.ai.mit.edu) | ||
| 603 | |||
| 604 | * lwlib.c (strcasecmp): New function. | ||
| 605 | |||
| 606 | 1994-01-30 Richard Stallman (rms@mole.gnu.ai.mit.edu) | ||
| 607 | |||
| 608 | * xlwmenu.c, lwlib.c, lwlib-Xlw.c, lwlib-utils.c: | ||
| 609 | Convert all function definitions to non-prototype K&R. | ||
| 610 | |||
| 611 | * lwlib-Xlw.h: Comment out args in function decls. | ||
| 612 | * lwlib.h: Comment out args in function decls. | ||
| 613 | * lwlib-utils.h: Comment out args in function decls. | ||
| 614 | |||
| 615 | 1994-01-29 Richard Stallman (rms@mole.gnu.ai.mit.edu) | ||
| 616 | |||
| 617 | * lwlib.c: Include StringDefs.h after lwlib.h. | ||
| 618 | |||
| 619 | 1994-01-22 Roland McGrath (roland@churchy.gnu.ai.mit.edu) | ||
| 620 | |||
| 621 | * Makefile (xrdb-cpp.o, lwlib.o): Use $(srcdir) and file name | ||
| 622 | instead of $*. | ||
| 623 | (dispatch.o, xrdb.o, lwlib-Xm.o): Rules removed; they were | ||
| 624 | superfluous and didn't work when configured outside srcdir. The | ||
| 625 | implicit .c.o rule works fine. | ||
| 626 | |||
| 627 | 1994-01-21 Richard Stallman (rms@mole.gnu.ai.mit.edu) | ||
| 628 | |||
| 629 | * xlwmenu.c (resource_widget_value): Avoid using strdup. | ||
| 630 | |||
| 631 | 1994-01-18 Richard Stallman (rms@mole.gnu.ai.mit.edu) | ||
| 632 | |||
| 633 | * Makefile.in: New file. | ||
| 634 | |||
| 635 | * lwlib-Xolmb.c: Renamed from lwlib-Xol-mb.c. | ||
| 636 | * lwlib-Xolmb.h: Renamed from lwlib-Xol-mb.h. | ||
| 637 | * lwlib-XolmbP.h: Renamed from lwlib-Xol-mbP.h. | ||
| 638 | |||
| 639 | * lwlib-int.h: Renamed from lwlib-internal.h. | ||
| 640 | |||
| 641 | |||
| 642 | |||
diff --git a/lwlib/Imakefile b/lwlib/Imakefile new file mode 100644 index 00000000000..86f2bc15f89 --- /dev/null +++ b/lwlib/Imakefile | |||
| @@ -0,0 +1,244 @@ | |||
| 1 | /**/# Imakefile file for liblw.a, Copyright (c) 1992-1993 Lucid, Inc. | ||
| 2 | |||
| 3 | /* | ||
| 4 | * If you have Motif and want to provide support for Motif widgets in lwlib, | ||
| 5 | * then define USE_MOTIF. | ||
| 6 | * | ||
| 7 | * If you have OpenLook and want to provide support for OpenLook widgets in | ||
| 8 | * lwlib, then define USE_OLIT. | ||
| 9 | * | ||
| 10 | * Otherwise, define USE_LUCID to use Lucid's own Motif-lookalike widgets, | ||
| 11 | * which are included in this directory. | ||
| 12 | * | ||
| 13 | * You cannot define USE_MOTIF and USE_OLIT at the same time, but USE_LUCID | ||
| 14 | * may be defined along with either of the other two. | ||
| 15 | * | ||
| 16 | * The OLIT menubar is slow, and possibly buggy. We recommend against using | ||
| 17 | * it unless you'd like to try to improve it (which we encourage.) | ||
| 18 | * | ||
| 19 | * The Lucid menubar is much faster than the Motif menubar, but is missing | ||
| 20 | * a few features (most notably stay-up menus and keyboard traversal.) But | ||
| 21 | * since it has the Motif look-and-feel, we recommend using it even if you | ||
| 22 | * have Motif. | ||
| 23 | * | ||
| 24 | * Currently, only the Motif widgets provide support for dialog boxes. If | ||
| 25 | * you don't have Motif, you will not be able to pop up dialog boxes from | ||
| 26 | * emacs. If you define both USE_LUCID and USE_MOTIF, then the menus will | ||
| 27 | * be implemented with Lucid widgets, and the dialog boxes will be | ||
| 28 | * implemented with Motif widgets. | ||
| 29 | * | ||
| 30 | * It shouldn't take much work to add support for non-Motif dialog boxes; | ||
| 31 | * all that one need do is add code that implements Athena versions of the | ||
| 32 | * xm_create_dialog(), xm_update_one_widget(), and xm_update_one_value() | ||
| 33 | * routines in lwlib-Xm.c. If you do this, please send us the code. | ||
| 34 | * | ||
| 35 | * If you have your X11 source tree online, then you should define | ||
| 36 | * INCLUDE_EXTENSIONS to cause this library to contain some useful functions | ||
| 37 | * which Xt should provide but doesn't. You can only do this if you have | ||
| 38 | * the source tree online, because these functions require access to internal | ||
| 39 | * Xt data structures that are not defined in the exported header files. | ||
| 40 | * If you define INCLUDE_EXTENSIONS, then the variable $TOP must point at the | ||
| 41 | * root of the X11 source tree. | ||
| 42 | * | ||
| 43 | * To build a "shared" version of lwlib as well, define BUILD_SHARED_LIB. | ||
| 44 | * If INCLUDE_EXTENSIONS is defined, and you want to link with a dynamic | ||
| 45 | * version of Xt, it may be necessary to build a shared version of lwlib as | ||
| 46 | * well, as the X libraries sometimes put *different code* in the dynamic | ||
| 47 | * and shared versions of their libraries, for some reason I don't understand. | ||
| 48 | * | ||
| 49 | * Remember, if you build and install a shared version of lwlib, you may need | ||
| 50 | * to run ldconfig(8) before anything will realize that it exists. | ||
| 51 | * | ||
| 52 | * To compile with support for Lucid's Energize Programming System, you must | ||
| 53 | * define all of ENERGIZE, USE_LUCID, USE_MOTIF, and INCLUDE_EXTENSIONS. | ||
| 54 | */ | ||
| 55 | |||
| 56 | #define USE_LUCID | ||
| 57 | /* #define USE_MOTIF */ | ||
| 58 | /* #define USE_OLIT */ | ||
| 59 | /* #define BUILD_SHARED_LIB */ | ||
| 60 | /* #define ENERGIZE */ | ||
| 61 | |||
| 62 | /* #define INCLUDE_EXTENSIONS */ | ||
| 63 | |||
| 64 | |||
| 65 | #ifdef INCLUDE_EXTENSIONS /* this is where it is at our site */ | ||
| 66 | TOP = /$(WHICH_X)/mit | ||
| 67 | #endif | ||
| 68 | |||
| 69 | /* | ||
| 70 | * | ||
| 71 | * You shouldn't need to edit anything below this point. | ||
| 72 | * | ||
| 73 | */ | ||
| 74 | |||
| 75 | #ifdef ENERGIZE | ||
| 76 | # if !defined(USE_LUCID) || !defined(USE_MOTIF) || !defined(INCLUDE_EXTENSIONS) | ||
| 77 | ERROR! Energize requires Lucid widgets, Motif, and X Extensions. | ||
| 78 | # endif | ||
| 79 | #endif /* ENERGIZE */ | ||
| 80 | |||
| 81 | |||
| 82 | #ifdef BUILD_SHARED_LIB | ||
| 83 | SOLWREV=1.0 | ||
| 84 | #endif | ||
| 85 | |||
| 86 | #if (ProjectX == 4) | ||
| 87 | STD_DEFINES = LibraryDefines | ||
| 88 | CDEBUGFLAGS = LibraryCDebugFlags | ||
| 89 | EXT_DEFINES = -DTHIS_IS_X11R4 | ||
| 90 | WHICH_X = x11r4 | ||
| 91 | #define SpecialLibObjectRule SpecialObjectRule | ||
| 92 | #else /* !4 */ | ||
| 93 | #if (ProjectX == 5) | ||
| 94 | #ifdef BUILD_SHARED_LIB | ||
| 95 | # define DoSharedLib YES | ||
| 96 | # define DoNormalLib YES | ||
| 97 | #endif | ||
| 98 | #include <Library.tmpl> | ||
| 99 | EXT_DEFINES = -DTHIS_IS_X11R5 -DINCLUDE_ALLOCA_H | ||
| 100 | WHICH_X = x11r5 | ||
| 101 | #else /* !5 */ | ||
| 102 | EXT_DEFINES = "ERROR! Imakefile was unable to determine whether this is X11r4 or X11r5." | ||
| 103 | #endif /* !5 */ | ||
| 104 | #endif /* !4 */ | ||
| 105 | |||
| 106 | LUCID_SRCS = lwlib-Xlw.c xlwmenu.c | ||
| 107 | LUCID_OBJS = lwlib-Xlw.o xlwmenu.o | ||
| 108 | MOTIF_SRCS = lwlib-Xm.c | ||
| 109 | MOTIF_OBJS = lwlib-Xm.o | ||
| 110 | OLIT_SRCS = lwlib-Xol.c lwlib-Xol-mb.c | ||
| 111 | OLIT_OBJS = lwlib-Xol.o lwlib-Xol-mb.o | ||
| 112 | |||
| 113 | #ifdef INCLUDE_EXTENSIONS | ||
| 114 | EXT_SRCS = dispatch.c xrdb-cpp.c xrdb.c | ||
| 115 | EXT_OBJS = dispatch.o xrdb-cpp.o xrdb.o | ||
| 116 | #endif | ||
| 117 | |||
| 118 | #if (defined(USE_MOTIF) && defined(USE_OLIT)) | ||
| 119 | TOOLKIT_DEFINES = "ERROR! You cannot define both USE_MOTIF and USE_OLIT at the same time (in Imakefile)." | ||
| 120 | #else | ||
| 121 | # if (defined(USE_MOTIF) && defined(USE_LUCID)) | ||
| 122 | TOOLKIT_DEFINES = -DUSE_MOTIF -DUSE_LUCID | ||
| 123 | TOOLKIT_SRCS = $(MOTIF_SRC) $(LUCID_SRCS) | ||
| 124 | TOOLKIT_OBJS = $(MOTIF_OBJS) $(LUCID_OBJS) | ||
| 125 | # else | ||
| 126 | # if (defined(USE_OLIT) && defined(USE_LUCID)) | ||
| 127 | DEFINES = -DUSE_OLIT -DUSE_LUCID | ||
| 128 | TOOLKIT_SRCS = $(OLIT_SRC) $(LUCID_SRCS) | ||
| 129 | TOOLKIT_OBJS = $(OLIT_OBJS) $(LUCID_OBJS) | ||
| 130 | # else | ||
| 131 | # if defined(USE_OLIT) | ||
| 132 | TOOLKIT_DEFINES = -DUSE_OLIT | ||
| 133 | TOOLKIT_SRCS = $(OLIT_SRC) | ||
| 134 | TOOLKIT_OBJS = $(OLIT_OBJS) | ||
| 135 | # else | ||
| 136 | # if defined(USE_MOTIF) | ||
| 137 | TOOLKIT_DEFINES = -DUSE_MOTIF | ||
| 138 | TOOLKIT_SRCS = $(MOTIF_SRC) | ||
| 139 | TOOLKIT_OBJS = $(MOTIF_OBJS) | ||
| 140 | # else | ||
| 141 | # if defined(USE_LUCID) | ||
| 142 | TOOLKIT_DEFINES = -DUSE_LUCID | ||
| 143 | TOOLKIT_SRCS = $(LUCID_SRC) | ||
| 144 | TOOLKIT_OBJS = $(LUCID_OBJS) | ||
| 145 | # else | ||
| 146 | TOOLKIT_DEFINES = "ERROR! At least one of USE_MOTIF, USE_LUCID or USE_OLIT must be defined in Imakefile." | ||
| 147 | # endif | ||
| 148 | # endif | ||
| 149 | # endif | ||
| 150 | # endif | ||
| 151 | # endif | ||
| 152 | #endif | ||
| 153 | |||
| 154 | #ifdef ENERGIZE | ||
| 155 | # ifndef USE_MOTIF | ||
| 156 | EZ_OBJS = "ERROR! ENERGIZE requires USE_MOTIF to be defined in Imakefile." | ||
| 157 | # else | ||
| 158 | EZ_OBJS = energize/blpsheet.o energize/build.o energize/classbr_ps.o \ | ||
| 159 | energize/ctreebr_ps.o energize/debuggerps.o \ | ||
| 160 | energize/editmode.o energize/leb_psheet.o \ | ||
| 161 | energize/projectdisp.o energize/projectps.o \ | ||
| 162 | energize/search.o energize/target.o | ||
| 163 | ENERGIZEP = -DENERGIZE | ||
| 164 | # endif | ||
| 165 | #endif | ||
| 166 | |||
| 167 | SRCS = lwlib.c $(TOOLKIT_SRCS) lwlib-utils.c $(EXT_SRCS) | ||
| 168 | OBJS = lwlib.o $(TOOLKIT_OBJS) lwlib-utils.o $(EXT_OBJS) $(EZ_OBJS) | ||
| 169 | EXT_FLAGS = -I$(TOOLKITSRC) $(EXT_DEFINES) | ||
| 170 | LIBNAME = liblw.a | ||
| 171 | |||
| 172 | |||
| 173 | #if defined(ENERGIZE) && defined(BUILD_SHARED_LIB) | ||
| 174 | all:: | ||
| 175 | @if [ ! -d shared ]; then mkdir shared; else exit 0; fi | ||
| 176 | @if [ ! -d energize/shared ]; then mkdir energize/shared; \ | ||
| 177 | else exit 0; fi | ||
| 178 | @if [ ! -h shared/energize ]; \ | ||
| 179 | then cd shared ; ln -s ../energize/shared energize ; \ | ||
| 180 | else exit 0; fi | ||
| 181 | |||
| 182 | clean:: | ||
| 183 | $(RM) shared/energize | ||
| 184 | #endif | ||
| 185 | |||
| 186 | |||
| 187 | #ifdef BUILD_SHARED_LIB | ||
| 188 | # if (ProjectX == 4) | ||
| 189 | SharedLibraryObjectRule () | ||
| 190 | NormalSharedLibraryTarget(lw,$(SOLWREV),$(OBJS)) | ||
| 191 | # else /* X != 4 */ | ||
| 192 | LibraryObjectRule () | ||
| 193 | SharedLibraryTarget(lw,$(SOLWREV),$(OBJS),shared,..) | ||
| 194 | # endif /* X != 4 */ | ||
| 195 | #else /* !BUILD_SHARED_LIB */ | ||
| 196 | NormalLibraryObjectRule () | ||
| 197 | #endif /* !BUILD_SHARED_LIB */ | ||
| 198 | |||
| 199 | NormalLibraryTarget (lw,$(OBJS)) | ||
| 200 | MakefileSubdirs (energize) | ||
| 201 | DependTarget () | ||
| 202 | |||
| 203 | #ifdef ENERGIZE | ||
| 204 | |||
| 205 | energize/Imakefile: | ||
| 206 | -mkdir energize | ||
| 207 | -(cd energize ; sh -c "ln -s ../$(VPATH)/energize/* .") | ||
| 208 | |||
| 209 | /* #### we should automatically edit BUILD_SHARED_LIB into/out of the energize | ||
| 210 | Imakefile, since that's the only thing down there that changes */ | ||
| 211 | energize/Makefile: energize/Imakefile Imakefile | ||
| 212 | $(MAKE) $(MFLAGS) Makefiles | ||
| 213 | |||
| 214 | Makefile:: | ||
| 215 | $(RM) energize/Makefile | ||
| 216 | |||
| 217 | $(EZ_OBJS): energize/Makefile | ||
| 218 | ${RM} $@ ; cd energize ; $(MAKE) $(MFLAGS) CC="$(CC)" CFLAGS="$(CFLAGS)" | ||
| 219 | |||
| 220 | clean:: | ||
| 221 | cd energize ; $(MAKE) $(MFLAGS) clean | ||
| 222 | |||
| 223 | #endif | ||
| 224 | |||
| 225 | #if defined(BUILD_SHARED_LIB) && (ProjectX == 4) | ||
| 226 | # define LWObjectRule SpecialSharedObjectRule | ||
| 227 | #else | ||
| 228 | # define LWObjectRule SpecialLibObjectRule | ||
| 229 | #endif | ||
| 230 | |||
| 231 | CPPDEFS=-DCPP_PROGRAM=\"CppCmd\" | ||
| 232 | |||
| 233 | LWObjectRule (lwlib.o, lwlib.c, $(TOOLKIT_DEFINES)) | ||
| 234 | LWObjectRule (dispatch.o, dispatch.c, $(EXT_FLAGS)) | ||
| 235 | LWObjectRule (xrdb-cpp.o, xrdb-cpp.c, $(EXT_FLAGS) "$(CPPDEFS)") | ||
| 236 | LWObjectRule (xrdb.o, xrdb.c, $(EXT_FLAGS)) | ||
| 237 | LWObjectRule (lwlib-Xm.o, lwlib-Xm.c, $(ENERGIZEP)) | ||
| 238 | |||
| 239 | lwlib-utils.o: lwlib-utils.h | ||
| 240 | lwlib.o: lwlib.h lwlib-internal.h | ||
| 241 | lwlib-Xlw.o: lwlib.h lwlib-internal.h | ||
| 242 | lwlib-Xm.o: lwlib.h lwlib-internal.h lwlib-utils.h | ||
| 243 | lwlib-Xol.o: lwlib.h lwlib-internal.h | ||
| 244 | lwlib-Xol-mb.o: lwlib-Xol-mb.h lwlib-Xol-mbP.h | ||
diff --git a/lwlib/README b/lwlib/README new file mode 100644 index 00000000000..cb0b6ebd371 --- /dev/null +++ b/lwlib/README | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | This subdirectory contains the lwlib library which provides a uniform | ||
| 2 | interface to a few different X toolkits. The library was written by Lucid. | ||
| 3 | This version has changes in the makefile to fit in with Emacs's configure | ||
| 4 | script, and some source files have been renamed to fit in 14 characters. | ||
| 5 | |||
diff --git a/lwlib/dispatch.h b/lwlib/dispatch.h new file mode 100644 index 00000000000..175284508f4 --- /dev/null +++ b/lwlib/dispatch.h | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | |||
| 2 | Widget XtWidgetToDispatchTo (XEvent *); | ||
diff --git a/lwlib/xrdb-cpp.c b/lwlib/xrdb-cpp.c new file mode 100644 index 00000000000..4ede12e7652 --- /dev/null +++ b/lwlib/xrdb-cpp.c | |||
| @@ -0,0 +1,184 @@ | |||
| 1 | /* A general interface to the widgets of different toolkits. | ||
| 2 | Copyright (C) 1992, 1993 Lucid, Inc. | ||
| 3 | |||
| 4 | This file is part of the Lucid Widget Library. | ||
| 5 | |||
| 6 | The Lucid Widget Library is free software; you can redistribute it and/or | ||
| 7 | modify it under the terms of the GNU General Public License as published by | ||
| 8 | the Free Software Foundation; either version 2, or (at your option) | ||
| 9 | any later version. | ||
| 10 | |||
| 11 | The Lucid Widget Library is distributed in the hope that it will be useful, | ||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | GNU General Public License for more details. | ||
| 15 | |||
| 16 | You should have received a copy of the GNU General Public License | ||
| 17 | along with GNU Emacs; see the file COPYING. If not, write to | ||
| 18 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
| 19 | Boston, MA 02111-1307, USA. */ | ||
| 20 | |||
| 21 | /* This code reads a resource database file and filters it through cpp | ||
| 22 | with the same set of preprocessor defines that `xrdb' uses. | ||
| 23 | Call lwlib_xrdb_initialize(dpy) once, and then call the function | ||
| 24 | lwlib_GetFileDatabase() instead of XrmGetFileDatabase(), | ||
| 25 | and lwlib_CombineFileDatabase() instead of XrmCombineFileDatabase(). | ||
| 26 | */ | ||
| 27 | |||
| 28 | #ifndef __STDC_EXTENDED__ | ||
| 29 | #define __STDC_EXTENDED__ | ||
| 30 | #endif | ||
| 31 | |||
| 32 | #include <stdio.h> | ||
| 33 | #include <ctype.h> | ||
| 34 | #include <X11/Xlib.h> | ||
| 35 | #include <X11/Xos.h> | ||
| 36 | #include <X11/Intrinsic.h> | ||
| 37 | #include <X11/Xmu/SysUtil.h> | ||
| 38 | #include <sys/stat.h> | ||
| 39 | |||
| 40 | extern char *index (); | ||
| 41 | |||
| 42 | static int | ||
| 43 | file_p (path) | ||
| 44 | char *path; | ||
| 45 | { | ||
| 46 | struct stat status; | ||
| 47 | |||
| 48 | return (access (path, R_OK) == 0 /* exists and is readable */ | ||
| 49 | && stat (path, &status) == 0 /* get the status */ | ||
| 50 | && (status.st_mode & S_IFDIR) == 0); /* not a directory */ | ||
| 51 | } | ||
| 52 | |||
| 53 | #ifndef CPP_PROGRAM | ||
| 54 | #define CPP_PROGRAM "/lib/cpp" | ||
| 55 | #endif | ||
| 56 | |||
| 57 | static char cpp_string [BUFSIZ]; | ||
| 58 | static char *cpp_file = 0; | ||
| 59 | |||
| 60 | #define Resolution(pixels, mm) ((((pixels) * 100000 / (mm)) + 50) / 100) | ||
| 61 | |||
| 62 | void | ||
| 63 | lwlib_xrdb_initialize (display) | ||
| 64 | Display *display; | ||
| 65 | { | ||
| 66 | Screen *screen; | ||
| 67 | Visual *visual; | ||
| 68 | char server [255]; | ||
| 69 | char *colon, *s; | ||
| 70 | |||
| 71 | #define Push(str) \ | ||
| 72 | (strncpy (s, str, sizeof(str)), s += (sizeof(str)-1)) | ||
| 73 | |||
| 74 | #define Print(str, thing) \ | ||
| 75 | (sprintf (s, str, thing), s = index (s, 0)) | ||
| 76 | |||
| 77 | s = cpp_string; | ||
| 78 | Push (CPP_PROGRAM); | ||
| 79 | |||
| 80 | Push (" -DCLIENTHOST="); | ||
| 81 | XmuGetHostname (s, sizeof (cpp_string) - (s - cpp_string)); | ||
| 82 | s = index (s, 0); | ||
| 83 | Push (" -DSERVERHOST="); | ||
| 84 | strcpy (s, XDisplayName (DisplayString (display))); | ||
| 85 | colon = index (s, ':'); | ||
| 86 | if (colon == s) | ||
| 87 | { | ||
| 88 | XmuGetHostname (s, sizeof (cpp_string) - (s - cpp_string)); | ||
| 89 | s = index (s, 0); | ||
| 90 | } | ||
| 91 | else if (colon) | ||
| 92 | s = colon; | ||
| 93 | else | ||
| 94 | s = index (s, 0); | ||
| 95 | |||
| 96 | Print (" -DVERSION=%d", ProtocolVersion(display)); | ||
| 97 | Print (" -DREVISION=%d", ProtocolRevision(display)); | ||
| 98 | Print (" -DVENDOR=\"%s\"", ServerVendor(display)); | ||
| 99 | Print (" -DRELEASE=%d", VendorRelease(display)); | ||
| 100 | screen = DefaultScreenOfDisplay(display); | ||
| 101 | visual = DefaultVisualOfScreen(screen); | ||
| 102 | Print (" -DWIDTH=%d", screen->width); | ||
| 103 | Print (" -DHEIGHT=%d", screen->height); | ||
| 104 | Print (" -DX_RESOLUTION=%d", Resolution(screen->width,screen->mwidth)); | ||
| 105 | Print (" -DY_RESOLUTION=%d", Resolution(screen->height,screen->mheight)); | ||
| 106 | Print (" -DPLANES=%d", DisplayPlanes(display, DefaultScreen(display))); | ||
| 107 | Print (" -DBITS_PER_RGB=%d", visual->bits_per_rgb); | ||
| 108 | switch(visual->class) { | ||
| 109 | case StaticGray: Print (" -DCLASS=%s", "StaticGray"); break; | ||
| 110 | case GrayScale: Print (" -DCLASS=%s", "GrayScale"); break; | ||
| 111 | case StaticColor: Print (" -DCLASS=%s", "StaticColor"); | ||
| 112 | Print (" -DCOLOR", 0); break; | ||
| 113 | case PseudoColor: Print (" -DCLASS=%s", "PseudoColor"); | ||
| 114 | Print (" -DCOLOR", 0); break; | ||
| 115 | case TrueColor: Print (" -DCLASS=%s", "TrueColor"); | ||
| 116 | Print (" -DCOLOR", 0); break; | ||
| 117 | case DirectColor: Print (" -DCLASS=%s", "DirectColor"); | ||
| 118 | Print (" -DCOLOR", 0); break; | ||
| 119 | default: | ||
| 120 | fprintf (stderr, "unexpected visual class=%d\n", visual->class); | ||
| 121 | exit (-1); | ||
| 122 | } | ||
| 123 | *s++ = ' '; | ||
| 124 | *s = 0; | ||
| 125 | cpp_file = s; | ||
| 126 | } | ||
| 127 | |||
| 128 | XrmDatabase | ||
| 129 | lwlib_GetFileDatabase (path) | ||
| 130 | char *path; | ||
| 131 | { | ||
| 132 | XrmDatabase db = 0; | ||
| 133 | char line [BUFSIZ]; | ||
| 134 | char *s; | ||
| 135 | FILE *file; | ||
| 136 | |||
| 137 | if (! file_p (path)) | ||
| 138 | return 0; | ||
| 139 | |||
| 140 | strcpy (cpp_file, path); | ||
| 141 | if (! (file = popen (cpp_string, "r"))) | ||
| 142 | { | ||
| 143 | fprintf (stderr, | ||
| 144 | "couldn't execute %s; resource file %s file not munged.\n", | ||
| 145 | CPP_PROGRAM, path); | ||
| 146 | return XrmGetFileDatabase (path); | ||
| 147 | } | ||
| 148 | while (s = fgets (line, sizeof (line), file)) | ||
| 149 | { | ||
| 150 | char ch, *tail; | ||
| 151 | if (*s == '!') continue; | ||
| 152 | for (; ((ch = *s) != '\n') && isspace(ch); s++); | ||
| 153 | if ((ch == '\0') || (ch == '\n') || (ch == '#')) continue; | ||
| 154 | tail = s + strlen (s); | ||
| 155 | if (tail - s < 3) continue; /* this would be syntactically incorrect */ | ||
| 156 | while (*(tail-1) == '\n' && /* handle \ at end of line */ | ||
| 157 | *(tail-2) == '\\') | ||
| 158 | { | ||
| 159 | if (! fgets (tail, sizeof (line) - (tail - line), file)) | ||
| 160 | continue; | ||
| 161 | tail += strlen (tail); | ||
| 162 | } | ||
| 163 | XrmPutLineResource (&db, s); | ||
| 164 | } | ||
| 165 | pclose (file); | ||
| 166 | return db; | ||
| 167 | } | ||
| 168 | |||
| 169 | #ifdef THIS_IS_X11R5 | ||
| 170 | |||
| 171 | int | ||
| 172 | lwlib_CombineFileDatabase (path, target_db, override) | ||
| 173 | char *path; | ||
| 174 | XrmDatabase *target_db; | ||
| 175 | Bool override; | ||
| 176 | { | ||
| 177 | XrmDatabase source_db = lwlib_GetFileDatabase (path); | ||
| 178 | if (! source_db) | ||
| 179 | return (! file_p (path)); | ||
| 180 | XrmCombineDatabase (source_db, target_db, override); | ||
| 181 | return 1; | ||
| 182 | } | ||
| 183 | |||
| 184 | #endif /* r5 */ | ||
diff --git a/lwlib/xrdb.c b/lwlib/xrdb.c new file mode 100644 index 00000000000..e922a60342b --- /dev/null +++ b/lwlib/xrdb.c | |||
| @@ -0,0 +1,70 @@ | |||
| 1 | /* This file overrides the R4 or R5 mit/lib/Xt/Initialize.c, except that | ||
| 2 | the functions lwlib_GetFileDatabase(), lwlib_CombineFileDatabase(), and | ||
| 3 | lwlib_xrdb_initialize() are called. By doing this silly cpp hack, we | ||
| 4 | avoid version skew problems. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <X11/Xlib.h> | ||
| 8 | #include <X11/cursorfont.h> | ||
| 9 | #include <X11/Xutil.h> | ||
| 10 | |||
| 11 | #ifdef XlibSpecificationRelease | ||
| 12 | #if XlibSpecificationRelease >= 5 | ||
| 13 | #define HAVE_X11R5 | ||
| 14 | #endif | ||
| 15 | #endif | ||
| 16 | |||
| 17 | extern struct _XrmHashBucketRec *lwlib_GetFileDatabase (); | ||
| 18 | extern void lwlib_xrdb_initialize (); | ||
| 19 | |||
| 20 | /* Replace all calls to XrmGetFileDatabase() with lwlib_GetFileDatabase(), | ||
| 21 | calls to XrmCombineFileDatabase() with lwlib_CombineFileDatabase(), and | ||
| 22 | rename the defined _XtDisplayInitialize() function. | ||
| 23 | */ | ||
| 24 | #define XrmGetFileDatabase lwlib_GetFileDatabase | ||
| 25 | #define XrmCombineFileDatabase lwlib_CombineFileDatabase | ||
| 26 | #define _XtDisplayInitialize _orig_XtDisplayInitialize | ||
| 27 | |||
| 28 | /* Suck in the original code. Don't change this: see comments in Imakefile. */ | ||
| 29 | #include "Initialize.c" | ||
| 30 | |||
| 31 | #undef XrmGetFileDatabase | ||
| 32 | #undef XrmCombineFileDatabase | ||
| 33 | #undef _XtDisplayInitialize | ||
| 34 | |||
| 35 | /* Now provide a definition of _XtDisplayInitialize() which invokes the | ||
| 36 | original code after calling our initialization hook. Note that the R4 | ||
| 37 | and R5 versions of _XtDisplayInitialize() take different arguments. | ||
| 38 | */ | ||
| 39 | |||
| 40 | #ifndef HAVE_X11R5 | ||
| 41 | |||
| 42 | void _XtDisplayInitialize(dpy, pd, name, class, urlist, num_urs, argc, argv) | ||
| 43 | Display *dpy; | ||
| 44 | XtPerDisplay pd; | ||
| 45 | String name, class; | ||
| 46 | XrmOptionDescRec *urlist; | ||
| 47 | Cardinal num_urs; | ||
| 48 | Cardinal *argc; | ||
| 49 | char *argv[]; | ||
| 50 | { | ||
| 51 | lwlib_xrdb_initialize(dpy); | ||
| 52 | _orig_XtDisplayInitialize(dpy, pd, name, class, urlist, num_urs, argc, argv); | ||
| 53 | } | ||
| 54 | |||
| 55 | #else /* HAVE_X11R5 */ | ||
| 56 | |||
| 57 | void _XtDisplayInitialize(dpy, pd, name, urlist, num_urs, argc, argv) | ||
| 58 | Display *dpy; | ||
| 59 | XtPerDisplay pd; | ||
| 60 | String name; | ||
| 61 | XrmOptionDescRec *urlist; | ||
| 62 | Cardinal num_urs; | ||
| 63 | int *argc; | ||
| 64 | char **argv; | ||
| 65 | { | ||
| 66 | lwlib_xrdb_initialize(dpy); | ||
| 67 | _orig_XtDisplayInitialize(dpy, pd, name, urlist, num_urs, argc, argv); | ||
| 68 | } | ||
| 69 | |||
| 70 | #endif /* HAVE_X11R5 */ | ||