diff options
| author | cmay <> | 2006-02-21 15:55:59 +0000 | 
|---|---|---|
| committer | cmay <> | 2006-02-21 15:55:59 +0000 | 
| commit | 55f062f9ccc5ccfead277b72262fc0e0f3a8f415 (patch) | |
| tree | 8f815d007711d1ba18bfbcf060d0b86984fdd5aa | |
| parent | eefaa2aeda11bb5c505718c5700f0db9a4994636 (diff) | |
| download | lcd4linux-55f062f9ccc5ccfead277b72262fc0e0f3a8f415.tar.gz | |
[lcd4linux @ 2006-02-21 15:55:59 by cmay]
removed new update function for keypad, consolidated it with draw
Diffstat (limited to '')
| -rw-r--r-- | drv_generic_keypad.c | 9 | ||||
| -rw-r--r-- | drv_generic_keypad.h | 6 | ||||
| -rw-r--r-- | widget.h | 6 | ||||
| -rw-r--r-- | widget_keypad.c | 18 | 
4 files changed, 22 insertions, 17 deletions
| diff --git a/drv_generic_keypad.c b/drv_generic_keypad.c index cdf2d08..3a02b14 100644 --- a/drv_generic_keypad.c +++ b/drv_generic_keypad.c @@ -1,4 +1,4 @@ -/* $Id: drv_generic_keypad.c,v 1.1 2006/02/21 05:50:34 reinelt Exp $ +/* $Id: drv_generic_keypad.c,v 1.2 2006/02/21 15:55:59 cmay Exp $   *   * generic driver helper for keypads   * @@ -23,6 +23,9 @@   *   *   * $Log: drv_generic_keypad.c,v $ + * Revision 1.2  2006/02/21 15:55:59  cmay + * removed new update function for keypad, consolidated it with draw + *   * Revision 1.1  2006/02/21 05:50:34  reinelt   * keypad support from Cris Maj   * @@ -72,8 +75,8 @@ int drv_generic_keypad_press(const int num)      w = widget_find(WIDGET_TYPE_KEYPAD, &val); -    if (w && w->class->update) -	w->class->update(w); +    if (w && w->class->draw) +	w->class->draw(w);      return val;  } diff --git a/drv_generic_keypad.h b/drv_generic_keypad.h index 1bc0c03..98365c6 100644 --- a/drv_generic_keypad.h +++ b/drv_generic_keypad.h @@ -1,4 +1,4 @@ -/* $Id: drv_generic_keypad.h,v 1.1 2006/02/21 05:50:34 reinelt Exp $ +/* $Id: drv_generic_keypad.h,v 1.2 2006/02/21 15:55:59 cmay Exp $   *   * generic driver helper for keypads   * @@ -20,6 +20,9 @@   * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.   *   * $Log: drv_generic_keypad.h,v $ + * Revision 1.2  2006/02/21 15:55:59  cmay + * removed new update function for keypad, consolidated it with draw + *   * Revision 1.1  2006/02/21 05:50:34  reinelt   * keypad support from Cris Maj   * @@ -39,7 +42,6 @@ extern int (*drv_generic_keypad_real_press) (const int num);  /* generic functions and widget callbacks */  int drv_generic_keypad_init(const char *section, const char *driver);  int drv_generic_keypad_press(const int num); -int drv_generic_keypad_draw(WIDGET * W);  int drv_generic_keypad_quit(void);  #endif @@ -1,4 +1,4 @@ -/* $Id: widget.h,v 1.18 2006/02/21 05:50:34 reinelt Exp $ +/* $Id: widget.h,v 1.19 2006/02/21 15:55:59 cmay Exp $   *   * generic widget handling   * @@ -23,6 +23,9 @@   *   *   * $Log: widget.h,v $ + * Revision 1.19  2006/02/21 15:55:59  cmay + * removed new update function for keypad, consolidated it with draw + *   * Revision 1.18  2006/02/21 05:50:34  reinelt   * keypad support from Cris Maj   * @@ -111,7 +114,6 @@ typedef struct WIDGET_CLASS {      int (*init) (struct WIDGET * Self);      int (*draw) (struct WIDGET * Self);      int (*find) (struct WIDGET * Self, void *needle); -    void (*update) (void *Self);      int (*quit) (struct WIDGET * Self);  } WIDGET_CLASS; diff --git a/widget_keypad.c b/widget_keypad.c index 8c278b1..d0de69f 100644 --- a/widget_keypad.c +++ b/widget_keypad.c @@ -1,4 +1,4 @@ -/* $Id: widget_keypad.c,v 1.1 2006/02/21 05:50:34 reinelt Exp $ +/* $Id: widget_keypad.c,v 1.2 2006/02/21 15:55:59 cmay Exp $   *   * keypad widget handling   * @@ -21,6 +21,9 @@   *   *   * $Log: widget_keypad.c,v $ + * Revision 1.2  2006/02/21 15:55:59  cmay + * removed new update function for keypad, consolidated it with draw + *   * Revision 1.1  2006/02/21 05:50:34  reinelt   * keypad support from Cris Maj   * @@ -55,10 +58,9 @@  #endif -void widget_keypad_update(void *Self) +int widget_keypad_draw(WIDGET * Self)  { -    WIDGET *W = (WIDGET *) Self; -    WIDGET_KEYPAD *keypad = W->data; +    WIDGET_KEYPAD *keypad = Self->data;      RESULT result = { 0, 0, 0, NULL };      int val; @@ -72,10 +74,7 @@ void widget_keypad_update(void *Self)      }      keypad->val = val; -    /* finally, draw it! */ -    if (W->class->draw) -	W->class->draw(W); - +    return val;  } @@ -169,8 +168,7 @@ WIDGET_CLASS Widget_Keypad = {    name:"keypad",    type:WIDGET_TYPE_KEYPAD,    init:widget_keypad_init, -  draw:NULL, +  draw:widget_keypad_draw,    find:widget_keypad_find, -  update:widget_keypad_update,    quit:widget_keypad_quit,  }; | 
