aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/gnome-cal.h
blob: 2c4eaaf0af4529a1d3b4a01fbf4d6a489fc78006 (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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
/* Evolution calendar - Main calendar view widget
 *
 * Copyright (C) 1998 The Free Software Foundation
 * Copyright (C) 2000 Ximian, Inc.
 * Copyright (C) 2001 Ximian, Inc.
 *
 * Authors: Miguel de Icaza <miguel@ximian.com>
 *          Federico Mena-Quintero <federico@ximian.com>
 *          Seth Alves <alves@hungry.com>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of version 2 of the GNU General Public
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
 */

#ifndef GNOME_CALENDAR_APP_H
#define GNOME_CALENDAR_APP_H

#include <time.h>
#include <libgnome/gnome-defs.h>
#include <gtk/gtkvbox.h>
#include <bonobo/bonobo-ui-component.h>
#include <widgets/misc/e-calendar.h>
#include <cal-client/cal-client.h>
#include "e-calendar-table.h"

BEGIN_GNOME_DECLS



#define GNOME_TYPE_CALENDAR            (gnome_calendar_get_type ())
#define GNOME_CALENDAR(obj)            (GTK_CHECK_CAST ((obj), GNOME_TYPE_CALENDAR, GnomeCalendar))
#define GNOME_CALENDAR_CLASS(klass)    (GTK_CHECK_CAST_CLASS ((klass), GNOME_TYPE_CALENDAR, \
                    GnomeCalendarClass))
#define GNOME_IS_CALENDAR(obj)         (GTK_CHECK_TYPE ((obj), GNOME_TYPE_CALENDAR))
#define GNOME_IS_CALENDAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_CALENDAR))

typedef struct _GnomeCalendar GnomeCalendar;
typedef struct _GnomeCalendarClass GnomeCalendarClass;
typedef struct _GnomeCalendarPrivate GnomeCalendarPrivate;

/* View types */
typedef enum {
    GNOME_CAL_DAY_VIEW,
    GNOME_CAL_WORK_WEEK_VIEW,
    GNOME_CAL_WEEK_VIEW,
    GNOME_CAL_MONTH_VIEW
} GnomeCalendarViewType;

struct _GnomeCalendar {
    GtkVBox vbox;

    /* Private data */
    GnomeCalendarPrivate *priv;
};

struct _GnomeCalendarClass {
    GtkVBoxClass parent_class;

    /* Notification signals */
    void (* dates_shown_changed)    (GnomeCalendar *gcal);

    void (* calendar_selection_changed) (GnomeCalendar *gcal);
    void (* taskpad_selection_changed) (GnomeCalendar *gcal);

    void (* calendar_focus_change)  (GnomeCalendar *gcal, gboolean in);
    void (* taskpad_focus_change)   (GnomeCalendar *gcal, gboolean in);
};


GtkType    gnome_calendar_get_type          (void);
GtkWidget *gnome_calendar_construct     (GnomeCalendar *gcal);

GtkWidget *gnome_calendar_new           (void);

ECalendarTable *gnome_calendar_get_task_pad (GnomeCalendar *gcal);

CalClient *gnome_calendar_get_cal_client    (GnomeCalendar *gcal);
CalClient *gnome_calendar_get_task_pad_cal_client(GnomeCalendar *gcal);

gboolean   gnome_calendar_open                  (GnomeCalendar *gcal, const char *str_uri);

void gnome_calendar_set_query (GnomeCalendar *gcal, const char *sexp);

void       gnome_calendar_next              (GnomeCalendar *gcal);
void       gnome_calendar_previous          (GnomeCalendar *gcal);
void       gnome_calendar_goto              (GnomeCalendar *gcal,
                         time_t new_time);
void       gnome_calendar_dayjump           (GnomeCalendar *gcal,
                         time_t time);
/* Jumps to the current day */
void       gnome_calendar_goto_today            (GnomeCalendar *gcal);

GnomeCalendarViewType gnome_calendar_get_view (GnomeCalendar *gcal);
void gnome_calendar_set_view (GnomeCalendar *gcal, GnomeCalendarViewType view_type,
                  gboolean range_selected, gboolean grab_focus);

void gnome_calendar_setup_view_menus (GnomeCalendar *gcal, BonoboUIComponent *uic);
void gnome_calendar_discard_view_menus (GnomeCalendar *gcal);

void       gnome_calendar_set_selected_time_range (GnomeCalendar *gcal,
                           time_t     start_time,
                           time_t     end_time);
void       gnome_calendar_get_selected_time_range (GnomeCalendar *gcal,
                           time_t    *start_time,
                           time_t    *end_time);

void       gnome_calendar_edit_object           (GnomeCalendar *gcal,
                         CalComponent  *comp,
                         gboolean meeting);

void       gnome_calendar_new_appointment       (GnomeCalendar *gcal);
void       gnome_calendar_new_appointment_for   (GnomeCalendar *cal,
                         time_t dtstart, time_t dtend,
                         gboolean all_day,
                         gboolean meeting);

