Re: Help with _zvt term match_add


I was relying on my system docs which didn't include any mention of 
this function. From now on I promise to check gnome's site docs before 

However, you pointed to the fact that match_add needs 3 arguments. 
Well, it doesn't seem to accept more than 2. So I guess this is either 
a bug in pygtk or I am stupid (any can be true)!

If it is not a bug please enlighten me!

Anyway, I am a happy man cuz I learned by error and trial how to use 
FIFO's and pthreads in Python. Cool!

>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 11/9/99, 6:37:44 PM, (NotZed) wrote 
regarding Re: Help with _zvt term match_add:

> >
> >  Hi,
> >
> > I really need help with this one since it is driving me crazy!
> >
> > How the heck does it work. In pygnome it asks for a regex (this is=20
> > fine by me) and then a highlight mask, but nowhere in this universe=20
> > does it say what this means? I looked through gnome docs, used 
> > to search for highlight in all pygnome pygtk modules to no avail.
> >
> > All I could learn is that it needs numbers (why though?)

> From the MANUAL:


> "Add a new auto-match regular expression. The zvt_term_match_check()
> function can be used to check for matches using screen coordinates.

> Each regular expression regex will be matched against each line in the
> visible buffer.

> The highlight_mask is taken from the VTATTR_* bits, as defined in
> vt.h. These include VTATTR_BOLD, VTATTR_UNDERLINE, etc, but not the
> colours."

> These are the relevant bitmasks:

> #define VTATTR_BOLD       0x40000000
> #define VTATTR_UNDERLINE  0x20000000
> #define VTATTR_REVERSE    0x08000000

> It can also be 0, in which case you get no visual indication apart
> from the pointing hand.

> > I also learned that if you do a match_add('def', 1) for instance, 
> > your terminal app your cursor will become a small hand that points,=20
> > like in html.

> There should definetly be a third argument to the function.  That
> is how you reference your regular experssions when a match occurs.

> > Now, how can I use this nifty hand to actually enable anyone to 
> > IT and thus make it do something!

> You have to check the click yourself.  zvt will just render it and
> change the mouse pointer appropriately.

> Check zvt_term_match_check from that same page above.

>  Michael

> --
> To unsubscribe: mail with 
> as the Subject.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]