aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2007-12-10 18:56:08 +0000
committerFrederic Culot <calcurse@culot.org>2007-12-10 18:56:08 +0000
commit4227e47ae427e4a030d4484729efd55ec581979e (patch)
treea754f4aa7a76d5e901142a3b1af381f69496f3a4 /src
parent3e429667dbf4bdbdb33451483a32292e3c602fa3 (diff)
downloadcalcurse-4227e47ae427e4a030d4484729efd55ec581979e.tar.gz
calcurse-4227e47ae427e4a030d4484729efd55ec581979e.zip
calendar_move_*() gathered together into calendar_move()
Diffstat (limited to 'src')
-rwxr-xr-xsrc/calcurse.c10
-rwxr-xr-xsrc/calendar.h15
2 files changed, 15 insertions, 10 deletions
diff --git a/src/calcurse.c b/src/calcurse.c
index 12fea0a..b62f9b9 100755
--- a/src/calcurse.c
+++ b/src/calcurse.c
@@ -1,4 +1,4 @@
-/* $calcurse: calcurse.c,v 1.57 2007/10/21 13:42:34 culot Exp $ */
+/* $calcurse: calcurse.c,v 1.58 2007/12/10 18:56:08 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -368,7 +368,7 @@ main(int argc, char **argv)
if (wins_slctd() == CAL || ch == CTRL('L')) {
do_storage = true;
day_changed = true;
- calendar_move_right();
+ calendar_move(RIGHT);
}
break;
@@ -379,7 +379,7 @@ main(int argc, char **argv)
if (wins_slctd() == CAL || ch == CTRL('H')) {
do_storage = true;
day_changed = true;
- calendar_move_left();
+ calendar_move(LEFT);
}
break;
@@ -390,7 +390,7 @@ main(int argc, char **argv)
if (wins_slctd() == CAL || ch == CTRL('K')) {
do_storage = true;
day_changed = true;
- calendar_move_up();
+ calendar_move(UP);
} else {
if ((wins_slctd() == APP) &&
(apoint_hilt() > 1)) {
@@ -412,7 +412,7 @@ main(int argc, char **argv)
if (wins_slctd() == CAL || ch == CTRL('J')) {
do_storage = true;
day_changed = true;
- calendar_move_down();
+ calendar_move(DOWN);
} else {
if ((wins_slctd() == APP) &&
(apoint_hilt() < inday.nb_events +
diff --git a/src/calendar.h b/src/calendar.h
index a3c9bb9..4c4a8f4 100755
--- a/src/calendar.h
+++ b/src/calendar.h
@@ -1,4 +1,4 @@
-/* $calcurse: calendar.h,v 1.7 2007/08/31 19:41:24 culot Exp $ */
+/* $calcurse: calendar.h,v 1.8 2007/12/10 19:00:45 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -60,6 +60,14 @@ typedef enum {
MOON_PHASES
} pom_e;
+typedef enum {
+ UP,
+ DOWN,
+ LEFT,
+ RIGHT,
+ MOVES
+} move_t;
+
void calendar_start_date_thread(void);
void calendar_stop_date_thread(void);
void calendar_set_current_date(void);
@@ -72,10 +80,7 @@ date_t *calendar_get_slctd_day(void);
long calendar_get_slctd_day_sec(void);
void calendar_update_panel(WINDOW *);
void calendar_change_day(void);
-void calendar_move_right(void);
-void calendar_move_left(void);
-void calendar_move_up(void);
-void calendar_move_down(void);
+void calendar_move(move_t);
char *calendar_get_pom(time_t);
#endif /* CALCURSE_CALENDAR_H */