This will make the image transparent with the given alpha value. Additionally a color (red, green, blue) can be made completely transparent. This function also allows a combination of both effects. Using 0 for millisec disables this feature and leaves the image permanently affected.

+

This will change the image transparency to the given alpha value. The R,G, or B value of -1 indicates that pixels of all intensities in this channel will be assigned the given alpha. If a color (R,G, or B) intensity is specified in the range of 0-255, the alpha value is applied only to the pixels with that intensity. This allows to make, for example, only black (R=0,G=0,B=0) pixels transparent, while keeping all other pixel's alpha unchanged.

−

<br><br>'''Synopsis:'''<br>

+

The value of millisec instructs how long the transparency effect should stay. The value of 0 makes the alpha effect permanent.

You can reference a bar in your python code that was created in the
theme file. Basically, you just add a NAME= value to the BAR line in
the .theme file. Then if you want to use that object, instead of calling
createBar(), you can call this function.
The name you pass to the function is the same one that you gave it for
the NAME= parameter in the .theme file.

SuperKaramba supports a simplistic configuration pop-up menu. This menu
appears when you right-click on a widget and choose Configure Theme.
Basically, it allows you to have check-able entries in the menu to allow
the user to enable or disable features in your theme.
Before you use any configuration menu stuff, you NEED to add a new
callback to your script:
def menuOptionChanged(widget, key, value):
This will get called whenever a config menu option is changed. Now you
can add items to the config menu:
addMenuConfigOption(widget, String key, String name)
Key is the name of a key value where the value will be saved
automatically into the widget's config file. Name is the actual text that
will show up in the config menu.
For example, I could allow the user to enable or disable a clock showing
up in my theme:
karamba.addMenuConfigOption(widget, "showclock", "Display a clock")

This sets whether or not the given option is checked in the theme's
Configure Theme menu. Value should be false if key should not be checked and
true if key should be checked.
See addMenuConfigOption() for a more detailed explanation.

SuperKaramba automatically supports configuration files for each theme.
These files will be saved in /your/home/dir/.superkaramba/ and will be
named themenamerc where themename is the name of the theme.
This function writes an entry into the config file with the given key and
value.
For example, to save my favorite color, I would do
karamba.writeConfigEntry(widget, "FavColor", "Red")

You can reference graph in your python code that was created in the
theme file. Basically, you just add a NAME= value to the GRAPH line in
the .theme file. Then if you want to use that object, instead of calling
createGraph(), you can call this function.
The name you pass to the function is the same one that you gave it for
the NAME= parameter in the .theme file.

Changes the "intensity" of the image, which is similar to it's
brightness. ratio is a floating point number from -1.0 to 1.0 that
determines how much to brighten or darken the image. Millisec specifies
how long in milliseconds before the image is restored to it's original
form. This is useful for "mouse over" type animations. Using 0 for
millisec disables this feature and leaves the image permanently
affected.

Turns the given image into a grayscale image. Millisec specifies how
long in milliseconds before the image is restored to it's original form.
This is useful for "mouse over" type animations. Using 0 for millisec
disables this feature and leaves the image permanently affected.

Synopsis:
boolean changeImageToGray(widget, image, millisec)

Arguments:

reference to widget -- karamba

reference to image -- image

integer millisec -- milliseconds before the image is restored (optional)

This will change the image transparency to the given alpha value. The R,G, or B value of -1 indicates that pixels of all intensities in this channel will be assigned the given alpha. If a color (R,G, or B) intensity is specified in the range of 0-255, the alpha value is applied only to the pixels with that intensity. This allows to make, for example, only black (R=0,G=0,B=0) pixels transparent, while keeping all other pixel's alpha unchanged.
The value of millisec instructs how long the transparency effect should stay. The value of 0 makes the alpha effect permanent.

This creates an background image on your widget at x, y. The filename
should be given as the path parameter. In theory the image could be
local or could be a url. It works just like adding an image in your
theme file. You will need to save the return value to be able to call
other functions on your image, such as moveImage()

