From ab44f32859ac61072a561869787089e13adaf509 Mon Sep 17 00:00:00 2001 From: inmarket Date: Sat, 6 Jul 2013 01:45:24 +1000 Subject: Remove widget structure members when they are not needed for input tracking Also doco update for Enabled Flag --- src/gwin/label.c | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) (limited to 'src/gwin/label.c') diff --git a/src/gwin/label.c b/src/gwin/label.c index e757892d..cd469210 100644 --- a/src/gwin/label.c +++ b/src/gwin/label.c @@ -62,24 +62,30 @@ static const gwidgetVMT labelVMT = { 0, // The after-clear routine }, gwinLabelDefaultDraw, // default drawing routine - { - 0, // Process mose down events (NOT USED) - 0, // Process mouse up events (NOT USED) - 0, // Process mouse move events (NOT USED) - }, - { - 0, // No toggle role - 0, // Assign Toggles (NOT USED) - 0, // Get Toggles (NOT USED) - 0, // Process toggle off event (NOT USED) - 0, // Process toggle on event (NOT USED) - }, - { - 0, // No dial roles - 0, // Assign Dials (NOT USED) - 0, // Get Dials (NOT USED) - 0, // Procees dial move events (NOT USED) - } + #if GINPUT_NEED_MOUSE + { + 0, // Process mose down events (NOT USED) + 0, // Process mouse up events (NOT USED) + 0, // Process mouse move events (NOT USED) + }, + #endif + #if GINPUT_NEED_TOGGLE + { + 0, // No toggle role + 0, // Assign Toggles (NOT USED) + 0, // Get Toggles (NOT USED) + 0, // Process toggle off event (NOT USED) + 0, // Process toggle on event (NOT USED) + }, + #endif + #if GINPUT_NEED_DIAL + { + 0, // No dial roles + 0, // Assign Dials (NOT USED) + 0, // Get Dials (NOT USED) + 0, // Procees dial move events (NOT USED) + }, + #endif }; GHandle gwinLabelCreate(GLabelWidget *widget, GWidgetInit *pInit) { -- cgit v1.2.3