change the build script and change tdm.h to tdm_internal.h for libds-tizen-backend-tdm.
Change-Id: I7c1db1ae8acdb81bd1ce4fc01edd121782ef1f2d
executable('tdm-backend',
'tdm-backend.c',
- dependencies: common_deps,
+ dependencies: [
+ common_deps,
+ dep_libds_tizen_backend_tdm,
+ ],
install_dir: libds_tizen_bindir,
install : true
)
tinyds_tdm_files,
dependencies: [
common_deps,
+ dep_libds_tizen_backend_tdm,
dependency('pixman-1', required: true),
dependency('threads', required: true),
],
tinyds_tdm_libinput_files,
dependencies: [
common_deps,
+ dep_libds_tizen_backend_tdm,
dep_libds_tizen_input_devicemgr,
dependency('pixman-1', required: true),
dependency('threads', required: true),
'tinyds-tdm-renderer.c',
dependencies: [
common_deps,
+ dep_libds_tizen_backend_tdm,
dependency('pixman-1', required: true),
dependency('threads', required: true),
],
tinyds_tdm_hwc_files,
dependencies: [
common_deps,
+ dep_libds_tizen_backend_tdm,
dependency('pixman-1', required: true),
dependency('threads', required: true),
],
%description devel
Development package of Wayland Compositor Library for Tizen
+## libds-tizen-backend-tdm
+%package backend-tdm
+Summary: Display Backend Library with TDM
+Group: Development/Libraries
+
+%description backend-tdm
+Display Backend Library with TDM
+
+%package backend-tdm-devel
+Summary: TDM Display Backend Development package
+Group: Development/Libraries
+
+%description backend-tdm-devel
+TDM Display Backend Development package
+
%package keyrouter
Summary: Wayland Compositor Library for keyrouter
Group: Development/Libraries
%{_bindir}/tinyds-tdm-libinput
%{_bindir}/input-generator
+%files backend-tdm
+%manifest %{name}.manifest
+%defattr(-,root,root,-)
+%license LICENSE
+%{_libdir}/libds-tizen-backend-tdm.so.*
+
+%files backend-tdm-devel
+%manifest %{name}.manifest
+%defattr(-,root,root,-)
+%license LICENSE
+%{_includedir}/libds-tizen/backend/tdm.h
+%{_includedir}/libds-tizen/backend/tdm_output_hwc.h
+%{_libdir}/pkgconfig/libds-tizen-backend-tdm.pc
+%{_libdir}/libds-tizen-backend-tdm.so
+
%files keyrouter
%manifest %{name}.manifest
%defattr(-,root,root,-)
#include <libds/log.h>
-#include "tdm.h"
+#include "tdm_internal.h"
static const struct ds_backend_interface tdm_backend_iface;
-libds_tizen_files += files(
+libds_tizen_backend_tdm_files = files(
'backend.c',
'output.c',
'tdm_buffer_queue.c',
'tdm_output_hwc.c',
)
-libtdm = dependency('libtdm', required: true)
-libtbm = dependency('libtbm', required: true)
-
-libds_tizen_deps += [
- libtdm,
- libtbm
+libds_tizen_backend_tdm_deps = [
+ dep_libds_tizen,
+ dependency('libtdm', required: true),
+ dependency('libtbm', required: true)
]
+
+lib_libds_tizen_backend_tdm = shared_library('ds-tizen-backend-tdm', libds_tizen_backend_tdm_files,
+ dependencies: libds_tizen_backend_tdm_deps,
+ include_directories: [ include_directories('/usr/include'), common_inc, include_directories('.'), include_directories('..')],
+ version: meson.project_version(),
+ install: true
+)
+
+dep_libds_tizen_backend_tdm = declare_dependency(
+ link_with: lib_libds_tizen_backend_tdm,
+ dependencies: libds_tizen_backend_tdm_deps,
+ include_directories: [ common_inc, include_directories('.') ],
+)
+
+pkgconfig = import('pkgconfig')
+pkgconfig.generate(lib_libds_tizen_backend_tdm,
+ version: meson.project_version(),
+ filebase: 'libds-tizen-backend-tdm',
+ name: 'libds-tizen-backend-tdm',
+ description: 'tdm backend of libds-tizen for tizen platform',
+)
\ No newline at end of file
#include <libds/log.h>
#include "libds-tizen/allocator/tbm.h"
-#include "tdm.h"
+#include "tdm_internal.h"
#include "tdm_output_hwc.h"
#include "tdm_buffer_queue.h"
+++ /dev/null
-#ifndef DS_TIZEN_BACKEND_TDM_H
-#define DS_TIZEN_BACKEND_TDM_H
-
-#include <time.h>
-
-#include <tdm.h>
-
-#include <libds/interfaces/backend.h>
-#include <libds/interfaces/output.h>
-
-enum ds_tdm_output_status {
- DS_TDM_OUTPUT_DISCONNECTED,
- DS_TDM_OUTPUT_CONNECTED,
-};
-
-struct ds_tdm_output_mode {
- struct ds_output_mode base;
- const tdm_output_mode *tdm_mode;
-};
-
-struct ds_tdm_backend
-{
- struct ds_backend base;
-
- tdm_display *tdm_display;
- struct wl_display *wl_display;
- struct wl_event_source *tdm_event;
-
- struct wl_list outputs; // ds_tdm_output.link
- struct wl_list buffers; // ds_tdm_buffer.link
-
- struct wl_listener display_destroy;
-
- clockid_t clock;
- int fd;
-};
-
-struct ds_tdm_output
-{
- struct ds_output base;
-
- struct ds_tdm_backend *backend;
- struct ds_tdm_buffer_queue *queue;
- struct ds_buffer *front_buffer, *back_buffer;
-
- struct {
- tdm_output *output;
- tdm_hwc *hwc;
- } tdm;
-
- struct ds_tdm_output_hwc *hwc;
- struct wl_listener hwc_commit_handler_listener;
-
- struct wl_list link;
-
- enum ds_tdm_output_status status;
-};
-
-struct ds_tdm_buffer
-{
- struct ds_buffer *buffer;
- tbm_surface_h surface;
- struct wl_list link; // ds_wl_backend.buffers
-
- struct wl_listener buffer_release;
- struct wl_listener buffer_destroy;
-
- bool released;
-};
-
-struct ds_tdm_backend *tdm_backend_from_backend(struct ds_backend *backend);
-
-struct ds_tdm_output *create_tdm_output(struct ds_tdm_backend *tdm,
- tdm_output *tdm_output);
-
-void destroy_tdm_buffer(struct ds_tdm_buffer *buffer);
-
-
-#endif
#include <libds/log.h>
#include "libds/interfaces/buffer.h"
-#include "tdm.h"
+#include "tdm_internal.h"
#include "tdm_buffer_queue.h"
static void
#include <tbm_surface_queue.h>
#include <libds/interfaces/buffer.h>
-#include "tdm.h"
+#include "tdm_internal.h"
struct ds_tdm_buffer_queue
{
--- /dev/null
+#ifndef DS_TIZEN_BACKEND_TDM_H
+#define DS_TIZEN_BACKEND_TDM_H
+
+#include <time.h>
+#include <tdm.h>
+#include <wayland-server.h>
+
+#include <libds/interfaces/backend.h>
+#include <libds/interfaces/output.h>
+
+enum ds_tdm_output_status {
+ DS_TDM_OUTPUT_DISCONNECTED,
+ DS_TDM_OUTPUT_CONNECTED,
+};
+
+struct ds_tdm_output_mode {
+ struct ds_output_mode base;
+ const tdm_output_mode *tdm_mode;
+};
+
+struct ds_tdm_backend
+{
+ struct ds_backend base;
+
+ tdm_display *tdm_display;
+ struct wl_display *wl_display;
+ struct wl_event_source *tdm_event;
+
+ struct wl_list outputs; // ds_tdm_output.link
+ struct wl_list buffers; // ds_tdm_buffer.link
+
+ struct wl_listener display_destroy;
+
+ clockid_t clock;
+ int fd;
+};
+
+struct ds_tdm_output
+{
+ struct ds_output base;
+
+ struct ds_tdm_backend *backend;
+ struct ds_tdm_buffer_queue *queue;
+ struct ds_buffer *front_buffer, *back_buffer;
+
+ struct {
+ tdm_output *output;
+ tdm_hwc *hwc;
+ } tdm;
+
+ struct ds_tdm_output_hwc *hwc;
+ struct wl_listener hwc_commit_handler_listener;
+
+ struct wl_list link;
+
+ enum ds_tdm_output_status status;
+};
+
+struct ds_tdm_buffer
+{
+ struct ds_buffer *buffer;
+ tbm_surface_h surface;
+ struct wl_list link; // ds_wl_backend.buffers
+
+ struct wl_listener buffer_release;
+ struct wl_listener buffer_destroy;
+
+ bool released;
+};
+
+struct ds_tdm_backend *tdm_backend_from_backend(struct ds_backend *backend);
+
+struct ds_tdm_output *create_tdm_output(struct ds_tdm_backend *tdm,
+ tdm_output *tdm_output);
+
+void destroy_tdm_buffer(struct ds_tdm_buffer *buffer);
+
+
+#endif
#include <stdlib.h>
#include <string.h>
-#include <tdm.h>
#include <libds/log.h>
#include <libds-tizen/tbm_server.h>
+
+#include "tdm_internal.h"
#include "tdm_output_hwc.h"
static void
#ifndef DS_TIZEN_BACKEND_TDM_OUTPUT_HWC_H
#define DS_TIZEN_BACKEND_TDM_OUTPUT_HWC_H
-#include <tdm.h>
#include <libds/surface.h>
#include <libds/buffer.h>
#include <libds-tizen/backend/tdm.h>
#include <libds-tizen/backend/tdm_output_hwc.h>
+#include "tdm_internal.h"
+
+
struct ds_tdm_output_hwc_window {
struct wl_list link;
]
subdir('allocator')
-subdir('backend')
subdir('util')
lib_libds_tizen = shared_library('ds-tizen', libds_tizen_files,
description: 'extension of libds for tizen platform',
)
+subdir('backend')
subdir('keyrouter')
subdir('input-devicemgr')
-