• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ GTK_MOZ_EMBED函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GTK_MOZ_EMBED函数的典型用法代码示例。如果您正苦于以下问题:C++ GTK_MOZ_EMBED函数的具体用法?C++ GTK_MOZ_EMBED怎么用?C++ GTK_MOZ_EMBED使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GTK_MOZ_EMBED函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: gtk_moz_embed_can_go_back

void WebBrowserObject::BrowserButtons(void)
{
    gboolean can_go_back = gtk_moz_embed_can_go_back(GTK_MOZ_EMBED(mozilla));
    gboolean can_go_forward = gtk_moz_embed_can_go_forward(GTK_MOZ_EMBED(mozilla));
    gtk_widget_set_sensitive(backButton, can_go_back);
    gtk_widget_set_sensitive(forwardButton, can_go_forward);
}
开发者ID:vseryakov,项目名称:lmbox,代码行数:7,代码来源:webbrowser.cpp


示例2: gtk_moz_embed_open_stream

void WebBrowserObject::BrowserData(const char *data)
{
    if (data) {
       gtk_moz_embed_open_stream(GTK_MOZ_EMBED(mozilla), "file://", "text/html");
       gtk_moz_embed_append_data(GTK_MOZ_EMBED(mozilla), data, strlen(data));
       gtk_moz_embed_close_stream(GTK_MOZ_EMBED(mozilla));
    }
}
开发者ID:vseryakov,项目名称:lmbox,代码行数:8,代码来源:webbrowser.cpp


示例3: mozilla_embed_new_window

static void
mozilla_embed_new_window (GtkMozEmbed *embed, 
			  GtkMozEmbed **newEmbed,
                          guint chromemask)
{
	MozillaEmbed *membed = MOZILLA_EMBED (embed);
	int i;
	EmbedChromeMask mask = EMBED_CHROME_OPENASPOPUP;
	GaleonEmbed *new_embed = NULL;

	struct
	{
		guint chromemask;
		EmbedChromeMask embed_mask;
	}
	conversion_map [] =
	{
		{ GTK_MOZ_EMBED_FLAG_DEFAULTCHROME, EMBED_CHROME_DEFAULT },
		{ GTK_MOZ_EMBED_FLAG_MENUBARON, EMBED_CHROME_MENUBARON },
		{ GTK_MOZ_EMBED_FLAG_TOOLBARON, EMBED_CHROME_TOOLBARON },
		/* Map the bookmarks bar to the default, as otherwise _blank
		 * pages don't honour the gconf settings, and always have the
		 * bookmarks bar, which just confuses people (bug 122410) */
		{ GTK_MOZ_EMBED_FLAG_PERSONALTOOLBARON, EMBED_CHROME_DEFAULT },
		{ GTK_MOZ_EMBED_FLAG_STATUSBARON, EMBED_CHROME_STATUSBARON },
		{ GTK_MOZ_EMBED_FLAG_WINDOWRAISED, EMBED_CHROME_WINDOWRAISED },
		{ GTK_MOZ_EMBED_FLAG_WINDOWLOWERED, EMBED_CHROME_WINDOWLOWERED },
		{ GTK_MOZ_EMBED_FLAG_CENTERSCREEN, EMBED_CHROME_CENTERSCREEN },
		{ GTK_MOZ_EMBED_FLAG_OPENASDIALOG, EMBED_CHROME_OPENASDIALOG },
		{ GTK_MOZ_EMBED_FLAG_OPENASCHROME, EMBED_CHROME_OPENASCHROME },
		{ 0, EMBED_CHROME_NONE }
	};

	for (i = 0; conversion_map[i].chromemask != 0; i++)
	{
		if (chromemask & conversion_map[i].chromemask)
		{
			mask = (EmbedChromeMask) (mask | conversion_map[i].embed_mask);	
		}
	}
	
	g_signal_emit_by_name (membed, "ge_new_window", mask, &new_embed);

	g_assert (new_embed != NULL);
	
	gtk_moz_embed_set_chrome_mask (GTK_MOZ_EMBED(new_embed), chromemask);

	*newEmbed = GTK_MOZ_EMBED(new_embed);
}
开发者ID:GNOME,项目名称:galeon,代码行数:49,代码来源:mozilla-embed.cpp


示例4: gtk_moz_embed_can_go_back

