[ Top ] [ Python API ]
SYNOPSIS
long createWidgetMask(widget, mask)
DESCRIPTION
This function doesn't work currently due to a bug in KDE. Please use MASK= in your .theme file for the time being.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
tuple getWidgetPosition(widget)
DESCRIPTION
Returns a Python Tuple containing the x and y position of you widget. widget is a reference to the current widget.
ARGUMENTS
RETURN VALUE
position of the widget
[ Top ] [ Python API ]
SYNOPSIS
long moveWidget(widget, x, y)
DESCRIPTION
Moves your karamba widget to a new screen location
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long redrawWidget(widget)
DESCRIPTION
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 widget background.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long redrawWidgetBackground(widget)
DESCRIPTION
Redraws widget background.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long resizeWidget(widget, w, h)
DESCRIPTION
Resizes your karamba widget to width=w, height=h
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long toggleWidgetRedraw(widget, b)
DESCRIPTION
Toggles widget redraw.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long changeText(widget, text, value)
DESCRIPTION
This will change the contents of a text widget.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long changeTextColor(widget, text, r, g, b)
DESCRIPTION
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, and blue.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long changeTextFont(widget, text, font)
DESCRIPTION
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.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long changeTextShadow(widget, text, shadow)
DESCRIPTION
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. Get current sensor string
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long changeTextSize(widget, text, size)
DESCRIPTION
This will change the font 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 new font point size.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long createText(widget, x, y, w, h, text)
DESCRIPTION
This creates a text 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 text field, such as changeText()
ARGUMENTS
RETURN VALUE
Pointer to new text meter
[ Top ] [ Python API ]
SYNOPSIS
long deleteText(widget, text)
DESCRIPTION
This removes a text object from memory. Please do not call functions on "text" after calling deleteText, as it does not exist anymore and that could cause crashes in some cases.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
string getTextAlign(widget, text)
DESCRIPTION
Get current text align.
ARGUMENTS
RETURN VALUE
LEFT, CENTER or RIGHT
[ Top ] [ Python API ]
SYNOPSIS
tuple getTextColor(widget, text)
DESCRIPTION
Get current text color
ARGUMENTS
RETURN VALUE
(red, green, blue)
[ Top ] [ Python API ]
SYNOPSIS
string getTextFont(widget, text)
DESCRIPTION
Get current text font name
ARGUMENTS
RETURN VALUE
font name
[ Top ] [ Python API ]
SYNOPSIS
long getTextFontSize(widget, text)
DESCRIPTION
Get current text font size
ARGUMENTS
RETURN VALUE
text font size
[ Top ] [ Python API ]
SYNOPSIS
tuple getTextPos(widget, text)
DESCRIPTION
Given a reference to a text object, this will return a tuple containing the x and y coordinate of a text object.
ARGUMENTS
RETURN VALUE
pos
[ Top ] [ Python API ]
SYNOPSIS
string getTextSensor(widget, text)
DESCRIPTION
Get current sensor string
ARGUMENTS
RETURN VALUE
sensor string
[ Top ] [ Python API ]
SYNOPSIS
long getTextShadow(widget, text)
DESCRIPTION
Get current shadow offset
ARGUMENTS
RETURN VALUE
shadow offset
[ Top ] [ Python API ]
SYNOPSIS
tuple getTextSize(widget, text)
DESCRIPTION
Given a reference to a text object, this will return a tuple containing the height and width of a text object.
ARGUMENTS
RETURN VALUE
size
[ Top ] [ Python API ]
SYNOPSIS
string getTextValue(widget, text)
DESCRIPTION
Returns current text value.
ARGUMENTS
RETURN VALUE
value
[ Top ] [ Python API ]
SYNOPSIS
long getThemeText(widget, name)
DESCRIPTION
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.
ARGUMENTS
RETURN VALUE
Pointer to text
[ Top ] [ Python API ]
SYNOPSIS
long hideText(widget, text)
DESCRIPTION
Hides text that is visible. You need to call redrawWidget() afterwords to actually hide the text on screen.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long moveText(widget, text, x, y)
DESCRIPTION
This moves a text object to a new x, y relative to your widget. In other words, (0,0) is the top corner of your widget, not the screen.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long resizeText(widget, text, w, h)
DESCRIPTION
This will resize text to new height and width.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long setTextAlign(widget, text, align)
DESCRIPTION
Sets text label align.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long setTextSensor(widget, text, sensor)
DESCRIPTION
Get current sensor string
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long showText(widget, text)
DESCRIPTION
Shows text that has been hidden with hideText()
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
list getStartupInfo(widget, task)
DESCRIPTION
This returns all of the info about a certain starting task in the form of a Python 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().
ARGUMENTS
RETURN VALUE
Here is the format of the returned list by index value:
[ Top ] [ Python API ]
SYNOPSIS
list getTaskList(widget)
DESCRIPTION
This returns a Python List object with references to all the current windows that are in the process of loading on this system. You can then call getStartupInfo() on any of the entries in the list.
ARGUMENTS
RETURN VALUE
startup list
[ Top ] [ Python API ]
SYNOPSIS
list getTaskInfo(widget, task)
DESCRIPTION
This returns all of the info about a certain task in the form of a Python 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().
ARGUMENTS
RETURN VALUE
Here is the format of the returned list by index value:
[ Top ] [ Python API ]
SYNOPSIS
list getTaskList(widget)
DESCRIPTION
This returns a Python List object with references to all the current windows open on this system. You can then call performTaskAction() or getTaskInfo() on any of the entries in the list.
ARGUMENTS
RETURN VALUE
Task list
[ Top ] [ Python API ]
SYNOPSIS
list getTaskNames(widget)
DESCRIPTION
This returns a Python 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()
ARGUMENTS
RETURN VALUE
Task list
[ Top ] [ Python API ]
SYNOPSIS
long performTaskAction(widget, task, action)
DESCRIPTION
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:
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long createSystray(widget, x, y, w, h)
DESCRIPTION
??
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long getCurrentWindowCount(widget)
DESCRIPTION
??
ARGUMENTS
RETURN VALUE
window count
[ Top ] [ Python API ]
SYNOPSIS
long hideSystray(widget)
DESCRIPTION
??
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long moveSystray(widget, x, y, w, h)
DESCRIPTION
??
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long showSystray(widget)
DESCRIPTION
??
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long getCurrentWindowCount(widget)
DESCRIPTION
??
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
list getServiceGroups(widget, path)
DESCRIPTION
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.
ARGUMENTS
RETURN VALUE
List of Dictionaries of services and service groups
[ Top ] [ Python API ]
SYNOPSIS
long changeRichText(widget, richtext, value)
DESCRIPTION
This will change the contents of a rich text widget. 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. Unfortunatly currently only when using absolute paths.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long changeRichTextFont(widget, richtext, font)
DESCRIPTION
This will change the font of a richtext widget.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long changeRichTextSize(widget, richtext, size)
DESCRIPTION
This will change the font size of a richtext widget.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long createRichText(widget, text, underlineLinks)
DESCRIPTION
This creates creates a rich text string. 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. Unfortunatly currently only when using absolute paths.
ARGUMENTS
RETURN VALUE
Pointer to new richtext meter
[ Top ] [ Python API ]
SYNOPSIS
long deleteRichText(widget, richtext)
DESCRIPTION
This removes a richt text object from memory. Please do not call functions on "text" after calling deleteRichText, as it does not exist anymore and that could cause crashes in some cases.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
string getRichTextFont(widget, richtext)
DESCRIPTION
This will get the font of a richtext widget.
ARGUMENTS
RETURN VALUE
font name
[ Top ] [ Python API ]
SYNOPSIS
long getRichTextFontSize(widget, richtext)
DESCRIPTION
This will get the font size of a richtext widget.
ARGUMENTS
RETURN VALUE
font point size
[ Top ] [ Python API ]
SYNOPSIS
tuple getRichTextPos(widget, richtext)
DESCRIPTION
Given a reference to a richtext object, this will return a tuple containing the x and y coordinate of a richtext object.
ARGUMENTS
RETURN VALUE
pos
[ Top ] [ Python API ]
SYNOPSIS
string getRichTextSensor(widget, richtext)
DESCRIPTION
Get current sensor string
ARGUMENTS
RETURN VALUE
sensor string
[ Top ] [ Python API ]
SYNOPSIS
tuple getRichTextSize(widget, richtext)
DESCRIPTION
Given a reference to a richtext object, this will return a tuple containing the height and width of a richtext object.
ARGUMENTS
RETURN VALUE
size
[ Top ] [ Python API ]
SYNOPSIS
string getRichTextValue(widget, richtext)
DESCRIPTION
Returns current richtext value.
ARGUMENTS
RETURN VALUE
value
[ Top ] [ Python API ]
SYNOPSIS
long getThemeRichText(widget, name)
DESCRIPTION
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.
ARGUMENTS
RETURN VALUE
Pointer to richtext
[ Top ] [ Python API ]
SYNOPSIS
long hideRichText(widget, richtext)
DESCRIPTION
This hides an richtext. In other words, during subsequent calls to widgetUpdate(), this richtext will not be drawn.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long moveRichText(widget, richtext, x, y)
DESCRIPTION
This moves a text object to a new x, y relative to your widget. In other words, (0,0) is the top corner of your widget, not the screen.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long resizeRichText(widget, richtext, w, h)
DESCRIPTION
This will resize richtext to new height and width.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long setRichTextSensor(widget, richtext, sensor)
DESCRIPTION
Get current sensor string
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long setRichTextWidth(widget, richtext, width)
DESCRIPTION
Given a reference to a rich text object, this function changes it's width to the specified value in pixels.
The height adjusts automatically as the contents are changed with changeRichText.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long showRichText(widget, richtext)
DESCRIPTION
This shows an richtext. In other words, during subsequent calls to widgetUpdate(), this richtext will be drawn.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long acceptDrops(widget)
DESCRIPTION
Calling this enables your widget to receive Drop events. In other words, the user will be able to drag icons from 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.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long attachClickArea(widget, meter, lB, mB, rB)
DESCRIPTION
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).
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long callTheme(widget, theme, info)
DESCRIPTION
Sends a string to the theme identified by the pretty name. If you need to pass complex arguments (dictionaries, lists), use python "repr" and "eval" functions to marshall and unmarshall the data structure. (themeNotify Will be called in the target theme when message is received)
Note: As a bug/feature of SuperKaramba version 0.40, multiple instances of the same theme share global variables. If you want to communicate to other instances of the same theme, just communicate through global variables.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long changeInterval(widget, interval)
DESCRIPTION
Calling this changes your widget's refresh rate (ms)
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long createClickArea(widget, x, y, w, h, cmd_to_run)
DESCRIPTION
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 while hovering over this area.
ARGUMENTS
RETURN VALUE
a handle to the click area
[ Top ] [ Python API ]
SYNOPSIS
long createServiceClickArea(widget, x, y, w, h, name_of_command, cmd_to_run, icon_to_display)
DESCRIPTION
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.
ARGUMENTS
RETURN VALUE
a handle to the click area
[ Top ] [ Python API ]
SYNOPSIS
long execute(command)
DESCRIPTION
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.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long executeInteractive(widget, command)
DESCRIPTION
This command executes a program or command on the system. But 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 an array of command options. The array is simply a list that contains the command as the first entry, and each option as a seperate list entry. Make sure to catch the returning value from executeInteractive(); it will be the identifier (process number) for the command.
Output from the command triggers commandOutput callback. Among other items commandOutput gives the process number of the command that gave the output. This allows you to identify the output when running more than one command at a time.
Example: To run the command "ls -la *.zip"
myCommand = ["ls", "-la", "*.zip"] procID = karamba.executeInteractive(widget, myCommand)
To catch the output, screen commandOutput output for procID.
ARGUMENTS
RETURN VALUE
identification number of the executed command process
[ Top ] [ Python API ]
SYNOPSIS
long getIncomingData(widget)
DESCRIPTION
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.
ARGUMENTS
RETURN VALUE
string containing last information received from setIncomingData
[ Top ] [ Python API ]
SYNOPSIS
string getIp(widget, interface_name)
DESCRIPTION
get current IP address of the interface_name interface.
ARGUMENTS
RETURN VALUE
ip address
[ Top ] [ Python API ]
SYNOPSIS
long getNumberOfDesktop(widget)
DESCRIPTION
Returns number fo desktops
ARGUMENTS
RETURN VALUE
number of desktops
[ Top ] [ Python API ]
SYNOPSIS
string getPrettyThemeName(theme)
DESCRIPTION
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)
ARGUMENTS
RETURN VALUE
the pretty name of the theme
[ Top ] [ Python API ]
SYNOPSIS
string getThemePath(widget)
DESCRIPTION
Returns a string containing the directory where your theme was loaded from. If you are running the theme from (compressed) skz (zip) file, the return value will be the path of that file, including the file name.
ARGUMENTS
RETURN VALUE
path to theme
[ Top ] [ Python API ]
SYNOPSIS
long getUpdateTime(widget)
DESCRIPTION
returns the last stored update time. Intended for use so that the next refresh interval can work out how long ago the mouse was last moved over the widget.
ARGUMENTS
RETURN VALUE
last stored update time (from setUpdateTime)
[ Top ] [ Python API ]
SYNOPSIS
string hide(widget)
DESCRIPTION
hide theme
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
string language(widget)
DESCRIPTION
Returns a string containing default language of a translation file. Please, see userLanguage to obtain the preferred KDE interface language.
ARGUMENTS
RETURN VALUE
default language or empty string if no translation files found.
[ Top ] [ Python API ]
SYNOPSIS
long managementPopup(widget)
DESCRIPTION
There's a management menu for SuperKaramba themes which allows themes to be loaded, closed, moved to other screens. If you want this popup menu to appear, call this function.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long openNamedTheme(theme, pretty_name, is_sub_theme)
DESCRIPTION
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.
ARGUMENTS
RETURN VALUE
a handle to the widget created
[ Top ] [ Python API ]
SYNOPSIS
long openTheme(theme)
DESCRIPTION
Opens new theme.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
string readThemeFile(widget, file)
DESCRIPTION
Returns a string containing the contents of the file.
ARGUMENTS
RETURN VALUE
file contents
[ Top ] [ Python API ]
SYNOPSIS
long reloadTheme(theme)
DESCRIPTION
Reloads current theme.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long removeClickArea(widget, clickarea)
DESCRIPTION
This function deletes a clickable area.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long run(name, command, icon, list_of_args)
DESCRIPTION
This command simply executes a program or command on the system. The difference between run and execute is that run takes arguments, and the name of the icon to be displayed.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long setIncomingData(widget, theme, info)
DESCRIPTION
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.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long getUpdateTime(widget, updated_time)
DESCRIPTION
returns the last stored update time. intended for use so that the next refresh interval can work out how long ago the mouse was last moved over the widget.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
string show(widget)
DESCRIPTION
show theme
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long toggleShowDesktop(widget)
DESCRIPTION
This shows/hides the current desktop just like the Show Desktop button on kicker. Basically, it minimizes all the windows on the current desktop. Call it once to show the desktop and again to hide it.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long translateAll(widget, relative_x, relative_y)
DESCRIPTION
Moves all widgets within a theme in a particular direction relative to the previous spot without moving the parent theme widget.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
string userLanguage(widget)
DESCRIPTION
Returns a string containing the language name abbreviation for the language user chose for the KDE session in Region & Language settings. Implemented in version 0.40. Parse ~/.kde/share/config/kdeglobals for 'Language' directly for earlier clients.
ARGUMENTS
RETURN VALUE
user language or empty string.
[ Top ] [ Python API ]
SYNOPSIS
long wantRightButton(widget, want_receive_right_button)
DESCRIPTION
There's a management menu for SuperKaramba themes which allows themes to be loaded, closed, moved to other screens. Not all themes will want this management interface. call karamba.wantRightButton(widget, 1) if you want to receive MouseUpdate button notifications.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long addMenuItem(widget, menu, text, icon)
DESCRIPTION
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 id of 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.
ARGUMENTS
RETURN VALUE
menu item id
[ Top ] [ Python API ]
SYNOPSIS
long addMenuSeparator(widget, menu)
DESCRIPTION
This adds an menu separator to the given menu.
ARGUMENTS
RETURN VALUE
menu item id
[ Top ] [ Python API ]
SYNOPSIS
long createMenu(widget)
DESCRIPTION
This creates an empty popup menu and returns a pointer to the menu.
ARGUMENTS
RETURN VALUE
pointer to menu
[ Top ] [ Python API ]
SYNOPSIS
long deleteMenu(widget, menu)
DESCRIPTION
This deletes the referenced menu if that menu exists.
ARGUMENTS
RETURN VALUE
1 if menu existed and was deleted, returns 0 otherwise.
[ Top ] [ Python API ]
SYNOPSIS
long popupMenu(widget, menu, x, y)
DESCRIPTION
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.
ARGUMENTS
RETURN VALUE
1 if the menu existed and was popped up, returns 0 otherwise.
[ Top ] [ Python API ]
SYNOPSIS
long removeMenuItem(widget, menu, id)
DESCRIPTION
This removes the item with given id from given menu if that menu exists.
ARGUMENTS
RETURN VALUE
1 if the menu item existed and was removed or returns zero otherwise.
[ Top ] [ Python API ]
SYNOPSIS
long changeInputBox(widget, inputBox, value)
DESCRIPTION
This will change the contents of a input box widget.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long changeInputBoxBackgroundColor(widget, inputBox, r, g, b)
DESCRIPTION
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, and blue.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long changeInputBoxFont(widget, inputBox, font)
DESCRIPTION
This will change the font of a Input Box widget. InputBox is the reference to the Input Box object to change. Font is a string the the name of the font to use.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long changeInputBoxFontColor(widget, inputBox, r, g, b)
DESCRIPTION
This will change the color of a text 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, and blue.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long changeInputBoxFontSize(widget, text, size)
DESCRIPTION
This will change the font size of a Input Box widget. InputBox is the reference to the text object to change. Size is the new font point size.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long changeInputBoxFrameColor(widget, inputBox, r, g, b)
DESCRIPTION
This will change the frame 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, and blue.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long changeInputBoxSelectedTextColor(widget, inputBox, r, g, b)
DESCRIPTION
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, and blue.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long changeInputBoxSelectionColor(widget, inputBox, r, g, b)
DESCRIPTION
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, and blue.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long clearInputFocus(widget, inputBox)
DESCRIPTION
releases the Input Focus from the Input Box
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long createInputBox(widget, x, y, w, h, text)
DESCRIPTION
This creates a 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.
ARGUMENTS
RETURN VALUE
Pointer to new Input Box
[ Top ] [ Python API ]
SYNOPSIS
long deleteInputBox(widget, inputBox)
DESCRIPTION
This removes a Input Box object from memory. 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.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
tuple getInputBoxBackgroundColor(widget, inputBox)
DESCRIPTION
Get current background color of a Input Box
ARGUMENTS
RETURN VALUE
(red, green, blue)
[ Top ] [ Python API ]
SYNOPSIS
string getInputBoxFont(widget, inputBox)
DESCRIPTION
Get current Input Box font name
ARGUMENTS
RETURN VALUE
font name
[ Top ] [ Python API ]
SYNOPSIS
tuple getInputBoxFontColor(widget, inputBox)
DESCRIPTION
Get current text color of a Input Box
ARGUMENTS
RETURN VALUE
(red, green, blue)
[ Top ] [ Python API ]
SYNOPSIS
long getInputBoxFontSize(widget, inputBox)
DESCRIPTION
Get current text font size
ARGUMENTS
RETURN VALUE
text font size
[ Top ] [ Python API ]
SYNOPSIS
tuple getInputBoxFrameColor(widget, inputBox)
DESCRIPTION
Get current frame color of a Input Box
ARGUMENTS
RETURN VALUE
(red, green, blue)
[ Top ] [ Python API ]
SYNOPSIS
tuple getInputBoxPos(widget, inputBox)
DESCRIPTION
Given a reference to a Input Box object, this will return a tuple containing the x and y coordinate of a Input Box object.
ARGUMENTS
RETURN VALUE
pos
[ Top ] [ Python API ]
SYNOPSIS
tuple getInputBoxSelectedTextColor(widget, inputBox)
DESCRIPTION
Get current selected text color of a Input Box
ARGUMENTS
RETURN VALUE
(red, green, blue)
[ Top ] [ Python API ]
SYNOPSIS
tuple getInputBoxSelectionColor(widget, inputBox)
DESCRIPTION
Get current selection color of a Input Box
ARGUMENTS
RETURN VALUE
(red, green, blue)
[ Top ] [ Python API ]
SYNOPSIS
tuple getInputBoxSize(widget, inputBox)
DESCRIPTION
Given a reference to a Input Box object, this will return a tuple containing the height and width of a Input Box object.
ARGUMENTS
RETURN VALUE
size
[ Top ] [ Python API ]
SYNOPSIS
string getInputBoxValue(widget, inputBox)
DESCRIPTION
Returns current Input Box text.
ARGUMENTS
RETURN VALUE
value
[ Top ] [ Python API ]
SYNOPSIS
long getInputFocus(widget)
DESCRIPTION
Get the Input Box currently focused
ARGUMENTS
RETURN VALUE
the input box or 0
[ Top ] [ Python API ]
SYNOPSIS
long getThemeInputBox(widget, name)
DESCRIPTION
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.
ARGUMENTS
RETURN VALUE
Pointer to Input Box
[ Top ] [ Python API ]
SYNOPSIS
long hideInputBox(widget, inputBox)
DESCRIPTION
Hides a Input Box that is visible.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long moveInputBox(widget, inputBox, x, y)
DESCRIPTION
This moves a Input Box object to a new x, y relative to your widget. In other words, (0,0) is the top corner of your widget, not the screen.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long resizeInputBox(widget, inputBox, w, h)
DESCRIPTION
This will resize Input Box to new height and width.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long setInputFocus(widget, inputBox)
DESCRIPTION
Sets the Input Focus to the Input Box
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long showInputBox(widget, inputBox)
DESCRIPTION
Shows Input Box that has been hidden with hideInputBox()
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long addImageTooltip(widget, image, text)
DESCRIPTION
This creats a tooltip for image with tooltip_text.
Note:
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long changeImageChannelIntensity(widget, image, ratio, channel, millisec)
DESCRIPTION
Changes the "intensity" of the image color channel, which is similar to it's brightness.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long changeImageIntensity(widget, image, ratio, millisec)
DESCRIPTION
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.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long changeImageToGray(widget, image, millisec)
DESCRIPTION
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.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long createBackgroundImage(widget, x, y, w, h, image)
DESCRIPTION
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()
ARGUMENTS
RETURN VALUE
Pointer to new image meter
[ Top ] [ Python API ]
SYNOPSIS
long createImage(widget, x, y, image)
DESCRIPTION
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()
ARGUMENTS
RETURN VALUE
Pointer to new image meter
[ Top ] [ Python API ]
SYNOPSIS
long createTaskIcon(widget, x, y, ctask)
DESCRIPTION
This creates a task image at x,y.
ARGUMENTS
RETURN VALUE
Pointer to new image meter
[ Top ] [ Python API ]
SYNOPSIS
long deleteImage(widget, image)
DESCRIPTION
This removes image from memory. Please do not call functions on "image" after calling deleteImage, as it does not exist anymore and that could cause crashes in some cases.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long getImageSize(widget, image)
DESCRIPTION
This returns the height of an image. This is useful if you have rotated an image and its size changed, so you do not know how big it is anymore.
ARGUMENTS
RETURN VALUE
height
[ Top ] [ Python API ]
SYNOPSIS
string getImagePath(widget, image)
DESCRIPTION
Returns current image path.
ARGUMENTS
RETURN VALUE
path
[ Top ] [ Python API ]
SYNOPSIS
tuple getImagePos(widget, image)
DESCRIPTION
Given a reference to a image object, this will return a tuple containing the x and y coordinate of a image object.
ARGUMENTS
RETURN VALUE
pos
[ Top ] [ Python API ]
SYNOPSIS
string getImageSensor(widget, image)
DESCRIPTION
Get current sensor string
ARGUMENTS
RETURN VALUE
sensor string
[ Top ] [ Python API ]
SYNOPSIS
tuple getImageSize(widget, image)
DESCRIPTION
Given a reference to a image object, this will return a tuple containing the height and width of a image object.
ARGUMENTS
RETURN VALUE
size
[ Top ] [ Python API ]
SYNOPSIS
long getImageSize(widget, image)
DESCRIPTION
This returns the width of an image. This is useful if you have rotated an image and its size changed, so you do not know how big it is anymore. // ARGUMENTS * long widget -- karamba * long image -- pointer to image
RETURN VALUE
width
[ Top ] [ Python API ]
SYNOPSIS
long getThemeImage(widget, name)
DESCRIPTION
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.
ARGUMENTS
RETURN VALUE
Pointer to image
[ Top ] [ Python API ]
SYNOPSIS
long hideImage(widget, image)
DESCRIPTION
This hides an image. In other words, during subsequent calls to widgetUpdate(), this image will not be drawn.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long moveImage(widget, image, x, y)
DESCRIPTION
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()
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long removeImageEffects(widget, image)
DESCRIPTION
If you have called image effect commands on your image (ex: changeImageIntensity), you can call this to restore your image to it's original form.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long removeImageTransformations(widget, image)
DESCRIPTION
If you have rotated or resized your image, you can call this to restore your image to it's original form.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long resizeImage(widget, image, w, h)
DESCRIPTION
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()
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long resizeImageSmooth(widget, image, w, h)
DESCRIPTION
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()
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long rotateImage(widget, image, deg)
DESCRIPTION
This rotates your image to by the specified amount of degrees. The imageToRotate parameter is a reference to an image that you saved as the return value from createImage()
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long setImagePath(widget, image, path)
DESCRIPTION
This will change image of a image widget.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long setImageSensor(widget, image, sensor)
DESCRIPTION
Get current sensor string
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long showImage(widget, image)
DESCRIPTION
This shows a previously hidden image. It does not actually refresh the image on screen. That is what redrawWidget() does.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long createGraph(widget, x, y, w, h, points)
DESCRIPTION
This creates a graph at x,y with width and height w,h.
ARGUMENTS
RETURN VALUE
Pointer to new graph meter
[ Top ] [ Python API ]
SYNOPSIS
long deleteGraph(widget, graph)
DESCRIPTION
This deletes graph.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
tuple getGraphColor(widget, graph)
DESCRIPTION
Get current graph color
ARGUMENTS
RETURN VALUE
(red, green, blue)
[ Top ] [ Python API ]
SYNOPSIS
tuple getGraphMinMax(widget, graph)
DESCRIPTION
Returns current graph value.
ARGUMENTS
RETURN VALUE
min & max
[ Top ] [ Python API ]
SYNOPSIS
tuple getGraphPos(widget, graph)
DESCRIPTION
Given a reference to a graph object, this will return a tuple containing the x and y coordinate of a graph object.
ARGUMENTS
RETURN VALUE
pos
[ Top ] [ Python API ]
SYNOPSIS
string getGraphSensor(widget, graph)
DESCRIPTION
Get current sensor string
ARGUMENTS
RETURN VALUE
sensor string
[ Top ] [ Python API ]
SYNOPSIS
tuple getGraphSize(widget, graph)
DESCRIPTION
Given a reference to a graph object, this will return a tuple containing the height and width of a graph object.
ARGUMENTS
RETURN VALUE
size
[ Top ] [ Python API ]
SYNOPSIS
long getGraphValue(widget, graph)
DESCRIPTION
Returns current graph value.
ARGUMENTS
RETURN VALUE
value
[ Top ] [ Python API ]
SYNOPSIS
long getThemeGraph(widget, name)
DESCRIPTION
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.
ARGUMENTS
RETURN VALUE
Pointer to graph
[ Top ] [ Python API ]
SYNOPSIS
long hideGraph(widget, graph)
DESCRIPTION
This hides an graph. In other words, during subsequent calls to widgetUpdate(), this graph will not be drawn.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long moveGraph(widget, graph, x, y)
DESCRIPTION
This will move graph to new x and y coordinates.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long resizeGraph(widget, graph, w, h)
DESCRIPTION
This will resize graph to new height and width.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
tuple setGraphColor(widget, graph, red, green, blue)
DESCRIPTION
Set current graph color
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long setGraphMinMax(widget, graph, min, max)
DESCRIPTION
Returns current graph value.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long setGraphSensor(widget, graph, sensor)
DESCRIPTION
Get current sensor string
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long setGraphValue(widget, graph, value)
DESCRIPTION
Sets current graph value.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long showGraph(widget, graph)
DESCRIPTION
This shows an graph. In other words, during subsequent calls to widgetUpdate(), this graph will be drawn.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long addMenuConfigOption(widget, key, name)
DESCRIPTION
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 entrys 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")
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
string|long readConfigEntry(widget, key, value)
DESCRIPTION
This function reads an entry from the config file with the given key.
ARGUMENTS
RETURN VALUE
config value for key
[ Top ] [ Python API ]
SYNOPSIS
long readMenuConfigOption(widget, key)
DESCRIPTION
This returns whether or not the given option is checked in the theme's Configure Theme menu.
See addMenuConfigOption for a more detailed explanation.
ARGUMENTS
RETURN VALUE
0 is returned if it is not checked and 1 is returned if it is.
[ Top ] [ Python API ]
SYNOPSIS
long setMenuConfigOption(widget, key, value)
DESCRIPTION
This sets whether or not the given option is checked in the theme's Configure Theme menu. Value should be 0 if key should not be checked and 1 if key should be checked.
See addMenuConfigOption for a more detailed explanation.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long writeConfigEntry(widget, key, value)
DESCRIPTION
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")
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long createBar(widget, x, y, w, h, image)
DESCRIPTION
This creates a bar at x,y with width and height w,h.
ARGUMENTS
RETURN VALUE
Pointer to new bar meter
[ Top ] [ Python API ]
SYNOPSIS
long deleteBar(widget, bar)
DESCRIPTION
This deletes bar.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
string getBarImage(widget, bar)
DESCRIPTION
Get bar image
ARGUMENTS
RETURN VALUE
path to bar image
[ Top ] [ Python API ]
SYNOPSIS
tuple getBarMinMax(widget, bar)
DESCRIPTION
Returns current bar value.
ARGUMENTS
RETURN VALUE
min & max
[ Top ] [ Python API ]
SYNOPSIS
tuple getBarPos(widget, bar)
DESCRIPTION
Given a reference to a bar object, this will return a tuple containing the x and y coordinate of a bar object.
ARGUMENTS
RETURN VALUE
pos
[ Top ] [ Python API ]
SYNOPSIS
string getBarSensor(widget, bar)
DESCRIPTION
Get current sensor string
ARGUMENTS
RETURN VALUE
sensor string
[ Top ] [ Python API ]
SYNOPSIS
tuple getBarSize(widget, bar)
DESCRIPTION
Given a reference to a bar object, this will return a tuple containing the height and width of a bar object.
ARGUMENTS
RETURN VALUE
size
[ Top ] [ Python API ]
SYNOPSIS
long getBarValue(widget, bar)
DESCRIPTION
Returns current bar value.
ARGUMENTS
RETURN VALUE
value
[ Top ] [ Python API ]
SYNOPSIS
string getBarVertical(widget, bar)
DESCRIPTION
Check if bar is vertical bar
ARGUMENTS
RETURN VALUE
1 if vertical
[ Top ] [ Python API ]
SYNOPSIS
long getThemeBar(widget, name)
DESCRIPTION
You can reference 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.
ARGUMENTS
RETURN VALUE
Pointer to bar
[ Top ] [ Python API ]
SYNOPSIS
long hideBar(widget, bar)
DESCRIPTION
This hides an bar. In other words, during subsequent calls to widgetUpdate(), this bar will not be drawn.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long moveBar(widget, bar, x, y)
DESCRIPTION
This will move bar to new x and y coordinates.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long resizeBar(widget, bar, w, h)
DESCRIPTION
This will resize bar to new height and width.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long setBarImage(widget, bar, image)
DESCRIPTION
Get bar image
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long setBarMinMax(widget, bar, min, max)
DESCRIPTION
Returns current bar value.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long setBarSensor(widget, bar, sensor)
DESCRIPTION
Get current sensor string
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long setBarValue(widget, bar, value)
DESCRIPTION
Sets current bar value.
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long setBarVertical(widget, bar)
DESCRIPTION
Set bar vertical
ARGUMENTS
RETURN VALUE
1 if successful
[ Top ] [ Python API ]
SYNOPSIS
long showBar(widget, bar)
DESCRIPTION
This shows an bar. In other words, during subsequent calls to widgetUpdate(), this bar will be drawn.
ARGUMENTS
RETURN VALUE
1 if successful