Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > c67c6057ffd14254a26624517a2352e6 > files > 76

i3-doc-3.e-3.bf1.fc14.noarch.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"/>
<title>i3: include/config.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.2-20100208 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<h1>include/config.h</h1><a href="a00034.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * vim:ts=8:expandtab</span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> * i3 - an improved dynamic tiling window manager</span>
<a name="l00005"></a>00005 <span class="comment"> *</span>
<a name="l00006"></a>00006 <span class="comment"> * © 2009-2010 Michael Stapelberg and contributors</span>
<a name="l00007"></a>00007 <span class="comment"> *</span>
<a name="l00008"></a>00008 <span class="comment"> * See file LICENSE for license information.</span>
<a name="l00009"></a>00009 <span class="comment"> *</span>
<a name="l00010"></a>00010 <span class="comment"> * include/config.h: Contains all structs/variables for the configurable</span>
<a name="l00011"></a>00011 <span class="comment"> * part of i3 as well as functions handling the configuration file (calling</span>
<a name="l00012"></a>00012 <span class="comment"> * the parser (src/cfgparse.y) with the correct path, switching key bindings</span>
<a name="l00013"></a>00013 <span class="comment"> * mode).</span>
<a name="l00014"></a>00014 <span class="comment"> *</span>
<a name="l00015"></a>00015 <span class="comment"> */</span>
<a name="l00016"></a>00016 
<a name="l00017"></a>00017 <span class="preprocessor">#ifndef _CONFIG_H</span>
<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define _CONFIG_H</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span>
<a name="l00020"></a>00020 <span class="preprocessor">#include &lt;stdbool.h&gt;</span>
<a name="l00021"></a>00021 <span class="preprocessor">#include &quot;<a class="code" href="a00047.html">queue.h</a>&quot;</span>
<a name="l00022"></a>00022 <span class="preprocessor">#include &quot;<a class="code" href="a00041.html">i3.h</a>&quot;</span>
<a name="l00023"></a>00023 
<a name="l00024"></a><a class="code" href="a00034.html#a807870f26ce33c7133d3f460c0197dd9">00024</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00010.html" title="Holds part of the configuration (the part which is not already in dedicated structures...">Config</a> <a class="code" href="a00010.html" title="Holds part of the configuration (the part which is not already in dedicated structures...">Config</a>;
<a name="l00025"></a>00025 <span class="keyword">extern</span> <a class="code" href="a00010.html" title="Holds part of the configuration (the part which is not already in dedicated structures...">Config</a> <a class="code" href="a00062.html#a4a8dd3a2de125b72d4fe6251a0a271b5">config</a>;
<a name="l00026"></a>00026 <span class="keyword">extern</span> <a class="code" href="a00047.html#a8224e40ea764bc857bab6f6d9c357dd9">SLIST_HEAD</a>(modes_head, <a class="code" href="a00019.html" title="The configuration file can contain multiple sets of bindings.">Mode</a>) <a class="code" href="a00062.html#a8a9fd888b55140d95a6f0c79a154b02c">modes</a>;
<a name="l00027"></a>00027 
<a name="l00033"></a><a class="code" href="a00014.html">00033</a> struct <a class="code" href="a00014.html" title="Used during the config file lexing/parsing to keep the state of the lexer in order...">context</a> {
<a name="l00034"></a><a class="code" href="a00014.html#a35df08a685492a330208aa04e9deaa80">00034</a>         <span class="keywordtype">int</span> line_number;
<a name="l00035"></a><a class="code" href="a00014.html#a1730ae687d6ed35277ce3562c7f7a347">00035</a>         <span class="keywordtype">char</span> *line_copy;
<a name="l00036"></a><a class="code" href="a00014.html#a7182ecd66395c873a28389232a79ed61">00036</a>         <span class="keyword">const</span> <span class="keywordtype">char</span> *filename;
<a name="l00037"></a>00037 
<a name="l00038"></a>00038         <span class="comment">/* These are the same as in YYLTYPE */</span>
<a name="l00039"></a><a class="code" href="a00014.html#a48fb4b9fb66b5fa71d2a33ddeaecae2e">00039</a>         <span class="keywordtype">int</span> first_column;
<a name="l00040"></a><a class="code" href="a00014.html#a3360e4269f673b513a3ce381e9b9fc8e">00040</a>         <span class="keywordtype">int</span> last_column;
<a name="l00041"></a>00041 };
<a name="l00042"></a>00042 
<a name="l00048"></a><a class="code" href="a00009.html">00048</a> <span class="keyword">struct </span><a class="code" href="a00009.html" title="Part of the struct Config.">Colortriple</a> {
<a name="l00049"></a><a class="code" href="a00009.html#abc8ad1d75ff1d44e27aeb6c2eb7713a0">00049</a>         uint32_t <a class="code" href="a00009.html#abc8ad1d75ff1d44e27aeb6c2eb7713a0">border</a>;
<a name="l00050"></a><a class="code" href="a00009.html#a54065f4c7667110b00ece931b9a45348">00050</a>         uint32_t <a class="code" href="a00009.html#a54065f4c7667110b00ece931b9a45348">background</a>;
<a name="l00051"></a><a class="code" href="a00009.html#ac75bcfcac277782b13996a42ecbe355f">00051</a>         uint32_t <a class="code" href="a00009.html#ac75bcfcac277782b13996a42ecbe355f">text</a>;
<a name="l00052"></a>00052 };
<a name="l00053"></a>00053 
<a name="l00059"></a><a class="code" href="a00024.html">00059</a> <span class="keyword">struct </span><a class="code" href="a00024.html" title="Holds a user-assigned variable for parsing the configuration file.">Variable</a> {
<a name="l00060"></a><a class="code" href="a00024.html#a17db6529c109500b8bddae26065d15cb">00060</a>         <span class="keywordtype">char</span> *<a class="code" href="a00024.html#a17db6529c109500b8bddae26065d15cb">key</a>;
<a name="l00061"></a><a class="code" href="a00024.html#adb40f6e20d946a54af87cf1b2b0504f5">00061</a>         <span class="keywordtype">char</span> *<a class="code" href="a00024.html#adb40f6e20d946a54af87cf1b2b0504f5">value</a>;
<a name="l00062"></a><a class="code" href="a00024.html#a4b1e062aed3d185286be0532604402d3">00062</a>         <span class="keywordtype">char</span> *<a class="code" href="a00024.html#a4b1e062aed3d185286be0532604402d3">next_match</a>;
<a name="l00063"></a>00063 
<a name="l00064"></a>00064         <a class="code" href="a00024.html#aff06faf733171154221e4d39fdec3e55">SLIST_ENTRY</a>(<a class="code" href="a00024.html" title="Holds a user-assigned variable for parsing the configuration file.">Variable</a>) variables;
<a name="l00065"></a>00065 };
<a name="l00066"></a>00066 
<a name="l00073"></a><a class="code" href="a00019.html">00073</a> struct <a class="code" href="a00019.html" title="The configuration file can contain multiple sets of bindings.">Mode</a> {
<a name="l00074"></a><a class="code" href="a00019.html#a336e4d433ab15856ab40cdf207ddfd48">00074</a>         <span class="keywordtype">char</span> *name;
<a name="l00075"></a><a class="code" href="a00019.html#a57efc24f1118014a783ba82a80b73af3">00075</a>         <span class="keyword">struct </span>bindings_head *<a class="code" href="a00071.html#afe67646b6ee7ae51b130a59354fe7f49">bindings</a>;
<a name="l00076"></a>00076 
<a name="l00077"></a>00077         <a class="code" href="a00024.html#aff06faf733171154221e4d39fdec3e55">SLIST_ENTRY</a>(Mode) <a class="code" href="a00062.html#a8a9fd888b55140d95a6f0c79a154b02c">modes</a>;
<a name="l00078"></a>00078 };
<a name="l00079"></a>00079 
<a name="l00085"></a><a class="code" href="a00010.html">00085</a> struct <a class="code" href="a00010.html" title="Holds part of the configuration (the part which is not already in dedicated structures...">Config</a> {
<a name="l00086"></a><a class="code" href="a00010.html#a5363b58685da7dd9ff59d31fae4f284a">00086</a>         <span class="keyword">const</span> <span class="keywordtype">char</span> *terminal;
<a name="l00087"></a><a class="code" href="a00010.html#aff568f0d5ca7a51971f4c3006a842019">00087</a>         <span class="keyword">const</span> <span class="keywordtype">char</span> *font;
<a name="l00088"></a>00088 
<a name="l00089"></a><a class="code" href="a00010.html#a79aa7dde4fb7016d2e71a6433ec467b1">00089</a>         <span class="keyword">const</span> <span class="keywordtype">char</span> *ipc_socket_path;
<a name="l00090"></a>00090 
<a name="l00091"></a><a class="code" href="a00010.html#ae54e9db4d6c85d1f5bd82034b9fbd3ba">00091</a>         <span class="keywordtype">int</span> <a class="code" href="a00063.html#a613f019bb3d6960b1ff386eca5316158" title="Returns the mode of the given container (or MODE_DEFAULT if a NULL pointer was passed...">container_mode</a>;
<a name="l00092"></a><a class="code" href="a00010.html#aa470b1035fa6d3ceb2aaa509a00f828e">00092</a>         <span class="keywordtype">int</span> container_stack_limit;
<a name="l00093"></a><a class="code" href="a00010.html#a00308166fbbf933166f4b99ef2562803">00093</a>         <span class="keywordtype">int</span> container_stack_limit_value;
<a name="l00094"></a>00094 
<a name="l00099"></a><a class="code" href="a00010.html#a5d334bc50cc91b445abe1cff1eddd269">00099</a>         <span class="keywordtype">bool</span> disable_focus_follows_mouse;
<a name="l00100"></a>00100 
<a name="l00105"></a><a class="code" href="a00010.html#ae4e1660269cdac461dac45368e592b4c">00105</a>         <span class="keywordtype">bool</span> disable_workspace_bar;
<a name="l00106"></a>00106 
<a name="l00107"></a><a class="code" href="a00010.html#a8ae68d7d3e33840388191d2ca725c48c">00107</a>         <span class="keyword">const</span> <span class="keywordtype">char</span> *default_border;
<a name="l00108"></a>00108 
<a name="l00111"></a><a class="code" href="a00010.html#a9329d3d7ebf1895185346ec50f7b54c2">00111</a>         uint32_t floating_modifier;
<a name="l00112"></a>00112 
<a name="l00113"></a>00113         <span class="comment">/* Color codes are stored here */</span>
<a name="l00114"></a><a class="code" href="a00012.html">00114</a>         <span class="keyword">struct </span><a class="code" href="a00012.html">config_client</a> {
<a name="l00115"></a><a class="code" href="a00012.html#a099c67879c7e681a9679a2215b9a5345">00115</a>                 <span class="keyword">struct </span><a class="code" href="a00009.html" title="Part of the struct Config.">Colortriple</a> focused;
<a name="l00116"></a><a class="code" href="a00012.html#ac0752caef95470dc6e6bf425ee88134f">00116</a>                 <span class="keyword">struct </span><a class="code" href="a00009.html" title="Part of the struct Config.">Colortriple</a> focused_inactive;
<a name="l00117"></a><a class="code" href="a00012.html#a5b24b86010b37d8771adae7df82f4c04">00117</a>                 <span class="keyword">struct </span><a class="code" href="a00009.html" title="Part of the struct Config.">Colortriple</a> unfocused;
<a name="l00118"></a><a class="code" href="a00012.html#aa99761c3565876674356bf2cb5f62856">00118</a>                 <span class="keyword">struct </span><a class="code" href="a00009.html" title="Part of the struct Config.">Colortriple</a> urgent;
<a name="l00119"></a>00119         } client;
<a name="l00120"></a><a class="code" href="a00011.html">00120</a>         <span class="keyword">struct </span><a class="code" href="a00011.html">config_bar</a> {
<a name="l00121"></a><a class="code" href="a00011.html#a53350b6b2d0d985dadf8bbade54237e7">00121</a>                 <span class="keyword">struct </span><a class="code" href="a00009.html" title="Part of the struct Config.">Colortriple</a> focused;
<a name="l00122"></a><a class="code" href="a00011.html#a99f68b3648d5b17e92e02f29c5eab9ca">00122</a>                 <span class="keyword">struct </span><a class="code" href="a00009.html" title="Part of the struct Config.">Colortriple</a> unfocused;
<a name="l00123"></a><a class="code" href="a00011.html#acec0f35d252f351505156ead6757f6bb">00123</a>                 <span class="keyword">struct </span><a class="code" href="a00009.html" title="Part of the struct Config.">Colortriple</a> urgent;
<a name="l00124"></a>00124         } bar;
<a name="l00125"></a>00125 };
<a name="l00126"></a>00126 
<a name="l00131"></a>00131 <span class="keywordtype">char</span> *<a class="code" href="a00062.html#aea199116bec04e7987dad157e10b49b5" title="This function resolves ~ in pathnames.">glob_path</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *path);
<a name="l00132"></a>00132 
<a name="l00137"></a>00137 <span class="keywordtype">bool</span> <a class="code" href="a00062.html#a7c81151479c55671cd41ad9d1b3d3f52" title="Checks if the given path exists by calling stat().">path_exists</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *path);
<a name="l00138"></a>00138 
<a name="l00146"></a>00146 <span class="keywordtype">void</span> <a class="code" href="a00062.html#a19bff8205cd2bd9492b5f95076dfa3a0" title="Reads the configuration from ~/.i3/config or /etc/i3/config if not found.">load_configuration</a>(xcb_connection_t *conn, <span class="keyword">const</span> <span class="keywordtype">char</span> *override_configfile, <span class="keywordtype">bool</span> reload);
<a name="l00147"></a>00147 
<a name="l00152"></a>00152 <span class="keywordtype">void</span> <a class="code" href="a00062.html#a0ee8ffa5c11aeb96126b36171da84adc" title="Translates keysymbols to keycodes for all bindings which use keysyms.">translate_keysyms</a>();
<a name="l00153"></a>00153 
<a name="l00159"></a>00159 <span class="keywordtype">void</span> <a class="code" href="a00062.html#afa95dc10a37decc54e9a376d0d462048" title="Ungrabs all keys, to be called before re-grabbing the keys because of a mapping_notify...">ungrab_all_keys</a>(xcb_connection_t *conn);
<a name="l00160"></a>00160 
<a name="l00165"></a>00165 <span class="keywordtype">void</span> <a class="code" href="a00062.html#a1741cf749eb2243cca453355d3f6879b" title="Grab the bound keys (tell X to send us keypress events for those keycodes).">grab_all_keys</a>(xcb_connection_t *conn, <span class="keywordtype">bool</span> bind_mode_switch);
<a name="l00166"></a>00166 
<a name="l00171"></a>00171 <span class="keywordtype">void</span> <a class="code" href="a00062.html#a2ffac81a6e7d464474716e01da82c5df" title="Switches the key bindings to the given mode, if the mode exists.">switch_mode</a>(xcb_connection_t *conn, <span class="keyword">const</span> <span class="keywordtype">char</span> *new_mode);
<a name="l00172"></a>00172 
<a name="l00178"></a>00178 <a class="code" href="a00003.html" title="Holds a keybinding, consisting of a keycode combined with modifiers and the command...">Binding</a> *<a class="code" href="a00062.html#afc938201ea536eed0f0838bb3c4c5c2c" title="Returns a pointer to the Binding with the specified modifiers and keycode or NULL...">get_binding</a>(uint16_t modifiers, xcb_keycode_t keycode);
<a name="l00179"></a>00179 
<a name="l00180"></a>00180 <span class="comment">/* prototype for src/cfgparse.y */</span>
<a name="l00181"></a>00181 <span class="keywordtype">void</span> <a class="code" href="a00056.html#a41592f23fd361db6127ac0223f3063b2">parse_file</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *f);
<a name="l00182"></a>00182 
<a name="l00183"></a>00183 <span class="preprocessor">#endif</span>
</pre></div></div>
<hr class="footer"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2-20100208 </small></address>
</body>
</html>