Re: calendar marked_date array



I just realized I could test the code against Gtk-Perl.

"GtkCalender* cal" needs to be "GtkCalendar* cal"
There should be a PREINIT: section:
     PREINIT:
        gint i;
"for (gint i" should be "for (i"

Now I just need to figure out why it isn't working <grin>

BTW who took over Gtk-Perl?  I may have a patch him/her.

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;
      }
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list




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