summaryrefslogtreecommitdiffstats
path: root/Meter.h
Commit message (Collapse)AuthorAgeFilesLines
* Rename Meter.setValues() functions to updateValues()Explorer092016-05-041-3/+4
| | | | | | | | | | | | Rationale (copied from htop issue #471): The function name "setValues" is misleading. For most OOP (object- oriented programming) contexts, setXXX functions mean they will change some member variables of an object into something specified in function arguments. But in the *Meter_setValues() case, the new values are not from the arguments, but from a hard-coded source. The caller is not supposed to change the values[] to anything it likes, but rather to "update" the values from the source. Hence, updateValues is a better name for this family of functions.
* New macro GRAPH_HEIGHT for Graph Meter heightExplorer092016-01-211-0/+2
| | | | | | | | (Cherry-picked from e93028d7fa0c5f00b5dc3336fd28abaf905cd572, the experimental graph coloring branch) Currently GRAPH_HEIGHT=4 . This prevents hard-coding the height of the graph meters, and allows user to change it at compile-time.
* Introduce CLAMP macro. Unify all MIN(MAX(a,b),c) uses.Explorer092016-01-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | With the CLAMP macro replacing the combination of MIN and MAX, we will have at least two advantages: 1. It's more obvious semantically. 2. There are no more mixes of confusing uses like MIN(MAX(a,b),c) and MAX(MIN(a,b),c) and MIN(a,MAX(b,c)) appearing everywhere. We unify the 'clamping' with a single macro. Note that the behavior of this CLAMP macro is different from the combination `MAX(low,MIN(x,high))`. * This CLAMP macro expands to two comparisons instead of three from MAX and MIN combination. In theory, this makes the code slightly smaller, in case that (low) or (high) or both are computed at runtime, so that compilers cannot optimize them. (The third comparison will matter if (low)>(high); see below.) * CLAMP has a side effect, that if (low)>(high) it will produce weird results. Unlike MIN & MAX which will force either (low) or (high) to win. No assertion of ((low)<=(high)) is done in this macro, for now. This CLAMP macro is implemented like described in glib <http://developer.gnome.org/glib/stable/glib-Standard-Macros.html> and does not handle weird uses like CLAMP(a++, low++, high--) .
* make units more dynamicChristian Hesse2015-08-271-0/+2
| | | | Signed-off-by: Christian Hesse <mail@eworm.de>
* remove UTF-8 code when compiling with --disable-unicodeChristian Hesse2015-08-191-0/+8
|
* make arrays one dimensionalChristian Hesse2015-08-191-0/+3
| | | | | | With more dimensional arrays we have to define the array size. Use one dimensional arrays to be more flexible. Additionally this allows to shrink array size for ASCII.
* Fix saving of header states, motion in Setup screen.Hisham Muhammad2015-03-161-1/+1
|
* Add longer descriptions to available meters.Hisham Muhammad2015-02-031-0/+1
|
* Another mega-patch for the refactoring process.Hisham Muhammad2015-01-231-0/+2
| | | | | Kinda runs, but functionality from the original main loop is still missing. Patience.
* Sorry about the mega-patch.Hisham Muhammad2015-01-211-6/+5
| | | | | This is a work-in-progress, code is currently broken. (Some actions, and notably, the header, are missing.)
* Move UptimeMeter into platform-dependent area.Hisham Muhammad2014-11-271-2/+0
| | | | Set up environment to move other meters.
* alignment improvementsHisham Muhammad2014-02-271-0/+6
|
* BUGFIX: Fix crash when adding meters and toggling detailed CPU time.Hisham Muhammad2014-01-161-3/+4
| | | | | See https://bugzilla.redhat.com/show_bug.cgi?id=987805 for details. (thanks to Dawid Gajownik for the detailed analysis!)
* Changes in object model: separate class objects to store vtable. Also, nicer ↵Hisham Muhammad2012-12-051-51/+45
| | | | UTF-8 display of big numbers.
* major header cleanupHisham Muhammad2011-12-261-27/+2
|
* Convert affinity control from the deprecated PLPA to HWLOCHisham Muhammad2011-09-241-1/+0
|
* Tempus fugit.Hisham Muhammad2011-05-261-1/+1
|
* * Option for counting CPUs from zeroHisham Muhammad2011-03-221-1/+9
| | | | | | (thanks to Sean Noonan) * Meters update in every screen (no longer halting while on Setup, etc.)
* Tempus fugit.Hisham Muhammad2010-02-251-1/+1
|
* warning fixesHisham Muhammad2010-02-251-5/+5
|
* changes for htop 0.8.2Hisham Muhammad2009-06-021-7/+6
|
* Option to display hostname in the meters areaHisham Muhammad2009-02-171-0/+1
|
* ACPI Battery meterHisham Muhammad2008-09-231-0/+2
| | | | | contributed by Ian Hands
* Clean up headers by using 'static' whenever possible.Hisham Muhammad2008-03-091-13/+5
| | | | | Reduces resulting code size.
* Add Unicode support, enabled with the --enable-unicodeHisham Muhammad2008-03-091-0/+1
| | | | | | flag, which requires libncursesw. Thanks to Sergej Pupykin!
* Performance improvement hackathon: improve process comparison routines,Hisham Muhammad2006-07-111-0/+5
| | | | | | | | | | disable useless code in release builds such as runtime type-checking on dynamic data structures and process fields that are not being computed, faster(?) method for verifying the process owner (still need to ensure correctness), don't destroy and create process objects for hidden kernel threads over and over. Phew. I shouldn't be doing all this today, but I could not resist.
* Regenerated all headers.Hisham Muhammad2006-06-061-24/+10
|
* Final fixes to make "All CPUs" the default CPU display mode.Hisham Muhammad2006-05-091-1/+3
|
* - Overhaul meters implementation;Hisham Muhammad2006-04-101-42/+109
| | | | | | - add AllCPUsMeter; - because of that, the new .htoprc is incompatible with previous released versions.
* Initial import.Hisham Muhammad2006-03-041-0/+94

© 2014-2024 Faster IT GmbH | imprint | privacy policy