logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: calendar marked_date array: msg#00323

Subject: Re: calendar marked_date array
Of course I probably should have read the code more closely.  My reply did
nothing except let the code pass the compiler.  In order to get things to work
the following code needs to be added to GtkCalender.xs (note: untested as I
don't have a machine available).  You can add it yourself and try to get tit
compile.  Muppet, can you check this for sanity.  I don't know enough XS to be
sure what I am doing is right.

void
member_widget (cal)
        GtkCalender* cal
    ALIAS:
        Gtk2::Calendar::num_marked_dates  = 0
        Gtk2::Calendar::marked_date       = 1
        Gtk2::Calendar::year              = 2
        Gtk2::Calendar::month             = 3
        Gtk2::Calendar::selected_day      = 4

    CODE:
        switch (ix) {
                case 0:
                        PUSHs(sv_2mortal(newSViv(cal->num_marked_dates)));
                        break;
                case 1:
                        for (gint i = 0; i < cal->num_marked_dates; i++) {
                                PUSHs(sv_2mortal(newSViv(cal->marked_date[i])));
                        }
                        break;
                case 2:
                        PUSHs(sv_2mortal(newSViv(cal->year)));
                        break;
                case 3:
                        PUSHs(sv_2mortal(newSViv(cal->month)));
                        break;
                case 4:
                        PUSHs(sv_2mortal(newSViv(cal->selected_day)));
                        break;
        }


<Prev in Thread] Current Thread [Next in Thread>