[RFC weston 0/5] libweston: section+key=value backend config

Quentin Glidic sardemff7+wayland at sardemff7.net
Tue Feb 9 15:14:39 UTC 2016


From: Quentin Glidic <sardemff7+git at sardemff7.net>

Here is my draft for the key/value backend config idea.
As I stated on IRC already, I think the key/value config is the nicer one.

First two patches are quite independent from the backend config topic,
but are needed to get the final config API from the start.

The main patch is the third one, especially the compositor.c part, which
demonstrates how this API would be used.

Patches 4 and 5 are just porting drm and x11 backends, for testing.

It seems the biggest problem of this way is “leaking” the whole configuration
to the backend. I do not think it is a problem, since I would trust libweston
and backends are hard-coded in it, so no wild backend would access that configuration.

Quentin Glidic (5):
  libweston: Initial dummy library
  libweston: Move weston_load_module here
  libweston: Add config getters API
  drm: Move backend to libweston
  x11: Move to libweston

 Makefile.am                   |  26 ++++--
 ivi-shell/ivi-layout.c        |   3 +-
 lib/backend-config.c          |  33 ++++++++
 {src => lib}/compositor-drm.c |  94 ++++++++++-----------
 {src => lib}/compositor-x11.c |  90 ++++++++------------
 {src => lib}/libbacklight.c   |   0
 {src => lib}/libbacklight.h   |   0
 lib/libweston-internal.h      |  24 ++++++
 lib/libweston.c               | 101 +++++++++++++++++++++++
 lib/libweston.h               |  32 +++++++
 src/compositor-fbdev.c        |   3 +-
 src/compositor-wayland.c      |   5 +-
 src/compositor.c              | 188 ++++++++++++++++++++++++++++++++----------
 src/compositor.h              |   6 +-
 src/main.c                    |  27 ++++--
 15 files changed, 461 insertions(+), 171 deletions(-)
 create mode 100644 lib/backend-config.c
 rename {src => lib}/compositor-drm.c (97%)
 rename {src => lib}/compositor-x11.c (95%)
 rename {src => lib}/libbacklight.c (100%)
 rename {src => lib}/libbacklight.h (100%)
 create mode 100644 lib/libweston-internal.h
 create mode 100644 lib/libweston.c
 create mode 100644 lib/libweston.h

-- 
2.6.4



More information about the wayland-devel mailing list