3 * wmCalendar (c)2003 Matthias Laabs mattlaabs@users.sourceforge.net
9 * This code is based on:
10 * wmCalClock-1.25 (C) 1998, 1999 Mike Henderson (mghenderson@lanl.gov)
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2, or (at your option)
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with this program (see the file COPYING); if not, write to the
26 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
27 * Boston, MA 02110-1301 USA
35 #ifndef _WMCALENDAR_H_
36 #define _WMCALENDAR_H_
52 #define BT_OPENCLOSE 22
54 #define BT_SETTINGS 24
58 #define DBLCLKTIME 400
71 #include "calendarfunc.h"
72 #include "wmCalendar_master.xpm"
73 #include "wmCalendar_master2.xpm"
78 void ParseCMDLine(int argc
, char *argv
[]);
79 void buttonPress(int btype
, int bx
, int by
, long etime
);
89 int drawButton(int type
, int xoff
, int yoff
);
90 void drawNumber(int number
, int yoff
, int dayOfWeek
, int type
, int today
);
96 /* definitions of images for months, numbers and icons */
97 int xsMonth
[6][12] = {{ 3, 27, 52, 77, 102, 130, 162, 188, 216, 241, 266, 293 },//greg. engl.
98 { 2, 24, 49, 74, 89, 115, 140, 168, 197, 223, 250, 275 },//pers. engl.(not yet)
99 { 3, 32, 53, 89, 128, 162, 200, 220, 257, 287, 322, 361},//,isl. eng.
100 { 2, 47, 86, 126, 166, 187, 223, 255, 289, 338, 374, 416 },//greg. farsi.
101 { 2, 42, 84, 123, 149, 188, 227, 258, 286, 311, 336, 371 },//pers. fars.
102 { 3, 32, 53, 89, 128, 162, 200, 220, 257, 287, 322, 361}};//isl. arab.(not yet)
104 int xeMonth
[6][12] = {{ 23, 48, 74, 98, 126, 150, 177, 211, 237, 262, 289, 315 },//greg. engl.
105 { 20, 44, 70, 85, 111, 135, 164, 193, 218, 245, 270, 289 },//pers. engl.(not yet)
106 { 27, 49, 84, 123, 157, 195, 217, 253, 282, 317, 357, 394},//,isl. eng.
107 { 34, 76, 117, 155, 178, 214, 247, 276, 325, 362, 406, 451 },//greg. fars.
108 { 34, 72, 114, 138, 179, 223, 248, 274, 300, 326, 361, 393 },//pers. farsi.
109 { 27, 49, 84, 123, 157, 195, 217, 253, 282, 317, 357, 394}};//isl. arab.(not yet)
113 int yMonth
[6] = {17, 32, 45, 63, 79, 45};
116 int xeNumbers
[2][10] = {{119, 123, 127, 131, 135, 139, 143, 147, 151, 155 },
117 {69, 73, 77, 81, 85, 89, 93, 97, 101, 105}};
121 int xsYear
[2][10] = {{ 3, 14, 23, 33, 43, 53, 63, 73, 83, 93},
122 { 103, 114, 123, 133, 143, 153, 163, 173, 183, 193}};
123 int xeYear
[2][10] = {{ 9, 17, 29, 39, 49, 59, 69, 79, 89, 99},
124 { 109, 117, 129, 139, 149, 159, 169, 179, 189, 199}};
129 int xsButton
[14] = {129, 138, 147, 162, 167, 156, 165, 174, 129, 138, 147, 156};
130 int xeButton
[14] = {136, 145, 154, 165, 170, 160, 172, 181, 136, 145, 154, 163};
131 int yButton
[14] = {80, 80, 80, 80, 80, 80, 70, 70, 88, 88, 88, 88};
134 int xsMoon
[4] = {128, 137, 146, 155};
139 int monthOffset
; /* difference to actual month */
140 struct icaltimetype t
, told
, tgr
, today
, mark
;
149 int calendartype
= 0; /* defines calendar type 0:greg 1:persian 2:islamic */
150 int showmoon
= 0; /* sets whether moonphase is shown (1) or not (0) */
151 int showbuttons
= 1; /* sets wheter buttons on the bottom are visible */
153 int appDoubleClick
= 0;/* this should be changed to gtk doubleclick asap*/
154 long appClickTime
= 0;