]> Dogcows Code - chaz/openbox/blob - doc/python/config.txt
always adjust the frames size and position together, so there is no more weird resizi...
[chaz/openbox] / doc / python / config.txt
1 config.Config
2
3 ----
4
5 This document describes the 'Config' class, exposed by Openbox's 'config'
6 module to its python scripts.
7
8 ----
9
10 Methods
11
12 ----
13
14 add(modulename, name, friendlyname, description, type, default, **keywords):
15
16 Add a variable to the configuration system for a module.
17
18 modulename: The name of the module, e.g. 'focus'
19 name: The name of the variable, e.g. 'my_variable'
20 friendlyname: The user-friendly name of the variable, e.g.
21 'My Variable'
22 description: The detailed destription of the variable, e.g.
23 'Does Things'
24 type: The type of the variable, one of:
25 * 'boolean'
26 * 'enum'
27 * 'integer'
28 * 'string'
29 * 'function'
30 * 'object'
31 default: The default value for the variable, e.g. 300
32 keywords: Extra keyword=value pairs to further define the variable.
33 These can be:
34 * For 'enum' types:
35 * options : A list of possible options for the variable.
36 This *must* be set for all enum variables.
37 * For 'integer' types:
38 * min : The minimum value for the variable.
39 * max : The maximum value for the variable.
40
41 ----
42
43 set(modulename, name, value):
44
45 Sets the value for a variable of the specified module.
46
47 modulename: The name of the module, e.g. 'focus'
48 name: The name of the variable, e.g. 'my_variable'
49 value: The new value for the variable.
50
51 ----
52
53 reset(modulename, name):
54
55 Resets the value for a variable in the specified module back to its original
56 (default) value.
57
58 modulename: The name of the module, e.g. 'focus'
59 name: The name of the variable, e.g. 'my_variable'
60
61 ----
62
63 get(modulename, name):
64
65 Returns the current value for a variable in the specified module.
66
67 modulename: The name of the module, e.g. 'focus'
68 name: The name of the variable, e.g. 'my variable'
This page took 0.034196 seconds and 4 git commands to generate.