~ubuntu-branches/ubuntu/dapper/gnome-screensaver/dapper

« back to all changes in this revision

Viewing changes to doc/DBUS-API.txt

  • Committer: Bazaar Package Importer
  • Author(s): Oliver Grawert
  • Date: 2005-10-10 00:18:18 UTC
  • Revision ID: james.westby@ubuntu.com-20051010001818-3mujs05r8rht7xi1
Tags: upstream-0.0.15
ImportĀ upstreamĀ versionĀ 0.0.15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
The GNOME Screensaver DBUS API
 
2
------------------------------
 
3
 
 
4
This API is currently unstable and is likely to change in the future.
 
5
 
 
6
GNOME Screensaver exposes a DBUS API for programs to obtain
 
7
information about the screensaver state and to interact with
 
8
the screensaver in limited ways.
 
9
 
 
10
The following constants are used to uniquely refer to the
 
11
GnomeScreensaver object when making DBUS method calls:
 
12
 
 
13
DBUS Service:                   "org.gnome.screensaver"
 
14
DBUS Object Path:               "/org/gnome/screensaver"
 
15
DBUS Interface:                 "org.gnome.screensaver"
 
16
 
 
17
Methods
 
18
=======
 
19
 
 
20
        Name:           lock
 
21
        Args:           (none)
 
22
        Returns:        (nothing)
 
23
        Description:    Request that the screen be locked
 
24
 
 
25
        Name:           cycle
 
26
        Args:           (none)
 
27
        Returns:        (nothing)
 
28
        Description:    Request that the screen saver theme be restarted
 
29
                        and if applicable switch to the next one in the list.
 
30
 
 
31
        Name:           getIdle
 
32
        Args:           (none)
 
33
        Returns:        DBUS_TYPE_BOOLEAN
 
34
        Descriptions:   Returns the value of the current state of idleness,
 
35
                        TRUE if the session is idle, FALSE if not.
 
36
 
 
37
        Name:           getIdleTime
 
38
        Args:           (none)
 
39
        Returns:        DBUS_TYPE_UINT32
 
40
        Descriptions:   Returns the number of seconds that the session has
 
41
                        been idle.  Returns zero if the session is not idle.
 
42
 
 
43
        Name:           InhibitActivation
 
44
        Args:           DBUS_TYPE_STRING reason
 
45
                        reason: Description of the reason why saving the screen
 
46
                                should be inhibited.
 
47
        Returns:        (nothing)
 
48
        Description:    Request the saving the screen due to system idleness
 
49
                        be blocked until AllowActivation is called or the
 
50
                        calling process exits.
 
51
 
 
52
        Name:           AllowActivation
 
53
        Args:           (none)
 
54
        Returns:        (nothing)
 
55
        Description:    Cancel any previous call to InhibitActivation() by the
 
56
                        calling process.
 
57
 
 
58
        Name:           setActive
 
59
        Args:           DBUS_TYPE_BOOLEAN state
 
60
                        state: TRUE to request activation,
 
61
                               FALSE to request deactivation
 
62
        Returns:        (nothing)
 
63
        Description:    Request a change in the state of the screensaver.
 
64
                        Set to TRUE to request that the screensaver activate.
 
65
                        Active means that the screensaver has blanked the
 
66
                        screen and may run a graphical theme.  This does
 
67
                        not necessary mean that the screen is locked.
 
68
 
 
69
        Name:           getActive
 
70
        Args:           (none)
 
71
        Returns:        DBUS_TYPE_BOOLEAN
 
72
        Descriptions:   Returns the value of the current state of activity.
 
73
                        See setActive().
 
74
 
 
75
        Name:           setThrottleEnabled
 
76
        Args:           DBUS_TYPE_BOOLEAN state
 
77
                        state: TRUE to request activation,
 
78
                               FALSE to request deactivation
 
79
        Returns:        (nothing)
 
80
        Description:    Request a change in the state of the theme throttle.
 
81
                        Set to TRUE to request that the screensaver not run
 
82
                        themes while the screensaver is active.
 
83
 
 
84
        Name:           getThrottleEnabled
 
85
        Args:           (none)
 
86
        Returns:        DBUS_TYPE_BOOLEAN
 
87
        Descriptions:   Returns the value of the current throttle state
 
88
                        See setThrottleEnabled().
 
89
 
 
90
 
 
91
Signals
 
92
=======
 
93
 
 
94
        Name:           ActiveChanged
 
95
        Args:           DBUS_TYPE_BOOLEAN state
 
96
        Returns:        Returns the value of the current state of activity.
 
97
        Description:    See method getActive().
 
98
 
 
99
        Name:           ThrottleEnabledChanged
 
100
        Args:           DBUS_TYPE_BOOLEAN state
 
101
        Returns:        Returns the value of the current throttle state.
 
102
        Description:    See method getThrottleEnabled().
 
103
 
 
104
 
 
105
Examples
 
106
========
 
107
 
 
108
You can get the idle time by running the following:
 
109
 
 
110
dbus-send --session \
 
111
          --dest=org.gnome.screensaver \
 
112
          --type=method_call \
 
113
          --print-reply \
 
114
          --reply-timeout=20000 \
 
115
          /org/gnome/screensaver \
 
116
          org.gnome.screensaver.getIdleTime