~ubuntu-branches/ubuntu/utopic/newt/utopic

« back to all changes in this revision

Viewing changes to snackmodule.c

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-07-01 23:06:29 UTC
  • mfrom: (2.1.23 sid)
  • Revision ID: package-import@ubuntu.com-20130701230629-vn7p5llzt03j09mv
Tags: 0.52.15-2ubuntu1
* Merge with Debian; remaining changes:
  - Fix python-* package descriptions.
  - Install/remove alternatives for the ubuntu palette.
  - Don't install python-newt example files.
  - Install whiptail in /bin instead of /usr/bin.
* Still build with tcl8.5 (8.6 is in universe).

Show diffs side-by-side

added added

removed removed

Lines of Context:
359
359
    snackWidget * widget;
360
360
     
361
361
    widget = PyObject_New(snackWidget, &snackWidgetType);
 
362
    if (!widget)
 
363
        return NULL;
362
364
 
363
365
    widget->scs.cb = NULL;
364
366
    widget->scs.data = NULL;
415
417
    if (!PyArg_ParseTuple(args, "ii", &width, &fullAmount)) return NULL;
416
418
 
417
419
    widget = snackWidgetNew ();
 
420
    if (!widget)
 
421
        return NULL;
418
422
    widget->co = newtScale(-1, -1, width, fullAmount);
419
423
 
420
424
    return (PyObject *) widget;
711
715
    if (!PyArg_ParseTuple(args, "s", &label)) return NULL;
712
716
 
713
717
    widget = snackWidgetNew ();
 
718
    if (!widget)
 
719
        return NULL;
714
720
    widget->co = newtButton(-1, -1, label);
715
721
 
716
722
    return widget;
723
729
    if (!PyArg_ParseTuple(args, "s", &label)) return NULL;
724
730
 
725
731
    widget = snackWidgetNew ();
 
732
    if (!widget)
 
733
        return NULL;
726
734
    widget->co = newtCompactButton(-1, -1, label);
727
735
 
728
736
    return widget;
735
743
    if (!PyArg_ParseTuple(args, "s", &label)) return NULL;
736
744
 
737
745
    widget = snackWidgetNew ();
 
746
    if (!widget)
 
747
        return NULL;
738
748
    widget->co = newtLabel(-1, -1, label);
739
749
 
740
750
    return widget;
794
804
        return NULL;
795
805
 
796
806
    widget = snackWidgetNew ();
 
807
    if (!widget)
 
808
        return NULL;
797
809
    widget->co = newtListbox(-1, -1, height,
798
810
                             (doScroll ? NEWT_FLAG_SCROLL : 0) |
799
811
                             (returnExit ? NEWT_FLAG_RETURNEXIT : 0) |
817
829
        return NULL;
818
830
 
819
831
    widget = snackWidgetNew ();
 
832
    if (!widget)
 
833
        return NULL;
820
834
    widget->co = newtTextbox(-1, -1, width, height,
821
835
                                (scrollBar ? NEWT_FLAG_SCROLL : 0) |
822
836
                                (wrap ? NEWT_FLAG_WRAP : 0));
834
848
                return NULL;
835
849
 
836
850
    widget = snackWidgetNew ();
 
851
    if (!widget)
 
852
        return NULL;
837
853
 
838
854
    if ((PyObject *) group == Py_None)
839
855
        widget->co = newtRadiobutton(-1, -1, text, isOn, NULL);
851
867
    if (!PyArg_ParseTuple(args, "si", &text, &isOn)) return NULL;
852
868
 
853
869
    widget = snackWidgetNew ();
 
870
    if (!widget)
 
871
        return NULL;
854
872
    widget->co = newtCheckbox(-1, -1, text, isOn ? '*' : ' ', NULL, 
855
873
                                &widget->achar);
856
874
 
889
907
                          &isHidden, &isPassword, &isScrolled, &returnExit)) return NULL;
890
908
 
891
909
    widget = snackWidgetNew ();
 
910
    if (!widget)
 
911
        return NULL;
