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  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, you may find one here:
18  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19  * or you may search the http://www.gnu.org website for the version 2 license,
20  * or you may write to the Free Software Foundation, Inc.,
21  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22  */
23 
31 #ifndef KICAD_PLUGIN_H
32 #define KICAD_PLUGIN_H
33 
34 #ifndef _WIN32
35  #ifndef KICAD_PLUGIN_EXPORT
36  #define KICAD_PLUGIN_EXPORT extern "C" __attribute__((__visibility__("default")))
37  #endif
38 #else
39  #include <stdint.h>
40  #ifndef KICAD_PLUGIN_EXPORT
41  #define KICAD_PLUGIN_EXPORT extern "C" __declspec( dllexport )
42  #endif
43 #endif
44 
55 KICAD_PLUGIN_EXPORT char const* GetKicadPluginClass( void );
56 
69 KICAD_PLUGIN_EXPORT void GetClassVersion( unsigned char* Major,
70  unsigned char* Minor, unsigned char* Patch, unsigned char* Revision );
71 
82 KICAD_PLUGIN_EXPORT bool CheckClassVersion( unsigned char Major,
83  unsigned char Minor, unsigned char Patch, unsigned char Revision );
84 
95 KICAD_PLUGIN_EXPORT const char* GetKicadPluginName( void );
96 
97 
109 KICAD_PLUGIN_EXPORT void GetPluginVersion( unsigned char* Major,
110  unsigned char* Minor, unsigned char* Patch, unsigned char* Revision );
111 
112 #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