Re: [g-a-devel] Res: gnome-mag coding with ifdefs



Em Dom, 2006-10-15 às 21:45 +0100, Bill Haneman escreveu:
> Carlos Eduardo R. Diógenes wrote:
> > Hi,
> >
> > Thanks for the answear Jason. I thinked in this possibility, but I still want to remove or minimize the ifdefs in the code (I really don't like they).
> >
> > Someone know a run-time approach to detect the X server capabilities?
> >   
> 
> Runtime query is easy (and we already should be doing it - I think the 
> code checks at runtime for XDamage and XFixes - see XQueryExtension), 
> but it doesn't really solve the problem; you need the client headers in 
> order to build the dependent code.

The check for XDamage and XFixes are done through the
XDamageQueryExtension and XFixesQueryExtension, but this does not solve
the client headers problem.

> 
> It may be that the best thing to do is branch gnome-mag.  If so, perhaps 
> we should create an X11R6.8 branch.  I would hesitate to depend on X11R7 
> because there aren't even any RPMs or installable packages for it yet on 
> most platforms.

I think that a branch will generate the same problem that Jason pointed
in the last e-mail. When X11R7 be available in most distributions anyone
will give much importance to the X11R6.8 branch.

So, if isn't an easy way to solve this problem at runtime (I will
investigate it a little more) I will try to rework the code to use less
ifdefs and be more readable.

regards,
Carlos.

> 
> regards,
> 
> Bill
> > Best regards,
> > Carlos.
> >
> > ----- Mensagem original ----
> > De: Jason Grieves <jasongrieves hotmail com>
> > Para: gnome-accessibility-devel gnome org
> > Enviadas: Domingo, 15 de Outubro de 2006 14:23:40
> > Assunto: [g-a-devel] gnome-mag coding with ifdefs
> >
> >
> > Hi,
> >
> > I am by no means more experienced, but I feel like I should at least add my
> > input!  The AIX operating system, older UNIX and Linux operating systems,
> > and even some of the newest Linux operating systems do not support
> > Composite.  Some users have disabled the use of composite and other
> > extensions.  Although these users can still use previous versions of the
> > software, it means they would be left out for small updates such as security
> > or enhancements.  For example the recent memory leak fix benefits all users
> > of gnome-mag, not just the users with damage/fixes/composite.  I've worked
> > on AIX and other older UNIX operating systems.  As a disabled user I would
> > hate to see these operating systems be left in the dust.  One of my favorite
> > things about gnome-mag is its cross platform and ability to run on older
> > machines.
> >
> > Thanks!
> >
> > Jason Grieves
> > -----Original Message-----
> > From: gnome-accessibility-devel-bounces gnome org
> > [mailto:gnome-accessibility-devel-bounces gnome org] On Behalf Of
> > gnome-accessibility-devel-request gnome org
> > Sent: Sunday, October 15, 2006 12:00 PM
> > To: gnome-accessibility-devel gnome org
> > Subject: Gnome-accessibility-devel Digest, Vol 30, Issue 5
> >
> > Send Gnome-accessibility-devel mailing list submissions to
> >     gnome-accessibility-devel gnome org
> >
> > To subscribe or unsubscribe via the World Wide Web, visit
> >     http://mail.gnome.org/mailman/listinfo/gnome-accessibility-devel
> > or, via email, send a message with subject or body 'help' to
> >     gnome-accessibility-devel-request gnome org
> >
> > You can reach the person managing the list at
> >     gnome-accessibility-devel-owner gnome org
> >
> > When replying, please edit your Subject line so it is more specific
> > than "Re: Contents of Gnome-accessibility-devel digest..."
> >
> >
> > Today's Topics:
> >
> >    1.  ifdefs in the new gnome-mag composite code
> >       (Carlos Eduardo R. Di?genes)
> >
> >
> > ----------------------------------------------------------------------
> >
> > Message: 1
> > Date: Sat, 14 Oct 2006 12:01:47 -0700 (PDT)
> > From: Carlos Eduardo R. Di?genes     <cerdiogenes yahoo com br>
> > Subject: [g-a-devel] ifdefs in the new gnome-mag composite code
> > To: gnome-accessibility-devel gnome org
> > Message-ID: <20061014190147 40753 qmail web35312 mail mud yahoo com>
> > Content-Type: text/plain; charset=ascii
> >
> > Hi,
> >
> > When I coded the gnome-mag composite code to add full screen magnification
> > with a single display, I tried to follow the same style that was being used,
> > aka, use ifdefs.
> >
> > During this time I thinked that I was writing a code that was very difficult
> > to read and after read The Practice of Programming book I saw that I was not
> > the only one with this feeling and also discover other problems related with
> > the ifdef use.
> >
> > So, I want to make the code more ifdef-free. I thinked in this a while, but
> > don't find any reasonable answear for the problem, so I want advices from
> > more experienced ones.
> >
> > I thinked in make the code compatible with the majority of Xserver (continue
> > with the same design). If have composite, use it. If have Xfixes, use it. If
> > have damage, use it. If don't have any of these, use only native X calls.
> > This way is impossible to make the code ifdef free.
> >
> > The other way to do the things is break compatibility and consider that the
> > user X server support COMPOSITE, XFIXES and DAMAGE.
> >
> > I'm really in favor of the second approach.
> >
> > Best regards,
> > Carlos.
> >
> >
> >
> >
> >         
> > _______________________________________________________ 
> > Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular.
> > Registre seu aparelho agora! 
> > http://br.mobile.yahoo.com/mailalertas/ 
> >  
> >
> >
> >
> > ------------------------------
> >
> > _______________________________________________
> > Gnome-accessibility-devel mailing list
> > Gnome-accessibility-devel gnome org
> > http://mail.gnome.org/mailman/listinfo/gnome-accessibility-devel
> >
> >
> > End of Gnome-accessibility-devel Digest, Vol 30, Issue 5
> > ********************************************************
> >
> > _______________________________________________
> > Gnome-accessibility-devel mailing list
> > Gnome-accessibility-devel gnome org
> > http://mail.gnome.org/mailman/listinfo/gnome-accessibility-devel
> >
> >
> >
> >
> >
> > 		
> > _______________________________________________________ 
> > Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. Registre seu aparelho agora! 
> > http://br.mobile.yahoo.com/mailalertas/ 
> >  
> >
> > _______________________________________________
> > Gnome-accessibility-devel mailing list
> > Gnome-accessibility-devel gnome org
> > http://mail.gnome.org/mailman/listinfo/gnome-accessibility-devel
> >   
> 


	

	
		
_______________________________________________________ 
Voc�uer respostas para suas perguntas? Ou voc�abe muito e quer compartilhar seu conhecimento? Experimente o Yahoo! Respostas !
http://br.answers.yahoo.com/



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