ekiga r6437 - trunk/lib/engine/gui/gtk-frontend



Author: jpuydt
Date: Thu Jul 10 20:26:11 2008
New Revision: 6437
URL: http://svn.gnome.org/viewvc/ekiga?rev=6437&view=rev

Log:
Added trivial implementations of SimpleChat and MultipleChat pages for the chat window

Added:
   trunk/lib/engine/gui/gtk-frontend/multiple-chat-page.cpp
   trunk/lib/engine/gui/gtk-frontend/multiple-chat-page.h
   trunk/lib/engine/gui/gtk-frontend/simple-chat-page.cpp
   trunk/lib/engine/gui/gtk-frontend/simple-chat-page.h
Modified:
   trunk/lib/engine/gui/gtk-frontend/Makefile.am

Modified: trunk/lib/engine/gui/gtk-frontend/Makefile.am
==============================================================================
--- trunk/lib/engine/gui/gtk-frontend/Makefile.am	(original)
+++ trunk/lib/engine/gui/gtk-frontend/Makefile.am	Thu Jul 10 20:26:11 2008
@@ -27,6 +27,10 @@
 	$(gtk_frontend_dir)/call-history-view-gtk.cpp 	\
 	$(gtk_frontend_dir)/chat-area.h			\
 	$(gtk_frontend_dir)/chat-area.cpp		\
+	$(gtk_frontend_dir)/simple-chat-page.h		\
+	$(gtk_frontend_dir)/simple-chat-page.cpp	\
+	$(gtk_frontend_dir)/multiple-chat-page.h	\
+	$(gtk_frontend_dir)/multiple-chat-page.cpp	\
 	$(gtk_frontend_dir)/chat-window.h 		\
 	$(gtk_frontend_dir)/chat-window.cpp 		\
 	$(gtk_frontend_dir)/chat-window-old.h 		\

Added: trunk/lib/engine/gui/gtk-frontend/multiple-chat-page.cpp
==============================================================================
--- (empty file)
+++ trunk/lib/engine/gui/gtk-frontend/multiple-chat-page.cpp	Thu Jul 10 20:26:11 2008
@@ -0,0 +1,120 @@
+
+/* Ekiga -- A VoIP and Video-Conferencing application
+ * Copyright (C) 2000-2008 Damien Sandras
+ *
+ * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ *
+ * Ekiga is licensed under the GPL license and as a special exception,
+ * you have permission to link or otherwise combine this program with the
+ * programs OPAL, OpenH323 and PWLIB, and distribute the combination,
+ * without applying the requirements of the GNU GPL to the OPAL, OpenH323
+ * and PWLIB programs, as long as you do follow the requirements of the
+ * GNU GPL for all the rest of the software thus combined.
+ */
+
+
+/*
+ *                        multiple-chat-page.cpp  -  description
+ *                         --------------------------------
+ *   begin                : written in july 2008 by Julien Puydt
+ *   copyright            : (C) 2008 by Julien Puydt
+ *   description          : Declaration of a page displaying a MultipleChat
+ *
+ */
+
+#include "multiple-chat-page.h"
+#include "chat-area.h"
+
+static GObjectClass *parent_class = NULL;
+
+static void
+multiple_chat_page_dispose (GObject *obj)
+{
+
+  parent_class->dispose (obj);
+}
+
+static void
+multiple_chat_page_finalize (GObject *obj)
+{
+
+  parent_class->finalize (obj);
+}
+
+static void
+multiple_chat_page_init (GTypeInstance* instance,
+		       G_GNUC_UNUSED gpointer g_class)
+{
+  MultipleChatPage* self = NULL;
+
+  self = (MultipleChatPage*)instance;
+}
+
+static void
+multiple_chat_page_class_init (gpointer g_class,
+			     G_GNUC_UNUSED gpointer class_data)
+{
+  GObjectClass* gobject_class = NULL;
+
+  parent_class = (GObjectClass*)g_type_class_peek_parent (g_class);
+
+  gobject_class = (GObjectClass*)g_class;
+  gobject_class->dispose = multiple_chat_page_dispose;
+  gobject_class->finalize = multiple_chat_page_finalize;
+}
+
+GType
+multiple_chat_page_get_type ()
+{
+  static GType result = 0;
+  if (!result) {
+    static const GTypeInfo my_info = {
+      sizeof(MultipleChatPageClass),
+      NULL,
+      NULL,
+      multiple_chat_page_class_init,
+      NULL,
+      NULL,
+      sizeof (MultipleChatPage),
+      1,
+      multiple_chat_page_init,
+      NULL
+    };
+
+    result = g_type_register_static (GTK_TYPE_HBOX,
+				      "MultipleChatPage",
+				     &my_info, (GTypeFlags)0);
+  }
+  return result;
+}
+
+/* implementation of the public api */
+
+GtkWidget*
+multiple_chat_page_new (Ekiga::MultipleChat& chat)
+{
+  MultipleChatPage* result = NULL;
+  GtkWidget* area = NULL;
+
+  result = (MultipleChatPage*)g_object_new (TYPE_MULTIPLE_CHAT_PAGE, NULL);
+
+  area = chat_area_new (chat);
+  gtk_box_pack_start (GTK_BOX (result), area,
+		      TRUE,TRUE, 2);
+  gtk_widget_show (area);
+
+  return GTK_WIDGET (result);
+}

