Type representing a quad-option. More...
#include "config.h"
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include "mutt/lib.h"
#include "quad.h"
#include "set.h"
#include "subset.h"
#include "types.h"
Go to the source code of this file.
Functions | |
static int | quad_string_set (const struct ConfigSet *cs, void *var, struct ConfigDef *cdef, const char *value, struct Buffer *err) |
Set a Quad-option by string - Implements ConfigSetType::string_set() -. | |
static int | quad_string_get (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *result) |
Get a Quad-option as a string - Implements ConfigSetType::string_get() -. | |
static int | quad_native_set (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err) |
Set a Quad-option config item by int - Implements ConfigSetType::native_set() -. | |
static intptr_t | quad_native_get (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *err) |
Get an int object from a Quad-option config item - Implements ConfigSetType::native_get() -. | |
static int | quad_reset (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *err) |
Reset a Quad-option to its initial value - Implements ConfigSetType::reset() -. | |
static int | quad_toggle (int opt) |
Toggle (invert) the value of a quad option. | |
int | quad_he_toggle (struct ConfigSubset *sub, struct HashElem *he, struct Buffer *err) |
Toggle the value of a quad. | |
Variables | |
const char * | QuadValues [] |
Valid strings for creating a QuadValue. | |
const struct ConfigSetType | CstQuad |
Config type representing a quad-option. | |
Type representing a quad-option.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file quad.c.
|
static |
Toggle (invert) the value of a quad option.
opt | Value to toggle |
num | New value |
By toggling the low bit, the following are swapped:
Definition at line 203 of file quad.c.
int quad_he_toggle | ( | struct ConfigSubset * | sub, |
struct HashElem * | he, | ||
struct Buffer * | err | ||
) |
Toggle the value of a quad.
num | Result, e.g. CSR_SUCCESS |
Definition at line 217 of file quad.c.
const char* QuadValues[] |
const struct ConfigSetType CstQuad |
Config type representing a quad-option.