1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
unit plugininfo;
{$ifdef fpc}
{$mode objfpc}{$H+}
{$endif}
{$IFDEF Win32}
{$DEFINE Windows}
{$ENDIF}
interface
uses
{$ifndef fpc} Windows, {$endif}
Classes, SysUtils, Forms;
{*******************************************************************
* Plugin library extension
*******************************************************************}
const
{$IFDEF Windows}
ID_PLUGIN_EXTENSION = 'dll';
{$ENDIF}
{$IFDEF UNIX}
{$IFDEF DARWIN}
ID_PLUGIN_EXTENSION = 'dylib';
{$ELSE}
ID_PLUGIN_EXTENSION = 'so';
{$ENDIF}
{$ENDIF}
ID_PLUGIN_WILDCARD = '*.' + ID_PLUGIN_EXTENSION;
{*******************************************************************
* Plugin error codes
*******************************************************************}
const
VMG_NOERROR = 0;
VMG_ERROR = 1;
{*******************************************************************
* Plugin data structure
*******************************************************************}
type
TCalculateViewRectFunc = procedure (var viewRect, drawGlassRect: TRect;
const screenRect: TRect; AMagnification: double) of object; cdecl;
PApplication = ^TApplication;
TPluginData = record
{ System Information }
DesktopPos: TRect;
Application: PApplication;
{ Glass information }
Magnification: PDouble;
GlassLeft, GlassTop: PInteger;
GlassWidth, GlassHeight: PInteger;
{ Custom information from the configuration file }
PluginData: Integer;
{ Callbacks for utility function in the main application }
CalculateViewRectFunc: TCalculateViewRectFunc;
end;
implementation
end.
|