File: neovimapi.h

package info (click to toggle)
neovim-qt 0.2.19-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,808 kB
  • sloc: cpp: 45,441; python: 234; makefile: 24; sh: 19; xml: 5
file content (59 lines) | stat: -rw-r--r-- 1,296 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Auto generated {{date}} from nvim API level:{{api_level}}
#pragma once

#include <QObject>
#include <QPoint>
#include <QVariant>

#include "function.h"
#include "msgpack.h"

namespace NeovimQt {

class NeovimConnector;
class MsgpackRequest;

class NeovimApi{{api_level}}: public QObject
{
	Q_OBJECT

public:

	enum FunctionId {
		NEOVIM_FN_NULL=0,
		{% for f in functions %}
		NEOVIM_FN_{{ f.name.upper() }},
		{% endfor %}
	};
	Q_ENUM(FunctionId)

	static bool checkFunctions(const QVariantList& ftable);
	static FunctionId functionId(const Function& f);

	NeovimApi{{api_level}}(NeovimConnector *);
protected slots:
	void handleResponse(quint32 id, quint64 fun, const QVariant&);
	void handleResponseError(quint32 id, quint64 fun, const QVariant&);
signals:
	void error(const QString& errmsg, const QVariant& errObj);
	void neovimNotification(const QByteArray &name, const QVariantList& args);
private:
	NeovimConnector *m_c;
public slots:
{% for f in functions %}
{% if f.deprecated() %}
	// DEPRECATED
{% endif %}
	// {{f.signature()}}
	NeovimQt::MsgpackRequest* {{f.name}}({{f.argstring}});
{% endfor %}

signals:
{% for f in functions %}
	void on_{{f.name}}({{f.return_type.native_type}});
	void err_{{f.name}}(const QString&, const QVariant&);

{% endfor %}
};

} // namespace NeovimQt