这篇教程C++ GEDIT_IS_DOCUMENT函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GEDIT_IS_DOCUMENT函数的典型用法代码示例。如果您正苦于以下问题:C++ GEDIT_IS_DOCUMENT函数的具体用法?C++ GEDIT_IS_DOCUMENT怎么用?C++ GEDIT_IS_DOCUMENT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GEDIT_IS_DOCUMENT函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: _gedit_document_get_empty_searchgboolean_gedit_document_get_empty_search (GeditDocument *doc){ g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), TRUE); return doc->priv->empty_search;}
开发者ID:alexandre-mbm,项目名称:gedit,代码行数:7,
示例2: gedit_document_get_language/** * gedit_document_get_language: * @doc: * * Return value: (transfer none): */GtkSourceLanguage *gedit_document_get_language (GeditDocument *doc){ g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), NULL); return gtk_source_buffer_get_language (GTK_SOURCE_BUFFER (doc));}
开发者ID:hacker97,项目名称:gedit,代码行数:13,
示例3: _gedit_document_needs_saving/* * Deletion and external modification is only checked for local files. */gboolean_gedit_document_needs_saving (GeditDocument *doc){ GeditDocumentPrivate *priv; gboolean externally_modified = FALSE; gboolean deleted = FALSE; g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), FALSE); priv = gedit_document_get_instance_private (doc); if (gtk_text_buffer_get_modified (GTK_TEXT_BUFFER (doc))) { return TRUE; } if (gtk_source_file_is_local (priv->file)) { gtk_source_file_check_file_on_disk (priv->file); externally_modified = gtk_source_file_is_externally_modified (priv->file); deleted = gtk_source_file_is_deleted (priv->file); } return (externally_modified || deleted) && !priv->create;}
开发者ID:hacker97,项目名称:gedit,代码行数:28,
示例4: gedit_document_get_compression_type/** * gedit_document_get_compression_type: * @doc: a #GeditDocument. * * Returns: the compression type. * Deprecated: 3.14: use gtk_source_file_get_compression_type() instead. */GtkSourceCompressionTypegedit_document_get_compression_type (GeditDocument *doc){ g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), 0); return gtk_source_file_get_compression_type (doc->priv->file);}
开发者ID:alexandre-mbm,项目名称:gedit,代码行数:14,
示例5: gedit_document_set_metadatavoidgedit_document_set_metadata (GeditDocument *doc, const gchar *first_key, ...){ GFile *location; const gchar *key; const gchar *value; va_list var_args; g_return_if_fail (GEDIT_IS_DOCUMENT (doc)); g_return_if_fail (first_key != NULL); location = gtk_source_file_get_location (doc->priv->file); if (location == NULL) { /* Can't set metadata for untitled documents */ return; } va_start (var_args, first_key); for (key = first_key; key; key = va_arg (var_args, const gchar *)) { value = va_arg (var_args, const gchar *); gedit_metadata_manager_set (location, key, value); } va_end (var_args);}
开发者ID:alexandre-mbm,项目名称:gedit,代码行数:31,
示例6: gedit_document_get_newline_type/** * gedit_document_get_newline_type: * @doc: a #GeditDocument. * * Returns: the newline type. * Deprecated: 3.14: use gtk_source_file_get_newline_type() instead. */GtkSourceNewlineTypegedit_document_get_newline_type (GeditDocument *doc){ g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), 0); return gtk_source_file_get_newline_type (doc->priv->file);}
开发者ID:alexandre-mbm,项目名称:gedit,代码行数:14,
示例7: gedit_document_get_encoding/** * gedit_document_get_encoding: * @doc: a #GeditDocument. * * Returns: the encoding. * Deprecated: 3.14: use gtk_source_file_get_encoding() instead. */const GtkSourceEncoding *gedit_document_get_encoding (GeditDocument *doc){ g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), NULL); return gtk_source_file_get_encoding (doc->priv->file);}
开发者ID:alexandre-mbm,项目名称:gedit,代码行数:14,
示例8: gedit_document_is_untitledgbooleangedit_document_is_untitled (GeditDocument *doc){ g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), TRUE); return gtk_source_file_get_location (doc->priv->file) == NULL;}
开发者ID:alexandre-mbm,项目名称:gedit,代码行数:7,
示例9: gedit_document_get_file/** * gedit_document_get_file: * @doc: a #GeditDocument. * * Gets the associated #GtkSourceFile. You should use it only for reading * purposes, not for creating a #GtkSourceFileLoader or #GtkSourceFileSaver, * because gedit does some extra work when loading or saving a file and * maintains an internal state. If you use in a plugin a file loader or saver on * the returned #GtkSourceFile, the internal state of gedit won't be updated. * * If you want to save the #GeditDocument to a secondary file, you can create a * new #GtkSourceFile and use a #GtkSourceFileSaver. * * Returns: (transfer none): the associated #GtkSourceFile. * Since: 3.14 */GtkSourceFile *gedit_document_get_file (GeditDocument *doc){ g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), NULL); return doc->priv->file;}
开发者ID:alexandre-mbm,项目名称:gedit,代码行数:23,
示例10: gedit_document_get_search_context/** * gedit_document_get_search_context: * @doc: a #GeditDocument * * Gets the search context. Use this function only if you have used * gedit_document_set_search_context() before. You should not alter other search * contexts, so you have to verify that the returned search context is yours. * One way to verify that is to compare the search settings object, or to mark * the search context with g_object_set_data(). * * Returns: (transfer none): the current search context of the document, or NULL * if there is no current search context. */GtkSourceSearchContext *gedit_document_get_search_context (GeditDocument *doc){ g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), NULL); return doc->priv->search_context;}
开发者ID:alexandre-mbm,项目名称:gedit,代码行数:20,
示例11: gedit_document_get_short_name_for_display/** * gedit_document_get_short_name_for_display: * @doc: a #GeditDocument. * * Note: this never returns %NULL. **/gchar *gedit_document_get_short_name_for_display (GeditDocument *doc){ GeditDocumentPrivate *priv; GFile *location; g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), g_strdup ("")); priv = gedit_document_get_instance_private (doc); location = gtk_source_file_get_location (priv->file); if (priv->short_name != NULL) { return g_strdup (priv->short_name); } else if (location == NULL) { return g_strdup_printf (_("Unsaved Document %d"), priv->untitled_number); } else { return gedit_utils_basename_for_display (location); }}
开发者ID:hacker97,项目名称:gedit,代码行数:32,
示例12: gedit_document_get_content_typegchar *gedit_document_get_content_type (GeditDocument *doc){ g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), NULL); return g_strdup (doc->priv->content_type);}
开发者ID:alexandre-mbm,项目名称:gedit,代码行数:7,
示例13: gedit_document_get_readonlygbooleangedit_document_get_readonly (GeditDocument *doc){ g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), TRUE); return doc->priv->readonly;}
开发者ID:alexandre-mbm,项目名称:gedit,代码行数:7,
示例14: gedit_document_goto_line/* If @line is bigger than the lines of the document, the cursor is moved * to the last line and FALSE is returned. */gbooleangedit_document_goto_line (GeditDocument *doc, gint line){ gboolean ret = TRUE; guint line_count; GtkTextIter iter; gedit_debug (DEBUG_DOCUMENT); g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), FALSE); g_return_val_if_fail (line >= -1, FALSE); line_count = gtk_text_buffer_get_line_count (GTK_TEXT_BUFFER (doc)); if (line >= line_count) { ret = FALSE; gtk_text_buffer_get_end_iter (GTK_TEXT_BUFFER (doc), &iter); } else { gtk_text_buffer_get_iter_at_line (GTK_TEXT_BUFFER (doc), &iter, line); } gtk_text_buffer_place_cursor (GTK_TEXT_BUFFER (doc), &iter); return ret;}
开发者ID:hacker97,项目名称:gedit,代码行数:35,
示例15: gedit_document_set_content_type/** * gedit_document_set_content_type: * @doc: * @content_type: (allow-none): */voidgedit_document_set_content_type (GeditDocument *doc, const gchar *content_type){ g_return_if_fail (GEDIT_IS_DOCUMENT (doc)); gedit_debug (DEBUG_DOCUMENT); if (content_type == NULL) { GFile *location; gchar *guessed_type = NULL; /* If content type is null, we guess from the filename */ location = gtk_source_file_get_location (doc->priv->file); if (location != NULL) { gchar *basename; basename = g_file_get_basename (location); guessed_type = g_content_type_guess (basename, NULL, 0, NULL); g_free (basename); } set_content_type_no_guess (doc, guessed_type); g_free (guessed_type); } else { set_content_type_no_guess (doc, content_type); }}
开发者ID:alexandre-mbm,项目名称:gedit,代码行数:38,
示例16: _gedit_document_get_creategboolean_gedit_document_get_create (GeditDocument *doc){ g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), FALSE); return doc->priv->create;}
开发者ID:alexandre-mbm,项目名称:gedit,代码行数:7,
示例17: _gedit_document_set_createvoid_gedit_document_set_create (GeditDocument *doc, gboolean create){ g_return_if_fail (GEDIT_IS_DOCUMENT (doc)); doc->priv->create = create != FALSE;}
开发者ID:alexandre-mbm,项目名称:gedit,代码行数:8,
示例18: gedit_document_set_content_type/** * gedit_document_set_content_type: * @doc: * @content_type: (allow-none): * * Deprecated: 3.18: Unused function. The intent is to change the * #GeditDocument:content-type property to be read-only. */voidgedit_document_set_content_type (GeditDocument *doc, const gchar *content_type){ g_return_if_fail (GEDIT_IS_DOCUMENT (doc)); set_content_type (doc, content_type);}
开发者ID:hacker97,项目名称:gedit,代码行数:16,
示例19: gedit_document_set_language/** * gedit_document_set_language: * @doc: * @lang: (allow-none): **/voidgedit_document_set_language (GeditDocument *doc, GtkSourceLanguage *lang){ g_return_if_fail (GEDIT_IS_DOCUMENT (doc)); set_language (doc, lang, TRUE);}
开发者ID:hacker97,项目名称:gedit,代码行数:13,
示例20: gedit_automatic_spell_checker_get_from_documentGeditAutomaticSpellChecker *gedit_automatic_spell_checker_get_from_document (const GeditDocument *doc){ g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), NULL); if (automatic_spell_checker_id == 0) return NULL; return g_object_get_qdata (G_OBJECT (doc), automatic_spell_checker_id);}
开发者ID:lucabi,项目名称:gedit,代码行数:10,
示例21: gedit_document_set_location/** * gedit_document_set_location: * @doc: a #GeditDocument. * @location: the new location. * * Deprecated: 3.14: use gtk_source_file_set_location() instead. */voidgedit_document_set_location (GeditDocument *doc, GFile *location){ g_return_if_fail (GEDIT_IS_DOCUMENT (doc)); g_return_if_fail (G_IS_FILE (location)); gtk_source_file_set_location (doc->priv->file, location); gedit_document_set_content_type (doc, NULL);}
开发者ID:alexandre-mbm,项目名称:gedit,代码行数:17,
示例22: _gedit_document_get_creategboolean_gedit_document_get_create (GeditDocument *doc){ GeditDocumentPrivate *priv; g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), FALSE); priv = gedit_document_get_instance_private (doc); return priv->create;}
开发者ID:hacker97,项目名称:gedit,代码行数:11,
示例23: gedit_document_get_file/** * gedit_document_get_file: * @doc: a #GeditDocument. * * Gets the associated #GtkSourceFile. You should use it only for reading * purposes, not for creating a #GtkSourceFileLoader or #GtkSourceFileSaver, * because gedit does some extra work when loading or saving a file and * maintains an internal state. If you use in a plugin a file loader or saver on * the returned #GtkSourceFile, the internal state of gedit won't be updated. * * If you want to save the #GeditDocument to a secondary file, you can create a * new #GtkSourceFile and use a #GtkSourceFileSaver. * * Returns: (transfer none): the associated #GtkSourceFile. * Since: 3.14 */GtkSourceFile *gedit_document_get_file (GeditDocument *doc){ GeditDocumentPrivate *priv; g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), NULL); priv = gedit_document_get_instance_private (doc); return priv->file;}
开发者ID:hacker97,项目名称:gedit,代码行数:27,
示例24: _gedit_document_get_empty_searchgboolean_gedit_document_get_empty_search (GeditDocument *doc){ GeditDocumentPrivate *priv; g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), TRUE); priv = gedit_document_get_instance_private (doc); return priv->empty_search;}
开发者ID:hacker97,项目名称:gedit,代码行数:11,
示例25: gedit_document_get_search_context/** * gedit_document_get_search_context: * @doc: a #GeditDocument * * Gets the search context. Use this function only if you have used * gedit_document_set_search_context() before. You should not alter other search * contexts, so you have to verify that the returned search context is yours. * One way to verify that is to compare the search settings object, or to mark * the search context with g_object_set_data(). * * Returns: (transfer none): the current search context of the document, or NULL * if there is no current search context. */GtkSourceSearchContext *gedit_document_get_search_context (GeditDocument *doc){ GeditDocumentPrivate *priv; g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), NULL); priv = gedit_document_get_instance_private (doc); return priv->search_context;}
开发者ID:hacker97,项目名称:gedit,代码行数:24,
示例26: gedit_document_get_compression_type/** * gedit_document_get_compression_type: * @doc: a #GeditDocument. * * Returns: the compression type. * Deprecated: 3.14: use gtk_source_file_get_compression_type() instead. */GtkSourceCompressionTypegedit_document_get_compression_type (GeditDocument *doc){ GeditDocumentPrivate *priv; g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), 0); priv = gedit_document_get_instance_private (doc); return gtk_source_file_get_compression_type (priv->file);}
开发者ID:hacker97,项目名称:gedit,代码行数:18,
示例27: gedit_document_get_encoding/** * gedit_document_get_encoding: * @doc: a #GeditDocument. * * Returns: the encoding. * Deprecated: 3.14: use gtk_source_file_get_encoding() instead. */const GtkSourceEncoding *gedit_document_get_encoding (GeditDocument *doc){ GeditDocumentPrivate *priv; g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), NULL); priv = gedit_document_get_instance_private (doc); return gtk_source_file_get_encoding (priv->file);}
开发者ID:hacker97,项目名称:gedit,代码行数:18,
示例28: gedit_document_is_untitledgbooleangedit_document_is_untitled (GeditDocument *doc){ GeditDocumentPrivate *priv; g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), TRUE); priv = gedit_document_get_instance_private (doc); return gtk_source_file_get_location (priv->file) == NULL;}
开发者ID:hacker97,项目名称:gedit,代码行数:11,
示例29: gedit_document_get_deleted/** * gedit_document_get_deleted: * @doc: a #GeditDocument. * * Returns: whether the file has been deleted. * * Deprecated: 3.18: Unused function. */gbooleangedit_document_get_deleted (GeditDocument *doc){ GeditDocumentPrivate *priv; g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), FALSE); priv = gedit_document_get_instance_private (doc); return gtk_source_file_is_deleted (priv->file);}
开发者ID:hacker97,项目名称:gedit,代码行数:19,
注:本文中的GEDIT_IS_DOCUMENT函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ GED_CHECK_ARGC_GT_0函数代码示例 C++ GECODE_ME_CHECK函数代码示例 |