Synopsis
void |
start
|
(
) |
void |
setWorkspaceName
|
(
int
index,
|
| |  
string
name
) |
string |
getWorkspaceName
|
(
int
index
) |
boolean |
hasDefaultWorkspaceName
|
(
int
index
) |
void |
moveWindowToNewWorkspace
|
(
Meta.Window
metaWindow,
|
| |  
boolean
switchToNewWorkspace
) |
void |
loadTheme
|
(
) |
void |
notify
|
(
string
msg,
|
| |  
string
details
) |
void |
criticalNotify
|
(
msg,
|
| |  
details
) |
void |
notifyError
|
(
string
msg,
|
| |  
string
details
) |
void |
_log
|
(
string
category,
|
| |  
string
msg,
|
| |  
...
) |
boolean |
isError
|
(
Object
obj
) |
void |
_LogTraceFormatted
|
(
string
stack
) |
void |
_logTrace
|
(
Error
msg
) |
void |
_logWarning
|
(
Error/string
msg
) |
void |
_logError
|
(
string
msg,
|
| |  
Error
error
) |
void |
_logInfo
|
(
Error/string
msg
) |
string |
formatTime
|
(
Date
d
) |
string |
renderLogLine
|
(
dictionary
line
) |
void |
logStackTrace
|
(
string
msg
) |
boolean |
isWindowActorDisplayedOnWorkspace
|
(
Meta.WindowActor
win,
|
| |  
int
workspaceIndex
) |
array |
getWindowActorsForWorkspace
|
(
int
workspaceIndex
) |
boolean |
pushModal
|
(
Clutter.Actor
actor,
|
| |  
int
timestamp
) |
void |
popModal
|
(
Clutter.Actor
actor,
|
| |  
int
timestamp
) |
LookingGlass.LookingGlass |
createLookingGlass
|
(
) |
RunDialog.RunDialog |
getRunDialog
|
(
) |
void |
activateWindow
|
(
Meta.Window
window,
|
| |  
int
time,
|
| |  
int
workspaceNum
) |
string |
initializeDeferredWork
|
(
Clutter.Actor
actor,
|
| |  
function
callback
) |
void |
queueDeferredWork
|
(
string
workId
) |
boolean |
isInteresting
|
(
Meta.Window
metaWindow
) |
array |
getTabList
|
(
Meta.Workspace
workspaceOpt,
|
| |  
Meta.Screen
screenOpt
) |
PlacesManager.PlacesManager |
placesManager
|
Overview.Overview |
overview
|
Expo.Expo |
expo
|
RunDialog.RunDialog |
runDialog
|
LookingGlass.LookingGlass |
lookingGlass
|
WindowManager.WindowManager |
wm
|
MessageTray.MessageTray |
messageTray
|
NotificationDaemon.NotificationDaemon |
notificationDaemon
|
WindowAttentionHandler.WindowAttentionHandler |
windowAttentionHandler
|
Cinnamon.Recorder |
recorder
|
CinnamonDBus.Cinnamon |
cdosDBusService
|
int |
modalCount
|
array |
modalActorFocusStack
|
Cinnamon.GenericContainer |
uiGroup
|
Magnifier.Magnifier |
magnifier
|
XdndHandler.XdndHandler |
xdndHandler
|
StatusIconDispatcher.StatusIconDispatcher |
statusIconDispatcher
|
Keyboard.Keyboard |
keyboard
|
Layout.LayoutManager |
layoutManager
|
ThemeManager.ThemeManager |
themeManager
|
boolean |
dynamicWorkspaces
|
int |
nWorks
|
Cinnamon.WindowTracker |
tracker
|
array |
workspace_names
|
null |
background
|
DeskletManager.DeskletContainer |
deskletContainer
|
boolean |
software_rendering
|
Gio.FileOutputStream |
lg_log_file
|
boolean |
can_log
|
Description
The main file is responsible for launching Cinnamon as well as creating its components. Most components of Cinnamon can be accessed through main
Details
start ()
Starts cdos. Should not be called in JavaScript code
setWorkspaceName ()
void |
setWorkspaceName
|
(
int
index,
|
| |  
string
name
) |
Sets the name of the workspace @index to @name
index
|
index of workspace
|
name
|
name of workspace
|
getWorkspaceName ()
string |
getWorkspaceName
|
(
int
index
) |
Retrieves the name of the workspace @index
index
|
index of workspace
|
Return
|
name of workspace
|
hasDefaultWorkspaceName ()
boolean |
hasDefaultWorkspaceName
|
(
int
index
) |
Whether the workspace uses the default name
index
|
index of workspace
|
Return
|
whether the workspace uses the default name
|
moveWindowToNewWorkspace ()
void |
moveWindowToNewWorkspace
|
(
Meta.Window
metaWindow,
|
| |  
boolean
switchToNewWorkspace
) |
Moves the window to a new workspace.
If @switchToNewWorkspace is true, it will switch to the new workspace after moving the window
metaWindow
|
the window to be moved
|
switchToNewWorkspace
|
whether or not to switch to the new created workspace
|
loadTheme ()
Reloads the theme CSS file
notify ()
void |
notify
|
(
string
msg,
|
| |  
string
details
) |
Sends a notification
msg
|
A message
|
details
|
Additional information to be
|
criticalNotify ()
void |
criticalNotify
|
(
msg,
|
| |  
details
) |
msg
|
A critical message
|
details
|
Additional information
|
notifyError ()
void |
notifyError
|
(
string
msg,
|
| |  
string
details
) |
See cdos_global_notify_problem().
msg
|
An error message
|
details
|
Additional information
|
_log ()
void |
_log
|
(
string
category,
|
| |  
string
msg,
|
| |  
...
) |
Log a message into the LookingGlass error stream.
This is primarily intended for use by the extension system as well as debugging.
category
|
string message type ('info', 'error')
|
msg
|
A message string
|
...
|
Any further arguments are converted into JSON notation, and appended to the log message, separated by spaces.
|
isError ()
boolean |
isError
|
(
Object
obj
) |
Tests whether @obj is an error object
obj
|
the object to be tested
|
Return
|
whether @obj is an error object
|
_LogTraceFormatted ()
void |
_LogTraceFormatted
|
(
string
stack
) |
Prints the stack trace to the LookingGlass error stream in a predefined format
_logTrace ()
void |
_logTrace
|
(
Error
msg
) |
Prints a stack trace of the given object.
If msg is an error, its stack-trace will be printed. Otherwise, a stack-trace of the call will be generated
If you want to print the message of an Error as well, use the other log functions instead.
_logWarning ()
void |
_logWarning
|
(
Error/string
msg
) |
Logs the message to the LookingGlass error stream.
If msg is an error, its stack-trace will be printed.
msg
|
An error object or the message string
|
_logError ()
void |
_logError
|
(
string
msg,
|
| |  
Error
error
) |
Logs the following (if present) to the LookingGlass error stream: - The message from the error object - The stack trace of the error object - The message @msg
It can be called in the form of either _logError(msg), _logError(error) or _logError(msg, error).
msg
|
(optional) The message string
|
error
|
(optional) The error object
|
_logInfo ()
void |
_logInfo
|
(
Error/string
msg
) |
Logs the message to the LookingGlass error stream. If @msg is an Error object, its stack trace will also be printed
msg
|
The error object or the message string
|
formatTime ()
string |
formatTime
|
(
Date
d
) |
Formats a date object into a ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ) in UTC+0
d
|
date object to be formatted
|
Return
|
a formatted string showing the date
|
renderLogLine ()
string |
renderLogLine
|
(
dictionary
line
) |
Converts a log line object into a string
line
|
a log line
|
Return
|
line in the format CATEGORY t=TIME MESSAGE
|
logStackTrace ()
void |
logStackTrace
|
(
string
msg
) |
Logs the message @msg to stdout with backtrace
isWindowActorDisplayedOnWorkspace ()
boolean |
isWindowActorDisplayedOnWorkspace
|
(
Meta.WindowActor
win,
|
| |  
int
workspaceIndex
) |
Determines whether the window actor belongs to a specific workspace
win
|
window actor
|
workspaceIndex
|
index of workspace
|
Return
|
whether the window is on the workspace
|
getWindowActorsForWorkspace ()
array |
getWindowActorsForWorkspace
|
(
int
workspaceIndex
) |
Gets a list of actors on a workspace
workspaceIndex
|
index of workspace
|
Return
|
the array of window actors
|
pushModal ()
boolean |
pushModal
|
(
Clutter.Actor
actor,
|
| |  
int
timestamp
) |
Ensure we are in a mode where all keyboard and mouse input goes to the stage, and focus @actor. Multiple calls to this function act in a stacking fashion; the effect will be undone when an equal number of popModal() invocations have been made.
Next, record the current Clutter keyboard focus on a stack. If the modal stack returns to this actor, reset the focus to the actor which was focused at the time pushModal() was invoked.
@timestamp is optionally used to associate the call with a specific user initiated event.
If not provided then the value of global.get_current_time() is assumed.
actor
|
actor which will be given keyboard focus
|
timestamp
|
optional timestamp
|
Return
|
true iff we successfully acquired a grab or already had one
|
popModal ()
void |
popModal
|
(
Clutter.Actor
actor,
|
| |  
int
timestamp
) |
Reverse the effect of pushModal().
If this invocation is undoing the topmost invocation, then the focus will be restored to the previous focus at the time when pushModal() was invoked.
@timestamp is optionally used to associate the call with a specific user initiated event.
If not provided then the value of global.get_current_time() is assumed.
actor
|
actor passed to original invocation of pushModal().
|
timestamp
|
optional timestamp
|
createLookingGlass ()
LookingGlass.LookingGlass |
createLookingGlass
|
(
) |
Obtains the looking glass object. Create if it does not exist
Return
|
looking glass object
|
getRunDialog ()
RunDialog.RunDialog |
getRunDialog
|
(
) |
Obtains the run dialog object. Create if it does not exist
activateWindow ()
void |
activateWindow
|
(
Meta.Window
window,
|
| |  
int
time,
|
| |  
int
workspaceNum
) |
Activates @window, switching to its workspace first if necessary, and switching out of the overview if it's currently active
window
|
the Meta.Window to activate
|
time
|
(optional) current event time
|
workspaceNum
|
(optional) window's workspace number
|
initializeDeferredWork ()
string |
initializeDeferredWork
|
(
Clutter.Actor
actor,
|
| |  
function
callback
) |
This function sets up a callback to be invoked when either the given actor is mapped, or after some period of time when the machine is idle.
This is useful if your actor isn't always visible on the screen (for example, all actors in the overview), and you don't want to consume resources updating if the actor isn't actually going to be displaying to the user.
Note that queueDeferredWork is called by default immediately on initialization as well, under the assumption that new actors will need it.
actor
|
A #ClutterActor
|
callback
|
Function to invoke to perform work
|
Return
|
A string work identifer
|
queueDeferredWork ()
void |
queueDeferredWork
|
(
string
workId
) |
Ensure that the work identified by @workId will be run on map or timeout.
You should call this function for example when data being displayed by the actor has changed.
isInteresting ()
boolean |
isInteresting
|
(
Meta.Window
metaWindow
) |
Determines whether a window is "interesting", i.e. ones to be displayed in alt-tab, window list etc.
metaWindow
|
the window to be tested
|
Return
|
whether the window is interesting
|
getTabList ()
array |
getTabList
|
(
Meta.Workspace
workspaceOpt,
|
| |  
Meta.Screen
screenOpt
) |
Return a list of the interesting windows on a workspace (by default, the active workspace). The list will include app-less dialogs.
workspaceOpt
|
(optional) workspace, defaults to global.screen.get_active_workspace()
|
screenOpt
|
(optional) screen, defaults to global.screen
|
Return
|
list of windows
|
placesManager
PlacesManager.PlacesManager |
placesManager
|
The places manager
overview
Overview.Overview |
overview
|
The "scale" overview
expo
The "expo" overview
runDialog
RunDialog.RunDialog |
runDialog
|
The run dialog
lookingGlass
LookingGlass.LookingGlass |
lookingGlass
|
The looking glass
wm
WindowManager.WindowManager |
wm
|
The window manager
messageTray
MessageTray.MessageTray |
messageTray
|
The mesesage tray
notificationDaemon
NotificationDaemon.NotificationDaemon |
notificationDaemon
|
The notification daemon
windowAttentionHandler
WindowAttentionHandler.WindowAttentionHandler |
windowAttentionHandler
|
The window attention handler
recorder
Cinnamon.Recorder |
recorder
|
The recorder
cdosDBusService
CinnamonDBus.Cinnamon |
cdosDBusService
|
The cdos dbus object
modalCount
The number of modals "pushed"
modalActorFocusStack
array |
modalActorFocusStack
|
Array of pushed modal actors
uiGroup
Cinnamon.GenericContainer |
uiGroup
|
The group containing all Cinnamon and Muffin actors
magnifier
Magnifier.Magnifier |
magnifier
|
The magnifier
xdndHandler
XdndHandler.XdndHandler |
xdndHandler
|
The X DND handler
statusIconDispatcher
StatusIconDispatcher.StatusIconDispatcher |
statusIconDispatcher
|
The status icon dispatcher
keyboard
Keyboard.Keyboard |
keyboard
|
The keyboard object
layoutManager
Layout.LayoutManager |
layoutManager
|
The layout manager
themeManager
ThemeManager.ThemeManager |
themeManager
|
The theme manager
dynamicWorkspaces
boolean |
dynamicWorkspaces
|
Whether dynamic workspaces are to be used. This is not yet implemented
nWorks
Number of workspaces
tracker
Cinnamon.WindowTracker |
tracker
|
The window tracker
workspace_names
Names of workspace
background
Unused
deskletContainer
DeskletManager.DeskletContainer |
deskletContainer
|
The desklet container
software_rendering
boolean |
software_rendering
|
Whether software rendering is used
lg_log_file
Gio.FileOutputStream |
lg_log_file
|
The stream used to log looking messages to ~/.cdos/glass.log
can_log
Whether looking glass log to file can be used