[kazehakase-svn] [3283] * module/embed/ie/kz-ie.cpp: More.

Back to archive index

svnno****@sourc***** svnno****@sourc*****
Mon Oct 15 20:06:05 JST 2007


Revision: 3283
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=kazehakase&view=rev&rev=3283
Author:   ikezoe
Date:     2007-10-15 20:06:04 +0900 (Mon, 15 Oct 2007)

Log Message:
-----------
	* module/embed/ie/kz-ie.cpp: More.

Modified Paths:
--------------
    kazehakase/trunk/ChangeLog
    kazehakase/trunk/module/embed/ie/kz-ie.cpp

Modified: kazehakase/trunk/ChangeLog
===================================================================
--- kazehakase/trunk/ChangeLog	2007-10-15 10:51:03 UTC (rev 3282)
+++ kazehakase/trunk/ChangeLog	2007-10-15 11:06:04 UTC (rev 3283)
@@ -9,6 +9,7 @@
 	* module/embed/ie/kz-ie.cpp: Implement some fundamental functions.
 	* module/embed/ie/kz-ie.cpp: Implement more functions.
 	* module/embed/gtk-webcore/kz-gtk-webcore.cpp: Clean.
+	* module/embed/ie/kz-ie.cpp: More.
 
 2007-10-15  Kouhei Sutou  <kou****@cozmi*****>
 

Modified: kazehakase/trunk/module/embed/ie/kz-ie.cpp
===================================================================
--- kazehakase/trunk/module/embed/ie/kz-ie.cpp	2007-10-15 10:51:03 UTC (rev 3282)
+++ kazehakase/trunk/module/embed/ie/kz-ie.cpp	2007-10-15 11:06:04 UTC (rev 3283)
@@ -73,6 +73,16 @@
 static void         kz_ie_go_forward       (KzEmbed      *kzembed);
 static gboolean     kz_ie_can_go_back      (KzEmbed      *kzembed);
 static gboolean     kz_ie_can_go_forward   (KzEmbed      *kzembed);
+static void         kz_ie_print            (KzEmbed      *kzembed);
+static void         kz_ie_print_preview    (KzEmbed      *kzembed);
+static void	    kz_ie_zoom_set	   (KzEmbed      *kzembed, 
+					    int           zoom, 
+					    gboolean      reflow);
+static gint	    kz_ie_zoom_get	   (KzEmbed      *kzembed);
+static void	    kz_ie_set_text_size	   (KzEmbed      *kzembed, 
+					    int           zoom, 
+					    gboolean      reflow);
+static gint	    kz_ie_get_text_size	   (KzEmbed      *kzembed);
 
 /* KzEmbedPrefs interfaces */
 /* no functions is implemented yet */
@@ -207,17 +217,17 @@
 #endif
 	iface->set_encoding           = NULL;
 	iface->get_encoding           = NULL;
-	iface->print                  = NULL;
-	iface->print_preview          = NULL;
+	iface->print                  = kz_ie_print;
+	iface->print_preview          = kz_ie_print_preview;
 	iface->get_printer_list       = NULL;
 	iface->create_thumbnail       = NULL;
 	iface->save_with_content      = NULL;
 	iface->set_text_into_textarea = NULL;
 	iface->get_text_from_textarea = NULL;
-	iface->zoom_set               = NULL;
-	iface->zoom_get               = NULL;
-	iface->set_text_size          = NULL;
-	iface->get_text_size          = NULL;
+	iface->zoom_set               = kz_ie_set_text_size;
+	iface->zoom_get               = kz_ie_get_text_size;
+	iface->set_text_size          = kz_ie_set_text_size;
+	iface->get_text_size          = kz_ie_get_text_size;
 	iface->get_html_with_contents = NULL;
 	iface->set_history            = NULL;
 	iface->get_history            = NULL;
@@ -445,3 +455,52 @@
 
 	return gtk_ie_embed_can_go_forward(GTK_IE_EMBED(kzembed));
 }
+
+static void
+kz_ie_print (KzEmbed *kzembed)
+{
+	g_return_if_fail(KZ_IS_IE(kzembed));
+
+	gtk_ie_embed_print(GTK_IE_EMBED(kzembed));
+}
+
+
+static void
+kz_ie_print_preview (KzEmbed *kzembed)
+{
+	g_return_if_fail(KZ_IS_IE(kzembed));
+
+	gtk_ie_embed_print_preview(GTK_IE_EMBED(kzembed));
+}
+
+static void
+kz_ie_set_text_size (KzEmbed *kzembed, int zoom, gboolean reflow)
+{
+	GtkIEEmbedFontSize size;
+
+	g_return_if_fail(KZ_IS_IE(kzembed));
+
+	if (zoom > 400)
+		size = GTK_IE_EMBED_FONT_LARGEST;
+	else if (zoom > 200)
+		size = GTK_IE_EMBED_FONT_LARGE;
+	else if (zoom > 80)
+		size = GTK_IE_EMBED_FONT_MEDIUM;
+	else if (zoom > 50)
+		size = GTK_IE_EMBED_FONT_SMALL;
+	else 
+		size = GTK_IE_EMBED_FONT_SMALLEST;
+		
+	gtk_ie_embed_set_font_size(GTK_IE_EMBED(kzembed), size);
+}
+
+static int
+kz_ie_get_text_size (KzEmbed *kzembed)
+{
+	g_return_val_if_fail(KZ_IS_IE(kzembed), 100);
+
+	/* gtk_ie_embed_get_font_size(GTK_IE_EMBED(kzembed));*/
+	return 100;
+}
+
+




More information about the Kazehakase-cvs mailing list
Back to archive index