Re: gnome-pdf-control



В Пнд, 18/10/2004 в 13:30 +0200, David BOUCHER пишет:
> Le lundi 18 octobre 2004 à 14:40 +0400, nshmyrev a écrit :
> 
> > Probably it's not the task that gpdf control should solve. The one way to do is that comes
> > to my mind is to send XEvents explicitly to component widget, but there probably should be
> > some ugly things to enable it.
> > 
> > This question I think should be solved in view of general architecure of your software. Could you describe more presizely your program - what components do you use (software and hardware), what drivers, how the components are connected, what libraries do you use and how all things
> > are organized.
> > 
> > 
> 
> The idea is almost simple : 
> 
> 1- The card is plugged in the parallel port of the computer. It can
> recognize 16 words. For earch word it send a number via the parallel
> port.
> 2- our software takes that number and tells the pdf viewer what to do.
> 
> Last year, we already have done this with visual basic. We worked with
> an ocx component (called pdf-tool or something like that) that enabled
> all what we need. Problem : this component is not free and 2 months
> later we couldn't use it anymore !
> 
> So this year, we have decided to work with free tools. The students are
> very very newbies with programming tools, so I have decided to work with
> Python and gtk.
> 
> My first idea was to work with ghostscript (like gv does), but I
> realized that this was too difficult for them. There are too many things
> to write.
> 
> The second idea was to work with gpdf...
> 
> 
> At present, the card is done and works. We have begun the communication
> between the computer and the card. Nothing more is done.
> 
> Thanks again for your help.
> 
> 

If the main goal is learning, probably it would be better to patch gpdf-
control to make it implement interface like this

module GPDF {

   interface Scrollabale {
 	void scroll_up ();
	void scroll_down ();
   }
   interface Listable () {
	void prevoius_page ();
	void next_page ();
   }
}

It should not be hard to implement. 

Verbs and sending XEvents are not nice solution, but if you don't want
to modify component sources you can send XEvents with wrapping
XSendEvent function to window which you can determine by getWindowId
method of BonoboControl interface.





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