diff options
| -rw-r--r-- | qt/ScintillaEditPy/typesystem_ScintillaEdit.xml.template | 27 | 
1 files changed, 27 insertions, 0 deletions
| diff --git a/qt/ScintillaEditPy/typesystem_ScintillaEdit.xml.template b/qt/ScintillaEditPy/typesystem_ScintillaEdit.xml.template index 4c2c897a2..a26b04352 100644 --- a/qt/ScintillaEditPy/typesystem_ScintillaEdit.xml.template +++ b/qt/ScintillaEditPy/typesystem_ScintillaEdit.xml.template @@ -11,6 +11,33 @@  	<object-type name="ScintillaEdit">  	<!-- ++Autogenerated start of section automatically generated from Scintilla.iface -->  	<!-- ~~Autogenerated end of section automatically generated from Scintilla.iface --> +	 +	<!-- Custom implementation of get and set_margin_mask_n: mask is defined  +	     as an int but is really a bitfield and the numeric value can be  +	     greater than max value of an int --> +		<modify-function signature="set_margin_mask_n(int, int)"> +			<inject-code> +				int margin = PyInt_AsLong(%PYARG_1); +				if (margin == -1 && PyErr_Occurred()) +					return NULL; +				unsigned long mask = PyInt_AsUnsignedLongMask(%PYARG_2); +				if (margin == -1 && PyErr_Occurred()) +					return NULL; + +				%CPPSELF->set_margin_mask_n(margin, static_cast<int>(mask)); +				Py_RETURN_NONE; +			</inject-code> +		</modify-function> +		<modify-function signature="get_margin_mask_n(int) const"> +			<inject-code> +				int margin = PyInt_AsLong(%PYARG_1); +				if (margin == -1 && PyErr_Occurred()) +					return NULL; +				unsigned int mask = (unsigned int)%CPPSELF->get_margin_mask_n(margin); +				%PYARG_0 = PyInt_FromSize_t(mask); +			</inject-code> +		</modify-function> +  	</object-type>  	<object-type name="ScintillaDocument" />  </typesystem> | 
