Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-release > by-pkgid > 0c00422fba9a46710101d04f3f3175e7 > files > 56

geany-devel-1.24.1-3.mga5.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>Geany: document.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Geany
   &#160;<span id="projectnumber">1.24.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.8 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">document.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Document related actions: new, save, open, etc.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structGeanyDocument.html">GeanyDocument</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Structure for representing an open tab with all its properties.  <a href="structGeanyDocument.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structGeanyFilePrefs.html">GeanyFilePrefs</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">File Prefs.  <a href="structGeanyFilePrefs.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a304fac5fd2ae01d52c0a46a68abbd7dc"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="document_8h.html#a304fac5fd2ae01d52c0a46a68abbd7dc">DOC_FILENAME</a>(doc)&#160;&#160;&#160;(G_LIKELY((doc)-&gt;file_name != NULL) ? ((doc)-&gt;file_name) : GEANY_STRING_UNTITLED)</td></tr>
<tr class="memdesc:a304fac5fd2ae01d52c0a46a68abbd7dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the filename of the document passed or <code>GEANY_STRING_UNTITLED</code> (e.g.  <a href="#a304fac5fd2ae01d52c0a46a68abbd7dc">More...</a><br /></td></tr>
<tr class="separator:a304fac5fd2ae01d52c0a46a68abbd7dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a064c8f47ec543aa26cb8fd2a895a4ce6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="document_8h.html#a064c8f47ec543aa26cb8fd2a895a4ce6">DOC_VALID</a>(doc_ptr)&#160;&#160;&#160;((doc_ptr) != NULL &amp;&amp; (doc_ptr)-&gt;is_valid)</td></tr>
<tr class="memdesc:a064c8f47ec543aa26cb8fd2a895a4ce6"><td class="mdescLeft">&#160;</td><td class="mdescRight"><code>NULL-safe</code> way to check <code>doc_ptr-&gt;is_valid</code>.  <a href="#a064c8f47ec543aa26cb8fd2a895a4ce6">More...</a><br /></td></tr>
<tr class="separator:a064c8f47ec543aa26cb8fd2a895a4ce6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a76895fd487f4593d1d41e2ee127957d6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="document_8h.html#a76895fd487f4593d1d41e2ee127957d6">documents</a>&#160;&#160;&#160;((<a class="el" href="structGeanyDocument.html">GeanyDocument</a> **)GEANY(<a class="el" href="document_8h.html#ad1bf4d7a9d5bd299793ef7a9164891ad">documents_array</a>)-&gt;pdata)</td></tr>
<tr class="memdesc:a76895fd487f4593d1d41e2ee127957d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wraps documents_array so it can be used with C array syntax.  <a href="#a76895fd487f4593d1d41e2ee127957d6">More...</a><br /></td></tr>
<tr class="separator:a76895fd487f4593d1d41e2ee127957d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a50d86dfb5a12511f786f4f54f370f700"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="document_8h.html#a50d86dfb5a12511f786f4f54f370f700">documents_foreach</a>(i)&#160;&#160;&#160;<a class="el" href="document_8h.html#aa6a3efff88c48b5d33acb60e3597a277">foreach_document</a>(i)</td></tr>
<tr class="separator:a50d86dfb5a12511f786f4f54f370f700"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa6a3efff88c48b5d33acb60e3597a277"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="document_8h.html#aa6a3efff88c48b5d33acb60e3597a277">foreach_document</a>(i)</td></tr>
<tr class="memdesc:aa6a3efff88c48b5d33acb60e3597a277"><td class="mdescLeft">&#160;</td><td class="mdescRight">Iterates all valid documents.  <a href="#aa6a3efff88c48b5d33acb60e3597a277">More...</a><br /></td></tr>
<tr class="separator:aa6a3efff88c48b5d33acb60e3597a277"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:add6e4c13cb515302cb830f25aea98252"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structGeanyFilePrefs.html">GeanyFilePrefs</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="document_8h.html#add6e4c13cb515302cb830f25aea98252">GeanyFilePrefs</a></td></tr>
<tr class="memdesc:add6e4c13cb515302cb830f25aea98252"><td class="mdescLeft">&#160;</td><td class="mdescRight">File Prefs.  <a href="#add6e4c13cb515302cb830f25aea98252">More...</a><br /></td></tr>
<tr class="separator:add6e4c13cb515302cb830f25aea98252"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ae800a827340d58b2fd8f63680043f124"><td class="memItemLeft" align="right" valign="top">gboolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="document_8h.html#ae800a827340d58b2fd8f63680043f124">document_close</a> (<a class="el" href="structGeanyDocument.html">GeanyDocument</a> *doc)</td></tr>
<tr class="memdesc:ae800a827340d58b2fd8f63680043f124"><td class="mdescLeft">&#160;</td><td class="mdescRight">Closes the given document.  <a href="#ae800a827340d58b2fd8f63680043f124">More...</a><br /></td></tr>
<tr class="separator:ae800a827340d58b2fd8f63680043f124"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7df1ea2bebdd0e813242f8eec51b9ca0"><td class="memItemLeft" align="right" valign="top">gint&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="document_8h.html#a7df1ea2bebdd0e813242f8eec51b9ca0">document_compare_by_display_name</a> (gconstpointer a, gconstpointer b)</td></tr>
<tr class="memdesc:a7df1ea2bebdd0e813242f8eec51b9ca0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compares documents by their display names.  <a href="#a7df1ea2bebdd0e813242f8eec51b9ca0">More...</a><br /></td></tr>
<tr class="separator:a7df1ea2bebdd0e813242f8eec51b9ca0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa0fcd821952b2fc243d3dbbec88f6b85"><td class="memItemLeft" align="right" valign="top">gint&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="document_8h.html#aa0fcd821952b2fc243d3dbbec88f6b85">document_compare_by_tab_order</a> (gconstpointer a, gconstpointer b)</td></tr>
<tr class="memdesc:aa0fcd821952b2fc243d3dbbec88f6b85"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compares documents by their tab order.  <a href="#aa0fcd821952b2fc243d3dbbec88f6b85">More...</a><br /></td></tr>
<tr class="separator:aa0fcd821952b2fc243d3dbbec88f6b85"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeac629563ab17f3f58021371520bd420"><td class="memItemLeft" align="right" valign="top">gint&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="document_8h.html#aeac629563ab17f3f58021371520bd420">document_compare_by_tab_order_reverse</a> (gconstpointer a, gconstpointer b)</td></tr>
<tr class="memdesc:aeac629563ab17f3f58021371520bd420"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compares documents by their tab order, in reverse order.  <a href="#aeac629563ab17f3f58021371520bd420">More...</a><br /></td></tr>
<tr class="separator:aeac629563ab17f3f58021371520bd420"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9281ebd6601e78e8fa3c365c636e5329"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structGeanyDocument.html">GeanyDocument</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="document_8h.html#a9281ebd6601e78e8fa3c365c636e5329">document_find_by_filename</a> (const gchar *utf8_filename)</td></tr>
<tr class="memdesc:a9281ebd6601e78e8fa3c365c636e5329"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finds a document with the given filename.  <a href="#a9281ebd6601e78e8fa3c365c636e5329">More...</a><br /></td></tr>
<tr class="separator:a9281ebd6601e78e8fa3c365c636e5329"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a756475de8068d21a297d4c7a224642f4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structGeanyDocument.html">GeanyDocument</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="document_8h.html#a756475de8068d21a297d4c7a224642f4">document_find_by_real_path</a> (const gchar *realname)</td></tr>
<tr class="memdesc:a756475de8068d21a297d4c7a224642f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finds a document whose <code>real_path</code> field matches the given filename.  <a href="#a756475de8068d21a297d4c7a224642f4">More...</a><br /></td></tr>
<tr class="separator:a756475de8068d21a297d4c7a224642f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaaba5152c28e00092386367e05c15d7c"><td class="memItemLeft" align="right" valign="top">gchar *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="document_8h.html#aaaba5152c28e00092386367e05c15d7c">document_get_basename_for_display</a> (<a class="el" href="structGeanyDocument.html">GeanyDocument</a> *doc, gint length)</td></tr>
<tr class="memdesc:aaaba5152c28e00092386367e05c15d7c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the last part of the filename of the given <a class="el" href="structGeanyDocument.html" title="Structure for representing an open tab with all its properties. ">GeanyDocument</a>.  <a href="#aaaba5152c28e00092386367e05c15d7c">More...</a><br /></td></tr>
<tr class="separator:aaaba5152c28e00092386367e05c15d7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83c8d189dc3ff028c5abbad21675f586"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structGeanyDocument.html">GeanyDocument</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="document_8h.html#a83c8d189dc3ff028c5abbad21675f586">document_get_current</a> (void)</td></tr>
<tr class="memdesc:a83c8d189dc3ff028c5abbad21675f586"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finds the current document.  <a href="#a83c8d189dc3ff028c5abbad21675f586">More...</a><br /></td></tr>
<tr class="separator:a83c8d189dc3ff028c5abbad21675f586"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6fff6d13404cd9987a8fc208a1dcafc0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structGeanyDocument.html">GeanyDocument</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="document_8h.html#a6fff6d13404cd9987a8fc208a1dcafc0">document_get_from_page</a> (guint page_num)</td></tr>
<tr class="memdesc:a6fff6d13404cd9987a8fc208a1dcafc0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finds the document for the given notebook page <em>page_num</em>.  <a href="#a6fff6d13404cd9987a8fc208a1dcafc0">More...</a><br /></td></tr>
<tr class="separator:a6fff6d13404cd9987a8fc208a1dcafc0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c174127de485d2115145342c0f07184"><td class="memItemLeft" align="right" valign="top">gint&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="document_8h.html#a5c174127de485d2115145342c0f07184">document_get_notebook_page</a> (<a class="el" href="structGeanyDocument.html">GeanyDocument</a> *doc)</td></tr>
<tr class="memdesc:a5c174127de485d2115145342c0f07184"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the notebook page index for a document.  <a href="#a5c174127de485d2115145342c0f07184">More...</a><br /></td></tr>
<tr class="separator:a5c174127de485d2115145342c0f07184"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4af6d235647fc25c1c786794bc0008e9"><td class="memItemLeft" align="right" valign="top">const GdkColor *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="document_8h.html#a4af6d235647fc25c1c786794bc0008e9">document_get_status_color</a> (<a class="el" href="structGeanyDocument.html">GeanyDocument</a> *doc)</td></tr>
<tr class="memdesc:a4af6d235647fc25c1c786794bc0008e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the status color of the document, or <code>NULL</code> if default widget coloring should be used.  <a href="#a4af6d235647fc25c1c786794bc0008e9">More...</a><br /></td></tr>
<tr class="separator:a4af6d235647fc25c1c786794bc0008e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af2543112bf147c737894afa24c443a8d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structGeanyDocument.html">GeanyDocument</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="document_8h.html#af2543112bf147c737894afa24c443a8d">document_index</a> (gint idx)</td></tr>
<tr class="memdesc:af2543112bf147c737894afa24c443a8d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Accessor function for <a class="el" href="structGeanyData.html#a933a5623cf6d0938b6e3c7b9dad686de">GeanyData::documents_array</a> items.  <a href="#af2543112bf147c737894afa24c443a8d">More...</a><br /></td></tr>
<tr class="separator:af2543112bf147c737894afa24c443a8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a34603f638d45397cfbc307f2f177ed30"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structGeanyDocument.html">GeanyDocument</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="document_8h.html#a34603f638d45397cfbc307f2f177ed30">document_new_file</a> (const gchar *filename, <a class="el" href="structGeanyFiletype.html">GeanyFiletype</a> *ft, const gchar *text)</td></tr>
<tr class="memdesc:a34603f638d45397cfbc307f2f177ed30"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new document.  <a href="#a34603f638d45397cfbc307f2f177ed30">More...</a><br /></td></tr>
<tr class="separator:a34603f638d45397cfbc307f2f177ed30"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaae9e8e045dbed0ee86751071c4eaa50"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structGeanyDocument.html">GeanyDocument</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="document_8h.html#aaae9e8e045dbed0ee86751071c4eaa50">document_open_file</a> (const gchar *locale_filename, gboolean readonly, <a class="el" href="structGeanyFiletype.html">GeanyFiletype</a> *ft, const gchar *forced_enc)</td></tr>
<tr class="memdesc:aaae9e8e045dbed0ee86751071c4eaa50"><td class="mdescLeft">&#160;</td><td class="mdescRight">Opens a document specified by <em>locale_filename</em>.  <a href="#aaae9e8e045dbed0ee86751071c4eaa50">More...</a><br /></td></tr>
<tr class="separator:aaae9e8e045dbed0ee86751071c4eaa50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac2309ae4d4dc9e75ff6333355104d9ec"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="document_8h.html#ac2309ae4d4dc9e75ff6333355104d9ec">document_open_files</a> (const GSList *filenames, gboolean readonly, <a class="el" href="structGeanyFiletype.html">GeanyFiletype</a> *ft, const gchar *forced_enc)</td></tr>
<tr class="memdesc:ac2309ae4d4dc9e75ff6333355104d9ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Opens each file in the list <em>filenames</em>.  <a href="#ac2309ae4d4dc9e75ff6333355104d9ec">More...</a><br /></td></tr>
<tr class="separator:ac2309ae4d4dc9e75ff6333355104d9ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac4b5b3dca59da7b2d21223aaa794623"><td class="memItemLeft" align="right" valign="top">gboolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="document_8h.html#aac4b5b3dca59da7b2d21223aaa794623">document_reload_file</a> (<a class="el" href="structGeanyDocument.html">GeanyDocument</a> *doc, const gchar *forced_enc)</td></tr>
<tr class="memdesc:aac4b5b3dca59da7b2d21223aaa794623"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reloads the document with the specified file encoding <em>forced_enc</em> or <code>NULL</code> to auto-detect the file encoding.  <a href="#aac4b5b3dca59da7b2d21223aaa794623">More...</a><br /></td></tr>
<tr class="separator:aac4b5b3dca59da7b2d21223aaa794623"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae4825c051e0816c4d8888cbde103afae"><td class="memItemLeft" align="right" valign="top">gboolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="document_8h.html#ae4825c051e0816c4d8888cbde103afae">document_remove_page</a> (guint page_num)</td></tr>
<tr class="memdesc:ae4825c051e0816c4d8888cbde103afae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes the given notebook tab at <em>page_num</em> and clears all related information in the document list.  <a href="#ae4825c051e0816c4d8888cbde103afae">More...</a><br /></td></tr>
<tr class="separator:ae4825c051e0816c4d8888cbde103afae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7b93bc4d0551af19c8852df52f9c126c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="document_8h.html#a7b93bc4d0551af19c8852df52f9c126c">document_rename_file</a> (<a class="el" href="structGeanyDocument.html">GeanyDocument</a> *doc, const gchar *new_filename)</td></tr>
<tr class="memdesc:a7b93bc4d0551af19c8852df52f9c126c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Renames the file in <em>doc</em> to <em>new_filename</em>.  <a href="#a7b93bc4d0551af19c8852df52f9c126c">More...</a><br /></td></tr>
<tr class="separator:a7b93bc4d0551af19c8852df52f9c126c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a75eff0d047f18f85a17b88ae35ef3fc0"><td class="memItemLeft" align="right" valign="top">gboolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="document_8h.html#a75eff0d047f18f85a17b88ae35ef3fc0">document_save_file</a> (<a class="el" href="structGeanyDocument.html">GeanyDocument</a> *doc, gboolean force)</td></tr>
<tr class="memdesc:a75eff0d047f18f85a17b88ae35ef3fc0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Saves the document.  <a href="#a75eff0d047f18f85a17b88ae35ef3fc0">More...</a><br /></td></tr>
<tr class="separator:a75eff0d047f18f85a17b88ae35ef3fc0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a478d3737066bc456c0eae6d9ef658c2f"><td class="memItemLeft" align="right" valign="top">gboolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="document_8h.html#a478d3737066bc456c0eae6d9ef658c2f">document_save_file_as</a> (<a class="el" href="structGeanyDocument.html">GeanyDocument</a> *doc, const gchar *utf8_fname)</td></tr>
<tr class="memdesc:a478d3737066bc456c0eae6d9ef658c2f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Saves the document, detecting the filetype.  <a href="#a478d3737066bc456c0eae6d9ef658c2f">More...</a><br /></td></tr>
<tr class="separator:a478d3737066bc456c0eae6d9ef658c2f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3aea9e2f1c8205618e105dabb2c021dd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="document_8h.html#a3aea9e2f1c8205618e105dabb2c021dd">document_set_encoding</a> (<a class="el" href="structGeanyDocument.html">GeanyDocument</a> *doc, const gchar *new_encoding)</td></tr>
<tr class="memdesc:a3aea9e2f1c8205618e105dabb2c021dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the encoding of a document.  <a href="#a3aea9e2f1c8205618e105dabb2c021dd">More...</a><br /></td></tr>
<tr class="separator:a3aea9e2f1c8205618e105dabb2c021dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a2f2bfa1c9fe7d9472466e895c251f6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="document_8h.html#a7a2f2bfa1c9fe7d9472466e895c251f6">document_set_filetype</a> (<a class="el" href="structGeanyDocument.html">GeanyDocument</a> *doc, <a class="el" href="structGeanyFiletype.html">GeanyFiletype</a> *type)</td></tr>
<tr class="memdesc:a7a2f2bfa1c9fe7d9472466e895c251f6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the filetype of the document (which controls syntax highlighting and tags)  <a href="#a7a2f2bfa1c9fe7d9472466e895c251f6">More...</a><br /></td></tr>
<tr class="separator:a7a2f2bfa1c9fe7d9472466e895c251f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af136255884df800e789875028507e0ba"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="document_8h.html#af136255884df800e789875028507e0ba">document_set_text_changed</a> (<a class="el" href="structGeanyDocument.html">GeanyDocument</a> *doc, gboolean changed)</td></tr>
<tr class="memdesc:af136255884df800e789875028507e0ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates the tab labels, the status bar, the window title and some save-sensitive buttons according to the document's save state.  <a href="#af136255884df800e789875028507e0ba">More...</a><br /></td></tr>
<tr class="separator:af136255884df800e789875028507e0ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:ad1bf4d7a9d5bd299793ef7a9164891ad"><td class="memItemLeft" align="right" valign="top">GPtrArray *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="document_8h.html#ad1bf4d7a9d5bd299793ef7a9164891ad">documents_array</a></td></tr>
<tr class="memdesc:ad1bf4d7a9d5bd299793ef7a9164891ad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Dynamic array of <a class="el" href="structGeanyDocument.html" title="Structure for representing an open tab with all its properties. ">GeanyDocument</a> pointers holding information about the notebook tabs.  <a href="#ad1bf4d7a9d5bd299793ef7a9164891ad">More...</a><br /></td></tr>
<tr class="separator:ad1bf4d7a9d5bd299793ef7a9164891ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Document related actions: new, save, open, etc. </p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="a304fac5fd2ae01d52c0a46a68abbd7dc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DOC_FILENAME</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">doc</td><td>)</td>
          <td>&#160;&#160;&#160;(G_LIKELY((doc)-&gt;file_name != NULL) ? ((doc)-&gt;file_name) : GEANY_STRING_UNTITLED)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the filename of the document passed or <code>GEANY_STRING_UNTITLED</code> (e.g. </p>