This creates an image on your widget at x, y. The filename should be
given as the path parameter. In theory the image could be local or could
be a url. It works just like adding an image in your theme file. You
will need to save the return value to be able to call other functions on
your image, such as moveImage()

You can reference an image in your python code that was created in the
.theme file. Basically, you just add a NAME= value to the IMAGE line in
the .theme file. Then if you want to use that object, instead of calling
createImage(), you can call this function.
The name you pass to the function is the same one that you gave it for
the NAME= parameter in the .theme file.

This moves an image to a new x, y relative to your widget. In other
words, (0,0) is the top corner of your widget, not the screen. The
imageToMove parameter is a reference to the image to move that you saved
as the return value from createImage()

DEPRECATED: resizeImage() now allows the user to pick whether to use fast
or smooth resizing from the SuperKaramba menu - This resizes your image
to width, height. The imageToResize parameter is a reference to an
image that you saved as the return value from createImage()
In version 0.50 and later this function works exactly as resizeImage().

This will change the background color of a Input Box widget.
InputBox is the reference to the text object to change
r, g, b are ints from 0 to 255 that represent red, green, blue and the alpha channel.

This will change the selected text color of a Input Box widget.
InputBox is the reference to the text object to change
r, g, b are ints from 0 to 255 that represent red, green, blue and the alpha channel.

This will change the color of the selection of a Input Box widget.
InputBox is the reference to the text object to change
r, g, b are ints from 0 to 255 that represent red, green, blue and teh alpha channel.

This creates a new Input Box at x, y with width and height w, h. You need to save
the return value of this function to call other functions on your Input Box
field, such as changeInputBox().
The karamba widget is automatically set active, to allow user interactions.

This removes the Input Box object from the widget. Please do not call functions of
the Input Box after calling deleteInputBox, as it does not exist anymore and that
could cause crashes in some cases.
The karamba widget ist automatically set passive, when no more Input Boxes are on
the karamba widget.

You can reference text in your python code that was created in the
theme file. Basically, you just add a NAME= value to the INPUT line in
the .theme file. Then if you want to use that object, instead of calling
createInputBox(), you can call this function.
The name you pass to the function is the same one that you gave it for
the NAME= parameter in the .theme file.

This adds an entry to the given menu with label text and with given icon.
Icon can be just an application name in which case the user's current
icon set is used, or can be a path to a 16x16 png file.
The function returns the reference to the menu item, which identifies that popup
menu item uniquely among popupmenu items application-wide or returns 0
if the given menu doesn't exist.

This pops up the given menu at the given co-ordinates. The co-ordinates
are relative to the widget, not the screen. You can use negative
co-ordinates to make a menu appear to the right of or above your theme.

Calling this enables your widget to receive Drop events. In other words,
the user will be able to drag icons from his/her desktop and drop them on
your widget. The "itemDropped" callback is called as a result with the
data about the icon that was dropped on your widget. This allows, for
example, icon bars where items are added to the icon bar by Drag and
Drop.

It is possible to attach a clickarea to a meter (image or text field),
which is moved and resized correctly if the meter is moved or resized.
There is also a callback meterClicked(widget, meter, button) which is
called whenever a meter is clicked (if something is attached to it).
Given an Image or a TextLabel, this call makes it clickable. When a mouse
click is detected, the callback meterClicked is called.
lB, mB, and rB are strings that specify what command is executed when
this meter is clicked with the left mouse button, middle mouse button,
and right mouse button respectively. If given, the appropriate command is
executed when the mouse click is received.
The keyword arguments are all optional. If command is an empty string
nothing is executed.
For now the command given to RightButton has obviosly no effect (because
that brings up the SuperKaramba menu).

Calls a theme - identified by the pretty name - and passes it a string to it.
This will work, despite superkaramba being multithreaded, because it
uses the DBus interface to contact the other theme. If you need to
pass complex arguments (dictionaries, lists etc.) then use the python
"repr" and "eval" functions to marshall and unmarshall the data structure.

