library Menu;

uses
  ShareMem,
  uMenu in 'uMenu.pas',
  uGlobal in '..\uGlobal.pas';

type
  TCallState = (onGetProcsList, onInit, onDeInit, onProgress);
  TStringArray = array of string;

procedure Add(var SA: TStringArray; Name: string);
begin
  SetLength(SA,length(SA)+1);
  SA[length(SA)-1]:=Name;
end;

function MainProc(State: TCallState): TStringArray; stdcall;
begin
  case State of
    onGetProcsList:
      begin
        Add(Result,'MenuProcess');
        Add(Result,'menu_btnstart_click');
        add(Result,'menu_btnstart_exit');
      end;
    onInit:
      begin
        Call('glOnProcess',['MenuProcess']);
        InitMenu();
        //InitMenu2;
        //Step:=3; 
      end;
    onDeInit:
      begin
      end;
  end;
end;

procedure SendHandles(Procs: array of pointer); stdcall;
begin
  Call:=Procs[0];
  PluginLoad:=Procs[1];
  PluginLoaded:=Procs[2];
end;

exports
  MainProc,
  SendHandles,

  MenuProcess,

  menu_btnstart_click,
  menu_btnstart_exit;

begin
end.