void
update_nav_buttons      (TestGtkBrowser *browser)
{
    gboolean can_go_back;
    gboolean can_go_forward;
    can_go_back = gtk_moz_embed_can_go_back(GTK_MOZ_EMBED(browser->mozEmbed));
    can_go_forward = gtk_moz_embed_can_go_forward(GTK_MOZ_EMBED(browser->mozEmbed));
    if (can_go_back)
        gtk_widget_set_sensitive(browser->backButton, TRUE);
    else
        gtk_widget_set_sensitive(browser->backButton, FALSE);
    if (can_go_forward)
        gtk_widget_set_sensitive(browser->forwardButton, TRUE);
    else
        gtk_widget_set_sensitive(browser->forwardButton, FALSE);
}
开发者ID:rn10950,项目名称:RetroZilla,代码行数:16,代码来源:TestGtkEmbed.cpp


示例5: on_save_ok_cb

void on_save_ok_cb(GtkWidget *button, OpenDialogParams *dialogParams) {
  
  MinimoBrowser *browser = NULL;
  G_CONST_RETURN gchar *filename;
  
  filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialogParams->main_combo));
  
  if (!filename || !strcmp(filename,"")) {
	
    return ;
	
  } else {
    browser = (MinimoBrowser *) g_object_get_data(G_OBJECT(dialogParams->main_combo), "minimo");
    
    if (!mozilla_save( GTK_MOZ_EMBED (browser->mozEmbed), (gchar *) filename, TRUE )) {
      //create_dialog("Error","Save failed, did you enter a name?",0,0);
    }
    
    gtk_widget_destroy(dialogParams->main_combo);
    gtk_widget_destroy(dialogParams->dialog_combo);
    
    g_free(dialogParams);
  }
  return ;
}
开发者ID:rn10950,项目名称:RetroZilla,代码行数:25,代码来源:minimo_callbacks.cpp


示例6: save_image_from_popup

void save_image_from_popup(GtkWidget *menuitem, MinimoBrowser *browser)
{
  
  gchar *href, *name, *FullPath;
  
  FullPath= PR_GetEnv("HOME");
  
  href = (gchar *) g_object_get_data(G_OBJECT(menuitem), "link");
  if (!href) {
    g_print("Could not find href to save image\n");
    return;
  }
  name = (gchar *) g_object_get_data(G_OBJECT(menuitem), "name");
  
  FullPath= g_strconcat(FullPath,"/downloaded_files/",NULL);
  mkdir(FullPath,0755);
  
  FullPath= g_strconcat(FullPath,name,NULL);
  mozilla_save_image(GTK_MOZ_EMBED(browser->mozEmbed),href,FullPath);
  
  g_free(FullPath);
  g_free(name);
  g_free(href);
  return;
}
开发者ID:rn10950,项目名称:RetroZilla,代码行数:25,代码来源:minimo_callbacks.cpp


示例7: impl_load_url

static void
impl_load_url (GaleonEmbed *embed, 
               const char *url)
{
	char *clean_url;

        clean_url = gul_string_remove_outside_whitespace (url);

        gtk_moz_embed_load_url (GTK_MOZ_EMBED(embed),
                                clean_url);

	/* LOAD HACK: If we haven't loaded a url yet, remember this one, 
	 * and flag that we are trying to load this url */
	MozillaEmbed *membed = MOZILLA_EMBED (embed);
	if (!membed->priv->loaded_url)
	{
		g_free (membed->priv->loading_url);
		membed->priv->loading_url = clean_url;

		/* Fake a "location" signal, so that the layer above picks up
		 * this url, and doesn't think there is no current url */
		g_signal_emit_by_name (membed, "ge_location");
		return;
	}

	g_free (clean_url);

	return;
}
开发者ID:GNOME,项目名称:galeon,代码行数:29,代码来源:mozilla-embed.cpp


示例8: mozilla_get_content_type

