12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <head>
- <title>Reference</title>
- <link rel="stylesheet" href="../ldoc.css" type="text/css" />
- </head>
- <body>
- <div id="container">
- <div id="product">
- <div id="product_logo"></div>
- <div id="product_name"><big><b></b></big></div>
- <div id="product_description"></div>
- </div> <!-- id="product" -->
- <div id="main">
- <!-- Menu -->
- <div id="navigation">
- <br/>
- <h1>ldoc</h1>
- <ul>
- <li><a href="../index.html">Index</a></li>
- </ul>
- <h2>Contents</h2>
- <ul>
- <li><a href="#Functions">Functions</a></li>
- </ul>
- <h2>Modules</h2>
- <ul class="$(kind=='Topics' and '' or 'nowrap'">
- <li><a href="../modules/blingbling.calendar.html">blingbling.calendar</a></li>
- <li><a href="../modules/blingbling.clock.html">blingbling.clock</a></li>
- <li><strong>blingbling.helpers</strong></li>
- <li><a href="../modules/blingbling.linegraph.html">blingbling.linegraph</a></li>
- <li><a href="../modules/blingbling.widget.html">blingbling.widget</a></li>
- <li><a href="../modules/blingbling.popups.html">blingbling.popups</a></li>
- <li><a href="../modules/blingbling.progress_graph.html">blingbling.progress_graph</a></li>
- <li><a href="../modules/blingbling.system.html">blingbling.system</a></li>
- <li><a href="../modules/blingbling.tagslist.html">blingbling.tagslist</a></li>
- <li><a href="../modules/blingbling.task_warrior.html">blingbling.task_warrior</a></li>
- <li><a href="../modules/blingbling.text_box.html">blingbling.text_box</a></li>
- <li><a href="../modules/blingbling.transient.html">blingbling.transient</a></li>
- <li><a href="../modules/blingbling.triangular_progress_graph.html">blingbling.triangular_progress_graph</a></li>
- <li><a href="../modules/blingbling.udisks_glue.html">blingbling.udisks_glue</a></li>
- <li><a href="../modules/blingbling.value_text_box.html">blingbling.value_text_box</a></li>
- <li><a href="../modules/blingbling.volume.html">blingbling.volume</a></li>
- <li><a href="../modules/blingbling.wlourf_circle_graph.html">blingbling.wlourf_circle_graph</a></li>
- </ul>
- </div>
- <div id="content">
- <h1>Module <code>blingbling.helpers</code></h1>
- <p>Functions used in blingbling.</p>
- <p></p>
- <h2><a href="#Functions">Functions</a></h2>
- <table class="function_list">
- <tr>
- <td class="name" nowrap><a href="#dbg">dbg (vars)</a></td>
- <td class="summary">Display values of variables in an awesome popup.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#hexadecimal_to_rgba_percent">hexadecimal_to_rgba_percent (my_color)</a></td>
- <td class="summary">Convert an hexadecimal color to rgba color.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#rgb">rgb (red, green, blue)</a></td>
- <td class="summary">Get red green blue value in parameters and return hexadecimal string</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#rgba">rgba (red, green, blue, alpha)</a></td>
- <td class="summary">Get red green blue and alpha value in parameters and return hexadecimal string.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#is_transparent">is_transparent (my_color)</a></td>
- <td class="summary">Check if an hexadecimal color is fully transparent.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#split">split (str, pat)</a></td>
- <td class="summary">Split string in different parts which are returned in a table.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#draw_background_tiles">draw_background_tiles (cr, height, v_margin, width, h_margin)</a></td>
- <td class="summary">Draw tiles in a cairo context.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#draw_text_and_background">draw_text_and_background (cr, text, x, y, text_background_color, text_color, show_text_centered_on_x, show_text_centered_on_y, show_text_on_left_of_x, show_text_on_bottom_of_y)</a></td>
- <td class="summary">Draw text on a rectangle which width and height depend on the text width and height.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#draw_up_down_arrows">draw_up_down_arrows (cr, x, y_bottom, y_top, value, background_arrow_color, arrow_color, arrow_line_color, up)</a></td>
- <td class="summary">Drawn one foreground arrow with a background arrow that depend on a value.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#draw_vertical_bar">draw_vertical_bar (cr, h_margin, v_margin, width, height, represent)</a></td>
- <td class="summary">Draw a vertical bar with gradient color, so it looks like a cylinder, and it's height depends on a value.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#draw_horizontal_bar">draw_horizontal_bar (cr, h_margin, v_margin, width, height, represent)</a></td>
- <td class="summary">Draw an horizontal bar with gradient color, so it looks like a cylinder, and it's height depends on a value.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#draw_rounded_corners_rectangle">draw_rounded_corners_rectangle (cr, x, y, width, height, color, rounded_size)</a></td>
- <td class="summary">Draw a rectangle width rounded corners.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#clip_rounded_corners_rectangle">clip_rounded_corners_rectangle (cr, x, y, width, height, rounded_size)</a></td>
- <td class="summary">Set a rectangle width rounded corners that define the area to draw.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#draw_rounded_corners_horizontal_graph">draw_rounded_corners_horizontal_graph (cr, x, y, width, height, background_color, graph_color, rounded_size, value_to_represent, graph_line_color)</a></td>
- <td class="summary">Draw a foreground rounded corners rectangle which width depends on a value, and a background rounded corners rectangle.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#draw_rounded_corners_vertical_graph">draw_rounded_corners_vertical_graph (cr, x, y, width, height, background_color, graph_color, rounded_size, value_to_represent, graph_line_color)</a></td>
- <td class="summary">Draw a foreground rounded corners rectangle which height depends on a value, and a background rounded corners rectangle.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#generate_rounded_rectangle_with_text">generate_rounded_rectangle_with_text (cr, width, height, text, padding, background_color, text_color, font_size, rounded_size, border)</a></td>
- <td class="summary">Generate a text in front of a centered rectangle with rounded corners (or not) in a cairo context.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#draw_triangle">draw_triangle (cr, first, second, third, color)</a></td>
- <td class="summary">Draw a rectangular triangle filled with given color</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#draw_triangle_outline">draw_triangle_outline (cr, first, second, third, color)</a></td>
- <td class="summary">Draw a rectangular triangular outline of the given color</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#compute_bar_width">compute_bar_width (nb_bars, width, sep)</a></td>
- <td class="summary">Compute the width of each bar in a graph
- It returns the width of the bar and a value
- that corresponds to the remaing space divided
- by 2</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#draw_triangle_graph_using_bars">draw_triangle_graph_using_bars (cr, width, height, h_margin, v_margin, color, value)</a></td>
- <td class="summary">Display a value using bars or parts of bar in a triangular form</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#hash_remove">hash_remove (hash, key)</a></td>
- <td class="summary">Remove an element from a table using key.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#get_days_in_month">get_days_in_month (month, year)</a></td>
- <td class="summary">Get the number of days in a given month of a year.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#get_ISO8601_weeks_number_of_month">get_ISO8601_weeks_number_of_month (month, year)</a></td>
- <td class="summary">Find the weeks numbers of a given month.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#get_nb_cores">get_nb_cores ()</a></td>
- <td class="summary">Get the number of cpu cores</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#get_cpu_name">get_cpu_name ()</a></td>
- <td class="summary">Get the cpu name</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#get_mounted_devices">get_mounted_devices ()</a></td>
- <td class="summary">Get all the currently mounted devices</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#get_total_mem_in_kb">get_total_mem_in_kb ()</a></td>
- <td class="summary">Get the total amount of RAM in kb</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#get_input_devices">get_input_devices ()</a></td>
- <td class="summary">Get the input device names</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#get_graphic_card">get_graphic_card ()</a></td>
- <td class="summary">Get the current graphic card</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#get_os_release_informations">get_os_release_informations ()</a></td>
- <td class="summary">Get OS related informations from /etc/os-release</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#icons_only_tasklist">icons_only_tasklist (w, buttons, label, data, objects)</a></td>
- <td class="summary">Function used in order to have a tasklist with icons only
- The classical usage of it is:
- awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, mytasklist.buttons,nil,icons_only_tasklist)</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#load_properties">load_properties (properties, data, graph, superproperties)</a></td>
- <td class="summary">Function used in widgets in order to create a local table of
- all the widget properties which are a mix between the properties
- provided by the user trought the widget interface, or the properties
- defined by superproperties</td>
- </tr>
- </table>
- <br/>
- <br/>
- <h2><a name="Functions"></a>Functions</h2>
- <dl class="function">
- <dt>
- <a name = "dbg"></a>
- <strong>dbg (vars)</strong>
- </dt>
- <dd>
- Display values of variables in an awesome popup.
- Each variables in vars is separated by a "|"
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">vars</span>
- a table of variable
- </li>
- </ul>
- </dd>
- <dt>
- <a name = "hexadecimal_to_rgba_percent"></a>
- <strong>hexadecimal_to_rgba_percent (my_color)</strong>
- </dt>
- <dd>
- Convert an hexadecimal color to rgba color.
- It convert a string variable "#rrggbb" or "#rrggbbaa" (with r,g,b and a which are hexadecimal value) to r, g, b a=1 or r,g,b,a (with r,g,b,a floated value from 0 to 1.
- The function returns 4 variables.
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">my_color</span>
- a string "#rrggbb" or "#rrggbbaa"
- </li>
- </ul>
- </dd>
- <dt>
- <a name = "rgb"></a>
- <strong>rgb (red, green, blue)</strong>
- </dt>
- <dd>
- Get red green blue value in parameters and return hexadecimal string
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">red</span>
- </li>
- <li><span class="parameter">green</span>
- </li>
- <li><span class="parameter">blue</span>
- </li>
- </ul>
- </dd>
- <dt>
- <a name = "rgba"></a>
- <strong>rgba (red, green, blue, alpha)</strong>
- </dt>
- <dd>
- Get red green blue and alpha value in parameters and return hexadecimal string.
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">red</span>
- </li>
- <li><span class="parameter">green</span>
- </li>
- <li><span class="parameter">blue</span>
- </li>
- <li><span class="parameter">alpha</span>
- </li>
- </ul>
- </dd>
- <dt>
- <a name = "is_transparent"></a>
- <strong>is_transparent (my_color)</strong>
- </dt>
- <dd>
- Check if an hexadecimal color is fully transparent.
- Returns true or false
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">my_color</span>
- a string "#rrggbb" or "#rrggbbaa"
- </li>
- </ul>
- </dd>
- <dt>
- <a name = "split"></a>
- <strong>split (str, pat)</strong>
- </dt>
- <dd>
- Split string in different parts which are returned in a table. The delimiter of each part is a pattern given in argument.
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">str</span>
- the string to split
- </li>
- <li><span class="parameter">pat</span>
- the pattern delimiter
- </li>
- </ul>
- </dd>
- <dt>
- <a name = "draw_background_tiles"></a>
- <strong>draw_background_tiles (cr, height, v_margin, width, h_margin)</strong>
- </dt>
- <dd>
- Draw tiles in a cairo context.
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">cr</span>
- a cairo context.
- </li>
- <li><span class="parameter">height</span>
- the height of the surface on which we want tiles
- </li>
- <li><span class="parameter">v_margin</span>
- value used to define top margin and/or bottom margin (tiles are not drawn on the margins)
- </li>
- <li><span class="parameter">width</span>
- the width of the surface on which we want tiles
- </li>
- <li><span class="parameter">h_margin</span>
- value used to define left margin and/or right margin.
- </li>
- </ul>
- </dd>
- <dt>
- <a name = "draw_text_and_background"></a>
- <strong>draw_text_and_background (cr, text, x, y, text_background_color, text_color, show_text_centered_on_x, show_text_centered_on_y, show_text_on_left_of_x, show_text_on_bottom_of_y)</strong>
- </dt>
- <dd>
- Draw text on a rectangle which width and height depend on the text width and height.
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">cr</span>
- a cairo context already initialised with oocairo.context_create( )
- </li>
- <li><span class="parameter">text</span>
- the text to display
- </li>
- <li><span class="parameter">x</span>
- the x coordinate of the left of the text
- </li>
- <li><span class="parameter">y</span>
- the y coordinate of the bottom of the text
- </li>
- <li><span class="parameter">text_background_color</span>
- a string "#rrggbb" or "#rrggbbaa" for the rectangle color
- </li>
- <li><span class="parameter">text_color</span>
- a string "#rrggbb" or "#rrggbbaa" for the text color
- </li>
- <li><span class="parameter">show_text_centered_on_x</span>
- a boolean value not mandatory (false by default) if true, x parameter is the coordinate of the middle of the text
- </li>
- <li><span class="parameter">show_text_centered_on_y</span>
- a boolean value not mandatory (false by default) if true, y parameter is the coordinate of the middle of the text
- </li>
- <li><span class="parameter">show_text_on_left_of_x</span>
- a boolean value not mandatory (false by default) if true, x parameter is the right of the text
- </li>
- <li><span class="parameter">show_text_on_bottom_of_y</span>
- a boolean value not mandatory (false by default) if true, y parameter is the top of the text
- </li>
- </ul>
- </dd>
- <dt>
- <a name = "draw_up_down_arrows"></a>
- <strong>draw_up_down_arrows (cr, x, y_bottom, y_top, value, background_arrow_color, arrow_color, arrow_line_color, up)</strong>
- </dt>
- <dd>
- Drawn one foreground arrow with a background arrow that depend on a value.
- If the value is egal to 0 then the foreground arrow is not drawn.
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">cr</span>
- a cairo context already initialised with oocairo.context_create( )
- </li>
- <li><span class="parameter">x</span>
- the x coordinate in the cairo context where the arrow start
- </li>
- <li><span class="parameter">y_bottom</span>
- the bottom corrdinate of the arrows
- </li>
- <li><span class="parameter">y_top</span>
- the top coordinate of the arrows
- </li>
- <li><span class="parameter">value</span>
- a number
- </li>
- <li><span class="parameter">background_arrow_color</span>
- the color of the background arrow, a string "#rrggbb" or "#rrggbbaa"
- </li>
- <li><span class="parameter">arrow_color</span>
- the color of the foreground arrow, a string "#rrggbb" or "#rrggbbaa"
- </li>
- <li><span class="parameter">arrow_line_color</span>
- the color of the outline of the foreground arrow , a string "#rrggbb" or "#rrggbbaa"
- </li>
- <li><span class="parameter">up</span>
- boolean value if false draw a down arrow, if true draw a up arrow
- </li>
- </ul>
- </dd>
- <dt>
- <a name = "draw_vertical_bar"></a>
- <strong>draw_vertical_bar (cr, h_margin, v_margin, width, height, represent)</strong>
- </dt>
- <dd>
- Draw a vertical bar with gradient color, so it looks like a cylinder, and it's height depends on a value.
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">cr</span>
- a cairo context already initialised with oocairo.context_create( )
- </li>
- <li><span class="parameter">h_margin</span>
- the left and right margin of the bar in the cr
- </li>
- <li><span class="parameter">v_margin</span>
- the top and bottom margin of the bar in the cr
- </li>
- <li><span class="parameter">width</span>
- the width used to display the left margin, the bar and the right margin
- </li>
- <li><span class="parameter">height</span>
- the height used to display the top margin, the bar and the bottom margin
- </li>
- <li><span class="parameter">represent</span>
- a table {background_bar_color = "#rrggbb" or "#rrggbbaa", color = "#rrggbb" or "#rrggbbaa", value =the value used to calculate the height of the bar}
- </li>
- </ul>
- </dd>
- <dt>
- <a name = "draw_horizontal_bar"></a>
- <strong>draw_horizontal_bar (cr, h_margin, v_margin, width, height, represent)</strong>
- </dt>
- <dd>
- Draw an horizontal bar with gradient color, so it looks like a cylinder, and it's height depends on a value.
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">cr</span>
- a cairo context already initialised with oocairo.context_create( )
- </li>
- <li><span class="parameter">h_margin</span>
- the left and right margin of the bar in the cr
- </li>
- <li><span class="parameter">v_margin</span>
- the top and bottom margin of the bar in the cr
- </li>
- <li><span class="parameter">width</span>
- the width used to display the left margin, the bar and the right margin
- </li>
- <li><span class="parameter">height</span>
- the height used to display the top margin, the bar and the bottom margin
- </li>
- <li><span class="parameter">represent</span>
- a table {background_bar_color = "#rrggbb" or "#rrggbbaa", color = "#rrggbb" or "#rrggbbaa", value =the value used to calculate the width of the bar}
- </li>
- </ul>
- </dd>
- <dt>
- <a name = "draw_rounded_corners_rectangle"></a>
- <strong>draw_rounded_corners_rectangle (cr, x, y, width, height, color, rounded_size)</strong>
- </dt>
- <dd>
- Draw a rectangle width rounded corners.
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">cr</span>
- a cairo context already initialised with oocairo.context_create( )
- </li>
- <li><span class="parameter">x</span>
- the x coordinate of the left top corner
- </li>
- <li><span class="parameter">y</span>
- the y corrdinate of the left top corner
- </li>
- <li><span class="parameter">width</span>
- the width of the rectangle
- </li>
- <li><span class="parameter">height</span>
- the height of the rectangle
- </li>
- <li><span class="parameter">color</span>
- a string "#rrggbb" or "#rrggbbaa" for the color of the rectangle
- </li>
- <li><span class="parameter">rounded_size</span>
- a float value from 0 to 1 (0 is no rounded corner) or a table of float value
- </li>
- </ul>
- </dd>
- <dt>
- <a name = "clip_rounded_corners_rectangle"></a>
- <strong>clip_rounded_corners_rectangle (cr, x, y, width, height, rounded_size)</strong>
- </dt>
- <dd>
- Set a rectangle width rounded corners that define the area to draw.
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">cr</span>
- a cairo context already initialised with oocairo.context_create( )
- </li>
- <li><span class="parameter">x</span>
- the x coordinate of the left top corner
- </li>
- <li><span class="parameter">y</span>
- the y corrdinate of the left top corner
- </li>
- <li><span class="parameter">width</span>
- the width of the rectangle
- </li>
- <li><span class="parameter">height</span>
- the height of the rectangle
- </li>
- <li><span class="parameter">rounded_size</span>
- a float value from 0 to 1 (0 is no rounded corner)
- </li>
- </ul>
- </dd>
- <dt>
- <a name = "draw_rounded_corners_horizontal_graph"></a>
- <strong>draw_rounded_corners_horizontal_graph (cr, x, y, width, height, background_color, graph_color, rounded_size, value_to_represent, graph_line_color)</strong>
- </dt>
- <dd>
- Draw a foreground rounded corners rectangle which width depends on a value, and a background rounded corners rectangle.
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">cr</span>
- a cairo context already initialised with oocairo.context_create( )
- </li>
- <li><span class="parameter">x</span>
- the x coordinate of the left top corner
- </li>
- <li><span class="parameter">y</span>
- the y corrdinate of the left top corner
- </li>
- <li><span class="parameter">width</span>
- the width of the background rectangle and the maximal width of th foreground rectangle
- </li>
- <li><span class="parameter">height</span>
- the height of the background and the foreground rectangles
- </li>
- <li><span class="parameter">background_color</span>
- a string "#rrggbb" or "#rrggbbaa" for the color of the background rectangle
- </li>
- <li><span class="parameter">graph_color</span>
- a string "#rrggbb" or "#rrggbbaa" for the color of the foreground rectangle
- </li>
- <li><span class="parameter">rounded_size</span>
- a float value from 0 to 1 (0 is no rounded corner)
- </li>
- <li><span class="parameter">value_to_represent</span>
- the percent of the max width used to calculate the width of the foreground rectangle
- </li>
- <li><span class="parameter">graph_line_color</span>
- a string "#rrggbb" or "#rrggbbaa" for the outiline color of the background rectangle
- </li>
- </ul>
- </dd>
- <dt>
- <a name = "draw_rounded_corners_vertical_graph"></a>
- <strong>draw_rounded_corners_vertical_graph (cr, x, y, width, height, background_color, graph_color, rounded_size, value_to_represent, graph_line_color)</strong>
- </dt>
- <dd>
- Draw a foreground rounded corners rectangle which height depends on a value, and a background rounded corners rectangle.
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">cr</span>
- a cairo context already initialised with oocairo.context_create( )
- </li>
- <li><span class="parameter">x</span>
- the x coordinate of the left top corner
- </li>
- <li><span class="parameter">y</span>
- the y corrdinate of the left top corner
- </li>
- <li><span class="parameter">width</span>
- the width of the background and the foreground rectangles
- </li>
- <li><span class="parameter">height</span>
- the height of the background rectangle and the maximal height of the foreground rectangle
- </li>
- <li><span class="parameter">background_color</span>
- a string "#rrggbb" or "#rrggbbaa" for the color of the background rectangle
- </li>
- <li><span class="parameter">graph_color</span>
- a string "#rrggbb" or "#rrggbbaa" for the color of the foreground rectangle
- </li>
- <li><span class="parameter">rounded_size</span>
- a float value from 0 to 1 (0 is no rounded corner)
- </li>
- <li><span class="parameter">value_to_represent</span>
- the percent of the max height used to calculate the height of the foreground rectangle
- </li>
- <li><span class="parameter">graph_line_color</span>
- a string "#rrggbb" or "#rrggbbaa" for the outiline color of the background rectangle
- </li>
- </ul>
- </dd>
- <dt>
- <a name = "generate_rounded_rectangle_with_text"></a>
- <strong>generate_rounded_rectangle_with_text (cr, width, height, text, padding, background_color, text_color, font_size, rounded_size, border)</strong>
- </dt>
- <dd>
- Generate a text in front of a centered rectangle with rounded corners (or not) in a cairo context.
- It returns a table ={ width = the width of the image, height = the height of the image}
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">cr</span>
- a cairo context already initialised with oocairo.context_create( )
- </li>
- <li><span class="parameter">width</span>
- the width of the widget
- </li>
- <li><span class="parameter">height</span>
- the height of the widget
- </li>
- <li><span class="parameter">text</span>
- the text to display
- </li>
- <li><span class="parameter">padding</span>
- the left/right/top/bottom padding used to center the text in the background rectangle
- </li>
- <li><span class="parameter">background_color</span>
- a string "#rrggbb" or "#rrggbbaa" for the color of the background rectangle
- </li>
- <li><span class="parameter">text_color</span>
- a string "#rrggbb" or "#rrggbbaa" for the color of the text
- </li>
- <li><span class="parameter">font_size</span>
- define the size of the font
- </li>
- <li><span class="parameter">rounded_size</span>
- a float value from 0 to 1 (0 is no rounded corner)
- </li>
- <li><span class="parameter">border</span>
- a color as a string "#rrggbb" or "#rrggbbaa"
- </li>
- </ul>
- </dd>
- <dt>
- <a name = "draw_triangle"></a>
- <strong>draw_triangle (cr, first, second, third, color)</strong>
- </dt>
- <dd>
- Draw a rectangular triangle filled with given color
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">cr</span>
- cairo context
- </li>
- <li><span class="parameter">first</span>
- point coordinates {x= 1.0, y = 2.0}
- </li>
- <li><span class="parameter">second</span>
- point coordinates {x= 1.0, y = 2.0}
- </li>
- <li><span class="parameter">third</span>
- point coordinates {x= 1.0, y = 2.0}
- </li>
- <li><span class="parameter">color</span>
- a color as a string "#rrggbb" or "#rrggbbaa"
- </li>
- </ul>
- </dd>
- <dt>
- <a name = "draw_triangle_outline"></a>
- <strong>draw_triangle_outline (cr, first, second, third, color)</strong>
- </dt>
- <dd>
- Draw a rectangular triangular outline of the given color
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">cr</span>
- cairo context
- </li>
- <li><span class="parameter">first</span>
- point coordinates {x= 1.0, y = 2.0}
- </li>
- <li><span class="parameter">second</span>
- point coordinates {x= 1.0, y = 2.0}
- </li>
- <li><span class="parameter">third</span>
- point coordinates {x= 1.0, y = 2.0}
- </li>
- <li><span class="parameter">color</span>
- a color as a string "#rrggbb" or "#rrggbbaa"
- </li>
- </ul>
- </dd>
- <dt>
- <a name = "compute_bar_width"></a>
- <strong>compute_bar_width (nb_bars, width, sep)</strong>
- </dt>
- <dd>
- Compute the width of each bar in a graph
- It returns the width of the bar and a value
- that corresponds to the remaing space divided
- by 2
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">nb_bars</span>
- the number of bars
- </li>
- <li><span class="parameter">width</span>
- the width of the graph
- </li>
- <li><span class="parameter">sep</span>
- the size between two bars
- </li>
- </ul>
- </dd>
- <dt>
- <a name = "draw_triangle_graph_using_bars"></a>
- <strong>draw_triangle_graph_using_bars (cr, width, height, h_margin, v_margin, color, value)</strong>
- </dt>
- <dd>
- Display a value using bars or parts of bar in a triangular form
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">cr</span>
- cairo context
- </li>
- <li><span class="parameter">width</span>
- width of the graph
- </li>
- <li><span class="parameter">height</span>
- height of the graph
- </li>
- <li><span class="parameter">h_margin</span>
- horizontal space left at left and right of the graph
- </li>
- <li><span class="parameter">v_margin</span>
- vertical space left at top and bottom of the graph
- </li>
- <li><span class="parameter">color</span>
- the color of the graph
- </li>
- <li><span class="parameter">value</span>
- to represent
- </li>
- </ul>
- </dd>
- <dt>
- <a name = "hash_remove"></a>
- <strong>hash_remove (hash, key)</strong>
- </dt>
- <dd>
- Remove an element from a table using key.
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">hash</span>
- the table
- </li>
- <li><span class="parameter">key</span>
- the key to remove
- </li>
- </ul>
- </dd>
- <dt>
- <a name = "get_days_in_month"></a>
- <strong>get_days_in_month (month, year)</strong>
- </dt>
- <dd>
- Get the number of days in a given month of a year.
- iT returns a number
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">month</span>
- the month we focus on ( 1 to 12 )
- </li>
- <li><span class="parameter">year</span>
- a number YYYY used to check if it's a leap year.
- </li>
- </ul>
- </dd>
- <dt>
- <a name = "get_ISO8601_weeks_number_of_month"></a>
- <strong>get_ISO8601_weeks_number_of_month (month, year)</strong>
- </dt>
- <dd>
- Find the weeks numbers of a given month.
- Implementation as per the ISO 8601 definition (http://en.wikipedia.org/wiki/ISO_week_date)
- Fully compatible with original, returns table with 6 week numbers
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">month</span>
- the month
- </li>
- <li><span class="parameter">year</span>
- the year
- </li>
- </ul>
- </dd>
- <dt>
- <a name = "get_nb_cores"></a>
- <strong>get_nb_cores ()</strong>
- </dt>
- <dd>
- Get the number of cpu cores
- <h3>Returns:</h3>
- <ol>
- a number
- </ol>
- </dd>
- <dt>
- <a name = "get_cpu_name"></a>
- <strong>get_cpu_name ()</strong>
- </dt>
- <dd>
- Get the cpu name
- <h3>Returns:</h3>
- <ol>
- a string describing the cpu
- </ol>
- </dd>
- <dt>
- <a name = "get_mounted_devices"></a>
- <strong>get_mounted_devices ()</strong>
- </dt>
- <dd>
- Get all the currently mounted devices
- <h3>Returns:</h3>
- <ol>
- an indexed table from 1 to n, where each element is a table with the "mnt", and "dev" key.
- </ol>
- </dd>
- <dt>
- <a name = "get_total_mem_in_kb"></a>
- <strong>get_total_mem_in_kb ()</strong>
- </dt>
- <dd>
- Get the total amount of RAM in kb
- <h3>Returns:</h3>
- <ol>
- a number
- </ol>
- </dd>
- <dt>
- <a name = "get_input_devices"></a>
- <strong>get_input_devices ()</strong>
- </dt>
- <dd>
- Get the input device names
- <h3>Returns:</h3>
- <ol>
- an table with "keyboard" and "mouse" keys
- </ol>
- </dd>
- <dt>
- <a name = "get_graphic_card"></a>
- <strong>get_graphic_card ()</strong>
- </dt>
- <dd>
- Get the current graphic card
- <h3>Returns:</h3>
- <ol>
- a string
- </ol>
- </dd>
- <dt>
- <a name = "get_os_release_informations"></a>
- <strong>get_os_release_informations ()</strong>
- </dt>
- <dd>
- Get OS related informations from /etc/os-release
- <h3>Returns:</h3>
- <ol>
- a key/value table
- </ol>
- </dd>
- <dt>
- <a name = "icons_only_tasklist"></a>
- <strong>icons_only_tasklist (w, buttons, label, data, objects)</strong>
- </dt>
- <dd>
- Function used in order to have a tasklist with icons only
- The classical usage of it is:
- awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, mytasklist.buttons,nil,icons_only_tasklist)
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">w</span>
- </li>
- <li><span class="parameter">buttons</span>
- </li>
- <li><span class="parameter">label</span>
- </li>
- <li><span class="parameter">data</span>
- </li>
- <li><span class="parameter">objects</span>
- </li>
- </ul>
- </dd>
- <dt>
- <a name = "load_properties"></a>
- <strong>load_properties (properties, data, graph, superproperties)</strong>
- </dt>
- <dd>
- Function used in widgets in order to create a local table of
- all the widget properties which are a mix between the properties
- provided by the user trought the widget interface, or the properties
- defined by superproperties
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">properties</span>
- a table with the names of all the properties
- </li>
- <li><span class="parameter">data</span>
- the data table of the module that references all the same widgets
- </li>
- <li><span class="parameter">graph</span>
- the widget itself
- </li>
- <li><span class="parameter">superproperties</span>
- the table of the superporperties
- </li>
- </ul>
- </dd>
- </dl>
- </div> <!-- id="content" -->
- </div> <!-- id="main" -->
- <div id="about">
- <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
- <i style="float:right;">Last updated 2015-08-04 10:16:50 </i>
- </div> <!-- id="about" -->
- </div> <!-- id="container" -->
- </body>
- </html>
|