weston/include/libweston/backend-headless.h

54 lines
1.6 KiB
C
Raw Normal View History

headless: port the headless backend to the new init api refactor configuration API of headless-backend Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> v6: - Define version number in the header - Don't use leading underscores in header guards - Add stub config_init_to_defaults() - Allocate config on stack - Drop unused display_name parameter - Add error message when config is invalid - Install compositor-headless.h and list it in headless-backend sources v5: - Update to current trunk - Fixed typo 'struct weston_wayland_backend_config' - Dropped unused variables - Dropped weston_headless_backend_config_create() in favor of directly zalloc'ing the object - Dropped weston_headless_backend_load() in favor of the more generalized load_backend_new(). - Dropped typedef from header - Restored use of 'backend_init' entry point - Backend_init() takes a base weston_backend_config object - Renamed 'param' to 'config' in a few places for consistency - Renamed 'headless_options' variable to 'options for consistency - Version the base struct - Free config on error - Don't free config during backend_init normal operations - Adjust header ordering - Make header guard naming consistent with other headers - Light reformatting for code style and consistency with other backend config patches Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com> [Pekka: rebased to apply before drm and x11 backends] [Pekka: squashed in the headless part of "Enforce destruction of all backend config objects after initialization"] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-04-16 03:28:32 +00:00
/*
* Copyright © 2016 Benoit Gschwind
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial
* portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#ifndef WESTON_COMPOSITOR_HEADLESS_H
#define WESTON_COMPOSITOR_HEADLESS_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include <libweston/libweston.h>
headless: port the headless backend to the new init api refactor configuration API of headless-backend Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> v6: - Define version number in the header - Don't use leading underscores in header guards - Add stub config_init_to_defaults() - Allocate config on stack - Drop unused display_name parameter - Add error message when config is invalid - Install compositor-headless.h and list it in headless-backend sources v5: - Update to current trunk - Fixed typo 'struct weston_wayland_backend_config' - Dropped unused variables - Dropped weston_headless_backend_config_create() in favor of directly zalloc'ing the object - Dropped weston_headless_backend_load() in favor of the more generalized load_backend_new(). - Dropped typedef from header - Restored use of 'backend_init' entry point - Backend_init() takes a base weston_backend_config object - Renamed 'param' to 'config' in a few places for consistency - Renamed 'headless_options' variable to 'options for consistency - Version the base struct - Free config on error - Don't free config during backend_init normal operations - Adjust header ordering - Make header guard naming consistent with other headers - Light reformatting for code style and consistency with other backend config patches Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com> [Pekka: rebased to apply before drm and x11 backends] [Pekka: squashed in the headless part of "Enforce destruction of all backend config objects after initialization"] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-04-16 03:28:32 +00:00
#define WESTON_HEADLESS_BACKEND_CONFIG_VERSION 3
headless: port the headless backend to the new init api refactor configuration API of headless-backend Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> v6: - Define version number in the header - Don't use leading underscores in header guards - Add stub config_init_to_defaults() - Allocate config on stack - Drop unused display_name parameter - Add error message when config is invalid - Install compositor-headless.h and list it in headless-backend sources v5: - Update to current trunk - Fixed typo 'struct weston_wayland_backend_config' - Dropped unused variables - Dropped weston_headless_backend_config_create() in favor of directly zalloc'ing the object - Dropped weston_headless_backend_load() in favor of the more generalized load_backend_new(). - Dropped typedef from header - Restored use of 'backend_init' entry point - Backend_init() takes a base weston_backend_config object - Renamed 'param' to 'config' in a few places for consistency - Renamed 'headless_options' variable to 'options for consistency - Version the base struct - Free config on error - Don't free config during backend_init normal operations - Adjust header ordering - Make header guard naming consistent with other headers - Light reformatting for code style and consistency with other backend config patches Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com> [Pekka: rebased to apply before drm and x11 backends] [Pekka: squashed in the headless part of "Enforce destruction of all backend config objects after initialization"] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-04-16 03:28:32 +00:00
struct weston_headless_backend_config {
struct weston_backend_config base;
/** Select the renderer to use */
enum weston_renderer_type renderer;
/** Use output decorations, requires use_gl = true */
bool decorate;
headless: port the headless backend to the new init api refactor configuration API of headless-backend Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> v6: - Define version number in the header - Don't use leading underscores in header guards - Add stub config_init_to_defaults() - Allocate config on stack - Drop unused display_name parameter - Add error message when config is invalid - Install compositor-headless.h and list it in headless-backend sources v5: - Update to current trunk - Fixed typo 'struct weston_wayland_backend_config' - Dropped unused variables - Dropped weston_headless_backend_config_create() in favor of directly zalloc'ing the object - Dropped weston_headless_backend_load() in favor of the more generalized load_backend_new(). - Dropped typedef from header - Restored use of 'backend_init' entry point - Backend_init() takes a base weston_backend_config object - Renamed 'param' to 'config' in a few places for consistency - Renamed 'headless_options' variable to 'options for consistency - Version the base struct - Free config on error - Don't free config during backend_init normal operations - Adjust header ordering - Make header guard naming consistent with other headers - Light reformatting for code style and consistency with other backend config patches Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com> [Pekka: rebased to apply before drm and x11 backends] [Pekka: squashed in the headless part of "Enforce destruction of all backend config objects after initialization"] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-04-16 03:28:32 +00:00
};
#ifdef __cplusplus
}
#endif
#endif /* WESTON_COMPOSITOR_HEADLESS_H */