void       gnome_calendar_new_task      (GnomeCalendar *gcal);

/* Returns the selected time range for the current view. Note that this may be
   different from the fields in the GnomeCalendar, since the view may clip
   this or choose a more appropriate time. */
void       gnome_calendar_get_current_time_range (GnomeCalendar *gcal,
                          time_t     *start_time,
                          time_t     *end_time);

/* Gets the visible time range for the current view. Returns FALSE if no
   time range has been set yet. */
gboolean   gnome_calendar_get_visible_time_range (GnomeCalendar *gcal,
                          time_t     *start_time,
                          time_t     *end_time);

/* Returns the number of selected events (0 or 1 at present). */
gint       gnome_calendar_get_num_events_selected (GnomeCalendar *gcal);

/* Returns the number of selected tasks */
gint       gnome_calendar_get_num_tasks_selected (GnomeCalendar *gcal);

/* Tells the calendar to reload all config settings. initializing should be
   TRUE when we are setting the config settings for the first time. */
void       gnome_calendar_update_config_settings (GnomeCalendar *gcal,
                          gboolean   initializing);

/* Get the current timezone. */
icaltimezone *gnome_calendar_get_timezone   (GnomeCalendar  *gcal);


/* Clipboard operations */
void       gnome_calendar_cut_clipboard         (GnomeCalendar  *gcal);
void       gnome_calendar_copy_clipboard        (GnomeCalendar  *gcal);
void       gnome_calendar_paste_clipboard       (GnomeCalendar  *gcal);

void       gnome_calendar_delete_selection  (GnomeCalendar  *gcal);



END_GNOME_DECLS

