with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IHTMLTextAreaElement2_Interface is

   procedure Initialize (This : in out IHTMLTextAreaElement2_Type) is
   begin
      Set_IID (This, IID_IHTMLTextAreaElement2);
   end Initialize;

   function Pointer (This : IHTMLTextAreaElement2_Type)
     return Pointer_To_IHTMLTextAreaElement2
   is
   begin
      return To_Pointer_To_IHTMLTextAreaElement2 (Address (This));
   end Pointer;

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

   procedure Put_selectionStart
     (This : IHTMLTextAreaElement2_Type;
      p    : Interfaces.C.long)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_selectionStart
         (Pointer (This),
          p));

   end Put_selectionStart;

   function Get_selectionStart
     (This : IHTMLTextAreaElement2_Type)
     return Interfaces.C.long
   is
       RetVal : aliased Interfaces.C.long;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_selectionStart
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_selectionStart;

   procedure Put_selectionEnd
     (This : IHTMLTextAreaElement2_Type;
      p    : Interfaces.C.long)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_selectionEnd
         (Pointer (This),
          p));

   end Put_selectionEnd;

   function Get_selectionEnd
     (This : IHTMLTextAreaElement2_Type)
     return Interfaces.C.long
   is
       RetVal : aliased Interfaces.C.long;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_selectionEnd
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_selectionEnd;

   procedure setSelectionRange
     (This  : IHTMLTextAreaElement2_Type;
      start : Interfaces.C.long;
      uend  : Interfaces.C.long)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.setSelectionRange
         (Pointer (This),
          start,
          uend));

   end setSelectionRange;

end MSHTML.IHTMLTextAreaElement2_Interface;

