Re: RFC: Gtk + XML chroming
- From: James Henstridge <james daa com au>
- To: Miguel de Icaza <miguel nuclecu unam mx>
- cc: lukka fas harvard edu, gnome-list gnome org
- Subject: Re: RFC: Gtk + XML chroming
- Date: Tue, 20 Oct 1998 18:33:46 +0800 (WST)
I was looking at doing something similar to this, but using GLADE's XML
file format as the base. The reason for choosing this file format is that
there is already a GUI builder for it.
My ideas for the interface so far have been similar to Miguel's. I was
also planning on using gmodule to automatically connect signal handlers
like this:
GModule *self = g_module_open(NULL, 0); /* look at executable's symbols*/
gpointer handler
if (!g_module_symbol(self, sig_handler_name, &handler))
g_warning("couldn't find signal handler %s", sig_handler_name);
else
gtk_signal_connect(object, "signal", GTK_SIGNAL_FUNC(handler), NULL);
Of course this functionality would be optional, so the code would be
useful to people who use OS's not supported by gmodule.
When I get some working code, I will post a message to the list and
maybe put the code in CVS.
James Henstridge.
--
Email: james@daa.com.au
WWW: http://www.daa.com.au/~james/
On Mon, 19 Oct 1998, Miguel de Icaza wrote:
>
> I am interested in looking at this from the C perspective. Care to
> comment?
>
> The main problem I see with your approach is that it would be
> difficult to use in C.
>
> What I am convinced should be done is have a way to name individual
> widgets and bind those to C variables as well as doing the signal
> connection in C, like this:
>
> my_dialog ()
> {
> XmlDialog *dialog = xml_load_dialog_box ("file.xml");
> GtkWidget *entry = xml_get_widget (dialog, "entry");
> GtkWidget *users = xml_get_widget (dialog, "username-clist");
> GtkWidget *dirs = xml_get_widget (dialog, "dirs-clist");
>
> /* do something here with those widgets
> run (dialog);
> }
>
> So, any external representation of a GUI would be limited to
> specifying the layout for the widgets.
>
> Miguel.
>
>
> --
> To unsubscribe: mail gnome-list-request@gnome.org with
> "unsubscribe" as the Subject.
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]