Commit a72e3716 authored by Marius Vlad's avatar Marius Vlad Committed by Daniel Stone

libweston: Introduce libweston-internal.h

Introduce a new private header file that only internal parts of the
library are allowed to use and shouldn't be exposed in the public header
of libweston.

Start by adding by adding functions that operate on the 'weston_buffer*'.
Signed-off-by: Marius Vlad's avatarMarius Vlad <marius.vlad@collabora.com>
parent c2e18e89
......@@ -2039,18 +2039,6 @@ weston_surface_copy_content(struct weston_surface *surface,
struct weston_buffer *
weston_buffer_from_resource(struct wl_resource *resource);
void
weston_buffer_reference(struct weston_buffer_reference *ref,
struct weston_buffer *buffer);
void
weston_buffer_release_reference(struct weston_buffer_release_reference *ref,
struct weston_buffer_release *buf_release);
void
weston_buffer_release_move(struct weston_buffer_release_reference *dest,
struct weston_buffer_release_reference *src);
void
weston_compositor_get_time(struct timespec *time);
......@@ -2456,10 +2444,6 @@ weston_log_ctx_compositor_setup(struct weston_compositor *compositor,
void
weston_log_ctx_compositor_destroy(struct weston_compositor *compositor);
void
weston_buffer_send_server_error(struct weston_buffer *buffer,
const char *msg);
int
weston_compositor_enable_content_protection(struct weston_compositor *compositor);
......
......@@ -55,6 +55,7 @@
#include <libweston/weston-debug.h>
#include "shared/helpers.h"
#include "libinput-seat.h"
#include "libweston-internal.h"
#ifndef DRM_CLIENT_CAP_ASPECT_RATIO
#define DRM_CLIENT_CAP_ASPECT_RATIO 4
......
......@@ -72,6 +72,7 @@
#include <libweston/version.h>
#include <libweston/plugin-registry.h>
#include "pixel-formats.h"
#include "libweston-internal.h"
/**
* \defgroup head Head
......
/*
* Copyright © 2008-2011 Kristian Høgsberg
* Copyright © 2017, 2018 General Electric Company
* Copyright © 2012, 2017-2019 Collabora, Ltd.
*
* 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 LIBWESTON_INTERNAL_H
#define LIBWESTON_INTERNAL_H
/*
* This is the internal (private) part of libweston. All symbols found here
* are, and should be only (with a few exceptions) used within the internal
* parts of libweston. Notable exception(s) include a few files in tests/ that
* need access to these functions, screen-share file from compositor/ and those
* remoting/. Those will require some further fixing as to avoid including this
* private header.
*
* Eventually, these symbols should reside naturally into their own scope. New
* features should either provide their own (internal) header or use this one.
*/
/* weston_buffer */
void
weston_buffer_send_server_error(struct weston_buffer *buffer,
const char *msg);
void
weston_buffer_reference(struct weston_buffer_reference *ref,
struct weston_buffer *buffer);
void
weston_buffer_release_move(struct weston_buffer_release_reference *dest,
struct weston_buffer_release_reference *src);
void
weston_buffer_release_reference(struct weston_buffer_release_reference *ref,
struct weston_buffer_release *buf_release);
#endif
......@@ -33,6 +33,7 @@
#include "linux-explicit-synchronization-unstable-v1-server-protocol.h"
#include "linux-sync-file.h"
#include "shared/fd-util.h"
#include "libweston-internal.h"
static void
destroy_linux_buffer_release(struct wl_resource *resource)
......
......@@ -26,6 +26,7 @@
#include "config.h"
#include <libweston/libweston.h>
#include "libweston-internal.h"
int
pixman_renderer_init(struct weston_compositor *ec);
......
......@@ -28,6 +28,7 @@
#include <stdint.h>
#include <libweston/libweston.h>
#include "libweston-internal.h"
#ifdef ENABLE_EGL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment