with GNATCOM.Errors;

package body MSHTML.IHTMLCaret_Interface is

   procedure Initialize (This : in out IHTMLCaret_Type) is
   begin
      Set_IID (This, IID_IHTMLCaret);
   end Initialize;

   function Pointer (This : IHTMLCaret_Type)
     return Pointer_To_IHTMLCaret
   is
   begin
      return To_Pointer_To_IHTMLCaret (Address (This));
   end Pointer;

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

   procedure MoveCaretToPointer
     (This            : IHTMLCaret_Type;
      pDispPointer    : Pointer_To_IDisplayPointer;
      fScrollIntoView : Interfaces.C.long;
      eDir            : uCARET_DIRECTION)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.MoveCaretToPointer
         (Pointer (This),
          pDispPointer,
          fScrollIntoView,
          eDir));

   end MoveCaretToPointer;

   procedure MoveCaretToPointerEx
     (This            : IHTMLCaret_Type;
      pDispPointer    : Pointer_To_IDisplayPointer;
      fVisible        : Interfaces.C.long;
      fScrollIntoView : Interfaces.C.long;
      eDir            : uCARET_DIRECTION)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.MoveCaretToPointerEx
         (Pointer (This),
          pDispPointer,
          fVisible,
          fScrollIntoView,
          eDir));

   end MoveCaretToPointerEx;

   procedure MoveMarkupPointerToCaret
     (This            : IHTMLCaret_Type;
      pIMarkupPointer : Pointer_To_IMarkupPointer)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.MoveMarkupPointerToCaret
         (Pointer (This),
          pIMarkupPointer));

   end MoveMarkupPointerToCaret;

   procedure MoveDisplayPointerToCaret
     (This         : IHTMLCaret_Type;
      pDispPointer : Pointer_To_IDisplayPointer)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.MoveDisplayPointerToCaret
         (Pointer (This),
          pDispPointer));

   end MoveDisplayPointerToCaret;

   procedure IsVisible
     (This       : IHTMLCaret_Type;
      pIsVisible : GNATCOM.Types.Pointer_To_long)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.IsVisible
         (Pointer (This),
          pIsVisible));

   end IsVisible;

   procedure Show
     (This            : IHTMLCaret_Type;
      fScrollIntoView : Interfaces.C.long)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Show
         (Pointer (This),
          fScrollIntoView));

   end Show;

   procedure Hide
     (This : IHTMLCaret_Type)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Hide
         (Pointer (This)));

   end Hide;

   procedure InsertText
     (This  : IHTMLCaret_Type;
      pText : GNATCOM.Types.Pointer_To_unsigned_short;
      lLen  : Interfaces.C.long)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.InsertText
         (Pointer (This),
          pText,
          lLen));

   end InsertText;

   procedure scrollIntoView
     (This : IHTMLCaret_Type)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.scrollIntoView
         (Pointer (This)));

   end scrollIntoView;

   procedure GetLocation
     (This       : IHTMLCaret_Type;
      pPoint     : Pointer_To_tagPOINT;
      fTranslate : Interfaces.C.long)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.GetLocation
         (Pointer (This),
          pPoint,
          fTranslate));

   end GetLocation;

   procedure GetCaretDirection
     (This  : IHTMLCaret_Type;
      peDir : Pointer_To_uCARET_DIRECTION)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.GetCaretDirection
         (Pointer (This),
          peDir));

   end GetCaretDirection;

   procedure SetCaretDirection
     (This : IHTMLCaret_Type;
      eDir : uCARET_DIRECTION)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.SetCaretDirection
         (Pointer (This),
          eDir));

   end SetCaretDirection;

end MSHTML.IHTMLCaret_Interface;