892
912
    widget->co = newtEntry(-1, -1, initial, width,
893
913
                           (const char **) &widget->apointer, 
894
914
                           (isHidden ? NEWT_FLAG_HIDDEN : 0) |
1165
1185
    void ** selection;
1166
1186
    int numselected;
1167
1187
    int i;
1168
 
    PyObject * sel;
 
1188
    PyObject * sel, * int_obj;
1169
1189
 
1170
1190
    if (!PyArg_ParseTuple(args, ""))
1171
1191
        return NULL;
1175
1195
    sel = PyList_New(0);
1176
1196
 
1177
1197
    if (!selection) {
1178
 
        return sel;
 
1198
        return sel;
1179
1199
    }
1180
1200
 
1181
 
    sel = PyList_New(0);
1182
1201
    for (i = 0; i < numselected; i++) {
1183
 
        PyList_Append(sel, PyInt_FromLong((long) selection[i]));
 
1202
        int_obj = PyInt_FromLong((long) selection[i]);
 
1203
        PyList_Append(sel, int_obj);
 
1204
        Py_DECREF(int_obj);
1184
1205
    }
1185
1206
    free(selection);
1186
1207
 
1242
1263
        (unselectable ? NEWT_CHECKBOXTREE_UNSELECTABLE : 0);
1243
1264
 
1244
1265
    widget = snackWidgetNew ();
 
1266
    if (!widget)
 
1267
        return NULL;
1245
1268
    widget->co = newtCheckboxTree(-1, -1, height, flags);
1246
1269
 
1247
1270
    widget->anint = 1;
1340
1363
 
1341
1364
    selection = newtCheckboxTreeGetEntryValue(s->co, I2P(data));
1342
1365
 
1343
 
    if (selection == -1) return NULL;
 
1366
    if (selection == -1) {
 
1367
        PyErr_SetString(PyExc_KeyError, "unknown entry");
 
1368
        return NULL;
 
1369
    }
1344
1370
 
1345
1371
    switch (selection) {
1346
1372
    case NEWT_CHECKBOXTREE_EXPANDED:
1362
1388
    void ** selection;
1363
1389
    int numselected;
1364
1390
    int i;
1365
 
    PyObject * sel;
 
1391
    PyObject * sel, * int_obj;
1366
1392
 
1367
1393
    if (!PyArg_ParseTuple(args, ""))
1368
1394
        return NULL;
1375
1401
        return sel;
1376
1402
    }
1377
1403
 
1378
 
    sel = PyList_New(0);
1379
1404
    for (i = 0; i < numselected; i++) {
1380
 
        PyList_Append(sel, PyInt_FromLong((long) selection[i]));
 
1405
        int_obj = PyInt_FromLong((long) selection[i]);
 
1406
        PyList_Append(sel, int_obj);
 
1407
        Py_DECREF(int_obj);
1381
1408
    }
1382
1409
    free(selection);
1383
1410
 
1394
1421
    return PyInt_FromLong(wstrlen(str, len));
1395
1422
}
1396
1423
 
 
1424
static void setitemstring_decref(PyObject * dict,
 
1425
                                const char * s, PyObject * o)
 
1426
{
 
1427
    PyDict_SetItemString(dict, s, o);
 
1428
    Py_DECREF(o);
 
1429
}
 
1430
 
