[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Beaver-devel] SyHi Plugin API
From: |
Leslie Polzer |
Subject: |
Re: [Beaver-devel] SyHi Plugin API |
Date: |
Sat, 5 Apr 2003 18:24:07 +0200 |
On Fri, 28 Mar 2003 11:48:09 -0500
Michael Terry <address@hidden> wrote:
> So, maybe require
> that modules do a g_object_set (mark, "syhi_module", GINT_TO_POINTER
> (TRUE)), or something like it for all their internal objects that we
> might see?
Naturally, clutter can be avoided this way.
Now it is very important for me to have a stable and reasonable API,
so I'd like to attract the main attention on the list to this thread.
My current draft looks like this:
void init ( void (*errfun)(char *msg) = NULL, void (*statusfun)(double percent)
= NULL, double updatestep = 0);
int select_module (lang_t lang);
// OR //
int load_rules_from_file (char *file);
void highlight ( GtkTextBuffer *buf, GtkTextIter start, GtkTextIter end );
void cleanup ();
where...
lang_t is an enum, like { LANG_C, LANG_C++, ... }
I am very unsure about the language selection (and therefore the syntax file
handling): which part should take the responsibility for this?
Same thing goes for 'start' and 'end' - if we leave these fields for the
application (Beaver, that is) to fill in we must rely on a single mechanism
to select the right parts of highlighting interest on changes in the text.
I need advice from you guys here, the only thing I am sure of is that we
need init(), some kind of highlight(GtkTextBuffer *buf) and cleanup()...
Leslie
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Beaver-devel] SyHi Plugin API,
Leslie Polzer <=