1
/* $Id: drv_generic_keypad.c,v 1.3 2006/02/22 15:59:39 cmay Exp $
3
* generic driver helper for keypads
5
* Copyright (C) 2006 Chris Maj <cmaj@freedomcorpse.com>
6
* Copyright (C) 2006 The LCD4Linux Team <lcd4linux-devel@users.sourceforge.net>
8
* This file is part of LCD4Linux.
10
* LCD4Linux is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2, or (at your option)
15
* LCD4Linux is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
20
* You should have received a copy of the GNU General Public License
21
* along with this program; if not, write to the Free Software
22
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25
* $Log: drv_generic_keypad.c,v $
26
* Revision 1.3 2006/02/22 15:59:39 cmay
27
* removed KEYPADSIZE cruft per harbaum's suggestion
29
* Revision 1.2 2006/02/21 15:55:59 cmay
30
* removed new update function for keypad, consolidated it with draw
32
* Revision 1.1 2006/02/21 05:50:34 reinelt
33
* keypad support from Cris Maj
42
#include "widget_keypad.h"
44
#include "drv_generic_keypad.h"
46
static char *Section = NULL;
47
static char *Driver = NULL;
49
int (*drv_generic_keypad_real_press) () = NULL;
51
int drv_generic_keypad_init(const char *section, const char *driver)
55
Section = (char *) section;
56
Driver = (char *) driver;
58
/* register keypad widget */
65
int drv_generic_keypad_press(const int num)
70
if (drv_generic_keypad_real_press)
71
val = drv_generic_keypad_real_press(num);
73
w = widget_find(WIDGET_TYPE_KEYPAD, &val);
75
if (w && w->class->draw)
81
int drv_generic_keypad_quit(void)