28.01.2015 Views

Hermes: A Tutorial and Reference Manual - Researcher - IBM

Hermes: A Tutorial and Reference Manual - Researcher - IBM

Hermes: A Tutorial and Reference Manual - Researcher - IBM

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

asmallchangetotheinterfaceFilter.Recallthattheadapterexportsa 362.3.Interfaces porttoitsQuitserviceaswellasaClientPutLineport: AdapterInterface:callmessage( Adapter:using(St<strong>and</strong>ard,WMExternal,Quit)definitions ClientPutLine:PutLineOut,--portfromclienttoadapter ClientGetProgram:GetProgramOut)--portfromclienttoadapter Quit:QuitOut,--porttoshutdownadapter AdapterToWindow:WriteToWindowOut,--porttowindowmanager WindowName:Charstring,--windownamefordirectingoutput GetProgram:GetProgramOut,--porttoGetProgramService<br />

GetProgramports,<strong>and</strong>theportstothefourfront-endaccessibleservices AdapterIn:inportofAdapterInterface constant(AdapterToWindow,WindowName,GetProgram)<br />

ofthewindowmanager.Itsinterfaceis: AdapterOut:outportofAdapterIn; enddefinitions Finally,thefrontendprocessmustbegiventheGetLine,PutLine,<strong>and</strong> exitffullg;<br />

FEPExternal:using(St<strong>and</strong>ard,WMExternal)definitions finit(AdapterToWindow),init(WindowName),init(GetProgram)g;<br />

window FEPInterface:callmessage( Refocus:WindowOut, Kill:WindowOut, Create:CreateOut) constant(GetLine,PutLine,GetProgram,Dispatch,Refocus,Kill, PutLine:PutLineOut, GetProgram:GetProgramOut, Dispatch:DispatchOut,--dispatchalinetotheappropriate GetLine:GetLineOut,<br />

2.4WindowSystemShell Create) FEPIn:inportofFEPInterfaceffullg; FEPOut:outportofFEPIn; enddefinitions exitffullg;<br />

process<strong>and</strong>thewindowmanager.Theoutershellissimilartotheprogram Let'sbeginwiththeoutershellofthesystem.Itsimplycreatesthefrontend Nowthattheinterfacesareallwritten,theprogramsarefairlyeasytowrite.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!