1 /* vibincld.h 2 * =========================================================================== 3 * 4 * PUBLIC DOMAIN NOTICE 5 * National Center for Biotechnology Information (NCBI) 6 * 7 * This software/database is a "United States Government Work" under the 8 * terms of the United States Copyright Act. It was written as part of 9 * the author's official duties as a United States Government employee and 10 * thus cannot be copyrighted. This software/database is freely available 11 * to the public for use. The National Library of Medicine and the U.S. 12 * Government do not place any restriction on its use or reproduction. 13 * We would, however, appreciate having the NCBI and the author cited in 14 * any work or product based on this material 15 * 16 * Although all reasonable efforts have been taken to ensure the accuracy 17 * and reliability of the software and data, the NLM and the U.S. 18 * Government do not and cannot warrant the performance or results that 19 * may be obtained by using this software or data. The NLM and the U.S. 20 * Government disclaim all warranties, express or implied, including 21 * warranties of performance, merchantability or fitness for any particular 22 * purpose. 23 * 24 * =========================================================================== 25 * 26 * File Name: vibincld.h 27 * 28 * Author: Jonathan Kans 29 * 30 * Version Creation Date: 7/1/91 31 * 32 * $Revision: 6.8 $ 33 * 34 * File Description: 35 * Vibrant inclusion of underlying windowing system toolbox functions, 36 * definition of common internal data types, and miscellaneous functions 37 * for internal use only. Applications should avoid including this file. 38 * 39 * Modifications: 40 * -------------------------------------------------------------------------- 41 * Date Name Description of modification 42 * ------- ---------- ----------------------------------------------------- 43 * 44 * ========================================================================== 45 */ 46 47 #ifndef _VIBINCLD_ 48 #define _VIBINCLD_ 49 50 #ifndef _NCBIWIN_ 51 #include <ncbiwin.h> 52 #endif 53 #ifndef _NCBIPORT_ 54 #include <ncbiport.h> 55 #endif 56 57 #ifdef __cplusplus 58 extern "C" { 59 #endif 60 61 /*** UNDERLYING TOOLBOX GRAPHIC PRIMITIVE OBJECT TYPES ***/ 62 63 #ifdef WIN_MAC 64 #define Nlm_HandleTool Handle 65 #define Nlm_PointTool Point 66 #define Nlm_RectTool Rect 67 68 #ifdef WIN_MAC_QUARTZ 69 #define Nlm_RgnTool HIMutableShapeRef 70 #else 71 #define Nlm_RgnTool RgnHandle 72 #endif 73 74 #endif 75 76 #ifdef WIN_MSWIN 77 #define Nlm_HandleTool HANDLE 78 #define Nlm_PointTool POINT 79 #define Nlm_RectTool RECT 80 #define Nlm_RgnTool HRGN 81 #endif 82 83 #ifdef WIN_MOTIF 84 #define Nlm_HandleTool Nlm_VoidPtr 85 #define Nlm_PointTool XPoint 86 #define Nlm_RectTool XRectangle 87 #define Nlm_RgnTool Region 88 #endif 89 90 91 /* 92 * WARNING -- The various GetObjectData procedures use the 93 * appropriate recentObject and recentObjectData variables, 94 * to speed access by eliminating handle locking, copying, 95 * and unlocking upon repeated access of an object. The 96 * remove and unlink procedures NULL out the variables, but 97 * it could become a problem if some procedure destroys an 98 * object other than by calling Remove. This risky method 99 * of data acquisition is controlled by the "NLM_RISKY" flag. 100 * Defining NLM_RISKY as FALSE will prevent this caching and 101 * force these procedures to always get a fresh copy of the 102 * data from the object. 103 */ 104 105 #define NLM_RISKY TRUE 106 107 /* 108 * WARNING -- The X windowing system is designed for use over 109 * a network. Sending queries during construction of Vibrant 110 * windows can be very time consuming over long distances. 111 * Defining the "NLM_QUIET" flag to TRUE will only realize 112 * Motif widgets at creation time if their parent window has 113 * already been shown. Otherwise, it will realize all widgets 114 * from the shell on down as soon as the window is first shown. 115 */ 116 117 #define NLM_QUIET TRUE 118 119 120 121 /* Workaround the bad memory management resulting in the double 122 * memory deallocation when destroying cascade buttons or shells 123 * containing those (some versions of Motif library) 124 */ 125 #ifdef WIN_MOTIF 126 #define NLM_MOTIF_CASCADEB_BUG 127 #endif 128 129 130 /*** ADDITIONAL INTERNAL INTERFACE OBJECT TYPES ***/ 131 132 typedef struct Nlm_menubar { 133 Nlm_VoidPtr dummy; 134 } HNDL Nlm_MenuBaR; 135 136 typedef struct Nlm_box { 137 Nlm_VoidPtr dummy; 138 } HNDL Nlm_BoX; 139 140 /*** MISCELLANEOUS DRAWING OBJECTS FOR INTERNAL USE ***/ 141 142 /* 143 * This prompt object is for internal use only. It does not link 144 * in as a child of its parent in the normal way, so on the 145 * Macintosh the parent must pass draw and click messages to it. 146 * The parent also explicitly positions it, and must show, hide, 147 * and remove it as necessary. 148 */ 149 150 Nlm_PrompT Nlm_DependentPrompt PROTO((Nlm_GraphiC prnt, Nlm_RectPtr r, Nlm_CharPtr title, Nlm_FonT font, Nlm_Char just)); 151 152 /* 153 * These scroll bar objects are for internal use only. They do not 154 * link in as a child of its parent in the normal way, so on the 155 * Macintosh the parent must pass draw and click messages to them. 156 * The parent also explicitly positions them, and must show, hide, 157 * and remove them as necessary. The action callback procedure is 158 * triggered by SetValue if the setting of the scroll bar changes. 159 */ 160 161 Nlm_BaR Nlm_HorizScrollBar4 PROTO((Nlm_GraphiC slave, Nlm_RectPtr r, Nlm_BarScrlProc4 actn)); 162 Nlm_BaR Nlm_VertScrollBar4 PROTO((Nlm_GraphiC slave, Nlm_RectPtr r, Nlm_BarScrlProc4 actn)); 163 164 Nlm_BaR Nlm_HorizScrollBar PROTO((Nlm_GraphiC slave, Nlm_RectPtr r, Nlm_BarScrlProc actn)); 165 Nlm_BaR Nlm_VertScrollBar PROTO((Nlm_GraphiC slave, Nlm_RectPtr r, Nlm_BarScrlProc actn)); 166 167 /*** STRUCTURE DEFINITIONS FOR INTERFACE OBJECTS ***/ 168 169 /* 170 * The GraphiC object is the base of all other objects. It contains 171 * linkage information, the class and callback pointers, a position 172 * rectangle, and enabled and visible flags. 173 */ 174 175 typedef struct Nlm_graphicrec { 176 Nlm_GraphiC next; 177 Nlm_GraphiC parent; 178 Nlm_GraphiC children; 179 Nlm_GraphiC lastChild; 180 Nlm_GphPrcs PNTR classptr; 181 Nlm_ActnProc action; 182 Nlm_RecT rect; 183 Nlm_Boolean enabled; 184 Nlm_Boolean visible; 185 Nlm_VoidPtr data; 186 Nlm_FreeProc cleanup; 187 Nlm_Boolean realized; 188 Nlm_VoidPtr thisobject; /* <<<add to hold DObjectPtr dgg++ */ 189 } Nlm_GraphicRec, Nlm_GraphicData, PNTR Nlm_GphPtr; 190 191 /* 192 * The BoX object has positioning parameters to nicely organize 193 * internal objects. 194 */ 195 196 typedef struct Nlm_boxdata { 197 Nlm_PoinT nextPoint; 198 Nlm_PoinT limitPoint; 199 Nlm_PoinT resetPoint; 200 Nlm_Int2 topRow; 201 Nlm_Int2 nextCol; 202 Nlm_Int2 xMargin; 203 Nlm_Int2 yMargin; 204 Nlm_Int2 xSpacing; 205 Nlm_Int2 ySpacing; 206 Nlm_Int2 boxWidth; 207 Nlm_Int2 boxHeight; 208 } Nlm_BoxData; 209 210 typedef struct Nlm_boxrec { 211 Nlm_GraphicRec graphicR; 212 Nlm_BoxData box; 213 } Nlm_BoxRec, PNTR Nlm_BoxPtr; 214 215 216 217 #if defined(WIN_MAC) 218 #if defined(WIN_MAC_QUARTZ) 219 #define Nlm_WindowTool WindowPtr 220 #define Nlm_PortTool CGContextRef 221 #define Nlm_ShellTool Nlm_Handle 222 #define Nlm_MainTool Nlm_Handle 223 #define Nlm_ColorMTool PaletteHandle 224 #else 225 #define Nlm_WindowTool WindowPtr 226 #define Nlm_PortTool GrafPtr 227 #define Nlm_ShellTool Nlm_Handle 228 #define Nlm_MainTool Nlm_Handle 229 #define Nlm_ColorMTool PaletteHandle 230 #endif 231 #endif 232 233 #ifdef WIN_MSWIN 234 #define Nlm_WindowTool HWND 235 #define Nlm_PortTool HDC 236 #define Nlm_ShellTool Nlm_Handle 237 #define Nlm_MainTool Nlm_Handle 238 #define Nlm_ColorMTool HPALETTE 239 #endif 240 241 #ifdef WIN_MOTIF 242 #define Nlm_WindowTool Widget 243 #define Nlm_PortTool GC 244 #define Nlm_ShellTool Widget 245 #define Nlm_MainTool Widget 246 #define Nlm_ColorMTool Colormap 247 #endif 248 249 extern Nlm_WindoW Nlm_desktopWindow; 250 extern Nlm_WindoW Nlm_systemWindow; 251 252 extern Nlm_WindoW Nlm_theWindow; 253 extern Nlm_WindowTool Nlm_currentWindowTool; 254 255 extern Nlm_Boolean Nlm_processUpdatesFirstVal; 256 257 #ifdef WIN_MAC 258 extern EventRecord Nlm_currentEvent; 259 #endif 260 261 #ifdef WIN_MSWIN 262 extern HCURSOR Nlm_currentCursor; 263 extern WPARAM Nlm_currentWParam; 264 extern HINSTANCE Nlm_currentHInst; 265 extern LPARAM Nlm_currentLParam; 266 extern MSG Nlm_currentMssg; 267 extern int Nlm_currentId; 268 extern HWND Nlm_currentHwndCtl; 269 extern UINT Nlm_currentCode; 270 extern int Nlm_currentPos; 271 #endif 272 273 #ifdef WIN_MOTIF 274 extern Cursor Nlm_currentCursor; 275 extern XEvent Nlm_currentEvent; 276 extern XtAppContext Nlm_appContext; 277 extern XmFontList Nlm_XfontList; 278 extern Widget Nlm_fileDialogShell; 279 #endif 280 281 void Nlm_ProcessTimerEvent PROTO((void)); 282 Nlm_WindowTool Nlm_ParentWindowPtr PROTO((Nlm_GraphiC a)); 283 Nlm_PortTool Nlm_ParentWindowPort PROTO((Nlm_GraphiC a)); 284 Nlm_MainTool Nlm_ParentWindowMain PROTO((Nlm_GraphiC a)); 285 Nlm_ShellTool Nlm_ParentWindowShell PROTO((Nlm_GraphiC a)); 286 Nlm_WindoW Nlm_SavePortIfNeeded PROTO((Nlm_GraphiC a, Nlm_Boolean savePort)); 287 288 void Nlm_SetWindowCharDisplay PROTO((Nlm_WindoW w, Nlm_DisplaY d)); 289 Nlm_DisplaY Nlm_GetWindowCharDisplay PROTO((Nlm_WindoW w)); 290 void Nlm_SetWindowMenuBar PROTO((Nlm_WindoW w, Nlm_MenuBaR mb)); 291 Nlm_MenuBaR Nlm_GetWindowMenuBar PROTO((Nlm_WindoW w)); 292 void Nlm_SetWindowDefaultButton PROTO((Nlm_WindoW w, Nlm_ButtoN b)); 293 Nlm_ButtoN Nlm_GetWindowDefaultButton PROTO((Nlm_WindoW w)); 294 Nlm_Boolean Nlm_WindowHasBeenShown PROTO((Nlm_WindoW w)); 295 Nlm_Boolean Nlm_IsWindowDying PROTO((Nlm_WindoW w)); 296 void Nlm_PassPanelClickToText PROTO((Nlm_PaneL p, Nlm_TexT t, Nlm_PoinT pt)); 297 void Nlm_KillSlateTimer PROTO((void)); 298 299 void Nlm_GetChoiceTitle PROTO((Nlm_GraphiC c, Nlm_Int2 item, Nlm_CharPtr title, size_t maxsize)); 300 Nlm_ShellTool Nlm_GetWindowShell PROTO((Nlm_WindoW w)); 301 302 #ifdef WIN_MAC 303 void Nlm_SetUpdateRegion PROTO((WindowPtr wptr)); 304 #endif 305 #ifdef WIN_MOTIF 306 Colormap Nlm_VibrantDefaultColormap PROTO(( void )); 307 Visual *Nlm_VibrantDefaultVisual PROTO((void)); 308 int Nlm_VibrantDefaultDepth PROTO(( void )); 309 Nlm_Boolean Nlm_GetFixedColormap PROTO((Nlm_GraphiC w, 310 Colormap *cMap, Visual **visual)); 311 void Nlm_XAllocColor PROTO((XColor *xcolor, Colormap colormap, 312 Nlm_Uint1 red, 313 Nlm_Uint1 green, 314 Nlm_Uint1 blue)); 315 void Nlm_MapDefaultButton PROTO((Nlm_WindoW w, Nlm_ButtoN b)); 316 317 /* Get resource value(in the string representation) defined as X11-resources 318 having form: 319 <application>.<_resource>: <resource_value> 320 Vibrant.<_resource>: <resource_value> 321 322 where <application> is the running application name without path and 323 extention, lowercased(!). The "<application>." value overrides the 324 "Vibrant." one. 325 On error, return NULL; deallocation of the value returned on success 326 is the user's responsibility(use "Nlm_MemFree()"). 327 */ 328 Nlm_CharPtr Nlm_XrmGetResource PROTO((const Nlm_Char PNTR _resource)); 329 #endif 330 331 extern Nlm_Int2 Nlm_nextIdNumber; 332 333 extern Nlm_PoinT Nlm_globalMouse; 334 extern Nlm_PoinT Nlm_localMouse; 335 336 extern Nlm_Boolean Nlm_textScrapFull; 337 338 void Nlm_InitVibrantHooks PROTO((void)); 339 340 void Nlm_InitBars PROTO((void)); 341 void Nlm_InitButtons PROTO((void)); 342 void Nlm_InitForms PROTO((void)); 343 void Nlm_InitExtras PROTO((void)); 344 void Nlm_InitGroup PROTO((void)); 345 void Nlm_InitLists PROTO((void)); 346 void Nlm_InitMenus PROTO((void)); 347 void Nlm_InitPrompt PROTO((void)); 348 void Nlm_InitSlate PROTO((void)); 349 void Nlm_InitTexts PROTO((void)); 350 void Nlm_InitWindows PROTO((void)); 351 352 void Nlm_FreeBars PROTO((void)); 353 void Nlm_FreeButtons PROTO((void)); 354 void Nlm_FreeForms PROTO((void)); 355 void Nlm_FreeExtras PROTO((void)); 356 void Nlm_FreeGroup PROTO((void)); 357 void Nlm_FreeLists PROTO((void)); 358 void Nlm_FreeMenus PROTO((void)); 359 void Nlm_FreePrompt PROTO((void)); 360 void Nlm_FreeSlate PROTO((void)); 361 void Nlm_FreeTexts PROTO((void)); 362 void Nlm_FreeWindows PROTO((void)); 363 364 Nlm_Boolean Nlm_RegisterWindows PROTO((void)); 365 Nlm_Boolean Nlm_RegisterSlates PROTO((void)); 366 Nlm_Boolean Nlm_RegisterTexts PROTO((void)); 367 368 void Nlm_ClearItemsInGroup PROTO((Nlm_GraphiC a, Nlm_GraphiC excpt, Nlm_Boolean savePort)); 369 Nlm_Int2 Nlm_CountGroupItems PROTO((Nlm_GraphiC a)); 370 371 Nlm_GraphiC Nlm_CreateLink PROTO((Nlm_GraphiC prnt, Nlm_RectPtr r, Nlm_Int2 recordSize, Nlm_GphPrcs PNTR classPtr)); 372 void Nlm_RemoveLink PROTO((Nlm_GraphiC a)); 373 void Nlm_RecordRect PROTO((Nlm_GraphiC a, Nlm_RectPtr r)); 374 void Nlm_NextPosition PROTO((Nlm_GraphiC a, Nlm_RectPtr r)); 375 Nlm_GphPrcsPtr Nlm_GetClassPtr PROTO((Nlm_GraphiC a)); 376 #ifdef WIN_MAC 377 Nlm_Boolean Nlm_DoClick PROTO((Nlm_GraphiC a, Nlm_PoinT pt)); 378 Nlm_Boolean Nlm_DoKey PROTO((Nlm_GraphiC a, Nlm_Char ch)); 379 void Nlm_DoDraw PROTO((Nlm_GraphiC a)); 380 Nlm_Boolean Nlm_DoIdle PROTO((Nlm_GraphiC a, Nlm_PoinT pt)); 381 #endif 382 #ifdef WIN_MSWIN 383 Nlm_Boolean Nlm_DoCommand PROTO((Nlm_GraphiC a)); 384 #endif 385 #ifdef WIN_MOTIF 386 void Nlm_DoCallback PROTO((Nlm_GraphiC a)); 387 #endif 388 void Nlm_DoShow PROTO((Nlm_GraphiC a, Nlm_Boolean setFlag, Nlm_Boolean savePort)); 389 void Nlm_DoHide PROTO((Nlm_GraphiC a, Nlm_Boolean setFlag, Nlm_Boolean savePort)); 390 void Nlm_DoEnable PROTO((Nlm_GraphiC a, Nlm_Boolean setFlag, Nlm_Boolean savePort)); 391 void Nlm_DoDisable PROTO((Nlm_GraphiC a, Nlm_Boolean setFlag, Nlm_Boolean savePort)); 392 void Nlm_DoActivate PROTO((Nlm_GraphiC a, Nlm_Boolean savePort)); 393 void Nlm_DoDeactivate PROTO((Nlm_GraphiC a, Nlm_Boolean savePort)); 394 Nlm_Handle Nlm_DoRemove PROTO((Nlm_GraphiC a, Nlm_Boolean savePort)); 395 void Nlm_DoReset PROTO((Nlm_GraphiC a, Nlm_Boolean savePort)); 396 void Nlm_DoSelect PROTO((Nlm_GraphiC a, Nlm_Boolean savePort)); 397 void Nlm_DoSetTitle PROTO((Nlm_GraphiC a, Nlm_Int2 item, Nlm_CharPtr title, Nlm_Boolean savePort)); 398 void Nlm_DoGetTitle PROTO((Nlm_GraphiC a, Nlm_Int2 item, Nlm_CharPtr title, size_t maxsize)); 399 void Nlm_DoSetValue PROTO((Nlm_GraphiC a, Nlm_Int2 value, Nlm_Boolean savePort)); 400 Nlm_Int2 Nlm_DoGetValue PROTO((Nlm_GraphiC a)); 401 void Nlm_DoSetStatus PROTO((Nlm_GraphiC a, Nlm_Int2 item, Nlm_Boolean status, Nlm_Boolean savePort)); 402 Nlm_Boolean Nlm_DoGetStatus PROTO((Nlm_GraphiC a, Nlm_Int2 item)); 403 void Nlm_DoSetOffset PROTO((Nlm_GraphiC a, Nlm_Int2 horiz, Nlm_Int2 vert, Nlm_Boolean savePort)); 404 void Nlm_DoGetOffset PROTO((Nlm_GraphiC a, Nlm_Int2Ptr horiz, Nlm_Int2Ptr vert)); 405 Nlm_GraphiC Nlm_DoLinkIn PROTO((Nlm_GraphiC a, Nlm_GraphiC prnt)); 406 void Nlm_DoAdjustPrnt PROTO((Nlm_GraphiC a, Nlm_RectPtr r, Nlm_Boolean align, Nlm_Boolean savePort)); 407 void Nlm_DoSetPosition PROTO((Nlm_GraphiC a, Nlm_RectPtr r, Nlm_Boolean savePort, Nlm_Boolean force)); 408 void Nlm_DoGetPosition PROTO((Nlm_GraphiC a, Nlm_RectPtr r)); 409 void Nlm_DoSetRange PROTO((Nlm_GraphiC a, Nlm_Int2 pgUp, Nlm_Int2 pgDn, Nlm_Int2 max, Nlm_Boolean savePort)); 410 Nlm_GraphiC Nlm_DoGainFocus PROTO((Nlm_GraphiC a, Nlm_Char ch, Nlm_Boolean savePort)); 411 void Nlm_DoLoseFocus PROTO((Nlm_GraphiC a, Nlm_GraphiC excpt, Nlm_Boolean savePort)); 412 void Nlm_DoSendChar PROTO((Nlm_GraphiC a, Nlm_Char ch, Nlm_Boolean savePort)); 413 void Nlm_DoSendFocus (Nlm_GraphiC a, Nlm_Char ch); 414 void Nlm_DoAction PROTO((Nlm_GraphiC a)); 415 416 Nlm_GraphiC Nlm_FindItem PROTO((Nlm_GraphiC a, Nlm_Int2 item)); 417 Nlm_Int2 Nlm_GetItemIndex PROTO((Nlm_GraphiC a)); 418 419 Nlm_WindoW Nlm_GetParentWindow PROTO((Nlm_GraphiC a)); 420 Nlm_Boolean Nlm_GetAllParentsEnabled PROTO((Nlm_GraphiC a)); 421 Nlm_Boolean Nlm_GetAllParentsVisible PROTO((Nlm_GraphiC a)); 422 Nlm_Boolean Nlm_AllParentsButWindowVisible PROTO((Nlm_GraphiC a)); 423 424 void Nlm_SetNext PROTO((Nlm_GraphiC a, Nlm_GraphiC nxt)); 425 Nlm_GraphiC Nlm_GetNext PROTO((Nlm_GraphiC a)); 426 void Nlm_SetParent PROTO((Nlm_GraphiC a, Nlm_GraphiC prnt)); 427 Nlm_GraphiC Nlm_GetParent PROTO((Nlm_GraphiC a)); 428 void Nlm_SetChild PROTO((Nlm_GraphiC a, Nlm_GraphiC chld)); 429 Nlm_GraphiC Nlm_GetChild PROTO((Nlm_GraphiC a)); 430 void Nlm_SetRect PROTO((Nlm_GraphiC a, Nlm_RectPtr r)); 431 void Nlm_GetRect PROTO((Nlm_GraphiC a, Nlm_RectPtr r)); 432 void Nlm_SetEnabled PROTO((Nlm_GraphiC a, Nlm_Boolean enabld)); 433 Nlm_Boolean Nlm_GetEnabled PROTO((Nlm_GraphiC a)); 434 void Nlm_SetVisible PROTO((Nlm_GraphiC a, Nlm_Boolean visibl)); 435 Nlm_Boolean Nlm_GetVisible PROTO((Nlm_GraphiC a)); 436 void Nlm_SetRealized PROTO((Nlm_GraphiC a, Nlm_Boolean realizd)); 437 Nlm_Boolean Nlm_GetRealized PROTO((Nlm_GraphiC a)); 438 439 Nlm_GraphiC Nlm_LinkIn PROTO((Nlm_GraphiC a, Nlm_GraphiC prnt)); 440 441 void Nlm_LoadGraphicData PROTO((Nlm_GraphiC a, Nlm_GraphiC nxt, Nlm_GraphiC prnt, Nlm_GraphiC chld, Nlm_GraphiC lstchd, Nlm_GphPrcs PNTR classPtr, Nlm_ActnProc actnProc, Nlm_RectPtr r, Nlm_Boolean enabl, Nlm_Boolean vis, Nlm_VoidPtr dat, Nlm_FreeProc cln)); 442 void Nlm_SetGraphicData PROTO((Nlm_GraphiC a, Nlm_GraphicData PNTR gdata)); 443 void Nlm_GetGraphicData PROTO((Nlm_GraphiC a, Nlm_GraphicData PNTR gdata)); 444 void Nlm_LoadAction PROTO((Nlm_GraphiC a, Nlm_ActnProc actnProc)); 445 446 void Nlm_LoadBoxData PROTO((Nlm_BoX a, Nlm_PoinT nxt, Nlm_PoinT lmt, Nlm_PoinT rst, Nlm_Int2 top, Nlm_Int2 ncol, Nlm_Int2 xMrg, Nlm_Int2 yMrg, Nlm_Int2 xSpc, Nlm_Int2 ySpc, Nlm_Int2 wid, Nlm_Int2 hgt)); 447 void Nlm_SetBoxData PROTO((Nlm_BoX a, Nlm_BoxData PNTR bdata)); 448 void Nlm_GetBoxData PROTO((Nlm_BoX a, Nlm_BoxData PNTR bdata)); 449 450 void Nlm_SetExtraData PROTO((Nlm_GraphiC a, Nlm_VoidPtr dptr, Nlm_Int2 start, Nlm_Int2 extra)); 451 void Nlm_GetExtraData PROTO((Nlm_GraphiC a, Nlm_VoidPtr dptr, Nlm_Int2 start, Nlm_Int2 extra)); 452 453 void Nlm_PointToolToPoinT PROTO((Nlm_PointTool src, Nlm_PointPtr dst)); 454 void Nlm_PoinTToPointTool PROTO((Nlm_PoinT src, Nlm_PointTool PNTR dst)); 455 void Nlm_RectToolToRecT PROTO((Nlm_RectTool PNTR src, Nlm_RectPtr dst)); 456 void Nlm_RecTToRectTool PROTO((Nlm_RectPtr src, Nlm_RectTool PNTR dst)); 457 458 void Nlm_LocalToGlobal PROTO((Nlm_PointPtr pt)); 459 void Nlm_GlobalToLocal PROTO((Nlm_PointPtr pt)); 460 461 void Nlm_VibrantSetGUI PROTO((void)); 462 463 #if defined(WIN_MAC) && defined(WIN_MAC_QUARTZ) 464 CGRect Nlm_RecTToCGRect(Nlm_RecT r); 465 Nlm_RecT Nlm_CGRectToRecT(CGRect cgr); 466 CGRect Nlm_RectQDToCG(Rect r); 467 Rect Nlm_RectCGToQD(CGRect r); 468 CGPoint Nlm_PoinTToCGPoint(Nlm_PoinT np); 469 Nlm_PoinT Nlm_CGPointToPoinT(CGPoint qp); 470 #endif 471 472 #ifdef WIN_MSWIN 473 extern Nlm_Boolean Nlm_VibrantDisabled PROTO((void)); 474 extern HDC Nlm_GetPicWinHDC PROTO((void)); 475 #endif 476 477 478 #ifdef WIN_MOTIF 479 extern Nlm_Char Nlm_GetInputChar PROTO((XKeyEvent *event)); 480 extern void Nlm_RegisterStdTranslations PROTO(( void )); 481 extern void Nlm_OverrideStdTranslations PROTO((Nlm_GraphiC g, Widget w, 482 Nlm_Int4 filter)); 483 #endif 484 #ifdef WIN_MSWIN 485 extern Nlm_Char Nlm_KeydownToChar PROTO((WPARAM wParam)); 486 extern Nlm_Boolean Nlm_ProcessKeydown PROTO((Nlm_GraphiC g, WPARAM wParam, 487 Nlm_Int4 filter)); 488 #endif 489 490 /** includes needed by vibslate.c **/ 491 492 #ifdef WIN_MOTIF 493 #include <X11/keysym.h> 494 #include <X11/keysymdef.h> 495 #endif 496 497 /** includes needed by vibwndws.c ***/ 498 499 #ifdef WIN_MAC 500 #ifdef __MWERKS__ 501 #include <Resources.h> 502 #include <Scrap.h> 503 #include <AppleEvents.h> 504 #include <Gestalt.h> 505 #endif 506 #endif 507 508 #ifdef WIN_MSWIN 509 #include <shellapi.h> 510 #endif 511 512 #ifdef WIN_MOTIF 513 #include <Xm/DialogS.h> 514 #endif 515 516 /** includes needed by vibutils.c ***/ 517 518 #ifdef WIN_MAC 519 #ifdef __MWERKS__ 520 #ifndef OS_UNIX_DARWIN 521 #include <Printing.h> 522 #endif 523 #include <Processes.h> 524 #include <Gestalt.h> 525 #include <Scrap.h> 526 #include <AppleEvents.h> 527 #include <Palettes.h> 528 #endif 529 #endif 530 531 #ifdef WIN_MSWIN 532 #include <commdlg.h> 533 #endif 534 535 #ifdef WIN_MOTIF 536 #include <Xm/FileSB.h> 537 #include <Xm/CutPaste.h> 538 539 /* 540 * Test X windows to see what kind of color buffer is available. 541 * Necessary because Linux supports only the type available 542 * from the hardware. Code in vibwndws.c. Returns TRUE if match and visinfo. 543 */ 544 545 extern Nlm_Boolean Nlm_CheckX(XVisualInfo *visinfo); 546 547 548 #ifdef __cplusplus 549 } 550 #endif 551 552 553 #ifdef OS_UNIX 554 #include <unistd.h> 555 #endif 556 #ifdef OS_VMS 557 #endif 558 #endif 559 560 #endif 561 562