codebrainz / geanypy

Python bindings for the Geany plugin API.
http://codebrainz.github.com/geanypy
GNU General Public License v2.0
45 stars 17 forks source link

Add scintilla constants #34

Open scriptum opened 8 years ago

scriptum commented 8 years ago

scintilla_send_message accepts a magic number in first argument - message id but GeanyPy doesn't provide any human-readable constants for that. There are another issue with send_message (see #32).

It's easy to generate automatically: see https://github.com/gejzenbug/scintilla-python-constants

elextr commented 8 years ago

The link above does not show the generator script but it would be easy to make one, note that it will have to be re-generated for each version of Scintilla since the Scintilla files are also autogenerated so you don't know what might change.

Note also the link above is GPLv3 and Geanypy is GPLv2+.

scriptum commented 8 years ago

sed -rn '/^#.*[0-9]$/s/#define\s(.*)\s/\1 = /p' SciLexer.h Scintilla.h

elextr commented 8 years ago

@b4n, any thoughts on how this is kept in sync with each Scintilla update, can you push/PR this as part of the Scintilla update process?

scriptum commented 8 years ago

how this is kept in sync with each Scintilla update

Adding this simple line into makefile probably would solve the problem (automatically generated source).