From: Sung-Jin Park Date: Thu, 5 Sep 2019 01:45:30 +0000 (+0900) Subject: packaging: fix to install headers properly X-Git-Tag: submit/tizen/20191223.081711~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=969b10592d5dc64d5b173fcbff44f6bc524b7a9c;p=platform%2Fcore%2Fuifw%2Flibpui.git packaging: fix to install headers properly Change-Id: I7334d69010c71fa09da80ec7d99004c882635216 Signed-off-by: Sung-Jin Park --- diff --git a/backends/Makefile.am b/backends/Makefile.am index 9f93b49..3bacb06 100644 --- a/backends/Makefile.am +++ b/backends/Makefile.am @@ -6,13 +6,13 @@ AM_CFLAGS = \ -I$(top_srcdir)/src libpui_default_backend_includedir=$(includedir) -libpui_default_backend_include_HEADERS = \ - default_backend.h +#libpui_default_backend_include_HEADERS = default_backend.h libpui_default_backend_la_CFLAGS = $(AM_CFLAGS) $(DEFAULT_BACKEND_CFLAGS) libpui_default_backend_la_LIBADD = $(DEFAULT_BACKEND_LIBS) libpui_default_backend_la_SOURCES = \ + default_backend.h \ default_backend.c \ system/default_ani_easysetup.c \ system/default_ani_system_processing.c \ diff --git a/include/PUI_common.h b/include/PUI_common.h new file mode 100644 index 0000000..eb587be --- /dev/null +++ b/include/PUI_common.h @@ -0,0 +1,102 @@ +/* + * Copyright © 2019 Samsung Electronics co., Ltd. All Rights Reserved. + * + * 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 _LIBPUI_COMMON_H_ +#define _LIBPUI_COMMON_H_ + +typedef enum { + PUI_ERROR_NONE, + PUI_ERROR_INVALID_ANI_HANDLE, + PUI_ERROR_INVALID_ANI_CMD, + PUI_ERROR_INVALID_ANI_REPEAT, + PUI_ERROR_INTERNAL, +} pui_error; + +typedef enum { + PUI_ANI_STATUS_INITIAL, + PUI_ANI_STATUS_UNKNOWN, + PUI_ANI_STATUS_STARTED, + PUI_ANI_STATUS_RUNNING, + PUI_ANI_STATUS_PAUSED, + PUI_ANI_STATUS_STOPPED, +} pui_ani_status; + +typedef enum { + PUI_ANI_CMD_NONE, + PUI_ANI_CMD_START, + PUI_ANI_CMD_STOP, + PUI_ANI_CMD_LAST, +} pui_ani_cmd; + +typedef enum { + PUI_INT_ERROR_NONE, + PUI_INT_ERROR_INVALID_HANDLE, + PUI_INT_ERROR_INVALID_SURFACE, + PUI_INT_ERROR_INVALID_BUFFER, + PUI_INT_ERROR_ID_NOT_SUPPORTED, + PUI_INT_ERROR_INVALID_BACKEND_MGR, + PUI_INT_ERROR_NO_ANI_AVAILABLE, + PUI_INT_ERROR_BACKEND_FUNC_ERROR, + PUI_INT_ERROR_INVALID_RESOURCES, +} pui_int_error; + +typedef unsigned int pui_bool; +typedef char* pui_id; +typedef char* pui_error_string; +typedef struct _pui * pui_h; +typedef struct _pui pui; +typedef struct _pui_ani * pui_ani_h; +typedef struct _pui_ani pui_ani; +typedef struct _pui_module_data pui_module_data; +typedef struct _PUI_Event_Animation_Status PUI_Event_Animation_Status; + +typedef struct _pui_ani_t pui_ani_t; +typedef struct _pui_backend_ani_data pui_backend_ani_data; +typedef struct _pui_backend_module_data pui_backend_module_data; +typedef struct _pui_backend_module pui_backend_module; + +typedef struct _pui_ani_control_buffer pui_ani_control_buffer; +struct _pui_ani_control_buffer +{ + unsigned char *ptr; + unsigned int size; +}; + +#define pui_err(msg, ...) \ + do { \ + fprintf(stderr, "[ERROR][%s][%d] " msg, __FUNCTION__, __LINE__, ##__VA_ARGS__); \ + } while(0) + +#define pui_warn(msg, ...) \ + do { \ + fprintf(stderr, "[WARNING][%s][%d] " msg, __FUNCTION__, __LINE__, ##__VA_ARGS__); \ + } while(0) + +#define pui_info(msg, ...) \ + do { \ + fprintf(stdout, "[INFO][%s][%d] " msg, __FUNCTION__, __LINE__, ##__VA_ARGS__); \ + } while(0) + +#endif//_LIBPUI_COMMON_H_ diff --git a/samples/PUI_sample.c b/samples/PUI_sample.c index e13d4a7..c024a84 100644 --- a/samples/PUI_sample.c +++ b/samples/PUI_sample.c @@ -278,7 +278,6 @@ _ani_stop(app_data_t *app) { pui_error e = PUI_ERROR_NONE; pui_ani_h ani_h = NULL; - int idx = -1; if (!app->ph) { diff --git a/src/Makefile.am b/src/Makefile.am index 346e0c9..04a43da 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -6,7 +6,7 @@ AM_CFLAGS = \ -I$(top_srcdir)/src libpui_includedir=$(includedir) -libpui_include_HEADERS = $(top_srcdir)/include/PUI.h $(top_srcdir)/include/PUI_backend.h +libpui_include_HEADERS = $(top_srcdir)/include/PUI.h $(top_srcdir)/include/PUI_backend.h $(top_srcdir)/include/PUI_common.h libpui_la_CFLAGS = $(AM_CFLAGS) $(LIBPUI_CFLAGS) libpui_la_LIBADD = $(LIBPUI_LIBS) @@ -14,6 +14,5 @@ libpui_la_LIBADD = $(LIBPUI_LIBS) libpui_la_SOURCES = \ PUI.c \ PUI_backend.c \ - PUI_common.h \ PUI_ani.c \ PUI_internal.h diff --git a/src/PUI_common.h b/src/PUI_common.h deleted file mode 100644 index eb587be..0000000 --- a/src/PUI_common.h +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright © 2019 Samsung Electronics co., Ltd. All Rights Reserved. - * - * 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 _LIBPUI_COMMON_H_ -#define _LIBPUI_COMMON_H_ - -typedef enum { - PUI_ERROR_NONE, - PUI_ERROR_INVALID_ANI_HANDLE, - PUI_ERROR_INVALID_ANI_CMD, - PUI_ERROR_INVALID_ANI_REPEAT, - PUI_ERROR_INTERNAL, -} pui_error; - -typedef enum { - PUI_ANI_STATUS_INITIAL, - PUI_ANI_STATUS_UNKNOWN, - PUI_ANI_STATUS_STARTED, - PUI_ANI_STATUS_RUNNING, - PUI_ANI_STATUS_PAUSED, - PUI_ANI_STATUS_STOPPED, -} pui_ani_status; - -typedef enum { - PUI_ANI_CMD_NONE, - PUI_ANI_CMD_START, - PUI_ANI_CMD_STOP, - PUI_ANI_CMD_LAST, -} pui_ani_cmd; - -typedef enum { - PUI_INT_ERROR_NONE, - PUI_INT_ERROR_INVALID_HANDLE, - PUI_INT_ERROR_INVALID_SURFACE, - PUI_INT_ERROR_INVALID_BUFFER, - PUI_INT_ERROR_ID_NOT_SUPPORTED, - PUI_INT_ERROR_INVALID_BACKEND_MGR, - PUI_INT_ERROR_NO_ANI_AVAILABLE, - PUI_INT_ERROR_BACKEND_FUNC_ERROR, - PUI_INT_ERROR_INVALID_RESOURCES, -} pui_int_error; - -typedef unsigned int pui_bool; -typedef char* pui_id; -typedef char* pui_error_string; -typedef struct _pui * pui_h; -typedef struct _pui pui; -typedef struct _pui_ani * pui_ani_h; -typedef struct _pui_ani pui_ani; -typedef struct _pui_module_data pui_module_data; -typedef struct _PUI_Event_Animation_Status PUI_Event_Animation_Status; - -typedef struct _pui_ani_t pui_ani_t; -typedef struct _pui_backend_ani_data pui_backend_ani_data; -typedef struct _pui_backend_module_data pui_backend_module_data; -typedef struct _pui_backend_module pui_backend_module; - -typedef struct _pui_ani_control_buffer pui_ani_control_buffer; -struct _pui_ani_control_buffer -{ - unsigned char *ptr; - unsigned int size; -}; - -#define pui_err(msg, ...) \ - do { \ - fprintf(stderr, "[ERROR][%s][%d] " msg, __FUNCTION__, __LINE__, ##__VA_ARGS__); \ - } while(0) - -#define pui_warn(msg, ...) \ - do { \ - fprintf(stderr, "[WARNING][%s][%d] " msg, __FUNCTION__, __LINE__, ##__VA_ARGS__); \ - } while(0) - -#define pui_info(msg, ...) \ - do { \ - fprintf(stdout, "[INFO][%s][%d] " msg, __FUNCTION__, __LINE__, ##__VA_ARGS__); \ - } while(0) - -#endif//_LIBPUI_COMMON_H_