Add dimming for save to drafts menu action (fixes NB#66476).
[modest] / src / widgets / modest-msg-edit-window.h
index bdc8d4a..ade9895 100644 (file)
@@ -70,6 +70,16 @@ typedef enum {
        MODEST_MSG_EDIT_FORMAT_HTML
 } ModestMsgEditFormat;
 
+typedef enum {
+       MODEST_MSG_EDIT_WINDOW_WIDGET_TYPE_BODY,
+       MODEST_MSG_EDIT_WINDOW_WIDGET_TYPE_TO,
+       MODEST_MSG_EDIT_WINDOW_WIDGET_TYPE_CC,
+       MODEST_MSG_EDIT_WINDOW_WIDGET_TYPE_BCC,
+       MODEST_MSG_EDIT_WINDOW_WIDGET_TYPE_SUBJECT,
+       MODEST_MSG_EDIT_WINDOW_WIDGET_TYPE_ATTACHMENTS,
+       MODEST_MSG_EDIT_WINDOW_WIDGET_TYPE_NUM,
+} ModestMsgEditWindowWidgetType;
+
 /** Get these with modest_msg_edit_window_get_msg_data() 
  * and free them with modest_msg_edit_window_free_msg_data().
  */
@@ -104,14 +114,17 @@ GType        modest_msg_edit_window_get_type    (void) G_GNUC_CONST;
 
 /**
  * modest_msg_edit_window_new:
- * #msg: a #TnyMsg instance
- * #account_name: the account this message applies to
+ * @msg: a #TnyMsg instance
+ * @account_name: the account this message applies to
+ * @preserve_is_rich: if @msg is not rich, open the message as plain text
  * 
  * instantiates a new #ModestMsgEditWindow widget
  *
  * Returns: a new #ModestMsgEditWindow, or NULL in case of error
  */
-ModestWindow*   modest_msg_edit_window_new         (TnyMsg *msg, const gchar *account_name);
+ModestWindow*   modest_msg_edit_window_new         (TnyMsg *msg, 
+                                                   const gchar *account_name, 
+                                                   gboolean preserve_is_rich);
 
 
 /**
@@ -259,14 +272,6 @@ void                    modest_msg_edit_window_show_cc               (ModestMsgE
 void                    modest_msg_edit_window_show_bcc               (ModestMsgEditWindow *window, gboolean show);
 
 /**
- * modest_msg_edit_window_toggle_fullscreen:
- * @window: a #ModestMsgEditWindow
- *
- * toggles the current fullscreen status
- */
-void            modest_msg_edit_window_toggle_fullscreen (ModestMsgEditWindow *window);
-
-/**
  * modest_msg_edit_window_set_priority_flags:
  * @window: a #ModestMsgEditWindow
  * @priority_flags: a #TnyHeaderFlags with priority information
@@ -304,6 +309,16 @@ void            modest_msg_edit_window_select_font        (ModestMsgEditWindow *
 void            modest_msg_edit_window_undo               (ModestMsgEditWindow *window);
 
 /**
+ * modest_msg_edit_window_can_undo:
+ * @window: a #ModestMsgEditWindow
+ *
+ * Checks if an undo operation is available
+ *
+ * Returns: %TRUE if undo can be done, %FALSE otherwise.
+ */
+gboolean            modest_msg_edit_window_can_undo               (ModestMsgEditWindow *window);
+
+/**
  * modest_msg_edit_window_redo:
  * @window: a #ModestMsgEditWindow
  *
@@ -312,6 +327,16 @@ void            modest_msg_edit_window_undo               (ModestMsgEditWindow *
 void            modest_msg_edit_window_redo               (ModestMsgEditWindow *window);
 
 /**
+ * modest_msg_edit_window_can_redo:
+ * @window: a #ModestMsgEditWindow
+ *
+ * Checks if a redp operation is available
+ *
+ * Returns: %TRUE if redo can be done, %FALSE otherwise.
+ */
+gboolean            modest_msg_edit_window_can_redo               (ModestMsgEditWindow *window);
+
+/**
  * modest_msg_edit_window_select_contacts:
  * @window: a #ModestMsgEditWindow
  *
@@ -368,6 +393,41 @@ void            modest_msg_edit_window_set_sent            (ModestMsgEditWindow
  */
 void            modest_msg_edit_window_set_draft           (ModestMsgEditWindow *window,
                                                            TnyMsg *draft);
+/**
+ * modest_msg_edit_window_get_message_uid:
+ * @msg: an #ModestMsgEditWindow instance
+ * 
+ * gets the unique identifier for the message in this msg editor.
+ * This is the identifier of the draft or outbox message the editor was
+ * opened from. If it's a new message, then it returns %NULL
+ * 
+ * Returns: the id of the #TnyMsg being shown, or NULL in case of error
+ */
+const gchar*    modest_msg_edit_window_get_message_uid (ModestMsgEditWindow *window);
+
+/**
+ * modest_msg_edit_window_get_child_widget:
+ * @win: a #ModestMsgEditWindow
+ * @widget_type: the type of the child to obtain
+ *
+ * Obtain the child widget of @win of type @widget_type
+ *
+ * Returns: a #GtkWidget, or %NULL
+ */
+GtkWidget *
+modest_msg_edit_window_get_child_widget (ModestMsgEditWindow *win,
+                                        ModestMsgEditWindowWidgetType widget_type);
+
+/**
+ * modest_msg_edit_window_get_clipboard_text:
+ * @win: a #ModestMsgEditWindow
+ *
+ * Obtains the currently selected text in selection clipboard
+ *
+ * Returns: a string
+ */
+const gchar *
+modest_msg_edit_window_get_clipboard_text (ModestMsgEditWindow *win);
 
 G_END_DECLS