home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / XfeWidgets / Xfe / Find.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  5.0 KB  |  140 lines

  1. /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18. /*-----------------------------------------*/
  19. /*                                                                        */
  20. /* Name:        <Xfe/Find.h>                                            */
  21. /* Description:    Xfe widgets utilities to find children.                    */
  22. /* Author:        Ramiro Estrugo <ramiro@netscape.com>                    */
  23. /*                                                                        */
  24. /*----------------------------------------------------------------------*/
  25.  
  26.  
  27. #ifndef _XfeFind_h_                                /* start Find.h            */
  28. #define _XfeFind_h_
  29.  
  30. #include <Xm/Xm.h>                                /* Motif public defs    */
  31. #include <Xfe/StringDefs.h>                        /* Xfe public str defs    */
  32. #include <Xfe/Defaults.h>                        /* Xfe default res vals    */
  33.  
  34. #include <assert.h>                                /* Assert                */
  35.  
  36. #ifdef __cplusplus                                /* start C++            */
  37. extern "C" {
  38. #endif
  39.  
  40. /*----------------------------------------------------------------------*/
  41. /*                                                                        */
  42. /* Widget find test func                                                */
  43. /*                                                                        */
  44. /*----------------------------------------------------------------------*/
  45. typedef Boolean    (*XfeWidgetTestFunc)    (Widget        w,
  46.                                          XtPointer    data);
  47.  
  48. /*----------------------------------------------------------------------*/
  49. /*                                                                        */
  50. /* Widget find bits                                                        */
  51. /*                                                                        */
  52. /*----------------------------------------------------------------------*/
  53. #define XfeFIND_ANY            (0)
  54. #define XfeFIND_ALIVE        (1 << 0)
  55. #define XfeFIND_MANAGED        (1 << 1)
  56. #define XfeFIND_REALIZED    (1 << 2)
  57. #define XfeFIND_ALL            (XfeFIND_ALIVE |         \
  58.                              XfeFIND_MANAGED |        \
  59.                              XfeFIND_REALIZED)
  60.  
  61. /*----------------------------------------------------------------------*/
  62. /*                                                                        */
  63. /* Find descendant functions.                                            */
  64. /*                                                                        */
  65. /*----------------------------------------------------------------------*/
  66. extern Widget
  67. XfeDescendantFindByFunction        (Widget                w,
  68.                                  XfeWidgetTestFunc    func,
  69.                                  int                mask,
  70.                                  Boolean            popups,
  71.                                  XtPointer            data);
  72. /*----------------------------------------------------------------------*/
  73. extern Widget
  74. XfeDescendantFindByName            (Widget                w,
  75.                                  String                name,
  76.                                  int                mask,
  77.                                  Boolean            popups);
  78. /*----------------------------------------------------------------------*/
  79. extern Widget
  80. XfeDescendantFindByClass        (Widget                w,
  81.                                  WidgetClass        wc,
  82.                                  int                mask,
  83.                                  Boolean            popups);
  84. /*----------------------------------------------------------------------*/
  85. extern Widget
  86. XfeDescendantFindByWindow        (Widget                w,
  87.                                  Window                window,
  88.                                  int                mask,
  89.                                  Boolean            popups);
  90. /*----------------------------------------------------------------------*/
  91. extern Widget
  92. XfeDescendantFindByCoordinates    (Widget                w,
  93.                                  Position            x,
  94.                                  Position            y);
  95. /*----------------------------------------------------------------------*/
  96. extern Widget
  97. XfeChildFindByIndex                (Widget                w,
  98.                                  Cardinal            i);
  99. /*----------------------------------------------------------------------*/
  100.  
  101.  
  102. /*----------------------------------------------------------------------*/
  103. /*                                                                        */
  104. /* Find ancestor functions.                                                */
  105. /*                                                                        */
  106. /*----------------------------------------------------------------------*/
  107. extern Widget
  108. XfeAncestorFindByFunction        (Widget                w,
  109.                                  XfeWidgetTestFunc    func,
  110.                                  int                mask,
  111.                                  XtPointer            data);
  112. /*----------------------------------------------------------------------*/
  113. extern Widget
  114. XfeAncestorFindByName            (Widget                w,
  115.                                  String                name,
  116.                                  int                mask);
  117. /*----------------------------------------------------------------------*/
  118. extern Widget
  119. XfeAncestorFindByClass            (Widget                w,
  120.                                  WidgetClass        wc,
  121.                                  int                mask);
  122. /*----------------------------------------------------------------------*/
  123. extern Widget
  124. XfeAncestorFindByWindow            (Widget                w,
  125.                                  Window                window,
  126.                                  int                mask);
  127. /*----------------------------------------------------------------------*/
  128. extern Widget
  129. XfeAncestorFindTopLevelShell    (Widget                w);
  130. /*----------------------------------------------------------------------*/
  131. extern Widget
  132. XfeAncestorFindApplicationShell    (Widget                w);
  133. /*----------------------------------------------------------------------*/
  134.  
  135. #ifdef __cplusplus                                /* end C++                */
  136. }
  137. #endif
  138.  
  139. #endif                                            /* end Find.h            */
  140.