home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 April / Chip_1997-04_cd.bin / prezent / cb / data.z / VCSINTF.PAS < prev    next >
Pascal/Delphi Source File  |  1997-01-16  |  4KB  |  88 lines

  1.  
  2. {*******************************************************}
  3. {                                                       }
  4. {       Delphi Visual Component Library                 }
  5. {                                                       }
  6. {       Copyright (c) 1995,1996 Borland International   }
  7. {                                                       }
  8. {*******************************************************}
  9.  
  10. unit VcsIntf;  { VCS Interface declarations }
  11.  
  12. {  This file defines the cooperative interface between the Delphi IDE
  13.    and a VCS Manager DLL.  The VCS Manager DLL must be named in the
  14.    DELPHI.INI file at startup time under the isVersionContol section,
  15.    as the value for the ivVCSManager variable.
  16.  
  17.    As the Delphi IDE loads, it will load the specified DLL and attempt
  18.    to obtain a proc address for the DLL's initialization function, which
  19.    must be exported using the VCSManagerEntryPoint constant.  }
  20.  
  21. interface
  22.  
  23. uses Windows, VirtIntf, ToolIntf;
  24.  
  25. const
  26.   isVersionControl = 'Version Control';
  27.   ivVCSManager = 'VCSManager';
  28.   VCSManagerEntryPoint = 'INITVCS0013';
  29.  
  30. type
  31.  
  32.   { The VCS client object should be returned by the VCS Manager DLL as the
  33.     result of the init call.  Delphi is responsible for freeing the
  34.     client object before unloading the VCS Manager DLL.
  35.  
  36.     GetIDString     - Called at initialization.  Client should return
  37.                       a unique identification string.  The following
  38.                       string is reserved for Borland use:
  39.  
  40.                         Borland.StdVcs
  41.  
  42.     ExecuteVerb     - Called when the user selects a verb from a menu.
  43.  
  44.     GetMenuName     - Called to retrieve the name of the main menu item
  45.                       to be added to the application's menu bar.  Return
  46.                       a blank string to indicate no menu.
  47.  
  48.     GetVerb         - Called to retrieve the menu text for each verb.
  49.                       A verb may be returned as a blank string to create a
  50.                       seperator bar.
  51.  
  52.     GetVerbCount    - Called to determine the number of available verbs. This
  53.                       function will not be called if the GetMenuName function
  54.                       returns a blank string (indicating no menu).
  55.  
  56.     GetVerbState    - Called to determine the state of a particular verb.
  57.                       The return value is a bit field of various states.
  58.                       (See below for definition of bit values).
  59.  
  60.     ProjectChange   - Called when there is any state change of the current
  61.                       project, i.e. when a project is destroyed or created.
  62.  
  63.   }
  64.  
  65.   TIVCSClient = class(TInterface)
  66.     function GetIDString: string; virtual; stdcall; abstract;
  67.     procedure ExecuteVerb(Index: Integer); virtual; stdcall; abstract;
  68.     function GetMenuName: string; virtual; stdcall; abstract;
  69.     function GetVerb(Index: Integer): string; virtual; stdcall; abstract;
  70.     function GetVerbCount: Integer; virtual; stdcall; abstract;
  71.     function GetVerbState(Index: Integer): Word; virtual; stdcall; abstract;
  72.     procedure ProjectChange; virtual; stdcall; abstract;
  73.   end;
  74.  
  75.   { A function matching this signature must be exported from the VCS
  76.     Manager DLL. }
  77.   TVCSManagerInitProc = function (VCSInterface: TIToolServices): TIVCSClient stdcall;
  78.  
  79. { Bit flags for GetVerbState function }
  80. const
  81.   vsEnabled    = $01;    { Verb enabled if set, otherwise disabled }
  82.   vsChecked    = $02;    { Verb checked if set, otherwise cleared  }
  83.  
  84. implementation
  85.  
  86. end.
  87.  
  88.