Moved modest wp text view to src/widgets
authorJose Dapena Paz <jdapena@igalia.com>
Wed, 25 Nov 2009 11:24:25 +0000 (12:24 +0100)
committerJose Dapena Paz <jdapena@igalia.com>
Wed, 25 Nov 2009 16:02:35 +0000 (17:02 +0100)
src/hildon2/Makefile.am
src/hildon2/modest-msg-edit-window-ui-dimming.h [deleted file]
src/hildon2/modest-wp-text-view.c [deleted file]
src/hildon2/modest-wp-text-view.h [deleted file]
src/widgets/Makefile.am
src/widgets/modest-msg-edit-window-ui-dimming.h [new file with mode: 0644]
src/widgets/modest-wp-text-view.c [new file with mode: 0644]
src/widgets/modest-wp-text-view.h [new file with mode: 0644]

index c7d27de..18a0305 100644 (file)
@@ -60,8 +60,6 @@ libmodest_ui_la_SOURCES=              \
        modest-icon-names.h           \
        modest-hildon2-global-settings-dialog.c \
        modest-hildon2-global-settings-dialog.h \
-       modest-wp-text-view.c \
-       modest-wp-text-view.h \
        modest-maemo-security-options-view.c \
        modest-hildon-includes.h      \
        modest-hildon-find-toolbar.h  \
