Project directory structure

Alberto Mardegan mardy at users.sourceforge.net
Wed Apr 3 11:11:50 PDT 2013


On 04/03/2013 08:54 PM, Dirk Hohndel wrote:
> 
> That takes a very broad view of what it means to be "interface specific".
> 
> But I guess one could argue "core-lib" offers an API
> 
> file_needs_saving();
> 
> and the UI knows to call this before quitting…

Sharing data between the UI and the core-lib is easy: we can have
structures defined by the core-lib (like "struct dive"), which the UI
can update directly or (better) via setter methods (like: dive_set_name()).
The hardest thing, since we are not sharing the GLib mainloop, is
sharing events. This can be done using C callbacks, which can be
registered to the core-lib when it's initialized (think of how Linux
kernel modules register their methods) or when a specific object is
initialized.

However, for what I've seen so far in Subsurface, we'll need very little
of the latter: most of the actions are initiated in the UI (by the
end-user), which can therefore simply call the core-lib functions, catch
their result and behave accordingly.

I saw you talk about bluetooth devices in G+ some days ago; was that
about Subsurface? Is Subsurface directly dealing with USB/bluetooth devices?

Ciao,
  Alberto

-- 
http://blog.mardy.it <- geek in un lingua international!


More information about the subsurface mailing list