aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/mark.h
blob: 33a8fe23e576a362523eae6c4fb32f5310c04add (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/* Functions to mark calendars
 *
 * Copyright (C) 1998 Red Hat Software, Inc.
 *
 * Author: Federico Mena <federico@nuclecu.unam.mx>
 */

#ifndef MARK_H
#define MARK_H

#include "calendar.h"
#include "gnome-month-item.h"


/* These are the fonts used for the montly calendars */

#define HEADING_FONTSET         "-adobe-helvetica-medium-r-*-*-14-*-*-*-p-*-*-*,-cronyx-helvetica-medium-r-normal-*-17-*-*-*-p-*-koi8-r"
#define TITLE_FONTSET           "-adobe-helvetica-bold-r-normal--12-*-*-*-p-*-*-*,-cronyx-helvetica-medium-r-normal-*-14-*-*-*-p-*-koi8-r"
#define DAY_HEADING_FONTSET     "-adobe-helvetica-medium-r-normal--10-*-*-*-p-*-*-*,-cronyx-helvetica-medium-r-normal-*-11-*-*-*-p-*-koi8-r"
#define NORMAL_DAY_FONTSET      "-adobe-helvetica-medium-r-normal--10-*-*-*-p-*-*-*,-cronyx-helvetica-medium-r-normal-*-11-*-*-*-p-*-koi8-r"
#define CURRENT_DAY_FONTSET     "-adobe-helvetica-bold-r-normal--12-*-*-*-p-*-*-*,-cronyx-helvetica-medium-r-normal-*-14-*-*-*-p-*-koi8-r"
#define BIG_DAY_HEADING_FONTSET "-adobe-helvetica-bold-r-normal--14-*-*-*-p-*-*-*,-cronyx-helvetica-bold-r-normal-*-17-*-*-*-p-*-koi8-r"
#define BIG_NORMAL_DAY_FONTSET  "-adobe-helvetica-medium-r-normal--14-*-*-*-p-*-*-*,-cronyx-helvetica-medium-r-normal-*-17-*-*-*-p-*-koi8-r"
#define BIG_CURRENT_DAY_FONTSET "-adobe-helvetica-bold-r-normal--14-*-*-*-p-*-*-*,-cronyx-helvetica-bold-r-normal-*-17-*-*-*-p-*-koi8-r"
#define EVENT_FONTSET           "-adobe-helvetica-medium-r-*-*-10-*-*-*-p-*-*-*,-cronyx-helvetica-medium-r-normal-*-11-*-*-*-p-*-koi8-r"


/* Functions of this type are used by the marking functions to fetch color specifications.  Such
 * a function must return a color spec based on the property passed to it.
 */
typedef char * (* GetColorFunc) (ColorProp propnum, gpointer data);


/* Sets the user-configured colors and font for a month item.  It also tags the days as unmarked. */
void colorify_month_item (GnomeMonthItem *month, GetColorFunc func, gpointer func_data);

/* Takes a monthly calendar item and marks the days that have events scheduled for them in the
 * specified calendar.  It also highlights the current day.
 */
void mark_month_item (GnomeMonthItem *mitem, Calendar *cal);

/* Marks a day specified by index, not by day number */
void mark_month_item_index (GnomeMonthItem *mitem, int index, GetColorFunc func, gpointer func_data);

/* Unmarks all the days in the specified month item */
void unmark_month_item (GnomeMonthItem *mitem);

/* Prepares a monthly calendar item to prelight when the mouse goes over the days. */

void month_item_prepare_prelight (GnomeMonthItem *mitem, GetColorFunc func, gpointer func_data);

/* This is the default prelight function you can use for most puposes.  You can use NULL as the
 * func_data.
 */
char *default_color_func (ColorProp prop_num, gpointer data);


#endif