summaryrefslogtreecommitdiffstats
path: root/AffinityPanel.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2008-03-09 08:58:38 +0000
committerHisham Muhammad <hisham@gobolinux.org>2008-03-09 08:58:38 +0000
commitda23c8c5a188324455c8f417293c10d85f65cb63 (patch)
treed7a4b8cb0af705de6650e20e00ba3da04d84b27f /AffinityPanel.c
parent12f4f09e6ed288bdedc86e4ef22f3cc34f0e787a (diff)
Clean up headers by using 'static' whenever possible.
Reduces resulting code size.
Diffstat (limited to 'AffinityPanel.c')
-rw-r--r--AffinityPanel.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/AffinityPanel.c b/AffinityPanel.c
index 007b0590..bfd10e28 100644
--- a/AffinityPanel.c
+++ b/AffinityPanel.c
@@ -7,6 +7,23 @@
#include "debug.h"
#include <assert.h>
+static HandlerResult AffinityPanel_eventHandler(Panel* this, int ch) {
+ HandlerResult result = IGNORED;
+ CheckItem* selected = (CheckItem*) Panel_getSelected(this);
+ switch(ch) {
+ case ' ':
+ CheckItem_set(selected, ! (CheckItem_get(selected)) );
+ result = HANDLED;
+ break;
+ case 0x0a:
+ case 0x0d:
+ case KEY_ENTER:
+ result = BREAK_LOOP;
+ break;
+ }
+ return result;
+}
+
Panel* AffinityPanel_new(int processorCount, unsigned long mask) {
Panel* this = Panel_new(1, 1, 1, 1, CHECKITEM_CLASS, true, ListItem_compare);
this->eventHandler = AffinityPanel_eventHandler;
@@ -29,20 +46,3 @@ unsigned long AffinityPanel_getAffinity(Panel* this) {
}
return mask;
}
-
-HandlerResult AffinityPanel_eventHandler(Panel* this, int ch) {
- HandlerResult result = IGNORED;
- CheckItem* selected = (CheckItem*) Panel_getSelected(this);
- switch(ch) {
- case ' ':
- CheckItem_set(selected, ! (CheckItem_get(selected)) );
- result = HANDLED;
- break;
- case 0x0a:
- case 0x0d:
- case KEY_ENTER:
- result = BREAK_LOOP;
- break;
- }
- return result;
-}

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