moved code here. still needs to update gh
This commit is contained in:
29
ncursescalander/include/add_event.h
Normal file
29
ncursescalander/include/add_event.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#ifndef ADD_EVENT_H
|
||||
#define ADD_EVENT_H
|
||||
|
||||
#include <sqlite3.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#define MAX_TITLE_LEN 50
|
||||
#define MAX_CALENDAR_LEN 30
|
||||
#define MAX_NOTES_LEN 256
|
||||
#define MAX_DATE_LEN 50
|
||||
|
||||
typedef struct {
|
||||
char title[MAX_TITLE_LEN];
|
||||
bool all_day;
|
||||
char start_date[MAX_DATE_LEN];
|
||||
char end_date[MAX_DATE_LEN];
|
||||
int start_hour, start_minute;
|
||||
int end_hour, end_minute;
|
||||
int repeat_option;
|
||||
char calendar[MAX_CALENDAR_LEN];
|
||||
char notes[MAX_NOTES_LEN];
|
||||
} Event;
|
||||
|
||||
Event *create_event();
|
||||
void save_event_to_db(sqlite3 *db, Event *event);
|
||||
sqlite3* open_database();
|
||||
void open_add_event_tui(sqlite3 *db);
|
||||
|
||||
#endif
|
||||
8
ncursescalander/include/calendar.h
Normal file
8
ncursescalander/include/calendar.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef CALENDAR_H
|
||||
#define CALENDAR_H
|
||||
|
||||
int is_leap_year(int year);
|
||||
int days_in_month(int month, int year);
|
||||
void draw_calendar(int month, int year, int selected_day);
|
||||
|
||||
#endif
|
||||
7
ncursescalander/include/day_view.h
Normal file
7
ncursescalander/include/day_view.h
Normal file
@@ -0,0 +1,7 @@
|
||||
#ifndef DAY_VIEW_H
|
||||
#define DAY_VIEW_H
|
||||
|
||||
void draw_day_view(int *day, int *month, int *year);
|
||||
|
||||
#endif
|
||||
|
||||
7
ncursescalander/include/repeat_tui.h
Normal file
7
ncursescalander/include/repeat_tui.h
Normal file
@@ -0,0 +1,7 @@
|
||||
#ifndef REPEAT_TUI_H
|
||||
#define REPEAT_TUI_H
|
||||
|
||||
void open_repeat_tui();
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user