<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dmenu.git/drw.h, branch master</title>
<subtitle>dynamic menu
</subtitle>
<link rel='alternate' type='text/html' href='https://git.kartoffeltoaster.de/dmenu.git/'/>
<entry>
<title>cleanup schemes and colors</title>
<updated>2025-09-27T10:10:37+00:00</updated>
<author>
<name>Hiltjo Posthuma</name>
<email>hiltjo@codemadness.org</email>
</author>
<published>2025-09-27T10:10:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.kartoffeltoaster.de/dmenu.git/commit/?id=77f96d704bd16b04fe731da815a4e76c4e62decb'/>
<id>77f96d704bd16b04fe731da815a4e76c4e62decb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>introduce drw_fontset_getwidth_clamp()</title>
<updated>2022-03-25T21:49:07+00:00</updated>
<author>
<name>NRK</name>
<email>nrk@disroot.org</email>
</author>
<published>2022-03-23T20:00:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.kartoffeltoaster.de/dmenu.git/commit/?id=6be057f060543bb0f3ed9423904263617cdffffe'/>
<id>6be057f060543bb0f3ed9423904263617cdffffe</id>
<content type='text'>
getting the width of a string is an O(n) operation, and in many cases
users only care about getting the width upto a certain number.

instead of calling drw_fontset_getwidth() and *then* clamping the
result, this patch introduces drw_fontset_getwidth_clamp() function,
similar to strnlen(), which will stop once we reach n.

the `invert` parameter was overloaded internally to preserve the API,
however library users should be calling drw_fontset_getwidth_clamp() and
not depend upon internal behavior of drw_text().
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
getting the width of a string is an O(n) operation, and in many cases
users only care about getting the width upto a certain number.

instead of calling drw_fontset_getwidth() and *then* clamping the
result, this patch introduces drw_fontset_getwidth_clamp() function,
similar to strnlen(), which will stop once we reach n.

the `invert` parameter was overloaded internally to preserve the API,
however library users should be calling drw_fontset_getwidth_clamp() and
not depend upon internal behavior of drw_text().
</pre>
</div>
</content>
</entry>
<entry>
<title>import new drw from libsl and minor fixes.</title>
<updated>2016-06-03T17:13:15+00:00</updated>
<author>
<name>Markus Teich</name>
<email>markus.teich@stusta.mhn.de</email>
</author>
<published>2016-05-21T19:51:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.kartoffeltoaster.de/dmenu.git/commit/?id=44c7de3dcf49ee568863f55610f40c7a05b4dfe7'/>
<id>44c7de3dcf49ee568863f55610f40c7a05b4dfe7</id>
<content type='text'>
- extract drawitem function (code deduplication)
- fix bug where inputw was not correctly calculated from the widest item, but
  just from the one with the longest strlen() which is not the same. It's better
  now, but does not account for fallback fonts, since it would be too slow to
  calculate all the correct item widths on startup.
- minor code style fixes (indentation, useless line breaks)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- extract drawitem function (code deduplication)
- fix bug where inputw was not correctly calculated from the widest item, but
  just from the one with the longest strlen() which is not the same. It's better
  now, but does not account for fallback fonts, since it would be too slow to
  calculate all the correct item widths on startup.
- minor code style fixes (indentation, useless line breaks)
</pre>
</div>
</content>
</entry>
<entry>
<title>drw style improvements</title>
<updated>2015-09-27T21:56:02+00:00</updated>
<author>
<name>Hiltjo Posthuma</name>
<email>hiltjo@codemadness.org</email>
</author>
<published>2015-09-27T21:56:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.kartoffeltoaster.de/dmenu.git/commit/?id=03cb1ec55abebb6355858f582d68e33dabcfe6f5'/>
<id>03cb1ec55abebb6355858f582d68e33dabcfe6f5</id>
<content type='text'>
this makes the code-style more consistent aswell.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this makes the code-style more consistent aswell.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use libdraw: add Xft and fallback-fonts support to graphics lib</title>
<updated>2015-06-27T19:47:10+00:00</updated>
<author>
<name>Hiltjo Posthuma</name>
<email>hiltjo@codemadness.org</email>
</author>
<published>2015-05-04T19:54:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.kartoffeltoaster.de/dmenu.git/commit/?id=4b1fecd44e8376594c418663351fcb30c4e841de'/>
<id>4b1fecd44e8376594c418663351fcb30c4e841de</id>
<content type='text'>
- libdraw, util: add drw.{c,h}, util.{c,h} and update code.
- libdraw: fix drw_rect(): use w and h parameter.
- libdraw: print errstr if last character in string was ":" (sbase).
- libdraw: drw_clr_free() allow valid free(NULL).
- config.def.h: set default font to monospace.
- cleanup() on exit.
- LICENSE: update license string for dmenu -v to 2015.
- LICENSE: add myself to LICENSE
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- libdraw, util: add drw.{c,h}, util.{c,h} and update code.
- libdraw: fix drw_rect(): use w and h parameter.
- libdraw: print errstr if last character in string was ":" (sbase).
- libdraw: drw_clr_free() allow valid free(NULL).
- config.def.h: set default font to monospace.
- cleanup() on exit.
- LICENSE: update license string for dmenu -v to 2015.
- LICENSE: add myself to LICENSE
</pre>
</div>
</content>
</entry>
</feed>