This creates a clickable area at x, y with width and height w, h. When
this area is clicked, cmd_to_run will be executed. The mouse will change
to the clickable icon when over this area. For more information on
the difference between createClickArea() and createServiceClickArea,
see the KDE documentation about KService, and the difference
between KRun::run() and KRun::runCommand.

This command simply executes a program or command on the system. This is
just for convience (IE you could accomplish this directly through python,
but sometimes threading problems crop up that way). The only option is a
string containing the command to execute.

This command executes a program or command on the system. Additionally it allows
you to get any text that the program outputs. Futhermore, it won't freeze
up your widget while the command executes.
To use it, call executeInteractive with the reference to your widget and
a list of command options. The array is simply a list that contains the
command as the first entry, and each option as a separate list entry.
Output from the command is returned via the commandOutput callback.
The command returns the process number of the command. This is useful if
you want to run() more than one program at a time. The number will allow
you to figure out which program is outputting in the commandOutput
callback.
Example: Run the command "ls -la *.zip"
myCommand = ["ls", "-la", "*.zip"]
karamba.executeInteractive(widget, myCommand)

Returns the absolute path to the icon. This function respects chosen icon set. In case the icon is not found, the path to "unknown.png" is returned.
Example: getIconByName('txt',32) would return something like "/usr/share/icons/crystalsvg/32x32/mimetypes/txt.png"

Obtains the last data received by any other theme that set the
"incoming data" of this theme. This isn't particularly sophisticated
and could benefit from the data being placed in an FIFO queue instead.

Synopsis:
string getIncomingData(widget)

Arguments:

reference to widget -- karamba

Return Value:
string containing the last information received from setIncomingData()

