summaryrefslogtreecommitdiffstats
path: root/superkaramba/examples
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit2bda8f7717adf28da4af0d34fb82f63d2868c31d (patch)
tree8d927b7b47a90c4adb646482a52613f58acd6f8c /superkaramba/examples
downloadtdeutils-2bda8f7717adf28da4af0d34fb82f63d2868c31d.tar.gz
tdeutils-2bda8f7717adf28da4af0d34fb82f63d2868c31d.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'superkaramba/examples')
-rw-r--r--superkaramba/examples/API6
-rw-r--r--superkaramba/examples/README62
-rw-r--r--superkaramba/examples/api.html4016
-rw-r--r--superkaramba/examples/autoHide/main.py62
-rw-r--r--superkaramba/examples/autoHide/main.theme42
-rw-r--r--superkaramba/examples/autoHide/pics/MSN-64x64.pngbin0 -> 6178 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/MSN-96x96.pngbin0 -> 11529 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/Tux_House-64x64.pngbin0 -> 4485 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/Tux_House-96x96.pngbin0 -> 7462 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/Tux_Mail-64x64.pngbin0 -> 8572 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/Tux_Mail-96x96.pngbin0 -> 15942 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/Tux_Mozilla-64x64.pngbin0 -> 7373 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/Tux_Mozilla-96x96.pngbin0 -> 13570 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/Tux_Sherlock-64x64.pngbin0 -> 5635 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/Tux_Sherlock-96x96.pngbin0 -> 10369 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/Tux_Terminal-64x64.pngbin0 -> 3489 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/Tux_Terminal-96x96.pngbin0 -> 5985 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/Tux_iPhoto-64x64.pngbin0 -> 8036 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/Tux_iPhoto-96x96.pngbin0 -> 14876 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/bar3.pngbin0 -> 393 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/bar4.pngbin0 -> 310 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/calendar.pngbin0 -> 1950 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/ctrl center-64x64.pngbin0 -> 5582 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/ctrl center-96x96.pngbin0 -> 9770 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/iconbarback.pngbin0 -> 2475 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/label3.pngbin0 -> 300 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/label4.pngbin0 -> 256 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/osxbarback.pngbin0 -> 6463 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/osxbarbackBig.pngbin0 -> 6473 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/pointer.pngbin0 -> 309 bytes
-rw-r--r--superkaramba/examples/bar/bar.py93
-rw-r--r--superkaramba/examples/bar/bar.theme26
-rw-r--r--superkaramba/examples/bar/hor.pngbin0 -> 300 bytes
-rw-r--r--superkaramba/examples/bar/ver.pngbin0 -> 321 bytes
-rw-r--r--superkaramba/examples/change_interval/interval.py60
-rw-r--r--superkaramba/examples/change_interval/interval.theme2
-rw-r--r--superkaramba/examples/control_management/mgmt.py49
-rw-r--r--superkaramba/examples/control_management/mgmt.theme1
-rw-r--r--superkaramba/examples/disableRightClickMenu/disable_menu.py176
-rw-r--r--superkaramba/examples/disableRightClickMenu/disable_menu.theme1
-rw-r--r--superkaramba/examples/globalMouse/README29
-rw-r--r--superkaramba/examples/globalMouse/extension/setup.py12
-rw-r--r--superkaramba/examples/globalMouse/extension/xcursor.c104
-rw-r--r--superkaramba/examples/globalMouse/eyes.py192
-rw-r--r--superkaramba/examples/globalMouse/eyes.theme3
-rw-r--r--superkaramba/examples/globalMouse/pics/eyes.pngbin0 -> 2819 bytes
-rw-r--r--superkaramba/examples/globalMouse/pics/eyes.xcfbin0 -> 18677 bytes
-rw-r--r--superkaramba/examples/globalMouse/pics/mask.pngbin0 -> 495 bytes
-rw-r--r--superkaramba/examples/globalMouse/pics/pupille.pngbin0 -> 256 bytes
-rwxr-xr-xsuperkaramba/examples/globalMouse/xcursor.sobin0 -> 7465 bytes
-rw-r--r--superkaramba/examples/graph/graph.py89
-rw-r--r--superkaramba/examples/graph/graph.theme26
-rw-r--r--superkaramba/examples/image/flag.pngbin0 -> 1072 bytes
-rw-r--r--superkaramba/examples/image/flag2.pngbin0 -> 2130 bytes
-rw-r--r--superkaramba/examples/image/image.py121
-rw-r--r--superkaramba/examples/image/image.theme34
-rwxr-xr-xsuperkaramba/examples/image/test1.sh2
-rwxr-xr-xsuperkaramba/examples/image/test2.sh2
-rw-r--r--superkaramba/examples/input_api/input_api.py185
-rw-r--r--superkaramba/examples/input_api/input_api.theme5
-rw-r--r--superkaramba/examples/input_example/input_example.py169
-rw-r--r--superkaramba/examples/input_example/input_example.theme5
-rw-r--r--superkaramba/examples/mouseDrag/karmix/images/bar.pngbin0 -> 207 bytes
-rw-r--r--superkaramba/examples/mouseDrag/karmix/images/bg.pngbin0 -> 4719 bytes
-rw-r--r--superkaramba/examples/mouseDrag/karmix/karmix.py190
-rw-r--r--superkaramba/examples/mouseDrag/karmix/karmix.theme17
-rw-r--r--superkaramba/examples/mouseDrop/mousedrop.py138
-rw-r--r--superkaramba/examples/mouseDrop/mousedrop.theme5
-rw-r--r--superkaramba/examples/openCloseTheme/1.py22
-rw-r--r--superkaramba/examples/openCloseTheme/1.theme2
-rw-r--r--superkaramba/examples/openCloseTheme/2.theme2
-rw-r--r--superkaramba/examples/popupMenu/calendar.pngbin0 -> 1950 bytes
-rw-r--r--superkaramba/examples/popupMenu/popupMenu.pngbin0 -> 6221 bytes
-rw-r--r--superkaramba/examples/popupMenu/popupMenu.py117
-rw-r--r--superkaramba/examples/popupMenu/popupMenu.theme4
-rw-r--r--superkaramba/examples/richtext/info.pngbin0 -> 641 bytes
-rw-r--r--superkaramba/examples/richtext/penguin_executive.pngbin0 -> 5159 bytes
-rw-r--r--superkaramba/examples/richtext/richtext.py136
-rw-r--r--superkaramba/examples/richtext/richtext.theme1
-rw-r--r--superkaramba/examples/richtext/rtext.py99
-rw-r--r--superkaramba/examples/richtext/rtext.theme26
-rw-r--r--superkaramba/examples/service_group/service_group.py143
-rw-r--r--superkaramba/examples/service_group/service_group.theme4
-rw-r--r--superkaramba/examples/setIncomingData/1.py27
-rw-r--r--superkaramba/examples/setIncomingData/1.theme2
-rw-r--r--superkaramba/examples/setIncomingData/2.py78
-rw-r--r--superkaramba/examples/setIncomingData/2.theme2
-rw-r--r--superkaramba/examples/taskBar/cleanbar/README25
-rw-r--r--superkaramba/examples/taskBar/cleanbar/cleanbar.py267
-rw-r--r--superkaramba/examples/taskBar/cleanbar/cleanbar.theme14
-rw-r--r--superkaramba/examples/taskBar/cleanbar/pics/bar2.pngbin0 -> 7508 bytes
-rw-r--r--superkaramba/examples/taskBar/cleanbar/pics/rightend.pngbin0 -> 434 bytes
-rw-r--r--superkaramba/examples/taskBar/cleanbar/pics/rightend_new.pngbin0 -> 5267 bytes
-rw-r--r--superkaramba/examples/taskBar/cleanbar/pics/slickbar.pngbin0 -> 3130 bytes
-rw-r--r--superkaramba/examples/taskBar/cleanbar/pics/startup.pngbin0 -> 2584 bytes
-rw-r--r--superkaramba/examples/taskBar/cleanbar/pics/task.pngbin0 -> 429 bytes
-rw-r--r--superkaramba/examples/taskBar/cleanbar/pics/task_new.pngbin0 -> 2470 bytes
-rw-r--r--superkaramba/examples/template.py160
-rwxr-xr-xsuperkaramba/examples/test_all.sh27
-rw-r--r--superkaramba/examples/text/text.py110
-rw-r--r--superkaramba/examples/text/text.theme35
-rw-r--r--superkaramba/examples/unicode/unicode.py116
-rw-r--r--superkaramba/examples/unicode/unicode.theme1
103 files changed, 7344 insertions, 0 deletions
diff --git a/superkaramba/examples/API b/superkaramba/examples/API
new file mode 100644
index 0000000..897e4d2
--- /dev/null
+++ b/superkaramba/examples/API
@@ -0,0 +1,6 @@
+All of the programmers reference material has been moved to the web site.
+
+It is at:
+
+http://netdragon.sourceforge.net/index.php?page=Information+for+Theme+Creators
+
diff --git a/superkaramba/examples/README b/superkaramba/examples/README
new file mode 100644
index 0000000..712cf0e
--- /dev/null
+++ b/superkaramba/examples/README
@@ -0,0 +1,62 @@
+All of the information for programmers is in the file called "API".
+
+Here are some examples of themes with matching python addons:
+
+autoHide/
+
+ This is the main.theme from kde-look.org with a simple
+ example python script that makes it "auto-hide".
+ Move the mouse over it to pop it back out.
+
+globalMouse/
+
+ This shows how to get the mouse cursor position anyway on
+ the screen but using the xcursor python module.
+ (This is Karamba Eyes by Wilfried.Huss@gmx.at)
+
+input_api/
+
+ This shows some of the different things you can do to an input box
+ once you have one created.
+
+input_example/
+
+ This is a functional example of how you grab text entered into an
+ input box and use it to do something. In this example, the text
+ is used to search for the entered word on dict.leo.org.
+ (This sample was contributed by Alex Wiedenbruch <mail@wiedenbruch.de>)
+
+mouseDrag/
+
+ This shows how to use mouse dragging in the callback widgetMouseMoved
+ in your themes.
+ (This is karmix by Tian and rewritten by Ryan Nickell)
+
+openCloseTheme/
+
+ This shows how you can open a new theme from within an existing theme,
+ and how you can close themes.
+
+popupMenu/
+
+ This shows up to create popup menus, display them, and then
+ do something with the user input from them.
+ (This is a sample by MrDobalina <r6_junk@sympatico.ca>)
+
+richtext/
+
+ This is a simple example of how to use rich text (text with HTML
+ tags) in your themes.
+ (This is by Wilfried.Huss@gmx.at)
+
+taskBar/
+
+ This shows how to use the task management API to create a
+ simple taskbar.
+ (This is cleanbar by Adam Geitgey)
+
+unicode/
+
+ This is a simple example of how to display unicode characters in your
+ theme.
+ (This is by Wilfried.Huss@gmx.at)
diff --git a/superkaramba/examples/api.html b/superkaramba/examples/api.html
new file mode 100644
index 0000000..132544a
--- /dev/null
+++ b/superkaramba/examples/api.html
@@ -0,0 +1,4016 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<html>
+<head>
+<link rel="stylesheet" href="./python_api.css" type="text/css">
+<title>./python_api</title>
+<!-- Source: ./../../src/ -->
+<!-- Generated with ROBODoc Version 4.99.6 (Oct 10 2004) -->
+<!-- ROBODoc (c) 1994-2004 by Frans Slothouber and Jacco van Weert. -->
+</head>
+<body bgcolor="#FFFFFF">
+<a name="robo_top_of_doc">Generated</a> with <a href="http://sourceforge.net/projects/robodoc/">ROBODoc</a> v4.99.6 on Mon Nov 15 21:51:28 2004
+<br />
+<h3 align="center">TABLE OF CONTENTS</h3>
+<ul>
+<li><a href="#robo0">Bar/createBar</a></li>
+<li><a href="#robo1">Bar/deleteBar</a></li>
+<li><a href="#robo2">Bar/getBarImage</a></li>
+<li><a href="#robo3">Bar/getBarMinMax</a></li>
+<li><a href="#robo4">Bar/getBarPos</a></li>
+<li><a href="#robo5">Bar/getBarSensor</a></li>
+<li><a href="#robo6">Bar/getBarSize</a></li>
+<li><a href="#robo7">Bar/getBarValue</a></li>
+<li><a href="#robo8">Bar/getBarVertical</a></li>
+<li><a href="#robo9">Bar/getThemeBar</a></li>
+<li><a href="#robo10">Bar/hideBar</a></li>
+<li><a href="#robo11">Bar/moveBar</a></li>
+<li><a href="#robo12">Bar/resizeBar</a></li>
+<li><a href="#robo13">Bar/setBarImage</a></li>
+<li><a href="#robo14">Bar/setBarMinMax</a></li>
+<li><a href="#robo15">Bar/setBarSensor</a></li>
+<li><a href="#robo16">Bar/setBarValue</a></li>
+<li><a href="#robo17">Bar/setBarVertical</a></li>
+<li><a href="#robo18">Bar/showBar</a></li>
+<li><a href="#robo19">Config/addMenuConfigOption</a></li>
+<li><a href="#robo20">Config/readConfigEntry</a></li>
+<li><a href="#robo21">Config/readMenuConfigOption</a></li>
+<li><a href="#robo22">Config/setMenuConfigOption</a></li>
+<li><a href="#robo23">Config/writeConfigEntry</a></li>
+<li><a href="#robo24">Graph/createGraph</a></li>
+<li><a href="#robo25">Graph/deleteGraph</a></li>
+<li><a href="#robo26">Graph/getGraphColor</a></li>
+<li><a href="#robo27">Graph/getGraphMinMax</a></li>
+<li><a href="#robo28">Graph/getGraphPos</a></li>
+<li><a href="#robo29">Graph/getGraphSensor</a></li>
+<li><a href="#robo30">Graph/getGraphSize</a></li>
+<li><a href="#robo31">Graph/getGraphValue</a></li>
+<li><a href="#robo32">Graph/getThemeGraph</a></li>
+<li><a href="#robo33">Graph/hideGraph</a></li>
+<li><a href="#robo34">Graph/moveGraph</a></li>
+<li><a href="#robo35">Graph/resizeGraph</a></li>
+<li><a href="#robo36">Graph/setGraphColor</a></li>
+<li><a href="#robo37">Graph/setGraphMinMax</a></li>
+<li><a href="#robo38">Graph/setGraphSensor</a></li>
+<li><a href="#robo39">Graph/setGraphValue</a></li>
+<li><a href="#robo40">Graph/showGraph</a></li>
+<li><a href="#robo41">Image/addImageTooltip</a></li>
+<li><a href="#robo42">Image/changeImageChannelIntensity</a></li>
+<li><a href="#robo43">Image/changeImageIntensity</a></li>
+<li><a href="#robo44">Image/changeImageToGray</a></li>
+<li><a href="#robo45">Image/createBackgroundImage</a></li>
+<li><a href="#robo46">Image/createImage</a></li>
+<li><a href="#robo47">Image/createTaskIcon</a></li>
+<li><a href="#robo48">Image/deleteImage</a></li>
+<li><a href="#robo49">Image/getImageHeight</a></li>
+<li><a href="#robo50">Image/getImagePath</a></li>
+<li><a href="#robo51">Image/getImagePos</a></li>
+<li><a href="#robo52">Image/getImageSensor</a></li>
+<li><a href="#robo53">Image/getImageSize</a></li>
+<li><a href="#robo54">Image/getImageWidth</a></li>
+<li><a href="#robo55">Image/getThemeImage</a></li>
+<li><a href="#robo56">Image/hideImage</a></li>
+<li><a href="#robo57">Image/moveImage</a></li>
+<li><a href="#robo58">Image/removeImageEffects</a></li>
+<li><a href="#robo59">Image/removeImageTransformations</a></li>
+<li><a href="#robo60">Image/resizeImage</a></li>
+<li><a href="#robo61">Image/resizeImageSmooth</a></li>
+<li><a href="#robo62">Image/rotateImage</a></li>
+<li><a href="#robo63">Image/setImagePath</a></li>
+<li><a href="#robo64">Image/setImageSensor</a></li>
+<li><a href="#robo65">Image/showImage</a></li>
+<li><a href="#robo66">Menu/addMenuItem</a></li>
+<li><a href="#robo67">Menu/addMenuSeparator</a></li>
+<li><a href="#robo68">Menu/createMenu</a></li>
+<li><a href="#robo69">Menu/deleteMenu</a></li>
+<li><a href="#robo70">Menu/popupMenu</a></li>
+<li><a href="#robo71">Menu/removeMenuItem</a></li>
+<li><a href="#robo72">Misc/acceptDrops</a></li>
+<li><a href="#robo73">Misc/attachClickArea</a></li>
+<li><a href="#robo74">Misc/createClickArea</a></li>
+<li><a href="#robo75">Misc/execute</a></li>
+<li><a href="#robo76">Misc/executeInteractive</a></li>
+<li><a href="#robo77">Misc/getIp</a></li>
+<li><a href="#robo78">Misc/getNumberOfDesktop</a></li>
+<li><a href="#robo79">Misc/getThemePath</a></li>
+<li><a href="#robo80">Misc/hide</a></li>
+<li><a href="#robo81">Misc/openTheme</a></li>
+<li><a href="#robo82">Misc/show</a></li>
+<li><a href="#robo83">Misc/toggleShowDesktop</a></li>
+<li><a href="#robo84">Misc/translateAll</a></li>
+<li><a href="#robo85">RichText/changeRichText</a></li>
+<li><a href="#robo86">RichText/changeRichTextFont</a></li>
+<li><a href="#robo87">RichText/changeRichTextSize</a></li>
+<li><a href="#robo88">RichText/createRichText</a></li>
+<li><a href="#robo89">RichText/deleteRichText</a></li>
+<li><a href="#robo90">RichText/getRichTextFont</a></li>
+<li><a href="#robo91">RichText/getRichTextFontSize</a></li>
+<li><a href="#robo92">RichText/getRichTextPos</a></li>
+<li><a href="#robo93">RichText/getRichTextSensor</a></li>
+<li><a href="#robo94">RichText/getRichTextSize</a></li>
+<li><a href="#robo95">RichText/getRichTextValue</a></li>
+<li><a href="#robo96">RichText/getThemeRichText</a></li>
+<li><a href="#robo97">RichText/hideRichText</a></li>
+<li><a href="#robo98">RichText/moveRichText</a></li>
+<li><a href="#robo99">RichText/resizeRichText</a></li>
+<li><a href="#robo100">RichText/setRichTextSensor</a></li>
+<li><a href="#robo101">RichText/setRichTextWidth</a></li>
+<li><a href="#robo102">RichText/showRichText</a></li>
+<li><a href="#robo103">Systray/createSystray</a></li>
+<li><a href="#robo104">Systray/getCurrentWindowCount</a></li>
+<li><a href="#robo105">Systray/hideSystray</a></li>
+<li><a href="#robo106">Systray/moveSystray</a></li>
+<li><a href="#robo107">Systray/showSystray</a></li>
+<li><a href="#robo108">Systray/updateSystrayLayout</a></li>
+<li><a href="#robo109">Task/getStartupInfo</a></li>
+<li><a href="#robo110">Task/getStartupList</a></li>
+<li><a href="#robo111">Task/getTaskInfo</a></li>
+<li><a href="#robo112">Task/getTaskList</a></li>
+<li><a href="#robo113">Task/getTaskNames</a></li>
+<li><a href="#robo114">Task/performTaskAction</a></li>
+<li><a href="#robo115">Text/changeText</a></li>
+<li><a href="#robo116">Text/changeTextColor</a></li>
+<li><a href="#robo117">Text/changeTextFont</a></li>
+<li><a href="#robo118">Text/changeTextShadow</a></li>
+<li><a href="#robo119">Text/changeTextSize</a></li>
+<li><a href="#robo120">Text/createText</a></li>
+<li><a href="#robo121">Text/deleteText</a></li>
+<li><a href="#robo122">Text/getTextAlign</a></li>
+<li><a href="#robo123">Text/getTextColor</a></li>
+<li><a href="#robo124">Text/getTextFont</a></li>
+<li><a href="#robo125">Text/getTextFontSize</a></li>
+<li><a href="#robo126">Text/getTextPos</a></li>
+<li><a href="#robo127">Text/getTextSensor</a></li>
+<li><a href="#robo128">Text/getTextShadow</a></li>
+<li><a href="#robo129">Text/getTextSize</a></li>
+<li><a href="#robo130">Text/getTextValue</a></li>
+<li><a href="#robo131">Text/getThemeText</a></li>
+<li><a href="#robo132">Text/hideText</a></li>
+<li><a href="#robo133">Text/moveText</a></li>
+<li><a href="#robo134">Text/resizeText</a></li>
+<li><a href="#robo135">Text/setTextAlign</a></li>
+<li><a href="#robo136">Text/setTextSensor</a></li>
+<li><a href="#robo137">Text/showText</a></li>
+<li><a href="#robo138">Widget/createWidgetMask</a></li>
+<li><a href="#robo139">Widget/getWidgetPosition</a></li>
+<li><a href="#robo140">Widget/moveWidget</a></li>
+<li><a href="#robo141">Widget/redrawWidget</a></li>
+<li><a href="#robo142">Widget/redrawWidgetBackground</a></li>
+<li><a href="#robo143">Widget/resizeWidget</a></li>
+<li><a href="#robo144">Widget/toggleWidgetRedraw</a></li>
+</ul>
+<hr />
+
+<h2><a name="robo138"><a name="Widget2fcreateWidgetMask">
+Widget/createWidgetMask</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>createWidgetMask</strong>(widget, mask)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This function doesn't work currently due to a bug in KDE. Please use
+ MASK= in your .theme file for the time being.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> string mask -- The name of the widget mask file.
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo139"><a name="Widget2fgetWidgetPosition">
+Widget/getWidgetPosition</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> tuple <strong>getWidgetPosition</strong>(widget)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Returns a Python Tuple containing the x and y position of you widget.
+ widget is a reference to the current widget.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> position of the widget
+</p>
+</span>
+<hr />
+
+<h2><a name="robo140"><a name="Widget2fmoveWidget">
+Widget/moveWidget</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>moveWidget</strong>(widget, x, y)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Moves your karamba widget to a new screen location
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long x -- x coordinate
+</li>
+<li> long y -- y coordinate
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo141"><a name="Widget2fredrawWidget">
+Widget/redrawWidget</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>redrawWidget</strong>(widget)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo142"><a name="Widget2fredrawWidgetBackground">
+Widget/redrawWidgetBackground</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>redrawWidgetBackground</strong>(widget)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Redraws widget background.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo143"><a name="Widget2fresizeWidget">
+Widget/resizeWidget</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>resizeWidget</strong>(widget, w, h)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Resizes your karamba widget to width=w, height=h
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long w -- width
+</li>
+<li> long h -- height
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo144"><a name="Widget2ftoggleWidgetRedraw">
+Widget/toggleWidgetRedraw</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>toggleWidgetRedraw</strong>(widget, b)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Toggles widget redraw.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long b -- 1 = widget is drawn
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo115"><a name="Text2fchangeText">
+Text/changeText</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>changeText</strong>(widget, text, value)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This will change the contents of a text widget.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long text -- pointer to text
+</li>
+<li> long value -- new value
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo116"><a name="Text2fchangeTextColor">
+Text/changeTextColor</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>changeTextColor</strong>(widget, text, r, g, b)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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 <a href="#robo120">createText</a>() call. r, g, b are
+ ints from 0 to 255 that represent red, green, and blue.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long text -- pointer to text
+</li>
+<li> long red -- red component of color
+</li>
+<li> long green -- green component of color
+</li>
+<li> long blue -- blue component of color
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo117"><a name="Text2fchangeTextFont">
+Text/changeTextFont</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>changeTextFont</strong>(widget, text, font)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This will change the font 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 <a href="#robo120">createText</a>() call. newFont is a
+ string the the name of the font to use.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long text -- pointer to text
+</li>
+<li> string font -- font name
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo118"><a name="Text2fchangeTextShadow">
+Text/changeTextShadow</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>changeTextShadow</strong>(widget, text, shadow)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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 <a href="#robo120">createText</a>() call. size
+ is the offset of the shadow in pixels. 1 or 2 is a good value in most
+ cases. Get current sensor string
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long text -- pointer to text
+</li>
+<li> long shadow -- shadow offset
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo119"><a name="Text2fchangeTextSize">
+Text/changeTextSize</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>changeTextSize</strong>(widget, text, size)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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 <a href="#robo120">createText</a>() call. size is the
+ new font point size.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long text -- pointer to text
+</li>
+<li> long size -- new size for text
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo120"><a name="Text2fcreateText">
+Text/createText</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>createText</strong>(widget, x, y, w, h, text)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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 <a href="#robo115">changeText</a>()
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long x -- x coordinate
+</li>
+<li> long y -- y coordinate
+</li>
+<li> long w -- width
+</li>
+<li> long h -- height
+</li>
+<li> string text -- text for the textlabel
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> Pointer to new text meter
+</p>
+</span>
+<hr />
+
+<h2><a name="robo121"><a name="Text2fdeleteText">
+Text/deleteText</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>deleteText</strong>(widget, text)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This removes a text object from memory. Please do not call functions on
+ "text" after calling <strong>deleteText</strong>, as it does not exist anymore and that
+ could cause crashes in some cases.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long widget -- text
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo122"><a name="Text2fgetTextAlign">
+Text/getTextAlign</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> string <strong>getTextAlign</strong>(widget, text)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Get current text align.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long text -- pointer to text
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> LEFT, CENTER or RIGHT
+</p>
+</span>
+<hr />
+
+<h2><a name="robo123"><a name="Text2fgetTextColor">
+Text/getTextColor</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> tuple <strong>getTextColor</strong>(widget, text)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Get current text color
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long text -- pointer to text
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> (red, green, blue)
+</p>
+</span>
+<hr />
+
+<h2><a name="robo124"><a name="Text2fgetTextFont">
+Text/getTextFont</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> string <strong>getTextFont</strong>(widget, text)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Get current text font name
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long text -- pointer to text
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> font name
+</p>
+</span>
+<hr />
+
+<h2><a name="robo125"><a name="Text2fgetTextFontSize">
+Text/getTextFontSize</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>getTextFontSize</strong>(widget, text)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Get current text font size
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long text -- pointer to text
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> text font size
+</p>
+</span>
+<hr />
+
+<h2><a name="robo126"><a name="Text2fgetTextPos">
+Text/getTextPos</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> tuple <strong>getTextPos</strong>(widget, text)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Given a reference to a text object, this will return a tuple
+ containing the x and y coordinate of a text object.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long text -- pointer to text
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> pos
+</p>
+</span>
+<hr />
+
+<h2><a name="robo127"><a name="Text2fgetTextSensor">
+Text/getTextSensor</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> string <strong>getTextSensor</strong>(widget, text)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Get current sensor string
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long text -- pointer to text
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> sensor string
+</p>
+</span>
+<hr />
+
+<h2><a name="robo128"><a name="Text2fgetTextShadow">
+Text/getTextShadow</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>getTextShadow</strong>(widget, text)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Get current shadow offset
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long text -- pointer to text
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> shadow offset
+</p>
+</span>
+<hr />
+
+<h2><a name="robo129"><a name="Text2fgetTextSize">
+Text/getTextSize</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> tuple <strong>getTextSize</strong>(widget, text)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Given a reference to a text object, this will return a tuple
+ containing the height and width of a text object.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long text -- pointer to text
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> size
+</p>
+</span>
+<hr />
+
+<h2><a name="robo130"><a name="Text2fgetTextValue">
+Text/getTextValue</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> string <strong>getTextValue</strong>(widget, text)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Returns current text value.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long text -- pointer to text
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> value
+</p>
+</span>
+<hr />
+
+<h2><a name="robo131"><a name="Text2fgetThemeText">
+Text/getThemeText</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>getThemeText</strong>(widget, name)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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
+ <a href="#robo120">createText</a>, you can call this function.
+</p>
+
+<p> The name you pass to the function is the same one that you gave it for
+ the NAME= parameter in the .theme file.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> string name -- name of the text to get
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> Pointer to text
+</p>
+</span>
+<hr />
+
+<h2><a name="robo132"><a name="Text2fhideText">
+Text/hideText</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>hideText</strong>(widget, text)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Hides text that is visible. You need to call <a href="#robo141">redrawWidget</a>() afterwords
+ to actually <a href="#robo80">hide</a> the text on screen.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long text -- pointer to text
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo133"><a name="Text2fmoveText">
+Text/moveText</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>moveText</strong>(widget, text, x, y)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long text -- pointer to text
+</li>
+<li> long x -- x coordinate
+</li>
+<li> long y -- y coordinate
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo134"><a name="Text2fresizeText">
+Text/resizeText</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>resizeText</strong>(widget, text, w, h)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This will resize text to new height and width.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long text -- pointer to text
+</li>
+<li> long w -- new width
+</li>
+<li> long h -- new height
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo135"><a name="Text2fsetTextAlign">
+Text/setTextAlign</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>setTextAlign</strong>(widget, text, align)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Sets text label align.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long text -- pointer to text
+</li>
+<li> string align -- LEFT, CENTER or RIGHT
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo136"><a name="Text2fsetTextSensor">
+Text/setTextSensor</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>setTextSensor</strong>(widget, text, sensor)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Get current sensor string
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long text -- pointer to text
+</li>
+<li> string sensor -- new sensor as in theme files
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo137"><a name="Text2fshowText">
+Text/showText</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>showText</strong>(widget, text)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Shows text that has been hidden with <a href="#robo132">hideText</a>()
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long text -- pointer to text
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo109"><a name="Task2fgetStartupInfo">
+Task/getStartupInfo</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> list <strong>getStartupInfo</strong>(widget, task)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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
+ <a href="#robo110">getStartupList</a>().
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long task -- pointer to task
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> Here is the format of the returned list by index value:
+</p>
+<ul><li> 0 = Task name (The full name of the window)
+</li>
+<li> 1 = Icon name
+</li>
+<li> 2 = Executable name
+</li>
+<li> 3 = A reference back to the task you got info on
+</li>
+</ul>
+<p></p>
+</span>
+<hr />
+
+<h2><a name="robo110"><a name="Task2fgetStartupList">
+Task/getStartupList</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> list <a href="#robo112">getTaskList</a>(widget)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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 <a href="#robo109">getStartupInfo</a>() on any of the entries in the list.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> startup list
+</p>
+</span>
+<hr />
+
+<h2><a name="robo111"><a name="Task2fgetTaskInfo">
+Task/getTaskInfo</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> list <strong>getTaskInfo</strong>(widget, task)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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 <a href="#robo112">getTaskList</a>().
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long task -- pointer to task
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> Here is the format of the returned list by index value:
+</p>
+<ul><li> 0 = Task name (The full name of the window)
+</li>
+<li> 1 = Icon name
+</li>
+<li> 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.
+</li>
+<li> 3 = Desktop number - The desktop number this window is on
+</li>
+<li> 4 = Is this window maximized? 0=no, 1=yes
+</li>
+<li> 5 = Is this window iconified (minimized)? 0=no, 1=yes
+</li>
+<li> 6 = Is this window shaded (rolled up)? 0=no, 1=yes
+</li>
+<li> 7 = Is this window focused? 0=no, 1=yes
+</li>
+<li> 8 = A reference back to the task you got info on
+</li>
+</ul>
+<p></p>
+</span>
+<hr />
+
+<h2><a name="robo112"><a name="Task2fgetTaskList">
+Task/getTaskList</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> list <strong>getTaskList</strong>(widget)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This returns a Python List object with references to all the current
+ windows open on this system. You can then call <a href="#robo114">performTaskAction</a>() or
+ <a href="#robo111">getTaskInfo</a>() on any of the entries in the list.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> Task list
+</p>
+</span>
+<hr />
+
+<h2><a name="robo113"><a name="Task2fgetTaskNames">
+Task/getTaskNames</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> list <strong>getTaskNames</strong>(widget)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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 <a href="#robo112">getTaskList</a>()
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> Task list
+</p>
+</span>
+<hr />
+
+<h2><a name="robo114"><a name="Task2fperformTaskAction">
+Task/performTaskAction</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>performTaskAction</strong>(widget, task, action)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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
+ <a href="#robo112">getTaskList</a>(). Action is a number from 1 to 10. See the list below.
+</p>
+
+<p> Possible actions:
+</p>
+<ul><li> 1 = Maximize the window
+</li>
+<li> 2 = Restore the window (use on iconified windows)
+</li>
+<li> 3 = Iconify the window (minimize it)
+</li>
+<li> 4 = Close the window
+</li>
+<li> 5 = Activate (give focus to) the window
+</li>
+<li> 6 = Raise the window
+</li>
+<li> 7 = Lower the window
+</li>
+<li> 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.
+</li>
+<li> 9 = Toggle whether this window is always on top
+</li>
+<li> 10 = Toggle wheter this window is shaded (rolled up)
+</li>
+</ul>
+<p></p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long task -- pointer to task
+</li>
+<li> long action -- action number
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo103"><a name="Systray2fcreateSystray">
+Systray/createSystray</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>createSystray</strong>(widget, x, y, w, h)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> ??
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long x -- x coordinate
+</li>
+<li> long y -- y coordinate
+</li>
+<li> long w -- width
+</li>
+<li> long h -- height
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo104"><a name="Systray2fgetCurrentWindowCount">
+Systray/getCurrentWindowCount</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>getCurrentWindowCount</strong>(widget)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> ??
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> window count
+</p>
+</span>
+<hr />
+
+<h2><a name="robo105"><a name="Systray2fhideSystray">
+Systray/hideSystray</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>hideSystray</strong>(widget)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> ??
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo106"><a name="Systray2fmoveSystray">
+Systray/moveSystray</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>moveSystray</strong>(widget, x, y, w, h)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> ??
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long x -- x coordinate
+</li>
+<li> long y -- y coordinate
+</li>
+<li> long w -- width
+</li>
+<li> long h -- height
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo107"><a name="Systray2fshowSystray">
+Systray/showSystray</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>showSystray</strong>(widget)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> ??
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo108"><a name="Systray2fupdateSystrayLayout">
+Systray/updateSystrayLayout</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <a href="#robo104">getCurrentWindowCount</a>(widget)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> ??
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo85"><a name="RichText2fchangeRichText">
+RichText/changeRichText</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>changeRichText</strong>(widget, richtext, value)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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
+ <a href="#robo88">createRichText</a>() call. text is a string containing the new value for the
+ rich text object.
+</p>
+
+<p> The differance between Rich Text and a regular text field is that rich
+ text fields can display HTML code embedded in your text.
+</p>
+
+<p> In a &lt;a href="command"&gt; ... &lt;/a&gt; tag command is executed if the link is
+ click with the left mouse button.
+</p>
+
+<p> Except if command starts with an '#' (ie: href="#value" ) the callback
+ meterClicked is called with value (without the #) as the meter argument.
+</p>
+
+<p> Also inline images work. Unfortunatly currently only when using absolute
+ paths.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long richtext -- pointer to richtext
+</li>
+<li> string value -- new text
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo86"><a name="RichText2fchangeRichTextFont">
+RichText/changeRichTextFont</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>changeRichTextFont</strong>(widget, richtext, font)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This will change the font of a richtext widget.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long richtext -- pointer to richtext
+</li>
+<li> string font -- name of the new font
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo87"><a name="RichText2fchangeRichTextSize">
+RichText/changeRichTextSize</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>changeRichTextSize</strong>(widget, richtext, size)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This will change the font size of a richtext widget.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long richtext -- pointer to richtext
+</li>
+<li> long size -- new font point size
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo88"><a name="RichText2fcreateRichText">
+RichText/createRichText</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>createRichText</strong>(widget, text, underlineLinks)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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 <a href="#robo85">changeRichText</a>().
+</p>
+
+<p> The differance between Rich Text and a regular text field is that rich
+ text fields can display HTML code embedded in your text.
+</p>
+
+<p> In a &lt;a href="command"&gt; ... &lt;/a&gt; tag command is executed if the link is
+ click with the left mouse button.
+</p>
+
+<p> Except if command starts with an '#' (ie: href="#value" ) the callback
+ meterClicked is called with value (without the #) as the meter argument.
+</p>
+
+<p> Also inline images work. Unfortunatly currently only when using absolute
+ paths.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> string text -- text for richtext
+</li>
+<li> long underlineLinks -- should the links be underlined
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> Pointer to new richtext meter
+</p>
+</span>
+<hr />
+
+<h2><a name="robo89"><a name="RichText2fdeleteRichText">
+RichText/deleteRichText</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>deleteRichText</strong>(widget, richtext)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This removes a richt text object from memory. Please do not call
+ functions on "text" after calling <strong>deleteRichText</strong>, as it does not exist
+ anymore and that could cause crashes in some cases.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long widget -- richtext
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo90"><a name="RichText2fgetRichTextFont">
+RichText/getRichTextFont</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> string <strong>getRichTextFont</strong>(widget, richtext)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This will get the font of a richtext widget.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long richtext -- pointer to richtext
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> font name
+</p>
+</span>
+<hr />
+
+<h2><a name="robo91"><a name="RichText2fgetRichTextFontSize">
+RichText/getRichTextFontSize</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>getRichTextFontSize</strong>(widget, richtext)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This will get the font size of a richtext widget.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long richtext -- pointer to richtext
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> font point size
+</p>
+</span>
+<hr />
+
+<h2><a name="robo92"><a name="RichText2fgetRichTextPos">
+RichText/getRichTextPos</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> tuple <strong>getRichTextPos</strong>(widget, richtext)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Given a reference to a richtext object, this will return a tuple
+ containing the x and y coordinate of a richtext object.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long richtext -- pointer to richtext
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> pos
+</p>
+</span>
+<hr />
+
+<h2><a name="robo93"><a name="RichText2fgetRichTextSensor">
+RichText/getRichTextSensor</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> string <strong>getRichTextSensor</strong>(widget, richtext)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Get current sensor string
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long richtext -- pointer to richtext
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> sensor string
+</p>
+</span>
+<hr />
+
+<h2><a name="robo94"><a name="RichText2fgetRichTextSize">
+RichText/getRichTextSize</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> tuple <strong>getRichTextSize</strong>(widget, richtext)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Given a reference to a richtext object, this will return a tuple
+ containing the height and width of a richtext object.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long richtext -- pointer to richtext
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> size
+</p>
+</span>
+<hr />
+
+<h2><a name="robo95"><a name="RichText2fgetRichTextValue">
+RichText/getRichTextValue</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> string <strong>getRichTextValue</strong>(widget, richtext)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Returns current richtext value.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long richtext -- pointer to richtext
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> value
+</p>
+</span>
+<hr />
+
+<h2><a name="robo96"><a name="RichText2fgetThemeRichText">
+RichText/getThemeRichText</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>getThemeRichText</strong>(widget, name)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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
+ <a href="#robo88">createRichText</a>, you can call this function.
+</p>
+
+<p> The name you pass to the function is the same one that you gave it for
+ the NAME= parameter in the .theme file.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> string name -- name of the richtext to get
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> Pointer to richtext
+</p>
+</span>
+<hr />
+
+<h2><a name="robo97"><a name="RichText2fhideRichText">
+RichText/hideRichText</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>hideRichText</strong>(widget, richtext)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This hides an richtext. In other words, during subsequent calls to
+ widgetUpdate(), this richtext will not be drawn.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long richtext -- pointer to richtext
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo98"><a name="RichText2fmoveRichText">
+RichText/moveRichText</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>moveRichText</strong>(widget, richtext, x, y)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long richtext -- pointer to richtext
+</li>
+<li> long x -- x coordinate
+</li>
+<li> long y -- y coordinate
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo99"><a name="RichText2fresizeRichText">
+RichText/resizeRichText</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>resizeRichText</strong>(widget, richtext, w, h)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This will resize richtext to new height and width.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long richtext -- pointer to richtext
+</li>
+<li> long w -- new width
+</li>
+<li> long h -- new height
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo100"><a name="RichText2fsetRichTextSensor">
+RichText/setRichTextSensor</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>setRichTextSensor</strong>(widget, richtext, sensor)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Get current sensor string
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long richtext -- pointer to richtext
+</li>
+<li> string sensor -- new sensor as in theme files
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo101"><a name="RichText2fsetRichTextWidth">
+RichText/setRichTextWidth</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>setRichTextWidth</strong>(widget, richtext, width)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Given a reference to a rich text object, this function changes it's width
+ to the specified value in pixels.
+</p>
+
+<p> The height adjusts automatically as the contents are changed with
+ <a href="#robo85">changeRichText</a>.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long richtext -- pointer to richtext
+</li>
+<li> long width -- new width in pixels
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo102"><a name="RichText2fshowRichText">
+RichText/showRichText</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>showRichText</strong>(widget, richtext)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This shows an richtext. In other words, during subsequent calls to
+ widgetUpdate(), this richtext will be drawn.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long richtext -- pointer to richtext
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo72"><a name="Misc2facceptDrops">
+Misc/acceptDrops</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>acceptDrops</strong>(widget)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo73"><a name="Misc2fattachClickArea">
+Misc/attachClickArea</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>attachClickArea</strong>(widget, meter, lB, mB, rB)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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.
+</p>
+
+<p> 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.
+</p>
+
+<p> 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.
+</p>
+
+<p> The keyword arguments are all optional. If command is an empty string
+ nothing is executed.
+</p>
+
+<p> For now the command given to RightButton has obviosly no effect (because
+ that brings up the SuperKaramba menu).
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long meter -- pointer to meter
+</li>
+<li> string lB -- command to left mouse button
+</li>
+<li> string mB -- command to middle mouse button
+</li>
+<li> string rB -- command to right mouse button
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo74"><a name="Misc2fcreateClickArea">
+Misc/createClickArea</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>createClickArea</strong>(widget, x, y, w, h, cmd_to_run)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long x -- x coordinate
+</li>
+<li> long y -- y coordinate
+</li>
+<li> long w -- width
+</li>
+<li> long h -- height
+</li>
+<li> string cmd_to_run -- command to be run
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo75"><a name="Misc2fexecute">
+Misc/execute</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>execute</strong>(widget, command)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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 <strong>execute</strong>.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> string command -- command to <strong>execute</strong>
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo76"><a name="Misc2fexecuteInteractive">
+Misc/executeInteractive</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>executeInteractive</strong>(widget, command)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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.
+</p>
+
+<p> To use it, call <strong>executeInteractive</strong> 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 seperate list entry.
+ Output from the command is returned via the commandOutput callback.
+</p>
+
+<p> 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.
+</p>
+
+<p> Example: Run the command "ls -la *.zip"
+</p>
+
+<p> myCommand = ["ls", "-la", "*.zip"]
+ karamba.<strong>executeInteractive</strong>(widget, myCommand)
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> string command -- command to <a href="#robo75">execute</a>
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo77"><a name="Misc2fgetIp">
+Misc/getIp</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> string <strong>getIp</strong>(widget, interface_name)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> get current IP address of the interface_name interface.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> string interface_name -- name of the interface to get ip
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> ip address
+</p>
+</span>
+<hr />
+
+<h2><a name="robo78"><a name="Misc2fgetNumberOfDesktop">
+Misc/getNumberOfDesktop</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>getNumberOfDesktop</strong>(widget)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Returns number fo desktops
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> number of desktops
+</p>
+</span>
+<hr />
+
+<h2><a name="robo79"><a name="Misc2fgetThemePath">
+Misc/getThemePath</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> string <strong>getThemePath</strong>(widget)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Returns a string containing the directory where your theme was loaded
+ from.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> path to theme
+</p>
+</span>
+<hr />
+
+<h2><a name="robo80"><a name="Misc2fhide">
+Misc/hide</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> string <strong>hide</strong>(widget)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> <strong>hide</strong> theme
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo81"><a name="Misc2fopenTheme">
+Misc/openTheme</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>openTheme</strong>(theme)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Opens new theme.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> string theme -- path to new theme
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo82"><a name="Misc2fshow">
+Misc/show</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> string <strong>show</strong>(widget)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> <strong>show</strong> theme
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo83"><a name="Misc2ftoggleShowDesktop">
+Misc/toggleShowDesktop</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>toggleShowDesktop</strong>(widget)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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 <a href="#robo82">show</a> the desktop and again to <a href="#robo80">hide</a> it.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo84"><a name="Misc2ftranslateAll">
+Misc/translateAll</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>translateAll</strong>(widget, relative_x, relative_y)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Moves all widgets within a theme in a particular direction relative from
+ the previous spot without moving the parent theme widget.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long translate_x -- move horizontally
+</li>
+<li> long translate_y -- move vertically
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo66"><a name="Menu2faddMenuItem">
+Menu/addMenuItem</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>addMenuItem</strong>(widget, menu, text, icon)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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.
+</p>
+
+<p> 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.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long menu -- pointer to menu
+</li>
+<li> string text -- text for menu item
+</li>
+<li> string icon -- icon
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> menu item id
+</p>
+</span>
+<hr />
+
+<h2><a name="robo67"><a name="Menu2faddMenuSeparator">
+Menu/addMenuSeparator</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>addMenuSeparator</strong>(widget, menu)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This adds an menu separator to the given menu.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long menu -- pointer to menu
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> menu item id
+</p>
+</span>
+<hr />
+
+<h2><a name="robo68"><a name="Menu2fcreateMenu">
+Menu/createMenu</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>createMenu</strong>(widget)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This creates an empty popup menu and returns a pointer to the menu.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> pointer to menu
+</p>
+</span>
+<hr />
+
+<h2><a name="robo69"><a name="Menu2fdeleteMenu">
+Menu/deleteMenu</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>deleteMenu</strong>(widget, menu)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This deletes the referenced menu if that menu exists.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long menu -- pointer to menu
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if menu existed and was deleted, returns 0 otherwise.
+</p>
+</span>
+<hr />
+
+<h2><a name="robo70"><a name="Menu2fpopupMenu">
+Menu/popupMenu</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>popupMenu</strong>(widget, menu, x, y)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long menu -- pointer to menu
+</li>
+<li> long x -- x coordinate
+</li>
+<li> long y -- y coordinate
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if the menu existed and was popped up, returns 0 otherwise.
+</p>
+</span>
+<hr />
+
+<h2><a name="robo71"><a name="Menu2fremoveMenuItem">
+Menu/removeMenuItem</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>removeMenuItem</strong>(widget, menu, id)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This removes the item with given id from given menu if that menu exists.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long menu -- pointer to menu
+</li>
+<li> long id -- menu item id
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if the menu item existed and was removed or returns zero otherwise.
+</p>
+</span>
+<hr />
+
+<h2><a name="robo41"><a name="Image2faddImageTooltip">
+Image/addImageTooltip</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>addImageTooltip</strong>(widget, image, text)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This creats a tooltip for image with tooltip_text.
+</p>
+
+<p> Note:
+</p>
+<ul><li> If you move the image, the tooltip does not move! It stays! Do not
+ create a tooltip if the image is off-screen because you will not be
+ able to ever see it.
+</li>
+</ul>
+<p></p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long image -- pointer to image
+</li>
+<li> string text -- tooltip text
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo42"><a name="Image2fchangeImageChannelIntensity">
+Image/changeImageChannelIntensity</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>changeImageChannelIntensity</strong>(widget, image, ratio, channel, millisec)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Changes the "intensity" of the image color channel, which is similar to
+ it's brightness.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long image -- pointer to image
+</li>
+<li> float ratio -- -1.0 to 1.0 (dark to bright)
+</li>
+<li> string channel -- color channel (red|green|blue)
+</li>
+<li> long millisec -- milliseconds before the image is restored
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo43"><a name="Image2fchangeImageIntensity">
+Image/changeImageIntensity</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>changeImageIntensity</strong>(widget, image, ratio, millisec)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long image -- pointer to image
+</li>
+<li> float ratio -- -1.0 to 1.0 (dark to bright)
+</li>
+<li> long millisec -- milliseconds before the image is restored
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo44"><a name="Image2fchangeImageToGray">
+Image/changeImageToGray</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>changeImageToGray</strong>(widget, image, millisec)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long image -- pointer to image
+</li>
+<li> long millisec -- milliseconds before the image is restored
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo45"><a name="Image2fcreateBackgroundImage">
+Image/createBackgroundImage</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>createBackgroundImage</strong>(widget, x, y, w, h, image)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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 <a href="#robo57">moveImage</a>()
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long x -- x coordinate
+</li>
+<li> long y -- y coordinate
+</li>
+<li> string image -- image for the imagelabel
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> Pointer to new image meter
+</p>
+</span>
+<hr />
+
+<h2><a name="robo46"><a name="Image2fcreateImage">
+Image/createImage</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>createImage</strong>(widget, x, y, image)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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 <a href="#robo57">moveImage</a>()
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long x -- x coordinate
+</li>
+<li> long y -- y coordinate
+</li>
+<li> string image -- image for the imagelabel
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> Pointer to new image meter
+</p>
+</span>
+<hr />
+
+<h2><a name="robo47"><a name="Image2fcreateTaskIcon">
+Image/createTaskIcon</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>createTaskIcon</strong>(widget, x, y, ctask)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This creates a task image at x,y.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long x -- x coordinate
+</li>
+<li> long y -- y coordinate
+</li>
+<li> long task -- task
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> Pointer to new image meter
+</p>
+</span>
+<hr />
+
+<h2><a name="robo48"><a name="Image2fdeleteImage">
+Image/deleteImage</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>deleteImage</strong>(widget, image)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This removes image from memory. Please do not call functions on "image"
+ after calling <strong>deleteImage</strong>, as it does not exist anymore and that could
+ cause crashes in some cases.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long widget -- image
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo49"><a name="Image2fgetImageHeight">
+Image/getImageHeight</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <a href="#robo53">getImageSize</a>(widget, image)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long image -- pointer to image
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> height
+</p>
+</span>
+<hr />
+
+<h2><a name="robo50"><a name="Image2fgetImagePath">
+Image/getImagePath</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> string <strong>getImagePath</strong>(widget, image)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Returns current image path.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long image -- pointer to image
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> path
+</p>
+</span>
+<hr />
+
+<h2><a name="robo51"><a name="Image2fgetImagePos">
+Image/getImagePos</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> tuple <strong>getImagePos</strong>(widget, image)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Given a reference to a image object, this will return a tuple
+ containing the x and y coordinate of a image object.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long image -- pointer to image
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> pos
+</p>
+</span>
+<hr />
+
+<h2><a name="robo52"><a name="Image2fgetImageSensor">
+Image/getImageSensor</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> string <strong>getImageSensor</strong>(widget, image)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Get current sensor string
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long image -- pointer to image
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> sensor string
+</p>
+</span>
+<hr />
+
+<h2><a name="robo53"><a name="Image2fgetImageSize">
+Image/getImageSize</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> tuple <strong>getImageSize</strong>(widget, image)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Given a reference to a image object, this will return a tuple
+ containing the height and width of a image object.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long image -- pointer to image
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> size
+</p>
+</span>
+<hr />
+
+<h2><a name="robo54"><a name="Image2fgetImageWidth">
+Image/getImageWidth</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <a href="#robo53">getImageSize</a>(widget, image)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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
+</p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> width
+</p>
+</span>
+<hr />
+
+<h2><a name="robo55"><a name="Image2fgetThemeImage">
+Image/getThemeImage</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>getThemeImage</strong>(widget, name)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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
+ <a href="#robo46">createImage</a>, you can call this function.
+</p>
+
+<p> The name you pass to the function is the same one that you gave it for
+ the NAME= parameter in the .theme file.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> string name -- name of the image to get
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> Pointer to image
+</p>
+</span>
+<hr />
+
+<h2><a name="robo56"><a name="Image2fhideImage">
+Image/hideImage</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>hideImage</strong>(widget, image)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This hides an image. In other words, during subsequent calls to
+ widgetUpdate(), this image will not be drawn.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long image -- pointer to image
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo57"><a name="Image2fmoveImage">
+Image/moveImage</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>moveImage</strong>(widget, image, x, y)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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 <a href="#robo46">createImage</a>()
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long image -- pointer to image
+</li>
+<li> long x -- x coordinate
+</li>
+<li> long y -- y coordinate
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo58"><a name="Image2fremoveImageEffects">
+Image/removeImageEffects</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>removeImageEffects</strong>(widget, image)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> If you have called image effect commands on your image (ex:
+ <a href="#robo43">changeImageIntensity</a>), you can call this to restore your image to it's
+ original form.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long image -- pointer to image
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo59"><a name="Image2fremoveImageTransformations">
+Image/removeImageTransformations</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>removeImageTransformations</strong>(widget, image)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> If you have rotated or resized your image, you can call this to restore
+ your image to it's original form.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long image -- pointer to image
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo60"><a name="Image2fresizeImage">
+Image/resizeImage</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>resizeImage</strong>(widget, image, w, h)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This resizes your image to width, height. The imageToResize parameter is
+ a reference to an image that you saved as the return value from
+ <a href="#robo46">createImage</a>()
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long image -- pointer to image
+</li>
+<li> long w -- width
+</li>
+<li> long h -- height
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo61"><a name="Image2fresizeImageSmooth">
+Image/resizeImageSmooth</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>resizeImageSmooth</strong>(widget, image, w, h)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> DEPRECATED: <a href="#robo60">resizeImage</a> 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 <a href="#robo46">createImage</a>()
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long image -- pointer to image
+</li>
+<li> long w -- width
+</li>
+<li> long h -- height
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo62"><a name="Image2frotateImage">
+Image/rotateImage</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>rotateImage</strong>(widget, image, deg)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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 <a href="#robo46">createImage</a>()
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long image -- pointer to image
+</li>
+<li> long deg -- degrees to rotate
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo63"><a name="Image2fsetImagePath">
+Image/setImagePath</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>setImagePath</strong>(widget, image, path)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This will change image of a image widget.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long image -- pointer to image
+</li>
+<li> long path -- new path
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo64"><a name="Image2fsetImageSensor">
+Image/setImageSensor</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>setImageSensor</strong>(widget, image, sensor)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Get current sensor string
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long image -- pointer to image
+</li>
+<li> string sensor -- new sensor as in theme files
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo65"><a name="Image2fshowImage">
+Image/showImage</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>showImage</strong>(widget, image)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This shows a previously hidden image. It does not actually refresh the
+ image on screen. That is what <a href="#robo141">redrawWidget</a>() does.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long image -- pointer to image
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo24"><a name="Graph2fcreateGraph">
+Graph/createGraph</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>createGraph</strong>(widget, x, y, w, h, points)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This creates a graph at x,y with width and height w,h.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long x -- x coordinate
+</li>
+<li> long y -- y coordinate
+</li>
+<li> long w -- width
+</li>
+<li> long h -- height
+</li>
+<li> long points -- Number of points in graph
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> Pointer to new graph meter
+</p>
+</span>
+<hr />
+
+<h2><a name="robo25"><a name="Graph2fdeleteGraph">
+Graph/deleteGraph</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>deleteGraph</strong>(widget, graph)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This deletes graph.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long widget -- graph
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo26"><a name="Graph2fgetGraphColor">
+Graph/getGraphColor</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> tuple <strong>getGraphColor</strong>(widget, graph)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Get current graph color
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long graph -- pointer to graph
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> (red, green, blue)
+</p>
+</span>
+<hr />
+
+<h2><a name="robo27"><a name="Graph2fgetGraphMinMax">
+Graph/getGraphMinMax</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> tuple <strong>getGraphMinMax</strong>(widget, graph)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Returns current graph value.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long graph -- pointer to graph
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> min &amp; max
+</p>
+</span>
+<hr />
+
+<h2><a name="robo28"><a name="Graph2fgetGraphPos">
+Graph/getGraphPos</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> tuple <strong>getGraphPos</strong>(widget, graph)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Given a reference to a graph object, this will return a tuple
+ containing the x and y coordinate of a graph object.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long graph -- pointer to graph
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> pos
+</p>
+</span>
+<hr />
+
+<h2><a name="robo29"><a name="Graph2fgetGraphSensor">
+Graph/getGraphSensor</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> string <strong>getGraphSensor</strong>(widget, graph)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Get current sensor string
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long graph -- pointer to graph
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> sensor string
+</p>
+</span>
+<hr />
+
+<h2><a name="robo30"><a name="Graph2fgetGraphSize">
+Graph/getGraphSize</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> tuple <strong>getGraphSize</strong>(widget, graph)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Given a reference to a graph object, this will return a tuple
+ containing the height and width of a graph object.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long graph -- pointer to graph
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> size
+</p>
+</span>
+<hr />
+
+<h2><a name="robo31"><a name="Graph2fgetGraphValue">
+Graph/getGraphValue</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>getGraphValue</strong>(widget, graph)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Returns current graph value.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long graph -- pointer to graph
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> value
+</p>
+</span>
+<hr />
+
+<h2><a name="robo32"><a name="Graph2fgetThemeGraph">
+Graph/getThemeGraph</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>getThemeGraph</strong>(widget, name)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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
+ <a href="#robo24">createGraph</a>, you can call this function.
+</p>
+
+<p> The name you pass to the function is the same one that you gave it for
+ the NAME= parameter in the .theme file.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> string name -- name of the graph to get
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> Pointer to graph
+</p>
+</span>
+<hr />
+
+<h2><a name="robo33"><a name="Graph2fhideGraph">
+Graph/hideGraph</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>hideGraph</strong>(widget, graph)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This hides an graph. In other words, during subsequent calls to
+ widgetUpdate(), this graph will not be drawn.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long graph -- pointer to graph
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo34"><a name="Graph2fmoveGraph">
+Graph/moveGraph</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>moveGraph</strong>(widget, graph, x, y)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This will move graph to new x and y coordinates.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long graph -- pointer to graph
+</li>
+<li> long x -- x coordinate
+</li>
+<li> long y -- y coordinate
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo35"><a name="Graph2fresizeGraph">
+Graph/resizeGraph</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>resizeGraph</strong>(widget, graph, w, h)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This will resize graph to new height and width.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long graph -- pointer to graph
+</li>
+<li> long w -- new width
+</li>
+<li> long h -- new height
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo36"><a name="Graph2fsetGraphColor">
+Graph/setGraphColor</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> tuple <strong>setGraphColor</strong>(widget, graph, red, green, blue)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Set current graph color
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long graph -- pointer to graph
+</li>
+<li> long red -- red component of color
+</li>
+<li> long green -- green component of color
+</li>
+<li> long blue -- blue component of color
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo37"><a name="Graph2fsetGraphMinMax">
+Graph/setGraphMinMax</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>setGraphMinMax</strong>(widget, graph, min, max)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Returns current graph value.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long graph -- pointer to graph
+</li>
+<li> long min -- min value
+</li>
+<li> long max -- max value
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo38"><a name="Graph2fsetGraphSensor">
+Graph/setGraphSensor</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>setGraphSensor</strong>(widget, graph, sensor)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Get current sensor string
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long graph -- pointer to graph
+</li>
+<li> string sensor -- new sensor as in theme files
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo39"><a name="Graph2fsetGraphValue">
+Graph/setGraphValue</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>setGraphValue</strong>(widget, graph, value)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Sets current graph value.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long graph -- pointer to graph
+</li>
+<li> long value -- new value
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo40"><a name="Graph2fshowGraph">
+Graph/showGraph</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>showGraph</strong>(widget, graph)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This shows an graph. In other words, during subsequent calls to
+ widgetUpdate(), this graph will be drawn.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long graph -- pointer to graph
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo19"><a name="Config2faddMenuConfigOption">
+Config/addMenuConfigOption</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>addMenuConfigOption</strong>(widget, key, name)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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.
+</p>
+
+<p> Before you use any configuration menu stuff, you NEED to add a new
+ callback to your script:
+</p>
+
+<p> def menuOptionChanged(widget, key, value):
+</p>
+
+<p> This will get called whenever a config menu option is changed. Now you
+ can add items to the config menu:
+</p>
+
+<p> <strong>addMenuConfigOption</strong>(widget, String key, String name)
+</p>
+
+<p> 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 <a href="#robo82">show</a> up in the config menu.
+</p>
+
+<p> For example, I could allow the user to enable or disable a clock showing
+ up in my theme:
+</p>
+
+<p> karamba.<strong>addMenuConfigOption</strong>(widget, "showclock", "Display a clock")
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> string key -- key for menu item
+</li>
+<li> string name -- name of the graph to get
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo20"><a name="Config2freadConfigEntry">
+Config/readConfigEntry</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> string|long <strong>readConfigEntry</strong>(widget, key, value)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This function reads an entry from the config file with the given key.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> string key -- key for config item
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> config value for key
+</p>
+</span>
+<hr />
+
+<h2><a name="robo21"><a name="Config2freadMenuConfigOption">
+Config/readMenuConfigOption</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>readMenuConfigOption</strong>(widget, key)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This returns whether or not the given option is checked in the theme's
+ Configure Theme menu.
+</p>
+
+<p> See <a href="#robo19">addMenuConfigOption</a> for a more detailed explanation.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> string key -- key for menu item
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 0 is returned if it is not checked and 1 is returned if it is.
+</p>
+</span>
+<hr />
+
+<h2><a name="robo22"><a name="Config2fsetMenuConfigOption">
+Config/setMenuConfigOption</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>setMenuConfigOption</strong>(widget, key, value)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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.
+</p>
+
+<p> See <a href="#robo19">addMenuConfigOption</a> for a more detailed explanation.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> string key -- key for menu item
+</li>
+<li> int value -- 1 if checked
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo23"><a name="Config2fwriteConfigEntry">
+Config/writeConfigEntry</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>writeConfigEntry</strong>(widget, key, value)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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.
+</p>
+
+<p> This function writes an entry into the config file with the given key and
+ value.
+</p>
+
+<p> For example, to save my favorite color, I would do
+ karamba.<strong>writeConfigEntry</strong>(widget, "FavColor", "Red")
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> string key -- key for config item
+</li>
+<li> string value -- config value
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo0"><a name="Bar2fcreateBar">
+Bar/createBar</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>createBar</strong>(widget, x, y, w, h, image)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This creates a bar at x,y with width and height w,h.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long x -- x coordinate
+</li>
+<li> long y -- y coordinate
+</li>
+<li> long w -- width
+</li>
+<li> long h -- height
+</li>
+<li> string image -- Path to image
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> Pointer to new bar meter
+</p>
+</span>
+<hr />
+
+<h2><a name="robo1"><a name="Bar2fdeleteBar">
+Bar/deleteBar</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>deleteBar</strong>(widget, bar)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This deletes bar.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long widget -- bar
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo2"><a name="Bar2fgetBarImage">
+Bar/getBarImage</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> string <strong>getBarImage</strong>(widget, bar)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Get bar image
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long bar -- pointer to bar
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> path to bar image
+</p>
+</span>
+<hr />
+
+<h2><a name="robo3"><a name="Bar2fgetBarMinMax">
+Bar/getBarMinMax</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> tuple <strong>getBarMinMax</strong>(widget, bar)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Returns current bar value.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long bar -- pointer to bar
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> min &amp; max
+</p>
+</span>
+<hr />
+
+<h2><a name="robo4"><a name="Bar2fgetBarPos">
+Bar/getBarPos</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> tuple <strong>getBarPos</strong>(widget, bar)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Given a reference to a bar object, this will return a tuple
+ containing the x and y coordinate of a bar object.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long bar -- pointer to bar
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> pos
+</p>
+</span>
+<hr />
+
+<h2><a name="robo5"><a name="Bar2fgetBarSensor">
+Bar/getBarSensor</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> string <strong>getBarSensor</strong>(widget, bar)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Get current sensor string
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long bar -- pointer to bar
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> sensor string
+</p>
+</span>
+<hr />
+
+<h2><a name="robo6"><a name="Bar2fgetBarSize">
+Bar/getBarSize</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> tuple <strong>getBarSize</strong>(widget, bar)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Given a reference to a bar object, this will return a tuple
+ containing the height and width of a bar object.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long bar -- pointer to bar
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> size
+</p>
+</span>
+<hr />
+
+<h2><a name="robo7"><a name="Bar2fgetBarValue">
+Bar/getBarValue</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>getBarValue</strong>(widget, bar)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Returns current bar value.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long bar -- pointer to bar
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> value
+</p>
+</span>
+<hr />
+
+<h2><a name="robo8"><a name="Bar2fgetBarVertical">
+Bar/getBarVertical</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> string <strong>getBarVertical</strong>(widget, bar)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Check if bar is vertical bar
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long bar -- pointer to bar
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if vertical
+</p>
+</span>
+<hr />
+
+<h2><a name="robo9"><a name="Bar2fgetThemeBar">
+Bar/getThemeBar</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>getThemeBar</strong>(widget, name)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> 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
+ <a href="#robo0">createBar</a>, you can call this function.
+</p>
+
+<p> The name you pass to the function is the same one that you gave it for
+ the NAME= parameter in the .theme file.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> string name -- name of the bar to get
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> Pointer to bar
+</p>
+</span>
+<hr />
+
+<h2><a name="robo10"><a name="Bar2fhideBar">
+Bar/hideBar</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>hideBar</strong>(widget, bar)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This hides an bar. In other words, during subsequent calls to
+ widgetUpdate(), this bar will not be drawn.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long bar -- pointer to bar
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo11"><a name="Bar2fmoveBar">
+Bar/moveBar</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>moveBar</strong>(widget, bar, x, y)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This will move bar to new x and y coordinates.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long bar -- pointer to bar
+</li>
+<li> long x -- x coordinate
+</li>
+<li> long y -- y coordinate
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo12"><a name="Bar2fresizeBar">
+Bar/resizeBar</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>resizeBar</strong>(widget, bar, w, h)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This will resize bar to new height and width.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long bar -- pointer to bar
+</li>
+<li> long w -- new width
+</li>
+<li> long h -- new height
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo13"><a name="Bar2fsetBarImage">
+Bar/setBarImage</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>setBarImage</strong>(widget, bar, image)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Get bar image
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long bar -- pointer to bar
+</li>
+<li> string image -- new image
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo14"><a name="Bar2fsetBarMinMax">
+Bar/setBarMinMax</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>setBarMinMax</strong>(widget, bar, min, max)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Returns current bar value.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long bar -- pointer to bar
+</li>
+<li> long min -- min value
+</li>
+<li> long max -- max value
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo15"><a name="Bar2fsetBarSensor">
+Bar/setBarSensor</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>setBarSensor</strong>(widget, bar, sensor)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Get current sensor string
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long bar -- pointer to bar
+</li>
+<li> string sensor -- new sensor as in theme files
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo16"><a name="Bar2fsetBarValue">
+Bar/setBarValue</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>setBarValue</strong>(widget, bar, value)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Sets current bar value.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long bar -- pointer to bar
+</li>
+<li> long value -- new value
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo17"><a name="Bar2fsetBarVertical">
+Bar/setBarVertical</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>setBarVertical</strong>(widget, bar)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> Set bar vertical
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long bar -- pointer to bar
+</li>
+<li> long vertical -- 1 if vertical
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+<hr />
+
+<h2><a name="robo18"><a name="Bar2fshowBar">
+Bar/showBar</a></h2>
+
+<p>[<a href="#robo_top_of_doc">top</a>]</p>
+<p><strong>SYNOPSIS</strong></p>
+<span class="SYNOPSIS"><p> long <strong>showBar</strong>(widget, bar)
+</p>
+</span><p><strong>DESCRIPTION</strong></p>
+<span class="DESCRIPTION"><p> This shows an bar. In other words, during subsequent calls to
+ widgetUpdate(), this bar will be drawn.
+</p>
+</span><p><strong>ARGUMENTS</strong></p>
+<span class="ARGUMENTS"><ul><li> long widget -- karamba
+</li>
+<li> long bar -- pointer to bar
+</li>
+</ul>
+<p></p>
+</span><p><strong>RETURN VALUE</strong></p>
+<span class="RETURN_VALUE"><p> 1 if successful
+</p>
+</span>
+</body>
+</html>
diff --git a/superkaramba/examples/autoHide/main.py b/superkaramba/examples/autoHide/main.py
new file mode 100644
index 0000000..85e2b37
--- /dev/null
+++ b/superkaramba/examples/autoHide/main.py
@@ -0,0 +1,62 @@
+#this import statement allows access to the karamba functions
+import karamba
+
+hidden = 0
+counter = 0
+
+def initWidget(widget):
+ global hidden
+ hidden = 0
+
+def widgetUpdated(widget):
+ global hidden
+ global counter
+ if hidden == 0:
+ counter = counter + 1
+
+ if (counter > 5):
+ hidden = 1
+ karamba.moveWidget(widget, 0, -210)
+
+
+#This gets called everytime our widget is clicked.
+#Notes:
+# widget = reference to our widget
+# x = x position (relative to our widget)
+# y = y position (relative to our widget)
+# botton = button clicked:
+# 1 = Left Mouse Button
+# 2 = Middle Mouse Button
+# 3 = Right Mouse Button, but this will never happen
+# because the right mouse button brings up the
+# Karamba menu.
+def widgetClicked(widget, x, y, button):
+ pass
+
+#This gets called everytime our widget is clicked.
+#Notes
+# widget = reference to our widget
+# x = x position (relative to our widget)
+# y = y position (relative to our widget)
+# botton = button being held:
+# 0 = No Mouse Button
+# 1 = Left Mouse Button
+# 2 = Middle Mouse Button
+# 3 = Right Mouse Button, but this will never happen
+# because the right mouse button brings up the
+# Karamba menu.
+def widgetMouseMoved(widget, x, y, button):
+ #Warning: Don't do anything too intensive here
+ #You don't want to run some complex piece of code everytime the mouse moves
+ global hidden
+ global counter
+ if (hidden==1):
+ karamba.moveWidget(widget, 0, 0)
+ hidden = 0
+ counter = 0
+
+
+
+# This will be printed when the widget loads.
+print "Loaded my python extension!"
+
diff --git a/superkaramba/examples/autoHide/main.theme b/superkaramba/examples/autoHide/main.theme
new file mode 100644
index 0000000..fd924dc
--- /dev/null
+++ b/superkaramba/examples/autoHide/main.theme
@@ -0,0 +1,42 @@
+KARAMBA X=0 Y=0 W=390 H=220 LOCKED=true INTERVAL=1000 ONTOP=false
+
+IMAGE X=0 Y=0 PATH="pics/calendar.png"
+
+<GROUP> X=10 Y=-15
+#CPU
+GRAPH X=5 Y=49 W=293 H=36 SENSOR=CPU POINTS=100 COLOR=100,100,100 INTERVAL=1000
+IMAGE X=0 Y=47 PATH="pics/label3.png"
+BAR X=0 Y=47 W=300 H=40 PATH="pics/bar3.png" SENSOR=CPU
+TEXT X=310 Y=56 SENSOR=CPU FORMAT="%v%" COLOR=200,200,200 FONTSIZE=10 FONT="arial" SHADOW=1
+
+#time
+TEXT X=2 Y=27 SENSOR=TIME COLOR=200,200,200 FONTSIZE=10 FONT="arial" SHADOW=1
+
+#date
+TEXT X=50 Y=31 SENSOR=TIME FORMAT="ddd d MMM" COLOR=180,180,180 FONTSIZE=8 FONT="arial"
+
+#mem
+IMAGE X=0 Y=97 PATH="pics/label3.png"
+BAR X=0 Y=97 W=300 H=40 PATH="pics/bar3.png" SENSOR=MEMORY INTERVAL=2000
+TEXT X=310 Y=106 SENSOR=MEMORY FORMAT="%fmMB" COLOR=200,200,200 FONTSIZE=10 FONT="arial" SHADOW=1
+
+
+#swap
+IMAGE X=0 Y=147 PATH="pics/label4.png"
+BAR X=0 Y=147 W=300 H=20 PATH="pics/bar4.png" SENSOR=MEMORY FORMAT="%us"
+TEXT X=310 Y=151 SENSOR=MEMORY FORMAT="%fsMB" COLOR=170,170,170 FONTSIZE=8 FONT="arial"
+
+
+#network
+GRAPH X=2 Y=179 W=296 H=36 SENSOR=NETWORK FORMAT="%in" POINTS=100 COLOR=100,100,100 MAX=250 INTERVAL=1000
+GRAPH X=2 Y=179 W=296 H=36 SENSOR=NETWORK FORMAT="%out" POINTS=100 COLOR=80,80,80 MAX=250
+IMAGE X=0 Y=177 PATH="pics/label3.png"
+BAR X=0 Y=177 W=300 H=40 PATH="pics/bar3.png" SENSOR=NETWORK FORMAT="%in" MAX=250
+BAR X=0 Y=177 W=300 H=40 PATH="pics/bar3.png" SENSOR=NETWORK FORAMT="%out" MAX=250
+TEXT X=310 Y=182 SENSOR=NETWORK COLOR=200,200,200 FORMAT="%inKBs" FONTSIZE=9 FONT="arial" DECIMALS=1
+TEXT X=310 Y=200 SENSOR=NETWORK COLOR=200,200,200 FORMAT="%outKBs" FONTSIZE=9 FONT="arial" DECIMALS=1
+
+#uptime
+TEXT X=240 Y=32 SENSOR=UPTIME COLOR=190,190,190 FONTSIZE=7 FONT="arial"
+
+</GROUP>
diff --git a/superkaramba/examples/autoHide/pics/MSN-64x64.png b/superkaramba/examples/autoHide/pics/MSN-64x64.png
new file mode 100644
index 0000000..3dc0e39
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/MSN-64x64.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/MSN-96x96.png b/superkaramba/examples/autoHide/pics/MSN-96x96.png
new file mode 100644
index 0000000..bf0f63a
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/MSN-96x96.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/Tux_House-64x64.png b/superkaramba/examples/autoHide/pics/Tux_House-64x64.png
new file mode 100644
index 0000000..c0b657e
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/Tux_House-64x64.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/Tux_House-96x96.png b/superkaramba/examples/autoHide/pics/Tux_House-96x96.png
new file mode 100644
index 0000000..dc217f3
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/Tux_House-96x96.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/Tux_Mail-64x64.png b/superkaramba/examples/autoHide/pics/Tux_Mail-64x64.png
new file mode 100644
index 0000000..4e29c4d
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/Tux_Mail-64x64.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/Tux_Mail-96x96.png b/superkaramba/examples/autoHide/pics/Tux_Mail-96x96.png
new file mode 100644
index 0000000..9de2596
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/Tux_Mail-96x96.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/Tux_Mozilla-64x64.png b/superkaramba/examples/autoHide/pics/Tux_Mozilla-64x64.png
new file mode 100644
index 0000000..d2413cd
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/Tux_Mozilla-64x64.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/Tux_Mozilla-96x96.png b/superkaramba/examples/autoHide/pics/Tux_Mozilla-96x96.png
new file mode 100644
index 0000000..5f24afb
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/Tux_Mozilla-96x96.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/Tux_Sherlock-64x64.png b/superkaramba/examples/autoHide/pics/Tux_Sherlock-64x64.png
new file mode 100644
index 0000000..e883671
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/Tux_Sherlock-64x64.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/Tux_Sherlock-96x96.png b/superkaramba/examples/autoHide/pics/Tux_Sherlock-96x96.png
new file mode 100644
index 0000000..20628f1
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/Tux_Sherlock-96x96.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/Tux_Terminal-64x64.png b/superkaramba/examples/autoHide/pics/Tux_Terminal-64x64.png
new file mode 100644
index 0000000..066c318
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/Tux_Terminal-64x64.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/Tux_Terminal-96x96.png b/superkaramba/examples/autoHide/pics/Tux_Terminal-96x96.png
new file mode 100644
index 0000000..5eedfe1
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/Tux_Terminal-96x96.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/Tux_iPhoto-64x64.png b/superkaramba/examples/autoHide/pics/Tux_iPhoto-64x64.png
new file mode 100644
index 0000000..9906efc
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/Tux_iPhoto-64x64.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/Tux_iPhoto-96x96.png b/superkaramba/examples/autoHide/pics/Tux_iPhoto-96x96.png
new file mode 100644
index 0000000..aa6450c
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/Tux_iPhoto-96x96.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/bar3.png b/superkaramba/examples/autoHide/pics/bar3.png
new file mode 100644
index 0000000..c6d4b9e
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/bar3.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/bar4.png b/superkaramba/examples/autoHide/pics/bar4.png
new file mode 100644
index 0000000..9e87bff
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/bar4.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/calendar.png b/superkaramba/examples/autoHide/pics/calendar.png
new file mode 100644
index 0000000..fc0e466
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/calendar.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/ctrl center-64x64.png b/superkaramba/examples/autoHide/pics/ctrl center-64x64.png
new file mode 100644
index 0000000..3c6d78f
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/ctrl center-64x64.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/ctrl center-96x96.png b/superkaramba/examples/autoHide/pics/ctrl center-96x96.png
new file mode 100644
index 0000000..43e7f3d
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/ctrl center-96x96.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/iconbarback.png b/superkaramba/examples/autoHide/pics/iconbarback.png
new file mode 100644
index 0000000..8a1f2f5
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/iconbarback.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/label3.png b/superkaramba/examples/autoHide/pics/label3.png
new file mode 100644
index 0000000..613ae17
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/label3.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/label4.png b/superkaramba/examples/autoHide/pics/label4.png
new file mode 100644
index 0000000..d6de907
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/label4.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/osxbarback.png b/superkaramba/examples/autoHide/pics/osxbarback.png
new file mode 100644
index 0000000..cb26088
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/osxbarback.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/osxbarbackBig.png b/superkaramba/examples/autoHide/pics/osxbarbackBig.png
new file mode 100644
index 0000000..07c6971
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/osxbarbackBig.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/pointer.png b/superkaramba/examples/autoHide/pics/pointer.png
new file mode 100644
index 0000000..379079a
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/pointer.png
Binary files differ
diff --git a/superkaramba/examples/bar/bar.py b/superkaramba/examples/bar/bar.py
new file mode 100644
index 0000000..b018fe8
--- /dev/null
+++ b/superkaramba/examples/bar/bar.py
@@ -0,0 +1,93 @@
+#this import statement allows access to the karamba functions
+import karamba
+
+bars = [0,0,0,0,0,0,0,0]
+b = 0
+
+#this is called when you widget is initialized
+def initWidget(widget):
+ global bars, b
+ bars[0] = karamba.getThemeBar(widget, "bar0")
+ bars[1] = karamba.getThemeBar(widget, "bar1")
+ bars[2] = karamba.getThemeBar(widget, "bar2")
+ bars[3] = karamba.getThemeBar(widget, "bar3")
+ bars[4] = karamba.getThemeBar(widget, "bar4")
+ bars[5] = karamba.getThemeBar(widget, "bar5")
+ bars[6] = karamba.getThemeBar(widget, "bar6")
+ bars[7] = karamba.getThemeBar(widget, "bar7")
+
+
+#this is called everytime your widget is updated
+#the update inverval is specified in the .theme file
+def widgetUpdated(widget):
+ global bars, b
+
+ # vertical & bitmap
+ b = karamba.getBarVertical(widget, bars[7])
+ print "getVertical: " + str(b)
+ bmp = karamba.getBarImage(widget, bars[7])
+ print "getBitmap: " + str(bmp)
+ b = (b+1)%2
+ karamba.setBarVertical(widget, bars[7], b)
+ if(b):
+ karamba.setBarImage(widget, bars[7], "ver.png")
+ karamba.resizeBar(widget, bars[7], 20, 200)
+ else:
+ karamba.setBarImage(widget, bars[7], "hor.png")
+ karamba.resizeBar(widget, bars[7], 200, 20)
+
+ # size & resize
+ size = karamba.getBarSize(widget, bars[1])
+ print "getBarSize: " + str(size)
+ size = ((b * 100) + 100, size[1])
+ karamba.resizeBar(widget, bars[1], size[0], size[1])
+
+ # pos & move
+ pos = karamba.getBarPos(widget, bars[2])
+ print "getBarPos: " + str(pos)
+ pos = (b * 200, pos[1])
+ karamba.moveBar(widget, bars[2], pos[0], pos[1])
+
+ # Hide & Show
+ if(b):
+ karamba.hideBar(widget, bars[3])
+ else:
+ karamba.showBar(widget, bars[3])
+
+ # Value
+ v = karamba.getBarValue(widget, bars[5])
+ print "getBarValue: ", v
+ v = (v + 10) % 110
+ karamba.setBarValue(widget, bars[5], v)
+
+ # Min Max
+ minmax = karamba.getBarMinMax(widget, bars[6])
+ print "getBarMinMax: " + str(minmax)
+ minmax = (0, (b * 100) + 100)
+ karamba.setBarMinMax(widget, bars[6], minmax[0], minmax[1])
+
+ # Sensor
+ sensor = karamba.getBarSensor(widget, bars[4])
+ print "getSensor: " + str(sensor)
+ if(b):
+ karamba.setBarSensor(widget, bars[4], 'SENSOR=SENSOR TYPE="cpu_temp"')
+ else:
+ karamba.setBarSensor(widget, bars[4], 'SENSOR=CPU')
+
+ # Create & delete
+ if(bars[0]):
+ karamba.deleteBar(widget, bars[0])
+ bars[0] = 0
+ else:
+ bars[0] = karamba.createBar(widget, 0, 20, 200, 20)
+ karamba.setBarImage(widget, bars[0], "hor.png")
+ karamba.setBarValue(widget, bars[0], 100)
+
+def widgetClicked(widget, x, y, button):
+ pass
+
+def widgetMouseMoved(widget, x, y, button):
+ pass
+
+# This will be printed when the widget loads.
+print "Loaded Bar test python extension!"
diff --git a/superkaramba/examples/bar/bar.theme b/superkaramba/examples/bar/bar.theme
new file mode 100644
index 0000000..ec569e9
--- /dev/null
+++ b/superkaramba/examples/bar/bar.theme
@@ -0,0 +1,26 @@
+KARAMBA x=100 y=10 w=600 h=580 INTERVAL=1000 LOCKED=true
+DEFAULTFONT font="Bitstream Vera Sans" fontsize=16 color=200,200,200
+
+TEXT x=0 Y=0 w=600 h=20 VALUE="createBar & deleteBar" name=text0
+BAR x=0 Y=20 w=200 h=20 path=hor.png value=100 min=0 max=100 name=bar0
+
+TEXT x=0 Y=45 w=600 h=20 VALUE="getBarSize & resizeBar" name=text1
+BAR x=0 Y=65 w=100 h=20 path=hor.png value=100 min=0 max=100 name=bar1
+
+TEXT x=0 Y=90 w=600 h=20 VALUE="getBarPos & moveBar" name=text2
+BAR x=0 Y=110 w=200 h=20 path=hor.png value=100 min=0 max=100 name=bar2
+
+TEXT x=0 Y=135 w=600 h=20 VALUE="hideBar & showBar" name=text3
+BAR x=0 Y=155 w=200 h=20 path=hor.png value=100 min=0 max=100 name=bar3
+
+TEXT x=0 Y=180 w=600 h=20 VALUE="getBarSensor & setBarSensor" name=text4
+BAR x=0 Y=200 w=200 h=20 path=hor.png value=50 min=0 max=100 name=bar4
+
+TEXT x=0 Y=225 w=600 h=20 VALUE="getBarValue & setBarValue" name=text5
+BAR x=0 Y=245 w=200 h=20 path=hor.png value=50 min=0 max=100 name=bar5
+
+TEXT x=0 Y=270 w=600 h=20 VALUE="getBarMinMax & setBarMinMax" name=text6
+BAR x=0 Y=290 w=200 h=20 path=hor.png value=50 min=0 max=100 name=bar6
+
+TEXT x=0 Y=315 w=600 h=20 VALUE="getBarVertical, setBarVertical, setBarImage & getBarImage" name=text7
+BAR x=0 Y=335 w=200 h=20 path=hor.png value=100 min=0 max=100 name=bar7
diff --git a/superkaramba/examples/bar/hor.png b/superkaramba/examples/bar/hor.png
new file mode 100644
index 0000000..56dbbc0
--- /dev/null
+++ b/superkaramba/examples/bar/hor.png
Binary files differ
diff --git a/superkaramba/examples/bar/ver.png b/superkaramba/examples/bar/ver.png
new file mode 100644
index 0000000..928b869
--- /dev/null
+++ b/superkaramba/examples/bar/ver.png
Binary files differ
diff --git a/superkaramba/examples/change_interval/interval.py b/superkaramba/examples/change_interval/interval.py
new file mode 100644
index 0000000..6c3422a
--- /dev/null
+++ b/superkaramba/examples/change_interval/interval.py
@@ -0,0 +1,60 @@
+#
+# Written by Luke Kenneth Casson Leighton <lkcl@lkcl.net>
+
+# This theme is demonstrates the interval timer changing.
+
+#this import statement allows access to the karamba functions
+import karamba
+
+seq = 0
+text = None
+
+#this is called when you widget is initialized
+def initWidget(widget):
+
+ karamba.redrawWidget(widget)
+
+# sequence drops down to zero and changes the time interval to 1 second.
+# keeps counting down thereafter...
+
+def widgetUpdated(widget):
+ global seq
+ global text
+
+ seq -= 1
+
+ if seq <= 0:
+ karamba.changeInterval(widget, 1000)
+
+ if seq <= 0:
+ message = "biding-time seq:%d" % -seq
+ else:
+ message = "wiggle seq:%d" % seq
+
+ # delete previous text if exists.
+ if text is not None:
+ karamba.deleteText(widget, text)
+
+ # display new message
+ text = karamba.createText(widget, 0, 20, 300, 20, message)
+ karamba.changeTextColor(widget, text, 252,252,252)
+
+ karamba.redrawWidget(widget)
+
+# wiggle the mouse over the widget to get the sequence number increased more.
+# also set the refresh rate to 50ms so that the theme has to fight against
+# the wiggling.
+
+def widgetMouseMoved(widget, x, y, button):
+ global seq
+
+ if seq <= 0:
+ seq = 0
+ karamba.changeInterval(widget, 50)
+
+ seq += 1
+
+
+# This will be printed when the widget loads.
+print "Loaded my python extension!"
+
diff --git a/superkaramba/examples/change_interval/interval.theme b/superkaramba/examples/change_interval/interval.theme
new file mode 100644
index 0000000..5711ece
--- /dev/null
+++ b/superkaramba/examples/change_interval/interval.theme
@@ -0,0 +1,2 @@
+KARAMBA x=200 y=100 w=300 h=40 INTERVAL=200 LOCKED=true
+TEXT x=0 y=0 w=300 h=20 value="wiggle the mouse over me" color=200,252,200
diff --git a/superkaramba/examples/control_management/mgmt.py b/superkaramba/examples/control_management/mgmt.py
new file mode 100644
index 0000000..eae98c2
--- /dev/null
+++ b/superkaramba/examples/control_management/mgmt.py
@@ -0,0 +1,49 @@
+#
+# Written by Luke Kenneth Casson Leighton <lkcl@lkcl.net>
+
+#this import statement allows access to the karamba functions
+import karamba
+
+do_nothing_txt = None
+mgmt_txt = None
+
+
+#this is called when you widget is initialized
+def initWidget(widget):
+ global do_nothing_txt
+ global do_something_txt
+
+ # display new message
+ do_nothing_txt = karamba.createText(widget, 0, 00, 300, 20,
+ "Right mouse click me!")
+ karamba.changeTextColor(widget, do_nothing_txt, 252,252,252)
+ mgmt_txt = karamba.createText(widget, 0, 20, 300, 20,
+ "Righ mouse click me too!")
+ karamba.changeTextColor(widget, mgmt_txt, 252,252,252)
+
+ karamba.redrawWidget(widget)
+
+ karamba.setWantRightButton(widget, 1)
+
+def widgetUpdated(widget):
+ karamba.redrawWidget(widget)
+
+def widgetClicked(widget, x, y, button):
+ global do_nothing_txt
+
+ if y < 20:
+ if do_nothing_txt is not None:
+ karamba.deleteText(widget, do_nothing_txt)
+ do_nothing_txt = karamba.createText(widget,
+ 0, 0, 300, 20, "I don't do anything when clicking here.")
+ karamba.changeTextColor(widget, do_nothing_txt,
+ 255,200,200)
+ karamba.redrawWidget(widget)
+ return
+
+ karamba.managementPopup(widget)
+
+
+# This will be printed when the widget loads.
+print "Loaded my python extension!"
+
diff --git a/superkaramba/examples/control_management/mgmt.theme b/superkaramba/examples/control_management/mgmt.theme
new file mode 100644
index 0000000..f54c88f
--- /dev/null
+++ b/superkaramba/examples/control_management/mgmt.theme
@@ -0,0 +1 @@
+KARAMBA x=200 y=100 w=300 h=40 INTERVAL=200 LOCKED=true
diff --git a/superkaramba/examples/disableRightClickMenu/disable_menu.py b/superkaramba/examples/disableRightClickMenu/disable_menu.py
new file mode 100644
index 0000000..6c524dd
--- /dev/null
+++ b/superkaramba/examples/disableRightClickMenu/disable_menu.py
@@ -0,0 +1,176 @@
+#this import statement allows access to the karamba functions
+import karamba
+
+
+#this is called when your widget is initialized
+def initWidget(widget):
+ global clicked, text2
+ text2 = 0
+ text = 'This theme demonstrates how to manipulate the \nright click menu option.'
+ text += '\nClick the theme with your left mouse button \nto disable and then re-enable the right click menu.'
+ karamba.createText(widget,5,5,400,20,text)
+ clicked = False
+ karamba.redrawWidget(widget)
+
+#This is called when your widget is closed. You can use this to clean
+#up open files, etc. You don't need to delete text and images in your
+#theme. That is done automatically. This callback is just for cleaning up
+#external things. Most people don't need to put anything here.
+def widgetClosed(widget):
+ pass
+
+#this is called everytime your widget is updated
+#the update inverval is specified in the .theme file
+def widgetUpdated(widget):
+ pass
+
+#This gets called everytime our widget is clicked.
+#Notes:
+# widget = reference to our widget
+# x = x position (relative to our widget)
+# y = y position (relative to our widget)
+# botton = button clicked:
+# 1 = Left Mouse Button
+# 2 = Middle Mouse Button
+# 3 = Right Mouse Button, but this will never happen
+# because the right mouse button brings up the
+# Karamba menu.
+# 4,5 = Scroll wheel up and down
+def widgetClicked(widget, x, y, button):
+ global clicked,text2
+ if clicked and button == 1:
+ clicked = False
+ karamba.setWantRightButton(widget, False)
+ newText = "Enabling the SuperKaramba right click \nconfiguration menu."
+ if text2:
+ karamba.deleteText(widget,text2)
+ text2 = karamba.createText(widget,5,70,400,20,newText)
+ print newText
+ elif not clicked and button == 1:
+ clicked = True
+ karamba.setWantRightButton(widget, True)
+ newText = "Disabling the SuperKaramba right click \nconfiguration menu."
+ if text2:
+ karamba.deleteText(widget,text2)
+ text2 = karamba.createText(widget,5,70,400,20,newText)
+ print newText
+ if button == 3:
+ print "Clicking the right mouse button is recognized now."
+ karamba.redrawWidget(widget)
+
+#This gets called everytime our widget is clicked.
+#Notes
+# widget = reference to our widget
+# x = x position (relative to our widget)
+# y = y position (relative to our widget)
+# botton = button being held:
+# 0 = No Mouse Button
+# 1 = Left Mouse Button
+# 2 = Middle Mouse Button
+# 3 = Right Mouse Button, but this will never happen
+# because the right mouse button brings up the
+# Karamba menu.
+def widgetMouseMoved(widget, x, y, button):
+ #Warning: Don't do anything too intensive here
+ #You don't want to run some complex piece of code everytime the mouse moves
+ pass
+
+
+#This gets called when an item is clicked in a popup menu you have created.
+# menu = a reference to the menu
+# id = the number of the item that was clicked.
+def menuItemClicked(widget, menu, id):
+ pass
+
+#This gets called when an item is clicked in the theme CONFIGURATION menu,
+#not the popup menus that you create.
+# key = the reference to the configuration key that was changed
+# value = the new value (true or false) that was selected
+def menuOptionChanged(widget, key, value):
+ pass
+
+#This gets called when a meter (image, text, etc) is clicked.
+# NOTE you must use attachClickArea() to make a meter
+# clickable.
+# widget = reference to your theme
+# meter = the meter clicked
+# button = the button clicked (see widgetClicked for button numbers)
+def meterClicked(widget, meter, button):
+ pass
+
+#This gets called when a command you have executed with executeInteractive() outputs something
+#to stdout. This way you can get the output of for example kdialog without freezing up the widget
+#waiting for kdialog to end.
+# widget = reference to your theme
+# pid = process number of the program outputting (use this if you execute more than out process)
+# output = the text the program outputted to stdout
+def commandOutput(widget, pid, output):
+ pass
+
+#This gets called when an item is dropped on this widget.
+# NOTE you have to call acceptDrops() before your widget will accept drops.
+# widget = reference to your theme
+# dropText = the text of the dropped item (probably a URL to it's location in KDE)
+def itemDropped(widget, dropText):
+ pass
+
+
+#This gets called when a new program is LOADING in KDE. When it is done
+#loading, startupRemoved() is called, followed by taskAdded().
+# widget = reference to your widget
+# task = A refence to the task that is starting.
+def startupAdded(widget, startup):
+ pass
+
+#This gets called when a new program is done LOADING in KDE.
+# widget = reference to your widget
+# task = A refence to the task that just finished loading.
+def startupRemoved(widget, startup):
+ pass
+
+#This is called every time a new task (program) is started in KDE.
+# widget = reference to your widget
+# task = A refence to the new task. Call getTaskInfo() with this reference
+# to get the name, etc of this new task.
+def taskAdded(widget, task):
+ pass
+
+#This is called everytime a task (program) is closed in KDE.
+# widget = reference to your widget
+# task = A refence to the task.
+def taskRemoved(widget, task):
+ pass
+
+#This is called everytime a different task gains focus (IE, the user clicks
+#on a different window).
+# widget = reference to your widget
+# task = A refence to the task. Call getTaskInfo() with this reference
+# to get the name, etc of this new task.
+def activeTaskChanged(widget, task):
+ pass
+
+#This is called everytime the systray you created with createSystray() is updated
+def systrayUpdated(widget):
+ pass
+
+#This is called everytime the current desktop changes
+# widget = reference to your widget
+# desktop = the current desktop
+def desktopChanged(widget, desktop):
+ pass
+
+#This is called everytime the wallpaper changes on a desktop
+# widget = reference to your widget
+# desktop = the desktop whose wallpaper changed
+def wallpaperChanged(widget, desktop):
+ pass
+
+#This is called everytime there is a key press in any focused input field
+# widget = reference to your widget
+# meter = reference to an input box
+# char = the key that was pressed
+def keyPressed(widget, meter, char):
+ pass
+
+# This will be printed when the widget loads.
+print "Loaded my python extension!"
diff --git a/superkaramba/examples/disableRightClickMenu/disable_menu.theme b/superkaramba/examples/disableRightClickMenu/disable_menu.theme
new file mode 100644
index 0000000..cbd905a
--- /dev/null
+++ b/superkaramba/examples/disableRightClickMenu/disable_menu.theme
@@ -0,0 +1 @@
+karamba x=0 y=0 w=300 h=100 locked=true
diff --git a/superkaramba/examples/globalMouse/README b/superkaramba/examples/globalMouse/README
new file mode 100644
index 0000000..758ce4b
--- /dev/null
+++ b/superkaramba/examples/globalMouse/README
@@ -0,0 +1,29 @@
+
+Karamba Eyes 0.6 by Wilfried.Huss@gmx.at
+----------------------------------------
+
+Karamba Eyes is a implementation of the classic xeyes for superkaramba.
+
+
+INSTALLATION:
+ Karamba Eyes needs a small Python extension module named xcursor
+ which is implemented in the file extension/xcursor.c.
+
+ To build it go to the extension subdirectory and type
+
+ python setup.py build
+
+ (The Python develop package needs to be installed)
+
+ This creates the shared library xcursor.so, probably in a subdirectory
+ named build. This file needs to be copied in the same directory as the
+ eyes.theme and eyes.py file.
+
+ A precompiled xcursor.so file is included (Compiled on Mandrake 9.1).
+
+CHANGES:
+ * Moving the theme now works as it should.
+ * Widget Mask added
+
+TODO:
+ Add Theme Support
diff --git a/superkaramba/examples/globalMouse/extension/setup.py b/superkaramba/examples/globalMouse/extension/setup.py
new file mode 100644
index 0000000..f33f8a6
--- /dev/null
+++ b/superkaramba/examples/globalMouse/extension/setup.py
@@ -0,0 +1,12 @@
+from distutils.core import setup, Extension
+
+module1 = Extension('xcursor',
+ include_dirs = ['/usr/X11R6/include'],
+ libraries = ['X11'],
+ library_dirs = ['/usr/X11R6/lib'],
+ sources = ['xcursor.c'])
+
+setup (name = 'XMouseCursor',
+ version = '1.0',
+ description = 'Determines the position of the X mouse cursor',
+ ext_modules = [module1])
diff --git a/superkaramba/examples/globalMouse/extension/xcursor.c b/superkaramba/examples/globalMouse/extension/xcursor.c
new file mode 100644
index 0000000..8dad240
--- /dev/null
+++ b/superkaramba/examples/globalMouse/extension/xcursor.c
@@ -0,0 +1,104 @@
+/*
+ * This module is based on code by found in comp.lang.python:
+ * http://groups.google.at/groups?q=%22Re:+X+Gurus%22+group:comp.lang.python.*&hl=de&lr=&ie=UTF-8&selm=imnv4.314%24qL4.17232%40newsread1.prod.itd.earthlink.net&rnum=2
+ *
+ * Build with:
+ * python setup.py build
+ *
+ * Copyright (C) 2003 Hans Karlsson <karlsson.h@home.se>
+ * Copyright (C) 2003-2004 Adam Geitgey <adam@rootnode.org>
+ * Copyright (c) 2005 Ryan Nickell <p0z3r@earthlink.net>
+ *
+ * This file is part of Superkaramba.
+ *
+ * Superkaramba is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Superkaramba is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Superkaramba; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ ****************************************************************************/
+
+#include <Python.h>
+
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+static Display* display = 0;
+static Window root;
+static int screen;
+
+
+static PyObject* xcursor_position(self, args)
+ PyObject* self;
+ PyObject* args;
+{
+ /* Determine X Cursor coordinates */
+ Window root_return, child_return;
+ char* display_name;
+ int root_x_return, root_y_return;
+ int win_x_return, win_y_return;
+ unsigned int mask_return;
+
+ if (! (display_name = getenv("DISPLAY")) )
+ {
+ /* add error handling! */
+
+ /*
+ * fprintf(stderr,"environment variable DISPLAY must be set\n");
+ * exit(-1);
+ */
+
+ return NULL;
+ }
+
+ if ( display == 0)
+ {
+ if (! (display = XOpenDisplay(display_name)) )
+ {
+ /* add error handling! */
+
+ /*
+ * fprintf(stderr,"%s: Cannot open display %s\n", argv[0],
+ * display_name);
+ * exit(-1);
+ */
+
+ return NULL;
+ }
+
+ screen = DefaultScreen(display);
+ root = RootWindow(display, screen);
+ }
+
+ XQueryPointer(display, root, &root_return, &child_return,
+ &root_x_return, &root_y_return,
+ &win_x_return, &win_y_return,
+ &mask_return);
+
+ /* return Python Object */
+ return Py_BuildValue("(i,i)", root_x_return, root_y_return);
+}
+
+/* Method Table */
+static PyMethodDef xcursorMethods[] =
+{
+ {"position", xcursor_position, METH_VARARGS, "Query X Cursor Coordinates"},
+ {NULL, NULL, 0, NULL} /* Sentinel */
+};
+
+void initxcursor(void)
+{
+ (void) Py_InitModule("xcursor", xcursorMethods);
+}
+
+
diff --git a/superkaramba/examples/globalMouse/eyes.py b/superkaramba/examples/globalMouse/eyes.py
new file mode 100644
index 0000000..b95f86d
--- /dev/null
+++ b/superkaramba/examples/globalMouse/eyes.py
@@ -0,0 +1,192 @@
+#this import statement allows access to the karamba functions
+import karamba
+
+#import os
+import string
+import math
+import re
+
+import xcursor
+
+linkePupille = ""
+rechtePupille = ""
+
+init = 0
+
+#old curser pos
+x_old = -1
+y_old = -1
+
+#widget size
+w_width = 167
+w_height = 111
+
+#widget pos
+w_x = 10
+w_y = 850
+
+#eye center
+lx, ly = 39, 55
+rx, ry = 126, 55
+
+#eye size
+la, lb = 25, 38
+ra, rb = 25, 38
+
+#pupille size
+lp_width, lp_height = 11, 17
+rp_width, rp_height = 11, 17
+
+def pupille(mouse_x, mouse_y, eye_center_x, eye_center_y, eye_a, eye_b, widget_x, widget_y):
+ x = mouse_x - eye_center_x - widget_x
+ y = mouse_y - eye_center_y - widget_y
+ #print x, y
+
+ r = math.sqrt(x * x + y * y)
+ phi = math.atan2(y, x)
+ #print phi * math.pi
+
+ eye_x = eye_a * math.cos(phi)
+ eye_y = eye_b * math.sin(phi)
+
+ eye_r = math.sqrt(eye_x * eye_x + eye_y * eye_y)
+
+ if eye_r < r:
+ return int(eye_x + eye_center_x), int(eye_y + eye_center_y)
+
+ return int(x + eye_center_x), int(y + eye_center_y)
+
+
+#this is called when you widget is initialized
+def initWidget(widget):
+ pass
+
+#this is called everytime your widget is updated
+#the update inverval is specified in the .theme file
+def widgetUpdated(widget):
+ global init
+ global linkePupille
+ global rechtePupille
+
+ global w_width
+ global w_height
+
+ global w_x
+ global w_y
+
+ global lx
+ global ly
+ global la
+ global lb
+
+ global lp_width
+ global lp_height
+
+ global rx
+ global ry
+ global ra
+ global rb
+
+ global rp_width
+ global rp_height
+
+ global x_old
+ global y_old
+
+ if init == 0:
+ theme_path = karamba.getThemePath(widget) + "/"
+
+ # read widget coordinates from eyes.theme
+ # f = open(theme_path + "eyes.theme")
+
+ # karamba_line = ""
+ #while re.compile('KARAMBA').search(karamba_line) == None:
+ # karamba_line = f.readline()
+
+ #w_x = int(re.compile('X=([0-9]+)').search(karamba_line).group(1))
+ #w_y = int(re.compile('Y=([0-9]+)').search(karamba_line).group(1))
+
+ #f.close()
+
+ #karamba.createWidgetMask(widget, theme_path + "pics/mask.png")
+
+ linkePupille = karamba.createImage(widget, 15, 30, theme_path + "pics/pupille.png")
+ rechtePupille = karamba.createImage(widget, 100, 30, theme_path + "pics/pupille.png")
+ init = 1
+
+ karamba.redrawWidget(widget)
+
+ # query mouse-cursor position
+ x, y = xcursor.position()
+
+ #fp = os.popen("./xpos")
+ #output = fp.read()
+ #x, y = output.split()
+
+ #print x, y
+
+ if x != x_old or y != y_old:
+ x_old, y_old = x, y
+ # Get Widget Position
+ w_x, w_y = karamba.getWidgetPosition(widget)
+
+ # Calc left pupille
+ xp, yp = pupille (int(x), int(y), lx, ly, la, lb, w_x, w_y)
+
+ xp = xp - lp_width / 2
+ yp = yp - lp_height / 2
+ #print xp, yp
+
+ karamba.moveImage(widget, linkePupille, xp, yp)
+
+ # Calc right pupille
+ xp, yp = pupille (int(x), int(y), rx, ry, ra, rb, w_x, w_y)
+
+ xp = xp - rp_width / 2
+ yp = yp - rp_height / 2
+ #print xp, yp
+
+ karamba.moveImage(widget, rechtePupille, xp, yp)
+
+ karamba.redrawWidget(widget)
+
+#This gets called everytime our widget is clicked.
+#Notes:
+# widget = reference to our widget
+# x = x position (relative to our widget)
+# y = y position (relative to our widget)
+# botton = button clicked:
+# 1 = Left Mouse Button
+# 2 = Middle Mouse Button
+# 3 = Right Mouse Button, but this will never happen
+# because the right mouse button brings up the
+# Karamba menu.
+# 4,5 = Scroll wheel up and down
+def widgetClicked(widget, x, y, button):
+ pass
+
+#This gets called everytime our widget is clicked.
+#Notes
+# widget = reference to our widget
+# x = x position (relative to our widget)
+# y = y position (relative to our widget)
+# botton = button being held:
+# 0 = No Mouse Button
+# 1 = Left Mouse Button
+# 2 = Middle Mouse Button
+# 3 = Right Mouse Button, but this will never happen
+# because the right mouse button brings up the
+# Karamba menu.
+def widgetMouseMoved(widget, x, y, button):
+ #Warning: Don't do anything too intensive here
+ #You don't want to run some complex piece of code everytime the mouse moves
+ pass
+ #global linkePupille
+
+ #karamba.moveImage(widget, linkePupille, x, y)
+ #karamba.redrawWidget(widget)
+
+
+# This will be printed when the widget loads.
+print "Loaded Karamba Eyes"
+
diff --git a/superkaramba/examples/globalMouse/eyes.theme b/superkaramba/examples/globalMouse/eyes.theme
new file mode 100644
index 0000000..4f2417b
--- /dev/null
+++ b/superkaramba/examples/globalMouse/eyes.theme
@@ -0,0 +1,3 @@
+KARAMBA X=5 Y=850 W=167 H=111 MASK="pics/mask.png" LOCKED=false INTERVAL=100
+
+IMAGE X=0 Y=0 PATH="pics/eyes.png"
diff --git a/superkaramba/examples/globalMouse/pics/eyes.png b/superkaramba/examples/globalMouse/pics/eyes.png
new file mode 100644
index 0000000..50823d0
--- /dev/null
+++ b/superkaramba/examples/globalMouse/pics/eyes.png
Binary files differ
diff --git a/superkaramba/examples/globalMouse/pics/eyes.xcf b/superkaramba/examples/globalMouse/pics/eyes.xcf
new file mode 100644
index 0000000..3f097d1
--- /dev/null
+++ b/superkaramba/examples/globalMouse/pics/eyes.xcf
Binary files differ
diff --git a/superkaramba/examples/globalMouse/pics/mask.png b/superkaramba/examples/globalMouse/pics/mask.png
new file mode 100644
index 0000000..cf8fc03
--- /dev/null
+++ b/superkaramba/examples/globalMouse/pics/mask.png
Binary files differ
diff --git a/superkaramba/examples/globalMouse/pics/pupille.png b/superkaramba/examples/globalMouse/pics/pupille.png
new file mode 100644
index 0000000..11d971b
--- /dev/null
+++ b/superkaramba/examples/globalMouse/pics/pupille.png
Binary files differ
diff --git a/superkaramba/examples/globalMouse/xcursor.so b/superkaramba/examples/globalMouse/xcursor.so
new file mode 100755
index 0000000..1ff08d5
--- /dev/null
+++ b/superkaramba/examples/globalMouse/xcursor.so
Binary files differ
diff --git a/superkaramba/examples/graph/graph.py b/superkaramba/examples/graph/graph.py
new file mode 100644
index 0000000..5798612
--- /dev/null
+++ b/superkaramba/examples/graph/graph.py
@@ -0,0 +1,89 @@
+#this import statement allows access to the karamba functions
+import karamba
+
+graphs = [0,0,0,0,0,0,0,0]
+b = 0
+
+#this is called when you widget is initialized
+def initWidget(widget):
+ global graphs
+ graphs[0] = karamba.getThemeGraph(widget, "graph0")
+ graphs[1] = karamba.getThemeGraph(widget, "graph1")
+ graphs[2] = karamba.getThemeGraph(widget, "graph2")
+ graphs[3] = karamba.getThemeGraph(widget, "graph3")
+ graphs[4] = karamba.getThemeGraph(widget, "graph4")
+ graphs[5] = karamba.getThemeGraph(widget, "graph5")
+ graphs[6] = karamba.getThemeGraph(widget, "graph6")
+ graphs[7] = karamba.getThemeGraph(widget, "graph7")
+
+
+#this is called everytime your widget is updated
+#the update inverval is specified in the .theme file
+def widgetUpdated(widget):
+ global graphs, b
+
+ b = (b+1)%2
+
+ # Create & delete
+ if(graphs[0]):
+ karamba.deleteGraph(widget, graphs[0])
+ graphs[0] = 0
+ print "Deleted graph."
+ else:
+ graphs[0] = karamba.createGraph(widget, 0, 20, 400, 30, 400)
+ print "Created graph: " + str(graphs[0])
+
+ # size & resize
+ size = karamba.getGraphSize(widget, graphs[1])
+ print "getGraphSize: " + str(size)
+ size = ((b * 200) + 200, size[1])
+ karamba.resizeGraph(widget, graphs[1], size[0], size[1])
+
+ # pos & move
+ pos = karamba.getGraphPos(widget, graphs[2])
+ print "getGraphPos: " + str(pos)
+ pos = (b * 200, pos[1])
+ karamba.moveGraph(widget, graphs[2], pos[0], pos[1])
+
+ # Hide & Show
+ if(b):
+ karamba.hideGraph(widget, graphs[3])
+ else:
+ karamba.showGraph(widget, graphs[3])
+
+ # Sensor
+ sensor = karamba.getGraphSensor(widget, graphs[4])
+ print "getSensor: " + str(sensor)
+ if(b):
+ karamba.setGraphSensor(widget, graphs[4], 'SENSOR=NETWORK FORMAT="%in"')
+ else:
+ karamba.setGraphSensor(widget, graphs[4], 'SENSOR=CPU')
+
+ # Min Max
+ minmax = karamba.getGraphMinMax(widget, graphs[5])
+ print "getGraphMinMax: " + str(minmax)
+ minmax = (0, (b * 25) + 25)
+ karamba.setGraphMinMax(widget, graphs[5], minmax[0], minmax[1])
+
+ # Value
+ v = karamba.getGraphValue(widget, graphs[6])
+ print "getGraphValue: ", v
+ v = (v + 1) % 30
+ karamba.setGraphValue(widget, graphs[6], v)
+
+ # Color
+ c = karamba.getGraphColor(widget, graphs[7])
+ print "getGraphColor: ", c
+ r = (c[0] + 10) % 255
+ g = (c[1] + 10) % 255
+ bl = (c[2] + 10) % 255
+ karamba.setGraphColor(widget, graphs[7], r, g, bl)
+
+def widgetClicked(widget, x, y, button):
+ pass
+
+def widgetMouseMoved(widget, x, y, button):
+ pass
+
+# This will be printed when the widget loads.
+print "Loaded Graph test python extension!"
diff --git a/superkaramba/examples/graph/graph.theme b/superkaramba/examples/graph/graph.theme
new file mode 100644
index 0000000..d16c8b3
--- /dev/null
+++ b/superkaramba/examples/graph/graph.theme
@@ -0,0 +1,26 @@
+KARAMBA x=100 y=10 w=600 h=580 INTERVAL=1000 LOCKED=true
+DEFAULTFONT font="Bitstream Vera Sans" fontsize=16 color=200,200,200
+
+TEXT x=0 Y=0 w=600 h=20 VALUE="createGraph & deleteGraph" name=text0
+GRAPH X=0 Y=20 W=400 H=30 POINTS=400 SENSOR=NETWORK FORMAT="%in" COLOR=192,192,192 MAX=50 NAME=graph0
+
+TEXT x=0 Y=50 w=600 h=20 VALUE="getGraphSize & resizeGraph" name=text1
+GRAPH X=0 Y=70 W=400 H=30 POINTS=200 SENSOR=NETWORK FORMAT="%in" COLOR=192,192,192 MAX=50 NAME=graph1
+
+TEXT x=0 Y=100 w=600 h=20 VALUE="getGraphPos & moveGraph" name=text2
+GRAPH X=0 Y=120 W=200 H=30 POINTS=200 SENSOR=NETWORK FORMAT="%in" COLOR=192,192,192 MAX=50 NAME=graph2
+
+TEXT x=0 Y=150 w=600 h=20 VALUE="hideGraph & showGraph" name=text3
+GRAPH X=0 Y=170 W=200 H=30 POINTS=200 SENSOR=NETWORK FORMAT="%in" COLOR=192,192,192 MAX=50 NAME=graph3
+
+TEXT x=0 Y=200 w=600 h=20 VALUE="getGraphSensor & setGraphSensor" name=text4
+GRAPH X=0 Y=220 W=200 H=30 POINTS=200 SENSOR=NETWORK FORMAT="%in" COLOR=192,192,192 MAX=50 NAME=graph4
+
+TEXT x=0 Y=250 w=600 h=20 VALUE="getGraphMinMax & setGraphMinMax" name=text5
+GRAPH X=0 Y=270 W=200 H=30 POINTS=200 SENSOR=NETWORK FORMAT="%in" COLOR=192,192,192 MAX=50 NAME=graph5
+
+TEXT x=0 Y=300 w=600 h=20 VALUE="getGraphValue & setGraphValue" name=text6
+GRAPH X=0 Y=320 W=200 H=30 POINTS=200 COLOR=192,192,192 NAME=graph6 MAX=30
+
+TEXT x=0 Y=350 w=600 h=20 VALUE="getGraphColor & setGraphColor" name=text7
+GRAPH X=0 Y=370 W=200 H=30 POINTS=200 SENSOR=NETWORK FORMAT="%in" COLOR=192,192,192 MAX=50 NAME=graph7
diff --git a/superkaramba/examples/image/flag.png b/superkaramba/examples/image/flag.png
new file mode 100644
index 0000000..0e3c9b5
--- /dev/null
+++ b/superkaramba/examples/image/flag.png
Binary files differ
diff --git a/superkaramba/examples/image/flag2.png b/superkaramba/examples/image/flag2.png
new file mode 100644
index 0000000..4946213
--- /dev/null
+++ b/superkaramba/examples/image/flag2.png
Binary files differ
diff --git a/superkaramba/examples/image/image.py b/superkaramba/examples/image/image.py
new file mode 100644
index 0000000..97656eb
--- /dev/null
+++ b/superkaramba/examples/image/image.py
@@ -0,0 +1,121 @@
+#this import statement allows access to the karamba functions
+import karamba
+
+images = [0,0,0,0,0,0,0,0,0,0,0,0,0,0]
+c = 0
+
+#this is called when you widget is initialized
+def initWidget(widget):
+ global images
+ images[0] = karamba.getThemeImage(widget, "image0")
+ images[1] = karamba.getThemeImage(widget, "image1")
+ images[2] = karamba.getThemeImage(widget, "image2")
+ images[3] = karamba.getThemeImage(widget, "image3")
+ images[4] = karamba.getThemeImage(widget, "image4")
+ images[5] = karamba.getThemeImage(widget, "image5")
+ images[6] = karamba.getThemeImage(widget, "image6")
+ images[7] = karamba.getThemeImage(widget, "image7")
+ images[8] = karamba.getThemeImage(widget, "image8")
+ images[9] = karamba.getThemeImage(widget, "image9")
+ images[10] = karamba.getThemeImage(widget, "image10")
+ images[11] = karamba.getThemeImage(widget, "image11")
+ images[12] = karamba.getThemeImage(widget, "image12")
+ images[13] = karamba.getThemeImage(widget, "image13")
+
+#this is called everytime your widget is updated
+#the update inverval is specified in the .theme file
+def widgetUpdated(widget):
+ global images, c
+
+ b = c%2
+
+ # Create & delete
+ if(images[0]):
+ karamba.deleteImage(widget, images[0])
+ images[0] = 0
+ else:
+ images[0] = karamba.createImage(widget, 0, 20, "flag.png")
+
+ # Hide & Show
+ if(b):
+ karamba.hideImage(widget, images[1])
+ else:
+ karamba.showImage(widget, images[1])
+
+ # size & resize
+ size = karamba.getImageSize(widget, images[1])
+ print "getImageSize: " + str(size)
+ print "getImageWidth: " + str(karamba.getImageWidth(widget, images[1]))
+ print "getImageHeight: " + str(karamba.getImageHeight(widget, images[1]))
+ # Auto size
+ #size = ((b * 200) + 200, size[1])
+ #karamba.resizeImage(widget, images[1], size[0], size[1])
+
+ # pos & move
+ pos = karamba.getImagePos(widget, images[2])
+ print "getImagePos: " + str(pos)
+ pos = (b * 200, pos[1])
+ karamba.moveImage(widget, images[2], pos[0], pos[1])
+
+ # Sensor
+ sensor = karamba.getImageSensor(widget, images[3])
+ print "getSensor: " + str(sensor)
+ if(b):
+ karamba.setImageSensor(widget, images[3], 'SENSOR=PROGRAM PROGRAM="/tmp/test1.sh"')
+ else:
+ karamba.setImageSensor(widget, images[3], 'SENSOR=PROGRAM PROGRAM="/tmp/test2.sh"')
+
+ # Value
+ v = karamba.getImagePath(widget, images[4])
+ print "getImagePath: ", v
+ if(b):
+ v = 'flag.png'
+ else:
+ v = 'flag2.png'
+ karamba.setImagePath(widget, images[4], v)
+
+ if((c % 10) == 0):
+ karamba.removeImageEffects(widget, images[5])
+ karamba.removeImageEffects(widget, images[6])
+ karamba.removeImageEffects(widget, images[7])
+ else:
+ karamba.changeImageIntensity(widget, images[5], (float(c%10) / 5 - 1.0))
+ karamba.changeImageChannelIntensity(widget, images[6], (float(c%10) / 5 - 1.0), 'blue')
+ karamba.changeImageToGray(widget, images[7], 0)
+
+ if((c % 9) == 0):
+ karamba.removeImageTransformations(widget, images[8])
+ karamba.removeImageTransformations(widget, images[9])
+ karamba.removeImageTransformations(widget, images[10])
+ else:
+ karamba.rotateImage(widget, images[8], (c%9)*20 + 45)
+ karamba.resizeImage(widget, images[9], 50 + (c%5)*10, size[1])
+ karamba.resizeImageSmooth(widget, images[10], 50 + (c%5)*10, size[1])
+
+ if((c % 10) == 0):
+ karamba.addImageTooltip(widget, images[11], str(c))
+
+ if((c % 20) == 0):
+ if(images[12]):
+ karamba.deleteImage(widget, images[12])
+ images[12] = 0
+ else:
+ images[12] = karamba.createBackgroundImage(widget, 0, 340, "flag.png")
+
+ if(images[13]):
+ karamba.deleteImage(widget, images[13])
+ images[13] = 0
+ else:
+ tlist = karamba.getTaskList(widget)
+ images[13] = karamba.createTaskIcon(widget, 50, 340, tlist[c % len(tlist)])
+
+ c += 1
+
+def widgetClicked(widget, x, y, button):
+ pass
+
+def widgetMouseMoved(widget, x, y, button):
+ pass
+
+# This will be printed when the widget loads.
+print "Loaded Image test python extension!"
diff --git a/superkaramba/examples/image/image.theme b/superkaramba/examples/image/image.theme
new file mode 100644
index 0000000..99a3974
--- /dev/null
+++ b/superkaramba/examples/image/image.theme
@@ -0,0 +1,34 @@
+KARAMBA x=100 y=10 w=600 h=580 INTERVAL=1000 LOCKED=true
+DEFAULTFONT font="Bitstream Vera Sans" fontsize=16 color=200,200,200
+
+TEXT x=0 Y=0 w=600 h=20 VALUE="createImage & deleteImage" name=ttext0
+IMAGE x=0 Y=20 path="flag.png" name=image0
+
+TEXT x=0 Y=40 w=600 h=20 VALUE="showImage & hideImage" name=ttext1
+IMAGE x=0 Y=60 path="flag.png" name=image1
+
+TEXT x=0 Y=80 w=600 h=20 VALUE="getImagePos & moveImage" name=ttext2
+IMAGE x=0 Y=100 path="flag.png" name=image2
+
+TEXT x=0 Y=120 w=600 h=20 VALUE="getImageSensor & setImageSensor" name=ttext3
+IMAGE x=0 Y=140 path="flag.png" name=image3
+
+TEXT x=0 Y=160 w=600 h=20 VALUE="getImagePath & setImagePath" name=ttext4
+IMAGE x=0 Y=180 path="flag.png" name=image4
+
+TEXT x=0 Y=200 w=600 h=20 VALUE="removeImageEffects, changeImageIntensity, changeImageChannelIntensity, changeImageToGray" name=ttext5 fontsize=10
+IMAGE x=0 Y=220 path="flag.png" name=image5
+IMAGE x=50 Y=220 path="flag.png" name=image6
+IMAGE x=100 Y=220 path="flag.png" name=image7
+
+TEXT x=0 Y=240 w=600 h=20 VALUE="removeImageTransformations, rotateImage, resizeImageSmooth, resizeImage" name=ttext6 fontsize=10
+IMAGE x=0 Y=260 path="flag.png" name=image8
+IMAGE x=80 Y=260 path="flag.png" name=image9
+IMAGE x=160 Y=260 path="flag.png" name=image10
+
+TEXT x=0 Y=280 w=600 h=20 VALUE="addImageTooltip" name=ttext7
+IMAGE x=0 Y=300 path="flag.png" name=image11
+
+TEXT x=0 Y=320 w=600 h=20 VALUE="createBackgroundImage & createTaskIcon" name=ttext7
+IMAGE x=0 Y=340 path="flag.png" name=image12 BACKGROUND=1
+IMAGE x=50 Y=340 path="flag.png" name=image13
diff --git a/superkaramba/examples/image/test1.sh b/superkaramba/examples/image/test1.sh
new file mode 100755
index 0000000..28b1c79
--- /dev/null
+++ b/superkaramba/examples/image/test1.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+echo flag.png
diff --git a/superkaramba/examples/image/test2.sh b/superkaramba/examples/image/test2.sh
new file mode 100755
index 0000000..c3b75c6
--- /dev/null
+++ b/superkaramba/examples/image/test2.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+echo flag2.png
diff --git a/superkaramba/examples/input_api/input_api.py b/superkaramba/examples/input_api/input_api.py
new file mode 100644
index 0000000..59dc9ba
--- /dev/null
+++ b/superkaramba/examples/input_api/input_api.py
@@ -0,0 +1,185 @@
+#this import statement allows access to the karamba functions
+import karamba
+import os
+
+input1 = 0
+input2 = 0
+output = 0
+i = 0
+fontSize = 0
+
+#this is called when your widget is initialized
+def initWidget(widget):
+ global input1, input2, output, fontSize
+ #input = karamba.getThemeInputBox(widget, "input01")
+ input1 = karamba.createInputBox(widget,0,0,50,20,"foo")
+ input2 = karamba.createInputBox(widget,0,30,50,20,"bar")
+ fontSize = karamba.getInputBoxFontSize(widget, input2)
+ output = karamba.getThemeText(widget, "output01")
+ karamba.changeTextColor(widget, output, 0, 0, 0)
+ karamba.changeTextSize(widget, output, 10)
+ karamba.redrawWidget(widget)
+
+#This is called when your widget is closed. You can use this to clean
+#up open files, etc. You don't need to delete text and images in your
+#theme. That is done automatically. This callback is just for cleaning up
+#external things. Most people don't need to put anything here.
+def widgetClosed(widget):
+ pass
+
+#this is called everytime your widget is updated
+#the update inverval is specified in the .theme file
+def widgetUpdated(widget):
+ global input1, input2, i, fontSize
+ #Change the font in the input box
+ if i == 0:
+ karamba.changeInputBoxFont(widget, input1, "times" )
+ karamba.changeInputBoxFontColor(widget, input1, 0, 0, 0)
+ karamba.changeInputBoxBackgroundColor(widget, input1, 255,255,255)
+
+ karamba.changeInputBoxFrameColor(widget, input2, 0, 0, 255)
+ karamba.changeInputBoxFontSize(widget, input2, fontSize)
+ else:
+ karamba.changeInputBoxFont(widget, input1, "luxi sans" )
+ karamba.changeInputBoxFontColor(widget, input1, 255, 0, 0)
+ karamba.changeInputBoxBackgroundColor(widget, input1, 0, 0, 0)
+
+ karamba.changeInputBoxFrameColor(widget, input2, 255, 255, 255)
+ karamba.changeInputBoxFontSize(widget, input2, 14)
+
+ i += 1
+ if i == 2:
+ i = 0
+ karamba.redrawWidget(widget)
+
+#This gets called everytime our widget is clicked.
+#Notes:
+# widget = reference to our widget
+# x = x position (relative to our widget)
+# y = y position (relative to our widget)
+# botton = button clicked:
+# 1 = Left Mouse Button
+# 2 = Middle Mouse Button
+# 3 = Right Mouse Button, but this will never happen
+# because the right mouse button brings up the
+# Karamba menu.
+# 4,5 = Scroll wheel up and down
+def widgetClicked(widget, x, y, button):
+ pass
+
+#This gets called everytime our widget is clicked.
+#Notes
+# widget = reference to our widget
+# x = x position (relative to our widget)
+# y = y position (relative to our widget)
+# botton = button being held:
+# 0 = No Mouse Button
+# 1 = Left Mouse Button
+# 2 = Middle Mouse Button
+# 3 = Right Mouse Button, but this will never happen
+# because the right mouse button brings up the
+# Karamba menu.
+def widgetMouseMoved(widget, x, y, button):
+ #Warning: Don't do anything too intensive here
+ #You don't want to run some complex piece of code everytime the mouse moves
+ pass
+
+
+#This gets called when an item is clicked in a popup menu you have created.
+# menu = a reference to the menu
+# id = the number of the item that was clicked.
+def menuItemClicked(widget, menu, id):
+ pass
+
+#This gets called when an item is clicked in the theme CONFIGURATION menu,
+#not the popup menus that you create.
+# key = the reference to the configuration key that was changed
+# value = the new value (true or false) that was selected
+def menuOptionChanged(widget, key, value):
+ pass
+
+#This gets called when a meter (image, text, etc) is clicked.
+# NOTE you must use attachClickArea() to make a meter
+# clickable.
+# widget = reference to your theme
+# meter = the meter clicked
+# button = the button clicked (see widgetClicked for button numbers)
+def meterClicked(widget, meter, button):
+ pass
+
+#This gets called when a command you have executed with executeInteractive() outputs something
+#to stdout. This way you can get the output of for example kdialog without freezing up the widget
+#waiting for kdialog to end.
+# widget = reference to your theme
+# pid = process number of the program outputting (use this if you execute more than out process)
+# output = the text the program outputted to stdout
+def commandOutput(widget, pid, output):
+ pass
+
+#This gets called when an item is dropped on this widget.
+# NOTE you have to call acceptDrops() before your widget will accept drops.
+# widget = reference to your theme
+# dropText = the text of the dropped item (probably a URL to it's location in KDE)
+def itemDropped(widget, dropText):
+ pass
+
+
+#This gets called when a new program is LOADING in KDE. When it is done
+#loading, startupRemoved() is called, followed by taskAdded().
+# widget = reference to your widget
+# task = A refence to the task that is starting.
+def startupAdded(widget, startup):
+ pass
+
+#This gets called when a new program is done LOADING in KDE.
+# widget = reference to your widget
+# task = A refence to the task that just finished loading.
+def startupRemoved(widget, startup):
+ pass
+
+#This is called every time a new task (program) is started in KDE.
+# widget = reference to your widget
+# task = A refence to the new task. Call getTaskInfo() with this reference
+# to get the name, etc of this new task.
+def taskAdded(widget, task):
+ pass
+
+#This is called everytime a task (program) is closed in KDE.
+# widget = reference to your widget
+# task = A refence to the task.
+def taskRemoved(widget, task):
+ pass
+
+#This is called everytime a different task gains focus (IE, the user clicks
+#on a different window).
+# widget = reference to your widget
+# task = A refence to the task. Call getTaskInfo() with this reference
+# to get the name, etc of this new task.
+def activeTaskChanged(widget, task):
+ pass
+
+#This is called everytime the systray you created with createSystray() is updated
+def systrayUpdated(widget):
+ pass
+
+#This is called everytime the current desktop changes
+# widget = reference to your widget
+# desktop = the current desktop
+def desktopChanged(widget, desktop):
+ pass
+
+#This is called everytime the wallpaper changes on a desktop
+# widget = reference to your widget
+# desktop = the desktop whose wallpaper changed
+def wallpaperChanged(widget, desktop):
+ pass
+
+#This is called everytime there is a key press in any focused input field
+# widget = reference to your widget
+# meter = reference to an input box
+# char = the key that was pressed
+def keyPressed(widget, meter, char):
+ pass
+
+# This will be printed when the widget loads.
+print "Loaded my python extension!"
diff --git a/superkaramba/examples/input_api/input_api.theme b/superkaramba/examples/input_api/input_api.theme
new file mode 100644
index 0000000..2cb5ee3
--- /dev/null
+++ b/superkaramba/examples/input_api/input_api.theme
@@ -0,0 +1,5 @@
+KARAMBA x=0 y=0 w=100 h=50 INTERVAL=1000 LOCKED=true
+DEFAULTFONT font="Bitstream Vera Sans" fontsize=16 color=200,200,200
+
+#INPUT x=0 y=0 w=100 h=25 name=input01
+TEXT x=0 y=30 w=100 h=25 name=output01
diff --git a/superkaramba/examples/input_example/input_example.py b/superkaramba/examples/input_example/input_example.py
new file mode 100644
index 0000000..c0145c9
--- /dev/null
+++ b/superkaramba/examples/input_example/input_example.py
@@ -0,0 +1,169 @@
+#this import statement allows access to the karamba functions
+import karamba
+import os
+
+input = 0
+output = 0
+i = 0
+
+#this is called when your widget is initialized
+def initWidget(widget):
+ global input, output
+ #input = karamba.getThemeInputBox(widget, "input01")
+ input = karamba.createInputBox(widget,0,0,50,20,"foo")
+ output = karamba.getThemeText(widget, "output01")
+ karamba.changeTextColor(widget, output, 0, 0, 0)
+ karamba.changeTextSize(widget, output, 10)
+ karamba.redrawWidget(widget)
+
+#This is called when your widget is closed. You can use this to clean
+#up open files, etc. You don't need to delete text and images in your
+#theme. That is done automatically. This callback is just for cleaning up
+#external things. Most people don't need to put anything here.
+def widgetClosed(widget):
+ pass
+
+#this is called everytime your widget is updated
+#the update inverval is specified in the .theme file
+def widgetUpdated(widget):
+ pass
+
+#This gets called everytime our widget is clicked.
+#Notes:
+# widget = reference to our widget
+# x = x position (relative to our widget)
+# y = y position (relative to our widget)
+# botton = button clicked:
+# 1 = Left Mouse Button
+# 2 = Middle Mouse Button
+# 3 = Right Mouse Button, but this will never happen
+# because the right mouse button brings up the
+# Karamba menu.
+# 4,5 = Scroll wheel up and down
+def widgetClicked(widget, x, y, button):
+ pass
+
+#This gets called everytime our widget is clicked.
+#Notes
+# widget = reference to our widget
+# x = x position (relative to our widget)
+# y = y position (relative to our widget)
+# botton = button being held:
+# 0 = No Mouse Button
+# 1 = Left Mouse Button
+# 2 = Middle Mouse Button
+# 3 = Right Mouse Button, but this will never happen
+# because the right mouse button brings up the
+# Karamba menu.
+def widgetMouseMoved(widget, x, y, button):
+ #Warning: Don't do anything too intensive here
+ #You don't want to run some complex piece of code everytime the mouse moves
+ pass
+
+
+#This gets called when an item is clicked in a popup menu you have created.
+# menu = a reference to the menu
+# id = the number of the item that was clicked.
+def menuItemClicked(widget, menu, id):
+ pass
+
+#This gets called when an item is clicked in the theme CONFIGURATION menu,
+#not the popup menus that you create.
+# key = the reference to the configuration key that was changed
+# value = the new value (true or false) that was selected
+def menuOptionChanged(widget, key, value):
+ pass
+
+#This gets called when a meter (image, text, etc) is clicked.
+# NOTE you must use attachClickArea() to make a meter
+# clickable.
+# widget = reference to your theme
+# meter = the meter clicked
+# button = the button clicked (see widgetClicked for button numbers)
+def meterClicked(widget, meter, button):
+ pass
+
+#This gets called when a command you have executed with executeInteractive() outputs something
+#to stdout. This way you can get the output of for example kdialog without freezing up the widget
+#waiting for kdialog to end.
+# widget = reference to your theme
+# pid = process number of the program outputting (use this if you execute more than out process)
+# output = the text the program outputted to stdout
+def commandOutput(widget, pid, output):
+ pass
+
+#This gets called when an item is dropped on this widget.
+# NOTE you have to call acceptDrops() before your widget will accept drops.
+# widget = reference to your theme
+# dropText = the text of the dropped item (probably a URL to it's location in KDE)
+def itemDropped(widget, dropText):
+ pass
+
+
+#This gets called when a new program is LOADING in KDE. When it is done
+#loading, startupRemoved() is called, followed by taskAdded().
+# widget = reference to your widget
+# task = A refence to the task that is starting.
+def startupAdded(widget, startup):
+ pass
+
+#This gets called when a new program is done LOADING in KDE.
+# widget = reference to your widget
+# task = A refence to the task that just finished loading.
+def startupRemoved(widget, startup):
+ pass
+
+#This is called every time a new task (program) is started in KDE.
+# widget = reference to your widget
+# task = A refence to the new task. Call getTaskInfo() with this reference
+# to get the name, etc of this new task.
+def taskAdded(widget, task):
+ pass
+
+#This is called everytime a task (program) is closed in KDE.
+# widget = reference to your widget
+# task = A refence to the task.
+def taskRemoved(widget, task):
+ pass
+
+#This is called everytime a different task gains focus (IE, the user clicks
+#on a different window).
+# widget = reference to your widget
+# task = A refence to the task. Call getTaskInfo() with this reference
+# to get the name, etc of this new task.
+def activeTaskChanged(widget, task):
+ pass
+
+#This is called everytime the systray you created with createSystray() is updated
+def systrayUpdated(widget):
+ pass
+
+#This is called everytime the current desktop changes
+# widget = reference to your widget
+# desktop = the current desktop
+def desktopChanged(widget, desktop):
+ pass
+
+#This is called everytime the wallpaper changes on a desktop
+# widget = reference to your widget
+# desktop = the desktop whose wallpaper changed
+def wallpaperChanged(widget, desktop):
+ pass
+
+def keyPressed(widget, meter, char):
+ global input, output
+ if meter == input:
+ print "keyPressed: key= '", char, "'"
+ text = karamba.getInputBoxValue(widget, input)
+ karamba.changeText(widget, output, "Searched: " + text)
+ try:
+ if ord(char) == 13: # Enter
+ url = "konqueror leo:" + text
+ os.system(url + "&")
+ except TypeError:
+ print "There was a type error"
+ karamba.redrawWidget(widget)
+
+
+# This will be printed when the widget loads.
+print "Loaded my python extension!"
diff --git a/superkaramba/examples/input_example/input_example.theme b/superkaramba/examples/input_example/input_example.theme
new file mode 100644
index 0000000..2cb5ee3
--- /dev/null
+++ b/superkaramba/examples/input_example/input_example.theme
@@ -0,0 +1,5 @@
+KARAMBA x=0 y=0 w=100 h=50 INTERVAL=1000 LOCKED=true
+DEFAULTFONT font="Bitstream Vera Sans" fontsize=16 color=200,200,200
+
+#INPUT x=0 y=0 w=100 h=25 name=input01
+TEXT x=0 y=30 w=100 h=25 name=output01
diff --git a/superkaramba/examples/mouseDrag/karmix/images/bar.png b/superkaramba/examples/mouseDrag/karmix/images/bar.png
new file mode 100644
index 0000000..ac893be
--- /dev/null
+++ b/superkaramba/examples/mouseDrag/karmix/images/bar.png
Binary files differ
diff --git a/superkaramba/examples/mouseDrag/karmix/images/bg.png b/superkaramba/examples/mouseDrag/karmix/images/bg.png
new file mode 100644
index 0000000..a69b85b
--- /dev/null
+++ b/superkaramba/examples/mouseDrag/karmix/images/bg.png
Binary files differ
diff --git a/superkaramba/examples/mouseDrag/karmix/karmix.py b/superkaramba/examples/mouseDrag/karmix/karmix.py
new file mode 100644
index 0000000..225eefb
--- /dev/null
+++ b/superkaramba/examples/mouseDrag/karmix/karmix.py
@@ -0,0 +1,190 @@
+# Karmix 0.1
+# Written by Tian ( http://www.c-sait.net )
+# Functionality moved by Ryan Nickell (p0z3r@mail.com)
+
+# This theme is demonstrates how to use mouse buttons
+# being dragged in a theme.
+# It shows how to use it for slider bars, but you can
+# also apply this to anything you want like moving images
+# and other things programmatically.
+
+#this import statement allows access to the karamba functions
+import karamba
+
+import ossaudiodev
+
+mixer = ""
+onLeftButton = 0
+onMidButton = 0
+#this is called when you widget is initialized
+def initWidget(widget):
+ global mixer
+ mixer = ossaudiodev.openmixer()
+
+ vol_main = karamba.getThemeImage(widget, "vol_main")
+ (l, r) = mixer.get(ossaudiodev.SOUND_MIXER_VOLUME)
+ vol_main_value = max(l, r)
+ karamba.resizeImage(widget, vol_main, vol_main_value, 10)
+
+ vol_pcm = karamba.getThemeImage(widget, "vol_pcm")
+ (l, r) = mixer.get(ossaudiodev.SOUND_MIXER_PCM)
+ vol_pcm_value = max(l, r)
+ karamba.resizeImage(widget, vol_pcm, vol_pcm_value, 10)
+
+ vol_cd = karamba.getThemeImage(widget, "vol_cd")
+ (l, r) = mixer.get(ossaudiodev.SOUND_MIXER_CD)
+ vol_cd_value = max(l, r)
+ karamba.resizeImage(widget, vol_cd, vol_cd_value, 10)
+
+ vol_mic = karamba.getThemeImage(widget, "vol_mic")
+ (l, r) = mixer.get(ossaudiodev.SOUND_MIXER_MIC)
+ vol_mic_value = max(l, r)
+ karamba.resizeImage(widget, vol_mic, vol_mic_value, 10)
+
+ karamba.redrawWidget(widget)
+
+#this is called everytime your widget is updated
+#the update inverval is specified in the .theme file
+def widgetUpdated(widget):
+ pass
+
+#This gets called everytime our widget is clicked.
+#Notes:
+# widget = reference to our widget
+# x = x position (relative to our widget)
+# y = y position (relative to our widget)
+# botton = button clicked:
+# 1 = Left Mouse Button
+# 2 = Middle Mouse Button
+# 3 = Right Mouse Button, but this will never happen
+# because the right mouse button brings up the
+# Karamba menu.
+# 4,5 = Scroll wheel up and down
+def widgetClicked(widget, x, y, button):
+ pass
+
+#This gets called everytime our widget is clicked.
+#Notes
+# widget = reference to our widget
+# x = x position (relative to our widget)
+# y = y position (relative to our widget)
+# botton = button being held:
+# 0 = No Mouse Button
+# 1 = Left Mouse Button
+# 2 = Middle Mouse Button
+# 3 = Right Mouse Button, but this will never happen
+# because the right mouse button brings up the
+# Karamba menu.
+def widgetMouseMoved(widget, x, y, button):
+ global onMidButton,onLeftButton
+ global mixer
+ if(button == 1 and onLeftButton == 0):
+ # We are holding the left button here
+ if ((y>=17) and (y<=28)):
+ vol_main = karamba.getThemeImage(widget, "vol_main")
+ vol_main_value = max(min(x-40,100),0)
+ karamba.resizeImage(widget, vol_main, vol_main_value, 10)
+ mixer.set(ossaudiodev.SOUND_MIXER_VOLUME, (vol_main_value, vol_main_value))
+ karamba.redrawWidget(widget)
+
+ if ((y>=47) and (y<=58)):
+ vol_pcm = karamba.getThemeImage(widget, "vol_pcm")
+ vol_pcm_value = max(min(x-40,100),0)
+ karamba.resizeImage(widget, vol_pcm, vol_pcm_value, 10)
+ mixer.set(ossaudiodev.SOUND_MIXER_PCM, (vol_pcm_value, vol_pcm_value))
+ karamba.redrawWidget(widget)
+
+ if ((y>=77) and (y<=88)):
+ vol_cd = karamba.getThemeImage(widget, "vol_cd")
+ vol_cd_value = max(min(x-40,100),0)
+ karamba.resizeImage(widget, vol_cd, vol_cd_value, 10)
+ mixer.set(ossaudiodev.SOUND_MIXER_CD, (vol_cd_value, vol_cd_value))
+ karamba.redrawWidget(widget)
+
+ if ((y>=107) and (y<=118)):
+ vol_mic = karamba.getThemeImage(widget, "vol_mic")
+ vol_mic_value = max(min(x-40,100),0)
+ karamba.resizeImage(widget, vol_mic, vol_mic_value, 10)
+ mixer.set(ossaudiodev.SOUND_MIXER_MIC, (vol_mic_value, vol_mic_value))
+ karamba.redrawWidget(widget)
+
+ if(button == 2 and onMidButton == 0):
+ # We are holding the middle button here
+ pass
+
+#This gets called when an item is clicked in a popup menu you have created.
+# menu = a reference to the menu
+# id = the number of the item that was clicked.
+def menuItemClicked(widget, menu, id):
+ pass
+
+#This gets called when an item is clicked in the theme CONFIGURATION menu,
+#not the popup menus that you create.
+# key = the reference to the configuration key that was changed
+# value = the new value (true or false) that was selected
+def menuOptionChanged(widget, key, value):
+ pass
+
+#This gets called when a meter (image, text, etc) is clicked.
+# NOTE you must use attachClickArea() to make a meter
+# clickable.
+# widget = reference to your theme
+# meter = the meter clicked
+# button = the button clicked (see widgetClicked for button numbers)
+def meterClicked(widget, meter, button):
+ pass
+
+#This gets called when a command you have executed with executeInteractive() outputs something
+#to stdout. This way you can get the output of for example kdialog without freezing up the widget
+#waiting for kdialog to end.
+# widget = reference to your theme
+# pid = process number of the program outputting (use this if you execute more than out process)
+# output = the text the program outputted to stdout
+def commandOutput(widget, pid, output):
+ pass
+
+#This gets called when an item is dropped on this widget.
+# NOTE you have to call acceptDrops() before your widget will accept drops.
+# widget = reference to your theme
+# dropText = the text of the dropped item (probably a URL to it's location in KDE)
+def itemDropped(widget, dropText):
+ pass
+
+
+#This gets called when a new program is LOADING in KDE. When it is done
+#loading, startupRemoved() is called, followed by taskAdded().
+# widget = reference to your widget
+# task = A refence to the task that is starting.
+def startupAdded(widget, startup):
+ pass
+
+#This gets called when a new program is done LOADING in KDE.
+# widget = reference to your widget
+# task = A refence to the task that just finished loading.
+def startupRemoved(widget, startup):
+ pass
+
+#This is called every time a new task (program) is started in KDE.
+# widget = reference to your widget
+# task = A refence to the new task. Call getTaskInfo() with this reference
+# to get the name, etc of this new task.
+def taskAdded(widget, task):
+ pass
+
+#This is called everytime a task (program) is closed in KDE.
+# widget = reference to your widget
+# task = A refence to the task.
+def taskRemoved(widget, task):
+ pass
+
+#This is called everytime a different task gains focus (IE, the user clicks
+#on a different window).
+# widget = reference to your widget
+# task = A refence to the task. Call getTaskInfo() with this reference
+# to get the name, etc of this new task.
+def activeTaskChanged(widget, task):
+ pass
+
+# This will be printed when the widget loads.
+print "Loaded my python extension!"
+
diff --git a/superkaramba/examples/mouseDrag/karmix/karmix.theme b/superkaramba/examples/mouseDrag/karmix/karmix.theme
new file mode 100644
index 0000000..3844663
--- /dev/null
+++ b/superkaramba/examples/mouseDrag/karmix/karmix.theme
@@ -0,0 +1,17 @@
+# Karmix 0.1
+# Written by Tian ( http://www.c-sait.net )
+
+karamba x=0 y=0 w=160 h=139 locked=true
+image x=0 y=0 path="images/bg.png"
+
+text x=10 y=15 value="Vol" color=252,252,252 fontsize=12 font="sans"
+image x=40 y=17 path="images/bar.png" name="vol_main"
+
+text x=10 y=45 value="Pcm" color=252,252,252 fontsize=12 font="sans"
+image x=40 y=47 path="images/bar.png" name="vol_pcm"
+
+text x=10 y=75 value="CD" color=252,252,252 fontsize=12 font="sans"
+image x=40 y=77 path="images/bar.png" name="vol_cd"
+
+text x=10 y=105 value="Mic" color=252,252,252 fontsize=12 font="sans"
+image x=40 y=107 path="images/bar.png" name="vol_mic"
diff --git a/superkaramba/examples/mouseDrop/mousedrop.py b/superkaramba/examples/mouseDrop/mousedrop.py
new file mode 100644
index 0000000..521f0ee
--- /dev/null
+++ b/superkaramba/examples/mouseDrop/mousedrop.py
@@ -0,0 +1,138 @@
+# Drop Detect
+# Written by Luke Kenneth Casson Leighton <lkcl@lkcl.net>
+
+# This theme is demonstrates how to
+
+#this import statement allows access to the karamba functions
+import karamba
+
+drop_txt = None
+
+#this is called when you widget is initialized
+def initWidget(widget):
+
+ karamba.acceptDrops(widget)
+ karamba.redrawWidget(widget)
+
+#this is called everytime your widget is updated
+#the update inverval is specified in the .theme file
+def widgetUpdated(widget):
+ pass
+
+#This gets called everytime our widget is clicked.
+#Notes:
+# widget = reference to our widget
+# x = x position (relative to our widget)
+# y = y position (relative to our widget)
+# botton = button clicked:
+# 1 = Left Mouse Button
+# 2 = Middle Mouse Button
+# 3 = Right Mouse Button, but this will never happen
+# because the right mouse button brings up the
+# Karamba menu.
+# 4,5 = Scroll wheel up and down
+def widgetClicked(widget, x, y, button):
+ pass
+
+#This gets called everytime our widget is clicked.
+#Notes
+# widget = reference to our widget
+# x = x position (relative to our widget)
+# y = y position (relative to our widget)
+# botton = button being held:
+# 0 = No Mouse Button
+# 1 = Left Mouse Button
+# 2 = Middle Mouse Button
+# 3 = Right Mouse Button, but this will never happen
+# because the right mouse button brings up the
+# Karamba menu.
+def widgetMouseMoved(widget, x, y, button):
+ pass
+
+#This gets called when an item is clicked in a popup menu you have created.
+# menu = a reference to the menu
+# id = the number of the item that was clicked.
+def menuItemClicked(widget, menu, id):
+ pass
+
+#This gets called when an item is clicked in the theme CONFIGURATION menu,
+#not the popup menus that you create.
+# key = the reference to the configuration key that was changed
+# value = the new value (true or false) that was selected
+def menuOptionChanged(widget, key, value):
+ pass
+
+#This gets called when a meter (image, text, etc) is clicked.
+# NOTE you must use attachClickArea() to make a meter
+# clickable.
+# widget = reference to your theme
+# meter = the meter clicked
+# button = the button clicked (see widgetClicked for button numbers)
+def meterClicked(widget, meter, button):
+ pass
+
+#This gets called when a command you have executed with executeInteractive() outputs something
+#to stdout. This way you can get the output of for example kdialog without freezing up the widget
+#waiting for kdialog to end.
+# widget = reference to your theme
+# pid = process number of the program outputting (use this if you execute more than out process)
+# output = the text the program outputted to stdout
+def commandOutput(widget, pid, output):
+ pass
+
+#This gets called when an item is dropped on this widget.
+# NOTE you have to call acceptDrops() before your widget will accept drops.
+# widget = reference to your theme
+# dropText = the text of the dropped item (probably a URL to it's location in KDE)
+# x and y are coordinates of mouse where the drop occurred.
+# this you can use to e.g. detect which icon or object in your
+# theme that someone wants to "receive" the icon you were dragging
+def itemDropped(widget, dropText, x, y):
+ global drop_txt
+ # delete previous text if exists.
+ if drop_txt is not None:
+ karamba.deleteText(widget, drop_txt)
+
+ disp = "x:%d y:%d command: %s" % (x, y, dropText)
+ drop_txt = karamba.createText(widget, 10, 40, 500, 20, disp)
+ karamba.changeTextColor(widget, drop_txt, 252,252,252)
+
+ karamba.redrawWidget(widget)
+
+#This gets called when a new program is LOADING in KDE. When it is done
+#loading, startupRemoved() is called, followed by taskAdded().
+# widget = reference to your widget
+# task = A refence to the task that is starting.
+def startupAdded(widget, startup):
+ pass
+
+#This gets called when a new program is done LOADING in KDE.
+# widget = reference to your widget
+# task = A refence to the task that just finished loading.
+def startupRemoved(widget, startup):
+ pass
+
+#This is called every time a new task (program) is started in KDE.
+# widget = reference to your widget
+# task = A refence to the new task. Call getTaskInfo() with this reference
+# to get the name, etc of this new task.
+def taskAdded(widget, task):
+ pass
+
+#This is called everytime a task (program) is closed in KDE.
+# widget = reference to your widget
+# task = A refence to the task.
+def taskRemoved(widget, task):
+ pass
+
+#This is called everytime a different task gains focus (IE, the user clicks
+#on a different window).
+# widget = reference to your widget
+# task = A refence to the task. Call getTaskInfo() with this reference
+# to get the name, etc of this new task.
+def activeTaskChanged(widget, task):
+ pass
+
+# This will be printed when the widget loads.
+print "Loaded my python extension!"
+
diff --git a/superkaramba/examples/mouseDrop/mousedrop.theme b/superkaramba/examples/mouseDrop/mousedrop.theme
new file mode 100644
index 0000000..6b483d3
--- /dev/null
+++ b/superkaramba/examples/mouseDrop/mousedrop.theme
@@ -0,0 +1,5 @@
+# simple test of drop receipt, including location.
+
+karamba x=0 y=0 w=600 h=140 locked=true color=0,50,0
+text x=10 y=10 value="Drag a desktop icon on me and i will tell you where" color=252,252,252 fontsize=12 font="sans"
+
diff --git a/superkaramba/examples/openCloseTheme/1.py b/superkaramba/examples/openCloseTheme/1.py
new file mode 100644
index 0000000..26281aa
--- /dev/null
+++ b/superkaramba/examples/openCloseTheme/1.py
@@ -0,0 +1,22 @@
+import dcop
+import dcopext
+import karamba
+from qt import QString, QCString
+
+def closeTheme(theme):
+ dc = dcop.DCOPClient()
+ dc.attach()
+ dc.registerAs('sk_script')
+ apps = dc.registeredApplications()
+ for app in apps:
+ s = str(app)
+ if s[:12] == 'superkaramba':
+ d = dcopext.DCOPApp(s, dc)
+ d.KarambaIface.closeTheme(theme)
+
+def initWidget(widget):
+ karamba.openTheme('2.theme')
+
+def widgetClicked(widget, x, y, button):
+ closeTheme('1')
+
diff --git a/superkaramba/examples/openCloseTheme/1.theme b/superkaramba/examples/openCloseTheme/1.theme
new file mode 100644
index 0000000..5184f0a
--- /dev/null
+++ b/superkaramba/examples/openCloseTheme/1.theme
@@ -0,0 +1,2 @@
+KARAMBA x=200 y=50 w=100 h=20 INTERVAL=1000 LOCKED=true
+TEXT x=0 Y=0 w=300 h=20 value="Theme 1"
diff --git a/superkaramba/examples/openCloseTheme/2.theme b/superkaramba/examples/openCloseTheme/2.theme
new file mode 100644
index 0000000..7298850
--- /dev/null
+++ b/superkaramba/examples/openCloseTheme/2.theme
@@ -0,0 +1,2 @@
+KARAMBA x=200 y=100 w=100 h=20 INTERVAL=1000 LOCKED=true
+TEXT x=0 Y=0 w=300 h=20 value="Theme2"
diff --git a/superkaramba/examples/popupMenu/calendar.png b/superkaramba/examples/popupMenu/calendar.png
new file mode 100644
index 0000000..fc0e466
--- /dev/null
+++ b/superkaramba/examples/popupMenu/calendar.png
Binary files differ
diff --git a/superkaramba/examples/popupMenu/popupMenu.png b/superkaramba/examples/popupMenu/popupMenu.png
new file mode 100644
index 0000000..330fc25
--- /dev/null
+++ b/superkaramba/examples/popupMenu/popupMenu.png
Binary files differ
diff --git a/superkaramba/examples/popupMenu/popupMenu.py b/superkaramba/examples/popupMenu/popupMenu.py
new file mode 100644
index 0000000..8df5aef
--- /dev/null
+++ b/superkaramba/examples/popupMenu/popupMenu.py
@@ -0,0 +1,117 @@
+#this import statement allows access to the karamba functions
+import karamba
+
+menu1 = 0
+menu2 = 0
+id1 = 0
+id2 = 0
+id3 = 0
+id4 = 0
+id5 = 0
+
+#this is called when you widget is initialized
+def initWidget(widget):
+ global menu1
+ global menu2
+ global id1
+ global id2
+ global id3
+ global id4
+ global id5
+
+ menu1 = karamba.createMenu(widget)
+ print "menu 1 created!"
+ menu2 = karamba.createMenu(widget)
+ print "menu 2 created!"
+
+ id1 = karamba.addMenuItem(widget, menu1, "menu 1 first item", "kword")
+ print "item 1 entered in menu 1"
+ id2 = karamba.addMenuItem(widget, menu1, "menu 1 second item", "kate")
+ print "item 2 entered in menu 1"
+
+ id3 = karamba.addMenuItem(widget, menu2, "menu 2 first item", "kword")
+ print "item 1 entered in menu 2"
+ id4 = karamba.addMenuItem(widget, menu2, "menu 2 second item", "kate")
+ print "item 2 entered in menu 2"
+ id5 = karamba.addMenuItem(widget, menu2, "menu 2 third item", "/opt/kde/share/icons/kdeclassic/16x16/apps/kicker.png")
+ print "item 3 entered in menu 2"
+
+
+
+#this is called everytime your widget is updated
+#the update inverval is specified in the .theme file
+def widgetUpdated(widget):
+ pass
+
+
+#This gets called everytime our widget is clicked.
+#Notes:
+# widget = reference to our widget
+# x = x position (relative to our widget)
+# y = y position (relative to our widget)
+# botton = button clicked:
+# 1 = Left Mouse Button
+# 2 = Middle Mouse Button
+# 3 = Right Mouse Button, but this will never happen
+# because the right mouse button brings up the
+# Karamba menu.
+# 4,5 = Scroll wheel up and down
+def widgetClicked(widget, x, y, button):
+ global menu1
+ global menu2
+
+ if(button == 1):
+ karamba.popupMenu(widget, menu1, -100, -100)
+ elif(button == 2):
+ karamba.popupMenu(widget, menu2, 200, 200)
+
+
+#This gets called everytime our widget is clicked.
+#Notes
+# widget = reference to our widget
+# x = x position (relative to our widget)
+# y = y position (relative to our widget)
+# botton = button being held:
+# 0 = No Mouse Button
+# 1 = Left Mouse Button
+# 2 = Middle Mouse Button
+# 3 = Right Mouse Button, but this will never happen
+# because the right mouse button brings up the
+# Karamba menu.
+def widgetMouseMoved(widget, x, y, button):
+ #Warning: Don't do anything too intensive here
+ #You don't want to run some complex piece of code everytime the mouse moves
+ pass
+
+
+def menuItemClicked(widget, menu, id):
+ global menu1
+ global menu2
+ global id1
+ global id2
+ global id3
+ global id4
+ global id5
+
+ if (menu == menu1):
+ if(id == id1):
+ print "item 1 in menu 1 clicked."
+ elif(id == id2):
+ print "item 2 in menu 1 clicked, removing item 2 in menu 2"
+ karamba.removeMenuItem(widget, menu2, id4)
+ elif (menu == menu2):
+ if(id == id3):
+ print "item 1 in menu 2 clicked."
+ elif(id == id4):
+ print "item 2 in menu 2 clicked, deleting menu 1 (if menu1 still exists...)"
+ karamba.deleteMenu(widget, menu1)
+ elif(id == id5):
+ print "item 3 in menu 2 clicked, removing item 2 in menu 1 (if menu1 still exists...)"
+ karamba.removeMenuItem(widget, menu1, id2)
+
+
+
+# This will be printed when the widget loads.
+print "Loaded my python extension!"
+
+
diff --git a/superkaramba/examples/popupMenu/popupMenu.theme b/superkaramba/examples/popupMenu/popupMenu.theme
new file mode 100644
index 0000000..5c597f4
--- /dev/null
+++ b/superkaramba/examples/popupMenu/popupMenu.theme
@@ -0,0 +1,4 @@
+
+KARAMBA X=200 Y=200 W=390 H=220 LOCKED=true INTERVAL=1000 ONTOP=false
+
+IMAGE X=0 Y=0 PATH="popupMenu.png"
diff --git a/superkaramba/examples/richtext/info.png b/superkaramba/examples/richtext/info.png
new file mode 100644
index 0000000..43b0297
--- /dev/null
+++ b/superkaramba/examples/richtext/info.png
Binary files differ
diff --git a/superkaramba/examples/richtext/penguin_executive.png b/superkaramba/examples/richtext/penguin_executive.png
new file mode 100644
index 0000000..6f855d3
--- /dev/null
+++ b/superkaramba/examples/richtext/penguin_executive.png
Binary files differ
diff --git a/superkaramba/examples/richtext/richtext.py b/superkaramba/examples/richtext/richtext.py
new file mode 100644
index 0000000..518aa65
--- /dev/null
+++ b/superkaramba/examples/richtext/richtext.py
@@ -0,0 +1,136 @@
+#Unicode Example
+
+#For Symbol Tables look at www.unicode.org/charts/
+
+hidden = 0
+
+penguin = 0
+penguin_hidden = 1
+
+#this import statement allows access to the karamba functions
+import karamba
+
+#this is called when you widget is initialized
+def initWidget(widget):
+ global richtext
+ global penguin
+
+ karamba.resizeWidget(widget, 360, 520)
+
+ penguin = karamba.createImage(widget, 250, 150, karamba.getThemePath(widget) + "/penguin_executive.png")
+ karamba.hideImage(widget, penguin)
+
+
+ text = """
+<h1>Richtext Example</h1>
+<p>A rich text object allows to display a string interpreted as rich text.
+To create a rich text object use the command:<br> <p align="center">karamba.createRichText(widget, text)</p>
+A simple subset of <a href="kfmclient openURL http://www.selfhtml.org"><font color="black"><i>HTML</i></font></a>-tags
+is used to encode the formatting commands.</p>
+<p><font size=+2>Some features:</font>
+<ul>
+<li>Numbered and unnumbered lists</li>
+<li>Inline Images <img src=\"""" + karamba.getThemePath(widget) + u"""info.png\"</li>
+<li>Various <font color="red">different</font><font color="blue"> text</font><font color="green"> colours</font></li>
+<li>Hyperlinks: <a href="kfmclient openURL http://netdragon.sourceforge.net"> Superkaramba Homepage</a></li>
+<li>Links can also <a href="#trigger">trigger</a> actions in the script</li>
+<li><i>Various</i> <b>different</b> <u>caracter</u> <s>styles</s></li>
+<li><a href="kfmclient openURL http://www.unicode.org">Unicode</a>: \u03B6 \u03B3 \u03BB \u03A3 \u03A9 </li>
+<li>Simple Tables:
+<table bgcolor="darkgray" border="1" width="80%">
+<tr><th colspan="3">Header</th></tr>
+<tr><td>Cell (1,1)</td><td>Cell (1,2)</td><td>Cell (1,3)</td><tr>
+<tr><td>Cell (2,1)</td><td>Cell (2,2)</td><td>Cell (2,3)</td><tr>
+</table></li>
+</ul>
+For a complete documentation of all supported tags look at:
+<a href="kfmclient openURL http://doc.trolltech.com/3.0/qstylesheet.html">
+http://doc.trolltech.com/3.0/qstylesheet.html</a>.
+</p><br>
+"""
+
+ richtext = karamba.createRichText(widget, text)
+
+ karamba.moveRichText(widget, richtext, 10, 10)
+
+ print "richText Size = ", karamba.getRichTextSize(widget, richtext)
+
+ karamba.setRichTextWidth(widget, richtext, 345)
+
+ #karamba.deleteRichText(widget, richtext)
+
+ karamba.redrawWidget(widget)
+
+
+
+
+#this is called everytime your widget is updated
+#the update inverval is specified in the .theme file
+def widgetUpdated(widget):
+ global hidden
+ global richtext
+
+ #if hidden == 0:
+ # hidden = 1
+ # karamba.hideRichText(widget, richtext)
+ #else:
+ # hidden = 0
+ # karamba.showRichText(widget, richtext)
+
+
+#This gets called everytime our widget is clicked.
+#Notes:
+# widget = reference to our widget
+# x = x position (relative to our widget)
+# y = y position (relative to our widget)
+# botton = button clicked:
+# 1 = Left Mouse Button
+# 2 = Middle Mouse Button
+# 3 = Right Mouse Button, but this will never happen
+# because the right mouse button brings up the
+# Karamba menu.
+# 4,5 = Scroll wheel up and down
+def widgetClicked(widget, x, y, button):
+ global richtext
+ global hidden
+
+ #hidden = 0
+ #karamba.showRichText(widget, richtext)
+
+ #karamba.changeRichText(widget, richtext, "hihi\n huhu")
+
+def meterClicked(widget, meter, button):
+ global penguin
+ global penguin_hidden
+ global richtext
+
+ print "Meter clicked", meter
+ if meter == "trigger":
+ if penguin_hidden:
+ karamba.showImage(widget, penguin)
+ penguin_hidden = 0
+ else:
+ karamba.hideImage(widget, penguin)
+ penguin_hidden = 1
+ if meter == "delete":
+ karamba.deleteRichText(widget, richtext)
+
+ karamba.redrawWidget(widget)
+
+#This gets called everytime our widget is clicked.
+#Notes
+# widget = reference to our widget
+# x = x position (relative to our widget)
+# y = y position (relative to our widget)
+# botton = button being held:
+# 0 = No Mouse Button
+# 1 = Left Mouse Button
+# 2 = Middle Mouse Button
+# 3 = Right Mouse Button, but this will never happen
+# because the right mouse button brings up the
+# Karamba menu.
+def widgetMouseMoved(widget, x, y, button):
+ pass
+
+# This will be printed when the widget loads.
+print "Loaded Karamba Unicode Test"
diff --git a/superkaramba/examples/richtext/richtext.theme b/superkaramba/examples/richtext/richtext.theme
new file mode 100644
index 0000000..1fae0ec
--- /dev/null
+++ b/superkaramba/examples/richtext/richtext.theme
@@ -0,0 +1 @@
+KARAMBA X=80 Y=20 W=400 H=500 LOCKED=true INTERVAL=2000
diff --git a/superkaramba/examples/richtext/rtext.py b/superkaramba/examples/richtext/rtext.py
new file mode 100644
index 0000000..68c800a
--- /dev/null
+++ b/superkaramba/examples/richtext/rtext.py
@@ -0,0 +1,99 @@
+#!/usr/bin/python
+# -*- coding: latin-1 -*-
+#this import statement allows access to the karamba functions
+import karamba
+
+align = ['LEFT', 'CENTER', 'RIGHT']
+texts = [0,0,0,0,0,0,0,0,0,0,0]
+b = 0
+a = 0
+
+#this is called when you widget is initialized
+def initWidget(widget):
+ global texts, b
+ texts[0] = karamba.getThemeRichText(widget, "text0")
+ texts[1] = karamba.getThemeRichText(widget, "text1")
+ texts[2] = karamba.getThemeRichText(widget, "text2")
+ texts[3] = karamba.getThemeRichText(widget, "text3")
+ texts[4] = karamba.getThemeRichText(widget, "text4")
+ texts[5] = karamba.getThemeRichText(widget, "text5")
+ texts[7] = karamba.getThemeRichText(widget, "text7")
+ texts[9] = karamba.getThemeRichText(widget, "text9")
+
+
+#this is called everytime your widget is updated
+#the update inverval is specified in the .theme file
+def widgetUpdated(widget):
+ global texts, b, a
+
+ b = (b+1)%2
+ text = "Unicode text: Ähtärissä on Öljyä"
+
+ # Create & delete
+ if(texts[0]):
+ karamba.deleteRichText(widget, texts[0])
+ texts[0] = 0
+ else:
+ texts[0] = karamba.createRichText(widget, text)
+ karamba.moveRichText(widget, texts[0], 0, 20)
+ karamba.resizeRichText(widget, texts[0], 200, 20)
+ pos = karamba.getRichTextPos(widget, texts[0])
+ print "--getRichTextPos: " + str(pos)
+ size = karamba.getRichTextSize(widget, texts[0])
+ print "--getRichTextSize: " + str(size)
+
+ # size & resize
+ size = karamba.getRichTextSize(widget, texts[1])
+ print "getRichTextSize: " + str(size)
+ size = ((b * 200) + 200, size[1])
+ karamba.resizeRichText(widget, texts[1], size[0], size[1])
+
+ # pos & move
+ pos = karamba.getRichTextPos(widget, texts[2])
+ print "getRichTextPos: " + str(pos)
+ pos = (b * 200, pos[1])
+ karamba.moveRichText(widget, texts[2], pos[0], pos[1])
+
+ # Hide & Show
+ if(b):
+ karamba.hideRichText(widget, texts[3])
+ else:
+ karamba.showRichText(widget, texts[3])
+
+ # Sensor
+ sensor = karamba.getRichTextSensor(widget, texts[4])
+ print "getSensor: " + str(sensor)
+ if(b):
+ karamba.setRichTextSensor(widget, texts[4], 'SENSOR=SENSOR TYPE="cpu_temp"')
+ else:
+ karamba.setRichTextSensor(widget, texts[4], 'SENSOR=CPU')
+
+ # Value
+ v = karamba.getRichTextValue(widget, texts[5])
+ print "getRichTextValue: ", v
+ v += '.'
+ karamba.changeRichText(widget, texts[5], v)
+
+ # Font size
+ v = karamba.getRichTextFontSize(widget, texts[7])
+ print "getRichTextFontSize: ", v
+ v = 10 + ((v-10)+1)%10;
+ karamba.changeRichTextSize(widget, texts[7], v)
+
+ # RichText Font
+ v = karamba.getRichTextFont(widget, texts[9])
+ print "getRichTextFont: ", v
+ if(b):
+ v = 'Bitstream Vera Sans'
+ else:
+ v = 'Bitstream Vera Serif'
+ karamba.changeRichTextFont(widget, texts[9], v)
+
+def widgetClicked(widget, x, y, button):
+ pass
+
+def widgetMouseMoved(widget, x, y, button):
+ pass
+
+# This will be printed when the widget loads.
+print "Loaded RichText test python extension!"
diff --git a/superkaramba/examples/richtext/rtext.theme b/superkaramba/examples/richtext/rtext.theme
new file mode 100644
index 0000000..487065d
--- /dev/null
+++ b/superkaramba/examples/richtext/rtext.theme
@@ -0,0 +1,26 @@
+KARAMBA x=100 y=10 w=600 h=580 INTERVAL=1000 LOCKED=true
+DEFAULTFONT font="Bitstream Vera Sans" fontsize=16 color=200,200,200
+
+TEXT x=0 Y=0 w=600 h=20 VALUE="createRichText & deleteRichText" name=ttext0
+RICHTEXT x=0 Y=20 w=200 h=20 value="RichText meter" min=0 max=100 name=text0
+
+TEXT x=0 Y=45 w=600 h=20 VALUE="getRichTextSize & resizeRichText" name=ttext1
+RICHTEXT x=0 Y=65 w=200 h=20 value="The quick brown <b>fox</b> jumps over the lazy <i>dog</i>" min=0 max=100 name=text1
+
+TEXT x=0 Y=90 w=600 h=20 VALUE="getRichTextPos & moveRichText" name=ttext2
+RICHTEXT x=0 Y=110 w=200 h=20 value="RichText meter" min=0 max=100 name=text2
+
+TEXT x=0 Y=135 w=600 h=20 VALUE="hideRichText & showRichText" name=ttext3
+RICHTEXT x=0 Y=155 w=200 h=20 value="RichText meter" min=0 max=100 name=text3
+
+TEXT x=0 Y=180 w=600 h=20 VALUE="getRichTextSensor & setRichTextSensor" name=ttext4
+RICHTEXT x=0 Y=200 w=200 h=20 value=50 min=0 max=100 name=text4
+
+TEXT x=0 Y=225 w=600 h=20 VALUE="getRichTextValue & setRichTextValue" name=ttext5
+RICHTEXT x=0 Y=245 w=200 h=20 value="." min=0 max=100 name=text5
+
+TEXT x=0 Y=315 w=600 h=20 VALUE="setRichTextSize & getRichTextSize" name=ttext7
+RICHTEXT x=0 Y=335 w=200 h=20 value="RichText meter" min=0 max=100 name=text7
+
+TEXT x=0 Y=405 w=600 h=20 VALUE="setRichTextFont & getRichTextFont" name=ttext9
+RICHTEXT x=0 Y=425 w=400 h=20 value="The quick brown fox jumps over the lazy dog" min=0 max=100 name=text9
diff --git a/superkaramba/examples/service_group/service_group.py b/superkaramba/examples/service_group/service_group.py
new file mode 100644
index 0000000..276b9c8
--- /dev/null
+++ b/superkaramba/examples/service_group/service_group.py
@@ -0,0 +1,143 @@
+# Service Groups demo
+# Written by Luke Kenneth Casson Leighton <lkcl@lkcl.net>
+
+# This theme is demonstrates how to parse service groups.
+# it's done recursively to give a complete dump of your menu
+# that you will also be able to double-check against kmenuedit
+# and also the KDE Start button.
+#
+# for a real-live usage, see kroller.sez (try searching kde-look.org),
+# which fires off a sub-theme with the service-group menu options when
+# you click on a service group on the "main" bar.
+
+#this import statement allows access to the karamba functions
+import karamba
+
+# simple function to display
+
+def create_text(widget, line, depth, disp, name=None, command=None, icon=None):
+
+ x = depth*30
+ y = line*7
+ width = 400
+ height = 8
+ drop_txt = karamba.createText(widget, x, y, width, height, disp)
+ karamba.changeTextSize(widget, drop_txt, 7)
+ karamba.changeTextColor(widget, drop_txt, 252,252,252)
+
+ # create a (very narrow! only an 8-pixel-high area!)
+ # service click area to demonstrate that commands get
+ # executed correctly.
+
+ if name:
+ karamba.createServiceClickArea( widget,
+ x,y,width,height,
+ name, command, icon)
+
+
+# okay. you really should be looking up the KDE Developer documentation
+# on service groups. here is a _brief_ explanation of what they contain.
+#
+# getServiceGroups returns a list of menu options.
+# you can either have a subgroup, or you can have an executable program.
+# if a list item is a subgroup, then (0, dict) is returned, where
+# dict is a dictionary containing information describing the subgroup.
+# if a list item is an executable menu option, then (1, dict) is returned,
+# where dict is a dictionary containing information describing the menu option.
+#
+# the information (keys in the dictionary) returned about a subgroup comprises:
+# relpath - the fully qualified path of that subgroup, and
+# calling getServiceGroups (again) with that path will get
+# you all of the menu options in that subgroup, hurrah.
+# icon - the name of an icon (a png, usually) which you can, if you
+# so wish, use as the filename argument to createImage().
+# caption - i get confused as to which is which, but
+# and you can always run this program in combination
+# comment with kmenuedit to find out!
+#
+# the information (keys in the dictionary) returned about an
+# executable option comprises:
+# exec - obviously the most important bit: the name of the command
+# to be executed.
+# icon - the filename of the icon (usually a png) which should be
+# displayed for this command.
+# name - not to be confused with genericname, neither of which i
+# am sure about, and if you really want to know, run
+# kmenuedit and experiment, or look at the KDE Developer source
+# code.
+# menuid - don't know what it is for. it's just... there.
+#
+# how to use the service group info:
+#
+# the simplest way to get commands actually executed is to hand
+# over the name, the command and the icon filename to a
+# ServiceClickArea (karamba.createServiceClickArea()).
+#
+# other than making sure that you put the service click area in
+# the right place, you don't have to worry about much else.
+#
+# or, you could always run it manually, yourself, by using
+# karamba.Run(name, command, icon). personally, i prefer
+# the service click areas. no, karamba.Run() is not like
+# karamba.execute() - if you use karamba.Run() you get to say which
+# bouncing icon is used, whereas if you use karamba.execute() you
+# always get a superkaramba bouncing icon...
+#
+# do look out for kroller.sez on http://kde-look.org or other locations
+# for a more complex and comprehensive usage of service groups.
+
+def display_svc_group(widget, rel_path, line, depth):
+
+ grps = karamba.getServiceGroups(rel_path)
+
+ for (type, d) in grps:
+
+ if type is 0:
+
+ # it's a
+
+ sub_relpath = d['relpath']
+ icon = d.get('icon', 'unknown')
+ caption = d.get('caption', None)
+ comment = d.get('comment', None)
+ cmt = ''
+
+ # get at least something to display
+ if comment:
+ cmt = comment
+ elif caption:
+ cmt = caption
+
+ msg = "SVCGRP: %s %s" % (icon, cmt)
+ create_text(widget, line, depth, msg)
+ line += 1
+ line = display_svc_group(widget, sub_relpath,
+ line, depth+1)
+
+ elif type is 1 and d.has_key('menuid'):
+
+ relpath = d.get('relpath', '')
+ cmd = d['exec']
+ icon = d.get('icon', 'unknown')
+ name = d.get('name', None)
+ genericname = d.get('genericname', None)
+ cmt = ''
+
+ # get at least something to display
+ if genericname:
+ cmt = genericname
+ elif name:
+ cmt = name
+
+ msg = "%s %s %s" % (cmd, icon, cmt)
+ create_text(widget, line, depth, msg, name, cmd, icon)
+ line += 1
+
+ return line
+
+#this is called when you widget is initialized
+def initWidget(widget):
+
+ display_svc_group(widget, "", 0, 0)
+ karamba.redrawWidget(widget)
+
diff --git a/superkaramba/examples/service_group/service_group.theme b/superkaramba/examples/service_group/service_group.theme
new file mode 100644
index 0000000..e52a689
--- /dev/null
+++ b/superkaramba/examples/service_group/service_group.theme
@@ -0,0 +1,4 @@
+# simple test of service group stuff. displays your kde menu.
+
+karamba x=0 y=0 w=600 h=800 locked=true
+
diff --git a/superkaramba/examples/setIncomingData/1.py b/superkaramba/examples/setIncomingData/1.py
new file mode 100644
index 0000000..8422de2
--- /dev/null
+++ b/superkaramba/examples/setIncomingData/1.py
@@ -0,0 +1,27 @@
+import karamba
+
+sequence_num = 0
+
+def initWidget(widget):
+ karamba.openTheme('2.theme')
+
+# pass over a sequence number as well - the reason is to
+# make it possible to identify the clicks uniquely.
+#
+# unfortunately, the recipient has to do "polling"
+# by calling getIncomingData - see 2.py for more info
+
+def widgetClicked(widget, x, y, button):
+
+ # do as you wish, but this is a good way:
+ # compact your stuff with repr() it can cope
+ # with pretty much any basic types - dictionaries, lists -
+ # and then use eval() at the other end.
+
+ global sequence_num
+ sequence_num += 1
+
+ vars = (sequence_num, x, y, button)
+ message = repr(vars)
+ karamba.setIncomingData(widget, "2", message)
+
diff --git a/superkaramba/examples/setIncomingData/1.theme b/superkaramba/examples/setIncomingData/1.theme
new file mode 100644
index 0000000..2e4bfcf
--- /dev/null
+++ b/superkaramba/examples/setIncomingData/1.theme
@@ -0,0 +1,2 @@
+KARAMBA x=200 y=50 w=100 h=20 INTERVAL=1000 LOCKED=true
+TEXT x=0 Y=0 w=300 h=20 value="Click me!"
diff --git a/superkaramba/examples/setIncomingData/2.py b/superkaramba/examples/setIncomingData/2.py
new file mode 100644
index 0000000..a411b60
--- /dev/null
+++ b/superkaramba/examples/setIncomingData/2.py
@@ -0,0 +1,78 @@
+#
+# Written by Luke Kenneth Casson Leighton <lkcl@lkcl.net>
+
+# This theme is demonstrates how to
+
+#this import statement allows access to the karamba functions
+import karamba
+
+drop_txt = None
+
+#this is called when you widget is initialized
+def initWidget(widget):
+
+ # this resets the text to "" so we know we've never
+ # received anything yet from the other theme
+ name = karamba.getPrettyThemeName(widget)
+ print "2.py name: ", name
+ karamba.setIncomingData(widget, name, "")
+
+ karamba.redrawWidget(widget)
+
+# this is a pain. in order to avoid memory-related threading problems,
+# and also locking, with the communication between themes, the
+# communication is done asynchronously. so you have to POLL for the
+# information, by reading getIncomingData().
+#
+# therefore, you must set an interval=time_in_ms in your receiving .theme
+# file (see 2.theme) and then call getIncomingData() in here.
+#
+# it's not ideal - but it works.
+#
+# NOTE: the data received - by getIncomingData - is NOT, i repeat NOT
+# deleted when you call getIncomingData.
+# so, obviously, you need to take care to not activate repeatedly.
+# you could do this in several ways. one of them is to send, in
+# the calling theme (the one that calls setIncomingData) a sequential
+# number as part of the message.
+#
+# alternatively, you could reset the text to "" (see above)
+
+
+expected_seq = 0
+
+def widgetUpdated(widget):
+
+ global expected_seq # i hate globals. please write better code than this example.
+
+ # get the "message"...
+ disp = karamba.getIncomingData(widget)
+ if disp == "":
+ return
+
+ # decode it...
+ (seq, x, y, button) = eval(disp)
+
+ # if it's been seen before, skip it...
+ if seq <= expected_seq:
+ pass
+
+ expected_seq += 1
+
+ message = "seq:%d x:%d y:%d btn:%d" % (seq, x, y, button)
+ # delete previous text if exists.
+ global drop_txt
+ if drop_txt is not None:
+ karamba.deleteText(widget, drop_txt)
+
+ # display it...
+ drop_txt = karamba.createText(widget, 0, 20, 300, 20, message)
+ karamba.changeTextColor(widget, drop_txt, 252,252,252)
+
+ karamba.redrawWidget(widget)
+
+ pass
+
+# This will be printed when the widget loads.
+print "Loaded my python 2.py extension!"
+
diff --git a/superkaramba/examples/setIncomingData/2.theme b/superkaramba/examples/setIncomingData/2.theme
new file mode 100644
index 0000000..df7d7b2
--- /dev/null
+++ b/superkaramba/examples/setIncomingData/2.theme
@@ -0,0 +1,2 @@
+KARAMBA x=200 y=100 w=300 h=40 INTERVAL=200 LOCKED=true
+TEXT x=0 y=0 w=300 h=20 value="you clicked on theme 1:"
diff --git a/superkaramba/examples/taskBar/cleanbar/README b/superkaramba/examples/taskBar/cleanbar/README
new file mode 100644
index 0000000..0f828b6
--- /dev/null
+++ b/superkaramba/examples/taskBar/cleanbar/README
@@ -0,0 +1,25 @@
+Cleanbar for SuperKaramba, version 0.4
+Written by Adam Geitgey <adam@rootnode.org>
+Released under the GNU General Public License version 2
+
+
+Cleanbar requires SuperKaramba 0.31 or higher!!
+
+
+Cleanbar is a simple taskbar, xmms control, and clock. Cleanbar is quick,
+simple, and appealing.
+
+The Launch button brings up the K Menu. The play control buttons will control
+XMMS (xmmsctrl is required). A clock is shown on the right. Tasks show up
+along the middle and the taskbar works just like any other taskbar from the
+last 10 years.
+
+I created this basically as a quick example of how to use the new
+event-based task control API in SuperKaramba 0.31.
+
+It also demonstrates how to create themes that work at any resolution. You
+should not have to change anything for this to work on your desktop.
+
+Please report any major problems you have.
+
+Thanks.
diff --git a/superkaramba/examples/taskBar/cleanbar/cleanbar.py b/superkaramba/examples/taskBar/cleanbar/cleanbar.py
new file mode 100644
index 0000000..c0da2a2
--- /dev/null
+++ b/superkaramba/examples/taskBar/cleanbar/cleanbar.py
@@ -0,0 +1,267 @@
+#this import statement allows access to the karamba functions
+import karamba
+import os
+import time
+
+######################################
+## Globals
+######################################
+
+init = 0
+numOfTasks = 0
+
+## Default res
+## You don't need to change it. It should auto-detect.
+resX = 1024
+resY = 768
+
+# list of tasks
+taskList = []
+
+# focused task
+activeTask = 0
+
+## Task display stuff
+taskPanels = []
+taskText = []
+taskMenu = 0
+taskMenuLookup = {}
+timeText = 0
+
+## My code to detect resolution
+havexwi = os.system("which xwininfo")
+
+if (havexwi == 0):
+ pass
+else:
+ print "\nCan't find xwininfo in your path."
+
+fp = os.popen("xwininfo -root -stats")
+output = fp.read()
+output = output.splitlines()
+i = 0
+for x in output:
+ param = x.split()
+ if (len(param) > 1):
+ if param[0].find("Width:") != -1:
+ resX = int(param[1])
+ if param[0].find("Height:") != -1:
+ resY = int(param[1])
+
+
+
+
+def drawTaskbar(widget):
+ global taskPanels
+ global taskText
+ global numOfTasks
+
+ taskList = karamba.getTaskList(widget)
+
+ for image in taskPanels:
+ karamba.hideImage(widget, image)
+
+ for text in taskText:
+ karamba.changeText(widget, text, "")
+ karamba.changeTextShadow(widget, text, 0)
+ karamba.changeTextColor(widget,text,0,0,0)
+
+ length = len(taskList)
+ if (numOfTasks < length):
+ length = numOfTasks
+
+
+ knownGroups = {}
+ groups = []
+ groupRefs = {}
+
+ activeGroup = 0
+ groupCount = 0
+
+ #build groups list that contains sub-lists of taskInfo sorted by group
+ for j in range(len(taskList)):
+ taskinfo = karamba.getTaskInfo(widget, taskList[j])
+
+ if knownGroups.has_key(taskinfo[2]) == 0:
+ groupCount = groupCount + 1
+ if (taskinfo[7] == 1):
+ activeGroup = groupCount
+ knownGroups[taskinfo[2]] = 1
+ thisGroup = []
+ thisGroup.append(taskinfo)
+ groupRefs[taskinfo[2]] = len(groups)
+ groups.append(thisGroup)
+ else:
+ if (taskinfo[7] == 1):
+ activeGroup = groupRefs[taskinfo[2]] + 1
+ knownGroups[taskinfo[2]] = knownGroups[taskinfo[2]] + 1
+ thisGroup = groups[groupRefs[taskinfo[2]]]
+ thisGroup.append(taskinfo)
+
+ #fill out the task bar
+ j = 0
+ for group in groups:
+ #safety check (could be more task groups than bar is long)
+ if (j < length):
+ karamba.showImage(widget, taskPanels[j])
+ if len(group) != 1:
+ karamba.changeText(widget, taskText[j], group[0][2] + " [" + str(len(group)) + "]")
+ else:
+ karamba.changeText(widget, taskText[j], (group[0][0]))
+ j = j + 1
+
+ if (activeGroup != 0):
+ karamba.changeTextShadow(widget, taskText[activeGroup - 1], 1)
+ karamba.changeTextColor(widget, taskText[activeGroup - 1], 239, 220, 11)
+
+
+ karamba.redrawWidget(widget)
+
+#this is called when your widget is initialized
+def initWidget(widget):
+ global resX
+ global numOfTasks
+ global taskPanels
+ global taskText
+ global timeText
+
+ karamba.createImage(widget, resX - 149, 0, "pics/rightend_new.png")
+ numOfTasks = (resX - 198 - 149)/121
+
+ timeText = karamba.createText(widget, resX - 149 + 54, 10, 140, 20, "time")
+ karamba.changeTextColor(widget, timeText, 0,0,0)
+ karamba.changeTextSize(widget, timeText, 9)
+
+ for i in range(numOfTasks):
+ taskPanels.append(karamba.createImage(widget, 198 + (121*i), 3, "pics/task_new.png"))
+ taskText.append(karamba.createText(widget, 198 + (121*i) +9, 9, 100, 20, ""))
+
+ for text in taskText:
+ karamba.changeTextSize(widget,text,9)
+
+ drawTaskbar(widget)
+
+# called to indicate that a new task is currently started
+def startupAdded(widget, startup):
+ pass
+
+# called whenever a startup is removed. Which either means the task is
+# successfully started (and taskAdded will be called), or the task could
+# not be started for some reason.
+def startupRemoved(widget, startup):
+ pass
+
+# called whenever a new task has been started
+def taskAdded(widget, task):
+ drawTaskbar(widget)
+
+# called whenever a task is removed
+def taskRemoved(widget, task):
+ drawTaskbar(widget)
+
+# called whenever a new task has gained focus.
+# task = the active task
+def activeTaskChanged(widget, task):
+ drawTaskbar(widget)
+
+#this is called everytime your widget is updated
+#the update inverval is specified in the .theme file
+def widgetUpdated(widget):
+ global timeText
+
+ karamba.changeText(widget, timeText, time.strftime("%I:%M %p %a",time.localtime(time.time())))
+ karamba.redrawWidget(widget)
+
+
+#This gets called everytime our widget is clicked.
+#Notes:
+# widget = reference to our widget
+# x = x position (relative to our widget)
+# y = y position (relative to our widget)
+# botton = button clicked:
+# 1 = Left Mouse Button
+# 2 = Middle Mouse Button
+# 3 = Right Mouse Button, but this will never happen
+# because the right mouse button brings up the
+# Karamba menu.
+# 4,5 = Scroll wheel up and down
+def widgetClicked(widget, x, y, button):
+ global numOfTasks
+ global taskMenu
+ global taskMenuLookup
+
+ taskSelected = (x-198)/121
+
+ ## Make sure its a valid task
+ if (0 <= taskSelected < numOfTasks):
+ taskList = karamba.getTaskList(widget)
+
+ #free last menu
+ karamba.deleteMenu(widget, taskMenu)
+
+ #create new menu
+ taskMenu = karamba.createMenu(widget)
+ taskMenuLoopup = {}
+
+ length = len(taskList)
+ if (numOfTasks < length):
+ length = numOfTasks
+
+
+ knownGroups = {}
+ groups = []
+ groupRefs = {}
+ for j in range(len(taskList)):
+ taskinfo = karamba.getTaskInfo(widget, taskList[j])
+
+ if knownGroups.has_key(taskinfo[2]) == 0:
+ knownGroups[taskinfo[2]] = 1
+ thisGroup = []
+ thisGroup.append(taskinfo)
+ groupRefs[taskinfo[2]] = len(groups)
+ groups.append(thisGroup)
+ else:
+ knownGroups[taskinfo[2]] = knownGroups[taskinfo[2]] + 1
+ thisGroup = groups[groupRefs[taskinfo[2]]]
+ thisGroup.append(taskinfo)
+
+ if taskSelected < len(groups):
+ taskGroup = groups[taskSelected]
+
+
+ if len(taskGroup) == 1:
+ #only one task in group - just switch to that app
+ ## perform the task action (see Task API for list of numbers)
+ karamba.performTaskAction(widget, taskGroup[0][8], 8)
+
+ else:
+ #more than one task in this group, make a popup
+ for task in taskGroup:
+ #if it's minimized, put []'s around name
+ if task[5] == 1:
+ item = karamba.addMenuItem(widget, taskMenu, "[ " + task[0] + " ]", task[2])
+ else:
+ item = karamba.addMenuItem(widget, taskMenu, task[0], task[2])
+ #save the taskInfo item for later use
+ #so we will know info for the task that
+ #will be clicked in the callback
+ taskMenuLookup[item] = task
+
+ numOfItems = len(taskGroup)
+ karamba.popupMenu(widget, taskMenu, 198 + (121*taskSelected), -1 * (numOfItems * 26))
+
+
+
+ if (taskSelected == numOfTasks):
+ karamba.toggleShowDesktop(widget)
+
+#This gets called when an item is clicked in a popup menu you have created.
+# menu = a reference to the menu
+# id = the number of the item that was clicked.
+def menuItemClicked(widget, menu, id):
+ global taskMenuLookup
+
+ taskinfo = taskMenuLookup[id]
+ karamba.performTaskAction(widget, taskinfo[8], 8)
+
+
diff --git a/superkaramba/examples/taskBar/cleanbar/cleanbar.theme b/superkaramba/examples/taskBar/cleanbar/cleanbar.theme
new file mode 100644
index 0000000..ec111cd
--- /dev/null
+++ b/superkaramba/examples/taskBar/cleanbar/cleanbar.theme
@@ -0,0 +1,14 @@
+KARAMBA X=0 Y=0 W=1600 H=31 LOCKED=true ONTOP=TRUE BOTTOMBAR=true INTERVAL=20000
+
+IMAGE X=0 Y=0 PATH="pics/bar2.png"
+
+#K Menu
+CLICKAREA X=4 Y=6 W=64 H=25 ONCLICK="dcop kicker kicker popupKMenu 0"
+
+#XMMS controls
+CLICKAREA X=96 Y=6 W=15 H=23 ONCLICK="xmmsctrl prev"
+CLICKAREA X=121 Y=6 W=10 H=23 ONCLICK="xmmsctrl play"
+CLICKAREA X=140 Y=6 W=12 H=23 ONCLICK="xmmsctrl pause"
+CLICKAREA X=159 Y=6 W=12 H=23 ONCLICK="xmmsctrl stop"
+CLICKAREA X=180 Y=6 W=12 H=23 ONCLICK="xmmsctrl next"
+
diff --git a/superkaramba/examples/taskBar/cleanbar/pics/bar2.png b/superkaramba/examples/taskBar/cleanbar/pics/bar2.png
new file mode 100644
index 0000000..1566ff0
--- /dev/null
+++ b/superkaramba/examples/taskBar/cleanbar/pics/bar2.png
Binary files differ
diff --git a/superkaramba/examples/taskBar/cleanbar/pics/rightend.png b/superkaramba/examples/taskBar/cleanbar/pics/rightend.png
new file mode 100644
index 0000000..0da33ca
--- /dev/null
+++ b/superkaramba/examples/taskBar/cleanbar/pics/rightend.png
Binary files differ
diff --git a/superkaramba/examples/taskBar/cleanbar/pics/rightend_new.png b/superkaramba/examples/taskBar/cleanbar/pics/rightend_new.png
new file mode 100644
index 0000000..356b970
--- /dev/null
+++ b/superkaramba/examples/taskBar/cleanbar/pics/rightend_new.png
Binary files differ
diff --git a/superkaramba/examples/taskBar/cleanbar/pics/slickbar.png b/superkaramba/examples/taskBar/cleanbar/pics/slickbar.png
new file mode 100644
index 0000000..24b7336
--- /dev/null
+++ b/superkaramba/examples/taskBar/cleanbar/pics/slickbar.png
Binary files differ
diff --git a/superkaramba/examples/taskBar/cleanbar/pics/startup.png b/superkaramba/examples/taskBar/cleanbar/pics/startup.png
new file mode 100644
index 0000000..0d3555e
--- /dev/null
+++ b/superkaramba/examples/taskBar/cleanbar/pics/startup.png
Binary files differ
diff --git a/superkaramba/examples/taskBar/cleanbar/pics/task.png b/superkaramba/examples/taskBar/cleanbar/pics/task.png
new file mode 100644
index 0000000..3058f41
--- /dev/null
+++ b/superkaramba/examples/taskBar/cleanbar/pics/task.png
Binary files differ
diff --git a/superkaramba/examples/taskBar/cleanbar/pics/task_new.png b/superkaramba/examples/taskBar/cleanbar/pics/task_new.png
new file mode 100644
index 0000000..e66537c
--- /dev/null
+++ b/superkaramba/examples/taskBar/cleanbar/pics/task_new.png
Binary files differ
diff --git a/superkaramba/examples/template.py b/superkaramba/examples/template.py
new file mode 100644
index 0000000..d79d1a0
--- /dev/null
+++ b/superkaramba/examples/template.py
@@ -0,0 +1,160 @@
+#this import statement allows access to the karamba functions
+import karamba
+
+
+#this is called when your widget is initialized
+def initWidget(widget):
+ pass
+
+#This is called when your widget is closed. You can use this to clean
+#up open files, etc. You don't need to delete text and images in your
+#theme. That is done automatically. This callback is just for cleaning up
+#external things. Most people don't need to put anything here.
+def widgetClosed(widget):
+ pass
+
+#this is called everytime your widget is updated
+#the update inverval is specified in the .theme file
+def widgetUpdated(widget):
+ pass
+
+#This gets called everytime our widget is clicked.
+#Notes:
+# widget = reference to our widget
+# x = x position (relative to our widget)
+# y = y position (relative to our widget)
+# botton = button clicked:
+# 1 = Left Mouse Button
+# 2 = Middle Mouse Button
+# 3 = Right Mouse Button, but this will never happen
+# because the right mouse button brings up the
+# Karamba menu.
+# 4,5 = Scroll wheel up and down
+def widgetClicked(widget, x, y, button):
+ pass
+
+#This gets called everytime our widget is clicked.
+#Notes
+# widget = reference to our widget
+# x = x position (relative to our widget)
+# y = y position (relative to our widget)
+# botton = button being held:
+# 0 = No Mouse Button
+# 1 = Left Mouse Button
+# 2 = Middle Mouse Button
+# 3 = Right Mouse Button, but this will never happen
+# because the right mouse button brings up the
+# Karamba menu.
+def widgetMouseMoved(widget, x, y, button):
+ #Warning: Don't do anything too intensive here
+ #You don't want to run some complex piece of code everytime the mouse moves
+ pass
+
+
+#This gets called when an item is clicked in a popup menu you have created.
+# menu = a reference to the menu
+# id = the number of the item that was clicked.
+def menuItemClicked(widget, menu, id):
+ pass
+
+#This gets called when an item is clicked in the theme CONFIGURATION menu,
+#not the popup menus that you create.
+# key = the reference to the configuration key that was changed
+# value = the new value (true or false) that was selected
+def menuOptionChanged(widget, key, value):
+ pass
+
+#This gets called when a meter (image, text, etc) is clicked.
+# NOTE you must use attachClickArea() to make a meter
+# clickable.
+# widget = reference to your theme
+# meter = the meter clicked
+# button = the button clicked (see widgetClicked for button numbers)
+def meterClicked(widget, meter, button):
+ pass
+
+#This gets called when a command you have executed with executeInteractive() outputs something
+#to stdout. This way you can get the output of for example kdialog without freezing up the widget
+#waiting for kdialog to end.
+# widget = reference to your theme
+# pid = process number of the program outputting (use this if you execute more than out process)
+# output = the text the program outputted to stdout
+def commandOutput(widget, pid, output):
+ pass
+
+#This gets called when another theme sends a message.
+# widget = reference to your theme
+# caller = "pretty" name or regular name (name of theme file with a number attached) of sending theme
+# output = the text sent.
+def themeNotify(widget, caller, message):
+ pass
+
+#This gets called when an item is dropped on this widget.
+# NOTE you have to call acceptDrops() before your widget will accept drops.
+# widget = reference to your theme
+# dropText = the text of the dropped item (probably a URL to it's location in KDE)
+# x = the x position on the theme relative to the upper left corner
+# y = the y position on the theme relative to the upper left corner
+def itemDropped(widget, dropText, x, y):
+ pass
+
+
+#This gets called when a new program is LOADING in KDE. When it is done
+#loading, startupRemoved() is called, followed by taskAdded().
+# widget = reference to your widget
+# task = A refence to the task that is starting.
+def startupAdded(widget, startup):
+ pass
+
+#This gets called when a new program is done LOADING in KDE.
+# widget = reference to your widget
+# task = A refence to the task that just finished loading.
+def startupRemoved(widget, startup):
+ pass
+
+#This is called every time a new task (program) is started in KDE.
+# widget = reference to your widget
+# task = A refence to the new task. Call getTaskInfo() with this reference
+# to get the name, etc of this new task.
+def taskAdded(widget, task):
+ pass
+
+#This is called everytime a task (program) is closed in KDE.
+# widget = reference to your widget
+# task = A refence to the task.
+def taskRemoved(widget, task):
+ pass
+
+#This is called everytime a different task gains focus (IE, the user clicks
+#on a different window).
+# widget = reference to your widget
+# task = A refence to the task. Call getTaskInfo() with this reference
+# to get the name, etc of this new task.
+def activeTaskChanged(widget, task):
+ pass
+
+#This is called everytime the systray you created with createSystray() is updated
+def systrayUpdated(widget):
+ pass
+
+#This is called everytime the current desktop changes
+# widget = reference to your widget
+# desktop = the current desktop
+def desktopChanged(widget, desktop):
+ pass
+
+#This is called everytime the wallpaper changes on a desktop
+# widget = reference to your widget
+# desktop = the desktop whose wallpaper changed
+def wallpaperChanged(widget, desktop):
+ pass
+
+#This is called everytime there is a key press in any focused input field
+# widget = reference to your widget
+# meter = reference to an input box
+# char = the key that was pressed
+def keyPressed(widget, meter, char):
+ pass
+
+# This will be printed when the widget loads.
+print "Loaded my python extension!"
diff --git a/superkaramba/examples/test_all.sh b/superkaramba/examples/test_all.sh
new file mode 100755
index 0000000..5e95063
--- /dev/null
+++ b/superkaramba/examples/test_all.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+themes=(
+ "text/text.theme"
+ "autoHide/main.theme"
+ "bar/bar.theme"
+ "graph/graph.theme"
+ "image/image.theme"
+ "popupMenu/popupMenu.theme"
+ "taskBar/cleanbar/cleanbar.theme"
+ "richtext/richtext.theme"
+ "richtext/rtext.theme"
+ "globalMouse/eyes.theme"
+ "unicode/unicode.theme"
+ "mouseDrag/karmix/karmix.theme"
+ "input_api/input_api.theme"
+ "input_example/input_example.theme"
+)
+
+for theme in "${themes[@]}"
+do
+ echo $theme
+ dcop `dcop superkaramba* | head -n 1` default openTheme $PWD/$theme
+ read a
+ dcop `dcop superkaramba* | head -n 1` default closeTheme `expr $theme : '.*/\(.*\)\.'`
+done
+
+#dcop `dcop superkaramba* | head -n 1` default quit
diff --git a/superkaramba/examples/text/text.py b/superkaramba/examples/text/text.py
new file mode 100644
index 0000000..4612dd5
--- /dev/null
+++ b/superkaramba/examples/text/text.py
@@ -0,0 +1,110 @@
+#this import statement allows access to the karamba functions
+import karamba
+
+align = ['LEFT', 'CENTER', 'RIGHT']
+texts = [0,0,0,0,0,0,0,0,0,0,0]
+b = 0
+a = 0
+
+#this is called when you widget is initialized
+def initWidget(widget):
+ global texts, b
+ texts[0] = karamba.getThemeText(widget, "text0")
+ texts[1] = karamba.getThemeText(widget, "text1")
+ texts[2] = karamba.getThemeText(widget, "text2")
+ texts[3] = karamba.getThemeText(widget, "text3")
+ texts[4] = karamba.getThemeText(widget, "text4")
+ texts[5] = karamba.getThemeText(widget, "text5")
+ texts[6] = karamba.getThemeText(widget, "text6")
+ texts[7] = karamba.getThemeText(widget, "text7")
+ texts[8] = karamba.getThemeText(widget, "text8")
+ texts[9] = karamba.getThemeText(widget, "text9")
+ texts[10] = karamba.getThemeText(widget, "text10")
+
+
+#this is called everytime your widget is updated
+#the update inverval is specified in the .theme file
+def widgetUpdated(widget):
+ global texts, b, a
+
+ b = (b+1)%2
+
+ # Create & delete
+ if(texts[0]):
+ karamba.deleteText(widget, texts[0])
+ texts[0] = 0
+ else:
+ texts[0] = karamba.createText(widget, 0, 20, 200, 20, "Text meter")
+
+ # size & resize
+ size = karamba.getTextSize(widget, texts[1])
+ print "getTextSize: " + str(size)
+ size = ((b * 200) + 200, size[1])
+ karamba.resizeText(widget, texts[1], size[0], size[1])
+
+ # pos & move
+ pos = karamba.getTextPos(widget, texts[2])
+ print "getTextPos: " + str(pos)
+ pos = (b * 200, pos[1])
+ karamba.moveText(widget, texts[2], pos[0], pos[1])
+
+ # Hide & Show
+ if(b):
+ karamba.hideText(widget, texts[3])
+ else:
+ karamba.showText(widget, texts[3])
+
+ # Sensor
+ sensor = karamba.getTextSensor(widget, texts[4])
+ print "getSensor: " + str(sensor)
+ if(b):
+ karamba.setTextSensor(widget, texts[4], 'SENSOR=SENSOR TYPE="cpu_temp"')
+ else:
+ karamba.setTextSensor(widget, texts[4], 'SENSOR=CPU')
+
+ # Value
+ v = karamba.getTextValue(widget, texts[5])
+ print "getTextValue: ", v
+ v += '.'
+ karamba.changeText(widget, texts[5], v)
+
+ # Shadow
+ v = karamba.getTextShadow(widget, texts[6])
+ print "getTextShadow: ", v
+ v = (v+1)%10;
+ karamba.changeTextShadow(widget, texts[6], v)
+
+ # Font size
+ v = karamba.getTextFontSize(widget, texts[7])
+ print "getTextFontSize: ", v
+ v = 10 + ((v-10)+1)%10;
+ karamba.changeTextSize(widget, texts[7], v)
+
+ # Text color
+ v = karamba.getTextColor(widget, texts[8])
+ print "getTextColor: ", v
+ karamba.changeTextColor(widget, texts[8], b*255, b*255, b*255)
+
+ # Text Font
+ v = karamba.getTextFont(widget, texts[9])
+ print "getTextFont: ", v
+ if(b):
+ v = 'Bitstream Vera Sans'
+ else:
+ v = 'Bitstream Vera Serif'
+ karamba.changeTextFont(widget, texts[9], v)
+
+ # Text Alignment
+ a = (a+1)%3
+ v = karamba.getTextAlign(widget, texts[10])
+ print "getTextAlign: ", v
+ karamba.setTextAlign(widget, texts[10], align[a])
+
+def widgetClicked(widget, x, y, button):
+ pass
+
+def widgetMouseMoved(widget, x, y, button):
+ pass
+
+# This will be printed when the widget loads.
+print "Loaded Text test python extension!"
diff --git a/superkaramba/examples/text/text.theme b/superkaramba/examples/text/text.theme
new file mode 100644
index 0000000..522640a
--- /dev/null
+++ b/superkaramba/examples/text/text.theme
@@ -0,0 +1,35 @@
+KARAMBA x=100 y=10 w=600 h=580 INTERVAL=1000 LOCKED=true
+DEFAULTFONT font="Bitstream Vera Sans" fontsize=16 color=200,200,200
+
+TEXT x=0 Y=0 w=600 h=20 VALUE="createText & deleteText" name=ttext0
+TEXT x=0 Y=20 w=200 h=20 value="Text meter" min=0 max=100 name=text0
+
+TEXT x=0 Y=45 w=600 h=20 VALUE="getTextSize & resizeText" name=ttext1
+TEXT x=0 Y=65 w=200 h=20 value="The quick brown fox jumps over the lazy dog" min=0 max=100 name=text1
+
+TEXT x=0 Y=90 w=600 h=20 VALUE="getTextPos & moveText" name=ttext2
+TEXT x=0 Y=110 w=200 h=20 value="Text meter" min=0 max=100 name=text2
+
+TEXT x=0 Y=135 w=600 h=20 VALUE="hideText & showText" name=ttext3
+TEXT x=0 Y=155 w=200 h=20 value="Text meter" min=0 max=100 name=text3
+
+TEXT x=0 Y=180 w=600 h=20 VALUE="getTextSensor & setTextSensor" name=ttext4
+TEXT x=0 Y=200 w=200 h=20 value=50 min=0 max=100 name=text4
+
+TEXT x=0 Y=225 w=600 h=20 VALUE="getTextValue & setTextValue" name=ttext5
+TEXT x=0 Y=245 w=200 h=20 value="." min=0 max=100 name=text5
+
+TEXT x=0 Y=270 w=600 h=20 VALUE="getTextShadow & setTextShadow" name=ttext6
+TEXT x=0 Y=290 w=400 h=20 value="The quick brown fox jumps over the lazy dog" min=0 max=100 name=text6
+
+TEXT x=0 Y=315 w=600 h=20 VALUE="setTextSize & getTextSize" name=ttext7
+TEXT x=0 Y=335 w=200 h=20 value="Text meter" min=0 max=100 name=text7
+
+TEXT x=0 Y=360 w=600 h=20 VALUE="setTextColor & getTextColor" name=ttext8
+TEXT x=0 Y=380 w=400 h=20 value="The quick brown fox jumps over the lazy dog" min=0 max=100 name=text8
+
+TEXT x=0 Y=405 w=600 h=20 VALUE="setTextFont & getTextFont" name=ttext9
+TEXT x=0 Y=425 w=400 h=20 value="The quick brown fox jumps over the lazy dog" min=0 max=100 name=text9
+
+TEXT x=0 Y=450 w=600 h=20 VALUE="setTextAlign & getTextAlign" name=ttext10
+TEXT x=0 Y=470 w=400 h=20 value="Text meter" min=0 max=100 name=text10
diff --git a/superkaramba/examples/unicode/unicode.py b/superkaramba/examples/unicode/unicode.py
new file mode 100644
index 0000000..13d1136
--- /dev/null
+++ b/superkaramba/examples/unicode/unicode.py
@@ -0,0 +1,116 @@
+#Unicode Example
+
+#For Symbol Tables look at www.unicode.org/charts/
+
+
+#this import statement allows access to the karamba functions
+import karamba
+
+#this is called when you widget is initialized
+def initWidget(widget):
+
+ text=u"""
+<h1>UNICODE Example</h1>
+<h3>Greek:</h3>
+\u03B1\u03B2\u03B3\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0
+\u03C1\u03C2\u03C3\u03C4\u03C5\u03C6\u03C7\u03C8\u03C9
+<br>
+\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039A\u039B\u039C\u039D\u039E\u039F\u03A0
+\u03A1\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9
+<h3>Cyrillic:</h3>
+\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F
+\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F
+<br>
+\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F
+\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F
+<h3>Hebrew:</h3>
+\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF
+\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA
+<h3>Arabic:</h3>
+\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630
+\u0631\u0632\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\u0641\u0642\u0643\u0644\u0645\u0646
+\u0647\u0648\u064A
+<p>
+For a complete reference on unicode caracter codes look at:
+<center><a href="kfmclient openURL http://www.unicode.org/charts/">www.unicode.org/charts/</a></center>
+</p>
+"""
+ karamba.resizeWidget(widget, 400, 400)
+
+ richtext = karamba.createRichText(widget, text)
+
+ karamba.setRichTextWidth(widget, richtext, 370)
+
+# greek_heading = karamba.createText(widget, 0, 5, 100, 20, "Greek:")
+# greek_small = karamba.createText(widget, 0, 25, 400, 15, u"\u03B1\u03B2\u03B3\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C2\u03C3\u03C4\u03C5\u03C6\u03C7\u03C8\u03C9");
+# greek_big = karamba.createText(widget, 0, 40, 400, 15, u"\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039A\u039B\u039C\u039D\u039E\u039F\u03A0\u03A1\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9");
+
+# hebrew_heading = karamba.createText(widget, 0, 60, 100, 20, "Hebrew:")
+# hebrew = karamba.createText(widget, 0, 80, 400, 15, u"\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA");
+
+# arabic_heading = karamba.createText(widget, 0, 100, 100, 20, "Arabic:")
+# arabic = karamba.createText(widget, 0, 120, 400, 15, u"\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u064A");
+
+# cyrillic_heading = karamba.createText(widget, 0, 140, 100, 20, "Cyrillic:")
+# cyrillic_small = karamba.createText(widget, 0, 160, 400, 15, u"\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F")
+# cyrillic_big = karamba.createText(widget, 0, 175, 400, 15, u"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F")
+
+# karamba.changeTextColor(widget, greek_heading, 0, 0, 0)
+# karamba.changeTextColor(widget, greek_small, 0, 0, 0)
+# karamba.changeTextColor(widget, greek_big, 0, 0, 0)
+# karamba.changeTextColor(widget, hebrew_heading, 0, 0, 0)
+# karamba.changeTextColor(widget, hebrew, 0, 0, 0)
+# karamba.changeTextColor(widget, arabic_heading, 0, 0, 0)
+# karamba.changeTextColor(widget, arabic, 0, 0, 0)
+# karamba.changeTextColor(widget, cyrillic_heading, 0, 0, 0)
+# karamba.changeTextColor(widget, cyrillic_small, 0, 0, 0)
+# karamba.changeTextColor(widget, cyrillic_big, 0, 0, 0)
+
+# karamba.changeTextSize(widget, greek_heading, 12)
+# karamba.changeTextSize(widget, hebrew_heading, 12)
+# karamba.changeTextSize(widget, arabic_heading, 12)
+# karamba.changeTextSize(widget, cyrillic_heading, 12)
+
+
+
+#this is called everytime your widget is updated
+#the update inverval is specified in the .theme file
+def widgetUpdated(widget):
+ pass
+
+
+#This gets called everytime our widget is clicked.
+#Notes:
+# widget = reference to our widget
+# x = x position (relative to our widget)
+# y = y position (relative to our widget)
+# botton = button clicked:
+# 1 = Left Mouse Button
+# 2 = Middle Mouse Button
+# 3 = Right Mouse Button, but this will never happen
+# because the right mouse button brings up the
+# Karamba menu.
+# 4,5 = Scroll wheel up and down
+def widgetClicked(widget, x, y, button):
+ pass
+
+def meterClicked(widget, meter, button):
+ pass
+
+#This gets called everytime our widget is clicked.
+#Notes
+# widget = reference to our widget
+# x = x position (relative to our widget)
+# y = y position (relative to our widget)
+# botton = button being held:
+# 0 = No Mouse Button
+# 1 = Left Mouse Button
+# 2 = Middle Mouse Button
+# 3 = Right Mouse Button, but this will never happen
+# because the right mouse button brings up the
+# Karamba menu.
+def widgetMouseMoved(widget, x, y, button):
+ pass
+
+# This will be printed when the widget loads.
+print "Loaded Karamba Unicode Test"
diff --git a/superkaramba/examples/unicode/unicode.theme b/superkaramba/examples/unicode/unicode.theme
new file mode 100644
index 0000000..44cb1c8
--- /dev/null
+++ b/superkaramba/examples/unicode/unicode.theme
@@ -0,0 +1 @@
+KARAMBA X=80 Y=20 W=400 H=300 LOCKED=true INTERVAL=10000