with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IDOMTreeWalker_Interface is

   procedure Initialize (This : in out IDOMTreeWalker_Type) is
   begin
      Set_IID (This, IID_IDOMTreeWalker);
   end Initialize;

   function Pointer (This : IDOMTreeWalker_Type)
     return Pointer_To_IDOMTreeWalker
   is
   begin
      return To_Pointer_To_IDOMTreeWalker (Address (This));
   end Pointer;

   procedure Attach (This    : in out IDOMTreeWalker_Type;
                     Pointer : in     Pointer_To_IDOMTreeWalker)
   is
   begin
      Attach (This, GNATCOM.IInterface.To_Pointer_To_IUnknown
              (Pointer.all'Address));
   end Attach;

   function Get_root
     (This : IDOMTreeWalker_Type)
     return GNATCOM.Types.Pointer_To_IDispatch
   is
       RetVal : aliased GNATCOM.Types.Pointer_To_IDispatch;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_root
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_root;

   function Get_whatToShow
     (This : IDOMTreeWalker_Type)
     return Interfaces.C.unsigned_long
   is
       RetVal : aliased Interfaces.C.unsigned_long;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_whatToShow
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_whatToShow;

   function Get_filter
     (This : IDOMTreeWalker_Type)
     return GNATCOM.Types.Pointer_To_IDispatch
   is
       RetVal : aliased GNATCOM.Types.Pointer_To_IDispatch;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_filter
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_filter;

   function Get_expandEntityReferences
     (This : IDOMTreeWalker_Type)
     return GNATCOM.Types.VARIANT_BOOL
   is
       RetVal : aliased GNATCOM.Types.VARIANT_BOOL;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_expandEntityReferences
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_expandEntityReferences;

   procedure PutRef_currentNode
     (This : IDOMTreeWalker_Type;
      p    : GNATCOM.Types.Pointer_To_IDispatch)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.PutRef_currentNode
         (Pointer (This),
          p));

   end PutRef_currentNode;

   function Get_currentNode
     (This : IDOMTreeWalker_Type)
     return GNATCOM.Types.Pointer_To_IDispatch
   is
       RetVal : aliased GNATCOM.Types.Pointer_To_IDispatch;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_currentNode
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_currentNode;

   function parentNode
     (This      : IDOMTreeWalker_Type)
     return GNATCOM.Types.Pointer_To_IDispatch
   is
       RetVal : aliased GNATCOM.Types.Pointer_To_IDispatch;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.parentNode
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end parentNode;

   function firstChild
     (This      : IDOMTreeWalker_Type)
     return GNATCOM.Types.Pointer_To_IDispatch
   is
       RetVal : aliased GNATCOM.Types.Pointer_To_IDispatch;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.firstChild
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end firstChild;

   function lastChild
     (This      : IDOMTreeWalker_Type)
     return GNATCOM.Types.Pointer_To_IDispatch
   is
       RetVal : aliased GNATCOM.Types.Pointer_To_IDispatch;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.lastChild
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end lastChild;

   function previousSibling
     (This      : IDOMTreeWalker_Type)
     return GNATCOM.Types.Pointer_To_IDispatch
   is
       RetVal : aliased GNATCOM.Types.Pointer_To_IDispatch;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.previousSibling
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end previousSibling;

   function nextSibling
     (This      : IDOMTreeWalker_Type)
     return GNATCOM.Types.Pointer_To_IDispatch
   is
       RetVal : aliased GNATCOM.Types.Pointer_To_IDispatch;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.nextSibling
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end nextSibling;

   function previousNode
     (This      : IDOMTreeWalker_Type)
     return GNATCOM.Types.Pointer_To_IDispatch
   is
       RetVal : aliased GNATCOM.Types.Pointer_To_IDispatch;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.previousNode
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end previousNode;

   function nextNode
     (This      : IDOMTreeWalker_Type)
     return GNATCOM.Types.Pointer_To_IDispatch
   is
       RetVal : aliased GNATCOM.Types.Pointer_To_IDispatch;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.nextNode
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end nextNode;

end MSHTML.IDOMTreeWalker_Interface;