When a theme is created (with openNamedTheme()), there is an
option to give the theme an alternative name.
This is useful if you open several widgets from the same theme:
you need to give them unique names in order to contact them
(for example, with callTheme() or with setIncomingData()

This function returns a list of services and service groups
that are in the user's KDE Menu. It is not a recursive
function, so if there are submenus (service groups) in the
returned results, you must call getServiceGroups with the
path of the submenu in order to obtain the information in
that submenu.
The return result is complex: it's a list of tuples.
The tuple contains two elements - a 1 if the second element
is a service, and a 0 if it's a service group.
The second element is a dictionary, with keys (if they exist)
of caption, comment, icon, and relpath if it's a service group,
and keys (if they exist) of exec, menuid, name, path, icon,
library, comment, type and genericname.
To fully understand the return results of this function,
it is thoroughly recommended that you look up the
KDE documentation on KServiceGroup and KService.

Opens a new theme, giving it a pretty (alternative and by your
own choice _unique_) name.
If you do not want the theme to be loaded when SuperKaramba is
first started up (but instead want it to only be opened by
this function call) then set is_sub_theme to 1.
Themes opened with openNamedTheme will be unique. If a theme
with the same pretty name already exists, openNamedTheme will
have no effect. If you want duplicate themes (and a bit of a
mess), use openTheme(), instead.

Contacts a theme - identified by the pretty name - and stores a string
to be associated with the remote theme. The difference between
setIncomingData and callTheme() is that the theme is not notified
by setIncomingData that the data has arrived. Previous information,
if any, is overwritten. Use getIncomingData() to retrieve the last
stored information.
setIncomingData is not very sophisticated, and could benefit from
having info passed to it put into a queue, instead of being overwritten.

Returns an array containing the language name abbreviations for the
preferred interface languages user chose for KDE session in Region &
Language settings.
Having the whole array of preferred languages available is important for
cases when you cannot provide interface translation for the 1st preferred
language, but can for consecutive languages.
(Implemented in version 0.42.)

Synopsis:
array userLanguages(widget)

Arguments:

reference to widget -- karamba

Return Value:
list (array) with user languages in the order of preference.

The right click menu of SuperKaramba allows themes
to be loaded, closed, moved to other screens.
Not all themes will want the right click menu.
Call karamba.wantRightButton(widget, 1)
if you want to receive MouseUpdate button notifications.

Synopsis:
boolean wantRightButton(widget, want_receive_right_button)

Arguments:

reference to widget -- karamba

boolean want_receive_right_button -- whether the widget will receive right clicks

This will change the contents of a rich text meter. richText is the
reference to the text object to change that you saved from the
createRichText() call. text is a string containing the new value for the
rich text object.
The differance between Rich Text and a regular text field is that rich
text fields can display HTML code embedded in your text.
In a <a href="command"> ... </a> tag command is executed if the link is
click with the left mouse button.
Except if command starts with an '#' (ie: href="#value" ) the callback
meterClicked is called with value (without the #) as the meter argument.
Also inline images work. Unfortunately currently only when using absolute
paths.

This creates creates a new rich text meter. underlineLinks is a boolean that
determines if html links will be automatically underlined so that the
user knows that the links can be clicked on. You need to save the return
value of this function to call other functions on your rich text field,
such as changeRichText().
The differance between Rich Text and a regular text field is that rich
text fields can display HTML code embedded in your text.
In a <a href="command"> ... </a> tag command is executed if the link is
click with the left mouse button.
Except if command starts with an '#' (ie: href="#value" ) the callback
meterClicked is called with value (without the #) as the meter argument.
Also inline images work. Unfortunately currently only when using absolute
paths.

You can reference richtext in your python code that was created in the
theme file. Basically, you just add a NAME= value to the GRAPH line in
the .theme file. Then if you want to use that object, instead of calling
createRichText, you can call this function.
The name you pass to the function is the same one that you gave it for
the NAME= parameter in the .theme file.

This returns all of the info about a certain starting task in the form of
a list. Widget is a reference to the current widget. task is a
reference to the window you want info about which you obtain by calling
getStartupList().

This returns all of the info about a certain task in the form of a
list. widget is a reference to the current widget. Task is a reference to
the window you want info about which you obtain by calling getTaskList().

Synopsis:
list getTaskInfo(widget, task)

Arguments:

reference to widget -- karamba

reference to task -- task

Return Value:
Here is the format of the returned list by index value:

0 = Task name (The full name of the window)

1 = Icon name

2 = Class name - This is for grouping tasks. All tasks with the same

name can be grouped together because they are instances of the same
program.

This returns a list containing the String names of all open
windows on the system. This is for convience if you want to list open
windows or see if a window by a certain name exists. Anything else
requires the reference to the window you would obtain from getTaskList()

This peforms the given action on a task object. widget is a reference to
the current widget. Task is a reference to a task object you got from
getTaskList(). Action is a number from 1 to 10. See the list below.
Possible actions:

1 = Maximize the window

2 = Restore the window (use on iconified windows)

3 = Iconify the window (minimize it)

4 = Close the window

5 = Activate (give focus to) the window

6 = Raise the window

7 = Lower the window

8 = Smart Focus/Minimize - This will what the KDE taskbar does when you click on a window. If it is iconified, raise it. If it has focus, iconify it.

This will change the color of a text widget (only ones you created
through python currently). textToChange is the reference to the text
object to change that you saved from the createText() call. r, g, b are
ints from 0 to 255 that represent red, green, blue and the alpha channel.

This will change the font of a text widget (only ones you created
through python currently). Text is the reference to the text
object to change that you saved from the createText() call. Font is a
string the the name of the font to use.

This will change the shadow size of a text widget (only ones you
created through python currently). textToChange is the reference to the
text object to change that you saved from the createText() call. size
is the offset of the shadow in pixels. 1 or 2 is a good value in most
cases.

This will change the font size of a text widget (only ones you created
through python currently). text is the reference to the text
object to change that you saved from the createText() call. size is the
new font point size.

You can reference text in your python code that was created in the
theme file. Basically, you just add a NAME= value to the TEXT line in
the .theme file. Then if you want to use that object, instead of calling
createText, you can call this function.
The name you pass to the function is the same one that you gave it for
the NAME= parameter in the .theme file.

This is THE most important function. After you do a bunch of other calls
(moving images, adding images or text, etc), you call this to update the
widget display area. You will not see your changes until you call this.
Redraws all meters.