CinnamonDesktop.XkbInfo¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_object |
r |
Class Details¶
- class CinnamonDesktop.XkbInfo(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new()¶
- Returns:
a new
CinnamonDesktop.XkbInfo
instance.- Return type:
- description_for_option(group_id, id)¶
- Parameters:
- Returns:
the translated description for the option id.
- Return type:
New in version 3.6.
- get_all_layouts()¶
- Returns:
the list of layout names. The caller takes ownership of the
GLib.List
but not of the strings themselves, those are internally allocated and must not be modified.- Return type:
[
str
]
Returns a list of all layout identifiers we know about.
New in version 3.6.
- get_all_option_groups()¶
- Returns:
the list of option group ids. The caller takes ownership of the
GLib.List
but not of the strings themselves, those are internally allocated and must not be modified.- Return type:
[
str
]
Returns a list of all option group identifiers we know about.
New in version 3.6.
- get_layout_info(id)¶
- Parameters:
id (
str
) – layout’s identifier about which to retrieve the info- Returns:
- Return type:
(
bool
, display_name:str
, short_name:str
, xkb_layout:str
, xkb_variant:str
)
Retrieves information about a layout. Both display_name and short_name are suitable to show in UIs and might be localized if translations are available.
Some layouts don’t provide a short name (2 or 3 letters) or don’t specify a XKB variant, in those cases short_name or xkb_variant are empty strings, i.e. “”.
If the given layout doesn’t exist the return value is
False
and all the (out) parameters are set toNone
.New in version 3.6.
- get_layout_info_for_language(language)¶
- Parameters:
language (
str
) – an ISO 639 code- Returns:
True
if a layout exists orFalse
otherwise.- id:
location to store the layout’s indentifier, or
None
- display_name:
location to store the layout’s display name, or
None
- short_name:
location to store the layout’s short name, or
None
- xkb_layout:
location to store the layout’s XKB name, or
None
- xkb_variant:
location to store the layout’s XKB variant, or
None
- Return type:
(
bool
, id:str
, display_name:str
, short_name:str
, xkb_layout:str
, xkb_variant:str
)
Retrieves the layout that better fits language. It also fetches information about that layout like
CinnamonDesktop.XkbInfo.get_layout_info
().If a layout can’t be found the return value is
False
and all the (out) parameters are set toNone
.New in version 3.6.
- get_options_for_group(group_id)¶
- Parameters:
group_id (
str
) – group’s identifier about which to retrieve the options- Returns:
the list of option ids. The caller takes ownership of the
GLib.List
but not of the strings themselves, those are internally allocated and must not be modified.- Return type:
[
str
]
Returns a list of all option identifiers we know about for group group_id.
New in version 3.6.