Added: trunk/lib/engine/gui/gtk-frontend/multiple-chat-page.h
==============================================================================
--- (empty file)
+++ trunk/lib/engine/gui/gtk-frontend/multiple-chat-page.h	Thu Jul 10 20:26:11 2008
@@ -0,0 +1,74 @@
+
+/* Ekiga -- A VoIP and Video-Conferencing application
+ * Copyright (C) 2000-2008 Damien Sandras
+ *
+ * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ *
+ * Ekiga is licensed under the GPL license and as a special exception,
+ * you have permission to link or otherwise combine this program with the
+ * programs OPAL, OpenH323 and PWLIB, and distribute the combination,
+ * without applying the requirements of the GNU GPL to the OPAL, OpenH323
+ * and PWLIB programs, as long as you do follow the requirements of the
+ * GNU GPL for all the rest of the software thus combined.
+ */
+
+
+/*
+ *                        multiple-chat-page.h  -  description
+ *                         --------------------------------
+ *   begin                : written in july 2008 by Julien Puydt
+ *   copyright            : (C) 2008 by Julien Puydt
+ *   description          : Declaration of a page displaying a MultipleChat
+ *
+ */
+
+#ifndef __MULTIPLE_CHAT_PAGE_H__
+#define __MULTIPLE_CHAT_PAGE_H__
+
+#include <gtk/gtk.h>
+#include "chat-multiple.h"
+
+G_BEGIN_DECLS
+
+/* public api */
+
+GtkWidget* multiple_chat_page_new (Ekiga::MultipleChat& chat);
+
+/* GObject boilerplate */
+
+typedef struct _MultipleChatPage MultipleChatPage;
+typedef struct _MultipleChatPageClass MultipleChatPageClass;
+
+struct _MultipleChatPage {
+  GtkHBox parent;
+};
+
+struct _MultipleChatPageClass {
+  GtkHBoxClass parent_class;
+};
+
+#define TYPE_MULTIPLE_CHAT_PAGE             (multiple_chat_page_get_type())
+#define MULTIPLE_CHAT_PAGE(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj),TYPE_MULTIPLE_CHAT_PAGE,MultipleChatPage))
+#define MULTIPLE_CHAT_PAGE_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass),TYPE_MULTIPLE_CHAT_PAGE,GtkVBox))
+#define IS_MULTIPLE_CHAT_PAGE(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj),TYPE_MULTIPLE_CHAT_PAGE))
+#define IS_MULTIPLE_CHAT_PAGE_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass),TYPE_MULTIPLE_CHAT_PAGE))
+#define MULTIPLE_CHAT_PAGE_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj),TYPE_MULTIPLE_CHAT_PAGE,MultipleChatPageClass))
+
+GType multiple_chat_page_get_type () G_GNUC_CONST;
+
+G_END_DECLS
+
+#endif /* __MULTIPLE_CHAT_PAGE_H__ */

