Parse support for [no]magicsizes; new MAGIC_FEATURE_CONTROL bitmask

This commit is contained in:
Bill Kendrick 2023-04-12 00:11:11 -07:00
parent c2585d7a26
commit eda0a646be
14 changed files with 30 additions and 2 deletions

View file

@ -191,6 +191,8 @@ Magic Tool Plugin API Documentation
features relevant to Magic tools which have been disabled in this
session. Test using the C bitwise 'and' operator, '&'. The
features are defined in tp_magic_api.h:
* MAGIC_FEATURE_CONTROL: Magic tool controls (paint vs
fullscreen) (--nomagiccontrols)
* MAGIC_FEATURE_SIZE: Magic tool size (--nomagicsizes)
Your Magic tool(s) may wish to react differently depending on
whether one or more features have been disabled. (For example, the

View file

@ -289,6 +289,8 @@
<b>Note:</b> Called once by Tux Paint, at startup. It is called after "<code>api_version()</code>", if Tux Paint believes your plugin to be compatible. </p>
<p>
The <code>disabled_features</code> value contains bits set for any Tux Paint features relevant to Magic tools which have been disabled in this session. Test using the C bitwise 'and' operator, '<code>&amp;</code>'. The features are defined in <code>tp_magic_api.h</code>: <ul>
<li>
<code>MAGIC_FEATURE_CONTROL</code>: Magic tool controls (paint vs fullscreen) (<code>--nomagiccontrols</code>) </li>
<li>
<code>MAGIC_FEATURE_SIZE</code>: Magic tool size (<code>--nomagicsizes</code>) </li>
</ul>

View file

@ -191,6 +191,8 @@ Magic Tool Plugin API Documentation
features relevant to Magic tools which have been disabled in this
session. Test using the C bitwise 'and' operator, '&'. The
features are defined in tp_magic_api.h:
* MAGIC_FEATURE_CONTROL: Magic tool controls (paint vs
fullscreen) (--nomagiccontrols)
* MAGIC_FEATURE_SIZE: Magic tool size (--nomagicsizes)
Your Magic tool(s) may wish to react differently depending on
whether one or more features have been disabled. (For example, the

View file

@ -289,6 +289,8 @@
<b>Note:</b> Called once by Tux Paint, at startup. It is called after "<code>api_version()</code>", if Tux Paint believes your plugin to be compatible. </p>
<p>
The <code>disabled_features</code> value contains bits set for any Tux Paint features relevant to Magic tools which have been disabled in this session. Test using the C bitwise 'and' operator, '<code>&amp;</code>'. The features are defined in <code>tp_magic_api.h</code>: <ul>
<li>
<code>MAGIC_FEATURE_CONTROL</code>: Magic tool controls (paint vs fullscreen) (<code>--nomagiccontrols</code>) </li>
<li>
<code>MAGIC_FEATURE_SIZE</code>: Magic tool size (<code>--nomagicsizes</code>) </li>
</ul>

View file

@ -191,6 +191,8 @@ Magic Tool Plugin API Documentation
features relevant to Magic tools which have been disabled in this
session. Test using the C bitwise 'and' operator, '&'. The
features are defined in tp_magic_api.h:
* MAGIC_FEATURE_CONTROL: Magic tool controls (paint vs
fullscreen) (--nomagiccontrols)
* MAGIC_FEATURE_SIZE: Magic tool size (--nomagicsizes)
Your Magic tool(s) may wish to react differently depending on
whether one or more features have been disabled. (For example, the

View file

@ -289,6 +289,8 @@
<b>Note:</b> Called once by Tux Paint, at startup. It is called after "<code>api_version()</code>", if Tux Paint believes your plugin to be compatible. </p>
<p>
The <code>disabled_features</code> value contains bits set for any Tux Paint features relevant to Magic tools which have been disabled in this session. Test using the C bitwise 'and' operator, '<code>&amp;</code>'. The features are defined in <code>tp_magic_api.h</code>: <ul>
<li>
<code>MAGIC_FEATURE_CONTROL</code>: Magic tool controls (paint vs fullscreen) (<code>--nomagiccontrols</code>) </li>
<li>
<code>MAGIC_FEATURE_SIZE</code>: Magic tool size (<code>--nomagicsizes</code>) </li>
</ul>

View file

@ -191,6 +191,8 @@ Magic Tool Plugin API Documentation
features relevant to Magic tools which have been disabled in this
session. Test using the C bitwise 'and' operator, '&'. The
features are defined in tp_magic_api.h:
* MAGIC_FEATURE_CONTROL: Magic tool controls (paint vs
fullscreen) (--nomagiccontrols)
* MAGIC_FEATURE_SIZE: Magic tool size (--nomagicsizes)
Your Magic tool(s) may wish to react differently depending on
whether one or more features have been disabled. (For example, the

View file

@ -289,6 +289,8 @@
<b>Note:</b> Called once by Tux Paint, at startup. It is called after "<code>api_version()</code>", if Tux Paint believes your plugin to be compatible. </p>
<p>
The <code>disabled_features</code> value contains bits set for any Tux Paint features relevant to Magic tools which have been disabled in this session. Test using the C bitwise 'and' operator, '<code>&amp;</code>'. The features are defined in <code>tp_magic_api.h</code>: <ul>
<li>
<code>MAGIC_FEATURE_CONTROL</code>: Magic tool controls (paint vs fullscreen) (<code>--nomagiccontrols</code>) </li>
<li>
<code>MAGIC_FEATURE_SIZE</code>: Magic tool size (<code>--nomagicsizes</code>) </li>
</ul>

View file

@ -191,6 +191,8 @@ Magic Tool Plugin API Documentation
features relevant to Magic tools which have been disabled in this
session. Test using the C bitwise 'and' operator, '&'. The
features are defined in tp_magic_api.h:
* MAGIC_FEATURE_CONTROL: Magic tool controls (paint vs
fullscreen) (--nomagiccontrols)
* MAGIC_FEATURE_SIZE: Magic tool size (--nomagicsizes)
Your Magic tool(s) may wish to react differently depending on
whether one or more features have been disabled. (For example, the

View file

@ -289,6 +289,8 @@
<b>Note:</b> Called once by Tux Paint, at startup. It is called after "<code>api_version()</code>", if Tux Paint believes your plugin to be compatible. </p>
<p>
The <code>disabled_features</code> value contains bits set for any Tux Paint features relevant to Magic tools which have been disabled in this session. Test using the C bitwise 'and' operator, '<code>&amp;</code>'. The features are defined in <code>tp_magic_api.h</code>: <ul>
<li>
<code>MAGIC_FEATURE_CONTROL</code>: Magic tool controls (paint vs fullscreen) (<code>--nomagiccontrols</code>) </li>
<li>
<code>MAGIC_FEATURE_SIZE</code>: Magic tool size (<code>--nomagicsizes</code>) </li>
</ul>

View file

@ -125,6 +125,7 @@ lang, MULTI(parsertmp_lang)
locale, MULTI(parsertmp_locale)
lockfile, POSBOOL(ok_to_use_lockfile)
magiccontrols, NEGBOOL(disable_magic_controls)
magicsizes, NEGBOOL(disable_magic_sizes)
shapecontrols, NEGBOOL(disable_shape_controls)
mirrorstamps, POSBOOL(mirrorstamps)
mixedcase, NEGBOOL(only_uppercase)

View file

@ -16,6 +16,7 @@ struct cfginfo
const char *disable_label;
const char *disable_brushspacing;
const char *disable_magic_controls;
const char *disable_magic_sizes;
const char *disable_shape_controls;
const char *disable_print;
const char *disable_quit;

View file

@ -1430,6 +1430,7 @@ static int simple_shapes;
static int only_uppercase;
static int disable_magic_controls;
static int disable_magic_sizes;
static int disable_shape_controls;
static int shape_mode = SHAPEMODE_CENTER;
@ -29443,6 +29444,7 @@ static void setup_config(char *argv[])
SETBOOL(disable_label);
SETBOOL(disable_brushspacing);
SETBOOL(disable_magic_controls);
SETBOOL(disable_magic_sizes);
SETBOOL(disable_shape_controls);
SETBOOL(disable_print);
SETBOOL(disable_quit);
@ -31397,9 +31399,12 @@ static void setup(void)
/* Load magic tool plugins: */
magic_disabled_features = 0x00000000;
if (0) { /* FIXME */
if (disable_magic_sizes) {
magic_disabled_features |= MAGIC_FEATURE_SIZE;
}
if (disable_magic_controls) {
magic_disabled_features |= MAGIC_FEATURE_CONTROL;
}
load_magic_plugins();

View file

@ -7,7 +7,7 @@
# https://tuxpaint.org/
#
# Default distribution version last modified:
# December 11, 2020
# February 12, 2023
#
# $Id$
@ -21,6 +21,7 @@
# * nostampcontrols
# * nostamprotation
# * nomagiccontrols
# * nomagicsizes
# * noshapecontrols
# * nolabel
# * nobrushspacing