Support orientation handling.
[platform/core/appfw/data-provider-slave.git] / include / widget.h
1 /*
2  * Copyright 2013  Samsung Electronics Co., Ltd
3  *
4  * Licensed under the Flora License, Version 1.1 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://floralicense.org/license/
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 extern void widget_viewer_init(void);
18 extern void widget_viewer_fini(void);
19
20 struct widget_create_arg {
21         double period;
22         int timeout;
23         int has_widget_script;
24         int skip_need_to_create;
25         const char *content;
26         const char *cluster;
27         const char *category;
28         const char *abi;
29         const char *direct_addr;
30 };
31
32 extern int widget_create(const char *pkgname, const char *id, struct widget_create_arg *arg, int *w, int *h, double *priority, char **content, char **title);
33 extern int widget_destroy(const char *pkgname, const char *id, int type);
34
35 extern int widget_viewer_resize_widget(const char *pkgname, const char *id, int w, int h);
36 extern int widget_clicked(const char *pkgname, const char *id, const char *event, double timestamp, double x, double y);
37 extern int widget_set_content_info(const char *pkgname, const char *id, const char *content_info);
38 extern int widget_set_content_info_all(const char *pkgname, const char *content);
39
40 extern int widget_script_event(const char *pkgname, const char *id, const char *signal_name, const char *source, widget_event_info_s event_info);
41 extern int widget_change_group(const char *pkgname, const char *id, const char *cluster, const char *category);
42
43 extern int widget_update(const char *pkgname, const char *id, int force);
44 extern int widget_update_all(const char *pkgname, const char *cluster, const char *category, int force);
45 extern void widget_pause_all(void);
46 extern void widget_resume_all(void);
47 extern int widget_viewer_set_period(const char *pkgname, const char *id, double period);
48 extern char *widget_pinup(const char *pkgname, const char *id, int pinup);
49 extern int widget_system_event(const char *pkgname, const char *id, int event);
50 extern int widget_system_event_all(int event);
51
52 extern int widget_open_gbar(const char *pkgname, const char *id);
53 extern int widget_close_gbar(const char *pkgname, const char *id);
54
55 extern int widget_pause(const char *pkgname, const char *id);
56 extern int widget_resume(const char *pkgname, const char *id);
57
58 extern int widget_viewer_is_pinned_up(const char *pkgname, const char *id);
59
60 extern void widget_turn_secured_on(void);
61 extern int widget_is_secured(void);
62
63 extern int widget_is_all_paused(void);
64 extern int widget_delete_all_deleteme(void);
65 extern int widget_delete_all(void);
66
67 extern int widget_viewer_connected(const char *pkgname, const char *id, const char *direct_addr);
68 extern int widget_viewer_disconnected(const char *pkgname, const char *id, const char *direct_addr);
69
70 extern int widget_set_orientation(const char *pkgname, const char *id, int orientation);
71
72 /**
73  * @brief
74  * Exported API for each widgets
75  */
76 extern const char *widget_find_pkgname(const char *filename);
77 extern int widget_request_update_by_id(const char *filename);
78 extern int widget_trigger_update_monitor(const char *id, int is_gbar);
79 extern int widget_update_extra_info(const char *id, const char *content, const char *title, const char *icon, const char *name);
80 extern int widget_send_updated(const char *pkgname, const char *id, int idx, int x, int y, int w, int h, int gbar, const char *descfile);
81 extern int widget_send_buffer_updated(const char *pkgname, const char *id, widget_buffer_h handle, int idx, int x, int y, int w, int h, int gbar, const char *descfile);
82 extern int widget_orientation(const char *filename);
83
84 /* End of a file */