<p>_("untitled")) if the document's filename was not yet set. This macro never returns <code>NULL</code>. </p>

</div>
</div>
<a class="anchor" id="a064c8f47ec543aa26cb8fd2a895a4ce6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DOC_VALID</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">doc_ptr</td><td>)</td>
          <td>&#160;&#160;&#160;((doc_ptr) != NULL &amp;&amp; (doc_ptr)-&gt;is_valid)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>NULL-safe</code> way to check <code>doc_ptr-&gt;is_valid</code>. </p>
<p>This is useful when <em>doc_ptr</em> was stored some time earlier and documents may have been closed since then. </p><dl class="section note"><dt>Note</dt><dd>This should not be used to check the result of the main API functions, these only need a NULL-pointer check - <code><a class="el" href="document_8h.html#a83c8d189dc3ff028c5abbad21675f586" title="Finds the current document. ">document_get_current()</a></code> != <code>NULL</code>. </dd></dl>

</div>
</div>
<a class="anchor" id="a76895fd487f4593d1d41e2ee127957d6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define documents&#160;&#160;&#160;((<a class="el" href="structGeanyDocument.html">GeanyDocument</a> **)GEANY(<a class="el" href="document_8h.html#ad1bf4d7a9d5bd299793ef7a9164891ad">documents_array</a>)-&gt;pdata)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Wraps documents_array so it can be used with C array syntax. </p>
<p>Example: documents[0]-&gt;sci = NULL; </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="document_8h.html#af2543112bf147c737894afa24c443a8d" title="Accessor function for GeanyData::documents_array items. ">document_index()</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="a50d86dfb5a12511f786f4f54f370f700"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define documents_foreach</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">i</td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="document_8h.html#aa6a3efff88c48b5d33acb60e3597a277">foreach_document</a>(i)</td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000001">Deprecated:</a></b></dt><dd>Use <a class="el" href="document_8h.html#aa6a3efff88c48b5d33acb60e3597a277">foreach_document()</a> instead.</dd></dl>
<p>Iterates all valid documents. Use like a <code>for</code> statement. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">i</td><td><code>guint</code> index for <a class="el" href="document_8h.html#af2543112bf147c737894afa24c443a8d" title="Accessor function for GeanyData::documents_array items. ">document_index()</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aa6a3efff88c48b5d33acb60e3597a277"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define foreach_document</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">i</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line"><span class="keywordflow">for</span> (i = 0; i &lt; GEANY(<a class="code" href="document_8h.html#ad1bf4d7a9d5bd299793ef7a9164891ad">documents_array</a>)-&gt;len; i++)\</div>
<div class="line">        <span class="keywordflow">if</span> (!<a class="code" href="document_8h.html#a76895fd487f4593d1d41e2ee127957d6">documents</a>[i]-&gt;is_valid)\</div>
<div class="line">            {}\</div>
<div class="line">        else <span class="comment">/* prevent outside &#39;else&#39; matching our macro &#39;if&#39; */</span></div>
<div class="ttc" id="document_8h_html_a76895fd487f4593d1d41e2ee127957d6"><div class="ttname"><a href="document_8h.html#a76895fd487f4593d1d41e2ee127957d6">documents</a></div><div class="ttdeci">#define documents</div><div class="ttdoc">Wraps documents_array so it can be used with C array syntax. </div><div class="ttdef"><b>Definition:</b> document.h:124</div></div>
<div class="ttc" id="document_8h_html_ad1bf4d7a9d5bd299793ef7a9164891ad"><div class="ttname"><a href="document_8h.html#ad1bf4d7a9d5bd299793ef7a9164891ad">documents_array</a></div><div class="ttdeci">GPtrArray * documents_array</div><div class="ttdoc">Dynamic array of GeanyDocument pointers holding information about the notebook tabs. </div><div class="ttdef"><b>Definition:</b> document.c:92</div></div>
</div><!-- fragment -->
<p>Iterates all valid documents. </p>
<p>Use like a <code>for</code> statement. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">i</td><td><code>guint</code> index for <a class="el" href="document_8h.html#af2543112bf147c737894afa24c443a8d" title="Accessor function for GeanyData::documents_array items. ">document_index()</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="add6e4c13cb515302cb830f25aea98252"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="structGeanyFilePrefs.html">GeanyFilePrefs</a>
 <a class="el" href="structGeanyFilePrefs.html">GeanyFilePrefs</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>File Prefs. </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ae800a827340d58b2fd8f63680043f124"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gboolean document_close </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structGeanyDocument.html">GeanyDocument</a> *&#160;</td>
          <td class="paramname"><em>doc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Closes the given document. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">doc</td><td>The document to remove.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>TRUE</code> if the document was actually removed or <code>FALSE</code> otherwise.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>0.15 </dd></dl>

</div>
</div>
<a class="anchor" id="a7df1ea2bebdd0e813242f8eec51b9ca0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gint document_compare_by_display_name </td>
          <td>(</td>
          <td class="paramtype">gconstpointer&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gconstpointer&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Compares documents by their display names. </p>
<p>This matches <code>GCompareFunc</code> for use with e.g. <code>g_ptr_array_sort()</code>. </p><dl class="section note"><dt>Note</dt><dd>'Display name' means the base name of the document's filename.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td><code>GeanyDocument**</code>. </td></tr>
    <tr><td class="paramname">b</td><td><code>GeanyDocument**</code>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section warning"><dt>Warning</dt><dd>The arguments take the address of each document pointer. </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>Negative value if a &lt; b; zero if a = b; positive value if a &gt; b.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>0.21 </dd></dl>

</div>
</div>
<a class="anchor" id="aa0fcd821952b2fc243d3dbbec88f6b85"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gint document_compare_by_tab_order </td>
          <td>(</td>
          <td class="paramtype">gconstpointer&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gconstpointer&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Compares documents by their tab order. </p>
<p>This matches <code>GCompareFunc</code> for use with e.g. <code>g_ptr_array_sort()</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td><code>GeanyDocument**</code>. </td></tr>
    <tr><td class="paramname">b</td><td><code>GeanyDocument**</code>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section warning"><dt>Warning</dt><dd>The arguments take the address of each document pointer. </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>Negative value if a &lt; b; zero if a = b; positive value if a &gt; b.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>0.21 (GEANY_API_VERSION 209) </dd></dl>

</div>
</div>
<a class="anchor" id="aeac629563ab17f3f58021371520bd420"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gint document_compare_by_tab_order_reverse </td>
          <td>(</td>
          <td class="paramtype">gconstpointer&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gconstpointer&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Compares documents by their tab order, in reverse order. </p>
<p>This matches <code>GCompareFunc</code> for use with e.g. <code>g_ptr_array_sort()</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td><code>GeanyDocument**</code>. </td></tr>
    <tr><td class="paramname">b</td><td><code>GeanyDocument**</code>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section warning"><dt>Warning</dt><dd>The arguments take the address of each document pointer. </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>Negative value if a &lt; b; zero if a = b; positive value if a &gt; b.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>0.21 (GEANY_API_VERSION 209) </dd></dl>

</div>
</div>
<a class="anchor" id="a9281ebd6601e78e8fa3c365c636e5329"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structGeanyDocument.html">GeanyDocument</a>* document_find_by_filename </td>
          <td>(</td>
          <td class="paramtype">const gchar *&#160;</td>
          <td class="paramname"><em>utf8_filename</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Finds a document with the given filename. </p>
<p>This matches either an exact <a class="el" href="structGeanyDocument.html#a03560e88ad8427b40077cddbc5afbd43" title="The UTF-8 encoded file name. ">GeanyDocument::file_name</a> string, or variant filenames with relative elements in the path (e.g. <code>"/dir/..//name"</code> will match <code>"/name"</code>).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">utf8_filename</td><td>The filename to search (in UTF-8 encoding).</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The matching document, or <code>NULL</code>. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="document_8h.html#a756475de8068d21a297d4c7a224642f4" title="Finds a document whose real_path field matches the given filename. ">document_find_by_real_path()</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="a756475de8068d21a297d4c7a224642f4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structGeanyDocument.html">GeanyDocument</a>* document_find_by_real_path </td>
          <td>(</td>
          <td class="paramtype">const gchar *&#160;</td>
          <td class="paramname"><em>realname</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Finds a document whose <code>real_path</code> field matches the given filename. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">realname</td><td>The filename to search, which should be identical to the string returned by <code><a class="el" href="tm__work__object_8h.html#a3100e21475dedda4837a582e57404b11">tm_get_real_path()</a></code>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The matching document, or <code>NULL</code>. </dd></dl>
<dl class="section note"><dt>Note</dt><dd>This is only really useful when passing a <code><a class="el" href="structTMWorkObject.html#ac834bf085f7eb3147ee7a3178d6ea23d">TMWorkObject::file_name</a></code>. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="structGeanyDocument.html#a66cf9c7c1bcea5278af56719aac29865" title="The link-dereferenced, locale-encoded file name. ">GeanyDocument::real_path</a>. </dd>
<dd>
<a class="el" href="document_8h.html#a9281ebd6601e78e8fa3c365c636e5329" title="Finds a document with the given filename. ">document_find_by_filename()</a>.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>0.15 </dd></dl>

</div>
</div>
<a class="anchor" id="aaaba5152c28e00092386367e05c15d7c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gchar* document_get_basename_for_display </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structGeanyDocument.html">GeanyDocument</a> *&#160;</td>
          <td class="paramname"><em>doc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gint&#160;</td>
          <td class="paramname"><em>length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the last part of the filename of the given <a class="el" href="structGeanyDocument.html" title="Structure for representing an open tab with all its properties. ">GeanyDocument</a>. </p>
<p>The result is also truncated to a maximum of <em>length</em> characters in case the filename is very long.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">doc</td><td>The document to use. </td></tr>
    <tr><td class="paramname">length</td><td>The length of the resulting string or -1 to use a default value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The ellipsized last part of the filename of <em>doc</em>, should be freed when no longer needed.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>0.17 </dd></dl>

</div>
</div>
<a class="anchor" id="a83c8d189dc3ff028c5abbad21675f586"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structGeanyDocument.html">GeanyDocument</a>* document_get_current </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Finds the current document. </p>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the current document or <code>NULL</code> if there are no opened documents. </dd></dl>

</div>
</div>
<a class="anchor" id="a6fff6d13404cd9987a8fc208a1dcafc0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structGeanyDocument.html">GeanyDocument</a>* document_get_from_page </td>
          <td>(</td>
          <td class="paramtype">guint&#160;</td>
          <td class="paramname"><em>page_num</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Finds the document for the given notebook page <em>page_num</em>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">page_num</td><td>The notebook page number to search.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The corresponding document for the given notebook page, or <code>NULL</code>. </dd></dl>

</div>
</div>
<a class="anchor" id="a5c174127de485d2115145342c0f07184"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gint document_get_notebook_page </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structGeanyDocument.html">GeanyDocument</a> *&#160;</td>
          <td class="paramname"><em>doc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the notebook page index for a document. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">doc</td><td>The document. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The index. </dd></dl>
<dl class="section since"><dt>Since</dt><dd>0.19 </dd></dl>

</div>
</div>
<a class="anchor" id="a4af6d235647fc25c1c786794bc0008e9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const GdkColor* document_get_status_color </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structGeanyDocument.html">GeanyDocument</a> *&#160;</td>
          <td class="paramname"><em>doc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the status color of the document, or <code>NULL</code> if default widget coloring should be used. </p>
<p>Returned colors are red if the document has changes, green if the document is read-only or simply <code>NULL</code> if the document is unmodified but writable.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">doc</td><td>The document to use.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The color for the document or <code>NULL</code> if the default color should be used. The color object is owned by Geany and should not be modified or freed.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>0.16 </dd></dl>

</div>
</div>
<a class="anchor" id="af2543112bf147c737894afa24c443a8d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structGeanyDocument.html">GeanyDocument</a>* document_index </td>
          <td>(</td>
          <td class="paramtype">gint&#160;</td>
          <td class="paramname"><em>idx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Accessor function for <a class="el" href="structGeanyData.html#a933a5623cf6d0938b6e3c7b9dad686de">GeanyData::documents_array</a> items. </p>
<dl class="section warning"><dt>Warning</dt><dd>Always check the returned document is valid (<code>doc-&gt;is_valid</code>). </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">idx</td><td><code>documents_array</code> index. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The document, or <code>NULL</code> if <em>idx</em> is out of range.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>0.16 </dd></dl>

</div>
</div>
<a class="anchor" id="a34603f638d45397cfbc307f2f177ed30"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structGeanyDocument.html">GeanyDocument</a>* document_new_file </td>
          <td>(</td>
          <td class="paramtype">const gchar *&#160;</td>
          <td class="paramname"><em>utf8_filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structGeanyFiletype.html">GeanyFiletype</a> *&#160;</td>
          <td class="paramname"><em>ft</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const gchar *&#160;</td>
          <td class="paramname"><em>text</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a new document. </p>
<p>Line endings in <em>text</em> will be converted to the default setting. Afterwards, the <code>"document-new"</code> signal is emitted for plugins.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">utf8_filename</td><td>The file name in UTF-8 encoding, or <code>NULL</code> to open a file as "untitled". </td></tr>
    <tr><td class="paramname">ft</td><td>The filetype to set or <code>NULL</code> to detect it from <em>filename</em> if not <code>NULL</code>. </td></tr>
    <tr><td class="paramname">text</td><td>The initial content of the file (in UTF-8 encoding), or <code>NULL</code>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The new document. </dd></dl>

</div>
</div>
<a class="anchor" id="aaae9e8e045dbed0ee86751071c4eaa50"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structGeanyDocument.html">GeanyDocument</a>* document_open_file </td>
          <td>(</td>
          <td class="paramtype">const gchar *&#160;</td>
          <td class="paramname"><em>locale_filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gboolean&#160;</td>
          <td class="paramname"><em>readonly</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structGeanyFiletype.html">GeanyFiletype</a> *&#160;</td>
          <td class="paramname"><em>ft</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const gchar *&#160;</td>
          <td class="paramname"><em>forced_enc</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Opens a document specified by <em>locale_filename</em>. </p>
<p>Afterwards, the <code>"document-open"</code> signal is emitted for plugins.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">locale_filename</td><td>The filename of the document to load, in locale encoding. </td></tr>
    <tr><td class="paramname">readonly</td><td>Whether to open the document in read-only mode. </td></tr>
    <tr><td class="paramname">ft</td><td>The filetype for the document or <code>NULL</code> to auto-detect the filetype. </td></tr>
    <tr><td class="paramname">forced_enc</td><td>The file encoding to use or <code>NULL</code> to auto-detect the file encoding.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The document opened or <code>NULL</code>. </dd></dl>

</div>
</div>
<a class="anchor" id="ac2309ae4d4dc9e75ff6333355104d9ec"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void document_open_files </td>
          <td>(</td>
          <td class="paramtype">const GSList *&#160;</td>
          <td class="paramname"><em>filenames</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gboolean&#160;</td>
          <td class="paramname"><em>readonly</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structGeanyFiletype.html">GeanyFiletype</a> *&#160;</td>
          <td class="paramname"><em>ft</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const gchar *&#160;</td>
          <td class="paramname"><em>forced_enc</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Opens each file in the list <em>filenames</em>. </p>
<p>Internally, <a class="el" href="document_8h.html#aaae9e8e045dbed0ee86751071c4eaa50" title="Opens a document specified by locale_filename. ">document_open_file()</a> is called for every list item.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filenames</td><td>A list of filenames to load, in locale encoding. </td></tr>
    <tr><td class="paramname">readonly</td><td>Whether to open the document in read-only mode. </td></tr>
    <tr><td class="paramname">ft</td><td>The filetype for the document or <code>NULL</code> to auto-detect the filetype. </td></tr>
    <tr><td class="paramname">forced_enc</td><td>The file encoding to use or <code>NULL</code> to auto-detect the file encoding. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aac4b5b3dca59da7b2d21223aaa794623"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gboolean document_reload_file </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structGeanyDocument.html">GeanyDocument</a> *&#160;</td>
          <td class="paramname"><em>doc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const gchar *&#160;</td>
          <td class="paramname"><em>forced_enc</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reloads the document with the specified file encoding <em>forced_enc</em> or <code>NULL</code> to auto-detect the file encoding. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">doc</td><td>The document to reload. </td></tr>
    <tr><td class="paramname">forced_enc</td><td>The file encoding to use or <code>NULL</code> to auto-detect the file encoding.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>TRUE</code> if the document was actually reloaded or <code>FALSE</code> otherwise. </dd></dl>

</div>
</div>
<a class="anchor" id="ae4825c051e0816c4d8888cbde103afae"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gboolean document_remove_page </td>
          <td>(</td>
          <td class="paramtype">guint&#160;</td>
          <td class="paramname"><em>page_num</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Removes the given notebook tab at <em>page_num</em> and clears all related information in the document list. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">page_num</td><td>The notebook page number to remove.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>TRUE</code> if the document was actually removed or <code>FALSE</code> otherwise. </dd></dl>

</div>
</div>
<a class="anchor" id="a7b93bc4d0551af19c8852df52f9c126c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void document_rename_file </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structGeanyDocument.html">GeanyDocument</a> *&#160;</td>
          <td class="paramname"><em>doc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const gchar *&#160;</td>
          <td class="paramname"><em>new_filename</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Renames the file in <em>doc</em> to <em>new_filename</em>. </p>
<p>Only the file on disk is actually renamed, you still have to call <a class="el" href="document_8h.html#a478d3737066bc456c0eae6d9ef658c2f">document_save_file_as()</a> to change the <em>doc</em> object. It also stops monitoring for file changes to prevent receiving too many file change events while renaming. File monitoring is setup again in <a class="el" href="document_8h.html#a478d3737066bc456c0eae6d9ef658c2f">document_save_file_as()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">doc</td><td>The current document which should be renamed. </td></tr>
    <tr><td class="paramname">new_filename</td><td>The new filename in UTF-8 encoding.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>0.16 </dd></dl>

</div>
</div>
<a class="anchor" id="a75eff0d047f18f85a17b88ae35ef3fc0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gboolean document_save_file </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structGeanyDocument.html">GeanyDocument</a> *&#160;</td>
          <td class="paramname"><em>doc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gboolean&#160;</td>
          <td class="paramname"><em>force</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Saves the document. </p>
<p>Also shows the Save As dialog if necessary. If the file is not modified, this function may do nothing unless <em>force</em> is set to <code>TRUE</code>.</p>
<p>Saving may include replacing tabs by spaces, stripping trailing spaces and adding a final new line at the end of the file, depending on user preferences. Then the <code>"document-before-save"</code> signal is emitted, allowing plugins to modify the document before it is saved, and data is actually written to disk.</p>
<p>On successful saving:</p><ul>
<li><a class="el" href="structGeanyDocument.html#a66cf9c7c1bcea5278af56719aac29865" title="The link-dereferenced, locale-encoded file name. ">GeanyDocument::real_path</a> is set.</li>
<li>The filetype is set again or auto-detected if it wasn't set yet.</li>
<li>The <code>"document-save"</code> signal is emitted for plugins.</li>
</ul>
<dl class="section warning"><dt>Warning</dt><dd>You should ensure <code>doc-&gt;file_name</code> has an absolute path unless you want the Save As dialog to be shown. A <code>NULL</code> value also shows the dialog. This behaviour was added in Geany 1.22.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">doc</td><td>The document to save. </td></tr>
    <tr><td class="paramname">force</td><td>Whether to save the file even if it is not modified.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>TRUE</code> if the file was saved or <code>FALSE</code> if the file could not or should not be saved. </dd></dl>

</div>
</div>
<a class="anchor" id="a478d3737066bc456c0eae6d9ef658c2f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gboolean document_save_file_as </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structGeanyDocument.html">GeanyDocument</a> *&#160;</td>
          <td class="paramname"><em>doc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const gchar *&#160;</td>
          <td class="paramname"><em>utf8_fname</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Saves the document, detecting the filetype. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">doc</td><td>The document for the file to save. </td></tr>
    <tr><td class="paramname">utf8_fname</td><td>The new name for the document, in UTF-8, or NULL. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>TRUE</code> if the file was saved or <code>FALSE</code> if the file could not be saved.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="document_8h.html#a75eff0d047f18f85a17b88ae35ef3fc0" title="Saves the document. ">document_save_file()</a>.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>0.16 </dd></dl>

</div>
</div>
<a class="anchor" id="a3aea9e2f1c8205618e105dabb2c021dd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void document_set_encoding </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structGeanyDocument.html">GeanyDocument</a> *&#160;</td>
          <td class="paramname"><em>doc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const gchar *&#160;</td>
          <td class="paramname"><em>new_encoding</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the encoding of a document. </p>
<p>This function only set the encoding of the document, it does not any conversions. The new encoding is used when e.g. saving the file.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">doc</td><td>The document to use. </td></tr>
    <tr><td class="paramname">new_encoding</td><td>The encoding to be set for the document. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a7a2f2bfa1c9fe7d9472466e895c251f6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void document_set_filetype </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structGeanyDocument.html">GeanyDocument</a> *&#160;</td>
          <td class="paramname"><em>doc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structGeanyFiletype.html">GeanyFiletype</a> *&#160;</td>
          <td class="paramname"><em>type</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the filetype of the document (which controls syntax highlighting and tags) </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">doc</td><td>The document to use. </td></tr>
    <tr><td class="paramname">type</td><td>The filetype. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="af136255884df800e789875028507e0ba"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void document_set_text_changed </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structGeanyDocument.html">GeanyDocument</a> *&#160;</td>
          <td class="paramname"><em>doc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gboolean&#160;</td>
          <td class="paramname"><em>changed</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Updates the tab labels, the status bar, the window title and some save-sensitive buttons according to the document's save state. </p>
<p>This is called by Geany mostly when opening or saving files.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">doc</td><td>The document to use. </td></tr>
    <tr><td class="paramname">changed</td><td>Whether the document state should indicate changes have been made. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a class="anchor" id="ad1bf4d7a9d5bd299793ef7a9164891ad"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GPtrArray* documents_array</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Dynamic array of <a class="el" href="structGeanyDocument.html" title="Structure for representing an open tab with all its properties. ">GeanyDocument</a> pointers holding information about the notebook tabs. </p>
<p>Once a pointer is added to this, it is never freed. This means you can keep a pointer to a document over time, but it might no longer represent a notebook tab. To check this, check <code>doc_ptr-&gt;is_valid</code>. Of course, the pointer may represent a different file by then.</p>
<p>You also need to check <code><a class="el" href="structGeanyDocument.html#a958fbaae66bfdf06d6be18f6a74a6e99" title="General flag to represent this document is active and all properties are set correctly. ">GeanyDocument::is_valid</a></code> when iterating over this array, although usually you would just use the <a class="el" href="document_8h.html#aa6a3efff88c48b5d33acb60e3597a277" title="Iterates all valid documents. ">foreach_document()</a> macro.</p>
<p>Never assume that the order of document pointers is the same as the order of notebook tabs. Notebook tabs can be reordered. Use <code><a class="el" href="document_8h.html#a6fff6d13404cd9987a8fc208a1dcafc0" title="Finds the document for the given notebook page page_num. ">document_get_from_page()</a></code>. </p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Oct 17 2014 05:13:17 for Geany by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.8
</small></address>
</body>
</html>