KiCad PCB EDA Suite
include/plugins/kicad_plugin.h
Go to the documentation of this file.
1 /*
2  * This program source code file is part of KiCad, a free EDA CAD application.
3  *
4  * Copyright (C) 2015 Cirilo Bernardo <cirilo.bernardo@gmail.com>
5  * Copyright (C) 2017 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
32 #ifndef KICAD_PLUGIN_H
33 #define KICAD_PLUGIN_H
34 
35 #ifndef _WIN32
36  #ifndef KICAD_PLUGIN_EXPORT
37  #define KICAD_PLUGIN_EXPORT extern "C" __attribute__((__visibility__("default")))
38  #endif
39 #else
40  #include <stdint.h>
41  #ifndef KICAD_PLUGIN_EXPORT
42  #define KICAD_PLUGIN_EXPORT extern "C" __declspec( dllexport )
43  #endif
44 #endif
45 
56 KICAD_PLUGIN_EXPORT char const* GetKicadPluginClass( void );
57 
70 KICAD_PLUGIN_EXPORT void GetClassVersion( unsigned char* Major,
71  unsigned char* Minor, unsigned char* Patch, unsigned char* Revision );
72 
83 KICAD_PLUGIN_EXPORT bool CheckClassVersion( unsigned char Major,
84  unsigned char Minor, unsigned char Patch, unsigned char Revision );
85 
96 KICAD_PLUGIN_EXPORT const char* GetKicadPluginName( void );
97 
98 
110 KICAD_PLUGIN_EXPORT void GetPluginVersion( unsigned char* Major,
111  unsigned char* Minor, unsigned char* Patch, unsigned char* Revision );
112 
113 #endif // KICAD_PLUGIN_H
KICAD_PLUGIN_EXPORT const char * GetKicadPluginName(void)
Function GetKicadPluginName returns the name of the plugin instance; for example IDFv3.
KICAD_PLUGIN_EXPORT void GetPluginVersion(unsigned char *Major, unsigned char *Minor, unsigned char *Patch, unsigned char *Revision)
Function GetPluginVersion retrieves the version of the instantiated plugin for informational purposes...
#define KICAD_PLUGIN_EXPORT
KICAD_PLUGIN_EXPORT bool CheckClassVersion(unsigned char Major, unsigned char Minor, unsigned char Patch, unsigned char Revision)
Function CheckClassVersion returns true if the class version reported by the Plugin Loader is compati...
Definition: 3d_plugin.h:73
KICAD_PLUGIN_EXPORT char const * GetKicadPluginClass(void)
Function GetKicadPluginClass returns the name of the implemented plugin class; for example 3DPLUGIN...
Definition: 3d_plugin.h:49
KICAD_PLUGIN_EXPORT void GetClassVersion(unsigned char *Major, unsigned char *Minor, unsigned char *Patch, unsigned char *Revision)
Function GetClassVersion retrieves the version of the Plugin Class.
Definition: 3d_plugin.h:55