On Wed, 2006-10-11 at 17:36 -0400, Dan McMahill wrote:
> DJ Delorie wrote:
> >>If PCB can support LessTif, GTK, and postscript, why can't it support
> >>both DBus and XML-PRC?  
> > 
> > 
> > The fundamental problem is that both DBUS and the GUI are
> > asynchronous.  Thus, when the GUI is waiting for a user event, it
> > needs to also watch for data on the DBUS connection, and tell DBUS
> > when it happens.
> > 
> > The easy-to-use DBUS wrapper supports Gtk, but not Lesstif.
> 
> I guess it would be good if a motivated individual could see (and maybe 
> Peter can already answer this) what it might take to just hook dbus into 
> the lesstif HID via XtAppAddInput().

I'm working on the raw libdbus binding. It isn't pretty! It isn't pretty
at all, but it is nearly doing what I want it to do.

What I will need at some point (when I integrate with the mainloop), is
support for XtAppAddInput and similarly:

g_io_add_watch ()
guint       g_io_add_watch                  (GIOChannel *channel,
                                             GIOCondition condition,
                                             GIOFunc func,
                                             gpointer user_data);

enum GIOCondition
typedef enum
{
  G_IO_IN       GLIB_SYSDEF_POLLIN,
  G_IO_OUT      GLIB_SYSDEF_POLLOUT,
  G_IO_PRI      GLIB_SYSDEF_POLLPRI,
  G_IO_ERR      GLIB_SYSDEF_POLLERR,
  G_IO_HUP      GLIB_SYSDEF_POLLHUP,
  G_IO_NVAL     GLIB_SYSDEF_POLLNVAL
} GIOCondition;


GIOFunc ()
gboolean    (*GIOFunc)                      (GIOChannel *source,
                                             GIOCondition condition,
                                             gpointer data);

I was hoping to have some help / input in making sure this interface is
right across the HIDs. Clearly the HID interface must be uniform across
all of them.

Do the mainloop callbacks all use a compatible signature, or (more
likely), do we have to implement a callback internal to the hid, which
then calls the callback registered with the creation of the IO watch?

Since the watch types, G_IO_IN, G_IO_OUT, etc.. might not be guaranteed
to line up with the enum constants in other mainloops (but probably
will, as presumably they are just passed to select), do we need to write
our own enum list, and map it onto the correct values in each hid?

Regards

Peter Clifton






_______________________________________________
geda-dev mailing list
[email protected]
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev

Reply via email to