* cleanup icon handling a bit
[modest] / src / widgets / modest-main-window.h
index aca4c33..79993f7 100644 (file)
 #ifndef __MODEST_MAIN_WINDOW_H__
 #define __MODEST_MAIN_WINDOW_H__
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif /*HAVE_CONFIG_H*/
+#include <gtk/gtkwidget.h>
+#include <widgets/modest-window.h>
+#include <widgets/modest-header-view.h>
+#include <widgets/modest-folder-view.h>
+#include <widgets/modest-msg-view.h>
 
-#include "modest-widget-factory.h"
-#include "modest-window.h"
 
 G_BEGIN_DECLS
 
@@ -54,42 +54,53 @@ typedef struct _ModestMainWindowClass ModestMainWindowClass;
 
 struct _ModestMainWindow {
        ModestWindow parent;
-       /* insert public members, if any */
 };
 
 struct _ModestMainWindowClass {
        ModestWindowClass parent_class;
-       /* insert signal callback declarations, eg. */
-       /* void (* my_event) (ModestMainWindow* obj); */
 };
 
-/* member functions */
+/**
+ * modest_main_window_get_type:
+ * 
+ * get the GType for the ModestMainWindow class
+ *
+ * Returns: a GType for ModestMainWindow
+ */
 GType modest_main_window_get_type (void) G_GNUC_CONST;
 
 
-ModestWindow* modest_main_window_new (ModestWidgetFactory *factory,
-                                     TnyAccountStore *account_store);
-
 /**
- * modest_main_window_get_widget_factory:
- * @edit_window: a #ModestMainWindow
- * 
- * gets the #ModestWidgetFactory associated with the main window
+ * modest_main_window_new
  * 
- * Returns: the widget factory
- **/
-ModestWidgetFactory *   modest_main_window_get_widget_factory    (ModestMainWindow *main_window);
+ * instantiates a new ModestMainWindow widget
+ *
+ * Returns: a new ModestMainWindow, or NULL in case of error
+ */
+ModestWindow* modest_main_window_new (void);
+
+/*
+ * we could use the GType instead, but that would require
+ * that there only on widget of a certain type; that is
+ * true now, but might not be. Therefore, these types
+ */
+typedef enum {
+       MODEST_WIDGET_TYPE_HEADER_VIEW,
+       MODEST_WIDGET_TYPE_FOLDER_VIEW,
+       MODEST_WIDGET_TYPE_MSG_PREVIEW,
+       
+       MODEST_WIDGET_TYPE_NUM,
+} ModestWidgetType;
 
 /**
- * modest_main_window_get_account_store:
- * @edit_window: a #ModestMainWindow
- * 
- * gets the account store associated with the main window
+ * modest_main_window_get_child_widget
  * 
- * Returns: the account store
- **/
-TnyAccountStore *       modest_main_window_get_account_store     (ModestMainWindow *main_window);
-
+ * get a child window for this window
+ *
+ * Returns: a child window or NULL
+ */
+GtkWidget* modest_main_window_get_child_widget (ModestMainWindow *self,
+                                               ModestWidgetType widget_type);
 
 G_END_DECLS