2019-02-14 08:37:02 -08:00
|
|
|
class @beta Efl.Config_Global extends Efl.Object implements Efl.Config
|
2016-06-23 05:29:55 -07:00
|
|
|
{
|
|
|
|
[[This class is a singleton representing the global configuration for the
|
|
|
|
running application.
|
|
|
|
]]
|
|
|
|
data: null;
|
2019-05-09 07:16:42 -07:00
|
|
|
c_prefix: efl_config;
|
2016-06-23 05:29:55 -07:00
|
|
|
methods {
|
|
|
|
save @protected {
|
|
|
|
[[Saves Elementary configuration to disk.
|
|
|
|
|
|
|
|
This function will take effect (does I/O) immediately. Use it when
|
|
|
|
you want to save all configuration changes at once. The current
|
|
|
|
configuration set will get saved onto the current profile
|
|
|
|
configuration file.
|
|
|
|
|
|
|
|
If $profile is $null, this will flush all settings to all
|
|
|
|
applications running on the same profile.
|
|
|
|
|
|
|
|
If $profile is not $null, this will take the current in-memory
|
|
|
|
config and write it out to the named $profile. This will not
|
|
|
|
change profile for the application or make other processes switch
|
|
|
|
profile.
|
|
|
|
]]
|
|
|
|
params {
|
|
|
|
profile: string @optional; [[The profile name.]]
|
|
|
|
}
|
2016-11-24 06:10:46 -08:00
|
|
|
return: bool; [[$true on success, $false otherwise]]
|
2016-06-23 05:29:55 -07:00
|
|
|
}
|
|
|
|
@property profile {
|
|
|
|
[[The profile for the running application.
|
|
|
|
|
|
|
|
Profiles are pre-set options that affect the whole look-and-feel of
|
|
|
|
Elementary-based applications. There are, for example, profiles
|
|
|
|
aimed at desktop computer applications and others aimed at mobile,
|
|
|
|
touchscreen-based ones. You most probably don't want to use the
|
|
|
|
functions in this group unless you're writing an elementary
|
|
|
|
configuration manager.
|
|
|
|
|
|
|
|
This gets or sets the global profile that is applied to all
|
|
|
|
Elementary applications.
|
|
|
|
]]
|
|
|
|
values {
|
2016-11-24 06:10:46 -08:00
|
|
|
profile: string; [[Profile name]]
|
2016-06-23 05:29:55 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
profile_iterate {
|
|
|
|
[[Returns the list of available profiles.]]
|
|
|
|
params {
|
|
|
|
hidden: bool @optional; [[If $true, gets the full list of profiles,
|
|
|
|
including those stored in hidden files.]]
|
|
|
|
}
|
2017-09-15 08:05:30 -07:00
|
|
|
return: iterator<string> @owned; [[Iterator to profiles]]
|
2016-06-23 05:29:55 -07:00
|
|
|
}
|
|
|
|
profile_exists {
|
|
|
|
[[Returns whether a profile exists or not.]]
|
|
|
|
params {
|
2016-11-24 06:10:46 -08:00
|
|
|
profile: string; [[Profile name]]
|
2016-06-23 05:29:55 -07:00
|
|
|
}
|
2016-11-24 06:10:46 -08:00
|
|
|
return: bool; [[$true if profile exists, $false otherwise]]
|
2016-06-23 05:29:55 -07:00
|
|
|
}
|
|
|
|
profile_dir_get {
|
|
|
|
[[Returns the directory where a profile is stored.]]
|
|
|
|
params {
|
2016-11-24 06:10:46 -08:00
|
|
|
profile: string; [[Profile name]]
|
2016-06-23 05:29:55 -07:00
|
|
|
is_user: bool; [[$true to lookup for a user profile or $false for
|
|
|
|
a system one.]]
|
|
|
|
}
|
2017-09-15 08:48:28 -07:00
|
|
|
return: stringshare @owned; [[Directory of the profile, free after use.]]
|
2016-06-23 05:29:55 -07:00
|
|
|
}
|
|
|
|
profile_derived_add @protected {
|
|
|
|
[[Add a new profile of the given name to be derived from the current
|
|
|
|
profile.
|
|
|
|
|
|
|
|
This creates a new profile of name $profile that will be derived
|
|
|
|
from the currently used profile using the modification commands
|
|
|
|
encoded in the $options string.
|
|
|
|
|
|
|
|
At this point it is not expected that anyone would generally use
|
2018-08-29 22:01:21 -07:00
|
|
|
this API except if you are a desktop environment and so the user
|
2016-06-23 05:29:55 -07:00
|
|
|
base of this API will be enlightenment itself.
|
|
|
|
]]
|
|
|
|
params {
|
|
|
|
profile: string; [[The new profile's name.]]
|
|
|
|
options: string; [[Derive options detailing how to modify.]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
profile_derived_del @protected {
|
|
|
|
[[Deletes a profile that is derived from the current one.
|
|
|
|
|
|
|
|
This deletes a derived profile added by @.profile_derived_add.
|
|
|
|
This will delete the profile of the given name $profile that is
|
|
|
|
derived from the current profile.
|
|
|
|
|
|
|
|
At this point it is not expected that anyone would generally use
|
2018-08-29 22:01:21 -07:00
|
|
|
this API except if you are a desktop environment and so the user
|
2016-06-23 05:29:55 -07:00
|
|
|
base of this API will be enlightenment itself.
|
|
|
|
]]
|
|
|
|
params {
|
|
|
|
profile: string; [[The name of the profile that is to be deleted.]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
implements {
|
2017-10-18 02:12:13 -07:00
|
|
|
Efl.Config.config { get; set; }
|
2016-06-23 05:29:55 -07:00
|
|
|
}
|
|
|
|
}
|