extern "C" char *
mozilla_get_content_type (EphyEmbed *embed)
{
	nsCOMPtr<nsIWebBrowser> browser;
	gtk_moz_embed_get_nsIWebBrowser (GTK_MOZ_EMBED (embed),
					 getter_AddRefs (browser));
	NS_ENSURE_TRUE (browser, NULL);

	nsCOMPtr<nsIDOMWindow> dom_window;
	browser->GetContentDOMWindow (getter_AddRefs (dom_window));
	NS_ENSURE_TRUE (dom_window, NULL);

	nsCOMPtr<nsIDOMDocument> doc;
	dom_window->GetDocument (getter_AddRefs (doc));
	NS_ENSURE_TRUE (doc, NULL);

	nsCOMPtr<nsIDOMNSDocument> ns_doc = do_QueryInterface (doc);
	NS_ENSURE_TRUE (ns_doc, NULL);

	nsresult rv;
	nsString contentType;
	rv = ns_doc->GetContentType (contentType);

	nsCString cType;
	NS_UTF16ToCString (contentType, NS_CSTRING_ENCODING_UTF8, cType);

	return g_strdup (cType.get());
}
开发者ID:GNOME,项目名称:epiphany-extensions,代码行数:28,代码来源:mozilla-helpers.cpp


示例9: mozilla_get_doctype

extern "C" char *
mozilla_get_doctype (EphyEmbed *embed)
{
	nsCOMPtr<nsIWebBrowser> browser;
	gtk_moz_embed_get_nsIWebBrowser (GTK_MOZ_EMBED (embed),
					 getter_AddRefs (browser));
	NS_ENSURE_TRUE (browser, NULL);

	nsCOMPtr<nsIDOMWindow> dom_window;
	browser->GetContentDOMWindow (getter_AddRefs (dom_window));
	NS_ENSURE_TRUE (dom_window, NULL);

	nsCOMPtr<nsIDOMDocument> doc;
	dom_window->GetDocument (getter_AddRefs (doc));
	NS_ENSURE_TRUE (doc, NULL);

	nsCOMPtr<nsIDOMDocumentType> doctype;
	doc->GetDoctype (getter_AddRefs (doctype));
	NS_ENSURE_TRUE (doctype, NULL);

	nsresult rv;
	nsString name;
	rv = doctype->GetPublicId (name);
	NS_ENSURE_SUCCESS (rv, NULL);

	nsCString cName;
	NS_UTF16ToCString (name, NS_CSTRING_ENCODING_UTF8, cName);

	return g_strdup (cName.get());
}
开发者ID:GNOME,项目名称:epiphany-extensions,代码行数:30,代码来源:mozilla-helpers.cpp


示例10: reload_clicked_cb

static void reload_clicked_cb (GtkButton *button, WebBrowserObject *browser)
{
    gint x, y;
    GdkModifierType state = (GdkModifierType)0;
    gdk_window_get_pointer(NULL, &x, &y, &state);
    gtk_moz_embed_reload(GTK_MOZ_EMBED(browser->mozilla), (state & GDK_SHIFT_MASK) ? GTK_MOZ_EMBED_FLAG_RELOADBYPASSCACHE : GTK_MOZ_EMBED_FLAG_RELOADNORMAL);
}
开发者ID:vseryakov,项目名称:lmbox,代码行数:7,代码来源:webbrowser.cpp


示例11: stream_clicked_cb

void
stream_clicked_cb  (GtkButton   *button, TestGtkBrowser *browser)
{
    const char *data;
    const char *data2;
    data = "<html>Hi";
    data2 = " there</html>\n";
    g_print("stream_clicked_cb\n");
    gtk_moz_embed_open_stream(GTK_MOZ_EMBED(browser->mozEmbed),
                              "file://", "text/html");
    gtk_moz_embed_append_data(GTK_MOZ_EMBED(browser->mozEmbed),
                              data, strlen(data));
    gtk_moz_embed_append_data(GTK_MOZ_EMBED(browser->mozEmbed),
                              data2, strlen(data2));
    gtk_moz_embed_close_stream(GTK_MOZ_EMBED(browser->mozEmbed));
}
开发者ID:rn10950,项目名称:RetroZilla,代码行数:16,代码来源:TestGtkEmbed.cpp


示例12: impl_append_data

static void
impl_append_data (GaleonEmbed *embed,
                  const char *data, 
                  guint32 len)
{
	gtk_moz_embed_append_data (GTK_MOZ_EMBED(embed),
				   data, len);
}
开发者ID:GNOME,项目名称:galeon,代码行数:8,代码来源:mozilla-embed.cpp


示例13: url_activate_cb

