~ubuntu-branches/ubuntu/trusty/lcd4linux/trusty-proposed

« back to all changes in this revision

Viewing changes to drv_generic_keypad.c

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2006-08-27 17:16:46 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060827171646-j63wpiogypbaik7a
* New Maintainer! 
* Dropping old maintainer in agreement with nobse@debian.org. 
  Thanks for your work so far, nobse!
* urgency medium because of release critical bugs
* Bump standards version to 3.7.2 (no changes needed)
* add build depends on libmpd-dev for mpd support
* new upstream snapshot
* drop dependency of ${misc:Depends}, not used anyway
* now supporting USB2LCD
* don't update config.{sub,guess} in clean target automatically
* new target ``update-config-sub-guess'' to update config.{sub,guess}
* Acking NMU, Thanks Steinar! (Closes: #374682)
* Bug fix: "FTBFS: undefined reference to many X functions", thanks to
  Eric Dorland. The problem was in driver.m4 (Closes: #381606).
* Bug fix: "Please stop Build-Depending on automake", thanks to Eric
  Dorland (Closes: #381812).
* Don't ship /etc/lcd4linux.conf anymore. Please install and customize 
  it yourself using /usr/share/doc/lcd4linux.conf.sample as template
* Bug fix: "lcd4linux - FTBFS: uses ia32 assembler", thanks to Bastian
  Blank. Fixed by adding #ifdefs to produce those asm statements on i386
  and amd64 only. (Closes: #336017).
* Removing outdated NEWS, FAQ, README.KDE on upstream request.
* Install manpage for lcd4linux

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: drv_generic_keypad.c,v 1.3 2006/02/22 15:59:39 cmay Exp $
 
2
 *
 
3
 * generic driver helper for keypads
 
4
 *
 
5
 * Copyright (C) 2006 Chris Maj <cmaj@freedomcorpse.com>
 
6
 * Copyright (C) 2006 The LCD4Linux Team <lcd4linux-devel@users.sourceforge.net>
 
7
 *
 
8
 * This file is part of LCD4Linux.
 
9
 *
 
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)
 
13
 * any later version.
 
14
 *
 
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.
 
19
 *
 
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.
 
23
 *
 
24
 *
 
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
 
28
 *
 
29
 * Revision 1.2  2006/02/21 15:55:59  cmay
 
30
 * removed new update function for keypad, consolidated it with draw
 
31
 *
 
32
 * Revision 1.1  2006/02/21 05:50:34  reinelt
 
33
 * keypad support from Cris Maj
 
34
 *
 
35
 *
 
36
 */
 
37
 
 
38
#include <stdio.h>
 
39
 
 
40
#include "debug.h"
 
41
#include "widget.h"
 
42
#include "widget_keypad.h"
 
43
 
 
44
#include "drv_generic_keypad.h"
 
45
 
 
46
static char *Section = NULL;
 
47
static char *Driver = NULL;
 
48
 
 
49
int (*drv_generic_keypad_real_press) () = NULL;
 
50
 
 
51
int drv_generic_keypad_init(const char *section, const char *driver)
 
52
{
 
53
    WIDGET_CLASS wc;
 
54
 
 
55
    Section = (char *) section;
 
56
    Driver = (char *) driver;
 
57
 
 
58
    /* register keypad widget */
 
59
    wc = Widget_Keypad;
 
60
    widget_register(&wc);
 
61
 
 
62
    return 0;
 
63
}
 
64
 
 
65
int drv_generic_keypad_press(const int num)
 
66
{
 
67
    WIDGET *w;
 
68
    int val = 0;
 
69
 
 
70
    if (drv_generic_keypad_real_press)
 
71
        val = drv_generic_keypad_real_press(num);
 
72
 
 
73
    w = widget_find(WIDGET_TYPE_KEYPAD, &val);
 
74
 
 
75
    if (w && w->class->draw)
 
76
        w->class->draw(w);
 
77
 
 
78
    return val;
 
79
}
 
80
 
 
81
int drv_generic_keypad_quit(void)
 
82
{
 
83
    return 0;
 
84
}