#endif
pan title='2009-08-05 04:04:38 +0800'>2009-08-055-73/+33 * - Update py-qt4 to py-qt4.5.4miwi2009-08-055-9/+14 * -Repocopy devel/libtool15 -> libtool22 and libltdl15 -> libltdl22.mezz2009-08-0365-65/+65 * - bump all port that indirectly depends on libjpeg and have not yet been bump...dinoex2009-07-31136-95/+136 * add USE_GCC=4.3+oliver2009-07-311-0/+2 * Utilize %%SITE_PERL%% and %%PERL_ARCH%% in pkg-plistspgollucci2009-07-312-13/+13 * Set NO_LATEST_LINK as it conflicts with x11-toolkits/py-wxPython28erwin2009-07-311-0/+1 * - Update to 2.6.4amdmi32009-07-302-6/+5 * Fix interoperability with the new libjpeg. In particular, this is known tomarcus2009-07-304-2/+24 * - Update to 2.0.r6834miwi2009-07-292-8/+6 * - Unbreak on sparc64 (it builds fine)gahr2009-07-281-4/+0 * - Update boost to 1.39pav2009-07-282-2/+2 * - Fix build on i386 6.x (probably)gahr2009-07-232-3/+4 * Update to 1.24.5 which may fix some issues for Firefox 3.5 users.marcus2009-07-222-4/+4 * Update to 2.16.5.marcus2009-07-204-10/+10 * Remove references to my mirror, which will be decommissioned shortly;shaun2009-07-202-4/+2 * This file is no longer needed in 2.0.1.marcus2009-07-191-10/+0 * Update to 2.0.1.marcus2009-07-192-5/+4 * - update to jpeg7dinoex2009-07-1822-35/+43 * - drop USE_FREETYPEdinoex2009-07-171-1/+1 * - Mark MAKE_JOBS_UNSAFEamdmi32009-07-161-0/+1 * - Fix missing dependency of devel/p5-Module-Pluggable for Perl < 5.8.9amdmi32009-07-151-1/+6 * - Bump PORTREVISION in favor of x11-toolkits/tktreectrl.araujo2009-07-141-2/+2 * - Update to 2.2.9.araujo2009-07-142-4/+4 * Add py31-tkinter, Tkinter for Python 3.1daichi2009-07-132-0/+15 * Forgot to save in vim for remove CC.mezz2009-07-131-1/+0 * -Fix the build/installation with libtool 2.2.mezz2009-07-1310-201/+291 * - Respect LOCALBASEpgj2009-07-102-0/+8 * - Respect LOCALBASEpgj2009-07-101-2/+2 * - Update to 1.007pgollucci2009-07-102-4/+4 * - Update to 0.9.94gahr2009-07-094-161/+182 * - Update to 1.007pgollucci2009-07-092-5/+4 * - Fix building with python3*lwhsu2009-07-082-2/+48 * - Dropping tcl8.0 supportmm2009-07-0710-1571/+0 * - Prepare for lang/tcl80 and x11-toolkits/tk80 removalmm2009-07-071-1/+1 * - Update to 1.79wxs2009-07-073-24/+4 * Update x11-toolkits/libgdiplus to 2.4.2.flz2009-07-062-4/+4 * - fix PORTSCOUTdinoex2009-07-062-2/+2 * - use freetype2dinoex2009-07-061-3/+4 * - cleanup ADDITIONAL_LIB_DIRSdinoex2009-07-051-2/+0 * Update to 2.26.2.avl2009-07-032-4/+4 * Update to 1.24.4.kwm2009-07-033-9/+9 * Update to 2.16.4.kwm2009-07-034-8/+8 * - Forgot to remove the PORTREVISION on latest commit.araujo2009-06-301-1/+0 * - Update to 2.2.8.araujo2009-06-302-5/+5 * - Unmark BROKEN, problem was fixed in p5-Wx portpav2009-06-301-7/+1 * - Fix core-dump with malloc debug onpav2009-06-302-0/+14 * - Make use of bsd.tcl.mkmm2009-06-301-24/+10 * Fix building at the ports cluster. The error was introduced bybsam2009-06-251-0/+2 * - Set PORTSCOUT varpgollucci2009-06-232-0/+2 * - Update lang/mono to 2.4.flz2009-06-2211-51/+128 * - Update to 0.18.6anray2009-06-212-4/+9 * - order USE_*dinoex2009-06-211-1/+1 * Update to 1.24.3.kwm2009-06-212-4/+4 * - Mark as BROKEN on CURRENT. Dumps core during build.beat2009-06-211-1/+7 * Add an apropriate LINUX_DIST_VER. This is only an infrastructure change,bsam2009-06-202-0/+2 * Convert to using Mk/bsd.linux-rpm.mk. This is only infrastructure change,bsam2009-06-201-5/+3 * - Assign all unmaintained ruby ports to ruby@,stas2009-06-168-8/+8 * - py-anygui is no longer being actively developed or supported.araujo2009-06-165-204/+0 * Remove x11-toolkits/py-pyxfce as it has been marked BROKEN for over 3 months.erwin2009-06-145-127/+0 * Remove x11-toolkits/wxmozilla: has been broken for more than 6 monthserwin2009-06-146-100/+0 * Remove x11-toolkits/p5-GtkXmHTML: depends on a broken, expired porterwin2009-06-146-62/+0 * Set MAKE_JOBS_UNSAFE for this port.steve2009-06-121-0/+2 * Convert most of remaining ports that depend on xorg-libraries toamdmi32009-06-094-5/+8 * - Update lang/python26 and make Python 2.6.2 to the default Python versionmiwi2009-06-096-9/+7 * - update to 0.95.2dinoex2009-06-063-23/+11 * Chase the vte shared lib version.marcus2009-06-031-1/+1 * Chase the vte shared lib version bump.marcus2009-06-035-10/+7 * Update to 0.20.4.marcus2009-06-033-5/+5 * . add linux-f10 ports to the rank of CONFLICTS for linux-fc4 ports;bsam2009-06-035-10/+10 * . fix CONFLICTS for graphics/linux-f10-dri and x11-toolkits/linux-f10-tk85;bsam2009-06-031-1/+2 * . add CONFLICTS to linux-f8 infrastructure ports;bsam2009-06-036-0/+18 * Here are new Linux Fedora 10 infrastructure ports.bsam2009-06-0218-497/+487 * - Resolve LATEST_LINK conflictpav2009-06-013-2/+3 * - Update to 1.9.25nivit2009-05-312-5/+5 * Update to 2.16.2.marcus2009-05-316-10/+10 * - Update to 0.85miwi2009-05-292-5/+5 * 2009-05-22 misc/sonytv: tcl8.3 support is going to be droppedmiwi2009-05-296-81/+0 * Update to 0.20.3.kwm2009-05-272-4/+4 * - Update to 0.18.5anray2009-05-258-149/+22 * Assign maintainership to anray who already maintains the sawfish port. Hemarcus2009-05-251-1/+1 * - These ports needs libcups.so to build.araujo2009-05-203-0/+3 * - Update to 0.91amdmi32009-05-202-4/+4 * - fix BUILD_DEPENDSdinoex2009-05-201-1/+1 * Update to 2.26.2.kwm2009-05-203-5/+10 * Fix the CUPS dependency.marcus2009-05-192-2/+2 * - use cups-client as depencydinoex2009-05-182-2/+2 * Update to 2.26.0.kwm2009-05-172-9/+5 * - Update to 0.90miwi2009-05-172-5/+23 * - Update to 0.43miwi2009-05-173-16/+4 * Update to 2.6.2.kwm2009-05-172-4/+4 * - use cups-clientdinoex2009-05-171-1/+1 * - Fix build on 64-bit platformsgahr2009-05-143-5/+44 * Chase libgmp and bump PORTREVISION.ale2009-05-134-6/+8 * Sort pkg-plist and remove stale dependency.bsam2009-05-132-4/+2 * Update to version 2.3.2 for Linux Fedora 8.bsam2009-05-123-25/+22 * Update to 0.10.23.kwm2009-05-11