| 51 | | E_NOT_CONNECTED - no items are connected to menu |
| 52 | +--------------------------------------------------------------------------*/ |
| 53 | NCURSES_EXPORT(int) |
| 54 | scale_menu(const MENU * menu, int *rows, int *cols) |
| 55 | { |
| 56 | T((T_CALLED("scale_menu(%p,%p,%p)"), |
| 57 | (const void *)menu, |
| 58 | (void *)rows, |
| 59 | (void *)cols)); |
| 60 | |
| 61 | if (!menu) |
| 62 | RETURN(E_BAD_ARGUMENT); |
| 63 | |
| 64 | if (menu->items && *(menu->items)) |
| 65 | { |
| 66 | if (rows) |
| 67 | *rows = menu->height; |
| 68 | if (cols) |
| 69 | *cols = menu->width; |
| 70 | RETURN(E_OK); |
| 71 | } |
| 72 | else |
| 73 | RETURN(E_NOT_CONNECTED); |
| 74 | } |
| 75 | |
| 76 | /* m_scale.c ends here */ |