Re: Help with _zvt term match_add



> 
> 
> 
>  Sorry,
> 
> I was relying on my system docs which didn't include any mention of=20
> this function. From now on I promise to check gnome's site docs before=20
> complaining!
> 
> However, you pointed to the fact that match_add needs 3 arguments.=20
> Well, it doesn't seem to accept more than 2. So I guess this is either=20
> a bug in pygtk or I am stupid (any can be true)!

Wihtout it you will not be able to identify which match string matched.

This may not be a problem in some applications.


> If it is not a bug please enlighten me!

Looks like it could be a problem with pygone, or maybe it uses
the userdata field for something else(?)

 Michael

> Anyway, I am a happy man cuz I learned by error and trial how to use=20
> FIFO's and pthreads in Python. Cool!
> 
> =20
> >>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<
> 
> On 11/9/99, 6:37:44 PM, zucchi@zedzone.mmc.com.au (NotZed) wrote=20
> 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=3D=
> 20
> > > fine by me) and then a highlight mask, but nowhere in this universe=3D=
> 20
> > > does it say what this means? I looked through gnome docs, used=20
> emacs=3D20
> > > 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:
> 
> >=20
> http://developer.gnome.org/doc/API/zvtterm/zvtterm-reference.html#AEN674=
> 
> 
> > "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,=20
> in=3D20
> > > your terminal app your cursor will become a small hand that points,=3D=
> 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=20
> CLICK=3D20
> > > 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 gnome-devel-list-request@gnome.org with=20
> "unsubscribe"
> > as the Subject.
> 
> 
> 
> 
> -- 
> To unsubscribe: mail gnome-devel-list-request@gnome.org with "unsubscribe"
> as the Subject.
> 
> 



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