void
url_activate_cb    (GtkEditable *widget, TestGtkBrowser *browser)
{
    gchar *text = gtk_editable_get_chars(widget, 0, -1);
    g_print("loading url %s\n", text);
    gtk_moz_embed_load_url(GTK_MOZ_EMBED(browser->mozEmbed), text);
    g_free(text);
}
开发者ID:rn10950,项目名称:RetroZilla,代码行数:8,代码来源:TestGtkEmbed.cpp


示例14: Lock

void WebBrowserObject::Refresh(void)
{
    Lock();
    if (toplevel) {
        gtk_moz_embed_reload(GTK_MOZ_EMBED(mozilla), GTK_MOZ_EMBED_FLAG_RELOADBYPASSCACHE);
    }
    Unlock();
}
开发者ID:vseryakov,项目名称:lmbox,代码行数:8,代码来源:webbrowser.cpp


示例15: g_print

void
menu_stream_cb     (GtkMenuItem *menuitem, TestGtkBrowser *browser)
{
    g_print("menu_stream_cb\n");
    const char *data;
    const char *data2;
    data = "<html>Hi";
    data2 = " <a href='foo.html'>there</a></html>\n";
    g_print("stream_clicked_cb\n");
    gtk_moz_embed_open_stream(GTK_MOZ_EMBED(browser->mozEmbed),
                              "file://", "text/html");
    gtk_moz_embed_append_data(GTK_MOZ_EMBED(browser->mozEmbed),
                              data, strlen(data));
    gtk_moz_embed_append_data(GTK_MOZ_EMBED(browser->mozEmbed),
                              data2, strlen(data2));
    gtk_moz_embed_close_stream(GTK_MOZ_EMBED(browser->mozEmbed));
}
开发者ID:rn10950,项目名称:RetroZilla,代码行数:17,代码来源:TestGtkEmbed.cpp


示例16: minimo_load_url

void minimo_load_url(gchar *url, MinimoBrowser *browser)
{
  g_return_if_fail(browser->mozEmbed != NULL);
  g_return_if_fail(url != NULL);
  
  gtk_moz_embed_load_url(GTK_MOZ_EMBED(browser->mozEmbed), url);
  
  return;
}
开发者ID:rn10950,项目名称:RetroZilla,代码行数:9,代码来源:minimo_callbacks.cpp


示例17: gtk_moz_embed_can_go_back

bool MozillaRenderer::canGoBack(void)
{
	if ((m_htmlWidget == NULL) ||
		(m_rendering == false))
	{
		return false;
	}

	return gtk_moz_embed_can_go_back(GTK_MOZ_EMBED(m_htmlWidget));
}
开发者ID:BackupTheBerlios,项目名称:pinot-svn,代码行数:10,代码来源:MozillaRenderer.cpp


示例18: selection_file_available

// check if there is a selection file associated with this HTML page
bool selection_file_available(GtkMozEmbed * b)
{
    char    filename[MAX_FILE_NAME];

    if (selection_file_get_name(GTK_MOZ_EMBED(b), filename, MAX_FILE_NAME) == 0)
    {
        return g_file_test(filename, G_FILE_TEST_EXISTS);
    }
    return FALSE;
}
开发者ID:vastin,项目名称:iliad-hacking,代码行数:11,代码来源:selectionFileHandler.cpp


示例19: impl_open_stream

static gboolean
impl_open_stream (GaleonEmbed *embed,
                  const char *base_uri,
                  const char *mime_type)
{
	gtk_moz_embed_open_stream (GTK_MOZ_EMBED(embed),
				   base_uri, mime_type);
	
	return TRUE;
}
开发者ID:GNOME,项目名称:galeon,代码行数:10,代码来源:mozilla-embed.cpp


示例20: new_window_orphan_cb

void new_window_orphan_cb (GtkMozEmbedSingle *embed,
                           GtkMozEmbed **retval, guint chromemask,
                           gpointer data)
{
    g_print("new_window_orphan_cb\n");
    g_print("chromemask is %d\n", chromemask);
    TestGtkBrowser *newBrowser = new_gtk_browser(chromemask);
    *retval = GTK_MOZ_EMBED(newBrowser->mozEmbed);
    g_print("new browser is %p\n", (void *)*retval);
}
开发者ID:rn10950,项目名称:RetroZilla,代码行数:10,代码来源:TestGtkEmbed.cpp



注:本文中的GTK_MOZ_EMBED函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GTK_NOTEBOOK函数代码示例发布时间:2022-05-30
下一篇:
C++ GTK_MENU_SHELL函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap