Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-updates > by-pkgid > bf9e3bc1aec7873c087fb2ccd927873f > files > 40

sdl2-docs-2.0.10-1.mga7.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>My Project: SDL_filesystem.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="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.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 id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">My Project
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">SDL_filesystem.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Include file for filesystem SDL API functions.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="SDL__stdinc_8h_source.html">SDL_stdinc.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="begin__code_8h_source.html">begin_code.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="close__code_8h_source.html">close_code.h</a>&quot;</code><br />
</div>
<p><a href="SDL__filesystem_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a752d42a2e7fbff1292b7e54593be37bc"><td class="memItemLeft" align="right" valign="top">DECLSPEC char *SDLCALL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SDL__filesystem_8h.html#a752d42a2e7fbff1292b7e54593be37bc">SDL_GetBasePath</a> (void)</td></tr>
<tr class="memdesc:a752d42a2e7fbff1292b7e54593be37bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the path where the application resides.  <a href="#a752d42a2e7fbff1292b7e54593be37bc">More...</a><br /></td></tr>
<tr class="separator:a752d42a2e7fbff1292b7e54593be37bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab11eaf74d913eefb472475f0c8e312ce"><td class="memItemLeft" align="right" valign="top">DECLSPEC char *SDLCALL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SDL__filesystem_8h.html#ab11eaf74d913eefb472475f0c8e312ce">SDL_GetPrefPath</a> (const char *org, const char *app)</td></tr>
<tr class="memdesc:ab11eaf74d913eefb472475f0c8e312ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the user-and-app-specific path where files can be written.  <a href="#ab11eaf74d913eefb472475f0c8e312ce">More...</a><br /></td></tr>
<tr class="separator:ab11eaf74d913eefb472475f0c8e312ce"><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>Include file for filesystem SDL API functions. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a752d42a2e7fbff1292b7e54593be37bc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a752d42a2e7fbff1292b7e54593be37bc">&#9670;&nbsp;</a></span>SDL_GetBasePath()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DECLSPEC char* SDLCALL SDL_GetBasePath </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the path where the application resides. </p>
<p>Get the "base path". This is the directory where the application was run from, which is probably the installation directory, and may or may not be the process's current working directory.</p>
<p>This returns an absolute path in UTF-8 encoding, and is guaranteed to end with a path separator ('\' on Windows, '/' most other places).</p>
<p>The pointer returned by this function is owned by you. Please call SDL_free() on the pointer when you are done with it, or it will be a memory leak. This is not necessarily a fast call, though, so you should call this once near startup and save the string if you need it.</p>
<p>Some platforms can't determine the application's path, and on other platforms, this might be meaningless. In such cases, this function will return NULL.</p>
<dl class="section return"><dt>Returns</dt><dd>String of base dir in UTF-8 encoding, or NULL on error.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="SDL__filesystem_8h.html#ab11eaf74d913eefb472475f0c8e312ce" title="Get the user-and-app-specific path where files can be written.">SDL_GetPrefPath</a> </dd></dl>

</div>
</div>
<a id="ab11eaf74d913eefb472475f0c8e312ce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab11eaf74d913eefb472475f0c8e312ce">&#9670;&nbsp;</a></span>SDL_GetPrefPath()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DECLSPEC char* SDLCALL SDL_GetPrefPath </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>org</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>app</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the user-and-app-specific path where files can be written. </p>
<p>Get the "pref dir". This is meant to be where users can write personal files (preferences and save games, etc) that are specific to your application. This directory is unique per user, per application.</p>
<p>This function will decide the appropriate location in the native filesystem, create the directory if necessary, and return a string of the absolute path to the directory in UTF-8 encoding.</p>
<p>On Windows, the string might look like: "C:\\Users\\bob\\AppData\\Roaming\\My Company\\My Program Name\\"</p>
<p>On Linux, the string might look like: "/home/bob/.local/share/My Program Name/"</p>
<p>On Mac OS X, the string might look like: "/Users/bob/Library/Application Support/My Program Name/"</p>
<p>(etc.)</p>
<p>You specify the name of your organization (if it's not a real organization, your name or an Internet domain you own might do) and the name of your application. These should be untranslated proper names.</p>
<p>Both the org and app strings may become part of a directory name, so please follow these rules:</p>
<ul>
<li>Try to use the same org string (including case-sensitivity) for all your applications that use this function.</li>
<li>Always use a unique app string for each one, and make sure it never changes for an app once you've decided on it.</li>
<li>Unicode characters are legal, as long as it's UTF-8 encoded, but...</li>
<li>...only use letters, numbers, and spaces. Avoid punctuation like "Game Name 2: Bad Guy's Revenge!" ... "Game Name 2" is sufficient.</li>
</ul>
<p>This returns an absolute path in UTF-8 encoding, and is guaranteed to end with a path separator ('\' on Windows, '/' most other places).</p>
<p>The pointer returned by this function is owned by you. Please call SDL_free() on the pointer when you are done with it, or it will be a memory leak. This is not necessarily a fast call, though, so you should call this once near startup and save the string if you need it.</p>
<p>You should assume the path returned by this function is the only safe place to write files (and that <a class="el" href="SDL__filesystem_8h.html#a752d42a2e7fbff1292b7e54593be37bc" title="Get the path where the application resides.">SDL_GetBasePath()</a>, while it might be writable, or even the parent of the returned path, aren't where you should be writing things).</p>
<p>Some platforms can't determine the pref path, and on other platforms, this might be meaningless. In such cases, this function will return NULL.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">org</td><td>The name of your organization. </td></tr>
    <tr><td class="paramname">app</td><td>The name of your application. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>UTF-8 string of user dir in platform-dependent notation. NULL if there's a problem (creating directory failed, etc).</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="SDL__filesystem_8h.html#a752d42a2e7fbff1292b7e54593be37bc" title="Get the path where the application resides.">SDL_GetBasePath</a> </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>