File: main-window.h

package info (click to toggle)
balsa 0.6.0-1.1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 4,044 kB
  • ctags: 3,648
  • sloc: ansic: 36,750; sh: 7,458; makefile: 518; sed: 93
file content (82 lines) | stat: -rw-r--r-- 3,120 bytes parent folder | download
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
/* Balsa E-Mail Client
 * Copyright (C) 1997-1999 Jay Painter and Stuart Parmenter
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2, or (at your option) 
 * any later version.
 *  
 * 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 __main_window_h__
#define __main_window_h__

#define BALSA_TYPE_WINDOW		       (balsa_window_get_type ())
#define BALSA_WINDOW(obj)		       (GTK_CHECK_CAST (obj, BALSA_TYPE_WINDOW, BalsaWindow))
#define BALSA_WINDOW_CLASS(klass)	       (GTK_CHECK_CLASS_CAST (klass, BALSA_TYPE_WINDOW, BalsaWindowClass))
#define BALSA_IS_WINDOW(obj)		       (GTK_CHECK_TYPE (obj, BALSA_TYPE_WINDOW))
#define BALSA_IS_WINDOW_CLASS(klass)	       (GTK_CHECK_CLASS_TYPE (klass, BALSA_TYPE_WINDOW))


typedef struct _BalsaWindow       BalsaWindow;
typedef struct _BalsaWindowClass  BalsaWindowClass;

struct _BalsaWindow
{
  GnomeApp window;

  GtkWidget *progress_bar;
  GtkWidget *mblist;
  GtkWidget *notebook;
  GtkWidget *preview; // message is child
};

struct _BalsaWindowClass
{
  GnomeAppClass parent_class;

  void (* open_mailbox)  (BalsaWindow *window,
			  Mailbox     *mailbox);

  void (* close_mailbox) (BalsaWindow *window,
			  Mailbox     *mailbox);

  void (* set_cursor)  (BalsaWindow *window,
			GdkCursor   *cursor);

};

GtkType    balsa_window_get_type (void);
GtkWidget *balsa_window_new(void);
void       balsa_window_set_cursor(BalsaWindow *window, GdkCursor *cursor);
GtkWidget *balsa_window_find_current_index(BalsaWindow *window);
void       balsa_window_refresh(BalsaWindow *window);
void       balsa_window_open_mailbox();
void       balsa_window_close_mailbox();
gboolean   mail_progress_notify_cb(void);
gboolean   send_progress_notify_cb(void);
gint       check_new_messages_auto_cb( gpointer data );
void       mblist_close_mailbox (Mailbox * mailbox);

#if defined(__FILE__) && defined(__LINE__)
# ifdef __FUNCTION__
#  define BALSA_DEBUG_MSG(message)  if (balsa_app.debug)  fprintf(stderr, "[%lu] %12s | %4d | %30s: %s\n", (unsigned long) time(NULL), __FILE__, __LINE__, __FUNCTION__, message)
#  define BALSA_DEBUG() if (balsa_app.debug) fprintf (stderr, "[%lu] %12s | %4d | %30s\n", (unsigned long) time(NULL), __FILE__, __LINE__, __FUNCTION__)
# else
#  define BALSA_DEBUG_MSG(message)  if (balsa_app.debug)  fprintf(stderr, "[%lu] %12s | %4d: %s\n", (unsigned long) time(NULL), __FILE__, __LINE__, message)
#  define BALSA_DEBUG() if (balsa_app.debug)  fprintf(stderr, "[%lu] %12s | %4d\n", (unsigned long) time(NULL), __FILE__, __LINE__)
# endif
#endif

#endif /* __main_window_h__ */