with GNATCOM.Errors;

package body MSHTML.IViewObjectPresentNotifySite_Interface is

   procedure Initialize (This : in out IViewObjectPresentNotifySite_Type) is
   begin
      Set_IID (This, IID_IViewObjectPresentNotifySite);
   end Initialize;

   function Pointer (This : IViewObjectPresentNotifySite_Type)
     return Pointer_To_IViewObjectPresentNotifySite
   is
   begin
      return To_Pointer_To_IViewObjectPresentNotifySite (Address (This));
   end Pointer;

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

   function CreateSurfacePresenter
     (This            : IViewObjectPresentNotifySite_Type;
      pDevice         : GNATCOM.Types.Pointer_To_IUnknown;
      width           : Interfaces.C.unsigned;
      height          : Interfaces.C.unsigned;
      backBufferCount : Interfaces.C.unsigned;
      format          : DXGI_FORMAT;
      mode            : uVIEW_OBJECT_ALPHA_MODE)
     return Pointer_To_ISurfacePresenter
   is
       RetVal : aliased Pointer_To_ISurfacePresenter;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.CreateSurfacePresenter
         (Pointer (This),
          pDevice,
          width,
          height,
          backBufferCount,
          format,
          mode,
          RetVal'Unchecked_Access));

      return RetVal;
   end CreateSurfacePresenter;

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

      return RetVal;
   end IsHardwareComposition;

   procedure SetCompositionMode
     (This : IViewObjectPresentNotifySite_Type;
      mode : uVIEW_OBJECT_COMPOSITION_MODE)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.SetCompositionMode
         (Pointer (This),
          mode));

   end SetCompositionMode;

   procedure RequestFrame
     (This : IViewObjectPresentNotifySite_Type)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.RequestFrame
         (Pointer (This)));

   end RequestFrame;

end MSHTML.IViewObjectPresentNotifySite_Interface;

