[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2012-12-15, at 4:31 AM, Peter Wang <novalazy@xxxxxxxxxx> wrote:
> Hi,
>
> I'm not completely pleased about GTK turning into a dependency of the
> core library. Even though it can be compiled out, the nature of Linux
> distributions means that it *will* be compiled in. I really don't like
> the idea of all keyboard and mouse input being filtered through GTK,
> even in programs which won't use the menu support nor even the native
> dialogs addon.
>
> It seems like it should be possible to move the GTK dependency back out,
> leaving hooks in the core to be filled by the native_dialog addon when
> it is actually used (e.g. setting an auxiliary system vtable pointer or
> something). We don't already have an al_init_native_dialog_addon
> function, but that would be the obvious place to do it. The user would
> be required to call al_init_native_dialog_addon before create the
> ALLEGRO_DISPLAY. Programs which don't link with the native_dialog addon
> on X11 would go back to working as if GTK support were compiled out.
>
> What do you think?
>
> Peter
So would this be something like this in the display driver instead of
compile time checks?
if (al_native_dialog_addon_inited()) {
gtk_vtable = system->get_native_dialog_data();
gtk_vtable->do_something(...);
}
else {
/* Normal GLX code that's always been there */
}
Trent