gtk_init_no_x ??



Hi... i was wondering if there is a plan, or at least if there is factibility
of a gtk_init_no_x (or something like that).
gtk is really nice, and its type system is so nice I want to use it even without X.
now why should the type system be so tied to X initialization ????
is thereactually a reason, or is it just that gtk was never intended to be of use without X,
si that the type system wasn't made as a lower layer... ?
 
the fact is I was thinking, if i'm going to write a prog with gtk, I cn use gtk_init_check and know if
I could or could not connect to X... but, if I couldn't, and if I want my program to offer an alternative text interface,
then I must write my program without gtk type system. (at least for the version I have now)
i had a quick look at gtk_init and gtk_init_check, and I didn't see a clear answer to that question...
I could do a wrapper that would be a mere copy of gtk_init_check, but without calling gdk nor anything related to X...
but first, I'm not sure it is correct, and second, I think the gtk type functionality without X is probably of use to anybody, so that it would probably better if we had a real original gtk solution for that.
let's say I want to write an app like minicom... i want it to offer a graphical interface and a text one,
the code is much better and much cleaner if I create my main structures as GtkObjects descendents, and have signals for certain IOs events.. or. well.. it's just a silly example, but the idea is clear..
I tried to check the archive before to send this question, it's possible it was already discussed, but for some reason i could not get the archive list, so I finally ask it there...
any idea ? suggestion ?
if the gtk_init_no_x reason for no existing is that some basic GtkObjects like the GtkWindow (I don't know)
cannot be instantiatesd because they need some X initialization, doesn't it just mean that the GtkWindow (or problematic object) should  be the one checking for X (after the init of gtk, we could have a macro toknow if we have or not X support) and then the object could refuse to be instantiated, or even better, (but I suppose this is being a lot of hard work) could return an alternative object. well it would be the same, but with a different functionality...
so that it could be used in ncurses or whatever...
anyway, the main idea is to have a working object type system without necessary X support...
is it possible ?
thank you...
 
Olivier.
 


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