doc/python/openbox.txt (raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 |
ob.Openbox ---- This document describes the 'Openbox' class, exposed by Openbox's 'ob' module to its python scripts. ---- Methods ---- shutdown() Causes Openbox to shutdown and exit. ---- restart([path]) Causes Openbox to shutdown and restart. If path is specified, Openbox will shutdown and attempt to run the specified executable instead of restarting itself. If that fails, however, it will restart itself. path: Optional path to replacement executable. ---- state() Returns Openbox's current state, this will be one of the State constants. Returns: One of the State values representing the internal state of Openbox. ---- desktop() Returns the number of the currently visible desktop. This will be in the range of [0, numDesktops()). Returns: The currently visible desktop. ---- setDesktop(desktop) Sets the specified desktop as the visible desktop. desktop: The desktop to make visible. Must be in the range of [0, numDesktops()) or a ValueError exception will be raised. ---- setNextDesktop([wrap]) Sets the visible desktop to the next desktop, optionally wrapping around when reaching the last. wrap: An optional argument which, when True will cause the function to wrap to the first desktop when going past the last. If it is not specified, it defaults to true. ---- setPreviousDesktop([wrap]) Sets the visible desktop to the previous desktop, optionally wrapping around when reaching the first. wrap: An optional argument which, when True will cause the function to wrap to the last desktop when going past the first. If it is not specified, it defaults to true. ---- numDesktops() Returns the number of desktops available. Returns: The number of available desktops. ---- setNumDesktops(num) Sets the number of desktops available. num: The new number of available desktops. This must be greater than 0. ---- desktopNames() Returns a tuple of names, containing a name for each desktop. The tuple may have a length greater than numDesktops() if more names have been specified. Returns: A tuple of names. ---- setDesktopNames(names) Sets the names for the desktops. names: An iterable list of names to apply to the desktops. Can contain more or less names than numDesktops(). If it contains fewer names, then Openbox will give the remaining desktops a placeholder name. ---- showingDesktop() Returns True or False, depicting if Openbox is in 'showing the desktop' mode. In 'showing the desktop' mode, all normal clients are hidden and the desktop is given focus if possible. Returns: True or False describing if Openbox is in 'showing the desktop' mode. ---- setShowingDesktop(show) Enters or leaves 'showing the desktop' mode. See showingDesktop() for a description of this mode. show: True or False to enter or leave 'showing the desktop' mode respectively. ---- screenArea(desktop) Returns the on-screen available area. This is the area not reserved by applications' struts. Windows should be placed within this area, not within the physicalSize(). desktop: The desktop for which to get the available area. 0xffffffff to get the combined area for all desktops (combined subtractively). Returns: A tuple of form (x, y, width, height) containing the dimensions of the available on-screen area for the desktop. ---- screenStrut(desktop) Returns the combined strut which has been reserved by all applications on the desktops. desktop: The desktop for which to get the strut. 0xffffffff to get the combined strut for all desktops (combined additively). Returns: A tuple of form (left, top, right, bottom) containing the size of the reserved strut space for the desktop. ---- physicalSize() Returns the physical size of the display device (in pixels). Returns: A tuple of the form (width, height) containing the size of the display device's area. ---- screenNumber() Returns the number of the screen on which Openbox is running. Returns: An integer specifying the screen on which this instance of Openbox is running. ---- rootWindow() Return the window id of the root window. Returns: An integer containing the window id of the root window. ---- clientList() Returns a all clients currently being managed by Openbox. This list is updated as clients are managed and closed/destroyed/released. Returns: A list of Clients containing all the clients managed by Openbox. ---- ob.State State.Starting: Openbox is starting up and has not yet reached its main event loop. State.Running: Openbox is running normally. State.Exiting: Openbox has left its main event loop and is shutting down. |