| 1 |
/* |
| 2 |
* This file is a part of hildon |
| 3 |
* |
| 4 |
* Copyright (C) 2005, 2006 Nokia Corporation, all rights reserved. |
| 5 |
* |
| 6 |
* Contact: Rodrigo Novo <rodrigo.novo@nokia.com> |
| 7 |
* |
| 8 |
* This library is free software; you can redistribute it and/or |
| 9 |
* modify it under the terms of the GNU Lesser General Public License |
| 10 |
* as published by the Free Software Foundation; version 2.1 of |
| 11 |
* the License, or (at your option) any later version. |
| 12 |
* |
| 13 |
* This library is distributed in the hope that it will be useful, but |
| 14 |
* WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 |
* Lesser General Public License for more details. |
| 17 |
* |
| 18 |
* You should have received a copy of the GNU Lesser General Public |
| 19 |
* License along with this library; if not, write to the Free Software |
| 20 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA |
| 21 |
* 02110-1301 USA |
| 22 |
* |
| 23 |
*/ |
| 24 |
|
| 25 |
#ifndef __HILDON_CALENDAR_PRIVATE_H__ |
| 26 |
#define __HILDON_CALENDAR_PRIVATE_H__ |
| 27 |
|
| 28 |
#include <gtk/gtk.h> |
| 29 |
|
| 30 |
G_BEGIN_DECLS |
| 31 |
|
| 32 |
#define HILDON_CALENDAR_GET_PRIVATE(widget) \ |
| 33 |
(((HildonCalendarPrivate*)(HILDON_CALENDAR (widget)->private_data))) |
| 34 |
|
| 35 |
typedef struct _HildonCalendarPrivate HildonCalendarPrivate; |
| 36 |
|
| 37 |
struct _HildonCalendarPrivate |
| 38 |
{ |
| 39 |
GdkWindow *header_win; |
| 40 |
GdkWindow *footer_win; |
| 41 |
GdkWindow *day_name_win; |
| 42 |
GdkWindow *main_win; |
| 43 |
GdkWindow *week_win; |
| 44 |
GdkWindow *arrow_win[4]; |
| 45 |
|
| 46 |
gint year_before; |
| 47 |
guint header_h; |
| 48 |
guint day_name_h; |
| 49 |
guint main_h; |
| 50 |
|
| 51 |
guint arrow_state[4]; |
| 52 |
/* guint arrow_width; This is now defined constant. Even normal Gtk don't allow to change this */ |
| 53 |
guint arrow_width; |
| 54 |
guint max_month_width; |
| 55 |
guint max_year_width; |
| 56 |
|
| 57 |
guint day_width; |
| 58 |
guint week_width; |
| 59 |
|
| 60 |
guint min_day_width; |
| 61 |
guint max_day_char_width; |
| 62 |
guint max_day_char_ascent; |
| 63 |
guint max_day_char_descent; |
| 64 |
guint max_label_char_ascent; |
| 65 |
guint max_label_char_descent; |
| 66 |
guint max_week_char_width; |
| 67 |
|
| 68 |
guint freeze_count; |
| 69 |
|
| 70 |
/* flags */ |
| 71 |
guint dirty_header : 1; |
| 72 |
guint dirty_day_names : 1; |
| 73 |
guint dirty_main : 1; |
| 74 |
guint dirty_week : 1; |
| 75 |
|
| 76 |
/* guint year_before : 1;*/ |
| 77 |
|
| 78 |
guint need_timer : 1; |
| 79 |
|
| 80 |
guint in_drag : 1; |
| 81 |
guint drag_highlight : 1; |
| 82 |
|
| 83 |
guint32 timer; |
| 84 |
gint click_child; |
| 85 |
|
| 86 |
/* Following variables are for current date */ |
| 87 |
guint current_day; |
| 88 |
guint current_month; |
| 89 |
guint current_year; |
| 90 |
|
| 91 |
/* Keep track of day and month |
| 92 |
* where mouse button was pressed |
| 93 |
*/ |
| 94 |
guint pressed_day; |
| 95 |
guint pressed_month; |
| 96 |
|
| 97 |
/* Boolean value to indicate if |
| 98 |
* out of bound day was selected |
| 99 |
*/ |
| 100 |
gboolean is_bad_day; |
| 101 |
|
| 102 |
/* Must check if we are sliding stylus */ |
| 103 |
gboolean slide_stylus; |
| 104 |
gint prev_row; |
| 105 |
gint prev_col; |
| 106 |
|
| 107 |
gint week_start; |
| 108 |
|
| 109 |
gint drag_start_x; |
| 110 |
gint drag_start_y; |
| 111 |
|
| 112 |
gint min_year; |
| 113 |
gint max_year; |
| 114 |
|
| 115 |
char *abbreviated_dayname[7]; |
| 116 |
char *monthname[12]; |
| 117 |
}; |
| 118 |
|
| 119 |
G_END_DECLS |
| 120 |
|
| 121 |
#endif /* __HILDON_CALENDAR_PRIVATE_H__ */ |