diff --git a/src/hildon2/modest-msg-edit-window-ui-dimming.h b/src/hildon2/modest-msg-edit-window-ui-dimming.h
deleted file mode 100644 (file)
index acf94d2..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-#ifndef __MODEST_MSG_EDIT_WINDOW_UI_DIMMING_PRIV_H__
-#define __MODEST_MSG_EDIT_WINDOW_UI_DIMMING_PRIV_H__
-
-#include "modest-dimming-rules-group.h"
-#include "modest-ui-dimming-rules.h"
-
-G_BEGIN_DECLS
-
-
-/* Menu Dimming rules entries */
-static const ModestDimmingEntry modest_msg_edit_window_menu_dimming_entries [] = {
-
-       /* Format Menu */
-       { "/MenuBar/FormatMenu/AlignmentMenu", G_CALLBACK (modest_ui_dimming_rules_on_set_style) },
-       { "/MenuBar/FormatMenu/AlignmentLeftMenu", G_CALLBACK (modest_ui_dimming_rules_on_set_style) },
-       { "/MenuBar/FormatMenu/AlignmentRightMenu", G_CALLBACK (modest_ui_dimming_rules_on_set_style) },
-       { "/MenuBar/FormatMenu/AlignmentCenterMenu", G_CALLBACK (modest_ui_dimming_rules_on_set_style) },
-       { "/MenuBar/FormatMenu/InsertImageMenu", G_CALLBACK (modest_ui_dimming_rules_on_set_style) },
-       { "/MenuBar/EditMenu/UndoMenu", G_CALLBACK (modest_ui_dimming_rules_on_undo) },
-       { "/MenuBar/EditMenu/RedoMenu", G_CALLBACK (modest_ui_dimming_rules_on_redo) },
-       { "/MenuBar/AttachmentsMenu/RemoveAttachmentsMenu", G_CALLBACK (modest_ui_dimming_rules_on_editor_remove_attachment) },
-       { "/MenuBar/AttachmentsMenu/InsertImageMenu", G_CALLBACK (modest_ui_dimming_rules_on_set_style) },
-       { "/MenuBar/EmailMenu/SaveToDraftsMenu", G_CALLBACK (modest_ui_dimming_rules_on_save_to_drafts) },
-
-};
-
-/* Menu Dimming rules entries */
-static const ModestDimmingEntry modest_msg_edit_window_toolbar_dimming_entries [] = {
-
-       /* Toolbar */
-       { "/ToolBar/ToolbarSend", G_CALLBACK(modest_ui_dimming_rules_on_send) },
-       { "/ToolBar/ActionsBold", G_CALLBACK(modest_ui_dimming_rules_on_set_style) },
-       { "/ToolBar/ActionsItalics", G_CALLBACK(modest_ui_dimming_rules_on_set_style) },
-};
-
-G_END_DECLS
-#endif /* __MODEST_MSG_VIEW_WINDOW_UI_PRIV_H__ */
diff --git a/src/hildon2/modest-wp-text-view.c b/src/hildon2/modest-wp-text-view.c
deleted file mode 100644 (file)
index 4b93a0d..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-/* Copyright (c) 2006, 2008 Nokia Corporation
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * * Neither the name of the Nokia Corporation nor the names of its
- *   contributors may be used to endorse or promote products derived from
- *   this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
- * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-#include                                        "modest-wp-text-view.h"
-#include <math.h>
-
-#define MODEST_WP_TEXT_VIEW_DRAG_THRESHOLD 16.0
-
-G_DEFINE_TYPE                                   (ModestWpTextView, modest_wp_text_view, WP_TYPE_TEXT_VIEW);
-
-#define                                         MODEST_WP_TEXT_VIEW_GET_PRIVATE(obj) \
-                                                (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
-                                                MODEST_TYPE_WP_TEXT_VIEW, ModestWpTextViewPrivate));
-
-typedef struct                                  _ModestWpTextViewPrivate ModestWpTextViewPrivate;
-
-struct                                          _ModestWpTextViewPrivate
-{
-    gdouble x;                                                      /* tap x position */
-    gdouble y;                                                      /* tap y position */
-};
-
-GtkWidget *
-modest_wp_text_view_new                            (void)
-{
-    GtkWidget *entry = g_object_new (MODEST_TYPE_WP_TEXT_VIEW, NULL);
-
-    return entry;
-}
-
-static gint
-modest_wp_text_view_button_press_event (GtkWidget        *widget,
-                                       GdkEventButton   *event)
-{
-    ModestWpTextViewPrivate *priv = MODEST_WP_TEXT_VIEW_GET_PRIVATE (widget);
-
-    if (GTK_TEXT_VIEW (widget)->editable &&
-        hildon_gtk_im_context_filter_event (GTK_TEXT_VIEW (widget)->im_context, (GdkEvent*)event)) {
-        GTK_TEXT_VIEW (widget)->need_im_reset = TRUE;
-        return TRUE;
-    }
-
-    if (event->button == 1 && event->type == GDK_BUTTON_PRESS) {
-        priv->x = event->x;
-        priv->y = event->y;
-
-        return TRUE;
-    }
-
-    return FALSE;
-}
-
-static gint
-modest_wp_text_view_button_release_event (GtkWidget        *widget,
-                                         GdkEventButton   *event)
-{
-    GtkTextView *text_view = GTK_TEXT_VIEW (widget);
-    ModestWpTextViewPrivate *priv = MODEST_WP_TEXT_VIEW_GET_PRIVATE (widget);
-    GtkTextIter iter;
-    gint x, y;
-
-    if (text_view->editable &&
-        hildon_gtk_im_context_filter_event (text_view->im_context, (GdkEvent*)event)) {
-        text_view->need_im_reset = TRUE;
-        return TRUE;
-    }
-
-    if (event->button == 1 && event->type == GDK_BUTTON_RELEASE) {
-        if (fabs (priv->x - event->x) < MODEST_WP_TEXT_VIEW_DRAG_THRESHOLD &&
-            fabs (priv->y - event->y) < MODEST_WP_TEXT_VIEW_DRAG_THRESHOLD) {
-            GtkTextWindowType window_type;
-           GtkTextBuffer *buffer;
-
-            window_type = gtk_text_view_get_window_type (text_view, event->window);
-            gtk_text_view_window_to_buffer_coords (text_view,
-                                                   window_type,
-                                                   event->x, event->y,
-                                                   &x, &y);
-            gtk_text_view_get_iter_at_location (text_view, &iter, x, y);
-           buffer = gtk_text_view_get_buffer (text_view);
-            if (gtk_text_buffer_get_char_count (buffer))
-                gtk_text_buffer_place_cursor (buffer, &iter);
-
-            gtk_widget_grab_focus (GTK_WIDGET (text_view));
-
-            return TRUE;
-        }
-    }
-    return FALSE;
-}
-
-static void
-modest_wp_text_view_finalize                       (GObject *object)
-{
-    if (G_OBJECT_CLASS (modest_wp_text_view_parent_class)->finalize)
-        G_OBJECT_CLASS (modest_wp_text_view_parent_class)->finalize (object);
-}
-
-static void
-modest_wp_text_view_class_init                     (ModestWpTextViewClass *klass)
-{
-    GObjectClass *gobject_class = (GObjectClass *)klass;
-    GtkWidgetClass *widget_class = (GtkWidgetClass *)klass;
-
-    gobject_class->finalize = modest_wp_text_view_finalize;
-    widget_class->motion_notify_event = NULL;
-    widget_class->button_press_event = modest_wp_text_view_button_press_event;
-    widget_class->button_release_event = modest_wp_text_view_button_release_event;
-
-    g_type_class_add_private (klass, sizeof (ModestWpTextViewPrivate));
-}
-
-static void
-modest_wp_text_view_init                           (ModestWpTextView *self)
-{
-}
diff --git a/src/hildon2/modest-wp-text-view.h b/src/hildon2/modest-wp-text-view.h
deleted file mode 100644 (file)
index 0538561..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-#ifndef                                         __MODEST_WP_TEXT_VIEW_H__
-#define                                         __MODEST_WP_TEXT_VIEW_H__
-
-#include                                        <wptextview.h>
-
-G_BEGIN_DECLS
-
-#define                                         MODEST_TYPE_WP_TEXT_VIEW \
-                                                (modest_wp_text_view_get_type())
-
-#define                                         MODEST_WP_TEXT_VIEW(obj) \
-                                                (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
-                                                WP_TYPE_TEXT_VIEW, ModestWpTextView))
-
-#define                                         MODEST_WP_TEXT_VIEW_CLASS(klass) \
-                                                (G_TYPE_CHECK_CLASS_CAST ((klass), \
-                                                WP_TYPE_TEXT_VIEW, ModestWpTextViewClass))
-
-#define                                         MODEST_IS_WP_TEXT_VIEW(obj) \
-                                                (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WP_TYPE_TEXT_VIEW))
-
-#define                                         MODEST_IS_WP_TEXT_VIEW_CLASS(klass) \
-                                                (G_TYPE_CHECK_CLASS_TYPE ((klass), WP_TYPE_TEXT_VIEW))
-
-#define                                         MODEST_WP_TEXT_VIEW_GET_CLASS(obj) \
-                                                (G_TYPE_INSTANCE_GET_CLASS ((obj), \
-                                                MODEST_TYPE_WP_TEXT_VIEW, ModestWpTextViewClass))
-
-typedef struct                                  _ModestWpTextView ModestWpTextView;
-
-typedef struct                                  _ModestWpTextViewClass ModestWpTextViewClass;
-
-struct                                          _ModestWpTextViewClass
-{
-    WPTextViewClass parent_class;
-};
-
-struct                                          _ModestWpTextView
-{
-    WPTextView parent;
-};
-
-
-GType
-modest_wp_text_view_get_type                       (void) G_GNUC_CONST;
-
-GtkWidget *
-modest_wp_text_view_new                            (void);
-
-
-G_END_DECLS
-
-#endif /* __MODEST_WP_TEXT_VIEW_H__ */
index a8fc263..b7b2ce6 100644 (file)
@@ -153,6 +153,8 @@ libmodest_widgets_la_SOURCES=          \
        modest-window-mgr.c            \
        modest-wizard-dialog.h         \
        modest-wizard-dialog.c         \
