[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Seeking advice on writing swappable modules
- From: Richard Ekle <rekle yahoo com>
- To: gtk-app-devel-list redhat com
- Subject: Re: Seeking advice on writing swappable modules
- Date: Mon, 7 Jun 1999 19:10:34 -0700 (PDT)
Well let's see.
A brute force C way: Write a shared object that wraps
library one (Gnome for instance) with a common API.
Write another shared object with the same API that
wraps the second API (QT for instance). Then based on
some setting in your program, dynamically load the
shared library and call the functions in your API.
Rick
--- Dan Rosen <dr@cs.brown.edu> wrote:
> 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
>
>
> --
> To unsubscribe: mail
> gtk-app-devel-list-request@redhat.com with
> "unsubscribe" as the Subject.
>
> Mailing list concerns should be mailed to
> <listmaster@redhat.com>
>
>
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]