[enable_web_engine_plugin=$enableval],
[enable_web_engine_plugin=no])
-AC_ARG_ENABLE([imageloader-extension],
- [AC_HELP_STRING([--enable-imageloader-extension],
- [Turns on image loader extension build])],
- [enable_imageloader_extension=$enableval],
- [enable_imageloader_extension=no])
-
-AC_ARG_ENABLE([color-controller],
- [AC_HELP_STRING([--enable-color-controller],
- [Turns on color controller plugin build])],
- [enable_color_controller=$enableval],
- [enable_color_controller=no])
-
-AC_ARG_ENABLE([evas-plugin],
- [AC_HELP_STRING([--enable-evas-plugin],
- [Turns on evas plugin])],
- [enable_evas_plugin=$enableval],
- [enable_evas_plugin=no])
-
PKG_CHECK_MODULES([DALI], [dali2-core dali2-adaptor dali2-toolkit])
AC_CONFIG_SUBDIRS(key)
AC_CONFIG_SUBDIRS(video-player)
-
-if test "x$enable_imageloader_extension" = "xyes"; then
AC_CONFIG_SUBDIRS(image-loader)
-fi
-if test "x$enable_color_controller" = "xyes"; then
AC_CONFIG_SUBDIRS(color-controller)
-fi
if test "x$with_tizen_55_or_greater" = "xyes"; then
AC_CONFIG_SUBDIRS(vector-animation-renderer)
#
-# Copyright (c) 2022 Samsung Electronics Co., Ltd.
+# Copyright (c) 2020 Samsung Electronics Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
extension_src_dir = ../../../dali-extension
# evas-plugin
-if EVAS_PLUGIN
include ../../../dali-extension/devel-api/evas-plugin/file.list
include ../../../dali-extension/internal/evas-plugin/file.list
-endif
lib_LTLIBRARIES =
lib_LTLIBRARIES += libdali2-extension.la
# Todo Evas plugin separation
-if EVAS_PLUGIN
libdali2_extension_la_SOURCES = \
$(evas_plugin_devel_src_files) \
$(evas_plugin_internal_src_files)
-endif
libdali2_extension_la_DEPENDENCIES =
$(DALI_CFLAGS) \
$(DALI_EXTENSION_CFLAGS) \
$(DALI_ADAPTOR_INTEGRATION_CFLAGS) \
+ $(ELEMENTARY_CFLAGS) \
+ $(EVAS_CFLAGS) \
$(WAYLAND_CFLAGS) \
-DEFL_BETA_API_SUPPORT \
-I../../../ \
-Werror -Wall
-if EVAS_PLUGIN
-libdali2_extension_la_CXXFLAGS += \
- $(ELEMENTARY_CFLAGS) \
- $(EVAS_CFLAGS)
-endif
-
libdali2_extension_la_LIBADD = \
$(DLOG_LIBS) \
$(DALI_LIBS) \
$(DALI_ADAPTOR_INTEGRATION_LIBS) \
- $(WAYLAND_LIBS)
-
-if EVAS_PLUGIN
-libdali2_extension_la_LIBADD += \
$(ELEMENTARY_LIBS) \
- $(EVAS_LIBS)
-endif
+ $(EVAS_LIBS) \
+ $(WAYLAND_LIBS)
libdali2_extension_la_LDFLAGS = \
-rdynamic
dali2_extensiondir = $(devincludepath)/dali-extension
dali2_extension_HEADERS = ../../../dali-extension/dali-extension.h
-if EVAS_PLUGIN
dali2_extension_evasplugindir = $(devincludepath)/dali-extension/devel-api/evas-plugin
dali2_extension_evasplugin_HEADERS = $(evas_plugin_devel_header_files)
-endif
-
DALI_EXTENSION_VERSION=dali_version
AC_SUBST(DALI_EXTENSION_VERSION)
-AM_CONDITIONAL([EVAS_PLUGIN], [test x$evas_plugin = xtrue])
-
if test "x$enable_debug" = "xyes"; then
DALI_CFLAGS="$DALI_CFLAGS -DDEBUG_ENABLED"
fi
-PKG_CHECK_MODULES(DALI_ADAPTOR_INTEGRATION, dali2-adaptor-integration)
-PKG_CHECK_MODULES(WAYLAND, [ecore-wl2])
-
# For evas-plugin
-if test "x$enable_evas_plugin" = "xyes"; then
+PKG_CHECK_MODULES(DALI_ADAPTOR_INTEGRATION, dali2-adaptor-integration)
PKG_CHECK_MODULES(ELEMENTARY, elementary)
PKG_CHECK_MODULES(EVAS, evas)
-fi
+PKG_CHECK_MODULES(WAYLAND, [ecore-wl2])
devincludepath=${includedir}
AC_SUBST(devincludepath)
#define DALI_EXTENSION_H
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
*/
-#if defined(EVAS_PLUGIN)
#include <dali-extension/devel-api/evas-plugin/evas-plugin.h>
#include <dali-extension/devel-api/evas-plugin/scene.h>
-#endif
#endif // DALI_EXTENSION_H
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// HEADER
#include "loader-dummy.h"
-#include <dali/devel-api/adaptor-framework/pixel-buffer.h>
#include <dali/integration-api/debug.h>
+#include <dali/public-api/images/image.h>
+#include <dali/devel-api/adaptor-framework/pixel-buffer.h>
// INTERNAL INCLUDES
namespace Dali
{
namespace Plugin
{
+
/**
* This code is a dummy code. You can implement it here.
*/
-bool LoadImageHeader(const Dali::ImageLoader::Input& input, unsigned int& width, unsigned int& height)
+bool LoadImageHeader( const Dali::ImageLoader::Input& input, unsigned int& width, unsigned int& height )
{
bool success = false;
/* Loads the header of a image file and fills in the width and height appropriately. */
return success;
}
-bool LoadBitmapFromImage(const Dali::ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap)
+
+bool LoadBitmapFromImage( const Dali::ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap )
{
bool success = false;
/* Loads the bitmap from an image file. This function checks the header first */
return success;
}
-} // namespace Plugin
-} // namespace Dali
+}
+}
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
// CLASS HEADER
-#include <dali/integration-api/bitmap.h>
-#include <dali/integration-api/debug.h>
#include <tizen-image-loader.h>
+#include <dali/integration-api/debug.h>
+#include <dali/integration-api/bitmap.h>
#include "loader-dummy.h"
// The plugin factories
return new Dali::Plugin::TizenImageLoader;
}
-extern "C" DALI_EXPORT_API void DestroyImageLoaderPlugin(Dali::ImageLoaderPlugin* plugin)
+extern "C" DALI_EXPORT_API void DestroyImageLoaderPlugin( Dali::ImageLoaderPlugin* plugin )
{
- if(plugin != NULL)
+ if( plugin != NULL )
{
delete plugin;
}
{
namespace
{
-/**
+ /**
* Enum for file formats, has to be in sync with BITMAP_LOADER_LOOKUP_TABLE
*/
-enum FileFormats
-{
- // Unknown file format
- FORMAT_UNKNOWN = -1,
+ enum FileFormats
+ {
+ // Unknown file format
+ FORMAT_UNKNOWN = -1,
- // formats that use magic bytes
- FORMAT_DUMMY = 0,
- FORMAT_TOTAL_COUNT
-};
+ // formats that use magic bytes
+ FORMAT_DUMMY = 0,
+ FORMAT_TOTAL_COUNT
+ };
-/**
+ /**
* A lookup table containing all the bitmap loaders with the appropriate information.
* Has to be in sync with enum FileFormats
*/
-const Dali::ImageLoader::BitmapLoader BITMAP_LOADER_LOOKUP_TABLE[FORMAT_TOTAL_COUNT] =
+ const Dali::ImageLoader::BitmapLoader BITMAP_LOADER_LOOKUP_TABLE[FORMAT_TOTAL_COUNT] =
{
- {0x0, 0x0, LoadBitmapFromImage, nullptr, LoadImageHeader, Dali::Integration::Bitmap::BITMAP_2D_PACKED_PIXELS},
-};
+ { 0x0, 0x0, LoadBitmapFromImage, LoadImageHeader, Dali::Integration::Bitmap::BITMAP_2D_PACKED_PIXELS },
+ };
-struct FormatExtension
-{
- const std::string extension;
- FileFormats format;
-};
-const FormatExtension FORMAT_EXTENSIONS[] =
+ struct FormatExtension
{
- {".dummy", FORMAT_DUMMY}};
+ const std::string extension;
+ FileFormats format;
+ };
-const unsigned int FORMAT_EXTENSIONS_COUNT = sizeof(FORMAT_EXTENSIONS) / sizeof(FormatExtension);
+ const FormatExtension FORMAT_EXTENSIONS[] =
+ {
+ { ".dummy", FORMAT_DUMMY }
+ };
-FileFormats GetFormatHint(const std::string& filename)
-{
- FileFormats format = FORMAT_UNKNOWN;
+ const unsigned int FORMAT_EXTENSIONS_COUNT = sizeof(FORMAT_EXTENSIONS) / sizeof(FormatExtension);
- for(unsigned int i = 0; i < FORMAT_EXTENSIONS_COUNT; ++i)
+
+ FileFormats GetFormatHint( const std::string& filename )
{
- unsigned int length = FORMAT_EXTENSIONS[i].extension.size();
- if((filename.size() > length) &&
- (0 == filename.compare(filename.size() - length, length, FORMAT_EXTENSIONS[i].extension)))
+ FileFormats format = FORMAT_UNKNOWN;
+
+ for ( unsigned int i = 0; i < FORMAT_EXTENSIONS_COUNT; ++i )
{
- format = FORMAT_EXTENSIONS[i].format;
- break;
+ unsigned int length = FORMAT_EXTENSIONS[i].extension.size();
+ if ( ( filename.size() > length ) &&
+ ( 0 == filename.compare( filename.size() - length, length, FORMAT_EXTENSIONS[i].extension ) ) )
+ {
+ format = FORMAT_EXTENSIONS[i].format;
+ break;
+ }
}
+ return format;
}
- return format;
-}
-} // namespace
+}
TizenImageLoader::TizenImageLoader()
{
{
}
-const Dali::ImageLoader::BitmapLoader* TizenImageLoader::BitmapLoaderLookup(const std::string& filename) const
+const Dali::ImageLoader::BitmapLoader* TizenImageLoader::BitmapLoaderLookup( const std::string& filename ) const
{
- const Dali::ImageLoader::BitmapLoader* lookupPtr = BITMAP_LOADER_LOOKUP_TABLE;
- FileFormats format = GetFormatHint(filename);
- if(format != FORMAT_UNKNOWN)
+ const Dali::ImageLoader::BitmapLoader *lookupPtr = BITMAP_LOADER_LOOKUP_TABLE;
+ FileFormats format = GetFormatHint( filename );
+ if ( format != FORMAT_UNKNOWN )
{
lookupPtr = BITMAP_LOADER_LOOKUP_TABLE + format;
return lookupPtr;
} // namespace Plugin
} // namespace Dali
+
BuildRequires: pkgconfig(dali2-toolkit)
BuildRequires: pkgconfig(dlog)
-BuildRequires: pkgconfig(dali2-adaptor-integration)
-BuildRequires: pkgconfig(ecore-wl2)
-
# For evas-plugin
-%if 0%{?enable_evas_plugin}
+BuildRequires: pkgconfig(dali2-adaptor-integration)
BuildRequires: pkgconfig(elementary)
BuildRequires: pkgconfig(evas)
-%endif
+BuildRequires: pkgconfig(ecore-wl2)
%if 0%{?tizen_65_or_greater}
BuildRequires: pkgconfig(rive_tizen)
%define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
%define dev_include_path %{_includedir}
+# Use Image Loader Plugin
+%define use_image_loader 0
+
##############################
# Build
##############################
%endif
%if 0%{?enable_web_engine_plugin} == 1
--enable-web-engine-plugin \
-%endif
-%if 0%{?enable_image_loader}
- --enable-imageloader-extension \
-%endif
-%if 0%{?enable_color_controller}
- --enable-color-controller \
-%endif
-%if 0%{?enable_evas_plugin}
- --enable-evas-plugin \
%endif
--enable-ecore-wl2 \
--enable-keyextension
+%if 0%{?use_image_loader}
+%configure \
+ --enable-imageloader-extension
+%endif
make %{?jobs:-j%jobs}
exit 0
%endif
-%if 0%{?enable_image_loader}
%post image-loader-plugin
/sbin/ldconfig
exit 0
-%endif
%if 0%{?tizen_55_or_greater}
%post vector-animation-renderer-plugin
exit 0
%endif
-%if 0%{?enable_color_controller}
%post color-controller-plugin
/sbin/ldconfig
exit 0
-%endif
%if 0%{?tizen_55_or_greater} && 0%{?enable_web_engine_plugin} == 1
%post web-engine-lwe-plugin
exit 0
%endif
-%if 0%{?enable_image_loader}
%postun image-loader-plugin
/sbin/ldconfig
exit 0
-%endif
%if 0%{?tizen_55_or_greater}
%postun vector-animation-renderer-plugin
exit 0
%endif
-%if 0%{?enable_color_controller}
%postun color-controller-plugin
/sbin/ldconfig
exit 0
-%endif
%if 0%{?tizen_55_or_greater} && 0%{?enable_web_engine_plugin} == 1
%postun web-engine-lwe-plugin
%license LICENSE
%endif
-%if 0%{?enable_image_loader}
+%if 0%{?use_image_loader}
%files image-loader-plugin
%manifest dali-extension.manifest
%defattr(-,root,root,-)
%{_libdir}/pkgconfig/dali2-extension-rive-animation-view.pc
%endif
-%if 0%{?enable_color_controller}
%files color-controller-plugin
%manifest dali-extension.manifest
%defattr(-,root,root,-)
%{_libdir}/libdali2-color-controller-plugin.so*
%license LICENSE
-%endif
%if 0%{?tizen_55_or_greater} && 0%{?enable_web_engine_plugin} == 1
%files web-engine-lwe-plugin