+       modest-wp-text-view.c \
+       modest-wp-text-view.h \
        modest-zoomable.h              \
        modest-zoomable.c
 
diff --git a/src/widgets/modest-msg-edit-window-ui-dimming.h b/src/widgets/modest-msg-edit-window-ui-dimming.h
new file mode 100644 (file)
index 0000000..acf94d2
--- /dev/null
@@ -0,0 +1,37 @@
+#ifndef __MODEST_MSG_EDIT_WINDOW_UI_DIMMING_PRIV_H__
+#define __MODEST_MSG_EDIT_WINDOW_UI_DIMMING_PRIV_H__
+
+#include "modest-dimming-rules-group.h"
+#include "modest-ui-dimming-rules.h"
+
+G_BEGIN_DECLS
+
+
+/* Menu Dimming rules entries */
+static const ModestDimmingEntry modest_msg_edit_window_menu_dimming_entries [] = {
+
+       /* Format Menu */
+       { "/MenuBar/FormatMenu/AlignmentMenu", G_CALLBACK (modest_ui_dimming_rules_on_set_style) },
+       { "/MenuBar/FormatMenu/AlignmentLeftMenu", G_CALLBACK (modest_ui_dimming_rules_on_set_style) },
+       { "/MenuBar/FormatMenu/AlignmentRightMenu", G_CALLBACK (modest_ui_dimming_rules_on_set_style) },
+       { "/MenuBar/FormatMenu/AlignmentCenterMenu", G_CALLBACK (modest_ui_dimming_rules_on_set_style) },
+       { "/MenuBar/FormatMenu/InsertImageMenu", G_CALLBACK (modest_ui_dimming_rules_on_set_style) },
+       { "/MenuBar/EditMenu/UndoMenu", G_CALLBACK (modest_ui_dimming_rules_on_undo) },
+       { "/MenuBar/EditMenu/RedoMenu", G_CALLBACK (modest_ui_dimming_rules_on_redo) },
+       { "/MenuBar/AttachmentsMenu/RemoveAttachmentsMenu", G_CALLBACK (modest_ui_dimming_rules_on_editor_remove_attachment) },
+       { "/MenuBar/AttachmentsMenu/InsertImageMenu", G_CALLBACK (modest_ui_dimming_rules_on_set_style) },
+       { "/MenuBar/EmailMenu/SaveToDraftsMenu", G_CALLBACK (modest_ui_dimming_rules_on_save_to_drafts) },
+
+};
+
+/* Menu Dimming rules entries */
+static const ModestDimmingEntry modest_msg_edit_window_toolbar_dimming_entries [] = {
+
+       /* Toolbar */
+       { "/ToolBar/ToolbarSend", G_CALLBACK(modest_ui_dimming_rules_on_send) },
+       { "/ToolBar/ActionsBold", G_CALLBACK(modest_ui_dimming_rules_on_set_style) },
+       { "/ToolBar/ActionsItalics", G_CALLBACK(modest_ui_dimming_rules_on_set_style) },
+};
+
+G_END_DECLS
+#endif /* __MODEST_MSG_VIEW_WINDOW_UI_PRIV_H__ */
diff --git a/src/widgets/modest-wp-text-view.c b/src/widgets/modest-wp-text-view.c
new file mode 100644 (file)
index 0000000..4b93a0d
--- /dev/null
@@ -0,0 +1,143 @@
+/* Copyright (c) 2006, 2008 Nokia Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * * Neither the name of the Nokia Corporation nor the names of its
+ *   contributors may be used to endorse or promote products derived from
+ *   this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+#include                                        "modest-wp-text-view.h"
+#include <math.h>
+
+#define MODEST_WP_TEXT_VIEW_DRAG_THRESHOLD 16.0
+
+G_DEFINE_TYPE                                   (ModestWpTextView, modest_wp_text_view, WP_TYPE_TEXT_VIEW);
+
+#define                                         MODEST_WP_TEXT_VIEW_GET_PRIVATE(obj) \
+                                                (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
+                                                MODEST_TYPE_WP_TEXT_VIEW, ModestWpTextViewPrivate));
+
+typedef struct                                  _ModestWpTextViewPrivate ModestWpTextViewPrivate;
+
+struct                                          _ModestWpTextViewPrivate
+{
+    gdouble x;                                                      /* tap x position */
+    gdouble y;                                                      /* tap y position */
+};
+
+GtkWidget *
+modest_wp_text_view_new                            (void)
+{
+    GtkWidget *entry = g_object_new (MODEST_TYPE_WP_TEXT_VIEW, NULL);
+
+    return entry;
+}
+
+static gint
+modest_wp_text_view_button_press_event (GtkWidget        *widget,
+                                       GdkEventButton   *event)
+{
+    ModestWpTextViewPrivate *priv = MODEST_WP_TEXT_VIEW_GET_PRIVATE (widget);
+
+    if (GTK_TEXT_VIEW (widget)->editable &&
+        hildon_gtk_im_context_filter_event (GTK_TEXT_VIEW (widget)->im_context, (GdkEvent*)event)) {
+        GTK_TEXT_VIEW (widget)->need_im_reset = TRUE;
+        return TRUE;
+    }
+
+    if (event->button == 1 && event->type == GDK_BUTTON_PRESS) {
+        priv->x = event->x;
+        priv->y = event->y;
+
+        return TRUE;
+    }
+
+    return FALSE;
+}
+
+static gint
+modest_wp_text_view_button_release_event (GtkWidget        *widget,
+                                         GdkEventButton   *event)
+{
+    GtkTextView *text_view = GTK_TEXT_VIEW (widget);
+    ModestWpTextViewPrivate *priv = MODEST_WP_TEXT_VIEW_GET_PRIVATE (widget);
+    GtkTextIter iter;
+    gint x, y;
+
+    if (text_view->editable &&
+        hildon_gtk_im_context_filter_event (text_view->im_context, (GdkEvent*)event)) {
+        text_view->need_im_reset = TRUE;
+        return TRUE;
+    }
+
+    if (event->button == 1 && event->type == GDK_BUTTON_RELEASE) {
+        if (fabs (priv->x - event->x) < MODEST_WP_TEXT_VIEW_DRAG_THRESHOLD &&
+            fabs (priv->y - event->y) < MODEST_WP_TEXT_VIEW_DRAG_THRESHOLD) {
+            GtkTextWindowType window_type;
+           GtkTextBuffer *buffer;
+
+            window_type = gtk_text_view_get_window_type (text_view, event->window);
+            gtk_text_view_window_to_buffer_coords (text_view,
+                                                   window_type,
+                                                   event->x, event->y,
+                                                   &x, &y);
+            gtk_text_view_get_iter_at_location (text_view, &iter, x, y);
+           buffer = gtk_text_view_get_buffer (text_view);
+            if (gtk_text_buffer_get_char_count (buffer))
+                gtk_text_buffer_place_cursor (buffer, &iter);
+
+            gtk_widget_grab_focus (GTK_WIDGET (text_view));
+
+            return TRUE;
+        }
+    }
+    return FALSE;
+}
+
+static void
+modest_wp_text_view_finalize                       (GObject *object)
+{
+    if (G_OBJECT_CLASS (modest_wp_text_view_parent_class)->finalize)
+        G_OBJECT_CLASS (modest_wp_text_view_parent_class)->finalize (object);
+}
+
+static void
+modest_wp_text_view_class_init                     (ModestWpTextViewClass *klass)
+{
+    GObjectClass *gobject_class = (GObjectClass *)klass;
+    GtkWidgetClass *widget_class = (GtkWidgetClass *)klass;
+
+    gobject_class->finalize = modest_wp_text_view_finalize;
+    widget_class->motion_notify_event = NULL;
+    widget_class->button_press_event = modest_wp_text_view_button_press_event;
+    widget_class->button_release_event = modest_wp_text_view_button_release_event;
+
+    g_type_class_add_private (klass, sizeof (ModestWpTextViewPrivate));
+}
+
+static void
+modest_wp_text_view_init                           (ModestWpTextView *self)
+{
+}
diff --git a/src/widgets/modest-wp-text-view.h b/src/widgets/modest-wp-text-view.h
new file mode 100644 (file)
index 0000000..0538561
--- /dev/null
@@ -0,0 +1,53 @@
+#ifndef                                         __MODEST_WP_TEXT_VIEW_H__
+#define                                         __MODEST_WP_TEXT_VIEW_H__
+
+#include                                        <wptextview.h>
+
+G_BEGIN_DECLS
+
+#define                                         MODEST_TYPE_WP_TEXT_VIEW \
+                                                (modest_wp_text_view_get_type())
+
+#define                                         MODEST_WP_TEXT_VIEW(obj) \
+                                                (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
+                                                WP_TYPE_TEXT_VIEW, ModestWpTextView))
+
+#define                                         MODEST_WP_TEXT_VIEW_CLASS(klass) \
+                                                (G_TYPE_CHECK_CLASS_CAST ((klass), \
+                                                WP_TYPE_TEXT_VIEW, ModestWpTextViewClass))
+
+#define                                         MODEST_IS_WP_TEXT_VIEW(obj) \
+                                                (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WP_TYPE_TEXT_VIEW))
+
+#define                                         MODEST_IS_WP_TEXT_VIEW_CLASS(klass) \
+                                                (G_TYPE_CHECK_CLASS_TYPE ((klass), WP_TYPE_TEXT_VIEW))
+
+#define                                         MODEST_WP_TEXT_VIEW_GET_CLASS(obj) \
+                                                (G_TYPE_INSTANCE_GET_CLASS ((obj), \
+                                                MODEST_TYPE_WP_TEXT_VIEW, ModestWpTextViewClass))
+
+typedef struct                                  _ModestWpTextView ModestWpTextView;
+
+typedef struct                                  _ModestWpTextViewClass ModestWpTextViewClass;
+
+struct                                          _ModestWpTextViewClass
+{
+    WPTextViewClass parent_class;
+};
+
+struct                                          _ModestWpTextView
+{
+    WPTextView parent;
+};
+
+
+GType
+modest_wp_text_view_get_type                       (void) G_GNUC_CONST;
+
+GtkWidget *
+modest_wp_text_view_new                            (void);
+
+
+G_END_DECLS
+
+#endif /* __MODEST_WP_TEXT_VIEW_H__ */