1397
1431
MOD_INIT(_snack)
1398
1432
{
1399
1433
    PyObject * d, * m;
1409
1443
 
1410
1444
    d = PyModule_GetDict(m);
1411
1445
 
1412
 
    PyDict_SetItemString(d, "ANCHOR_LEFT", PyInt_FromLong(NEWT_ANCHOR_LEFT));
1413
 
    PyDict_SetItemString(d, "ANCHOR_TOP", PyInt_FromLong(NEWT_ANCHOR_TOP));
1414
 
    PyDict_SetItemString(d, "ANCHOR_RIGHT", PyInt_FromLong(NEWT_ANCHOR_RIGHT));
1415
 
    PyDict_SetItemString(d, "ANCHOR_BOTTOM", 
 
1446
    setitemstring_decref(d, "ANCHOR_LEFT", PyInt_FromLong(NEWT_ANCHOR_LEFT));
 
1447
    setitemstring_decref(d, "ANCHOR_TOP", PyInt_FromLong(NEWT_ANCHOR_TOP));
 
1448
    setitemstring_decref(d, "ANCHOR_RIGHT", PyInt_FromLong(NEWT_ANCHOR_RIGHT));
 
1449
    setitemstring_decref(d, "ANCHOR_BOTTOM",
1416
1450
                         PyInt_FromLong(NEWT_ANCHOR_BOTTOM));
1417
 
    PyDict_SetItemString(d, "GRID_GROWX", PyInt_FromLong(NEWT_GRID_FLAG_GROWX));
1418
 
    PyDict_SetItemString(d, "GRID_GROWY", PyInt_FromLong(NEWT_GRID_FLAG_GROWY));
1419
 
 
1420
 
    PyDict_SetItemString(d, "FD_READ", PyInt_FromLong(NEWT_FD_READ));
1421
 
    PyDict_SetItemString(d, "FD_WRITE", PyInt_FromLong(NEWT_FD_WRITE));
1422
 
    PyDict_SetItemString(d, "FD_EXCEPT", PyInt_FromLong(NEWT_FD_EXCEPT));
1423
 
 
1424
 
    PyDict_SetItemString(d, "FORM_EXIT_HOTKEY", PyString_FromString("hotkey"));
1425
 
    PyDict_SetItemString(d, "FORM_EXIT_WIDGET", PyString_FromString("widget"));
1426
 
    PyDict_SetItemString(d, "FORM_EXIT_TIMER", PyString_FromString("timer"));
1427
 
    PyDict_SetItemString(d, "FORM_EXIT_FDREADY", PyString_FromString("fdready"));
1428
 
 
1429
 
    PyDict_SetItemString(d, "KEY_TAB", PyInt_FromLong(NEWT_KEY_TAB));
1430
 
    PyDict_SetItemString(d, "KEY_ENTER", PyInt_FromLong(NEWT_KEY_ENTER));
1431
 
    PyDict_SetItemString(d, "KEY_SUSPEND", PyInt_FromLong(NEWT_KEY_SUSPEND));
1432
 
    PyDict_SetItemString(d, "KEY_UP", PyInt_FromLong(NEWT_KEY_UP));
1433
 
    PyDict_SetItemString(d, "KEY_DOWN", PyInt_FromLong(NEWT_KEY_DOWN));
1434
 
    PyDict_SetItemString(d, "KEY_LEFT", PyInt_FromLong(NEWT_KEY_LEFT));
1435
 
    PyDict_SetItemString(d, "KEY_RIGHT", PyInt_FromLong(NEWT_KEY_RIGHT));
1436
 
    PyDict_SetItemString(d, "KEY_BACKSPACE", PyInt_FromLong(NEWT_KEY_BKSPC));
1437
 
    PyDict_SetItemString(d, "KEY_DELETE", PyInt_FromLong(NEWT_KEY_DELETE));
1438
 
    PyDict_SetItemString(d, "KEY_HOME", PyInt_FromLong(NEWT_KEY_HOME));
1439
 
    PyDict_SetItemString(d, "KEY_END", PyInt_FromLong(NEWT_KEY_END));
1440
 
    PyDict_SetItemString(d, "KEY_UNTAB", PyInt_FromLong(NEWT_KEY_UNTAB));
1441
 
    PyDict_SetItemString(d, "KEY_PAGEUP", PyInt_FromLong(NEWT_KEY_PGUP));
1442
 
    PyDict_SetItemString(d, "KEY_PAGEGDOWN", PyInt_FromLong(NEWT_KEY_PGDN));
1443
 
    PyDict_SetItemString(d, "KEY_INSERT", PyInt_FromLong(NEWT_KEY_INSERT));
1444
 
    PyDict_SetItemString(d, "KEY_F1", PyInt_FromLong(NEWT_KEY_F1));
1445
 
    PyDict_SetItemString(d, "KEY_F2", PyInt_FromLong(NEWT_KEY_F2));
1446
 
    PyDict_SetItemString(d, "KEY_F3", PyInt_FromLong(NEWT_KEY_F3));
1447
 
    PyDict_SetItemString(d, "KEY_F4", PyInt_FromLong(NEWT_KEY_F4));
1448
 
    PyDict_SetItemString(d, "KEY_F5", PyInt_FromLong(NEWT_KEY_F5));
1449
 
    PyDict_SetItemString(d, "KEY_F6", PyInt_FromLong(NEWT_KEY_F6));
1450
 
    PyDict_SetItemString(d, "KEY_F7", PyInt_FromLong(NEWT_KEY_F7));
1451
 
    PyDict_SetItemString(d, "KEY_F8", PyInt_FromLong(NEWT_KEY_F8));
1452
 
    PyDict_SetItemString(d, "KEY_F9", PyInt_FromLong(NEWT_KEY_F9));
1453
 
    PyDict_SetItemString(d, "KEY_F10", PyInt_FromLong(NEWT_KEY_F10));
1454
 
    PyDict_SetItemString(d, "KEY_F11", PyInt_FromLong(NEWT_KEY_F11));
1455
 
    PyDict_SetItemString(d, "KEY_F12", PyInt_FromLong(NEWT_KEY_F12));
1456
 
    PyDict_SetItemString(d, "KEY_ESC", PyInt_FromLong(NEWT_KEY_ESCAPE));
1457
 
 
1458
 
    PyDict_SetItemString(d, "FLAG_DISABLED", PyInt_FromLong(NEWT_FLAG_DISABLED));
1459
 
    PyDict_SetItemString(d, "FLAGS_SET", PyInt_FromLong(NEWT_FLAGS_SET));
1460
 
    PyDict_SetItemString(d, "FLAGS_RESET", PyInt_FromLong(NEWT_FLAGS_RESET));
1461
 
    PyDict_SetItemString(d, "FLAGS_TOGGLE", PyInt_FromLong(NEWT_FLAGS_TOGGLE));
1462
 
 
1463
 
    PyDict_SetItemString(d, "COLORSET_ROOT", PyInt_FromLong(NEWT_COLORSET_ROOT));
1464
 
    PyDict_SetItemString(d, "COLORSET_BORDER", PyInt_FromLong(NEWT_COLORSET_BORDER));
1465
 
    PyDict_SetItemString(d, "COLORSET_WINDOW", PyInt_FromLong(NEWT_COLORSET_WINDOW));
1466
 
    PyDict_SetItemString(d, "COLORSET_SHADOW", PyInt_FromLong(NEWT_COLORSET_SHADOW));
1467
 
    PyDict_SetItemString(d, "COLORSET_TITLE", PyInt_FromLong(NEWT_COLORSET_TITLE));
1468
 
    PyDict_SetItemString(d, "COLORSET_BUTTON", PyInt_FromLong(NEWT_COLORSET_BUTTON));
1469
 
    PyDict_SetItemString(d, "COLORSET_ACTBUTTON", PyInt_FromLong(NEWT_COLORSET_ACTBUTTON));
1470
 
    PyDict_SetItemString(d, "COLORSET_CHECKBOX", PyInt_FromLong(NEWT_COLORSET_CHECKBOX));
1471
 
    PyDict_SetItemString(d, "COLORSET_ACTCHECKBOX", PyInt_FromLong(NEWT_COLORSET_ACTCHECKBOX));
1472
 
    PyDict_SetItemString(d, "COLORSET_ENTRY", PyInt_FromLong(NEWT_COLORSET_ENTRY));
1473
 
    PyDict_SetItemString(d, "COLORSET_LABEL", PyInt_FromLong(NEWT_COLORSET_LABEL));
1474
 
    PyDict_SetItemString(d, "COLORSET_LISTBOX", PyInt_FromLong(NEWT_COLORSET_LISTBOX));
1475
 
    PyDict_SetItemString(d, "COLORSET_ACTLISTBOX", PyInt_FromLong(NEWT_COLORSET_ACTLISTBOX));
1476
 
    PyDict_SetItemString(d, "COLORSET_TEXTBOX", PyInt_FromLong(NEWT_COLORSET_TEXTBOX));
1477
 
    PyDict_SetItemString(d, "COLORSET_ACTTEXTBOX", PyInt_FromLong(NEWT_COLORSET_ACTTEXTBOX));
1478
 
    PyDict_SetItemString(d, "COLORSET_HELPLINE", PyInt_FromLong(NEWT_COLORSET_HELPLINE));
1479
 
    PyDict_SetItemString(d, "COLORSET_ROOTTEXT", PyInt_FromLong(NEWT_COLORSET_ROOTTEXT));
1480
 
    PyDict_SetItemString(d, "COLORSET_EMPTYSCALE", PyInt_FromLong(NEWT_COLORSET_EMPTYSCALE));
1481
 
    PyDict_SetItemString(d, "COLORSET_FULLSCALE", PyInt_FromLong(NEWT_COLORSET_FULLSCALE));
1482
 
    PyDict_SetItemString(d, "COLORSET_DISENTRY", PyInt_FromLong(NEWT_COLORSET_DISENTRY));
1483
 
    PyDict_SetItemString(d, "COLORSET_COMPACTBUTTON", PyInt_FromLong(NEWT_COLORSET_COMPACTBUTTON));
1484
 
    PyDict_SetItemString(d, "COLORSET_ACTSELLISTBOX", PyInt_FromLong(NEWT_COLORSET_ACTSELLISTBOX));
1485
 
    PyDict_SetItemString(d, "COLORSET_SELLISTBOX", PyInt_FromLong(NEWT_COLORSET_SELLISTBOX));
 
1451
    setitemstring_decref(d, "GRID_GROWX", PyInt_FromLong(NEWT_GRID_FLAG_GROWX));
 
1452
    setitemstring_decref(d, "GRID_GROWY", PyInt_FromLong(NEWT_GRID_FLAG_GROWY));
 
1453
 
 
1454
    setitemstring_decref(d, "FD_READ", PyInt_FromLong(NEWT_FD_READ));
 
1455
    setitemstring_decref(d, "FD_WRITE", PyInt_FromLong(NEWT_FD_WRITE));
 
1456
    setitemstring_decref(d, "FD_EXCEPT", PyInt_FromLong(NEWT_FD_EXCEPT));
 
1457
 
 
1458
    setitemstring_decref(d, "FORM_EXIT_HOTKEY", PyString_FromString("hotkey"));
 
1459
    setitemstring_decref(d, "FORM_EXIT_WIDGET", PyString_FromString("widget"));
 
1460
    setitemstring_decref(d, "FORM_EXIT_TIMER", PyString_FromString("timer"));
 
1461
    setitemstring_decref(d, "FORM_EXIT_FDREADY", PyString_FromString("fdready"));
 
1462
 
 
1463
    setitemstring_decref(d, "KEY_TAB", PyInt_FromLong(NEWT_KEY_TAB));
 
1464
    setitemstring_decref(d, "KEY_ENTER", PyInt_FromLong(NEWT_KEY_ENTER));
 
1465
    setitemstring_decref(d, "KEY_SUSPEND", PyInt_FromLong(NEWT_KEY_SUSPEND));
 
1466
    setitemstring_decref(d, "KEY_UP", PyInt_FromLong(NEWT_KEY_UP));
 
1467
    setitemstring_decref(d, "KEY_DOWN", PyInt_FromLong(NEWT_KEY_DOWN));
 
1468
    setitemstring_decref(d, "KEY_LEFT", PyInt_FromLong(NEWT_KEY_LEFT));
 
1469
    setitemstring_decref(d, "KEY_RIGHT", PyInt_FromLong(NEWT_KEY_RIGHT));
 
1470
    setitemstring_decref(d, "KEY_BACKSPACE", PyInt_FromLong(NEWT_KEY_BKSPC));
 
1471
    setitemstring_decref(d, "KEY_DELETE", PyInt_FromLong(NEWT_KEY_DELETE));
 
1472
    setitemstring_decref(d, "KEY_HOME", PyInt_FromLong(NEWT_KEY_HOME));
 
1473
    setitemstring_decref(d, "KEY_END", PyInt_FromLong(NEWT_KEY_END));
 
1474
    setitemstring_decref(d, "KEY_UNTAB", PyInt_FromLong(NEWT_KEY_UNTAB));
 
1475
    setitemstring_decref(d, "KEY_PAGEUP", PyInt_FromLong(NEWT_KEY_PGUP));
 
1476
    setitemstring_decref(d, "KEY_PAGEGDOWN", PyInt_FromLong(NEWT_KEY_PGDN));
 
1477
    setitemstring_decref(d, "KEY_INSERT", PyInt_FromLong(NEWT_KEY_INSERT));
 
1478
    setitemstring_decref(d, "KEY_F1", PyInt_FromLong(NEWT_KEY_F1));
 
1479
    setitemstring_decref(d, "KEY_F2", PyInt_FromLong(NEWT_KEY_F2));
 
1480
    setitemstring_decref(d, "KEY_F3", PyInt_FromLong(NEWT_KEY_F3));
 
1481
    setitemstring_decref(d, "KEY_F4", PyInt_FromLong(NEWT_KEY_F4));
 
1482
    setitemstring_decref(d, "KEY_F5", PyInt_FromLong(NEWT_KEY_F5));
 
1483
    setitemstring_decref(d, "KEY_F6", PyInt_FromLong(NEWT_KEY_F6));
 
1484
    setitemstring_decref(d, "KEY_F7", PyInt_FromLong(NEWT_KEY_F7));
 
1485
    setitemstring_decref(d, "KEY_F8", PyInt_FromLong(NEWT_KEY_F8));
 
1486
    setitemstring_decref(d, "KEY_F9", PyInt_FromLong(NEWT_KEY_F9));
 
1487
    setitemstring_decref(d, "KEY_F10", PyInt_FromLong(NEWT_KEY_F10));
 
1488
    setitemstring_decref(d, "KEY_F11", PyInt_FromLong(NEWT_KEY_F11));
 
1489
    setitemstring_decref(d, "KEY_F12", PyInt_FromLong(NEWT_KEY_F12));
 
1490
    setitemstring_decref(d, "KEY_ESC", PyInt_FromLong(NEWT_KEY_ESCAPE));
 
1491
 
 
1492
    setitemstring_decref(d, "FLAG_DISABLED", PyInt_FromLong(NEWT_FLAG_DISABLED));
 
1493
    setitemstring_decref(d, "FLAGS_SET", PyInt_FromLong(NEWT_FLAGS_SET));
 
1494
    setitemstring_decref(d, "FLAGS_RESET", PyInt_FromLong(NEWT_FLAGS_RESET));
 
1495
    setitemstring_decref(d, "FLAGS_TOGGLE", PyInt_FromLong(NEWT_FLAGS_TOGGLE));
 
1496
 
 
1497
    setitemstring_decref(d, "COLORSET_ROOT", PyInt_FromLong(NEWT_COLORSET_ROOT));
 
1498
    setitemstring_decref(d, "COLORSET_BORDER", PyInt_FromLong(NEWT_COLORSET_BORDER));
 
1499
    setitemstring_decref(d, "COLORSET_WINDOW", PyInt_FromLong(NEWT_COLORSET_WINDOW));
 
1500
    setitemstring_decref(d, "COLORSET_SHADOW", PyInt_FromLong(NEWT_COLORSET_SHADOW));
 
1501
    setitemstring_decref(d, "COLORSET_TITLE", PyInt_FromLong(NEWT_COLORSET_TITLE));
 
1502
    setitemstring_decref(d, "COLORSET_BUTTON", PyInt_FromLong(NEWT_COLORSET_BUTTON));
 
1503
    setitemstring_decref(d, "COLORSET_ACTBUTTON", PyInt_FromLong(NEWT_COLORSET_ACTBUTTON));
 
1504
    setitemstring_decref(d, "COLORSET_CHECKBOX", PyInt_FromLong(NEWT_COLORSET_CHECKBOX));
 
1505
    setitemstring_decref(d, "COLORSET_ACTCHECKBOX", PyInt_FromLong(NEWT_COLORSET_ACTCHECKBOX));
 
1506
    setitemstring_decref(d, "COLORSET_ENTRY", PyInt_FromLong(NEWT_COLORSET_ENTRY));
 
1507
    setitemstring_decref(d, "COLORSET_LABEL", PyInt_FromLong(NEWT_COLORSET_LABEL));
 
1508
    setitemstring_decref(d, "COLORSET_LISTBOX", PyInt_FromLong(NEWT_COLORSET_LISTBOX));
 
1509
    setitemstring_decref(d, "COLORSET_ACTLISTBOX", PyInt_FromLong(NEWT_COLORSET_ACTLISTBOX));
 
1510
    setitemstring_decref(d, "COLORSET_TEXTBOX", PyInt_FromLong(NEWT_COLORSET_TEXTBOX));
 
1511
    setitemstring_decref(d, "COLORSET_ACTTEXTBOX", PyInt_FromLong(NEWT_COLORSET_ACTTEXTBOX));
 
1512
    setitemstring_decref(d, "COLORSET_HELPLINE", PyInt_FromLong(NEWT_COLORSET_HELPLINE));
 
1513
    setitemstring_decref(d, "COLORSET_ROOTTEXT", PyInt_FromLong(NEWT_COLORSET_ROOTTEXT));
 
1514
    setitemstring_decref(d, "COLORSET_EMPTYSCALE", PyInt_FromLong(NEWT_COLORSET_EMPTYSCALE));
 
1515
    setitemstring_decref(d, "COLORSET_FULLSCALE", PyInt_FromLong(NEWT_COLORSET_FULLSCALE));
 
1516
    setitemstring_decref(d, "COLORSET_DISENTRY", PyInt_FromLong(NEWT_COLORSET_DISENTRY));
 
1517
    setitemstring_decref(d, "COLORSET_COMPACTBUTTON", PyInt_FromLong(NEWT_COLORSET_COMPACTBUTTON));
 
1518
    setitemstring_decref(d, "COLORSET_ACTSELLISTBOX", PyInt_FromLong(NEWT_COLORSET_ACTSELLISTBOX));
 
1519
    setitemstring_decref(d, "COLORSET_SELLISTBOX", PyInt_FromLong(NEWT_COLORSET_SELLISTBOX));
1486
1520
 
1487
1521
    return MOD_SUCCESS_VAL(m);
1488
1522
}