Ubuntu Platform API  1.1.0
A library helping with tight integration into the Ubuntu platform
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ubuntu_ui_session_service.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2012 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License version 3 as
6  * published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Thomas Voß <thomas.voss@canonical.com>
17  */
18 
19 #ifndef UBUNTU_UI_SESSION_SERVICE_C_API_H_
20 #define UBUNTU_UI_SESSION_SERVICE_C_API_H_
21 
22 #include <ubuntu/visibility.h>
23 
24 #include <stdint.h>
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30  typedef enum
31  {
36  SHARE_APP = 3,
37  PHONE_APP = 4,
42 
43  typedef const void* ubuntu_ui_session_properties;
45 
46  typedef void (*ubuntu_ui_session_service_snapshot_cb)(const void* pixels, unsigned int width, unsigned int height, unsigned int x, unsigned int y, unsigned int source_width, unsigned int source_height, unsigned int stride, void* context);
47 
48  typedef void (*session_requested_cb)(ubuntu_ui_well_known_application app, void* context);
49  typedef void (*session_born_cb)(ubuntu_ui_session_properties props, void* context);
50  typedef void (*session_unfocused_cb)(ubuntu_ui_session_properties props, void* context);
51  typedef void (*session_focused_cb)(ubuntu_ui_session_properties props, void* context);
52  typedef void (*keyboard_geometry_changed_cb)(int x, int y, int width, int height, void* context);
53  typedef void (*session_requested_fullscreen_cb)(ubuntu_ui_session_properties props, void* context);
54  typedef void (*session_died_cb)(ubuntu_ui_session_properties props, void * context);
55 
56  typedef struct
57  {
65 
66  void* context;
68 
69  typedef void (*continue_task_cb)(int pid, void* context);
70  typedef void (*suspend_task_cb)(int pid, void* context);
71 
72  typedef struct
73  {
76 
77  void *context;
79 
82  ubuntu_ui_task_controller *controller);
83 
84  UBUNTU_DLL_PUBLIC const char*
86  ubuntu_ui_session_properties props,
87  const char* key);
88 
91  ubuntu_ui_session_properties props);
92 
95  ubuntu_ui_session_properties props);
96 
97  UBUNTU_DLL_PUBLIC const char*
99  ubuntu_ui_session_properties props);
100 
101  UBUNTU_DLL_PUBLIC void
104 
105  UBUNTU_DLL_PUBLIC void
107 
108  UBUNTU_DLL_PUBLIC void
110 
111  UBUNTU_DLL_PUBLIC void
113 
114  UBUNTU_DLL_PUBLIC void
116 
117  UBUNTU_DLL_PUBLIC int32_t
118  ubuntu_ui_set_surface_trap(int x, int y, int width, int height);
119 
120  UBUNTU_DLL_PUBLIC void
121  ubuntu_ui_unset_surface_trap(int32_t handle);
122 
123  UBUNTU_DLL_PUBLIC void
124  ubuntu_ui_report_osk_visible(int x, int y, int width, int height);
125 
126  UBUNTU_DLL_PUBLIC void
128 
129  UBUNTU_DLL_PUBLIC void
131 
132  UBUNTU_DLL_PUBLIC void
134 
135 #ifdef __cplusplus
136 }
137 #endif
138 
139 #endif // UBUNTU_UI_SESSION_SERVICE_C_API_H_
UBUNTU_DLL_PUBLIC void ubuntu_ui_report_notification_invisible()
void(* ubuntu_ui_session_service_snapshot_cb)(const void *pixels, unsigned int width, unsigned int height, unsigned int x, unsigned int y, unsigned int source_width, unsigned int source_height, unsigned int stride, void *context)
UBUNTU_DLL_PUBLIC int ubuntu_ui_session_properties_get_application_instance_id(ubuntu_ui_session_properties props)
UBUNTU_DLL_PUBLIC const char * ubuntu_ui_session_properties_get_value_for_key(ubuntu_ui_session_properties props, const char *key)
UBUNTU_DLL_PUBLIC void ubuntu_ui_session_trigger_switch_to_well_known_application(ubuntu_ui_well_known_application app)
UBUNTU_DLL_PUBLIC void ubuntu_ui_unset_surface_trap(int32_t handle)
UBUNTU_DLL_PUBLIC void ubuntu_ui_report_notification_visible()
void(* session_unfocused_cb)(ubuntu_ui_session_properties props, void *context)
UBUNTU_DLL_PUBLIC int ubuntu_ui_session_properties_get_application_stage_hint(ubuntu_ui_session_properties props)
void(* session_requested_cb)(ubuntu_ui_well_known_application app, void *context)
keyboard_geometry_changed_cb on_keyboard_geometry_changed
void(* session_focused_cb)(ubuntu_ui_session_properties props, void *context)
UBUNTU_DLL_PUBLIC void ubuntu_ui_install_task_controller(ubuntu_ui_task_controller *controller)
UBUNTU_DLL_PUBLIC void ubuntu_ui_session_snapshot_running_session_with_id(int id, ubuntu_ui_session_service_snapshot_cb cb, void *context)
const void * ubuntu_ui_session_properties
UBUNTU_DLL_PUBLIC const char * ubuntu_ui_session_properties_get_desktop_file_hint(ubuntu_ui_session_properties props)
const void * ubuntu_ui_session_preview_provider
void(* session_born_cb)(ubuntu_ui_session_properties props, void *context)
ubuntu_ui_well_known_application
UBUNTU_DLL_PUBLIC int32_t ubuntu_ui_set_surface_trap(int x, int y, int width, int height)
UBUNTU_DLL_PUBLIC void ubuntu_ui_session_unfocus_running_sessions()
UBUNTU_DLL_PUBLIC void ubuntu_ui_report_osk_invisible()
#define UBUNTU_DLL_PUBLIC
Definition: visibility.h:25
void(* session_died_cb)(ubuntu_ui_session_properties props, void *context)
UBUNTU_DLL_PUBLIC void ubuntu_ui_report_osk_visible(int x, int y, int width, int height)
session_requested_fullscreen_cb on_session_requested_fullscreen
void(* session_requested_fullscreen_cb)(ubuntu_ui_session_properties props, void *context)
void(* keyboard_geometry_changed_cb)(int x, int y, int width, int height, void *context)
UBUNTU_DLL_PUBLIC void ubuntu_ui_session_focus_running_session_with_id(int id)
UBUNTU_DLL_PUBLIC void ubuntu_ui_session_install_session_lifecycle_observer(ubuntu_ui_session_lifecycle_observer *observer)
void(* suspend_task_cb)(int pid, void *context)
void(* continue_task_cb)(int pid, void *context)