OpenCPN Partial API docs
Loading...
Searching...
No Matches
plugin_comm.h
Go to the documentation of this file.
1/***************************************************************************
2 * Copyright (C) 2024 Alec Leamas *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, write to the *
16 * Free Software Foundation, Inc., *
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
18 **************************************************************************/
19
25#ifndef PLUGIN__COMM_H
26#define PLUGIN__COMM_H
27
28#include <wx/event.h>
29#include <wx/jsonval.h>
30#include <wx/string.h>
31
32#include "model/ocpn_types.h"
33
34void SendMessageToAllPlugins(const wxString& message_id,
35 const wxString& message_body);
36
37void SendJSONMessageToAllPlugins(const wxString& message_id, wxJSONValue v);
38
39void SendAISSentenceToAllPlugIns(const wxString& sentence);
40
41void SendPositionFixToAllPlugIns(GenericPosDatEx* ppos);
42
43void SendActiveLegInfoToAllPlugIns(const ActiveLegDat* leg_info);
44
45bool SendMouseEventToPlugins(wxMouseEvent& event);
46
47bool SendKeyEventToPlugins(wxKeyEvent& event);
48
49void SendPreShutdownHookToPlugins();
50
51void SendCursorLatLonToAllPlugIns(double lat, double lon);
52
70void SendNMEASentenceToAllPlugIns(const wxString& sentence);
71
72int GetJSONMessageTargetCount();
73
74void SendVectorChartObjectInfo(const wxString& chart, const wxString& feature,
75 const wxString& objname, double& lat,
76 double& lon, double& scale, int& nativescale);
77
78#endif // PLUGIN__COMM_H
The JSON value class implementation.
Definition jsonval.h:84
void SendNMEASentenceToAllPlugIns(const wxString &sentence)
Distribute a NMEA 0183 sentence to all plugins that have registered interest by setting the WANTS_NME...