MCPcopy Create free account
hub / github.com/carbonengine/trinity / AddUIChoosersToDict

Function AddUIChoosersToDict

trinity/UI/UIChoosers.cpp:9–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7
8#if BLUE_WITH_PYTHON
9void AddUIChoosersToDict( PyObject* dict )
10{
11 const Be::VarChooser* kvs[] = {
12 UIAlignChooser,
13 UIAnchorChooser,
14 UIIDChooser,
15 UIIDBoxChooser,
16 UIStateChooser,
17 UIPosChooser,
18 UICtlTypeChooser,
19 UIFontSizeChooser,
20 UIFontStyleChooser,
21 UICursorChooser,
22 UIEventTypeChooser
23 };
24
25 for( int i = 0; i < sizeof kvs / sizeof kvs[0]; i++ )
26 {
27 const Be::VarChooser* kv = kvs[i];
28
29 while( kv->mKey )
30 {
31 PyObject* value = ToPython( kv->mValue.mLong );
32 PyDict_SetItemString( dict, (char*)( kv->mKey ), value );
33 Py_DECREF( value );
34 kv++;
35 }
36 }
37}
38#endif
39
40

Callers 1

InitializeForPythonFunction · 0.85

Calls 1

ToPythonFunction · 0.85

Tested by

no test coverage detected