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

Seeking advice on writing swappable modules



Hi,

  I'm writing a program, more or less for my own edification, which will
use GTK+ as one of several possible options for a toolkit. I'm pretty
well-oriented with design patterns, and know how to design the program to
make for easy swapping of toolkits, but I'm a little hazy on some things,
and I'm looking for advice:

  First, what would be a good way to code things such that I can have one
binary, and several libraries (one for each toolkit)? The only option I
know of is to have several libraries and then specify which one to use
when compiling the binary (using -D and #ifdefs) but that really means I
have to have multiple binaries, one for each windowing toolkit, which are
effectively the same except for one line of code. Is there a way to have
one binary and specify at runtime which library to use? (I realize this
question isn't quite in the scope of this mailing list, but I'm sure some
of you have plenty of experience with this sort of thing, and I'm
earnestly looking for an answer).

  And second, are any of you aware of any big discrepancies or major
design differences between GTK+ and other toolkits I should know about?
I'm planning on designing things as extensibly as possible, but using GTK+
as my "base," so if, for example, Motif happens to be totally lacking a
box layout widget, I'd really like to know before-hand :)

  Thanks very much,
  Dan Rosen



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