home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / lib / layout / layprobe.h < prev    next >
Encoding:
Text File  |  1998-04-08  |  3.7 KB  |  111 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. /* 
  21.  * Defines the abstraction of a layout probe object that gives information about 
  22.  * layout elements.  No mutilation of the layout elements is allowed by this
  23.  * probe.  Each FE uses this API to satisfy QA Partner script requests for layout 
  24.  * information. 
  25.  *
  26.  */
  27.  
  28. /* 
  29.  * Constructor/Destructor for probe 
  30.  *
  31.  */
  32.  
  33. /* Probe state is created.  Probe position gets set to "nothing". */
  34. long LO_QA_CreateProbe( void );            
  35.  
  36. /* Probe state is destroyed. */
  37. void LO_QA_DestroyProbe( long probeID );
  38.  
  39.  
  40. /*
  41.  * Functions to set position of layout probe.  
  42.  *
  43.  */
  44.  
  45. /* Sets probe position to first layout element in document. */
  46. Bool LO_QA_GotoFirstElement( long probeID );
  47.  
  48. /* 
  49.     If the probe has just been created, the next element is the first layout element in the document.
  50.     If there is a next element, the function returns TRUE and sets the probe position to the next element.
  51.     If there is no next element, the function returns FALSE and resets the probe position to nothing. 
  52. */
  53. Bool LO_QA_GotoNextElement( long probeID );
  54.  
  55. /*     
  56.     Sets probe position and returns TRUE or false based on the following table:
  57.  
  58.     Current Probe Position        New Probe Position                    Return value
  59.     ----------------------        ------------------                    ------------
  60.     Table                        First cell in table                    TRUE
  61.     Cell                        First layout element in cell        TRUE
  62.     Layer                        First layout element in layer        TRUE
  63.     Any other element            No change                            FALSE    
  64.  */
  65.  
  66. Bool LO_QA_GotoChildElement( long probeID );
  67.  
  68. /*     
  69.     Sets probe position and returns TRUE or false based on the following table:
  70.  
  71.     Current Probe Position        New Probe Position                    Return value
  72.     ----------------------        ------------------                    ------------    
  73.     Cell within a table            Parent Table                        TRUE
  74.     Element within a cell        Parent Cell                            TRUE
  75.     Element within a layer        Parent Layer                        TRUE
  76.     Any other element            No change                            FALSE    
  77.  */
  78.  
  79. Bool LO_QA_GotoParentElement( long probeID );
  80.  
  81. /*
  82.     Gets the layout element type that the probe is positioned on.
  83.     Returns FALSE if the probe is not positioned on any element, else returns TRUE. 
  84. */
  85. Bool LO_QA_GetElementType( long probeID, int *type );
  86.  
  87. /* 
  88.  * Functions to return the current layout element's position and dimensions.
  89.  *
  90.  */
  91.  
  92. /* 
  93.     Each of these functions return TRUE if the probe position is set to a layout element,
  94.     otherwise, they return FALSE.
  95. */
  96. Bool LO_QA_GetElementXPosition( long probeID, long *x );
  97. Bool LO_QA_GetElementYPosition( long probeID, long *y );
  98. Bool LO_QA_GetElementWidth( long probeID, long *width );
  99. Bool LO_QA_GetElementHeight( long probeID, long *height );
  100.  
  101. Bool LO_QA_HasURL( long probeID, Bool *hasURL );
  102. Bool LO_QA_HasText( long probeID, Bool *hasText );
  103. Bool LO_QA_HasColor( long probeID, Bool *hasColor );
  104. Bool LO_QA_HasChild( long probeID, Bool *hasChild );
  105. Bool LO_QA_HasParent( long probeID, Bool *hasParent );
  106.  
  107. Bool LO_QA_GetText( long probeID, char **text );
  108. Bool LO_QA_GetURL( long probeID, char **url );
  109.  
  110.  
  111.