bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Panel library in OS X


From: Sadrul H Chowdhury
Subject: Panel library in OS X
Date: Sun, 3 Sep 2006 12:56:02 -0400

Hi. Is there any known issues with the panel library in OS X where the panels do not update properly? I have written a test program which draws three panels on the screen, then starts moving one of them (the bottom-most one) one place to the right every half second. It works correctly in linux, however it doesn't seem to work (ie. all the panels sit still) in OS X. Here's the code I am using to test:

/*** START ***/
#include <ncursesw/ncurses.h>
#include <ncursesw/panel.h>

#include <glib.h>

static gboolean
doit(PANEL *panel)
{
    static int x = 0, y = 0;
    move_panel(panel, y, x++);
    update_panels();
    doupdate();
    return TRUE;
}

int main()
{
    WINDOW *one, *two, *three;
    PANEL *pone, *ptwo, *pthree;

    initscr();
    noecho();

    40, 0, 0);
    two = newwin(20, 65, 0, 0);
    three = newwin(14, 50, 0, 0);

    pone = new_panel(one);
    ptwo = new_panel(two);
    pthree = new_panel(three);

    box(one, 0, 0);
    box(two, 0, 0);
    box(three, 0, 0);

    update_panels();
    doupdate();

    g_type_init();
    g_timeout_add(500, doit, pone);

    GMainLoop *loop;
    loop = g_main_loop_new(NULL, FALSE);
    g_main_loop_run(loop);

    endwin();

    return 0;
}
/*** END ***/

Is there anything I am not doing properly here? If I do a 'touchwin(panel_window(panel));' after move_panel (in doit()), will that work? (I don't have access to an OS X box right now, so I can't test).

Thanks,
Sadrul

reply via email to

[Prev in Thread] Current Thread [Next in Thread]