Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

fpgeanyplugin

Free Pascal bindings for Geany's plugin API

View on GitHub

Anyone may press Interesting, signed in or not. It helps others find this project.

Member rating

No ratings yet.

Sign in to rate this project.

README

fpgeanyplugin package

NOTE
This package depends on the LCL's GTK3 interface by default.

To build against a community-developed alternative (such as @mazen.neifer's GTK3 bindings), provide the path to the library units in a gtk3.cfg file at the root of the source tree, e.g.,

bash
# ./gtk3.cfg
-Fu<path>/<to>/<your>/<alternative>/gtk3bindings/

Then run NODEFAULTINTF=1 make.

Usage

fpgeanyplugin provides the following units:

geanyplugin compatible with Geany >= 2.1
geanyplugin247 compatible with Geany 2.0 (API version 247)
geanyplugin240 compatible with Geany >= 1.38, < 2.0 (API version 240)

Include the package in a shared library project and add the appropriate unit to the uses section. A subset of Geany's plugin API will be callable from your Object Pascal code.

Since they implement different versions of the same interface, you should not include more than one unit in the same file. Use a conditional expression if your project needs to target multiple API versions, e.g.,

pascal
{$macro ON}
uses
{$if GEANY_API_VERSION > 247}
  geanyplugin
{$elseif GEANY_API_VERSION > 240}
  geanyplugin247
{$else}
  geanyplugin240
{$endif};

Development

Clone the source tree and submodules:

pascal
git clone --recursive https://github.com/rdipardo/fpgeanyplugin

Run make to build the package and a sample plugin. See example/README for instructions on building with lazbuild.

Run make geany-deps to transpile Geany's headers into Object Pascal. The transpiler script will first check out the git tag of a Geany release. Versions 1.38, 2.0 and 2.1 are supported.

Requirements

  • lazarus >= 3.0
  • fpc >= 3.2
  • gtk >= 3.24.24