2016-04-19 08:39:25 -07:00
|
|
|
import eina_types;
|
2016-04-19 08:54:50 -07:00
|
|
|
import elm_general;
|
2016-04-19 08:39:25 -07:00
|
|
|
|
|
|
|
type Elm_App_Server_Create_View_Cb: __undefined_type;
|
|
|
|
|
2016-05-12 03:18:43 -07:00
|
|
|
class Elm.App.Server (Eo.Base)
|
2014-03-19 02:01:17 -07:00
|
|
|
{
|
|
|
|
eo_prefix: elm_app_server;
|
2015-05-07 09:32:53 -07:00
|
|
|
methods {
|
|
|
|
@property icon {
|
2014-03-19 02:01:17 -07:00
|
|
|
set {
|
|
|
|
}
|
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
2016-04-19 08:39:25 -07:00
|
|
|
icon: Eina.Stringshare *; [[title of icon]]
|
2014-03-19 02:01:17 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property views {
|
2014-03-19 02:01:17 -07:00
|
|
|
get {
|
2015-07-14 06:44:25 -07:00
|
|
|
[[Return a iterator with all views of application]]
|
2014-03-19 02:01:17 -07:00
|
|
|
}
|
|
|
|
values {
|
2016-05-12 03:18:43 -07:00
|
|
|
ret: free(own(iterator<Elm.App.Server.View *> *), eina_iterator_free); [[Iterator with all views of application, you must free iterator after use]]
|
2014-03-19 02:01:17 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property path {
|
2014-03-19 02:01:17 -07:00
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
2015-05-18 08:16:08 -07:00
|
|
|
ret: const(char)*;
|
2014-03-19 02:01:17 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property package {
|
2014-03-19 02:01:17 -07:00
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
2016-04-19 08:39:25 -07:00
|
|
|
ret: Eina.Stringshare *;
|
2014-03-19 02:01:17 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property pixels {
|
2014-03-19 02:01:17 -07:00
|
|
|
get {
|
2015-07-14 06:44:25 -07:00
|
|
|
[[Get application raw icon.]]
|
2014-03-19 02:01:17 -07:00
|
|
|
}
|
|
|
|
set {
|
2015-07-14 06:44:25 -07:00
|
|
|
[[Set icon to application, using the raw pixels of image.]]
|
2014-03-19 02:01:17 -07:00
|
|
|
}
|
|
|
|
values {
|
2015-05-18 08:16:08 -07:00
|
|
|
w: uint;
|
|
|
|
h: uint;
|
|
|
|
has_alpha: bool;
|
|
|
|
pixels: const(ubyte)*;
|
2014-03-19 02:01:17 -07:00
|
|
|
}
|
|
|
|
}
|
2014-09-01 07:57:56 -07:00
|
|
|
constructor {
|
2015-07-14 06:44:25 -07:00
|
|
|
[[Class constructor of elm_app_server]]
|
2014-08-27 07:44:11 -07:00
|
|
|
legacy: null;
|
|
|
|
params {
|
2015-07-14 06:44:25 -07:00
|
|
|
@in packageid: const(char)*; [[package of application]]
|
2015-09-18 20:43:09 -07:00
|
|
|
@in create_view_cb: Elm_App_Server_Create_View_Cb; [[callback to be called when user wants to open some application view]]
|
2014-08-27 07:44:11 -07:00
|
|
|
}
|
|
|
|
}
|
2014-03-19 02:01:17 -07:00
|
|
|
close_all {
|
2015-07-14 06:44:25 -07:00
|
|
|
[[Close all views of application]]
|
2014-03-19 02:01:17 -07:00
|
|
|
}
|
|
|
|
view_check {
|
2015-07-14 06:44:25 -07:00
|
|
|
[[If view id is available and unique, return the full DBus object path of view]]
|
2014-03-19 02:01:17 -07:00
|
|
|
params {
|
2015-07-14 06:44:25 -07:00
|
|
|
@in id: const(char)*; [[view identifier]]
|
2014-03-19 02:01:17 -07:00
|
|
|
}
|
2015-07-14 06:44:25 -07:00
|
|
|
return: bool; [[true if id is valid or false if not]]
|
2014-03-19 02:01:17 -07:00
|
|
|
}
|
|
|
|
view_add {
|
2015-07-14 06:44:25 -07:00
|
|
|
[[Add a view to elm_app_server. This should only be
|
|
|
|
used if the application open a view that was not
|
|
|
|
requested by create_view_cb.
|
|
|
|
]]
|
2014-03-19 02:01:17 -07:00
|
|
|
params {
|
2016-05-12 03:18:43 -07:00
|
|
|
@in view: Elm.App.Server.View *; [[elm_app_server_view]]
|
2014-03-19 02:01:17 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
title_set {
|
2015-07-14 06:44:25 -07:00
|
|
|
[[Set a title to application.]]
|
2014-03-19 02:01:17 -07:00
|
|
|
params {
|
2015-07-14 06:44:25 -07:00
|
|
|
@in title: const(char)* @nullable; [[title of application]]
|
2014-03-19 02:01:17 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
title_get {
|
2015-07-14 06:44:25 -07:00
|
|
|
[[Get title of application]]
|
2016-04-19 08:39:25 -07:00
|
|
|
return: Eina.Stringshare *; [[title of application]]
|
2014-03-19 02:01:17 -07:00
|
|
|
}
|
|
|
|
save {
|
2015-07-14 06:44:25 -07:00
|
|
|
[[Save the state of all views]]
|
2014-03-19 02:01:17 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
implements {
|
2014-06-27 15:36:05 -07:00
|
|
|
Eo.Base.destructor;
|
2015-05-20 08:31:04 -07:00
|
|
|
Eo.Base.finalize;
|
2014-03-19 02:01:17 -07:00
|
|
|
}
|
2014-09-01 07:57:56 -07:00
|
|
|
constructors {
|
|
|
|
.constructor;
|
|
|
|
}
|
2014-03-19 02:01:17 -07:00
|
|
|
events {
|
2015-06-11 09:13:46 -07:00
|
|
|
terminate; [[Called when application must be terminated.]]
|
2014-03-19 02:01:17 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|