Skip to content

Latest commit

 

History

History
17 lines (15 loc) · 1012 Bytes

DefiningInterfaces.md

File metadata and controls

17 lines (15 loc) · 1012 Bytes

How to write Talon interfaces

Cross platform code in Talon is generated by the Talon.CodeGenerator project in the tools directory.

Interfaces are defined in three files:

  • Base class interface - Usually have the name Base. These files are generated, so don't edit them directly. Interfaces should be defined in the appropriate json file in the definitions folder.
  • Platform specific interface - These files usually contain the name of the platform (ie, Win32Window) and have method definitions generated in a separate file. The corresponding cpp file should only contain code needed to define the interface for the given platform or API
  • Concrete interface - This file defines the public API for the class depending on the conditions of the build, and has the same name as the defined interface (ie, Window). The generated methods are included just like Platform specific definitions. These files can be used to define cross-platform behavior