File: typesystem_ScintillaEdit.xml.template

package info (click to toggle)
codequery 0.21.1%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 11,012 kB
  • sloc: cpp: 114,603; xml: 16,576; python: 6,512; ansic: 3,262; perl: 444; makefile: 324; sql: 160; sh: 43; objc: 19; ruby: 6; php: 1
file content (65 lines) | stat: -rw-r--r-- 2,496 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?xml version="1.0"?>
<typesystem package="ScintillaEditPy">
	<load-typesystem name="typesystem_core.xml" generate="no" />
	<load-typesystem name="typesystem_gui_common.xml" generate="no"/>
	<primitive-type name="sptr_t"/>
	<primitive-type name="uptr_t"/>
	<value-type name="Sci_NotifyHeader" />
	<rejection class="Sci_NotifyHeader" field-name="hwndFrom" />
	<value-type name="SCNotification" />
	<object-type name="ScintillaEditBase" />
	<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(sptr_t, sptr_t)">
			<inject-code>
				int margin = PyInt_AsLong(%PYARG_1);
				if (margin == -1 &amp;&amp; PyErr_Occurred())
					return NULL;
				unsigned long mask = PyInt_AsUnsignedLongMask(%PYARG_2);
				if (margin == -1 &amp;&amp; PyErr_Occurred())
					return NULL;

				%CPPSELF-&gt;set_margin_mask_n(margin, static_cast&lt;int&gt;(mask));
				Py_RETURN_NONE;
			</inject-code>
		</modify-function>
		<modify-function signature="get_margin_mask_n(sptr_t) const">
			<inject-code>
				int margin = PyInt_AsLong(%PYARG_1);
				if (margin == -1 &amp;&amp; PyErr_Occurred())
					return NULL;
				unsigned int mask = (unsigned int)%CPPSELF-&gt;get_margin_mask_n(margin);
				%PYARG_0 = PyInt_FromSize_t(mask);
			</inject-code>
		</modify-function>
		<modify-function signature="setMarginMaskN(sptr_t, sptr_t)">
			<inject-code>
				int margin = PyInt_AsLong(%PYARG_1);
				if (margin == -1 &amp;&amp; PyErr_Occurred())
					return NULL;
				unsigned long mask = PyInt_AsUnsignedLongMask(%PYARG_2);
				if (margin == -1 &amp;&amp; PyErr_Occurred())
					return NULL;

				%CPPSELF-&gt;setMarginMaskN(margin, static_cast&lt;int&gt;(mask));
				Py_RETURN_NONE;
			</inject-code>
		</modify-function>
		<modify-function signature="marginMaskN(sptr_t) const">
			<inject-code>
				int margin = PyInt_AsLong(%PYARG_1);
				if (margin == -1 &amp;&amp; PyErr_Occurred())
					return NULL;
				unsigned int mask = (unsigned int)%CPPSELF-&gt;marginMaskN(margin);
				%PYARG_0 = PyInt_FromSize_t(mask);
			</inject-code>
		</modify-function>

	</object-type>
	<object-type name="ScintillaDocument" />
</typesystem>