1 /** 2 * 3 * $Id: MacrosI.h,v 1.1 2004/08/28 19:23:30 dannybackx Exp $ 4 * 5 * Copyright (C) 1995 Free Software Foundation, Inc. 6 * Copyright � 1995, 1996, 1997, 1998, 1999, 2000, 2002 LessTif Development Team 7 * 8 * This file is part of the GNU LessTif Library. 9 * 10 * This library is free software; you can redistribute it and/or 11 * modify it under the terms of the GNU Library General Public 12 * License as published by the Free Software Foundation; either 13 * version 2 of the License, or (at your option) any later version. 14 * 15 * This library is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 * Library General Public License for more details. 19 * 20 * You should have received a copy of the GNU Library General Public 21 * License along with this library; if not, write to the Free 22 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 23 * 24 **/ 25 26 #ifndef _XMI_MACROSI_H 27 #define _XMI_MACROSI_H 28 29 #include <Xm/LabelGP.h> 30 #include <Xm/LabelP.h> 31 32 33 34 /* 35 * object shorthand 36 */ 37 #define ObjName(w) \ 38 (((ObjectRec *)(w))->object.xrm_name) 39 40 /* 41 * Core shorthand 42 */ 43 #define CoreBeingDestroyed(w) \ 44 (((Widget)(w))->core.being_destroyed) 45 46 #define CoreConstraints(w) \ 47 (((Widget)(w))->core.constraints) 48 49 /* can't use XtScreen because that can be a function */ 50 #define CoreScreen(w) \ 51 (((Widget)(w))->core.screen) 52 53 #define CoreDepth(w) \ 54 (((Widget)(w))->core.depth) 55 56 #define CoreColormap(w) \ 57 (((Widget)(w))->core.colormap) 58 59 #define CoreAccelerators(w) \ 60 (((Widget)(w))->core.accelerators) 61 62 /* can't use XtWindow because we want to be sure which window 63 * gets set. */ 64 #define CoreWindow(w) \ 65 (((Widget)(w))->core.window) 66 67 #define CoreMappedWhenManaged(w) \ 68 (((Widget)(w))->core.mapped_when_managed) 69 70 #define CorePopupList(w) \ 71 (((Widget)(w))->core.popup_list) 72 73 #define CoreNumPopups(w) \ 74 (((Widget)(w))->core.num_popups) 75 76 /* can't use XtBackground because that can be a function */ 77 #define CoreBackground(w) \ 78 (((Widget)(w))->core.background_pixel) 79 80 #define CoreBackgroundPixmap(w) \ 81 (((Widget)(w))->core.background_pixmap) 82 83 /* class macros */ 84 #define CoreClassTranslations(w) \ 85 (XtClass((Widget)(w))->core_class.tm_table) 86 87 /* 88 * Shell shorthand 89 */ 90 #define Shell_PopdownCallback(x) \ 91 (((ShellWidget)(x))->shell.popdown_callback) 92 93 #define Shell_PoppedUp(x) \ 94 (((ShellWidget)(x))->shell.popped_up) 95 96 #define Shell_GrabKind(x) \ 97 (((ShellWidget)(x))->shell.grab_kind) 98 99 #define Shell_AllowResize(x) \ 100 (((ShellWidget)(x))->shell.allow_shell_resize) 101 102 /* 103 * one that Motif should have but doesn't 104 */ 105 #define XmIsMenuBar(w) \ 106 (XtIsSubclass(w, xmRowColumnWidgetClass) && RC_Type(w) == XmMENU_BAR) 107 108 #define XmIsOptionMenu(w) \ 109 (XtIsSubclass(w, xmRowColumnWidgetClass) && RC_Type(w) == XmMENU_OPTION) 110 111 /* 112 * In the first set of macros, we have changed the names from what Motif has. 113 */ 114 /* 115 * LABEL GADGET OVERRIDE MACROS 116 */ 117 #define LabG_AcceleratorText LabG__acceleratorText 118 #define LabG_Label LabG__label 119 120 #define LabGClass_SetOverrideCallback(c) \ 121 (((XmLabelGadgetClassRec *)(c))->label_class.setOverrideCallback) 122 123 #define LabGClass_MenuProcs(c) \ 124 (((XmLabelGadgetClassRec *)(c))->label_class.menuProcs) 125 126 127 /* 128 * PUSH BUTTON GADGET OVERRIDE MACROS 129 */ 130 #define PBG_DefaultButtonShadow PBG_DefaultButtonShadowThickness 131 #define PBG_FillGC PBG_FillGc 132 #define PBG_BackgroundGC PBG_BackgroundGc 133 134 /* 135 * TOGGLE BUTTON GADGET OVERRIDE MACROS 136 */ 137 #define TBG_ArmCallback TBG_ArmCB 138 #define TBG_ValueChangedCallback TBG_ValueChangedCB 139 #define TBG_DisarmCallback TBG_DisarmCB 140 141 /* 142 * In the second set, these are macros that we have that Motif doesn't. 143 */ 144 145 /* 146 * PRIMITIVE ACCESS MACROS 147 */ 148 #define Prim_Foreground(w) \ 149 (((XmPrimitiveWidget)(w))->primitive.foreground) 150 151 #define Prim_HighlightThickness(w) \ 152 (((XmPrimitiveWidget)(w))->primitive.highlight_thickness) 153 154 #define Prim_TopShadowGC(w) \ 155 (((XmPrimitiveWidget)(w))->primitive.top_shadow_GC) 156 157 #define Prim_TopShadowColor(w) \ 158 (((XmPrimitiveWidget)(w))->primitive.top_shadow_color) 159 160 #define Prim_TopShadowPixmap(w) \ 161 (((XmPrimitiveWidget)(w))->primitive.top_shadow_pixmap) 162 163 #define Prim_BottomShadowGC(w) \ 164 (((XmPrimitiveWidget)(w))->primitive.bottom_shadow_GC) 165 166 #define Prim_BottomShadowColor(w) \ 167 (((XmPrimitiveWidget)(w))->primitive.bottom_shadow_color) 168 169 #define Prim_BottomShadowPixmap(w) \ 170 (((XmPrimitiveWidget)(w))->primitive.bottom_shadow_pixmap) 171 172 #define Prim_HighlightGC(w) \ 173 (((XmPrimitiveWidget)(w))->primitive.highlight_GC) 174 175 #define Prim_HighlightColor(w) \ 176 (((XmPrimitiveWidget)(w))->primitive.highlight_color) 177 178 #define Prim_HighlightPixmap(w) \ 179 (((XmPrimitiveWidget)(w))->primitive.highlight_pixmap) 180 181 #define Prim_HighlightOnEnter(w) \ 182 (((XmPrimitiveWidget)(w))->primitive.highlight_on_enter) 183 184 #define Prim_HighlightDrawn(w) \ 185 (((XmPrimitiveWidget)(w))->primitive.highlight_drawn) 186 187 #define Prim_Highlighted(w) \ 188 (((XmPrimitiveWidget)(w))->primitive.highlighted) 189 190 #define Prim_TraversalOn(w) \ 191 (((XmPrimitiveWidget)(w))->primitive.traversal_on) 192 193 #define Prim_NavigationType(w) \ 194 (((XmPrimitiveWidget)(w))->primitive.navigation_type) 195 196 #define Prim_UnitType(w) \ 197 (((XmPrimitiveWidget)(w))->primitive.unit_type) 198 199 /* 200 * some class macros 201 */ 202 #define PrimC_BorderHighlight(wc) \ 203 (((XmPrimitiveClassRec *)(wc))->primitive_class.border_highlight) 204 205 #define PrimC_BorderUnhighlight(wc) \ 206 (((XmPrimitiveClassRec *)(wc))->primitive_class.border_unhighlight) 207 208 #define PrimC_ArmAndActivate(wc) \ 209 (((XmPrimitiveClassRec *)(wc))->primitive_class.arm_and_activate) 210 211 /* 212 * MANAGER/GADGET ACCESS MACROS 213 */ 214 #define XmParentForeground(w) (((XmManagerWidget) \ 215 (((XmGadget)(w))->object.parent))->manager.foreground) 216 217 #define XmParentBackground(w) (((XmManagerWidget) \ 218 (((XmGadget)(w))->object.parent))->core.background_pixel) 219 220 #define XmParentBottomShadowColor(w) (((XmManagerWidget) \ 221 (((XmGadget)(w))->object.parent))->manager.bottom_shadow_color) 222 223 #define XmParentHighlightColor(w) (((XmManagerWidget) \ 224 (((XmGadget)(w))->object.parent))->manager.highlight_color) 225 226 #define XmParentTopShadowColor(w) (((XmManagerWidget) \ 227 (((XmGadget)(w))->object.parent))->manager.top_shadow_color) 228 229 /* 230 * MANAGER ACCESS MACROS 231 */ 232 #define MGR_InitialFocus(w) \ 233 (((XmManagerWidget)(w))->manager.initial_focus) 234 235 #define MGR_BackgroundGC(m) \ 236 (((XmManagerWidget)(m))->manager.background_GC) 237 238 #define MGR_Foreground(m) \ 239 (((XmManagerWidget)(m))->manager.foreground) 240 241 #define MGR_TopShadowGC(m) \ 242 (((XmManagerWidget)(m))->manager.top_shadow_GC) 243 244 #define MGR_TopShadowColor(m) \ 245 (((XmManagerWidget)(m))->manager.top_shadow_color) 246 247 #define MGR_TopShadowPixmap(m) \ 248 (((XmManagerWidget)(m))->manager.top_shadow_pixmap) 249 250 #define MGR_BottomShadowGC(m) \ 251 (((XmManagerWidget)(m))->manager.bottom_shadow_GC) 252 253 #define MGR_BottomShadowColor(m) \ 254 (((XmManagerWidget)(m))->manager.bottom_shadow_color) 255 256 #define MGR_BottomShadowPixmap(m) \ 257 (((XmManagerWidget)(m))->manager.bottom_shadow_pixmap) 258 259 #define MGR_HighlightGC(m) \ 260 (((XmManagerWidget)(m))->manager.highlight_GC) 261 262 #define MGR_HighlightColor(m) \ 263 (((XmManagerWidget)(m))->manager.highlight_color) 264 265 #define MGR_HighlightPixmap(m) \ 266 (((XmManagerWidget)(m))->manager.highlight_pixmap) 267 268 #define MGR_HelpCallbackList(m) \ 269 (((XmManagerWidget)(m))->manager.help_callback) 270 271 #define MGR_EventHandlerAdded(m) \ 272 (((XmManagerWidget)(m))->manager.event_handler_added) 273 274 #define MGR_HighlightedWidget(m) \ 275 (((XmManagerWidget)(m))->manager.highlighted_widget) 276 277 #define MGR_ActiveChild(m) \ 278 (((XmManagerWidget)(m))->manager.active_child) 279 280 #define MGR_SelectedGadget(m) \ 281 (((XmManagerWidget)(m))->manager.selected_gadget) 282 283 #define MGR_EligibleForMultiButtonEvent(m) \ 284 (((XmManagerWidget)(m))->manager.eligible_for_multi_button_event) 285 286 #define MGR_NavigationType(m) \ 287 (((XmManagerWidget)(m))->manager.navigation_type) 288 289 #define MGR_TraversalOn(m) \ 290 (((XmManagerWidget)(m))->manager.traversal_on) 291 292 #define MGR_UnitType(m) \ 293 (((XmManagerWidget)(m))->manager.unit_type) 294 295 #define MGR_StringDirection(m) \ 296 (((XmManagerWidget)(m))->manager.string_direction) 297 298 /* a couple of #defines to make composite stuff easier */ 299 300 #define MGR_NumChildren(m) \ 301 (((XmManagerWidget)(m))->composite.num_children) 302 303 #define MGR_Children(m) \ 304 (((XmManagerWidget)(m))->composite.children) 305 306 #define MGR_NumSlots(m) \ 307 (((XmManagerWidget)(m))->composite.num_slots) 308 309 /* 310 * GADGET ACCESS MACROS 311 */ 312 #define G_HelpCallback(g) \ 313 (((XmGadget)(g))->gadget.help_callback) 314 315 #define G_UserData(g) \ 316 (((XmGadget)(g))->gadget.have_traversal) 317 318 #define G_TraversalOn(g) \ 319 (((XmGadget)(g))->gadget.traversal_on) 320 321 #define G_HighlightOnEnter(g) \ 322 (((XmGadget)(g))->gadget.highlight_on_enter) 323 324 #define G_HaveTraversal(g) \ 325 (((XmGadget)(g))->gadget.have_traversal) 326 327 #define G_UnitType(g) \ 328 (((XmGadget)(g))->gadget.unit_type) 329 330 #define G_NavigationType(g) \ 331 (((XmGadget)(g))->gadget.navigation_type) 332 333 #define G_HighlightDrawn(g) \ 334 (((XmGadget)(g))->gadget.highlight_drawn) 335 336 #define G_Highlighted(g) \ 337 (((XmGadget)(g))->gadget.highlighted) 338 339 #define G_Visible(g) \ 340 (((XmGadget)(g))->gadget.visible) 341 342 #define G_EventMask(g) \ 343 (((XmGadget)(g))->gadget.event_mask) 344 345 /* 346 * gadget class macros 347 */ 348 #define GC_BorderHighlight(wc) \ 349 (((XmGadgetClassRec *)(wc))->gadget_class.border_highlight) 350 351 #define GC_BorderUnhighlight(wc) \ 352 (((XmGadgetClassRec *)(wc))->gadget_class.border_unhighlight) 353 354 #define GC_ArmAndActivate(wc) \ 355 (((XmGadgetClassRec *)(wc))->gadget_class.arm_and_activate) 356 357 358 /* 359 * EXT OBJECT ACCESS MACROS 360 */ 361 #define ExtObj_LogicalParent(w) \ 362 (((XmExtRec *)w)->ext.logicalParent) 363 364 #define ExtObj_ExtensionType(w) \ 365 (((XmExtRec *)w)->ext.extensionType) 366 367 /* 368 * VENDOR SHELL EXT ACCESS MACROS 369 */ 370 #define VSEP_DefaultFontList(o) \ 371 (((XmVendorShellExtObject)o)->vendor.default_font_list) 372 373 #define VSEP_FocusPolicy(o) \ 374 (((XmVendorShellExtObject)o)->vendor.focus_policy) 375 376 #define VSEP_FocusData(o) \ 377 (((XmVendorShellExtObject)o)->vendor.focus_data) 378 379 #define VSEP_DeleteResponse(o) \ 380 (((XmVendorShellExtObject)o)->vendor.delete_response) 381 382 #define VSEP_UnitType(o) \ 383 (((XmVendorShellExtObject)o)->vendor.unit_type) 384 385 #define VSEP_MwmHints(o) \ 386 (((XmVendorShellExtObject)o)->vendor.mwm_hints) 387 388 #define VSEP_MwmInfo(o) \ 389 (((XmVendorShellExtObject)o)->vendor.mwm_info) 390 391 #define VSEP_MwmMenu(o) \ 392 (((XmVendorShellExtObject)o)->vendor.mwm_menu) 393 394 #define VSEP_FocusMovedCallback(o) \ 395 (((XmVendorShellExtObject)o)->vendor.focus_moved_callback) 396 397 #define VSEP_OldManaged(o) \ 398 (((XmVendorShellExtObject)o)->vendor.old_managed) 399 400 #define VSEP_XAtMap(o) \ 401 (((XmVendorShellExtObject)o)->vendor.xAtMap) 402 403 #define VSEP_YAtMap(o) \ 404 (((XmVendorShellExtObject)o)->vendor.yAtMap) 405 406 #define VSEP_XOffset(o) \ 407 (((XmVendorShellExtObject)o)->vendor.xOffset) 408 409 #define VSEP_YOffset(o) \ 410 (((XmVendorShellExtObject)o)->vendor.yOffset) 411 412 #define VSEP_LastOffsetSerial(o) \ 413 (((XmVendorShellExtObject)o)->vendor.lastOffsetSerial) 414 415 #define VSEP_LastMapRequest(o) \ 416 (((XmVendorShellExtObject)o)->vendor.lastMapRequest) 417 418 #define VSEP_ExternalReposition(o) \ 419 (((XmVendorShellExtObject)o)->vendor.externalReposition) 420 421 #define VSEP_MapStyle(o) \ 422 (((XmVendorShellExtObject)o)->vendor.mapStyle) 423 424 #define VSEP_RealizeCallback(o) \ 425 (((XmVendorShellExtObject)o)->vendor.realize_callback) 426 427 #define VSEP_GrabKind(o) \ 428 (((XmVendorShellExtObject)o)->vendor.grab_kind) 429 430 #define VSEP_AudibleWarning(o) \ 431 (((XmVendorShellExtObject)o)->vendor.audible_warning) 432 433 #define VSEP_LabelFontList(o) \ 434 (((XmVendorShellExtObject)o)->vendor.label_font_list) 435 436 #define VSEP_ButtonFontList(o) \ 437 (((XmVendorShellExtObject)o)->vendor.button_font_list) 438 439 #define VSEP_TextFontList(o) \ 440 (((XmVendorShellExtObject)o)->vendor.text_font_list) 441 442 #define VSEP_InputMethodString(o) \ 443 (((XmVendorShellExtObject)o)->vendor.input_method_string) 444 445 #define VSEP_PreeditTypeString(o) \ 446 (((XmVendorShellExtObject)o)->vendor.preedit_type_string) 447 448 #define VSEP_LightThreshold(o) \ 449 (((XmVendorShellExtObject)o)->vendor.light_threshold) 450 451 #define VSEP_DarkThreshold(o) \ 452 (((XmVendorShellExtObject)o)->vendor.dark_threshold) 453 454 #define VSEP_ForegroundThreshold(o) \ 455 (((XmVendorShellExtObject)o)->vendor.foreground_threshold) 456 457 #define VSEP_ImHeight(o) \ 458 (((XmVendorShellExtObject)o)->vendor.im_height) 459 460 #define VSEP_ImInfo(o) \ 461 (((XmVendorShellExtObject)o)->vendor.im_info) 462 463 #define VSEP_ImHeightSet(o) \ 464 (((XmVendorShellExtObject)o)->vendor.im_vs_height_set) 465 466 #define Vendor_IconPixmap(o) \ 467 (((WMShellWidget)o)->wm.wm_hints.icon_pixmap) 468 469 /* 470 * ARROW BUTTON WIDGET ACCESS MACROS 471 */ 472 #define AB_ArmCallback(w) \ 473 (((XmArrowButtonWidget)(w))->arrowbutton.arm_callback) 474 475 #define AB_ActivateCallback(w) \ 476 (((XmArrowButtonWidget)(w))->arrowbutton.activate_callback) 477 478 #define AB_DisarmCallback(w) \ 479 (((XmArrowButtonWidget)(w))->arrowbutton.disarm_callback) 480 481 #define AB_ArrowGC(w) \ 482 (((XmArrowButtonWidget)(w))->arrowbutton.arrow_GC) 483 484 #define AB_InsensitiveGC(w) \ 485 (((XmArrowButtonWidget)(w))->arrowbutton.insensitive_GC) 486 487 #define AB_Direction(w) \ 488 (((XmArrowButtonWidget)(w))->arrowbutton.direction) 489 490 #define AB_Armed(w) \ 491 (((XmArrowButtonWidget)(w))->arrowbutton.selected) 492 493 #define AB_Timer(w) \ 494 (((XmArrowButtonWidget)(w))->arrowbutton.timer) 495 496 #define AB_MultiClick(w) \ 497 (((XmArrowButtonWidget)(w))->arrowbutton.multiClick) 498 499 #define AB_ClickCount(w) \ 500 (((XmArrowButtonWidget)(w))->arrowbutton.click_count) 501 502 #define AB_ArmTimeStamp(w) \ 503 (((XmArrowButtonWidget)(w))->arrowbutton.armTimeStamp) 504 505 #define AB_DetailShadowThickness(w) \ 506 (((XmArrowButtonWidget)(w))->arrowbutton.detail_shadow_thickness) 507 508 /* 509 * ARROW BUTTON GADGET ACCESS MACROS 510 */ 511 #define ABG_ActivateCallback(w) \ 512 (((XmArrowButtonGadget)(w))->arrowbutton.activate_callback) 513 514 #define ABG_ArmCallback(w) \ 515 (((XmArrowButtonGadget)(w))->arrowbutton.arm_callback) 516 517 #define ABG_DisarmCallback(w) \ 518 (((XmArrowButtonGadget)(w))->arrowbutton.disarm_callback) 519 520 #define ABG_ArrowGC(w) \ 521 (((XmArrowButtonGadget)(w))->arrowbutton.arrow_GC) 522 523 #define ABG_InsensitiveGC(w) \ 524 (((XmArrowButtonGadget)(w))->arrowbutton.insensitive_GC) 525 526 #define ABG_Direction(w) \ 527 (((XmArrowButtonGadget)(w))->arrowbutton.direction) 528 529 #define ABG_Armed(w) \ 530 (((XmArrowButtonGadget)(w))->arrowbutton.selected) 531 532 #define ABG_Timer(w) \ 533 (((XmArrowButtonGadget)(w))->arrowbutton.timer) 534 535 #define ABG_MultiClick(w) \ 536 (((XmArrowButtonGadget)(w))->arrowbutton.multiClick) 537 538 #define ABG_ClickCount(w) \ 539 (((XmArrowButtonGadget)(w))->arrowbutton.click_count) 540 541 #define ABG_ArmTimeStamp(w) \ 542 (((XmArrowButtonGadget)(w))->arrowbutton.armTimeStamp) 543 544 #define ABG_DetailShadowThickness(w) \ 545 (((XmArrowButtonGadget)(w))->arrowbutton.detail_shadow_thickness) 546 547 /* 548 * BULLETINBOARD WIDGET ACCESS MACROS 549 */ 550 #define BB_OldWidth(w) \ 551 (((XmBulletinBoardWidget)(w))->bulletin_board.old_width) 552 553 #define BB_OldHeight(w) \ 554 (((XmBulletinBoardWidget)(w))->bulletin_board.old_height) 555 556 #define BB_OldShadowThickness(w) \ 557 (((XmBulletinBoardWidget)(w))->bulletin_board.old_shadow_thickness) 558 559 #define BB_AutoUnmanage(w) \ 560 (((XmBulletinBoardWidget)(w))->bulletin_board.auto_unmanage) 561 562 #define BB_FocusCallback(w) \ 563 (((XmBulletinBoardWidget)(w))->bulletin_board.focus_callback) 564 565 #define BB_MapCallback(w) \ 566 (((XmBulletinBoardWidget)(w))->bulletin_board.map_callback) 567 568 #define BB_UnmapCallback(w) \ 569 (((XmBulletinBoardWidget)(w))->bulletin_board.unmap_callback) 570 571 #define BB_DefaultPosition(w) \ 572 (((XmBulletinBoardWidget)(w))->bulletin_board.default_position) 573 574 #define BB_ShadowType(w) \ 575 (((XmBulletinBoardWidget)(w))->bulletin_board.shadow_type) 576 577 #define BB_NoResize(w) \ 578 (((XmBulletinBoardWidget)(w))->bulletin_board.no_resize) 579 580 #define BB_DialogStyle(w) \ 581 (((XmBulletinBoardWidget)(w))->bulletin_board.dialog_style) 582 583 #define BB_DialogTitle(w) \ 584 (((XmBulletinBoardWidget)(w))->bulletin_board.dialog_title) 585 586 #define BB_AllowOverlap(w) \ 587 (((XmBulletinBoardWidget)(w))->bulletin_board.allow_overlap) 588 589 #define BB_GeoCache(w) \ 590 (((XmBulletinBoardWidget)(w))->bulletin_board.geo_cache) 591 592 /* 593 * COMMAND WIDGET ACCESS MACROS 594 */ 595 #define Com_Command(w) \ 596 (((XmCommandRec *)(w))->selection_box.selection_label_string) 597 598 #define Com_HistoryItems(w) \ 599 (((XmCommandRec *)(w))->selection_box.list_items) 600 601 #define Com_HistoryItemCount(w) \ 602 (((XmCommandRec *)(w))->selection_box.list_item_count) 603 604 #define Com_HistoryMaxItems(w) \ 605 (((XmCommandRec *)(w))->command.history_max_items) 606 607 #define Com_HistoryVisibleItemCount(w) \ 608 (((XmCommandRec *)(w))->selection_box.list_visible_item_count) 609 610 #define Com_PromptString(w) \ 611 (((XmCommandRec *)(w))->selection_box.selection_label_string) 612 613 #define Com_Error(w) \ 614 (((XmCommandRec *)(w))->command.error) 615 616 /* 617 * CASCADE BUTTON WIDGET ACCESS MACROS 618 */ 619 #define CB_Timer(cb) \ 620 (((XmCascadeButtonWidget)(cb))->cascade_button.timer) 621 622 #define CB_MapDelay(cb) \ 623 (((XmCascadeButtonWidget)(cb))->cascade_button.map_delay) 624 625 /* 626 * DRAWING AREA WIDGET ACCESS MACROS 627 */ 628 #define DA_MarginWidth(w) \ 629 (((XmDrawingAreaWidget)w)->drawing_area.margin_width) 630 631 #define DA_MarginHeight(w) \ 632 (((XmDrawingAreaWidget)w)->drawing_area.margin_height) 633 634 #define DA_ResizePolicy(w) \ 635 (((XmDrawingAreaWidget)w)->drawing_area.resize_policy) 636 637 #define DA_ExposeCallback(w) \ 638 (((XmDrawingAreaWidget)w)->drawing_area.expose_callback) 639 640 #define DA_InputCallback(w) \ 641 (((XmDrawingAreaWidget)w)->drawing_area.input_callback) 642 643 #define DA_ResizeCallback(w) \ 644 (((XmDrawingAreaWidget)w)->drawing_area.resize_callback) 645 646 /* 647 * DRAWN BUTTON ACCESS MACROS 648 */ 649 #define DB_PushButtonEnabled(w) \ 650 (((XmDrawnButtonWidget)(w))->drawnbutton.pushbutton_enabled) 651 652 #define DB_ShadowType(w) \ 653 (((XmDrawnButtonWidget)(w))->drawnbutton.shadow_type) 654 655 #define DB_ActivateCallback(w) \ 656 (((XmDrawnButtonWidget)(w))->drawnbutton.activate_callback) 657 658 #define DB_ArmCallback(w) \ 659 (((XmDrawnButtonWidget)(w))->drawnbutton.arm_callback) 660 661 #define DB_DisarmCallback(w) \ 662 (((XmDrawnButtonWidget)(w))->drawnbutton.disarm_callback) 663 664 #define DB_ExposeCallback(w) \ 665 (((XmDrawnButtonWidget)(w))->drawnbutton.expose_callback) 666 667 #define DB_ResizeCallback(w) \ 668 (((XmDrawnButtonWidget)(w))->drawnbutton.resize_callback) 669 670 #define DB_Armed(w) \ 671 (((XmDrawnButtonWidget)(w))->drawnbutton.armed) 672 673 #define DB_OldWidth(w) \ 674 (((XmDrawnButtonWidget)(w))->drawnbutton.old_width) 675 676 #define DB_OldHeight(w) \ 677 (((XmDrawnButtonWidget)(w))->drawnbutton.old_height) 678 679 #define DB_OldShadowThickness(w) \ 680 (((XmDrawnButtonWidget)(w))->drawnbutton.old_shadow_thickness) 681 682 #define DB_OldHighlightThickness(w) \ 683 (((XmDrawnButtonWidget)(w))->drawnbutton.old_highlight_thickness) 684 685 #define DB_Timer(w) \ 686 (((XmDrawnButtonWidget)(w))->drawnbutton.timer) 687 688 #define DB_MultiClick(w) \ 689 (((XmDrawnButtonWidget)(w))->drawnbutton.multiClick) 690 691 #define DB_ClickCount(w) \ 692 (((XmDrawnButtonWidget)(w))->drawnbutton.click_count) 693 694 #define DB_ArmTimeStamp(w) \ 695 (((XmDrawnButtonWidget)(w))->drawnbutton.armTimeStamp) 696 697 698 /* 699 * DRAG CONTEXT WIDGET ACCESS MACROS 700 */ 701 #define DC_ExportTargets(w) \ 702 (((XmDragContextRec *)(w))->drag.exportTargets) 703 704 #define DC_NumExportTargets(w) \ 705 (((XmDragContextRec *)(w))->drag.numExportTargets) 706 707 #define DC_ConvertProc(w) \ 708 (((XmDragContextRec *)(w))->drag.convertProc) 709 710 #define DC_ClientData(w) \ 711 (((XmDragContextRec *)(w))->drag.clientData) 712 713 #define DC_SourceCursorIcon(w) \ 714 (((XmDragContextRec *)(w))->drag.sourceCursorIcon) 715 716 #define DC_StateCursorIcon(w) \ 717 (((XmDragContextRec *)(w))->drag.stateCursorIcon) 718 719 #define DC_OperationCursorIcon(w) \ 720 (((XmDragContextRec *)(w))->drag.operationCursorIcon) 721 722 #define DC_SourcePixmapIcon(w) \ 723 (((XmDragContextRec *)(w))->drag.sourcePixmapIcon) 724 725 #define DC_CursorBackground(w) \ 726 (((XmDragContextRec *)(w))->drag.cursorBackground) 727 728 #define DC_CursorForeground(w) \ 729 (((XmDragContextRec *)(w))->drag.cursorForeground) 730 731 #define DC_ValidCursorForeground(w) \ 732 (((XmDragContextRec *)(w))->drag.validCursorForeground) 733 734 #define DC_InvalidCursorForeground(w) \ 735 (((XmDragContextRec *)(w))->drag.invalidCursorForeground) 736 737 #define DC_NoneCursorForeground(w) \ 738 (((XmDragContextRec *)(w))->drag.noneCursorForeground) 739 740 #define DC_DragMotionCallback(w) \ 741 (((XmDragContextRec *)(w))->drag.dragMotionCallback) 742 743 #define DC_OperationChangedCallback(w) \ 744 (((XmDragContextRec *)(w))->drag.operationChangedCallback) 745 746 #define DC_SiteEnterCallback(w) \ 747 (((XmDragContextRec *)(w))->drag.siteEnterCallback) 748 749 #define DC_SiteLeaveCallback(w) \ 750 (((XmDragContextRec *)(w))->drag.siteLeaveCallback) 751 752 #define DC_TopLevelEnterCallback(w) \ 753 (((XmDragContextRec *)(w))->drag.topLevelEnterCallback) 754 755 #define DC_TopLevelLeaveCallback(w) \ 756 (((XmDragContextRec *)(w))->drag.topLevelLeaveCallback) 757 758 #define DC_DropStartCallback(w) \ 759 (((XmDragContextRec *)(w))->drag.dropStartCallback) 760 761 #define DC_DropFinishCallback(w) \ 762 (((XmDragContextRec *)(w))->drag.dropFinishCallback) 763 764 #define DC_DragDropFinishCallback(w) \ 765 (((XmDragContextRec *)(w))->drag.dragDropFinishCallback) 766 767 #define DC_DragOperations(w) \ 768 (((XmDragContextRec *)(w))->drag.dragOperations) 769 770 #define DC_Incremental(w) \ 771 (((XmDragContextRec *)(w))->drag.incremental) 772 773 #define DC_BlendModel(w) \ 774 (((XmDragContextRec *)(w))->drag.blendModel) 775 776 #define DC_SrcWindow(w) \ 777 (((XmDragContextRec *)(w))->drag.srcWindow) 778 779 #define DC_DragStartTime(w) \ 780 (((XmDragContextRec *)(w))->drag.dragStartTime) 781 782 #define DC_ICCHandle(w) \ 783 (((XmDragContextRec *)(w))->drag.iccHandle) 784 785 #define DC_SourceWidget(w) \ 786 (((XmDragContextRec *)(w))->drag.sourceWidget) 787 788 #define DC_SourceIsExternal(w) \ 789 (((XmDragContextRec *)(w))->drag.sourceIsExternal) 790 791 #define DC_TopWindowsFetched(w) \ 792 (((XmDragContextRec *)(w))->drag.topWindowsFetched) 793 794 #define DC_CommType(w) \ 795 (((XmDragContextRec *)(w))->drag.commType) 796 797 #define DC_AnimationType(w) \ 798 (((XmDragContextRec *)(w))->drag.animationType) 799 800 #define DC_Operation(w) \ 801 (((XmDragContextRec *)(w))->drag.operation) 802 803 #define DC_Operations(w) \ 804 (((XmDragContextRec *)(w))->drag.operations) 805 806 #define DC_LastEventState(w) \ 807 (((XmDragContextRec *)(w))->drag.lastEventState) 808 809 #define DC_DragCompletionStatus(w) \ 810 (((XmDragContextRec *)(w))->drag.dragCompletionStatus) 811 812 #define DC_DragDropCompletionStatus(w) \ 813 (((XmDragContextRec *)(w))->drag.dragDropCompletionStatus) 814 815 #define DC_ForceIPC(w) \ 816 (((XmDragContextRec *)(w))->drag.forceIPC) 817 818 #define DC_ServerGrabbed(w) \ 819 (((XmDragContextRec *)(w))->drag.serverGrabbed) 820 821 #define DC_UseLocal(w) \ 822 (((XmDragContextRec *)(w))->drag.useLocal) 823 824 #define DC_InDropSite(w) \ 825 (((XmDragContextRec *)(w))->drag.inDropSite) 826 827 #define DC_DragTimerId(w) \ 828 (((XmDragContextRec *)(w))->drag.dragTimerId) 829 830 #define DC_RoundOffTime(w) \ 831 (((XmDragContextRec *)(w))->drag.roundOffTime) 832 833 #define DC_LastChangeTime(w) \ 834 (((XmDragContextRec *)(w))->drag.lastChangeTime) 835 836 #define DC_CrossingTime(w) \ 837 (((XmDragContextRec *)(w))->drag.crossingTime) 838 839 #define DC_RoundOffTime(w) \ 840 (((XmDragContextRec *)(w))->drag.roundOffTime) 841 842 #define DC_DragFinishTime(w) \ 843 (((XmDragContextRec *)(w))->drag.dragFinishTime) 844 845 #define DC_DropFinishTime(w) \ 846 (((XmDragContextRec *)(w))->drag.dropFinishTime) 847 848 #define DC_DropSelection(w) \ 849 (((XmDragContextRec *)(w))->drag.dropSelection) 850 851 #define DC_SrcShell(w) \ 852 (((XmDragContextRec *)(w))->drag.srcShell) 853 854 #define DC_StartX(w) \ 855 (((XmDragContextRec *)(w))->drag.startX) 856 857 #define DC_StartY(w) \ 858 (((XmDragContextRec *)(w))->drag.startY) 859 860 #define DC_SiteID(w) \ 861 (((XmDragContextRec *)(w))->drag.siteID) 862 863 #define DC_CurrScreen(w) \ 864 (((XmDragContextRec *)(w))->drag.currScreen) 865 866 #define DC_CurrWmRoot(w) \ 867 (((XmDragContextRec *)(w))->drag.currWmRoot) 868 869 #define DC_CurDragOver(w) \ 870 (((XmDragContextRec *)(w))->drag.curDragOver) 871 872 #define DC_OrigDragOver(w) \ 873 (((XmDragContextRec *)(w))->drag.origDragOver) 874 875 #define DC_CurrReceiverInfo(w) \ 876 (((XmDragContextRec *)(w))->drag.currReceiverInfo) 877 878 #define DC_RootReceiverInfo(w) \ 879 (((XmDragContextRec *)(w))->drag.rootReceiverInfo) 880 881 #define DC_ReceiverInfos(w) \ 882 (((XmDragContextRec *)(w))->drag.receiverInfos) 883 884 #define DC_NumReceiverInfos(w) \ 885 (((XmDragContextRec *)(w))->drag.numReceiverInfos) 886 887 #define DC_MaxReceiverInfos(w) \ 888 (((XmDragContextRec *)(w))->drag.maxReceiverInfos) 889 890 #define DC_TrackingMode(w) \ 891 (((XmDragContextRec *)(w))->drag.trackingMode) 892 893 #define DC_ActiveProtocolStyle(w) \ 894 (((XmDragContextRec *)(w))->drag.activeProtocolStyle) 895 896 #define DC_ActiveBlendModel(w) \ 897 (((XmDragContextRec *)(w))->drag.activeBlendModel) 898 899 /* 900 * and for the class 901 */ 902 #define DCC_DragStartProc(wc) \ 903 (((XmDragContextClassRec *)(wc))->drag_class.start) 904 905 #define DCC_DragCancelProc(wc) \ 906 (((XmDragContextClassRec *)(wc))->drag_class.cancel) 907 908 909 /* 910 * DRAG ICON OBJECT ACCESS MACROS 911 */ 912 #define DI_Depth(w) \ 913 (((XmDragIconRec *)(w))->drag.depth) 914 915 #define DI_Pixmap(w) \ 916 (((XmDragIconRec *)(w))->drag.pixmap) 917 918 #define DI_Width(w) \ 919 (((XmDragIconRec *)(w))->drag.width) 920 921 #define DI_Height(w) \ 922 (((XmDragIconRec *)(w))->drag.height) 923 924 #define DI_Mask(w) \ 925 (((XmDragIconRec *)(w))->drag.mask) 926 927 #define DI_HotX(w) \ 928 (((XmDragIconRec *)(w))->drag.hot_x) 929 930 #define DI_HotY(w) \ 931 (((XmDragIconRec *)(w))->drag.hot_y) 932 933 #define DI_Attachment(w) \ 934 (((XmDragIconRec *)(w))->drag.attachment) 935 936 #define DI_IsDirty(w) \ 937 (((XmDragIconRec *)(w))->drag.isDirty) 938 939 #define DI_Region(w) \ 940 (((XmDragIconRec *)(w))->drag.region) 941 942 #define DI_RestoreRegion(w) \ 943 (((XmDragIconRec *)(w))->drag.restore_region) 944 945 #define DI_XOffset(w) \ 946 (((XmDragIconRec *)(w))->drag.x_offset) 947 948 #define DI_YOffset(w) \ 949 (((XmDragIconRec *)(w))->drag.y_offset) 950 951 #define DI_OffsetX(w) \ 952 (((XmDragIconRec *)(w))->drag.offset_x) 953 954 #define DI_OffsetY(w) \ 955 (((XmDragIconRec *)(w))->drag.offset_y) 956 957 958 /* 959 * DRAG OVER WIDGET MACROS 960 */ 961 #define DO_HotX(w) \ 962 (((XmDragOverShellRec *)(w))->drag.hotX) 963 964 #define DO_HotY(w) \ 965 (((XmDragOverShellRec *)(w))->drag.hotY) 966 967 #define DO_CursorState(w) \ 968 (((XmDragOverShellRec *)(w))->drag.cursorState) 969 970 #define DO_Mode(w) \ 971 (((XmDragOverShellRec *)(w))->drag.mode) 972 973 #define DO_ActiveMode(w) \ 974 (((XmDragOverShellRec *)(w))->drag.activeMode) 975 976 #define DO_InitialX(w) \ 977 (((XmDragOverShellRec *)(w))->drag.initialX) 978 979 #define DO_InitialY(w) \ 980 (((XmDragOverShellRec *)(w))->drag.initialY) 981 982 #define DO_StateIcon(w) \ 983 (((XmDragOverShellRec *)(w))->drag.stateIcon) 984 985 #define DO_OpIcon(w) \ 986 (((XmDragOverShellRec *)(w))->drag.opIcon) 987 988 #define DO_CursorBlend(w) \ 989 (((XmDragOverShellRec *)(w))->drag.cursorBlend) 990 991 #define DO_RootBlend(w) \ 992 (((XmDragOverShellRec *)(w))->drag.rootBlend) 993 994 #define DO_CursorForeground(w) \ 995 (((XmDragOverShellRec *)(w))->drag.cursorForeground) 996 997 #define DO_CursorBackground(w) \ 998 (((XmDragOverShellRec *)(w))->drag.cursorBackground) 999 1000 #define DO_NCCursor(w) \ 1001 (((XmDragOverShellRec *)(w))->drag.ncCursor) 1002 1003 #define DO_ActiveCursor(w) \ 1004 (((XmDragOverShellRec *)(w))->drag.activeCursor) 1005 1006 #define DO_Backing(w) \ 1007 (((XmDragOverShellRec *)(w))->drag.backing) 1008 1009 #define DO_TmpPix(w) \ 1010 (((XmDragOverShellRec *)(w))->drag.tmpPix) 1011 1012 #define DO_TmpBit(w) \ 1013 (((XmDragOverShellRec *)(w))->drag.tmpBit) 1014 1015 #define DO_IsVisible(w) \ 1016 (((XmDragOverShellRec *)(w))->drag.isVisible) 1017 1018 1019 /* 1020 * DROP SITE MANAGER OBJECT MACROS 1021 */ 1022 #define DS_NotifyProc(w) \ 1023 (((XmDropSiteManagerRec *)(w))->dropManager.notifyProc) 1024 1025 #define DS_TreeUpdateProc(w) \ 1026 (((XmDropSiteManagerRec *)(w))->dropManager.treeUpdateProc) 1027 1028 #define DS_ClientData(w) \ 1029 (((XmDropSiteManagerRec *)(w))->dropManager.client_data) 1030 1031 #define DS_DragUnderData(w) \ 1032 (((XmDropSiteManagerRec *)(w))->dropManager.dragUnderData) 1033 1034 #define DS_CurInfo(w) \ 1035 (((XmDropSiteManagerRec *)(w))->dropManager.curInfo) 1036 1037 #define DS_CurTime(w) \ 1038 (((XmDropSiteManagerRec *)(w))->dropManager.curTime) 1039 1040 #define DS_CurX(w) \ 1041 (((XmDropSiteManagerRec *)(w))->dropManager.curX) 1042 1043 #define DS_CurY(w) \ 1044 (((XmDropSiteManagerRec *)(w))->dropManager.curY) 1045 1046 #define DS_OldX(w) \ 1047 (((XmDropSiteManagerRec *)(w))->dropManager.oldX) 1048 1049 #define DS_OldY(w) \ 1050 (((XmDropSiteManagerRec *)(w))->dropManager.oldY) 1051 1052 #define DS_CurDropSiteStatus(w) \ 1053 (((XmDropSiteManagerRec *)(w))->dropManager.curDropSiteStatus) 1054 1055 #define DS_CurDragContext(w) \ 1056 (((XmDropSiteManagerRec *)(w))->dropManager.curDragContext) 1057 1058 #define DS_CurAnimate(w) \ 1059 (((XmDropSiteManagerRec *)(w))->dropManager.curAnimate) 1060 1061 #define DS_CurOperations(w) \ 1062 (((XmDropSiteManagerRec *)(w))->dropManager.curOperations) 1063 1064 #define DS_CurOperation(w) \ 1065 (((XmDropSiteManagerRec *)(w))->dropManager.curOperation) 1066 1067 #define DS_CurAncestorClipRegion(w) \ 1068 (((XmDropSiteManagerRec *)(w))->dropManager.curAncestorClipRegion) 1069 1070 #define DS_NewAncestorClipRegion(w) \ 1071 (((XmDropSiteManagerRec *)(w))->dropManager.curAncestorClipRegion) 1072 1073 #define DS_DSTable(w) \ 1074 (((XmDropSiteManagerRec *)(w))->dropManager.dsTable) 1075 1076 #define DS_DSRoot(w) \ 1077 (((XmDropSiteManagerRec *)(w))->dropManager.dsRoot) 1078 1079 #define DS_RootX(w) \ 1080 (((XmDropSiteManagerRec *)(w))->dropManager.rootX) 1081 1082 #define DS_RootY(w) \ 1083 (((XmDropSiteManagerRec *)(w))->dropManager.rootY) 1084 1085 #define DS_RootWidth(w) \ 1086 (((XmDropSiteManagerRec *)(w))->dropManager.rootW) 1087 1088 #define DS_RootHeight(w) \ 1089 (((XmDropSiteManagerRec *)(w))->dropManager.rootH) 1090 1091 #define DS_ClipperList(w) \ 1092 (((XmDropSiteManagerRec *)(w))->dropManager.clipperList) 1093 1094 #define DS_UpdateInfo(w) \ 1095 (((XmDropSiteManagerRec *)(w))->dropManager.updateInfo) 1096 1097 /* 1098 * a few for the class record 1099 */ 1100 #define DSC_CreateInfoProc(wc) \ 1101 (((XmDropSiteManagerClassRec *)(wc))->dropManager_class.createInfo) 1102 1103 #define DSC_DestroyInfoProc(wc) \ 1104 (((XmDropSiteManagerClassRec *)(wc))->dropManager_class.destroyInfo) 1105 1106 #define DSC_StartUpdateProc(wc) \ 1107 (((XmDropSiteManagerClassRec *)(wc))->dropManager_class.startUpdate) 1108 1109 #define DSC_RetrieveInfoProc(wc) \ 1110 (((XmDropSiteManagerClassRec *)(wc))->dropManager_class.retrieveInfo) 1111 1112 #define DSC_UpdateInfoProc(wc) \ 1113 (((XmDropSiteManagerClassRec *)(wc))->dropManager_class.updateInfo) 1114 1115 #define DSC_EndUpdateProc(wc) \ 1116 (((XmDropSiteManagerClassRec *)(wc))->dropManager_class.endUpdate) 1117 1118 #define DSC_UpdateProc(wc) \ 1119 (((XmDropSiteManagerClassRec *)(wc))->dropManager_class.updateDSM) 1120 1121 #define DSC_ProcessMotionProc(wc) \ 1122 (((XmDropSiteManagerClassRec *)(wc))->dropManager_class.processMotion) 1123 1124 #define DSC_ProcessDropProc(wc) \ 1125 (((XmDropSiteManagerClassRec *)(wc))->dropManager_class.processDrop) 1126 1127 #define DSC_OperationChangedProc(wc) \ 1128 (((XmDropSiteManagerClassRec *)(wc))->dropManager_class.operationChanged) 1129 1130 #define DSC_ChangeRootProc(wc) \ 1131 (((XmDropSiteManagerClassRec *)(wc))->dropManager_class.changeRoot) 1132 1133 #define DSC_InsertInfoProc(wc) \ 1134 (((XmDropSiteManagerClassRec *)(wc))->dropManager_class.insertInfo) 1135 1136 #define DSC_RemoveInfoProc(wc) \ 1137 (((XmDropSiteManagerClassRec *)(wc))->dropManager_class.removeInfo) 1138 1139 #define DSC_SyncTreeProc(wc) \ 1140 (((XmDropSiteManagerClassRec *)(wc))->dropManager_class.syncTree) 1141 1142 #define DSC_GetTreeFromDSMProc(wc) \ 1143 (((XmDropSiteManagerClassRec *)(wc))->dropManager_class.getTreeFromDSM) 1144 1145 #define DSC_CreateDSInfoTable(wc) \ 1146 (((XmDropSiteManagerClassRec *)(wc))->dropManager_class.createTable) 1147 1148 #define DSC_DestroyDSInfoTable(wc) \ 1149 (((XmDropSiteManagerClassRec *)(wc))->dropManager_class.destroyTable) 1150 1151 #define DSC_RegisterInfoProc(wc) \ 1152 (((XmDropSiteManagerClassRec *)(wc))->dropManager_class.registerInfo) 1153 1154 #define DSC_WidgetToInfoProc(wc) \ 1155 (((XmDropSiteManagerClassRec *)(wc))->dropManager_class.widgetToInfo) 1156 1157 #define DSC_UnregisterInfoProc(wc) \ 1158 (((XmDropSiteManagerClassRec *)(wc))->dropManager_class.unregisterInfo) 1159 1160 1161 /* 1162 * DROP TRANSFER OBJECT ACCESS MACROS 1163 */ 1164 #define DT_DropTransfers(w) \ 1165 (((XmDropTransferRec *)(w))->dropTransfer.drop_transfers) 1166 1167 #define DT_NumDropTransfers(w) \ 1168 (((XmDropTransferRec *)(w))->dropTransfer.num_drop_transfers) 1169 1170 #define DT_Selection(w) \ 1171 (((XmDropTransferRec *)(w))->dropTransfer.selection) 1172 1173 #define DT_DragContext(w) \ 1174 (((XmDropTransferRec *)(w))->dropTransfer.dragContext) 1175 1176 #define DT_Timestamp(w) \ 1177 (((XmDropTransferRec *)(w))->dropTransfer.timestamp) 1178 1179 #define DT_Incremental(w) \ 1180 (((XmDropTransferRec *)(w))->dropTransfer.incremental) 1181 1182 #define DT_SourceWindow(w) \ 1183 (((XmDropTransferRec *)(w))->dropTransfer.source_window) 1184 1185 #define DT_Tag(w) \ 1186 (((XmDropTransferRec *)(w))->dropTransfer.tag) 1187 1188 #define DT_TransferCallback(w) \ 1189 (((XmDropTransferRec *)(w))->dropTransfer.transfer_callback) 1190 1191 #define DT_TransferStatus(w) \ 1192 (((XmDropTransferRec *)(w))->dropTransfer.transfer_status) 1193 1194 #define DT_MotifDropAtom(w) \ 1195 (((XmDropTransferRec *)(w))->dropTransfer.motif_drop_atom) 1196 1197 #define DT_DropTransferLists(w) \ 1198 (((XmDropTransferRec *)(w))->dropTransfer.drop_transfer_lists) 1199 1200 #define DT_NumDropTransferLists(w) \ 1201 (((XmDropTransferRec *)(w))->dropTransfer.num_drop_transfer_lists) 1202 1203 #define DT_CurDropTransferList(w) \ 1204 (((XmDropTransferRec *)(w))->dropTransfer.cur_drop_transfer_list) 1205 1206 #define DT_CurXfer(w) \ 1207 (((XmDropTransferRec *)(w))->dropTransfer.cur_xfer) 1208 1209 #define DT_CurTargets(w) \ 1210 (((XmDropTransferRec *)(w))->dropTransfer.cur_targets) 1211 1212 #define DT_CurClientData(w) \ 1213 (((XmDropTransferRec *)(w))->dropTransfer.cur_client_data) 1214 1215 /* 1216 * a few for the class record 1217 */ 1218 #define DTC_StartTransferProc(wc) \ 1219 (((XmDropTransferClassRec *)(wc))->dropTransfer_class.start_drop_transfer) 1220 1221 #define DTC_AddTransferProc(wc) \ 1222 (((XmDropTransferClassRec *)(wc))->dropTransfer_class.add_drop_transfer) 1223 1224 1225 /* 1226 * FORM MACROS 1227 */ 1228 #define Form_HorizSpacing(w) \ 1229 (((XmFormRec *)(w))->form.horizontal_spacing) 1230 1231 #define Form_VertSpacing(w) \ 1232 (((XmFormRec *)(w))->form.vertical_spacing) 1233 1234 #define Form_FractionBase(w) \ 1235 (((XmFormRec *)(w))->form.fraction_base) 1236 1237 #define Form_RubberPos(w) \ 1238 (((XmFormRec *)(w))->form.rubber_positioning) 1239 1240 #define Form_FirstChild(w) \ 1241 (((XmFormRec *)(w))->form.first_child) 1242 1243 #define Form_InitialWidth(w) \ 1244 (((XmFormRec *)(w))->form.initial_width) 1245 1246 #define Form_InitialHeight(w) \ 1247 (((XmFormRec *)(w))->form.initial_height) 1248 1249 #define Form_ProcessingConstraints(w) \ 1250 (((XmFormRec *)(w))->form.processing_constraints) 1251 1252 /* constraint_macros */ 1253 #define FormC_Atta(w, i) \ 1254 (((XmFormConstraintRec *)((w)->core.constraints))->form.att[(i)]) 1255 1256 #define FormC_NextSib(w) \ 1257 (((XmFormConstraintRec *)((w)->core.constraints))->form.next_sibling) 1258 1259 #define FormC_Sorted(w) \ 1260 (((XmFormConstraintRec *)((w)->core.constraints))->form.sorted) 1261 1262 #define FormC_Resizable(w) \ 1263 (((XmFormConstraintRec *)((w)->core.constraints))->form.resizable) 1264 1265 #define FormC_PrefW(w) \ 1266 (((XmFormConstraintRec *)((w)->core.constraints))->form.preferred_width) 1267 1268 #define FormC_PrefH(w) \ 1269 (((XmFormConstraintRec *)((w)->core.constraints))->form.preferred_height) 1270 1271 #define FormC_X(w) \ 1272 (((XmFormConstraintRec *)((w)->core.constraints))->form.att[0].value) 1273 1274 #define FormC_Y(w) \ 1275 (((XmFormConstraintRec *)((w)->core.constraints))->form.att[2].value) 1276 1277 #define FormC_W(x) \ 1278 (((XmFormConstraintRec *)((x)->core.constraints))->form.att[1].value) 1279 1280 #define FormC_H(w) \ 1281 (((XmFormConstraintRec *)((w)->core.constraints))->form.att[3].value) 1282 1283 #define FormC_WFS(w) \ 1284 (((XmFormConstraintRec *)((w)->core.constraints))->form.width_from_side) 1285 1286 #define FormC_HFS(w) \ 1287 (((XmFormConstraintRec *)((w)->core.constraints))->form.height_from_side) 1288 1289 /* different look */ 1290 #define FCP_Atta(c, i) \ 1291 (((XmFormConstraintRec *)(c))->form.att[(i)]) 1292 1293 #define FCP_NextSib(c) \ 1294 (((XmFormConstraintRec *)(c))->form.next_sibling) 1295 1296 #define FCP_Sorted(c) \ 1297 (((XmFormConstraintRec *)(c))->form.sorted) 1298 1299 #define FCP_Resizable(c) \ 1300 (((XmFormConstraintRec *)(c))->form.resizable) 1301 1302 #define FCP_PrefW(c) \ 1303 (((XmFormConstraintRec *)(c))->form.preferred_width) 1304 1305 #define FCP_PrefH(c) \ 1306 (((XmFormConstraintRec *)(c))->form.preferred_height) 1307 1308 #define FCP_X(c) \ 1309 (((XmFormConstraintRec *)(c))->form.att[0].value) 1310 1311 #define FCP_Y(c) \ 1312 (((XmFormConstraintRec *)(c))->form.att[2].value) 1313 1314 #define FCP_W(c) \ 1315 (((XmFormConstraintRec *)(c))->form.att[1].value) 1316 1317 #define FCP_H(c) \ 1318 (((XmFormConstraintRec *)(c))->form.att[3].value) 1319 1320 #if 0 1321 #define FCP_WidthFromSide(c) \ 1322 (((XmFormConstraintRec *)(c))->form.width_from_side) 1323 1324 #define FCP_HeightFromSide(c) \ 1325 (((XmFormConstraintRec *)(c))->form.height_from_side) 1326 #endif 1327 1328 /* 1329 * FILE SELECTIONBOX WIDGET ACCESS MACROS 1330 */ 1331 #define FS_DirSpec(w) \ 1332 SB_TextString(w) 1333 1334 #define FS_FileListLabelString(w) \ 1335 SB_ListLabelString(w) 1336 1337 /* 1338 * FRAME WIDGET ACCESS MACROS 1339 */ 1340 #define Frame_MarginWidth(w) \ 1341 (((XmFrameWidget)w)->frame.margin_width) 1342 1343 #define Frame_MarginHeight(w) \ 1344 (((XmFrameWidget)w)->frame.margin_height) 1345 1346 #define Frame_ShadowType(w) \ 1347 (((XmFrameWidget)w)->frame.shadow_type) 1348 1349 #define Frame_OldWidth(w) \ 1350 (((XmFrameWidget)w)->frame.old_width) 1351 1352 #define Frame_OldHeight(w) \ 1353 (((XmFrameWidget)w)->frame.old_height) 1354 1355 #define Frame_OldShadowThickness(w) \ 1356 (((XmFrameWidget)w)->frame.old_shadow_thickness) 1357 1358 #define Frame_OldShadowX(w) \ 1359 (((XmFrameWidget)w)->frame.old_shadow_x) 1360 1361 #define Frame_OldShadowY(w) \ 1362 (((XmFrameWidget)w)->frame.old_shadow_y) 1363 1364 #define Frame_WorkArea(w) \ 1365 (((XmFrameWidget)w)->frame.work_area) 1366 1367 #define Frame_TitleArea(w) \ 1368 (((XmFrameWidget)w)->frame.title_area) 1369 1370 #define Frame_ProcessingConstraints(w) \ 1371 (((XmFrameWidget)w)->frame.processing_constraints) 1372 1373 /* constraint macros */ 1374 #define FrameC_ChildType(w) \ 1375 (((XmFrameConstraintPtr)((w)->core.constraints))->frame.child_type) 1376 1377 #define FrameC_ChildHAlignment(w) \ 1378 (((XmFrameConstraintPtr)((w)->core.constraints))->frame.child_h_alignment) 1379 1380 #define FrameC_ChildHSpacing(w) \ 1381 (((XmFrameConstraintPtr)((w)->core.constraints))->frame.child_h_spacing) 1382 1383 #define FrameC_ChildVAlignment(w) \ 1384 (((XmFrameConstraintPtr)((w)->core.constraints))->frame.child_v_alignment) 1385 1386 /* 1387 * LABEL WIDGET ACCESS MACROS 1388 */ 1389 #define Lab_RecomputeSize(w) \ 1390 (((XmLabelWidget)(w))->label.recompute_size) 1391 1392 #define Lab_Label(w) \ 1393 (((XmLabelWidget)(w))->label._label) 1394 1395 #define Lab_MnemonicCharset(w) \ 1396 (((XmLabelWidget)(w))->label.mnemonicCharset) 1397 1398 #define Lab_Alignment(w) \ 1399 (((XmLabelWidget)(w))->label.alignment) 1400 1401 #define Lab_Pixmap(w) \ 1402 (((XmLabelWidget)(w))->label.pixmap) 1403 1404 #define Lab_PixmapInsensitive(w) \ 1405 (((XmLabelWidget)(w))->label.pixmap_insen) 1406 1407 #define Lab_LabelType(w) \ 1408 (((XmLabelWidget)(w))->label.label_type) 1409 1410 #define Lab_NormalGC(w) \ 1411 (((XmLabelWidget)(w))->label.normal_GC) 1412 1413 #define Lab_InsensitiveGC(w) \ 1414 (((XmLabelWidget)(w))->label.insensitive_GC) 1415 1416 #define Lab_StringDirection(w) \ 1417 (((XmLabelWidget)(w))->label.string_direction) 1418 1419 #define Lab_AccTextRect(w) \ 1420 (((XmLabelWidget)(w))->label.acc_TextRect) 1421 1422 #define Lab_SkipCallback(w) \ 1423 (((XmLabelWidget)(w))->label.skipCallback) 1424 1425 /* Class macros */ 1426 #define LabClass_SetOverrideCallback(c) \ 1427 (((XmLabelWidgetClass)(c))->label_class.setOverrideCallback) 1428 1429 #define LabClass_MenuProcs(c) \ 1430 (((XmLabelWidgetClass)(c))->label_class.menuProcs) 1431 1432 #define LabClass_Translations(c) \ 1433 (((XmLabelWidgetClass)(c))->label_class.translations) 1434 1435 /* 1436 * LIST WIDGET ACCESS MACROS 1437 */ 1438 #define List_InternalList(w) \ 1439 (((XmListWidget)(w))->list.InternalList) 1440 1441 #define List_Event(w) \ 1442 (((XmListWidget)(w))->list.Event) 1443 1444 #define List_LastItem(w) \ 1445 (((XmListWidget)(w))->list.LastItem) 1446 1447 #define List_FontHeight(w) \ 1448 (((XmListWidget)(w))->list.FontHeight) 1449 1450 #define List_AutoSelect(w) \ 1451 (((XmListWidget)(w))->list.AutoSelect) 1452 1453 #define List_DidSelection(w) \ 1454 (((XmListWidget)(w))->list.DidSelection) 1455 1456 #define List_FromSetSB(w) \ 1457 (((XmListWidget)(w))->list.FromSetSB) 1458 1459 #define List_FromSetNewSize(w) \ 1460 (((XmListWidget)(w))->list.FromSetNewSize) 1461 1462 #define List_LeaveDir(w) \ 1463 (((XmListWidget)(w))->list.LeaveDir) 1464 1465 #define List_BrowseCallback(w) \ 1466 (((XmListWidget)(w))->list.BrowseCallback) 1467 1468 #define List_ExtendCallback(w) \ 1469 (((XmListWidget)(w))->list.ExtendCallback) 1470 1471 #define List_DefaultCallback(w) \ 1472 (((XmListWidget)(w))->list.DefaultCallback) 1473 1474 #define List_ClickInterval(w) \ 1475 (((XmListWidget)(w))->list.ClickInterval) 1476 1477 #define List_DragID(w) \ 1478 (((XmListWidget)(w))->list.DragID) 1479 1480 #define List_Font(w) \ 1481 (((XmListWidget)(w))->list.font) 1482 1483 #define List_ItemCount(w) \ 1484 (((XmListWidget)(w))->list.itemCount) 1485 1486 #define List_SelectedItemCount(w) \ 1487 (((XmListWidget)(w))->list.selectedItemCount) 1488 1489 #define List_VisibleItemCount(w) \ 1490 (((XmListWidget)(w))->list.visibleItemCount) 1491 1492 #define List_LastSetVizCount(w) \ 1493 (((XmListWidget)(w))->list.LastSetVizCount) 1494 1495 #define List_Items(w) \ 1496 (((XmListWidget)(w))->list.items) 1497 1498 #define List_SelectedItems(w) \ 1499 (((XmListWidget)(w))->list.selectedItems) 1500 1501 #if XmVERSION > 1 1502 #define List_SelectedIndices(w) \ 1503 (((XmListWidget)(w))->list.selectedPositions) 1504 #else 1505 #define List_SelectedIndices(w) \ 1506 (((XmListWidget)(w))->list.selectedIndices) 1507 #endif 1508 1509 #define List_MarginHeight(w) \ 1510 (((XmListWidget)(w))->list.margin_height) 1511 1512 #define List_MarginWidth(w) \ 1513 (((XmListWidget)(w))->list.margin_width) 1514 1515 #define List_SizePolicy(w) \ 1516 (((XmListWidget)(w))->list.SizePolicy) 1517 1518 #define List_ItemSpacing(w) \ 1519 (((XmListWidget)(w))->list.ItemSpacing) 1520 1521 #define List_Spacing(w) \ 1522 (((XmListWidget)(w))->list.spacing) 1523 1524 #define List_MultipleCallback(w) \ 1525 (((XmListWidget)(w))->list.MultipleCallback) 1526 1527 #define List_SingleCallback(w) \ 1528 (((XmListWidget)(w))->list.SingleCallback) 1529 1530 #define List_SBDisplayPolicy(w) \ 1531 (((XmListWidget)(w))->list.ScrollBarDisplayPolicy) 1532 1533 #define List_SelectionPolicy(w) \ 1534 (((XmListWidget)(w))->list.SelectionPolicy) 1535 1536 #define List_StrDir(w) \ 1537 (((XmListWidget)(w))->list.StrDir) 1538 1539 #define List_TopPosition(w) \ 1540 (((XmListWidget)(w))->list.top_position) 1541 1542 #define List_AddMode(w) \ 1543 (((XmListWidget)(w))->list.AddMode) 1544 1545 #define List_NormalGC(w) \ 1546 (((XmListWidget)(w))->list.NormalGC) 1547 1548 #define List_InsensitiveGC(w) \ 1549 (((XmListWidget)(w))->list.InsensitiveGC) 1550 1551 #define List_InverseGC(w) \ 1552 (((XmListWidget)(w))->list.InverseGC) 1553 1554 #define List_HighlightGC(w) \ 1555 (((XmListWidget)(w))->list.HighlightGC) 1556 1557 #define List_DashTile(w) \ 1558 (((XmListWidget)(w))->list.DashTile) 1559 1560 #define List_HighlightThickness(w) \ 1561 (((XmListWidget)(w))->list.HighlightThickness) 1562 1563 #define List_LastHLItem(w) \ 1564 (((XmListWidget)(w))->list.LastHLItem) 1565 1566 #define List_StartItem(w) \ 1567 (((XmListWidget)(w))->list.StartItem) 1568 1569 #define List_OldStartItem(w) \ 1570 (((XmListWidget)(w))->list.OldStartItem) 1571 1572 #define List_EndItem(w) \ 1573 (((XmListWidget)(w))->list.EndItem) 1574 1575 #define List_OldEndItem(w) \ 1576 (((XmListWidget)(w))->list.OldEndItem) 1577 1578 #define List_BaseX(w) \ 1579 (((XmListWidget)(w))->list.BaseX) 1580 1581 #define List_BaseY(w) \ 1582 (((XmListWidget)(w))->list.BaseY) 1583 1584 #define List_MouseMoved(w) \ 1585 (((XmListWidget)(w))->list.MouseMoved) 1586 1587 #define List_AppendInProgress(w) \ 1588 (((XmListWidget)(w))->list.AppendInProgress) 1589 1590 #define List_Traversing(w) \ 1591 (((XmListWidget)(w))->list.Traversing) 1592 1593 #define List_KbdSelection(w) \ 1594 (((XmListWidget)(w))->list.KbdSelection) 1595 1596 #define List_DownCount(w) \ 1597 (((XmListWidget)(w))->list.DownCount) 1598 1599 #define List_DownTime(w) \ 1600 (((XmListWidget)(w))->list.DownTime) 1601 1602 #define List_CurrentKbdItem(w) \ 1603 (((XmListWidget)(w))->list.CurrentKbdItem) 1604 1605 #define List_SelectionType(w) \ 1606 (((XmListWidget)(w))->list.SelectionType) 1607 1608 #define List_MaxWidth(w) \ 1609 (((XmListWidget)(w))->list.MaxWidth) 1610 1611 #define List_CharWidth(w) \ 1612 (((XmListWidget)(w))->list.CharWidth) 1613 1614 #define List_XOrigin(w) \ 1615 (((XmListWidget)(w))->list.XOrigin) 1616 1617 #define List_MaxItemHeight(w) \ 1618 (((XmListWidget)(w))->list.MaxItemHeight) 1619 1620 #define List_IsScrolledList(w) \ 1621 (((XmListWidget)(w))->list.Mom != NULL) 1622 1623 #define List_HSB(w) \ 1624 (((XmListWidget)(w))->list.hScrollBar) 1625 1626 #define List_Hmax(w) \ 1627 (((XmListWidget)(w))->list.hmax) 1628 1629 #define List_Horigin(w) \ 1630 (((XmListWidget)(w))->list.hOrigin) 1631 1632 #define List_Hextent(w) \ 1633 (((XmListWidget)(w))->list.hExtent) 1634 1635 #define List_Hmin(w) \ 1636 (((XmListWidget)(w))->list.hmin) 1637 1638 #define List_Mom(w) \ 1639 (((XmListWidget)(w))->list.Mom) 1640 1641 #define List_VSB(w) \ 1642 (((XmListWidget)(w))->list.vScrollBar) 1643 1644 #define List_Vmax(w) \ 1645 (((XmListWidget)(w))->list.vmax) 1646 1647 #define List_Vmin(w) \ 1648 (((XmListWidget)(w))->list.vmin) 1649 1650 #define List_Vorigin(w) \ 1651 (((XmListWidget)(w))->list.vOrigin) 1652 1653 #define List_Vextent(w) \ 1654 (((XmListWidget)(w))->list.vExtent) 1655 1656 /* 1657 * MAINWINDOW WIDGET ACCESS MACROS 1658 */ 1659 #define MW_AreaWidth(w) \ 1660 (((XmMainWindowWidget)w)->mwindow.AreaWidth) 1661 1662 #define MW_AreaHeight(w) \ 1663 (((XmMainWindowWidget)w)->mwindow.AreaHeight) 1664 1665 #define MW_MarginWidth(w) \ 1666 (((XmMainWindowWidget)w)->mwindow.margin_width) 1667 1668 #define MW_MarginHeight(w) \ 1669 (((XmMainWindowWidget)w)->mwindow.margin_height) 1670 1671 #define MW_CommandWindow(w) \ 1672 (((XmMainWindowWidget)w)->mwindow.CommandWindow) 1673 1674 #define MW_MenuBar(w) \ 1675 (((XmMainWindowWidget)w)->mwindow.MenuBar) 1676 1677 #define MW_MessageWindow(w) \ 1678 (((XmMainWindowWidget)w)->mwindow.Message) 1679 1680 #define MW_CommandLoc(w) \ 1681 (((XmMainWindowWidget)w)->mwindow.CommandLoc) 1682 1683 #define MW_Sep1(w) \ 1684 (((XmMainWindowWidget)w)->mwindow.Sep1) 1685 1686 #define MW_Sep2(w) \ 1687 (((XmMainWindowWidget)w)->mwindow.Sep2) 1688 1689 #define MW_Sep3(w) \ 1690 (((XmMainWindowWidget)w)->mwindow.Sep3) 1691 1692 #define MW_ShowSep(w) \ 1693 (((XmMainWindowWidget)w)->mwindow.ShowSep) 1694 1695 /* 1696 * MESSAGE BOX WIDGET ACCESS MACROS 1697 */ 1698 #define MB_DialogType(w) \ 1699 (((XmMessageBoxWidget)w)->message_box.dialog_type) 1700 1701 #define MB_DefaultType(w) \ 1702 (((XmMessageBoxWidget)w)->message_box.default_type) 1703 1704 #define MB_MessageString(w) \ 1705 (((XmMessageBoxWidget)w)->message_box.message_string) 1706 1707 #define MB_OKLabelString(w) \ 1708 (((XmMessageBoxWidget)w)->message_box.ok_label_string) 1709 1710 #define MB_OKButton(w) \ 1711 (((XmMessageBoxWidget)w)->message_box.ok_button) 1712 1713 #define MB_OKCall(w) \ 1714 (((XmMessageBoxWidget)w)->message_box.ok_callback) 1715 1716 #define MB_CancelLabelString(w) \ 1717 (((XmMessageBoxWidget)w)->message_box.cancel_label_string) 1718 1719 #define MB_CancelCall(w) \ 1720 (((XmMessageBoxWidget)w)->message_box.cancel_callback) 1721 1722 #define MB_HelpLabelString(w) \ 1723 (((XmMessageBoxWidget)w)->message_box.help_label_string) 1724 1725 #define MB_HelpButton(w) \ 1726 (((XmMessageBoxWidget)w)->message_box.help_button) 1727 1728 #define MB_Symbol(w) \ 1729 (((XmMessageBoxWidget)w)->message_box.symbol_wid) 1730 1731 #define MB_SymbolPixmap(w) \ 1732 (((XmMessageBoxWidget)w)->message_box.symbol_pixmap) 1733 1734 #define MB_Separator(w) \ 1735 (((XmMessageBoxWidget)w)->message_box.separator) 1736 1737 #define MB_MessageAlignment(w) \ 1738 (((XmMessageBoxWidget)w)->message_box.message_alignment) 1739 1740 #define MB_Message(w) \ 1741 (((XmMessageBoxWidget)w)->message_box.message_wid) 1742 1743 #define MB_MessageString(w) \ 1744 (((XmMessageBoxWidget)w)->message_box.message_string) 1745 1746 #define MB_MinimizeButtons(w) \ 1747 (((XmMessageBoxWidget)w)->message_box.minimize_buttons) 1748 1749 /* 1750 * MENUSHELL WIDGET ACCESS MACROS 1751 */ 1752 #define MS_LabelFontList(w) \ 1753 (((XmMenuShellWidget)w)->menu_shell.label_font_list) 1754 1755 #define MS_ButtonFontList(w) \ 1756 (((XmMenuShellWidget)w)->menu_shell.button_font_list) 1757 1758 #define MS_DefaultFontList(w) \ 1759 (((XmMenuShellWidget)w)->menu_shell.default_font_list) 1760 1761 #define MS_FocusData(w) \ 1762 (((XmMenuShellWidget)w)->menu_shell.focus_data) 1763 1764 #define MS_PrivateShell(w) \ 1765 (((XmMenuShellWidget)w)->menu_shell.private_shell) 1766 1767 /* class macros */ 1768 #define MSClass_PopdownOne(w) \ 1769 (((XmMenuShellClassRec *)XtClass(w))->menu_shell_class.popdownOne) 1770 1771 #define MSClass_PopdownEveryone(w) \ 1772 (((XmMenuShellClassRec *)XtClass(w))->menu_shell_class.popdownEveryone) 1773 1774 #define MSClass_PopdownDone(w) \ 1775 (((XmMenuShellClassRec *)XtClass(w))->menu_shell_class.popdownDone) 1776 1777 #define MSClass_PopupSharedMenuPane(w) \ 1778 (((XmMenuShellClassRec *)XtClass(w))->menu_shell_class.popupSharedMenupane) 1779 1780 /* 1781 * PANEDWINDOW WIDGET ACCESS MACROS 1782 */ 1783 #define PW_RefigureMode(w) \ 1784 (((XmPanedWindowWidget)w)->paned_window.refiguremode) 1785 1786 #define PW_SeparatorOn(w) \ 1787 (((XmPanedWindowWidget)w)->paned_window.separator_on) 1788 1789 #define PW_MarginWidth(w) \ 1790 (((XmPanedWindowWidget)w)->paned_window.margin_width) 1791 1792 #define PW_MarginHeight(w) \ 1793 (((XmPanedWindowWidget)w)->paned_window.margin_height) 1794 1795 #define PW_Spacing(w) \ 1796 (((XmPanedWindowWidget)w)->paned_window.spacing) 1797 1798 #define PW_SashWidth(w) \ 1799 (((XmPanedWindowWidget)w)->paned_window.sash_width) 1800 1801 #define PW_SashHeight(w) \ 1802 (((XmPanedWindowWidget)w)->paned_window.sash_height) 1803 1804 #define PW_SashShadowThickness(w) \ 1805 (((XmPanedWindowWidget)w)->paned_window.sash_shadow_thickness) 1806 1807 #define PW_SashIndent(w) \ 1808 (((XmPanedWindowWidget)w)->paned_window.sash_indent) 1809 1810 #define PW_StartY(w) \ 1811 (((XmPanedWindowWidget)w)->paned_window.starty) 1812 1813 #define PW_IncrementCount(w) \ 1814 (((XmPanedWindowWidget)w)->paned_window.increment_count) 1815 1816 #define PW_PaneCount(w) \ 1817 (((XmPanedWindowWidget)w)->paned_window.pane_count) 1818 1819 #define PW_NumSlots(w) \ 1820 (((XmPanedWindowWidget)w)->paned_window.num_slots) 1821 1822 #define PW_NumManagedChildren(w) \ 1823 (((XmPanedWindowWidget)w)->paned_window.num_managed_children) 1824 1825 #define PW_RecursivelyCalled(w) \ 1826 (((XmPanedWindowWidget)w)->paned_window.recursively_called) 1827 1828 #define PW_ResizeAtRealize(w) \ 1829 (((XmPanedWindowWidget)w)->paned_window.resize_at_realize) 1830 1831 #define PW_TopPane(w) \ 1832 (((XmPanedWindowWidget)w)->paned_window.top_pane) 1833 1834 #define PW_BottomPane(w) \ 1835 (((XmPanedWindowWidget)w)->paned_window.bottom_pane) 1836 1837 #define PW_FlipGC(w) \ 1838 (((XmPanedWindowWidget)w)->paned_window.flipgc) 1839 1840 #define PW_ManagedChildren(w) \ 1841 (((XmPanedWindowWidget)w)->paned_window.managed_children) 1842 1843 1844 /* 1845 * constraint shorthand 1846 */ 1847 #define PWC_Position(w) \ 1848 (((XmPanedWindowConstraintPtr)((w)->core.constraints))->panedw.position) 1849 1850 #define PWC_DHeight(w) \ 1851 (((XmPanedWindowConstraintPtr)((w)->core.constraints))->panedw.dheight) 1852 1853 #define PWC_DY(w) \ 1854 (((XmPanedWindowConstraintPtr)((w)->core.constraints))->panedw.dy) 1855 1856 #define PWC_OldDY(w) \ 1857 (((XmPanedWindowConstraintPtr)((w)->core.constraints))->panedw.olddy) 1858 1859 #define PWC_PaneMaximum(w) \ 1860 (((XmPanedWindowConstraintPtr)((w)->core.constraints))->panedw.max) 1861 1862 #define PWC_PaneMinimum(w) \ 1863 (((XmPanedWindowConstraintPtr)((w)->core.constraints))->panedw.min) 1864 1865 #define PWC_IsPane(w) \ 1866 (((XmPanedWindowConstraintPtr)((w)->core.constraints))->panedw.isPane) 1867 1868 #define PWC_AllowResize(w) \ 1869 (((XmPanedWindowConstraintPtr)((w)->core.constraints))->panedw.allow_resize) 1870 1871 #define PWC_SkipAdjust(w) \ 1872 (((XmPanedWindowConstraintPtr)((w)->core.constraints))->panedw.skip_adjust) 1873 1874 #define PWC_Sash(w) \ 1875 (((XmPanedWindowConstraintPtr)((w)->core.constraints))->panedw.sash) 1876 1877 #define PWC_Separator(w) \ 1878 (((XmPanedWindowConstraintPtr)((w)->core.constraints))->panedw.separator) 1879 1880 #define PWC_PositionIndex(w) \ 1881 (((XmPanedWindowConstraintPtr)((w)->core.constraints))->panedw.position_index) 1882 1883 /* 1884 * PUSH BUTTON WIDGET ACCESS MACROS 1885 */ 1886 #define PB_ActivateCallback(w) \ 1887 (((XmPushButtonWidget)(w))->pushbutton.activate_callback) 1888 1889 #define PB_ArmCallback(w) \ 1890 (((XmPushButtonWidget)(w))->pushbutton.arm_callback) 1891 1892 #define PB_DisarmCallback(w) \ 1893 (((XmPushButtonWidget)(w))->pushbutton.disarm_callback) 1894 1895 #define PB_Armed(w) \ 1896 (((XmPushButtonWidget)(w))->pushbutton.armed) 1897 1898 #define PB_ClickCount(w) \ 1899 (((XmPushButtonWidget)(w))->pushbutton.click_count) 1900 1901 #define PB_Compatible(w) \ 1902 (((XmPushButtonWidget)(w))->pushbutton.compatible) 1903 1904 #define PB_ShowAsDefault(w) \ 1905 (((XmPushButtonWidget)(w))->pushbutton.show_as_default) 1906 1907 #define PB_DefaultButtonShadow(w) \ 1908 (((XmPushButtonWidget)(w))->pushbutton.default_button_shadow_thickness) 1909 1910 #define PB_FillOnArm(w) \ 1911 (((XmPushButtonWidget)(w))->pushbutton.fill_on_arm) 1912 1913 #define PB_ArmColor(w) \ 1914 (((XmPushButtonWidget)(w))->pushbutton.arm_color) 1915 1916 #define PB_FillGC(w) \ 1917 (((XmPushButtonWidget)(w))->pushbutton.fill_gc) 1918 1919 #define PB_BackgroundGC(w) \ 1920 (((XmPushButtonWidget)(w))->pushbutton.background_gc) 1921 1922 #define PB_Timer(w) \ 1923 (((XmPushButtonWidget)(w))->pushbutton.timer) 1924 1925 #define PB_ArmTimeStamp(w) \ 1926 (((XmPushButtonWidget)(w))->pushbutton.armTimeStamp) 1927 1928 #define PB_ArmPixmap(w) \ 1929 (((XmPushButtonWidget)(w))->pushbutton.arm_pixmap) 1930 1931 #define PB_UnarmPixmap(w) \ 1932 (((XmPushButtonWidget)(w))->pushbutton.unarm_pixmap) 1933 1934 #define PB_MultiClick(w) \ 1935 (((XmPushButtonWidget)(w))->pushbutton.multiClick) 1936 1937 /* 1938 * PROTOCOL OBJECT ACCESS MACROS 1939 */ 1940 #define Protocol_PreHook(w) \ 1941 (((XmProtocol)(w))->protocol.pre_hook) 1942 1943 #define Protocol_PostHook(w) \ 1944 (((XmProtocol)(w))->protocol.post_hook) 1945 1946 #define Protocol_Callbacks(w) \ 1947 (((XmProtocol)(w))->protocol.callbacks) 1948 1949 #define Protocol_Atom(w) \ 1950 (((XmProtocol)(w))->protocol.atom) 1951 1952 #define Protocol_Active(w) \ 1953 (((XmProtocol)(w))->protocol.active) 1954 1955 /* 1956 * ROWCOLUMN WIDGET ACCESS MACROS 1957 */ 1958 #define RC_OldWidth(m) \ 1959 (((XmRowColumnWidget)(m))->row_column.old_width) 1960 1961 #define RC_OldHeight(m) \ 1962 (((XmRowColumnWidget)(m))->row_column.old_height) 1963 1964 #define RC_OldShadowThickness(m) \ 1965 (((XmRowColumnWidget)(m))->row_column.old_shadow_thickness) 1966 1967 #define RC_LastSelectToplevel(m) \ 1968 (((XmRowColumnWidget)(m))->row_column.lastSelectToplevel) 1969 1970 #define RC_TearOffActivatedCallback(m) \ 1971 (((XmRowColumnWidget)(m))->row_column.tear_off_activated_callback) 1972 1973 #define RC_TearOffDeactivatedCallback(m) \ 1974 (((XmRowColumnWidget)(m))->row_column.tear_off_deactivated_callback) 1975 1976 #define RC_constraint_IndexPosition(w) \ 1977 (((XmRowColumnConstraintRec *)(w)->core.constraints)->row_column.position_index) 1978 1979 #define RC_PostFromList(w) \ 1980 (((XmRowColumnWidget)(w))->row_column.postFromList) 1981 1982 #define RC_PostFromCount(w) \ 1983 (((XmRowColumnWidget)(w))->row_column.postFromCount) 1984 1985 #define RC_PostFromListSize(w) \ 1986 (((XmRowColumnWidget)(w))->row_column.postFromListSize) 1987 1988 #define RC_PopupTimer(w) \ 1989 (((XmRowColumnWidget)(w))->row_column.popup_timeout_timer) 1990 1991 #define RC_IsAligned(w) \ 1992 (((XmRowColumnWidget)(w))->row_column.do_alignment) 1993 1994 #define RC_PopupMenuClick(m) \ 1995 (((XmRowColumnWidget)(m))->row_column.popup_menu_click) 1996 1997 1998 #define RCC_WasManaged(cw) \ 1999 (((XmRowColumnConstraintRec *)(CoreConstraints(cw)))->row_column.was_managed) 2000 2001 #define RCC_MarginTop(cw) \ 2002 (((XmRowColumnConstraintRec *)(CoreConstraints(cw)))->row_column.margin_top) 2003 2004 #define RCC_MarginBottom(cw) \ 2005 (((XmRowColumnConstraintRec *)(CoreConstraints(cw)))->row_column.margin_bottom) 2006 2007 #define RCC_Baseline(cw) \ 2008 (((XmRowColumnConstraintRec *)(CoreConstraints(cw)))->row_column.baseline) 2009 2010 #define RCC_PositionIndex(cw) \ 2011 (((XmRowColumnConstraintRec *)(CoreConstraints(cw)))->row_column.position_index) 2012 2013 /* class macros */ 2014 #define RCClass_MenuProcs(c) \ 2015 (((XmRowColumnClassRec *)(c))->row_column_class.menuProcedures) 2016 2017 #define RCClass_MenuTraverse(c, dir) \ 2018 (((XmRowColumnClassRec *)(XtClass(c)))->row_column_class.menuProcedures)(XmMENU_TRAVERSAL, c, dir) 2019 2020 #define RCClass_ArmAndActivate(c) \ 2021 (((XmRowColumnClassRec *)(c))->row_column_class.armAndActivate) 2022 2023 #define RCClass_TraversalHandler(c) \ 2024 (((XmRowColumnClassRec *)(c))->row_column_class.traversalHandler) 2025 2026 /* 2027 * Short cuts to the Label class menu procedures 2028 */ 2029 #define LabC_MenuArm(w) (((XmLabelClassRec *)(XtClass(w)))->label_class.menuProcs)(XmMENU_ARM, w) 2030 #define LabGC_MenuArm(w) (((XmLabelGadgetClassRec *)(XtClass(w)))->label_class.menuProcs)(XmMENU_ARM, w) 2031 #define Lab_MenuArm(w) (XmIsGadget(w) ? LabGC_MenuArm(w): LabC_MenuArm(w)) 2032 2033 #define LabC_MenuDisarm(w) (((XmLabelClassRec *)(XtClass(w)))->label_class.menuProcs)(XmMENU_DISARM, w) 2034 #define LabGC_MenuDisarm(w) (((XmLabelGadgetClassRec *)(XtClass(w)))->label_class.menuProcs)(XmMENU_DISARM, w) 2035 #define Lab_MenuDisarm(w) (XmIsGadget(w) ? LabGC_MenuDisarm(w): LabC_MenuDisarm(w)) 2036 /* 2037 * Short cuts to the RowColumn class menu procedures 2038 */ 2039 #define RC_MenuButton(w,e,v) (((XmRowColumnClassRec *)(XtClass(XtParent(w))))->row_column_class.menuProcedures)(XmMENU_BUTTON, w, e, v) 2040 #define RC_MenuButtonPopdown(w,e,v) (((XmRowColumnClassRec *)(XtClass(XtParent(w))))->row_column_class.menuProcedures)(XmMENU_BUTTON_POPDOWN, w, e, v) 2041 #define RC_MenuShellPopdown(w,e,v) (((XmRowColumnClassRec *)(XtClass(XtParent(w))))->row_column_class.menuProcedures)(XmMENU_SHELL_POPDOWN, w, e, v) 2042 #define RC_MenuSubmenu(w) (((XmRowColumnClassRec *)(XtClass(XtParent(w))))->row_column_class.menuProcedures)(XmMENU_SUBMENU, w) 2043 #define RC_MenuCascading(w,e) (((XmRowColumnClassRec *)(XtClass(XtParent(w))))->row_column_class.menuProcedures)(XmMENU_CASCADING, w, e) 2044 #define RC_MenuMenuCallback(w,cbs) (((XmRowColumnClassRec *)(XtClass(XtParent(w))))->row_column_class.menuProcedures)(XmMENU_CALLBACK, w, cbs) 2045 2046 /* 2047 * SASH WIDGET ACCESS MACROS 2048 */ 2049 #define Sash_SashAction(w) \ 2050 (((XmSashWidget)w)->sash.sash_action) 2051 2052 #define Sash_HasFocus(w) \ 2053 (((XmSashWidget)w)->sash.has_focus) 2054 2055 /* 2056 * SCREEN WIDGET ACCESS MACROS 2057 */ 2058 #define Screen_Parent(w) \ 2059 (((XmScreen)w)->desktop.parent) 2060 2061 #define Screen_Children(w) \ 2062 (((XmScreen)w)->desktop.children) 2063 2064 #define Screen_NumChildren(w) \ 2065 (((XmScreen)w)->desktop.num_children) 2066 2067 #define Screen_NumSlots(w) \ 2068 (((XmScreen)w)->desktop.num_slots) 2069 2070 #define Screen_MwmPresent(w) \ 2071 (((XmScreen)w)->screen.mwmPresent) 2072 2073 #define Screen_NumReparented(w) \ 2074 (((XmScreen)w)->screen.numReparented) 2075 2076 #define Screen_DarkThreshold(w) \ 2077 (((XmScreen)w)->screen.darkThreshold) 2078 2079 #define Screen_ForegroundThreshold(w) \ 2080 (((XmScreen)w)->screen.foregroundThreshold) 2081 2082 #define Screen_LightThreshold(w) \ 2083 (((XmScreen)w)->screen.lightThreshold) 2084 2085 #define Screen_DefaultNoneCursorIcon(w) \ 2086 (((XmScreen)w)->screen.defaultNoneCursorIcon) 2087 2088 #define Screen_DefaultValidCursorIcon(w) \ 2089 (((XmScreen)w)->screen.defaultValidCursorIcon) 2090 2091 #define Screen_DefaultInvalidCursorIcon(w) \ 2092 (((XmScreen)w)->screen.defaultInvalidCursorIcon) 2093 2094 #define Screen_DefaultMoveCursorIcon(w) \ 2095 (((XmScreen)w)->screen.defaultMoveCursorIcon) 2096 2097 #define Screen_DefaultCopyCursorIcon(w) \ 2098 (((XmScreen)w)->screen.defaultCopyCursorIcon) 2099 2100 #define Screen_DefaultLinkCursorIcon(w) \ 2101 (((XmScreen)w)->screen.defaultLinkCursorIcon) 2102 2103 #define Screen_DefaultSourceCursorIcon(w) \ 2104 (((XmScreen)w)->screen.defaultSourceCursorIcon) 2105 2106 #define Screen_NullCursor(w) \ 2107 (((XmScreen)w)->screen.nullCursor) 2108 2109 #define Screen_CursorCache(w) \ 2110 (((XmScreen)w)->screen.cursorCache) 2111 2112 #define Screen_MaxCursorWidth(w) \ 2113 (((XmScreen)w)->screen.maxCursorWidth) 2114 2115 #define Screen_MaxCursorHeight(w) \ 2116 (((XmScreen)w)->screen.maxCursorHeight) 2117 2118 #define Screen_MenuCursor(w) \ 2119 (((XmScreen)w)->screen.menuCursor) 2120 2121 #define Screen_UnpostBehavior(w) \ 2122 (((XmScreen)w)->screen.unpostBehavior) 2123 2124 #define Screen_FontStruct(w) \ 2125 (((XmScreen)w)->screen.font_struct) 2126 2127 #define Screen_HorizUnit(w) \ 2128 (((XmScreen)w)->screen.h_unit) 2129 2130 #define Screen_VertUnit(w) \ 2131 (((XmScreen)w)->screen.v_unit) 2132 2133 #define Screen_ScratchPixmaps(w) \ 2134 (((XmScreen)w)->screen.scratchPixmaps) 2135 2136 #define Screen_MoveOpaque(w) \ 2137 (((XmScreen)w)->screen.moveOpaque) 2138 2139 #define Screen_StateCursorIcon(w) \ 2140 (((XmScreen)w)->screen.xmStateCursorIcon) 2141 2142 #define Screen_MoveCursorIcon(w) \ 2143 (((XmScreen)w)->screen.xmMoveCursorIcon) 2144 2145 #define Screen_CopyCursorIcon(w) \ 2146 (((XmScreen)w)->screen.xmCopyCursorIcon) 2147 2148 #define Screen_LinkCursorIcon(w) \ 2149 (((XmScreen)w)->screen.xmLinkCursorIcon) 2150 2151 #define Screen_SourceCursorIcon(w) \ 2152 (((XmScreen)w)->screen.xmSourceCursorIcon) 2153 2154 #define Screen_ImageGC(w) \ 2155 (((XmScreen)w)->screen.imageGC) 2156 2157 #define Screen_ImageGCDepth(w) \ 2158 (((XmScreen)w)->screen.imageGCDepth) 2159 2160 #define Screen_ImageForeground(w) \ 2161 (((XmScreen)w)->screen.imageForeground) 2162 2163 #define Screen_ImageBackground(w) \ 2164 (((XmScreen)w)->screen.imageBackground) 2165 2166 #define Screen_ScreenInfo(w) \ 2167 (((XmScreen)w)->screen.screenInfo) 2168 2169 /* 2170 * SCALE WIDGET ACCESS MACROS 2171 */ 2172 #define Scale_HighlightThickness(x) \ 2173 (((XmScaleWidget)(x))->scale.highlight_thickness) 2174 2175 #define Scale_HighlightOnEnter(x) \ 2176 (((XmScaleWidget)(x))->scale.highlight_on_enter) 2177 2178 #define Scale_ForegroundGC(x) \ 2179 (((XmScaleWidget)(x))->scale.foreground_GC) 2180 2181 #define Scale_Orientation(x) \ 2182 (((XmScaleWidget)(x))->scale.orientation) 2183 2184 #define Scale_ProcessingDirection(x) \ 2185 (((XmScaleWidget)(x))->scale.processing_direction) 2186 2187 #define Scale_DecimalPoints(x) \ 2188 (((XmScaleWidget)(x))->scale.decimal_points) 2189 2190 #define Scale_ScaleWidth(x) \ 2191 (((XmScaleWidget)(x))->scale.scale_width) 2192 2193 #define Scale_ScaleHeight(x) \ 2194 (((XmScaleWidget)(x))->scale.scale_height) 2195 2196 #define Scale_Minimum(x) \ 2197 (((XmScaleWidget)(x))->scale.minimum) 2198 2199 #define Scale_Maximum(x) \ 2200 (((XmScaleWidget)(x))->scale.maximum) 2201 2202 #define Scale_Value(x) \ 2203 (((XmScaleWidget)(x))->scale.value) 2204 2205 #define Scale_LastValue(x) \ 2206 (((XmScaleWidget)(x))->scale.last_value) 2207 2208 #define Scale_ShowValue(x) \ 2209 (((XmScaleWidget)(x))->scale.show_value) 2210 2211 #define Scale_ShowValueX(x) \ 2212 (((XmScaleWidget)(x))->scale.show_value_x) 2213 2214 #define Scale_ShowValueY(x) \ 2215 (((XmScaleWidget)(x))->scale.show_value_y) 2216 2217 #define Scale_ShowValueWidth(x) \ 2218 (((XmScaleWidget)(x))->scale.show_value_width) 2219 2220 #define Scale_ShowValueHeight(x) \ 2221 (((XmScaleWidget)(x))->scale.show_value_height) 2222 2223 #define Scale_FontList(x) \ 2224 (((XmScaleWidget)(x))->scale.font_list) 2225 2226 #define Scale_FontStruct(x) \ 2227 (((XmScaleWidget)(x))->scale.font_struct) 2228 2229 #define Scale_ScaleMultiple(x) \ 2230 (((XmScaleWidget)(x))->scale.scale_multiple) 2231 2232 #define Scale_Title(x) \ 2233 (((XmScaleWidget)(x))->scale.title) 2234 2235 #define Scale_SliderSize(x) \ 2236 (((XmScaleWidget)(x))->scale.slider_size) 2237 2238 #define Scale_ValueChangedCallback(x) \ 2239 (((XmScaleWidget)(x))->scale.value_changed_callback) 2240 2241 #define Scale_DragCallback(x) \ 2242 (((XmScaleWidget)(x))->scale.drag_callback) 2243 2244 #define Scale_Editable(x) \ 2245 (((XmScaleWidget)(x))->scale.editable) 2246 2247 /* 2248 * SELECTIONBOX WIDGET ACCESS MACROS 2249 */ 2250 #define SB_DialogType(w) \ 2251 (((XmSelectionBoxWidget) (w))->selection_box.dialog_type) 2252 2253 #define SB_ListItems(w) \ 2254 (((XmSelectionBoxWidget)(w))->selection_box.list_items) 2255 2256 #define SB_ChildPlacement(w) \ 2257 (((XmSelectionBoxWidget)(w))->selection_box.child_placement) 2258 2259 #define SB_OkCallback(w) \ 2260 (((XmSelectionBoxWidget)(w))->selection_box.ok_callback) 2261 2262 #define SB_CancelCallback(w) \ 2263 (((XmSelectionBoxWidget)(w))->selection_box.cancel_callback) 2264 2265 #define SB_ApplyCallback(w) \ 2266 (((XmSelectionBoxWidget)(w))->selection_box.apply_callback) 2267 2268 #define SB_NoMatchCallback(w) \ 2269 (((XmSelectionBoxWidget)(w))->selection_box.no_match_callback) 2270 2271 #define SB_ListLabelString(w) \ 2272 (((XmSelectionBoxWidget) (w))->selection_box.list_label_string) 2273 2274 #define SB_TextString(w) \ 2275 (((XmSelectionBoxWidget) (w))->selection_box.text_string) 2276 2277 #define SB_OkLabelString(w) \ 2278 (((XmSelectionBoxWidget) (w))->selection_box.ok_label_string) 2279 2280 #define SB_CancelLabelString(w) \ 2281 (((XmSelectionBoxWidget) (w))->selection_box.cancel_label_string) 2282 2283 #define SB_ApplyLabelString(w) \ 2284 (((XmSelectionBoxWidget) (w))->selection_box.apply_label_string) 2285 2286 #define SB_HelpLabelString(w) \ 2287 (((XmSelectionBoxWidget) (w))->selection_box.help_label_string) 2288 2289 #define SB_SelectionLabelString(w) \ 2290 (((XmSelectionBoxWidget) (w))->selection_box.selection_label_string) 2291 2292 /* 2293 * SCROLLBAR WIDGET ACCESS MACROS 2294 */ 2295 #define SCB_Value(w) \ 2296 (((XmScrollBarWidget)(w))->scrollBar.value) 2297 2298 #define SCB_Minimum(w) \ 2299 (((XmScrollBarWidget)(w))->scrollBar.minimum) 2300 2301 #define SCB_Maximum(w) \ 2302 (((XmScrollBarWidget)(w))->scrollBar.maximum) 2303 2304 #define SCB_SliderSize(w) \ 2305 (((XmScrollBarWidget)(w))->scrollBar.slider_size) 2306 2307 #define SCB_Orientation(w) \ 2308 (((XmScrollBarWidget)(w))->scrollBar.orientation) 2309 2310 #define SCB_ProcessingDirection(w) \ 2311 (((XmScrollBarWidget)(w))->scrollBar.processing_direction) 2312 2313 #define SCB_ShowArrows(w) \ 2314 (((XmScrollBarWidget)(w))->scrollBar.show_arrows) 2315 2316 #define SCB_Increment(w) \ 2317 (((XmScrollBarWidget)(w))->scrollBar.increment) 2318 2319 #define SCB_PageIncrement(w) \ 2320 (((XmScrollBarWidget)(w))->scrollBar.page_increment) 2321 2322 #define SCB_InitialDelay(w) \ 2323 (((XmScrollBarWidget)(w))->scrollBar.initial_delay) 2324 2325 #define SCB_RepeatDelay(w) \ 2326 (((XmScrollBarWidget)(w))->scrollBar.repeat_delay) 2327 2328 #define SCB_ValueChangedCallback(w) \ 2329 (((XmScrollBarWidget)(w))->scrollBar.value_changed_callback) 2330 2331 #define SCB_IncrementCallback(w) \ 2332 (((XmScrollBarWidget)(w))->scrollBar.increment_callback) 2333 2334 #define SCB_DecrementCallback(w) \ 2335 (((XmScrollBarWidget)(w))->scrollBar.decrement_callback) 2336 2337 #define SCB_PageIncrementCallback(w) \ 2338 (((XmScrollBarWidget)(w))->scrollBar.page_increment_callback) 2339 2340 #define SCB_PageDecrementCallback(w) \ 2341 (((XmScrollBarWidget)(w))->scrollBar.page_decrement_callback) 2342 2343 #define SCB_ToTopCallback(w) \ 2344 (((XmScrollBarWidget)(w))->scrollBar.to_top_callback) 2345 2346 #define SCB_ToBottomCallback(w) \ 2347 (((XmScrollBarWidget)(w))->scrollBar.to_bottom_callback) 2348 2349 #define SCB_DragCallback(w) \ 2350 (((XmScrollBarWidget)(w))->scrollBar.drag_callback) 2351 2352 #define SCB_ForegroundGC(w) \ 2353 (((XmScrollBarWidget)(w))->scrollBar.foreground_GC) 2354 2355 #define SCB_TroughColor(w) \ 2356 (((XmScrollBarWidget)(w))->scrollBar.trough_color) 2357 2358 #define SCB_Pixmap(w) \ 2359 (((XmScrollBarWidget)(w))->scrollBar.pixmap) 2360 2361 #define SCB_SlidingOn(w) \ 2362 (((XmScrollBarWidget)(w))->scrollBar.sliding_on) 2363 2364 #define SCB_EtchedSlider(w) \ 2365 (((XmScrollBarWidget)(w))->scrollBar.etched_slider) 2366 2367 #define SCB_SavedValue(w) \ 2368 (((XmScrollBarWidget)(w))->scrollBar.saved_value) 2369 2370 #define SCB_Flags(w) \ 2371 (((XmScrollBarWidget)(w))->scrollBar.flags) 2372 2373 #define SCB_ChangeType(w) \ 2374 (((XmScrollBarWidget)(w))->scrollBar.change_type) 2375 2376 #define SCB_Timer(w) \ 2377 (((XmScrollBarWidget)(w))->scrollBar.timer) 2378 2379 #define SCB_InitialX(w) \ 2380 (((XmScrollBarWidget)(w))->scrollBar.initial_x) 2381 2382 #define SCB_InitialY(w) \ 2383 (((XmScrollBarWidget)(w))->scrollBar.initial_y) 2384 2385 #define SCB_SeparationX(w) \ 2386 (((XmScrollBarWidget)(w))->scrollBar.separation_x) 2387 2388 #define SCB_SeparationY(w) \ 2389 (((XmScrollBarWidget)(w))->scrollBar.separation_y) 2390 2391 #define SCB_SliderX(w) \ 2392 (((XmScrollBarWidget)(w))->scrollBar.slider_x) 2393 2394 #define SCB_SliderY(w) \ 2395 (((XmScrollBarWidget)(w))->scrollBar.slider_y) 2396 2397 #define SCB_SliderWidth(w) \ 2398 (((XmScrollBarWidget)(w))->scrollBar.slider_width) 2399 2400 #define SCB_SliderHeight(w) \ 2401 (((XmScrollBarWidget)(w))->scrollBar.slider_height) 2402 2403 #define SCB_SliderAreaX(w) \ 2404 (((XmScrollBarWidget)(w))->scrollBar.slider_area_x) 2405 2406 #define SCB_SliderAreaY(w) \ 2407 (((XmScrollBarWidget)(w))->scrollBar.slider_area_y) 2408 2409 #define SCB_SliderAreaWidth(w) \ 2410 (((XmScrollBarWidget)(w))->scrollBar.slider_area_width) 2411 2412 #define SCB_SliderAreaHeight(w) \ 2413 (((XmScrollBarWidget)(w))->scrollBar.slider_area_height) 2414 2415 #define SCB_Arrow1X(w) \ 2416 (((XmScrollBarWidget)(w))->scrollBar.arrow1_x) 2417 2418 #define SCB_Arrow1Y(w) \ 2419 (((XmScrollBarWidget)(w))->scrollBar.arrow1_y) 2420 2421 #define SCB_Arrow1Orientation(w) \ 2422 (((XmScrollBarWidget)(w))->scrollBar.arrow1_orientation) 2423 2424 #define SCB_Arrow1Selected(w) \ 2425 (((XmScrollBarWidget)(w))->scrollBar.arrow1_selected) 2426 2427 #define SCB_Arrow2X(w) \ 2428 (((XmScrollBarWidget)(w))->scrollBar.arrow2_x) 2429 2430 #define SCB_Arrow2Y(w) \ 2431 (((XmScrollBarWidget)(w))->scrollBar.arrow2_y) 2432 2433 #define SCB_Arrow2Orientation(w) \ 2434 (((XmScrollBarWidget)(w))->scrollBar.arrow2_orientation) 2435 2436 #define SCB_Arrow2Selected(w) \ 2437 (((XmScrollBarWidget)(w))->scrollBar.arrow2_selected) 2438 2439 #define SCB_ArrowWidth(w) \ 2440 (((XmScrollBarWidget)(w))->scrollBar.arrow_width) 2441 2442 #define SCB_ArrowHeight(w) \ 2443 (((XmScrollBarWidget)(w))->scrollBar.arrow_height) 2444 2445 #define SCB_UnavailableGC(w) \ 2446 (((XmScrollBarWidget)(w))->scrollBar.unavailable_GC) 2447 2448 #define SCB_Offset(w) \ 2449 (((XmScrollBarWidget)(w))->scrollBar.offset) 2450 2451 /* 2452 * SEPARATOR WIDGET ACCESS MACROS 2453 */ 2454 #define SEP_Margin(w) \ 2455 (((XmSeparatorWidget)(w))->separator.margin) 2456 2457 #define SEP_Orientation(w) \ 2458 (((XmSeparatorWidget)(w))->separator.orientation) 2459 2460 #define SEP_SeparatorType(w) \ 2461 (((XmSeparatorWidget)(w))->separator.separator_type) 2462 2463 #define SEP_SeparatorGC(w) \ 2464 (((XmSeparatorWidget)(w))->separator.separator_GC) 2465 2466 /* 2467 * SCROLLEDWINDOW WIDGET ACCESS MACROS 2468 */ 2469 #define SW_VSBMinimum(w) \ 2470 (((XmScrolledWindowWidget)w)->swindow.vmin) 2471 2472 #define SW_VSBMaximum(w) \ 2473 (((XmScrolledWindowWidget)w)->swindow.vmax) 2474 2475 #define SW_VSBValue(w) \ 2476 (((XmScrolledWindowWidget)w)->swindow.vOrigin) 2477 2478 #define SW_VSBSliderSize(w) \ 2479 (((XmScrolledWindowWidget)w)->swindow.vExtent) 2480 2481 #define SW_HSBMinimum(w) \ 2482 (((XmScrolledWindowWidget)w)->swindow.hmin) 2483 2484 #define SW_HSBMaximum(w) \ 2485 (((XmScrolledWindowWidget)w)->swindow.hmax) 2486 2487 #define SW_HSBValue(w) \ 2488 (((XmScrolledWindowWidget)w)->swindow.hOrigin) 2489 2490 #define SW_HSBSliderSize(w) \ 2491 (((XmScrolledWindowWidget)w)->swindow.hExtent) 2492 2493 #define SW_HSBX(w) \ 2494 (((XmScrolledWindowWidget)w)->swindow.hsbX) 2495 2496 #define SW_HSBY(w) \ 2497 (((XmScrolledWindowWidget)w)->swindow.hsbY) 2498 2499 #define SW_HSBWidth(w) \ 2500 (((XmScrolledWindowWidget)w)->swindow.hsbWidth) 2501 2502 #define SW_HSBHeight(w) \ 2503 (((XmScrolledWindowWidget)w)->swindow.hsbHeight) 2504 2505 #define SW_VSBX(w) \ 2506 (((XmScrolledWindowWidget)w)->swindow.vsbX) 2507 2508 #define SW_VSBY(w) \ 2509 (((XmScrolledWindowWidget)w)->swindow.vsbY) 2510 2511 #define SW_VSBWidth(w) \ 2512 (((XmScrolledWindowWidget)w)->swindow.vsbWidth) 2513 2514 #define SW_VSBHeight(w) \ 2515 (((XmScrolledWindowWidget)w)->swindow.vsbHeight) 2516 2517 #define SW_GivenWidth(w) \ 2518 (((XmScrolledWindowWidget)w)->swindow.GivenWidth) 2519 2520 #define SW_GivenHeight(w) \ 2521 (((XmScrolledWindowWidget)w)->swindow.GivenHeight) 2522 2523 #define SW_CWX(w) \ 2524 (((XmScrolledWindowWidget)w)->swindow.XOffset) 2525 2526 #define SW_CWY(w) \ 2527 (((XmScrolledWindowWidget)w)->swindow.YOffset) 2528 2529 #define SW_XOffset(w) \ 2530 (((XmScrolledWindowWidget)w)->swindow.XOffset) 2531 2532 #define SW_YOffset(w) \ 2533 (((XmScrolledWindowWidget)w)->swindow.YOffset) 2534 2535 #define SW_CWWidth(w) \ 2536 (((XmScrolledWindowWidget)w)->swindow.AreaWidth) 2537 2538 #define SW_CWHeight(w) \ 2539 (((XmScrolledWindowWidget)w)->swindow.AreaHeight) 2540 2541 #define SW_MarginWidth(w) \ 2542 (((XmScrolledWindowWidget)w)->swindow.WidthPad) 2543 2544 #define SW_MarginHeight(w) \ 2545 (((XmScrolledWindowWidget)w)->swindow.HeightPad) 2546 2547 #define SW_Spacing(w) \ 2548 (((XmScrolledWindowWidget)w)->swindow.pad) 2549 2550 #define SW_HasHSB(w) \ 2551 (((XmScrolledWindowWidget)w)->swindow.hasHSB) 2552 2553 #define SW_HasVSB(w) \ 2554 (((XmScrolledWindowWidget)w)->swindow.hasVSB) 2555 2556 #define SW_InInit(w) \ 2557 (((XmScrolledWindowWidget)w)->swindow.InInit) 2558 2559 #define SW_FromResize(w) \ 2560 (((XmScrolledWindowWidget)w)->swindow.FromResize) 2561 2562 #define SW_VisualPolicy(w) \ 2563 (((XmScrolledWindowWidget)w)->swindow.VisualPolicy) 2564 2565 #define SW_ScrollPolicy(w) \ 2566 (((XmScrolledWindowWidget)w)->swindow.ScrollPolicy) 2567 2568 #define SW_ScrollBarPolicy(w) \ 2569 (((XmScrolledWindowWidget)w)->swindow.ScrollBarPolicy) 2570 2571 #define SW_Placement(w) \ 2572 (((XmScrolledWindowWidget)w)->swindow.Placement) 2573 2574 #define SW_HSB(w) \ 2575 (((XmScrolledWindowWidget)w)->swindow.hScrollBar) 2576 2577 #define SW_VSB(w) \ 2578 (((XmScrolledWindowWidget)w)->swindow.vScrollBar) 2579 2580 #define SW_ClipWindow(w) \ 2581 (((XmScrolledWindowWidget)w)->swindow.ClipWindow) 2582 2583 #define SW_WorkWindow(w) \ 2584 (((XmScrolledWindowWidget)w)->swindow.WorkWindow) 2585 2586 #define SW_TraverseObscuredCallback(w) \ 2587 (((XmScrolledWindowWidget)w)->swindow.traverseObscuredCallback) 2588 2589 /* 2590 * TOGGLE BUTTON WIDGET ACCESS MACROS 2591 */ 2592 #define TB_IndType(w) \ 2593 (((XmToggleButtonWidget)(w))->toggle.ind_type) 2594 2595 #define TB_Visible(w) \ 2596 (((XmToggleButtonWidget)(w))->toggle.visible) 2597 2598 #define TB_Spacing(w) \ 2599 (((XmToggleButtonWidget)(w))->toggle.spacing) 2600 2601 #define TB_IndicatorDim(w) \ 2602 (((XmToggleButtonWidget)(w))->toggle.indicator_dim) 2603 2604 #define TB_IndicatorSet(w) \ 2605 (((XmToggleButtonWidget)(w))->toggle.indicator_set) 2606 2607 #define TB_OnPixmap(w) \ 2608 (((XmToggleButtonWidget)(w))->toggle.on_pixmap) 2609 2610 #define TB_InsenPixmap(w) \ 2611 (((XmToggleButtonWidget)(w))->toggle.insen_pixmap) 2612 2613 #define TB_Set(w) \ 2614 (((XmToggleButtonWidget)(w))->toggle.set) 2615 2616 #define TB_VisualSet(w) \ 2617 (((XmToggleButtonWidget)(w))->toggle.visual_set) 2618 2619 #define TB_IndOn(w) \ 2620 (((XmToggleButtonWidget)(w))->toggle.ind_on) 2621 2622 #define TB_FillOnSelect(w) \ 2623 (((XmToggleButtonWidget)(w))->toggle.fill_on_select) 2624 2625 #define TB_SelectColor(w) \ 2626 (((XmToggleButtonWidget)(w))->toggle.select_color) 2627 2628 #define TB_SelectGC(w) \ 2629 (((XmToggleButtonWidget)(w))->toggle.select_GC) 2630 2631 #define TB_BackgroundGC(w) \ 2632 (((XmToggleButtonWidget)(w))->toggle.background_gc) 2633 2634 #define TB_ArmCallback(w) \ 2635 (((XmToggleButtonWidget)(w))->toggle.arm_CB) 2636 2637 #define TB_ValueChangedCallback(w) \ 2638 (((XmToggleButtonWidget)(w))->toggle.value_changed_CB) 2639 2640 #define TB_DisarmCallback(w) \ 2641 (((XmToggleButtonWidget)(w))->toggle.disarm_CB) 2642 2643 #define TB_Armed(w) \ 2644 (((XmToggleButtonWidget)(w))->toggle.Armed) 2645 2646 /* 2647 * TEAROFF BUTTON WIDGET ACCESS MACROS 2648 */ 2649 #define TOB_Margin(w) \ 2650 (((XmTearOffButtonWidget)(w))->tear_off_button.margin) 2651 2652 #define TOB_Orientation(w) \ 2653 (((XmTearOffButtonWidget)(w))->tear_off_button.orientation) 2654 2655 #define TOB_SeparatorType(w) \ 2656 (((XmTearOffButtonWidget)(w))->tear_off_button.separator_type) 2657 2658 #define TOB_SeparatorGC(w) \ 2659 (((XmTearOffButtonWidget)(w))->tear_off_button.separator_GC) 2660 2661 2662 /* 2663 * XmDISPLAY ACCESS MACROS 2664 */ 2665 #define Display_DragInitiatorProtocolStyle(w) \ 2666 (((XmDisplay)(w))->display.dragInitiatorProtocolStyle) 2667 2668 #define Display_DragReceiverProtocolStyle(w) \ 2669 (((XmDisplay)(w))->display.dragReceiverProtocolStyle) 2670 2671 #define Display_UserGrabbed(w) \ 2672 (((XmDisplay)(w))->display.userGrabbed) 2673 2674 #define Display_DragContextClass(w) \ 2675 (((XmDisplay)(w))->display.dragContextClass) 2676 2677 #define Display_DropTransferClass(w) \ 2678 (((XmDisplay)(w))->display.dropTransferClass) 2679 2680 #define Display_DropSiteManagerClass(w) \ 2681 (((XmDisplay)(w))->display.dropSiteManagerClass) 2682 2683 #define Display_ActiveDC(w) \ 2684 (((XmDisplay)(w))->display.activeDC) 2685 2686 #define Display_DSM(w) \ 2687 (((XmDisplay)(w))->display.dsm) 2688 2689 #define Display_LastDragTime(w) \ 2690 (((XmDisplay)(w))->display.lastDragTime) 2691 2692 #define Display_ProxyWindow(w) \ 2693 (((XmDisplay)(w))->display.proxyWindow) 2694 2695 #define Display_Modals(w) \ 2696 (((XmDisplay)(w))->display.modals) 2697 2698 #define Display_NumModals(w) \ 2699 (((XmDisplay)(w))->display.numModals) 2700 2701 #define Display_MaxModals(w) \ 2702 (((XmDisplay)(w))->display.maxModals) 2703 2704 #define Display_Modals(w) \ 2705 (((XmDisplay)(w))->display.modals) 2706 2707 #define Display_XmImInfo(w) \ 2708 (((XmDisplay)(w))->display.xmim_info) 2709 2710 #define Display_BindingsString(w) \ 2711 (((XmDisplay)(w))->display.bindingsString) 2712 2713 #define Display_Bindings(w) \ 2714 (((XmDisplay)(w))->display.modals) 2715 2716 #define Display_LastKeyEvent(w) \ 2717 (((XmDisplay)(w))->display.lastKeyEvent) 2718 2719 #define Display_KeycodeTag(w) \ 2720 (((XmDisplay)(w))->display.keycode_tag) 2721 2722 #define Display_ShellCount(w) \ 2723 (((XmDisplay)(w))->display.shellCount) 2724 2725 #define Display_DisplayInfo(w) \ 2726 (((XmDisplay)(w))->display.displayInfo) 2727 2728 2729 /* 2730 * Desktop class 2731 */ 2732 #define Desktop_Parent(w) \ 2733 (((XmDesktopRec *)(w))->desktop.parent) 2734 2735 #define Desktop_Children(w) \ 2736 (((XmDesktopRec *)(w))->desktop.children) 2737 2738 #define Desktop_NumChildren(w) \ 2739 (((XmDesktopRec *)(w))->desktop.num_children) 2740 2741 #define Desktop_NumSlots(w) \ 2742 (((XmDesktopRec *)(w))->desktop.num_slots) 2743 2744 /* 2745 * Convenient shorthands. 2746 */ 2747 #define ColormapOfObject(w) \ 2748 (XmIsGadget(w) \ 2749 ? CoreColormap(((XmGadget)(w))->object.parent) \ 2750 : CoreColormap(w)) 2751 2752 /* 2753 * Sometimes XmStrings are NULL and sometimes they are (XmString)XmUNSPECIFIED, 2754 * both mean stay away. 2755 */ 2756 #define _XmStringIsSpecified(x) ((x) != NULL && (x) != (XmString)XmUNSPECIFIED) 2757 2758 #endif /* _XMI_MACROSI_H */ 2759