Added: trunk/lib/engine/gui/gtk-frontend/simple-chat-page.cpp
==============================================================================
--- (empty file)
+++ trunk/lib/engine/gui/gtk-frontend/simple-chat-page.cpp	Thu Jul 10 20:26:11 2008
@@ -0,0 +1,120 @@
+
+/* Ekiga -- A VoIP and Video-Conferencing application
+ * Copyright (C) 2000-2008 Damien Sandras
+ *
+ * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ *
+ * Ekiga is licensed under the GPL license and as a special exception,
+ * you have permission to link or otherwise combine this program with the
+ * programs OPAL, OpenH323 and PWLIB, and distribute the combination,
+ * without applying the requirements of the GNU GPL to the OPAL, OpenH323
+ * and PWLIB programs, as long as you do follow the requirements of the
+ * GNU GPL for all the rest of the software thus combined.
+ */
+
+
+/*
+ *                        simple-chat-page.cpp  -  description
+ *                         --------------------------------
+ *   begin                : written in july 2008 by Julien Puydt
+ *   copyright            : (C) 2008 by Julien Puydt
+ *   description          : Declaration of a page displaying a SimpleChat
+ *
+ */
+
+#include "simple-chat-page.h"
+#include "chat-area.h"
+
+static GObjectClass *parent_class = NULL;
+
+static void
+simple_chat_page_dispose (GObject *obj)
+{
+
+  parent_class->dispose (obj);
+}
+
+static void
+simple_chat_page_finalize (GObject *obj)
+{
+
+  parent_class->finalize (obj);
+}
+
+static void
+simple_chat_page_init (GTypeInstance* instance,
+		       G_GNUC_UNUSED gpointer g_class)
+{
+  SimpleChatPage* self = NULL;
+
+  self = (SimpleChatPage*)instance;
+}
+
+static void
+simple_chat_page_class_init (gpointer g_class,
+			     G_GNUC_UNUSED gpointer class_data)
+{
+  GObjectClass* gobject_class = NULL;
+
+  parent_class = (GObjectClass*)g_type_class_peek_parent (g_class);
+
+  gobject_class = (GObjectClass*)g_class;
+  gobject_class->dispose = simple_chat_page_dispose;
+  gobject_class->finalize = simple_chat_page_finalize;
+}
+
+GType
+simple_chat_page_get_type ()
+{
+  static GType result = 0;
+  if (!result) {
+    static const GTypeInfo my_info = {
+      sizeof(SimpleChatPageClass),
+      NULL,
+      NULL,
+      simple_chat_page_class_init,
+      NULL,
+      NULL,
+      sizeof (SimpleChatPage),
+      1,
+      simple_chat_page_init,
+      NULL
+    };
+
+    result = g_type_register_static (GTK_TYPE_VBOX,
+				      "SimpleChatPage",
+				     &my_info, (GTypeFlags)0);
+  }
+  return result;
+}
+
+/* implementation of the public api */
+
+GtkWidget*
+simple_chat_page_new (Ekiga::SimpleChat& chat)
+{
+  SimpleChatPage* result = NULL;
+  GtkWidget* area = NULL;
+
+  result = (SimpleChatPage*)g_object_new (TYPE_SIMPLE_CHAT_PAGE, NULL);
+
+  area = chat_area_new (chat);
+  gtk_box_pack_start (GTK_BOX (result), area,
+		      TRUE,TRUE, 2);
+  gtk_widget_show (area);
+
+  return GTK_WIDGET (result);
+}

Added: trunk/lib/engine/gui/gtk-frontend/simple-chat-page.h
==============================================================================
--- (empty file)
+++ trunk/lib/engine/gui/gtk-frontend/simple-chat-page.h	Thu Jul 10 20:26:11 2008
@@ -0,0 +1,74 @@
+
+/* Ekiga -- A VoIP and Video-Conferencing application
+ * Copyright (C) 2000-2008 Damien Sandras
+ *
+ * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ *
+ * Ekiga is licensed under the GPL license and as a special exception,
+ * you have permission to link or otherwise combine this program with the
+ * programs OPAL, OpenH323 and PWLIB, and distribute the combination,
+ * without applying the requirements of the GNU GPL to the OPAL, OpenH323
+ * and PWLIB programs, as long as you do follow the requirements of the
+ * GNU GPL for all the rest of the software thus combined.
+ */
+
+
+/*
+ *                        simple-chat-page.h  -  description
+ *                         --------------------------------
+ *   begin                : written in july 2008 by Julien Puydt
+ *   copyright            : (C) 2008 by Julien Puydt
+ *   description          : Declaration of a page displaying a SimpleChat
+ *
+ */
+
+#ifndef __SIMPLE_CHAT_PAGE_H__
+#define __SIMPLE_CHAT_PAGE_H__
+
+#include <gtk/gtk.h>
+#include "chat-simple.h"
+
+G_BEGIN_DECLS
+
+/* public api */
+
+GtkWidget* simple_chat_page_new (Ekiga::SimpleChat& chat);
+
+/* GObject boilerplate */
+
+typedef struct _SimpleChatPage SimpleChatPage;
+typedef struct _SimpleChatPageClass SimpleChatPageClass;
+
+struct _SimpleChatPage {
+  GtkVBox parent;
+};
+
+struct _SimpleChatPageClass {
+  GtkVBoxClass parent_class;
+};
+
+#define TYPE_SIMPLE_CHAT_PAGE             (simple_chat_page_get_type())
+#define SIMPLE_CHAT_PAGE(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj),TYPE_SIMPLE_CHAT_PAGE,SimpleChatPage))
+#define SIMPLE_CHAT_PAGE_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass),TYPE_SIMPLE_CHAT_PAGE,GtkVBox))
+#define IS_SIMPLE_CHAT_PAGE(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj),TYPE_SIMPLE_CHAT_PAGE))
+#define IS_SIMPLE_CHAT_PAGE_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass),TYPE_SIMPLE_CHAT_PAGE))
+#define SIMPLE_CHAT_PAGE_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj),TYPE_SIMPLE_CHAT_PAGE,SimpleChatPageClass))
+
+GType simple_chat_page_get_type () G_GNUC_CONST;
+
+G_END_DECLS
+
+#endif /* __SIMPLE_CHAT_PAGE_H__ */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]