KiCad PCB EDA Suite
Loading...
Searching...
No Matches
kiway.h File Reference
#include <array>
#include <atomic>
#include <wx/defs.h>
#include <wx/event.h>
#include <import_export.h>
#include <search_stack.h>
#include <project.h>
#include <frame_type.h>
#include <mail_type.h>
#include <ki_exception.h>

Go to the source code of this file.

Classes

struct  KIFACE
 Implement a participant in the KIWAY alchemy. More...
 
class  KIWAY
 A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad process. More...
 

Macros

#define KIFACE_VERSION   1
 
#define KIFACE_GETTER   KIFACE_1
 
#define KIFACE_INSTANCE_NAME_AND_VERSION   "KIFACE_1"
 
#define KFCTL_STANDALONE   ( 1 << 0 )
 Running as a standalone Top.
 
#define KFCTL_CPP_PROJECT_SUITE   ( 1 << 1 )
 Running under C++ project mgr, possibly with others.
 
#define KFCTL_CLI   ( 1 << 2 )
 Running as CLI app.
 

Typedefs

typedef KIFACEKIFACE_GETTER_FUNC(int *aKIFACEversion, int aKIWAYversion, PGM_BASE *aProgram)
 Point to the one and only KIFACE export.
 

Functions

KIFACEKIFACE_GETTER (int *aKIFACEversion, int aKIWAYversion, PGM_BASE *aProgram)
 No name mangling. Each KIFACE (DSO/DLL) will implement this once.
 

Variables

KIWAY Kiway
 

Macro Definition Documentation

◆ KFCTL_CLI

#define KFCTL_CLI   ( 1 << 2 )

Running as CLI app.

Definition at line 165 of file kiway.h.

Referenced by Kiway(), PCB::IFACE::OnKifaceStart(), and SCH::IFACE::OnKifaceStart().

◆ KFCTL_CPP_PROJECT_SUITE

#define KFCTL_CPP_PROJECT_SUITE   ( 1 << 1 )

◆ KFCTL_STANDALONE

#define KFCTL_STANDALONE   ( 1 << 0 )

Running as a standalone Top.

Definition at line 163 of file kiway.h.

Referenced by KIWAY::dso_search_path(), KIFACE_BASE::IsSingle(), and PGM_KICAD::OnPgmInit().

◆ KIFACE_GETTER

#define KIFACE_GETTER   KIFACE_1

Definition at line 113 of file kiway.h.

Referenced by PGM_SINGLE_TOP::OnPgmInit().

◆ KIFACE_INSTANCE_NAME_AND_VERSION

#define KIFACE_INSTANCE_NAME_AND_VERSION   "KIFACE_1"

Definition at line 117 of file kiway.h.

Referenced by KIWAY::KiFACE().

◆ KIFACE_VERSION

#define KIFACE_VERSION   1

Definition at line 112 of file kiway.h.

Referenced by KIWAY::KiFACE(), and PGM_SINGLE_TOP::OnPgmInit().

Typedef Documentation

◆ KIFACE_GETTER_FUNC

typedef KIFACE * KIFACE_GETTER_FUNC(int *aKIFACEversion, int aKIWAYversion, PGM_BASE *aProgram)

Point to the one and only KIFACE export.

The export's address is looked up via symbolic string and should be extern "C" to avoid name mangling. This function will only be called one time. The DSO itself however may be asked to support multiple Top windows, i.e. multiple projects within its lifetime.

Parameters
aKIFACEversionis where to put the API version implemented by the KIFACE.
aKIWAYversiontells the KIFACE what KIWAY version will be available.
aProgramis a pointer to the PGM_BASE for this process.
Returns
unconditionally, cannot fail.

Definition at line 553 of file kiway.h.

Function Documentation

◆ KIFACE_GETTER()

KIFACE * KIFACE_GETTER ( int * aKIFACEversion,
int aKIWAYversion,
PGM_BASE * aProgram )

No name mangling. Each KIFACE (DSO/DLL) will implement this once.

Definition at line 81 of file bitmap2cmp_main.cpp.

References BMP2CMP::kiface(), CV::kiface(), GERBV::kiface(), PCB::kiface(), PCBCALC::kiface(), PGE::kiface(), SCH::kiface(), and KIFACE_API.

Variable Documentation

◆ Kiway

KIWAY Kiway
extern