On Sunday 08 October 2006 18:31, DJ Delorie wrote:
> > OTOH, using the Raw C binding (as I started out trying to) does give the
> > advantage of being able to work with Lesstif, etc.. IIRC, you need to
> > add the file descriptor which DBUS uses for comms into the main GUI's
> > poll / select loop to avoid having to poll manually and consume lots of
> > CPU cycles.
>
> This would be a far better option.  Xt has a hook for watching a file
> descriptor (XtAppAddInput); Gtk should too.  We can add a hook to the
> HID structure, something like:
>
>   hidval watch_file (int fd, void *user_data, void (*callback)(int, void
> *)); void unwatch_file (hidval which);
>
> If using the raw C binding gets us Windows and generic Posix (solaris,
> OS/X, etc), I'd rather use that.

On the other hand, using the raw C binding means lots of complicated code 
which is going to be difficult to maintain... I feel that this discussion is 
getting somewhat circular.

The options for D-Bus as I see it are:

 - Use dbus-glib and make the D-Bus system part of the GTK+ HID, requiring a 
couple of hundred lines of simple code.

 - Use libdbus and make the D-Bus system part of core (and thus available to 
all GUIs), requiring a couple of thousand lines of less-than-simple code.

The nice thing about the current D-Bus patch is that it can be maintained by 
someone with a copy of the dbus-glib reference and 5 minutes to read the 
code, whereas something using the low-level libdbus stuff is definitely *not* 
going to be so easy (or they wouldn't have written a glib binding in the 
first place).

Peter

-- 
Fisher Society committee                    http://tinyurl.com/o39w2
CUSBC novices, match and league secretary   http://tinyurl.com/mwrc9

v3sw6YChw7$ln3pr6$ck3ma8u7+Lw3+2m0l7Ci6e4+8t4Gb8en6g6Pa2Xs5Mr4p4
  hackerkey.com                                  peter-b.co.uk

Attachment: pgpOXBxgCZ9rw.pgp
Description: PGP signature


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

Reply via email to