/* DO NOT EDIT THIS FILE. */
/* This file was generated by xctocc from "wxs_mede.xc". */


#if defined(_MSC_VER)
# include "wx.h"
#endif
#if defined(OS_X)
# include "common.h"
#endif

#include "wx_media.h"




#ifdef wx_x
# define BM_SELECTED(map) ((map)->selectedTo)
#endif
#if defined(wx_mac) || defined(wx_msw)
# define BM_SELECTED(map) ((map)->selectedInto)
#endif
# define BM_IN_USE(map) ((map)->selectedIntoDC)





#include "wxscheme.h"
#include "wxs_mede.h"

#ifdef MZ_PRECISE_GC
START_XFORM_SKIP;
#endif

#undef l_ADDRESS
#undef l_DEREF
#undef l_TEST
#undef l_POINT
#undef l_TYPE
#undef l_LIST_ITEM_BUNDLE
#undef l_LIST_ITEM_UNBUNDLE
#undef l_MAKE_LIST
#undef l_MAKE_ARRAY
#undef l_EXTRA
#undef l_TERMINATE
#undef l_COPY
#undef l_OKTEST
#undef l_INTTYPE

#define l_ADDRESS 
#define l_DEREF 
#define l_NEWATOMIC (UseGC)
#define l_NULLOK 0
#define l_TEST 
#define l_POINT 
#define l_EXTRA 0
#define l_TERMINATE 
#define l_COPY l_COPYDEST=l_COPYSRC;
#define l_OKTEST 
#define l_INTTYPE int
#define l_DIRECTMALLOC 0

#define l_TYPE double
#define l_LIST_ITEM_BUNDLE objscheme_bundle_double
#define l_LIST_ITEM_UNBUNDLE objscheme_unbundle_double
#define l_MAKE_LIST __MakedoubleList
#define l_MAKE_ARRAY __MakedoubleArray





static Scheme_Object *l_MAKE_LIST(l_TYPE l_POINT *f, l_INTTYPE c)
{
  Scheme_Object *cdr = scheme_null, *obj = NULL;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, cdr);

  while (c--) {
    obj = WITH_VAR_STACK(l_LIST_ITEM_BUNDLE(l_ADDRESS f[c]));
    cdr = WITH_VAR_STACK(scheme_make_pair(obj, cdr));
  }
  
  READY_TO_RETURN;

  return cdr;
}

static l_TYPE l_POINT *l_MAKE_ARRAY(Scheme_Object *l, l_INTTYPE *c, char *who)
{
  Scheme_Object *orig_l = l;
  int i = 0;
  long len;
  l_TYPE l_POINT *f = NULL;

  SETUP_VAR_STACK(3);
  VAR_STACK_PUSH(0, l);
  VAR_STACK_PUSH(1, orig_l);
  VAR_STACK_PUSH(2, f);

  len = WITH_VAR_STACK(scheme_proper_list_length(l));
  if (len < 0) WITH_VAR_STACK(scheme_wrong_type(who, "proper-list", -1, 0, &l));
  if (c) *c = len;

  if (!(len + l_EXTRA)) {
    READY_TO_RETURN;
    return NULL;
  }

#if l_DIRECTMALLOC
  f = (l_TYPE l_POINT *)WITH_VAR_STACK(GC_malloc_atomic(sizeof(l_TYPE l_POINT) * (len + l_EXTRA)));
#else
  f = WITH_VAR_STACK(new l_NEWATOMIC l_TYPE l_POINT[len + l_EXTRA]);
#endif

  while (!SCHEME_NULLP(l)) {
    if (!SCHEME_LISTP(l)) {
      WITH_VAR_STACK(scheme_arg_mismatch(who, "expected a proper list: ", orig_l));
      READY_TO_RETURN;
      return NULL;
    }

#define l_COPYDEST f[i]
#define l_COPYSRC (l_DEREF WITH_VAR_STACK(l_LIST_ITEM_UNBUNDLE(SCHEME_CAR(l), who l_TEST)))

    l_COPY

    l_OKTEST

    i++;

    l = SCHEME_CDR(l);
  }
  l_TERMINATE

  READY_TO_RETURN;

  return f;
}



static Scheme_Object *selType_wxDEFAULT_SELECT_sym = NULL;
static Scheme_Object *selType_wxX_SELECT_sym = NULL;
static Scheme_Object *selType_wxLOCAL_SELECT_sym = NULL;

static void init_symset_selType(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(selType_wxDEFAULT_SELECT_sym);
  selType_wxDEFAULT_SELECT_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("default"));
  wxREGGLOB(selType_wxX_SELECT_sym);
  selType_wxX_SELECT_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("x"));
  wxREGGLOB(selType_wxLOCAL_SELECT_sym);
  selType_wxLOCAL_SELECT_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("local"));
}

static int unbundle_symset_selType(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!selType_wxLOCAL_SELECT_sym) WITH_VAR_STACK(init_symset_selType());
  if (0) { }
  else if (v == selType_wxDEFAULT_SELECT_sym) { READY_TO_RETURN; return wxDEFAULT_SELECT; }
  else if (v == selType_wxX_SELECT_sym) { READY_TO_RETURN; return wxX_SELECT; }
  else if (v == selType_wxLOCAL_SELECT_sym) { READY_TO_RETURN; return wxLOCAL_SELECT; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "selType symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}


static Scheme_Object *moveCode_WXK_HOME_sym = NULL;
static Scheme_Object *moveCode_WXK_END_sym = NULL;
static Scheme_Object *moveCode_WXK_RIGHT_sym = NULL;
static Scheme_Object *moveCode_WXK_LEFT_sym = NULL;
static Scheme_Object *moveCode_WXK_UP_sym = NULL;
static Scheme_Object *moveCode_WXK_DOWN_sym = NULL;

static void init_symset_moveCode(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(moveCode_WXK_HOME_sym);
  moveCode_WXK_HOME_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("home"));
  wxREGGLOB(moveCode_WXK_END_sym);
  moveCode_WXK_END_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("end"));
  wxREGGLOB(moveCode_WXK_RIGHT_sym);
  moveCode_WXK_RIGHT_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("right"));
  wxREGGLOB(moveCode_WXK_LEFT_sym);
  moveCode_WXK_LEFT_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("left"));
  wxREGGLOB(moveCode_WXK_UP_sym);
  moveCode_WXK_UP_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("up"));
  wxREGGLOB(moveCode_WXK_DOWN_sym);
  moveCode_WXK_DOWN_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("down"));
}

static int unbundle_symset_moveCode(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!moveCode_WXK_DOWN_sym) WITH_VAR_STACK(init_symset_moveCode());
  if (0) { }
  else if (v == moveCode_WXK_HOME_sym) { READY_TO_RETURN; return WXK_HOME; }
  else if (v == moveCode_WXK_END_sym) { READY_TO_RETURN; return WXK_END; }
  else if (v == moveCode_WXK_RIGHT_sym) { READY_TO_RETURN; return WXK_RIGHT; }
  else if (v == moveCode_WXK_LEFT_sym) { READY_TO_RETURN; return WXK_LEFT; }
  else if (v == moveCode_WXK_UP_sym) { READY_TO_RETURN; return WXK_UP; }
  else if (v == moveCode_WXK_DOWN_sym) { READY_TO_RETURN; return WXK_DOWN; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "moveCode symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}


static Scheme_Object *move_wxMOVE_SIMPLE_sym = NULL;
static Scheme_Object *move_wxMOVE_LINE_sym = NULL;
static Scheme_Object *move_wxMOVE_PAGE_sym = NULL;
static Scheme_Object *move_wxMOVE_WORD_sym = NULL;

static void init_symset_move(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(move_wxMOVE_SIMPLE_sym);
  move_wxMOVE_SIMPLE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("simple"));
  wxREGGLOB(move_wxMOVE_LINE_sym);
  move_wxMOVE_LINE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("line"));
  wxREGGLOB(move_wxMOVE_PAGE_sym);
  move_wxMOVE_PAGE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("page"));
  wxREGGLOB(move_wxMOVE_WORD_sym);
  move_wxMOVE_WORD_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("word"));
}

static int unbundle_symset_move(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!move_wxMOVE_WORD_sym) WITH_VAR_STACK(init_symset_move());
  if (0) { }
  else if (v == move_wxMOVE_SIMPLE_sym) { READY_TO_RETURN; return wxMOVE_SIMPLE; }
  else if (v == move_wxMOVE_LINE_sym) { READY_TO_RETURN; return wxMOVE_LINE; }
  else if (v == move_wxMOVE_PAGE_sym) { READY_TO_RETURN; return wxMOVE_PAGE; }
  else if (v == move_wxMOVE_WORD_sym) { READY_TO_RETURN; return wxMOVE_WORD; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "move symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}


static Scheme_Object *findKind_wxSNIP_BEFORE_OR_NULL_sym = NULL;
static Scheme_Object *findKind_wxSNIP_BEFORE_sym = NULL;
static Scheme_Object *findKind_wxSNIP_AFTER_sym = NULL;
static Scheme_Object *findKind_wxSNIP_AFTER_OR_NULL_sym = NULL;

static void init_symset_findKind(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(findKind_wxSNIP_BEFORE_OR_NULL_sym);
  findKind_wxSNIP_BEFORE_OR_NULL_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("before-or-none"));
  wxREGGLOB(findKind_wxSNIP_BEFORE_sym);
  findKind_wxSNIP_BEFORE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("before"));
  wxREGGLOB(findKind_wxSNIP_AFTER_sym);
  findKind_wxSNIP_AFTER_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("after"));
  wxREGGLOB(findKind_wxSNIP_AFTER_OR_NULL_sym);
  findKind_wxSNIP_AFTER_OR_NULL_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("after-or-none"));
}

static int unbundle_symset_findKind(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!findKind_wxSNIP_AFTER_OR_NULL_sym) WITH_VAR_STACK(init_symset_findKind());
  if (0) { }
  else if (v == findKind_wxSNIP_BEFORE_OR_NULL_sym) { READY_TO_RETURN; return wxSNIP_BEFORE_OR_NULL; }
  else if (v == findKind_wxSNIP_BEFORE_sym) { READY_TO_RETURN; return wxSNIP_BEFORE; }
  else if (v == findKind_wxSNIP_AFTER_sym) { READY_TO_RETURN; return wxSNIP_AFTER; }
  else if (v == findKind_wxSNIP_AFTER_OR_NULL_sym) { READY_TO_RETURN; return wxSNIP_AFTER_OR_NULL; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "findKind symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}


static Scheme_Object *breakType_wxBREAK_FOR_CARET_sym = NULL;
static Scheme_Object *breakType_wxBREAK_FOR_LINE_sym = NULL;
static Scheme_Object *breakType_wxBREAK_FOR_SELECTION_sym = NULL;
static Scheme_Object *breakType_wxBREAK_FOR_USER_1_sym = NULL;
static Scheme_Object *breakType_wxBREAK_FOR_USER_2_sym = NULL;

static void init_symset_breakType(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(breakType_wxBREAK_FOR_CARET_sym);
  breakType_wxBREAK_FOR_CARET_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("caret"));
  wxREGGLOB(breakType_wxBREAK_FOR_LINE_sym);
  breakType_wxBREAK_FOR_LINE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("line"));
  wxREGGLOB(breakType_wxBREAK_FOR_SELECTION_sym);
  breakType_wxBREAK_FOR_SELECTION_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("selection"));
  wxREGGLOB(breakType_wxBREAK_FOR_USER_1_sym);
  breakType_wxBREAK_FOR_USER_1_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("user1"));
  wxREGGLOB(breakType_wxBREAK_FOR_USER_2_sym);
  breakType_wxBREAK_FOR_USER_2_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("user2"));
}

static int unbundle_symset_breakType(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!breakType_wxBREAK_FOR_USER_2_sym) WITH_VAR_STACK(init_symset_breakType());
  if (0) { }
  else if (v == breakType_wxBREAK_FOR_CARET_sym) { READY_TO_RETURN; return wxBREAK_FOR_CARET; }
  else if (v == breakType_wxBREAK_FOR_LINE_sym) { READY_TO_RETURN; return wxBREAK_FOR_LINE; }
  else if (v == breakType_wxBREAK_FOR_SELECTION_sym) { READY_TO_RETURN; return wxBREAK_FOR_SELECTION; }
  else if (v == breakType_wxBREAK_FOR_USER_1_sym) { READY_TO_RETURN; return wxBREAK_FOR_USER_1; }
  else if (v == breakType_wxBREAK_FOR_USER_2_sym) { READY_TO_RETURN; return wxBREAK_FOR_USER_2; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "breakType symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}

static Scheme_Object *bundle_symset_breakType(int v) {
  if (!breakType_wxBREAK_FOR_USER_2_sym) init_symset_breakType();
  switch (v) {
  case wxBREAK_FOR_CARET: return breakType_wxBREAK_FOR_CARET_sym;
  case wxBREAK_FOR_LINE: return breakType_wxBREAK_FOR_LINE_sym;
  case wxBREAK_FOR_SELECTION: return breakType_wxBREAK_FOR_SELECTION_sym;
  case wxBREAK_FOR_USER_1: return breakType_wxBREAK_FOR_USER_1_sym;
  case wxBREAK_FOR_USER_2: return breakType_wxBREAK_FOR_USER_2_sym;
  default: return NULL;
  }
}


# define Sym_FORWARD 1
# define Sym_BACKWARD -1
static Scheme_Object *direction_Sym_FORWARD_sym = NULL;
static Scheme_Object *direction_Sym_BACKWARD_sym = NULL;

static void init_symset_direction(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(direction_Sym_FORWARD_sym);
  direction_Sym_FORWARD_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("forward"));
  wxREGGLOB(direction_Sym_BACKWARD_sym);
  direction_Sym_BACKWARD_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("backward"));
}

static int unbundle_symset_direction(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!direction_Sym_BACKWARD_sym) WITH_VAR_STACK(init_symset_direction());
  if (0) { }
  else if (v == direction_Sym_FORWARD_sym) { READY_TO_RETURN; return Sym_FORWARD; }
  else if (v == direction_Sym_BACKWARD_sym) { READY_TO_RETURN; return Sym_BACKWARD; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "direction symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}

static Scheme_Object *bundle_symset_direction(int v) {
  if (!direction_Sym_BACKWARD_sym) init_symset_direction();
  switch (v) {
  case Sym_FORWARD: return direction_Sym_FORWARD_sym;
  case Sym_BACKWARD: return direction_Sym_BACKWARD_sym;
  default: return NULL;
  }
}


# define Sym_RIGHT 1
# define Sym_CENTER 0
# define Sym_LEFT -1
static Scheme_Object *horizontalAlignment_Sym_LEFT_sym = NULL;
static Scheme_Object *horizontalAlignment_Sym_RIGHT_sym = NULL;
static Scheme_Object *horizontalAlignment_Sym_CENTER_sym = NULL;

static void init_symset_horizontalAlignment(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(horizontalAlignment_Sym_LEFT_sym);
  horizontalAlignment_Sym_LEFT_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("left"));
  wxREGGLOB(horizontalAlignment_Sym_RIGHT_sym);
  horizontalAlignment_Sym_RIGHT_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("right"));
  wxREGGLOB(horizontalAlignment_Sym_CENTER_sym);
  horizontalAlignment_Sym_CENTER_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("center"));
}

static int unbundle_symset_horizontalAlignment(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!horizontalAlignment_Sym_CENTER_sym) WITH_VAR_STACK(init_symset_horizontalAlignment());
  if (0) { }
  else if (v == horizontalAlignment_Sym_LEFT_sym) { READY_TO_RETURN; return Sym_LEFT; }
  else if (v == horizontalAlignment_Sym_RIGHT_sym) { READY_TO_RETURN; return Sym_RIGHT; }
  else if (v == horizontalAlignment_Sym_CENTER_sym) { READY_TO_RETURN; return Sym_CENTER; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "horizontalAlignment symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}



static Scheme_Object *bufferType_wxEDIT_BUFFER_sym = NULL;
static Scheme_Object *bufferType_wxPASTEBOARD_BUFFER_sym = NULL;

static void init_symset_bufferType(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(bufferType_wxEDIT_BUFFER_sym);
  bufferType_wxEDIT_BUFFER_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("text"));
  wxREGGLOB(bufferType_wxPASTEBOARD_BUFFER_sym);
  bufferType_wxPASTEBOARD_BUFFER_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("pasteboard"));
}

static int unbundle_symset_bufferType(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!bufferType_wxPASTEBOARD_BUFFER_sym) WITH_VAR_STACK(init_symset_bufferType());
  if (0) { }
  else if (v == bufferType_wxEDIT_BUFFER_sym) { READY_TO_RETURN; return wxEDIT_BUFFER; }
  else if (v == bufferType_wxPASTEBOARD_BUFFER_sym) { READY_TO_RETURN; return wxPASTEBOARD_BUFFER; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "bufferType symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}

static Scheme_Object *bundle_symset_bufferType(int v) {
  if (!bufferType_wxPASTEBOARD_BUFFER_sym) init_symset_bufferType();
  switch (v) {
  case wxEDIT_BUFFER: return bufferType_wxEDIT_BUFFER_sym;
  case wxPASTEBOARD_BUFFER: return bufferType_wxPASTEBOARD_BUFFER_sym;
  default: return NULL;
  }
}


static Scheme_Object *fileType_wxMEDIA_FF_GUESS_sym = NULL;
static Scheme_Object *fileType_wxMEDIA_FF_STD_sym = NULL;
static Scheme_Object *fileType_wxMEDIA_FF_TEXT_sym = NULL;
static Scheme_Object *fileType_wxMEDIA_FF_TEXT_FORCE_CR_sym = NULL;
static Scheme_Object *fileType_wxMEDIA_FF_SAME_sym = NULL;
static Scheme_Object *fileType_wxMEDIA_FF_COPY_sym = NULL;

static void init_symset_fileType(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(fileType_wxMEDIA_FF_GUESS_sym);
  fileType_wxMEDIA_FF_GUESS_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("guess"));
  wxREGGLOB(fileType_wxMEDIA_FF_STD_sym);
  fileType_wxMEDIA_FF_STD_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("standard"));
  wxREGGLOB(fileType_wxMEDIA_FF_TEXT_sym);
  fileType_wxMEDIA_FF_TEXT_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("text"));
  wxREGGLOB(fileType_wxMEDIA_FF_TEXT_FORCE_CR_sym);
  fileType_wxMEDIA_FF_TEXT_FORCE_CR_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("text-force-cr"));
  wxREGGLOB(fileType_wxMEDIA_FF_SAME_sym);
  fileType_wxMEDIA_FF_SAME_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("same"));
  wxREGGLOB(fileType_wxMEDIA_FF_COPY_sym);
  fileType_wxMEDIA_FF_COPY_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("copy"));
}

static int unbundle_symset_fileType(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!fileType_wxMEDIA_FF_COPY_sym) WITH_VAR_STACK(init_symset_fileType());
  if (0) { }
  else if (v == fileType_wxMEDIA_FF_GUESS_sym) { READY_TO_RETURN; return wxMEDIA_FF_GUESS; }
  else if (v == fileType_wxMEDIA_FF_STD_sym) { READY_TO_RETURN; return wxMEDIA_FF_STD; }
  else if (v == fileType_wxMEDIA_FF_TEXT_sym) { READY_TO_RETURN; return wxMEDIA_FF_TEXT; }
  else if (v == fileType_wxMEDIA_FF_TEXT_FORCE_CR_sym) { READY_TO_RETURN; return wxMEDIA_FF_TEXT_FORCE_CR; }
  else if (v == fileType_wxMEDIA_FF_SAME_sym) { READY_TO_RETURN; return wxMEDIA_FF_SAME; }
  else if (v == fileType_wxMEDIA_FF_COPY_sym) { READY_TO_RETURN; return wxMEDIA_FF_COPY; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "fileType symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}

static Scheme_Object *bundle_symset_fileType(int v) {
  if (!fileType_wxMEDIA_FF_COPY_sym) init_symset_fileType();
  switch (v) {
  case wxMEDIA_FF_GUESS: return fileType_wxMEDIA_FF_GUESS_sym;
  case wxMEDIA_FF_STD: return fileType_wxMEDIA_FF_STD_sym;
  case wxMEDIA_FF_TEXT: return fileType_wxMEDIA_FF_TEXT_sym;
  case wxMEDIA_FF_TEXT_FORCE_CR: return fileType_wxMEDIA_FF_TEXT_FORCE_CR_sym;
  case wxMEDIA_FF_SAME: return fileType_wxMEDIA_FF_SAME_sym;
  case wxMEDIA_FF_COPY: return fileType_wxMEDIA_FF_COPY_sym;
  default: return NULL;
  }
}



static Scheme_Object *focus_wxFOCUS_IMMEDIATE_sym = NULL;
static Scheme_Object *focus_wxFOCUS_DISPLAY_sym = NULL;
static Scheme_Object *focus_wxFOCUS_GLOBAL_sym = NULL;

static void init_symset_focus(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(focus_wxFOCUS_IMMEDIATE_sym);
  focus_wxFOCUS_IMMEDIATE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("immediate"));
  wxREGGLOB(focus_wxFOCUS_DISPLAY_sym);
  focus_wxFOCUS_DISPLAY_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("display"));
  wxREGGLOB(focus_wxFOCUS_GLOBAL_sym);
  focus_wxFOCUS_GLOBAL_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("global"));
}

static int unbundle_symset_focus(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!focus_wxFOCUS_GLOBAL_sym) WITH_VAR_STACK(init_symset_focus());
  if (0) { }
  else if (v == focus_wxFOCUS_IMMEDIATE_sym) { READY_TO_RETURN; return wxFOCUS_IMMEDIATE; }
  else if (v == focus_wxFOCUS_DISPLAY_sym) { READY_TO_RETURN; return wxFOCUS_DISPLAY; }
  else if (v == focus_wxFOCUS_GLOBAL_sym) { READY_TO_RETURN; return wxFOCUS_GLOBAL; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "focus symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}

static Scheme_Object *bundle_symset_focus(int v) {
  if (!focus_wxFOCUS_GLOBAL_sym) init_symset_focus();
  switch (v) {
  case wxFOCUS_IMMEDIATE: return focus_wxFOCUS_IMMEDIATE_sym;
  case wxFOCUS_DISPLAY: return focus_wxFOCUS_DISPLAY_sym;
  case wxFOCUS_GLOBAL: return focus_wxFOCUS_GLOBAL_sym;
  default: return NULL;
  }
}


# define Sym_END 1
# define Sym_START -1
# define Sym_NONE 0
static Scheme_Object *bias_Sym_START_sym = NULL;
static Scheme_Object *bias_Sym_NONE_sym = NULL;
static Scheme_Object *bias_Sym_END_sym = NULL;

static void init_symset_bias(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(bias_Sym_START_sym);
  bias_Sym_START_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("start"));
  wxREGGLOB(bias_Sym_NONE_sym);
  bias_Sym_NONE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("none"));
  wxREGGLOB(bias_Sym_END_sym);
  bias_Sym_END_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("end"));
}

static int unbundle_symset_bias(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!bias_Sym_END_sym) WITH_VAR_STACK(init_symset_bias());
  if (0) { }
  else if (v == bias_Sym_START_sym) { READY_TO_RETURN; return Sym_START; }
  else if (v == bias_Sym_NONE_sym) { READY_TO_RETURN; return Sym_NONE; }
  else if (v == bias_Sym_END_sym) { READY_TO_RETURN; return Sym_END; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "bias symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}

static Scheme_Object *bundle_symset_bias(int v) {
  if (!bias_Sym_END_sym) init_symset_bias();
  switch (v) {
  case Sym_START: return bias_Sym_START_sym;
  case Sym_NONE: return bias_Sym_NONE_sym;
  case Sym_END: return bias_Sym_END_sym;
  default: return NULL;
  }
}



static Scheme_Object *caret_wxSNIP_DRAW_NO_CARET_sym = NULL;
static Scheme_Object *caret_wxSNIP_DRAW_SHOW_CARET_sym = NULL;
static Scheme_Object *caret_wxSNIP_DRAW_SHOW_INACTIVE_CARET_sym = NULL;

static void init_symset_caret(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(caret_wxSNIP_DRAW_NO_CARET_sym);
  caret_wxSNIP_DRAW_NO_CARET_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("no-caret"));
  wxREGGLOB(caret_wxSNIP_DRAW_SHOW_CARET_sym);
  caret_wxSNIP_DRAW_SHOW_CARET_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("show-caret"));
  wxREGGLOB(caret_wxSNIP_DRAW_SHOW_INACTIVE_CARET_sym);
  caret_wxSNIP_DRAW_SHOW_INACTIVE_CARET_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("show-inactive-caret"));
}

static int unbundle_symset_caret(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!caret_wxSNIP_DRAW_SHOW_INACTIVE_CARET_sym) WITH_VAR_STACK(init_symset_caret());
  if (0) { }
  else if (v == caret_wxSNIP_DRAW_NO_CARET_sym) { READY_TO_RETURN; return wxSNIP_DRAW_NO_CARET; }
  else if (v == caret_wxSNIP_DRAW_SHOW_CARET_sym) { READY_TO_RETURN; return wxSNIP_DRAW_SHOW_CARET; }
  else if (v == caret_wxSNIP_DRAW_SHOW_INACTIVE_CARET_sym) { READY_TO_RETURN; return wxSNIP_DRAW_SHOW_INACTIVE_CARET; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "caret symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}

static Scheme_Object *bundle_symset_caret(int v) {
  if (!caret_wxSNIP_DRAW_SHOW_INACTIVE_CARET_sym) init_symset_caret();
  switch (v) {
  case wxSNIP_DRAW_NO_CARET: return caret_wxSNIP_DRAW_NO_CARET_sym;
  case wxSNIP_DRAW_SHOW_CARET: return caret_wxSNIP_DRAW_SHOW_CARET_sym;
  case wxSNIP_DRAW_SHOW_INACTIVE_CARET: return caret_wxSNIP_DRAW_SHOW_INACTIVE_CARET_sym;
  default: return NULL;
  }
}




#ifndef wx_mac
# define wxBITMAP_TYPE_PICT 101
#endif

#define wxBITMAP_TYPE_UNKNOWN 0
#define wxBITMAP_TYPE_GIF_MASK (wxBITMAP_TYPE_GIF | wxBITMAP_TYPE_MASK)
#define wxBITMAP_TYPE_PNG_MASK (wxBITMAP_TYPE_PNG | wxBITMAP_TYPE_MASK)

static Scheme_Object *bitmapType_wxBITMAP_TYPE_BMP_sym = NULL;
static Scheme_Object *bitmapType_wxBITMAP_TYPE_GIF_sym = NULL;
static Scheme_Object *bitmapType_wxBITMAP_TYPE_GIF_MASK_sym = NULL;
static Scheme_Object *bitmapType_wxBITMAP_TYPE_XBM_sym = NULL;
static Scheme_Object *bitmapType_wxBITMAP_TYPE_XPM_sym = NULL;
static Scheme_Object *bitmapType_wxBITMAP_TYPE_PICT_sym = NULL;
static Scheme_Object *bitmapType_wxBITMAP_TYPE_JPEG_sym = NULL;
static Scheme_Object *bitmapType_wxBITMAP_TYPE_PNG_sym = NULL;
static Scheme_Object *bitmapType_wxBITMAP_TYPE_PNG_MASK_sym = NULL;
static Scheme_Object *bitmapType_wxBITMAP_TYPE_UNKNOWN_sym = NULL;
static Scheme_Object *bitmapType_wxBITMAP_TYPE_MASK_sym = NULL;

static void init_symset_bitmapType(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(bitmapType_wxBITMAP_TYPE_BMP_sym);
  bitmapType_wxBITMAP_TYPE_BMP_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("bmp"));
  wxREGGLOB(bitmapType_wxBITMAP_TYPE_GIF_sym);
  bitmapType_wxBITMAP_TYPE_GIF_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("gif"));
  wxREGGLOB(bitmapType_wxBITMAP_TYPE_GIF_MASK_sym);
  bitmapType_wxBITMAP_TYPE_GIF_MASK_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("gif/mask"));
  wxREGGLOB(bitmapType_wxBITMAP_TYPE_XBM_sym);
  bitmapType_wxBITMAP_TYPE_XBM_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("xbm"));
  wxREGGLOB(bitmapType_wxBITMAP_TYPE_XPM_sym);
  bitmapType_wxBITMAP_TYPE_XPM_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("xpm"));
  wxREGGLOB(bitmapType_wxBITMAP_TYPE_PICT_sym);
  bitmapType_wxBITMAP_TYPE_PICT_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("pict"));
  wxREGGLOB(bitmapType_wxBITMAP_TYPE_JPEG_sym);
  bitmapType_wxBITMAP_TYPE_JPEG_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("jpeg"));
  wxREGGLOB(bitmapType_wxBITMAP_TYPE_PNG_sym);
  bitmapType_wxBITMAP_TYPE_PNG_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("png"));
  wxREGGLOB(bitmapType_wxBITMAP_TYPE_PNG_MASK_sym);
  bitmapType_wxBITMAP_TYPE_PNG_MASK_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("png/mask"));
  wxREGGLOB(bitmapType_wxBITMAP_TYPE_UNKNOWN_sym);
  bitmapType_wxBITMAP_TYPE_UNKNOWN_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("unknown"));
  wxREGGLOB(bitmapType_wxBITMAP_TYPE_MASK_sym);
  bitmapType_wxBITMAP_TYPE_MASK_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("unknown/mask"));
}

static int unbundle_symset_bitmapType(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!bitmapType_wxBITMAP_TYPE_MASK_sym) WITH_VAR_STACK(init_symset_bitmapType());
  if (0) { }
  else if (v == bitmapType_wxBITMAP_TYPE_BMP_sym) { READY_TO_RETURN; return wxBITMAP_TYPE_BMP; }
  else if (v == bitmapType_wxBITMAP_TYPE_GIF_sym) { READY_TO_RETURN; return wxBITMAP_TYPE_GIF; }
  else if (v == bitmapType_wxBITMAP_TYPE_GIF_MASK_sym) { READY_TO_RETURN; return wxBITMAP_TYPE_GIF_MASK; }
  else if (v == bitmapType_wxBITMAP_TYPE_XBM_sym) { READY_TO_RETURN; return wxBITMAP_TYPE_XBM; }
  else if (v == bitmapType_wxBITMAP_TYPE_XPM_sym) { READY_TO_RETURN; return wxBITMAP_TYPE_XPM; }
  else if (v == bitmapType_wxBITMAP_TYPE_PICT_sym) { READY_TO_RETURN; return wxBITMAP_TYPE_PICT; }
  else if (v == bitmapType_wxBITMAP_TYPE_JPEG_sym) { READY_TO_RETURN; return wxBITMAP_TYPE_JPEG; }
  else if (v == bitmapType_wxBITMAP_TYPE_PNG_sym) { READY_TO_RETURN; return wxBITMAP_TYPE_PNG; }
  else if (v == bitmapType_wxBITMAP_TYPE_PNG_MASK_sym) { READY_TO_RETURN; return wxBITMAP_TYPE_PNG_MASK; }
  else if (v == bitmapType_wxBITMAP_TYPE_UNKNOWN_sym) { READY_TO_RETURN; return wxBITMAP_TYPE_UNKNOWN; }
  else if (v == bitmapType_wxBITMAP_TYPE_MASK_sym) { READY_TO_RETURN; return wxBITMAP_TYPE_MASK; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "bitmapType symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}

static Scheme_Object *bundle_symset_bitmapType(int v) {
  if (!bitmapType_wxBITMAP_TYPE_MASK_sym) init_symset_bitmapType();
  switch (v) {
  case wxBITMAP_TYPE_BMP: return bitmapType_wxBITMAP_TYPE_BMP_sym;
  case wxBITMAP_TYPE_GIF: return bitmapType_wxBITMAP_TYPE_GIF_sym;
  case wxBITMAP_TYPE_GIF_MASK: return bitmapType_wxBITMAP_TYPE_GIF_MASK_sym;
  case wxBITMAP_TYPE_XBM: return bitmapType_wxBITMAP_TYPE_XBM_sym;
  case wxBITMAP_TYPE_XPM: return bitmapType_wxBITMAP_TYPE_XPM_sym;
  case wxBITMAP_TYPE_PICT: return bitmapType_wxBITMAP_TYPE_PICT_sym;
  case wxBITMAP_TYPE_JPEG: return bitmapType_wxBITMAP_TYPE_JPEG_sym;
  case wxBITMAP_TYPE_PNG: return bitmapType_wxBITMAP_TYPE_PNG_sym;
  case wxBITMAP_TYPE_PNG_MASK: return bitmapType_wxBITMAP_TYPE_PNG_MASK_sym;
  case wxBITMAP_TYPE_UNKNOWN: return bitmapType_wxBITMAP_TYPE_UNKNOWN_sym;
  case wxBITMAP_TYPE_MASK: return bitmapType_wxBITMAP_TYPE_MASK_sym;
  default: return NULL;
  }
}



# define Sym_END_ONLY 2
# define Sym_START_ONLY -2
static Scheme_Object *Bias_Sym_START_ONLY_sym = NULL;
static Scheme_Object *Bias_Sym_START_sym = NULL;
static Scheme_Object *Bias_Sym_NONE_sym = NULL;
static Scheme_Object *Bias_Sym_END_sym = NULL;
static Scheme_Object *Bias_Sym_END_ONLY_sym = NULL;

static void init_symset_Bias(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(Bias_Sym_START_ONLY_sym);
  Bias_Sym_START_ONLY_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("start-only"));
  wxREGGLOB(Bias_Sym_START_sym);
  Bias_Sym_START_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("start"));
  wxREGGLOB(Bias_Sym_NONE_sym);
  Bias_Sym_NONE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("none"));
  wxREGGLOB(Bias_Sym_END_sym);
  Bias_Sym_END_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("end"));
  wxREGGLOB(Bias_Sym_END_ONLY_sym);
  Bias_Sym_END_ONLY_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("end-only"));
}

static int unbundle_symset_Bias(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!Bias_Sym_END_ONLY_sym) WITH_VAR_STACK(init_symset_Bias());
  if (0) { }
  else if (v == Bias_Sym_START_ONLY_sym) { READY_TO_RETURN; return Sym_START_ONLY; }
  else if (v == Bias_Sym_START_sym) { READY_TO_RETURN; return Sym_START; }
  else if (v == Bias_Sym_NONE_sym) { READY_TO_RETURN; return Sym_NONE; }
  else if (v == Bias_Sym_END_sym) { READY_TO_RETURN; return Sym_END; }
  else if (v == Bias_Sym_END_ONLY_sym) { READY_TO_RETURN; return Sym_END_ONLY; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "Bias symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}







/* 
   X = Not meant for virtual, defined in wxMediaEdit/wxMediaPasteboard
       and overloaded there
   Y = Virtual, defined in wxMediaEdit/wxMediaPasteboard
   Z = Virtual, defined in wxMediaBuffer 
*/




































			











#undef l_ADDRESS
#undef l_DEREF
#undef l_TEST
#undef l_POINT
#undef l_TYPE
#undef l_LIST_ITEM_BUNDLE
#undef l_LIST_ITEM_UNBUNDLE
#undef l_MAKE_LIST
#undef l_MAKE_ARRAY
#undef l_EXTRA
#undef l_TERMINATE
#undef l_COPY
#undef l_OKTEST
#undef l_INTTYPE

#define l_ADDRESS 
#define l_DEREF 
#define l_NEWATOMIC (UseGC)
#define l_NULLOK 0
#define l_TEST 
#define l_POINT 
#define l_EXTRA 0
#define l_TERMINATE 
#define l_COPY l_COPYDEST=l_COPYSRC;
#define l_OKTEST 
#define l_INTTYPE int
#define l_DIRECTMALLOC 0

#define l_TYPE long
#define l_LIST_ITEM_BUNDLE objscheme_bundle_long
#define l_LIST_ITEM_UNBUNDLE objscheme_unbundle_long
#define l_MAKE_LIST __MakelongList
#define l_MAKE_ARRAY __MakelongArray





static Scheme_Object *l_MAKE_LIST(l_TYPE l_POINT *f, l_INTTYPE c)
{
  Scheme_Object *cdr = scheme_null, *obj = NULL;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, cdr);

  while (c--) {
    obj = WITH_VAR_STACK(l_LIST_ITEM_BUNDLE(l_ADDRESS f[c]));
    cdr = WITH_VAR_STACK(scheme_make_pair(obj, cdr));
  }
  
  READY_TO_RETURN;

  return cdr;
}

static l_TYPE l_POINT *l_MAKE_ARRAY(Scheme_Object *l, l_INTTYPE *c, char *who)
{
  Scheme_Object *orig_l = l;
  int i = 0;
  long len;
  l_TYPE l_POINT *f = NULL;

  SETUP_VAR_STACK(3);
  VAR_STACK_PUSH(0, l);
  VAR_STACK_PUSH(1, orig_l);
  VAR_STACK_PUSH(2, f);

  len = WITH_VAR_STACK(scheme_proper_list_length(l));
  if (len < 0) WITH_VAR_STACK(scheme_wrong_type(who, "proper-list", -1, 0, &l));
  if (c) *c = len;

  if (!(len + l_EXTRA)) {
    READY_TO_RETURN;
    return NULL;
  }

#if l_DIRECTMALLOC
  f = (l_TYPE l_POINT *)WITH_VAR_STACK(GC_malloc_atomic(sizeof(l_TYPE l_POINT) * (len + l_EXTRA)));
#else
  f = WITH_VAR_STACK(new l_NEWATOMIC l_TYPE l_POINT[len + l_EXTRA]);
#endif

  while (!SCHEME_NULLP(l)) {
    if (!SCHEME_LISTP(l)) {
      WITH_VAR_STACK(scheme_arg_mismatch(who, "expected a proper list: ", orig_l));
      READY_TO_RETURN;
      return NULL;
    }

#define l_COPYDEST f[i]
#define l_COPYSRC (l_DEREF WITH_VAR_STACK(l_LIST_ITEM_UNBUNDLE(SCHEME_CAR(l), who l_TEST)))

    l_COPY

    l_OKTEST

    i++;

    l = SCHEME_CDR(l);
  }
  l_TERMINATE

  READY_TO_RETURN;

  return f;
}




















static void WordbreakCallbackToScheme(wxMediaEdit *,long*,long*,int,Scheme_Object *);





static void WordbreakCallbackToScheme(wxMediaEdit *media,
				      long *start, long *end,
				      int reason,
				      Scheme_Object *f)
{
    Scheme_Object *p[4], *s = NULL, *e = NULL;
    SETUP_VAR_STACK(8);
    VAR_STACK_PUSH_ARRAY(0, p, 4);
    VAR_STACK_PUSH(3, s);
    VAR_STACK_PUSH(4, e);
    VAR_STACK_PUSH(5, start);
    VAR_STACK_PUSH(6, end);
    VAR_STACK_PUSH(7, f);

    p[0] = p[1] = p[2] = p[3] = NULL;

    p[0] = WITH_VAR_STACK(objscheme_bundle_wxMediaEdit(media));
    if (start)
      s = WITH_VAR_STACK(scheme_box(WITH_VAR_STACK(objscheme_bundle_integer(*start))));
    else
      s = XC_SCHEME_NULL;
    if (end)
      e = WITH_VAR_STACK(scheme_box(WITH_VAR_STACK(objscheme_bundle_integer(*end))));
    else
      e = XC_SCHEME_NULL;
    p[1] = s;
    p[2] = e;
    p[3] = WITH_VAR_STACK(bundle_symset_breakType(reason));

    WITH_VAR_STACK(scheme_apply_multi(f, 4, p));
    if (start)
      *start = WITH_VAR_STACK(objscheme_unbundle_integer(WITH_VAR_STACK(scheme_unbox(s)), "Scheme wordbreak callback"));
    if (end)
      *end = WITH_VAR_STACK(objscheme_unbundle_integer(WITH_VAR_STACK(scheme_unbox(e)), "Scheme wordbreak callback"));

    READY_TO_RETURN;
}

static void ClickbackToScheme(wxMediaEdit *media,
			      long start, long end,
			      Scheme_Object *f)
{
  Scheme_Object *p[3];
  SETUP_VAR_STACK(4);
  VAR_STACK_PUSH_ARRAY(0, p, 3);
  VAR_STACK_PUSH(3, f);

  p[0] = p[1] = p[2] = NULL;

  p[0] = WITH_VAR_STACK(objscheme_bundle_wxMediaEdit(media));
  p[1] = WITH_VAR_STACK(objscheme_bundle_integer(start));
  p[2] = WITH_VAR_STACK(objscheme_bundle_integer(end));

  WITH_VAR_STACK(scheme_apply_multi(f, 3, p));

  READY_TO_RETURN;
}

class os_wxMediaEdit : public wxMediaEdit {
 public:
  Scheme_Object *scroll_closure;

  os_wxMediaEdit CONSTRUCTOR_ARGS((nndouble x0 = 1.0, double* x1 = NULL, int x2 = 0));
  ~os_wxMediaEdit();
  class wxTabSnip* OnNewTabSnip();
  class wxTextSnip* OnNewTextSnip();
  void SetRegionData(nnlong x0, nnlong x1, class wxBufferData* x2);
  class wxBufferData* GetRegionData(nnlong x0, nnlong x1);
  void OnMergeSnips(nnlong x0);
  void OnSplitSnip(nnlong x0);
  void AfterSetSizeConstraint();
  void OnSetSizeConstraint();
  Bool CanSetSizeConstraint();
  void AfterSetPosition();
  void AfterChangeStyle(nnlong x0, nnlong x1);
  void OnChangeStyle(nnlong x0, nnlong x1);
  Bool CanChangeStyle(nnlong x0, nnlong x1);
  void AfterDelete(nnlong x0, nnlong x1);
  void OnDelete(nnlong x0, nnlong x1);
  Bool CanDelete(nnlong x0, nnlong x1);
  void AfterInsert(nnlong x0, nnlong x1);
  void OnInsert(nnlong x0, nnlong x1);
  Bool CanInsert(nnlong x0, nnlong x1);
  void DoPasteSelection(nnlong x0, ExactLong x1);
  void DoPaste(nnlong x0, ExactLong x1);
  void DoCopy(nnlong x0, nnlong x1, ExactLong x2, Bool x3);
  void SetAnchor(Bool x0);
  string GetDefaultStyleName();
  npathname PutFile(nepathname x0, nepathname x1);
  npathname GetFile(nepathname x0);
  void AfterEditSequence();
  void OnEditSequence();
  void AfterLoadFile(Bool x0);
  void OnLoadFile(epathname x0, int x1);
  Bool CanLoadFile(epathname x0, int x1);
  void AfterSaveFile(Bool x0);
  void OnSaveFile(epathname x0, int x1);
  Bool CanSaveFile(epathname x0, int x1);
  class wxSnip* OnNewBox(int x0);
  class wxImageSnip* OnNewImageSnip(nxpathname x0, int x1, Bool x2, Bool x3);
  void InvalidateBitmapCache(double x0 = 0.0, double x1 = 0.0, double x2 = -1.0, double x3 = -1.0);
  void OnPaint(Bool x0, class wxDC* x1, double x2, double x3, double x4, double x5, double x6, double x7, int x8);
  Bool WriteFootersToFile(class wxMediaStreamOut* x0);
  Bool WriteHeadersToFile(class wxMediaStreamOut* x0);
  Bool ReadFooterFromFile(class wxMediaStreamIn* x0, string x1);
  Bool ReadHeaderFromFile(class wxMediaStreamIn* x0, string x1);
  void SetFilename(nxpathname x0, Bool x1 = FALSE);
  Bool ReleaseSnip(class wxSnip* x0);
  void OnSnipModified(class wxSnip* x0, Bool x1);
  void SetModified(Bool x0);
  void SetSnipData(class wxSnip* x0, class wxBufferData* x1);
  class wxBufferData* GetSnipData(class wxSnip* x0);
  void NeedsUpdate(class wxSnip* x0, double x1, double x2, nndouble x3, nndouble x4);
  void Resized(class wxSnip* x0, Bool x1);
  void SetCaretOwner(class wxSnip* x0, int x1 = wxFOCUS_IMMEDIATE);
  Bool ScrollTo(class wxSnip* x0, double x1, double x2, nndouble x3, nndouble x4, Bool x5, int x6 = 0);
  void OnDisplaySizeWhenReady();
  void OnDisplaySize();
  void OnChange();
  void OnFocus(Bool x0);
  void OnDefaultChar(class wxKeyEvent* x0);
  void OnDefaultEvent(class wxMouseEvent* x0);
  void OnLocalChar(class wxKeyEvent* x0);
  void OnLocalEvent(class wxMouseEvent* x0);
  double GetSpace();
  double GetDescent();
  void GetExtent(nndouble* x0, nndouble* x1);
  void BlinkCaret();
  void OwnCaret(Bool x0);
  void Refresh(double x0, double x1, nndouble x2, nndouble x3, int x4, class wxColour* x5);
  class wxCursor* AdjustCursor(class wxMouseEvent* x0);
  void OnChar(class wxKeyEvent* x0);
  void OnEvent(class wxMouseEvent* x0);
  void CopySelfTo(class wxMediaBuffer* x0);
  class wxMediaBuffer* CopySelf();
#ifdef MZ_PRECISE_GC
  void gcMark();
  void gcFixup();
#endif
};

#ifdef MZ_PRECISE_GC
void os_wxMediaEdit::gcMark() {
  wxMediaEdit::gcMark();
  gcMARK_TYPED(Scheme_Object *, scroll_closure);
}
void os_wxMediaEdit::gcFixup() {
  wxMediaEdit::gcFixup();
  gcFIXUP_TYPED(Scheme_Object *, scroll_closure);
}
#endif

static Scheme_Object *os_wxMediaEdit_class;

os_wxMediaEdit::os_wxMediaEdit CONSTRUCTOR_ARGS((nndouble x0, double* x1, int x2))
CONSTRUCTOR_INIT(: wxMediaEdit(x0, x1, x2))
{
}

os_wxMediaEdit::~os_wxMediaEdit()
{
    objscheme_destroy(this, (Scheme_Object *) __gc_external);
}

static Scheme_Object *os_wxMediaEditOnNewTabSnip(int n, Scheme_Object *p[]);

class wxTabSnip* os_wxMediaEdit::OnNewTabSnip()
{
  Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "on-new-tab-snip", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditOnNewTabSnip)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaEdit::OnNewTabSnip();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
  
  
  {
     class wxTabSnip* resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_wxTabSnip(v, "on-new-tab-snip in text%"", extracting return value", 0));
     READY_TO_RETURN;
     return resval;
  }
  }
}

static Scheme_Object *os_wxMediaEditOnNewTextSnip(int n, Scheme_Object *p[]);

class wxTextSnip* os_wxMediaEdit::OnNewTextSnip()
{
  Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "on-new-string-snip", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditOnNewTextSnip)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaEdit::OnNewTextSnip();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
  
  
  {
     class wxTextSnip* resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_wxTextSnip(v, "on-new-string-snip in text%"", extracting return value", 0));
     READY_TO_RETURN;
     return resval;
  }
  }
}

static Scheme_Object *os_wxMediaEditSetRegionData(int n, Scheme_Object *p[]);

void os_wxMediaEdit::SetRegionData(nnlong x0, nnlong x1, class wxBufferData* x2)
{
  Scheme_Object *p[POFFSET+3] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+3);
  VAR_STACK_PUSH(5, x2);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "set-region-data", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditSetRegionData)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::SetRegionData(x0, x1, x2);
  } else {
  
  p[POFFSET+0] = scheme_make_integer(x0);
  p[POFFSET+1] = scheme_make_integer(x1);
  p[POFFSET+2] = WITH_VAR_STACK(objscheme_bundle_wxBufferData(x2));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+3, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditGetRegionData(int n, Scheme_Object *p[]);

class wxBufferData* os_wxMediaEdit::GetRegionData(nnlong x0, nnlong x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "get-region-data", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditGetRegionData)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaEdit::GetRegionData(x0, x1);
  } else {
  
  p[POFFSET+0] = scheme_make_integer(x0);
  p[POFFSET+1] = scheme_make_integer(x1);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
  
  
  {
     class wxBufferData* resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_wxBufferData(v, "get-region-data in text%"", extracting return value", 1));
     READY_TO_RETURN;
     return resval;
  }
  }
}

static Scheme_Object *os_wxMediaEditOnMergeSnips(int n, Scheme_Object *p[]);

void os_wxMediaEdit::OnMergeSnips(nnlong x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "after-merge-snips", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditOnMergeSnips)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::OnMergeSnips(x0);
  } else {
  
  p[POFFSET+0] = scheme_make_integer(x0);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditOnSplitSnip(int n, Scheme_Object *p[]);

void os_wxMediaEdit::OnSplitSnip(nnlong x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "after-split-snip", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditOnSplitSnip)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::OnSplitSnip(x0);
  } else {
  
  p[POFFSET+0] = scheme_make_integer(x0);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditAfterSetSizeConstraint(int n, Scheme_Object *p[]);

void os_wxMediaEdit::AfterSetSizeConstraint()
{
  Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "after-set-size-constraint", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditAfterSetSizeConstraint)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::AfterSetSizeConstraint();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditOnSetSizeConstraint(int n, Scheme_Object *p[]);

void os_wxMediaEdit::OnSetSizeConstraint()
{
  Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "on-set-size-constraint", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditOnSetSizeConstraint)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::OnSetSizeConstraint();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditCanSetSizeConstraint(int n, Scheme_Object *p[]);

Bool os_wxMediaEdit::CanSetSizeConstraint()
{
  Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "can-set-size-constraint?", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditCanSetSizeConstraint)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaEdit::CanSetSizeConstraint();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
  
  
  {
     Bool resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_bool(v, "can-set-size-constraint? in text%"", extracting return value"));
     READY_TO_RETURN;
     return resval;
  }
  }
}

static Scheme_Object *os_wxMediaEditAfterSetPosition(int n, Scheme_Object *p[]);

void os_wxMediaEdit::AfterSetPosition()
{
  Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "after-set-position", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditAfterSetPosition)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::AfterSetPosition();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditAfterChangeStyle(int n, Scheme_Object *p[]);

void os_wxMediaEdit::AfterChangeStyle(nnlong x0, nnlong x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "after-change-style", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditAfterChangeStyle)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::AfterChangeStyle(x0, x1);
  } else {
  
  p[POFFSET+0] = scheme_make_integer(x0);
  p[POFFSET+1] = scheme_make_integer(x1);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditOnChangeStyle(int n, Scheme_Object *p[]);

void os_wxMediaEdit::OnChangeStyle(nnlong x0, nnlong x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "on-change-style", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditOnChangeStyle)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::OnChangeStyle(x0, x1);
  } else {
  
  p[POFFSET+0] = scheme_make_integer(x0);
  p[POFFSET+1] = scheme_make_integer(x1);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditCanChangeStyle(int n, Scheme_Object *p[]);

Bool os_wxMediaEdit::CanChangeStyle(nnlong x0, nnlong x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "can-change-style?", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditCanChangeStyle)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaEdit::CanChangeStyle(x0, x1);
  } else {
  
  p[POFFSET+0] = scheme_make_integer(x0);
  p[POFFSET+1] = scheme_make_integer(x1);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
  
  
  {
     Bool resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_bool(v, "can-change-style? in text%"", extracting return value"));
     READY_TO_RETURN;
     return resval;
  }
  }
}

static Scheme_Object *os_wxMediaEditAfterDelete(int n, Scheme_Object *p[]);

void os_wxMediaEdit::AfterDelete(nnlong x0, nnlong x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "after-delete", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditAfterDelete)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::AfterDelete(x0, x1);
  } else {
  
  p[POFFSET+0] = scheme_make_integer(x0);
  p[POFFSET+1] = scheme_make_integer(x1);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditOnDelete(int n, Scheme_Object *p[]);

void os_wxMediaEdit::OnDelete(nnlong x0, nnlong x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "on-delete", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditOnDelete)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::OnDelete(x0, x1);
  } else {
  
  p[POFFSET+0] = scheme_make_integer(x0);
  p[POFFSET+1] = scheme_make_integer(x1);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditCanDelete(int n, Scheme_Object *p[]);

Bool os_wxMediaEdit::CanDelete(nnlong x0, nnlong x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "can-delete?", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditCanDelete)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaEdit::CanDelete(x0, x1);
  } else {
  
  p[POFFSET+0] = scheme_make_integer(x0);
  p[POFFSET+1] = scheme_make_integer(x1);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
  
  
  {
     Bool resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_bool(v, "can-delete? in text%"", extracting return value"));
     READY_TO_RETURN;
     return resval;
  }
  }
}

static Scheme_Object *os_wxMediaEditAfterInsert(int n, Scheme_Object *p[]);

void os_wxMediaEdit::AfterInsert(nnlong x0, nnlong x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "after-insert", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditAfterInsert)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::AfterInsert(x0, x1);
  } else {
  
  p[POFFSET+0] = scheme_make_integer(x0);
  p[POFFSET+1] = scheme_make_integer(x1);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditOnInsert(int n, Scheme_Object *p[]);

void os_wxMediaEdit::OnInsert(nnlong x0, nnlong x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "on-insert", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditOnInsert)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::OnInsert(x0, x1);
  } else {
  
  p[POFFSET+0] = scheme_make_integer(x0);
  p[POFFSET+1] = scheme_make_integer(x1);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditCanInsert(int n, Scheme_Object *p[]);

Bool os_wxMediaEdit::CanInsert(nnlong x0, nnlong x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "can-insert?", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditCanInsert)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaEdit::CanInsert(x0, x1);
  } else {
  
  p[POFFSET+0] = scheme_make_integer(x0);
  p[POFFSET+1] = scheme_make_integer(x1);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
  
  
  {
     Bool resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_bool(v, "can-insert? in text%"", extracting return value"));
     READY_TO_RETURN;
     return resval;
  }
  }
}

static Scheme_Object *os_wxMediaEditDoPasteSelection(int n, Scheme_Object *p[]);

void os_wxMediaEdit::DoPasteSelection(nnlong x0, ExactLong x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "do-paste-x-selection", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditDoPasteSelection)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::DoPasteSelection(x0, x1);
  } else {
  
  p[POFFSET+0] = scheme_make_integer(x0);
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_integer_value(x1));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditDoPaste(int n, Scheme_Object *p[]);

void os_wxMediaEdit::DoPaste(nnlong x0, ExactLong x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "do-paste", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditDoPaste)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::DoPaste(x0, x1);
  } else {
  
  p[POFFSET+0] = scheme_make_integer(x0);
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_integer_value(x1));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditDoCopy(int n, Scheme_Object *p[]);

void os_wxMediaEdit::DoCopy(nnlong x0, nnlong x1, ExactLong x2, Bool x3)
{
  Scheme_Object *p[POFFSET+4] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+4);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "do-copy", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditDoCopy)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::DoCopy(x0, x1, x2, x3);
  } else {
  
  p[POFFSET+0] = scheme_make_integer(x0);
  p[POFFSET+1] = scheme_make_integer(x1);
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_integer_value(x2));
  p[POFFSET+3] = (x3 ? scheme_true : scheme_false);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+4, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditSetAnchor(int n, Scheme_Object *p[]);

void os_wxMediaEdit::SetAnchor(Bool x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "set-anchor", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditSetAnchor)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::SetAnchor(x0);
  } else {
  
  p[POFFSET+0] = (x0 ? scheme_true : scheme_false);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditGetDefaultStyleName(int n, Scheme_Object *p[]);

string os_wxMediaEdit::GetDefaultStyleName()
{
  Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "default-style-name", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditGetDefaultStyleName)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaEdit::GetDefaultStyleName();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
  
  
  {
     string resval;
     resval = (string)WITH_VAR_STACK(objscheme_unbundle_string(v, "default-style-name in text%"", extracting return value"));
     READY_TO_RETURN;
     return resval;
  }
  }
}

static Scheme_Object *os_wxMediaEditPutFile(int n, Scheme_Object *p[]);

npathname os_wxMediaEdit::PutFile(nepathname x0, nepathname x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(7);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
  VAR_STACK_PUSH(5, x0);
  VAR_STACK_PUSH(6, x1);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "put-file", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditPutFile)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaEdit::PutFile(x0, x1);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x0));
  p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x1));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
  
  
  {
     npathname resval;
     resval = (npathname)WITH_VAR_STACK(objscheme_unbundle_nullable_pathname(v, "put-file in text%"", extracting return value"));
     READY_TO_RETURN;
     return resval;
  }
  }
}

static Scheme_Object *os_wxMediaEditGetFile(int n, Scheme_Object *p[]);

npathname os_wxMediaEdit::GetFile(nepathname x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "get-file", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditGetFile)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaEdit::GetFile(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
  
  
  {
     npathname resval;
     resval = (npathname)WITH_VAR_STACK(objscheme_unbundle_nullable_pathname(v, "get-file in text%"", extracting return value"));
     READY_TO_RETURN;
     return resval;
  }
  }
}

static Scheme_Object *os_wxMediaEditAfterEditSequence(int n, Scheme_Object *p[]);

void os_wxMediaEdit::AfterEditSequence()
{
  Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "after-edit-sequence", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditAfterEditSequence)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::AfterEditSequence();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditOnEditSequence(int n, Scheme_Object *p[]);

void os_wxMediaEdit::OnEditSequence()
{
  Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "on-edit-sequence", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditOnEditSequence)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::OnEditSequence();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditAfterLoadFile(int n, Scheme_Object *p[]);

void os_wxMediaEdit::AfterLoadFile(Bool x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "after-load-file", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditAfterLoadFile)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::AfterLoadFile(x0);
  } else {
  
  p[POFFSET+0] = (x0 ? scheme_true : scheme_false);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditOnLoadFile(int n, Scheme_Object *p[]);

void os_wxMediaEdit::OnLoadFile(epathname x0, int x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "on-load-file", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditOnLoadFile)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::OnLoadFile(x0, x1);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x0));
  p[POFFSET+1] = WITH_VAR_STACK(bundle_symset_fileType(x1));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditCanLoadFile(int n, Scheme_Object *p[]);

Bool os_wxMediaEdit::CanLoadFile(epathname x0, int x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "can-load-file?", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditCanLoadFile)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaEdit::CanLoadFile(x0, x1);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x0));
  p[POFFSET+1] = WITH_VAR_STACK(bundle_symset_fileType(x1));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
  
  
  {
     Bool resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_bool(v, "can-load-file? in text%"", extracting return value"));
     READY_TO_RETURN;
     return resval;
  }
  }
}

static Scheme_Object *os_wxMediaEditAfterSaveFile(int n, Scheme_Object *p[]);

void os_wxMediaEdit::AfterSaveFile(Bool x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "after-save-file", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditAfterSaveFile)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::AfterSaveFile(x0);
  } else {
  
  p[POFFSET+0] = (x0 ? scheme_true : scheme_false);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditOnSaveFile(int n, Scheme_Object *p[]);

void os_wxMediaEdit::OnSaveFile(epathname x0, int x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "on-save-file", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditOnSaveFile)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::OnSaveFile(x0, x1);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x0));
  p[POFFSET+1] = WITH_VAR_STACK(bundle_symset_fileType(x1));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditCanSaveFile(int n, Scheme_Object *p[]);

Bool os_wxMediaEdit::CanSaveFile(epathname x0, int x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "can-save-file?", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditCanSaveFile)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaEdit::CanSaveFile(x0, x1);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x0));
  p[POFFSET+1] = WITH_VAR_STACK(bundle_symset_fileType(x1));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
  
  
  {
     Bool resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_bool(v, "can-save-file? in text%"", extracting return value"));
     READY_TO_RETURN;
     return resval;
  }
  }
}

static Scheme_Object *os_wxMediaEditOnNewBox(int n, Scheme_Object *p[]);

class wxSnip* os_wxMediaEdit::OnNewBox(int x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "on-new-box", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditOnNewBox)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaEdit::OnNewBox(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(bundle_symset_bufferType(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
  
  
  {
     class wxSnip* resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_wxSnip(v, "on-new-box in text%"", extracting return value", 0));
     READY_TO_RETURN;
     return resval;
  }
  }
}

static Scheme_Object *os_wxMediaEditOnNewImageSnip(int n, Scheme_Object *p[]);

class wxImageSnip* os_wxMediaEdit::OnNewImageSnip(nxpathname x0, int x1, Bool x2, Bool x3)
{
  Scheme_Object *p[POFFSET+4] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+4);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "on-new-image-snip", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditOnNewImageSnip)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaEdit::OnNewImageSnip(x0, x1, x2, x3);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x0));
  p[POFFSET+1] = WITH_VAR_STACK(bundle_symset_bitmapType(x1));
  p[POFFSET+2] = (x2 ? scheme_true : scheme_false);
  p[POFFSET+3] = (x3 ? scheme_true : scheme_false);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+4, p));
  
  
  {
     class wxImageSnip* resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_wxImageSnip(v, "on-new-image-snip in text%"", extracting return value", 0));
     READY_TO_RETURN;
     return resval;
  }
  }
}

static Scheme_Object *os_wxMediaEditInvalidateBitmapCache(int n, Scheme_Object *p[]);

void os_wxMediaEdit::InvalidateBitmapCache(double x0, double x1, double x2, double x3)
{
  Scheme_Object *p[POFFSET+4] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+4);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "invalidate-bitmap-cache", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditInvalidateBitmapCache)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::InvalidateBitmapCache(x0, x1, x2, x3);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(scheme_make_double(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(objscheme_bundle_nonnegative_symbol_double(x2, "end"));
  p[POFFSET+3] = WITH_VAR_STACK(objscheme_bundle_nonnegative_symbol_double(x3, "end"));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+4, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditOnPaint(int n, Scheme_Object *p[]);

void os_wxMediaEdit::OnPaint(Bool x0, class wxDC* x1, double x2, double x3, double x4, double x5, double x6, double x7, int x8)
{
  Scheme_Object *p[POFFSET+9] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+9);
  VAR_STACK_PUSH(5, x1);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "on-paint", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditOnPaint)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::OnPaint(x0, x1, x2, x3, x4, x5, x6, x7, x8);
  } else {
  
  p[POFFSET+0] = (x0 ? scheme_true : scheme_false);
  p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxDC(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = WITH_VAR_STACK(scheme_make_double(x3));
  p[POFFSET+4] = WITH_VAR_STACK(scheme_make_double(x4));
  p[POFFSET+5] = WITH_VAR_STACK(scheme_make_double(x5));
  p[POFFSET+6] = WITH_VAR_STACK(scheme_make_double(x6));
  p[POFFSET+7] = WITH_VAR_STACK(scheme_make_double(x7));
  p[POFFSET+8] = WITH_VAR_STACK(bundle_symset_caret(x8));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+9, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditWriteFootersToFile(int n, Scheme_Object *p[]);

Bool os_wxMediaEdit::WriteFootersToFile(class wxMediaStreamOut* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "write-footers-to-file", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditWriteFootersToFile)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaEdit::WriteFootersToFile(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxMediaStreamOut(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
  
  
  {
     Bool resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_bool(v, "write-footers-to-file in text%"", extracting return value"));
     READY_TO_RETURN;
     return resval;
  }
  }
}

static Scheme_Object *os_wxMediaEditWriteHeadersToFile(int n, Scheme_Object *p[]);

Bool os_wxMediaEdit::WriteHeadersToFile(class wxMediaStreamOut* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "write-headers-to-file", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditWriteHeadersToFile)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaEdit::WriteHeadersToFile(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxMediaStreamOut(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
  
  
  {
     Bool resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_bool(v, "write-headers-to-file in text%"", extracting return value"));
     READY_TO_RETURN;
     return resval;
  }
  }
}

static Scheme_Object *os_wxMediaEditReadFooterFromFile(int n, Scheme_Object *p[]);

Bool os_wxMediaEdit::ReadFooterFromFile(class wxMediaStreamIn* x0, string x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(7);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
  VAR_STACK_PUSH(5, x0);
  VAR_STACK_PUSH(6, x1);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "read-footer-from-file", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditReadFooterFromFile)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaEdit::ReadFooterFromFile(x0, x1);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxMediaStreamIn(x0));
  p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_string((char *)x1));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
  
  
  {
     Bool resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_bool(v, "read-footer-from-file in text%"", extracting return value"));
     READY_TO_RETURN;
     return resval;
  }
  }
}

static Scheme_Object *os_wxMediaEditReadHeaderFromFile(int n, Scheme_Object *p[]);

Bool os_wxMediaEdit::ReadHeaderFromFile(class wxMediaStreamIn* x0, string x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(7);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
  VAR_STACK_PUSH(5, x0);
  VAR_STACK_PUSH(6, x1);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "read-header-from-file", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditReadHeaderFromFile)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaEdit::ReadHeaderFromFile(x0, x1);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxMediaStreamIn(x0));
  p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_string((char *)x1));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
  
  
  {
     Bool resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_bool(v, "read-header-from-file in text%"", extracting return value"));
     READY_TO_RETURN;
     return resval;
  }
  }
}

static Scheme_Object *os_wxMediaEditSetFilename(int n, Scheme_Object *p[]);

void os_wxMediaEdit::SetFilename(nxpathname x0, Bool x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "set-filename", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditSetFilename)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::SetFilename(x0, x1);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x0));
  p[POFFSET+1] = (x1 ? scheme_true : scheme_false);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditReleaseSnip(int n, Scheme_Object *p[]);

Bool os_wxMediaEdit::ReleaseSnip(class wxSnip* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "release-snip", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditReleaseSnip)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaEdit::ReleaseSnip(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxSnip(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
  
  
  {
     Bool resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_bool(v, "release-snip in text%"", extracting return value"));
     READY_TO_RETURN;
     return resval;
  }
  }
}

static Scheme_Object *os_wxMediaEditOnSnipModified(int n, Scheme_Object *p[]);

void os_wxMediaEdit::OnSnipModified(class wxSnip* x0, Bool x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "on-snip-modified", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditOnSnipModified)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::OnSnipModified(x0, x1);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxSnip(x0));
  p[POFFSET+1] = (x1 ? scheme_true : scheme_false);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditSetModified(int n, Scheme_Object *p[]);

void os_wxMediaEdit::SetModified(Bool x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "set-modified", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditSetModified)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::SetModified(x0);
  } else {
  
  p[POFFSET+0] = (x0 ? scheme_true : scheme_false);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditSetSnipData(int n, Scheme_Object *p[]);

void os_wxMediaEdit::SetSnipData(class wxSnip* x0, class wxBufferData* x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(7);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
  VAR_STACK_PUSH(5, x0);
  VAR_STACK_PUSH(6, x1);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "set-snip-data", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditSetSnipData)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::SetSnipData(x0, x1);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxSnip(x0));
  p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxBufferData(x1));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditGetSnipData(int n, Scheme_Object *p[]);

class wxBufferData* os_wxMediaEdit::GetSnipData(class wxSnip* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "get-snip-data", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditGetSnipData)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaEdit::GetSnipData(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxSnip(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
  
  
  {
     class wxBufferData* resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_wxBufferData(v, "get-snip-data in text%"", extracting return value", 1));
     READY_TO_RETURN;
     return resval;
  }
  }
}

static Scheme_Object *os_wxMediaEditNeedsUpdate(int n, Scheme_Object *p[]);

void os_wxMediaEdit::NeedsUpdate(class wxSnip* x0, double x1, double x2, nndouble x3, nndouble x4)
{
  Scheme_Object *p[POFFSET+5] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+5);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "needs-update", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditNeedsUpdate)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::NeedsUpdate(x0, x1, x2, x3, x4);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxSnip(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = WITH_VAR_STACK(scheme_make_double(x3));
  p[POFFSET+4] = WITH_VAR_STACK(scheme_make_double(x4));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+5, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditResized(int n, Scheme_Object *p[]);

void os_wxMediaEdit::Resized(class wxSnip* x0, Bool x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "resized", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditResized)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::Resized(x0, x1);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxSnip(x0));
  p[POFFSET+1] = (x1 ? scheme_true : scheme_false);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditSetCaretOwner(int n, Scheme_Object *p[]);

void os_wxMediaEdit::SetCaretOwner(class wxSnip* x0, int x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "set-caret-owner", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditSetCaretOwner)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::SetCaretOwner(x0, x1);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxSnip(x0));
  p[POFFSET+1] = WITH_VAR_STACK(bundle_symset_focus(x1));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditScrollTo(int n, Scheme_Object *p[]);

Bool os_wxMediaEdit::ScrollTo(class wxSnip* x0, double x1, double x2, nndouble x3, nndouble x4, Bool x5, int x6)
{
  Scheme_Object *p[POFFSET+7] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+7);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "scroll-to", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditScrollTo)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaEdit::ScrollTo(x0, x1, x2, x3, x4, x5, x6);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxSnip(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = WITH_VAR_STACK(scheme_make_double(x3));
  p[POFFSET+4] = WITH_VAR_STACK(scheme_make_double(x4));
  p[POFFSET+5] = (x5 ? scheme_true : scheme_false);
  p[POFFSET+6] = WITH_VAR_STACK(bundle_symset_bias(x6));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+7, p));
  
  
  {
     Bool resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_bool(v, "scroll-to in text%"", extracting return value"));
     READY_TO_RETURN;
     return resval;
  }
  }
}

static Scheme_Object *os_wxMediaEditOnDisplaySizeWhenReady(int n, Scheme_Object *p[]);

void os_wxMediaEdit::OnDisplaySizeWhenReady()
{
  Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "on-display-size-when-ready", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditOnDisplaySizeWhenReady)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::OnDisplaySizeWhenReady();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditOnDisplaySize(int n, Scheme_Object *p[]);

void os_wxMediaEdit::OnDisplaySize()
{
  Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "on-display-size", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditOnDisplaySize)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::OnDisplaySize();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditOnChange(int n, Scheme_Object *p[]);

void os_wxMediaEdit::OnChange()
{
  Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "on-change", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditOnChange)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::OnChange();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditOnFocus(int n, Scheme_Object *p[]);

void os_wxMediaEdit::OnFocus(Bool x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "on-focus", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditOnFocus)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::OnFocus(x0);
  } else {
  
  p[POFFSET+0] = (x0 ? scheme_true : scheme_false);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditOnDefaultChar(int n, Scheme_Object *p[]);

void os_wxMediaEdit::OnDefaultChar(class wxKeyEvent* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "on-default-char", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditOnDefaultChar)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::OnDefaultChar(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditOnDefaultEvent(int n, Scheme_Object *p[]);

void os_wxMediaEdit::OnDefaultEvent(class wxMouseEvent* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "on-default-event", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditOnDefaultEvent)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::OnDefaultEvent(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditOnLocalChar(int n, Scheme_Object *p[]);

void os_wxMediaEdit::OnLocalChar(class wxKeyEvent* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "on-local-char", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditOnLocalChar)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::OnLocalChar(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditOnLocalEvent(int n, Scheme_Object *p[]);

void os_wxMediaEdit::OnLocalEvent(class wxMouseEvent* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "on-local-event", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditOnLocalEvent)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::OnLocalEvent(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditGetSpace(int n, Scheme_Object *p[]);

double os_wxMediaEdit::GetSpace()
{
  Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "get-space", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditGetSpace)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaEdit::GetSpace();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
  
  
  {
     double resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_double(v, "get-space in text%"", extracting return value"));
     READY_TO_RETURN;
     return resval;
  }
  }
}

static Scheme_Object *os_wxMediaEditGetDescent(int n, Scheme_Object *p[]);

double os_wxMediaEdit::GetDescent()
{
  Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "get-descent", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditGetDescent)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaEdit::GetDescent();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
  
  
  {
     double resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_double(v, "get-descent in text%"", extracting return value"));
     READY_TO_RETURN;
     return resval;
  }
  }
}

static Scheme_Object *os_wxMediaEditGetExtent(int n, Scheme_Object *p[]);

void os_wxMediaEdit::GetExtent(nndouble* x0, nndouble* x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;
  Scheme_Object *sbox_tmp;

  SETUP_VAR_STACK(7);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
  VAR_STACK_PUSH(5, x0);
  VAR_STACK_PUSH(6, x1);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "get-extent", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditGetExtent)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::GetExtent(x0, x1);
  } else {
  
  p[POFFSET+0] = ((x0) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x0))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[POFFSET+1] = ((x1) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x1))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
  
  if (x0) *x0 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+0], "get-extent in text%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in text%"", extracting return value via box"", extracting boxed argument")));
  if (x1) *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+1], "get-extent in text%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in text%"", extracting return value via box"", extracting boxed argument")));
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditBlinkCaret(int n, Scheme_Object *p[]);

void os_wxMediaEdit::BlinkCaret()
{
  Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "blink-caret", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditBlinkCaret)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::BlinkCaret();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditOwnCaret(int n, Scheme_Object *p[]);

void os_wxMediaEdit::OwnCaret(Bool x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "own-caret", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditOwnCaret)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::OwnCaret(x0);
  } else {
  
  p[POFFSET+0] = (x0 ? scheme_true : scheme_false);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditRefresh(int n, Scheme_Object *p[]);

void os_wxMediaEdit::Refresh(double x0, double x1, nndouble x2, nndouble x3, int x4, class wxColour* x5)
{
  Scheme_Object *p[POFFSET+6] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+6);
  VAR_STACK_PUSH(5, x5);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "refresh", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditRefresh)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::Refresh(x0, x1, x2, x3, x4, x5);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(scheme_make_double(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = WITH_VAR_STACK(scheme_make_double(x3));
  p[POFFSET+4] = WITH_VAR_STACK(bundle_symset_caret(x4));
  p[POFFSET+5] = WITH_VAR_STACK(objscheme_bundle_wxColour(x5));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+6, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditAdjustCursor(int n, Scheme_Object *p[]);

class wxCursor* os_wxMediaEdit::AdjustCursor(class wxMouseEvent* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "adjust-cursor", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditAdjustCursor)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaEdit::AdjustCursor(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
  
  
  {
     class wxCursor* resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_wxCursor(v, "adjust-cursor in text%"", extracting return value", 1));
     READY_TO_RETURN;
     return resval;
  }
  }
}

static Scheme_Object *os_wxMediaEditOnChar(int n, Scheme_Object *p[]);

void os_wxMediaEdit::OnChar(class wxKeyEvent* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "on-char", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditOnChar)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::OnChar(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditOnEvent(int n, Scheme_Object *p[]);

void os_wxMediaEdit::OnEvent(class wxMouseEvent* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "on-event", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditOnEvent)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::OnEvent(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditCopySelfTo(int n, Scheme_Object *p[]);

void os_wxMediaEdit::CopySelfTo(class wxMediaBuffer* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "copy-self-to", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditCopySelfTo)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaEdit::CopySelfTo(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxMediaBuffer(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
  
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaEditCopySelf(int n, Scheme_Object *p[]);

class wxMediaBuffer* os_wxMediaEdit::CopySelf()
{
  Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaEdit *sElF = this;
#endif
  static void *mcache = 0;

  SETUP_VAR_STACK(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaEdit_class, "copy-self", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaEditCopySelf)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaEdit::CopySelf();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
  
  
  {
     class wxMediaBuffer* resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_wxMediaBuffer(v, "copy-self in text%"", extracting return value", 0));
     READY_TO_RETURN;
     return resval;
  }
  }
}

static Scheme_Object *os_wxMediaEditCallClickback(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "call-clickback in text%", n, p);
  nnlong x0;
  nnlong x1;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "call-clickback in text%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+1], "call-clickback in text%"));

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->CallClickback(x0, x1));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditRemoveClickback(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "remove-clickback in text%", n, p);
  nnlong x0;
  nnlong x1;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "remove-clickback in text%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+1], "remove-clickback in text%"));

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->RemoveClickback(x0, x1));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditSetClickback(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "set-clickback in text%", n, p);
  nnlong x0;
  nnlong x1;
  wxClickbackFunc x2;
  void* x3 INIT_NULLED_OUT;
  class wxStyleDelta* x4 INIT_NULLED_OUT;
  Bool x5;

  SETUP_VAR_STACK_REMEMBERED(3);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x3);
  VAR_STACK_PUSH(2, x4);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "set-clickback in text%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+1], "set-clickback in text%"));
  x2 = (wxClickbackFunc)ClickbackToScheme;
  x3 = p[POFFSET+2];
  if (n > (POFFSET+3)) {
    x4 = WITH_VAR_STACK(objscheme_unbundle_wxStyleDelta(p[POFFSET+3], "set-clickback in text%", 1));
  } else
    x4 = NULL;
  if (n > (POFFSET+4)) {
    x5 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+4], "set-clickback in text%"));
  } else
    x5 = FALSE;

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->SetClickback(x0, x1, x2, x3, x4, x5));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditSetWordbreakFunc(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "set-wordbreak-func in text%", n, p);
  wxWordbreakFunc x0;
  void* x1 INIT_NULLED_OUT;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x1);

  
  x0 = (wxWordbreakFunc)WordbreakCallbackToScheme;
  x1 = p[POFFSET];

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->SetWordbreakFunc(x0, x1));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditSetAutowrapBitmap(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxBitmap* r;
  objscheme_check_valid(os_wxMediaEdit_class, "set-autowrap-bitmap in text%", n, p);
  class wxBitmap* x0 INIT_NULLED_OUT;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxBitmap(p[POFFSET+0], "set-autowrap-bitmap in text%", 1));

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->SetAutowrapBitmap(x0));

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxBitmap(r));
}

static Scheme_Object *os_wxMediaEditOnNewTabSnip(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxTabSnip* r;
  objscheme_check_valid(os_wxMediaEdit_class, "on-new-tab-snip in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::OnNewTabSnip());
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->OnNewTabSnip());

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxTabSnip(r));
}

static Scheme_Object *os_wxMediaEditOnNewTextSnip(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxTextSnip* r;
  objscheme_check_valid(os_wxMediaEdit_class, "on-new-string-snip in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::OnNewTextSnip());
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->OnNewTextSnip());

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxTextSnip(r));
}

static Scheme_Object *os_wxMediaEditCaretHidden(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxMediaEdit_class, "caret-hidden? in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->CaretHidden());

  
  
  READY_TO_RETURN;
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditHideCaret(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "hide-caret in text%", n, p);
  Bool x0;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+0], "hide-caret in text%"));

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->HideCaret(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditGetWordbreakMap(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxMediaWordbreakMap* r;
  objscheme_check_valid(os_wxMediaEdit_class, "get-wordbreak-map in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->GetWordbreakMap());

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxMediaWordbreakMap(r));
}

static Scheme_Object *os_wxMediaEditSetWordbreakMap(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "set-wordbreak-map in text%", n, p);
  class wxMediaWordbreakMap* x0 INIT_NULLED_OUT;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxMediaWordbreakMap(p[POFFSET+0], "set-wordbreak-map in text%", 1));

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->SetWordbreakMap(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditFindWordbreak(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "find-wordbreak in text%", n, p);
  nnlong _x0;
  nnlong* x0 = &_x0;
  nnlong _x1;
  nnlong* x1 = &_x1;
  int x2;
  Scheme_Object *sbox_tmp;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  if (XC_SCHEME_NULLP(p[POFFSET+0]))
    x0 = NULL;
  else
    *x0 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+0], "find-wordbreak in text%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(sbox_tmp, "find-wordbreak in text%"", extracting boxed argument")));
  if (XC_SCHEME_NULLP(p[POFFSET+1]))
    x1 = NULL;
  else
    *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+1], "find-wordbreak in text%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(sbox_tmp, "find-wordbreak in text%"", extracting boxed argument")));
  x2 = WITH_VAR_STACK(unbundle_symset_breakType(p[POFFSET+2], "find-wordbreak in text%"));

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->FindWordbreak(x0, x1, x2));

  
  if (n > (POFFSET+0) && !XC_SCHEME_NULLP(p[POFFSET+0]))
    { Scheme_Object *sbv_ = scheme_make_integer(_x0); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+0], sbv_)); } 
  if (n > (POFFSET+1) && !XC_SCHEME_NULLP(p[POFFSET+1]))
    { Scheme_Object *sbv_ = scheme_make_integer(_x1); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+1], sbv_)); } 
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditSetRegionData(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "set-region-data in text%", n, p);
  nnlong x0;
  nnlong x1;
  class wxBufferData* x2 INIT_NULLED_OUT;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x2);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "set-region-data in text%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+1], "set-region-data in text%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_wxBufferData(p[POFFSET+2], "set-region-data in text%", 1));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::SetRegionData(x0, x1, x2));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->SetRegionData(x0, x1, x2));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditGetRegionData(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxBufferData* r;
  objscheme_check_valid(os_wxMediaEdit_class, "get-region-data in text%", n, p);
  nnlong x0;
  nnlong x1;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "get-region-data in text%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+1], "get-region-data in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::GetRegionData(x0, x1));
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->GetRegionData(x0, x1));

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxBufferData(r));
}

static Scheme_Object *os_wxMediaEditGetRevisionNumber(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  double r;
  objscheme_check_valid(os_wxMediaEdit_class, "get-revision-number in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->GetRevisionNumber());

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(scheme_make_double(r));
}

static Scheme_Object *os_wxMediaEditOnMergeSnips(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "after-merge-snips in text%", n, p);
  nnlong x0;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "after-merge-snips in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::OnMergeSnips(x0));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->OnMergeSnips(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOnSplitSnip(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "after-split-snip in text%", n, p);
  nnlong x0;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "after-split-snip in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::OnSplitSnip(x0));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->OnSplitSnip(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditAfterSetSizeConstraint(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "after-set-size-constraint in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::AfterSetSizeConstraint());
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->AfterSetSizeConstraint());

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOnSetSizeConstraint(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "on-set-size-constraint in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::OnSetSizeConstraint());
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->OnSetSizeConstraint());

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditCanSetSizeConstraint(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxMediaEdit_class, "can-set-size-constraint? in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::CanSetSizeConstraint());
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->CanSetSizeConstraint());

  
  
  READY_TO_RETURN;
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditAfterSetPosition(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "after-set-position in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::AfterSetPosition());
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->AfterSetPosition());

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditAfterChangeStyle(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "after-change-style in text%", n, p);
  nnlong x0;
  nnlong x1;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "after-change-style in text%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+1], "after-change-style in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::AfterChangeStyle(x0, x1));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->AfterChangeStyle(x0, x1));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOnChangeStyle(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "on-change-style in text%", n, p);
  nnlong x0;
  nnlong x1;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "on-change-style in text%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+1], "on-change-style in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::OnChangeStyle(x0, x1));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->OnChangeStyle(x0, x1));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditCanChangeStyle(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxMediaEdit_class, "can-change-style? in text%", n, p);
  nnlong x0;
  nnlong x1;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "can-change-style? in text%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+1], "can-change-style? in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::CanChangeStyle(x0, x1));
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->CanChangeStyle(x0, x1));

  
  
  READY_TO_RETURN;
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditAfterDelete(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "after-delete in text%", n, p);
  nnlong x0;
  nnlong x1;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "after-delete in text%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+1], "after-delete in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::AfterDelete(x0, x1));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->AfterDelete(x0, x1));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOnDelete(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "on-delete in text%", n, p);
  nnlong x0;
  nnlong x1;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "on-delete in text%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+1], "on-delete in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::OnDelete(x0, x1));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->OnDelete(x0, x1));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditCanDelete(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxMediaEdit_class, "can-delete? in text%", n, p);
  nnlong x0;
  nnlong x1;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "can-delete? in text%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+1], "can-delete? in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::CanDelete(x0, x1));
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->CanDelete(x0, x1));

  
  
  READY_TO_RETURN;
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditAfterInsert(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "after-insert in text%", n, p);
  nnlong x0;
  nnlong x1;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "after-insert in text%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+1], "after-insert in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::AfterInsert(x0, x1));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->AfterInsert(x0, x1));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOnInsert(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "on-insert in text%", n, p);
  nnlong x0;
  nnlong x1;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "on-insert in text%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+1], "on-insert in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::OnInsert(x0, x1));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->OnInsert(x0, x1));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditCanInsert(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxMediaEdit_class, "can-insert? in text%", n, p);
  nnlong x0;
  nnlong x1;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "can-insert? in text%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+1], "can-insert? in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::CanInsert(x0, x1));
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->CanInsert(x0, x1));

  
  
  READY_TO_RETURN;
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditSetTabs(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "set-tabs in text%", n, p);
  double* x0 INIT_NULLED_OUT;
  int x1;
  double x2;
  Bool x3;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);

  
  x0 = NULL;
  if (n > (POFFSET+1)) {
    x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "set-tabs in text%"));
  } else
    x2 = wxTAB_WIDTH;
  if (n > (POFFSET+2)) {
    x3 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+2], "set-tabs in text%"));
  } else
    x3 = TRUE;

  x0 = WITH_VAR_STACK(__MakedoubleArray((0+POFFSET < n) ? p[POFFSET+0] : scheme_null, &x1, METHODNAME("text%","set-tabs")));
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->SetTabs(x0, x1, x2, x3));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditGetTabs(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  double* r INIT_NULLED_OUT;
  objscheme_check_valid(os_wxMediaEdit_class, "get-tabs in text%", n, p);
  nnint _x0;
  nnint* x0 = &_x0;
  double _x1;
  double* x1 = &_x1;
  Bool _x2;
  Bool* x2 = &_x2;
  Scheme_Object *sbox_tmp;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, r);

  
  if (n > (POFFSET+0)) {
    if (XC_SCHEME_NULLP(p[POFFSET+0]))
    x0 = NULL;
  else
    *x0 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+0], "get-tabs in text%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(sbox_tmp, "get-tabs in text%"", extracting boxed argument")));
  } else
    x0 = NULL;
  if (n > (POFFSET+1)) {
    if (XC_SCHEME_NULLP(p[POFFSET+1]))
    x1 = NULL;
  else
    *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+1], "get-tabs in text%")), WITH_VAR_STACK(objscheme_unbundle_double(sbox_tmp, "get-tabs in text%"", extracting boxed argument")));
  } else
    x1 = NULL;
  if (n > (POFFSET+2)) {
    if (XC_SCHEME_NULLP(p[POFFSET+2]))
    x2 = NULL;
  else
    *x2 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+2], "get-tabs in text%")), WITH_VAR_STACK(objscheme_unbundle_bool(sbox_tmp, "get-tabs in text%"", extracting boxed argument")));
  } else
    x2 = NULL;

  if (!x0) x0 = &_x0;
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->GetTabs(x0, x1, x2));

  
  if (n > (POFFSET+0) && !XC_SCHEME_NULLP(p[POFFSET+0]))
    { Scheme_Object *sbv_ = scheme_make_integer(_x0); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+0], sbv_)); } 
  if (n > (POFFSET+1) && !XC_SCHEME_NULLP(p[POFFSET+1]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x1)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+1], sbv_)); } 
  if (n > (POFFSET+2) && !XC_SCHEME_NULLP(p[POFFSET+2]))
    { Scheme_Object *sbv_ = (_x2 ? scheme_true : scheme_false); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+2], sbv_)); } 
  
  READY_TO_RETURN;
  return WITH_VAR_STACK(__MakedoubleList(r, *x0));;
}

static Scheme_Object *os_wxMediaEditSetOverwriteMode(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "set-overwrite-mode in text%", n, p);
  Bool x0;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+0], "set-overwrite-mode in text%"));

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->SetOverwriteMode(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditGetOverwriteMode(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxMediaEdit_class, "get-overwrite-mode in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->GetOverwriteMode());

  
  
  READY_TO_RETURN;
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditSetFileFormat(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "set-file-format in text%", n, p);
  int x0;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(unbundle_symset_fileType(p[POFFSET+0], "set-file-format in text%"));

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->SetFileFormat(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditGetFileFormat(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  int r;
  objscheme_check_valid(os_wxMediaEdit_class, "get-file-format in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->GetFileFormat());

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(bundle_symset_fileType(r));
}

static Scheme_Object *os_wxMediaEditWriteToFile(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  SETUP_PRE_VAR_STACK(1);
  PRE_VAR_STACK_PUSH(0, p);
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxMediaEdit_class, "write-to-file in text%", n, p);
  if ((n >= (POFFSET+2)) && WITH_REMEMBERED_STACK(objscheme_istype_wxMediaStreamOut(p[POFFSET+0], NULL, 0)) && WITH_REMEMBERED_STACK(objscheme_istype_number(p[POFFSET+1], NULL))) {
    class wxMediaStreamOut* x0 INIT_NULLED_OUT;
    nnlong x1;
    long x2;

    SETUP_VAR_STACK_PRE_REMEMBERED(2);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, x0);

    
    if ((n < (POFFSET+2)) || (n > (POFFSET+3))) 
      WITH_VAR_STACK(scheme_wrong_count_m("write-to-file in text% (with position case)", POFFSET+2, POFFSET+3, n, p, 1));
    x0 = WITH_VAR_STACK(objscheme_unbundle_wxMediaStreamOut(p[POFFSET+0], "write-to-file in text% (with position case)", 0));
    x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+1], "write-to-file in text% (with position case)"));
    if (n > (POFFSET+2)) {
      x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[POFFSET+2], "eof", "write-to-file in text% (with position case)"));
    } else
      x2 = -1;

    
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->WriteToFile(x0, x1, x2));

    
    
    READY_TO_PRE_RETURN;
  } else  {
    class wxMediaStreamOut* x0 INIT_NULLED_OUT;

    SETUP_VAR_STACK_PRE_REMEMBERED(2);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, x0);

    
    if (n != (POFFSET+1)) 
      WITH_VAR_STACK(scheme_wrong_count_m("write-to-file in text% (without position case)", POFFSET+1, POFFSET+1, n, p, 1));
    x0 = WITH_VAR_STACK(objscheme_unbundle_wxMediaStreamOut(p[POFFSET+0], "write-to-file in text% (without position case)", 0));

    
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->WriteToFile(x0));

    
    
    READY_TO_PRE_RETURN;
  }

  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditReadFromFile(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  SETUP_PRE_VAR_STACK(1);
  PRE_VAR_STACK_PUSH(0, p);
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxMediaEdit_class, "read-from-file in text%", n, p);
  if ((n >= (POFFSET+2)) && WITH_REMEMBERED_STACK(objscheme_istype_wxMediaStreamIn(p[POFFSET+0], NULL, 0)) && WITH_REMEMBERED_STACK(objscheme_istype_nonnegative_symbol_integer(p[POFFSET+1], "start", NULL))) {
    class wxMediaStreamIn* x0 INIT_NULLED_OUT;
    long x1;
    Bool x2;

    SETUP_VAR_STACK_PRE_REMEMBERED(2);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, x0);

    
    if ((n < (POFFSET+2)) || (n > (POFFSET+3))) 
      WITH_VAR_STACK(scheme_wrong_count_m("read-from-file in text% (with position case)", POFFSET+2, POFFSET+3, n, p, 1));
    x0 = WITH_VAR_STACK(objscheme_unbundle_wxMediaStreamIn(p[POFFSET+0], "read-from-file in text% (with position case)", 0));
    x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[POFFSET+1], "start", "read-from-file in text% (with position case)"));
    if (n > (POFFSET+2)) {
      x2 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+2], "read-from-file in text% (with position case)"));
    } else
      x2 = FALSE;

    
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->ReadFromFile(x0, x1, x2));

    
    
    READY_TO_PRE_RETURN;
  } else  {
    class wxMediaStreamIn* x0 INIT_NULLED_OUT;
    Bool x1;

    SETUP_VAR_STACK_PRE_REMEMBERED(2);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, x0);

    
    if ((n < (POFFSET+1)) || (n > (POFFSET+2))) 
      WITH_VAR_STACK(scheme_wrong_count_m("read-from-file in text% (without position case)", POFFSET+1, POFFSET+2, n, p, 1));
    x0 = WITH_VAR_STACK(objscheme_unbundle_wxMediaStreamIn(p[POFFSET+0], "read-from-file in text% (without position case)", 0));
    if (n > (POFFSET+1)) {
      x1 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+1], "read-from-file in text% (without position case)"));
    } else
      x1 = FALSE;

    
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->ReadFromFile(x0, x1));

    
    
    READY_TO_PRE_RETURN;
  }

  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditGetCharacter(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  mzchar r;
  objscheme_check_valid(os_wxMediaEdit_class, "get-character in text%", n, p);
  nnlong x0;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "get-character in text%"));

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->GetCharacter(x0));

  
  
  READY_TO_RETURN;
  return scheme_make_char(r);
}

static Scheme_Object *os_wxMediaEditGetText(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  mzstring r;
  objscheme_check_valid(os_wxMediaEdit_class, "get-text in text%", n, p);
  nnlong x0;
  long x1;
  Bool x2;
  Bool x3;
  long _x4;
  long* x4 = &_x4;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  if (n > (POFFSET+0)) {
    x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "get-text in text%"));
  } else
    x0 = 0;
  if (n > (POFFSET+1)) {
    x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[POFFSET+1], "eof", "get-text in text%"));
  } else
    x1 = -1;
  if (n > (POFFSET+2)) {
    x2 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+2], "get-text in text%"));
  } else
    x2 = FALSE;
  if (n > (POFFSET+3)) {
    x3 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+3], "get-text in text%"));
  } else
    x3 = FALSE;

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->GetText(x0, x1, x2, x3, x4));

  
  
  READY_TO_RETURN;
  return WITH_VAR_STACK(scheme_make_sized_char_string(r, _x4, 0));
}

static Scheme_Object *os_wxMediaEditFindNextNonTextSnip(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxSnip* r;
  objscheme_check_valid(os_wxMediaEdit_class, "find-next-non-string-snip in text%", n, p);
  class wxSnip* x0 INIT_NULLED_OUT;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnip(p[POFFSET+0], "find-next-non-string-snip in text%", 1));

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->FindNextNonTextSnip(x0));

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxSnip(r));
}

static Scheme_Object *os_wxMediaEditGetSnipPosition(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(os_wxMediaEdit_class, "get-snip-position in text%", n, p);
  class wxSnip* x0 INIT_NULLED_OUT;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnip(p[POFFSET+0], "get-snip-position in text%", 0));

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->GetSnipPosition(x0));

  
  
  READY_TO_RETURN;
  return ((r < 0) ? scheme_false : scheme_make_integer(r));
}

static Scheme_Object *os_wxMediaEditGetSnipPositionAndLocation(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxMediaEdit_class, "get-snip-position-and-location in text%", n, p);
  class wxSnip* x0 INIT_NULLED_OUT;
  nnlong _x1;
  nnlong* x1 = &_x1;
  double _x2;
  double* x2 = &_x2;
  double _x3;
  double* x3 = &_x3;
  Scheme_Object *sbox_tmp;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnip(p[POFFSET+0], "get-snip-position-and-location in text%", 0));
  if (XC_SCHEME_NULLP(p[POFFSET+1]))
    x1 = NULL;
  else
    *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+1], "get-snip-position-and-location in text%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(sbox_tmp, "get-snip-position-and-location in text%"", extracting boxed argument")));
  if (n > (POFFSET+2)) {
    if (XC_SCHEME_NULLP(p[POFFSET+2]))
    x2 = NULL;
  else
    *x2 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+2], "get-snip-position-and-location in text%")), WITH_VAR_STACK(objscheme_unbundle_double(sbox_tmp, "get-snip-position-and-location in text%"", extracting boxed argument")));
  } else
    x2 = NULL;
  if (n > (POFFSET+3)) {
    if (XC_SCHEME_NULLP(p[POFFSET+3]))
    x3 = NULL;
  else
    *x3 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+3], "get-snip-position-and-location in text%")), WITH_VAR_STACK(objscheme_unbundle_double(sbox_tmp, "get-snip-position-and-location in text%"", extracting boxed argument")));
  } else
    x3 = NULL;

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->GetSnipPositionAndLocation(x0, x1, x2, x3));

  
  if (n > (POFFSET+1) && !XC_SCHEME_NULLP(p[POFFSET+1]))
    { Scheme_Object *sbv_ = scheme_make_integer(_x1); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+1], sbv_)); } 
  if (n > (POFFSET+2) && !XC_SCHEME_NULLP(p[POFFSET+2]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x2)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+2], sbv_)); } 
  if (n > (POFFSET+3) && !XC_SCHEME_NULLP(p[POFFSET+3]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x3)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+3], sbv_)); } 
  
  READY_TO_RETURN;
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditFindSnip(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxSnip* r INIT_NULLED_OUT;
  objscheme_check_valid(os_wxMediaEdit_class, "find-snip in text%", n, p);
  nnlong x0;
  int x1;
  nnlong _x2;
  nnlong* x2 = &_x2;
  Scheme_Object *sbox_tmp;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, r);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "find-snip in text%"));
  x1 = WITH_VAR_STACK(unbundle_symset_findKind(p[POFFSET+1], "find-snip in text%"));
  if (n > (POFFSET+2)) {
    if (XC_SCHEME_NULLP(p[POFFSET+2]))
    x2 = NULL;
  else
    *x2 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+2], "find-snip in text%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(sbox_tmp, "find-snip in text%"", extracting boxed argument")));
  } else
    x2 = NULL;

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->FindSnip(x0, x1, x2));

  
  if (n > (POFFSET+2) && !XC_SCHEME_NULLP(p[POFFSET+2]))
    { Scheme_Object *sbv_ = scheme_make_integer(_x2); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+2], sbv_)); } 
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxSnip(r));
}

static Scheme_Object *os_wxMediaEditFindStringAll(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long* r;
  objscheme_check_valid(os_wxMediaEdit_class, "find-string-all in text%", n, p);
  mzstring x0 INIT_NULLED_OUT;
  long _x1;
  long* x1 = &_x1;
  int x2;
  long x3;
  long x4;
  Bool x5;
  Bool x6;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);

  
  x0 = (mzstring)WITH_VAR_STACK(objscheme_unbundle_mzstring(p[POFFSET+0], "find-string-all in text%"));
  if (n > (POFFSET+1)) {
    x2 = WITH_VAR_STACK(unbundle_symset_direction(p[POFFSET+1], "find-string-all in text%"));
  } else
    x2 = 1;
  if (n > (POFFSET+2)) {
    x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[POFFSET+2], "start", "find-string-all in text%"));
  } else
    x3 = -1;
  if (n > (POFFSET+3)) {
    x4 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[POFFSET+3], "eof", "find-string-all in text%"));
  } else
    x4 = -1;
  if (n > (POFFSET+4)) {
    x5 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+4], "find-string-all in text%"));
  } else
    x5 = TRUE;
  if (n > (POFFSET+5)) {
    x6 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+5], "find-string-all in text%"));
  } else
    x6 = TRUE;

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->FindStringAll(x0, x1, x2, x3, x4, x5, x6));

  
  
  READY_TO_RETURN;
  return WITH_VAR_STACK(__MakelongList(r, *x1));;
}

static Scheme_Object *os_wxMediaEditFindString(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(os_wxMediaEdit_class, "find-string in text%", n, p);
  mzstring x0 INIT_NULLED_OUT;
  int x1;
  long x2;
  long x3;
  Bool x4;
  Bool x5;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);

  
  x0 = (mzstring)WITH_VAR_STACK(objscheme_unbundle_mzstring(p[POFFSET+0], "find-string in text%"));
  if (n > (POFFSET+1)) {
    x1 = WITH_VAR_STACK(unbundle_symset_direction(p[POFFSET+1], "find-string in text%"));
  } else
    x1 = 1;
  if (n > (POFFSET+2)) {
    x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[POFFSET+2], "start", "find-string in text%"));
  } else
    x2 = -1;
  if (n > (POFFSET+3)) {
    x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[POFFSET+3], "eof", "find-string in text%"));
  } else
    x3 = -1;
  if (n > (POFFSET+4)) {
    x4 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+4], "find-string in text%"));
  } else
    x4 = TRUE;
  if (n > (POFFSET+5)) {
    x5 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+5], "find-string in text%"));
  } else
    x5 = TRUE;

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->FindString(x0, x1, x2, x3, x4, x5));

  
  
  READY_TO_RETURN;
  return ((r < 0) ? scheme_false : scheme_make_integer(r));
}

static Scheme_Object *os_wxMediaEditSetStickyStyles(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "set-styles-sticky in text%", n, p);
  Bool x0;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+0], "set-styles-sticky in text%"));

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->SetStickyStyles(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditGetStickyStyles(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxMediaEdit_class, "get-styles-sticky in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->GetStickyStyles());

  
  
  READY_TO_RETURN;
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditSetLineSpacing(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "set-line-spacing in text%", n, p);
  nndouble x0;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(p[POFFSET+0], "set-line-spacing in text%"));

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->SetLineSpacing(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditGetLineSpacing(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  nndouble r;
  objscheme_check_valid(os_wxMediaEdit_class, "get-line-spacing in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->GetLineSpacing());

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(scheme_make_double(r));
}

static Scheme_Object *os_wxMediaEditSetParagraghAlignment(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "set-paragraph-alignment in text%", n, p);
  nnlong x0;
  int x1;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "set-paragraph-alignment in text%"));
  x1 = WITH_VAR_STACK(unbundle_symset_horizontalAlignment(p[POFFSET+1], "set-paragraph-alignment in text%"));

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->SetParagraghAlignment(x0, x1));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditSetParagraghMargins(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "set-paragraph-margins in text%", n, p);
  nnlong x0;
  nndouble x1;
  nndouble x2;
  nndouble x3;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "set-paragraph-margins in text%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(p[POFFSET+1], "set-paragraph-margins in text%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(p[POFFSET+2], "set-paragraph-margins in text%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(p[POFFSET+3], "set-paragraph-margins in text%"));

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->SetParagraghMargins(x0, x1, x2, x3));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditLastParagraph(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(os_wxMediaEdit_class, "last-paragraph in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->LastParagraph());

  
  
  READY_TO_RETURN;
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditParagraphEndLine(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(os_wxMediaEdit_class, "paragraph-end-line in text%", n, p);
  nnlong x0;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "paragraph-end-line in text%"));

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->ParagraphEndLine(x0));

  
  
  READY_TO_RETURN;
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditParagraphStartLine(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(os_wxMediaEdit_class, "paragraph-start-line in text%", n, p);
  nnlong x0;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "paragraph-start-line in text%"));

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->ParagraphStartLine(x0));

  
  
  READY_TO_RETURN;
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditLineParagraph(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(os_wxMediaEdit_class, "line-paragraph in text%", n, p);
  nnlong x0;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "line-paragraph in text%"));

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->LineParagraph(x0));

  
  
  READY_TO_RETURN;
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditParagraphEndPosition(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(os_wxMediaEdit_class, "paragraph-end-position in text%", n, p);
  nnlong x0;
  Bool x1;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "paragraph-end-position in text%"));
  if (n > (POFFSET+1)) {
    x1 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+1], "paragraph-end-position in text%"));
  } else
    x1 = TRUE;

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->ParagraphEndPosition(x0, x1));

  
  
  READY_TO_RETURN;
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditParagraphStartPosition(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(os_wxMediaEdit_class, "paragraph-start-position in text%", n, p);
  nnlong x0;
  Bool x1;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "paragraph-start-position in text%"));
  if (n > (POFFSET+1)) {
    x1 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+1], "paragraph-start-position in text%"));
  } else
    x1 = TRUE;

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->ParagraphStartPosition(x0, x1));

  
  
  READY_TO_RETURN;
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditPositionParagraph(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(os_wxMediaEdit_class, "position-paragraph in text%", n, p);
  nnlong x0;
  Bool x1;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "position-paragraph in text%"));
  if (n > (POFFSET+1)) {
    x1 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+1], "position-paragraph in text%"));
  } else
    x1 = FALSE;

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->PositionParagraph(x0, x1));

  
  
  READY_TO_RETURN;
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditLastLine(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(os_wxMediaEdit_class, "last-line in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->LastLine());

  
  
  READY_TO_RETURN;
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditLastPosition(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(os_wxMediaEdit_class, "last-position in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->LastPosition());

  
  
  READY_TO_RETURN;
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditLineLength(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(os_wxMediaEdit_class, "line-length in text%", n, p);
  nnlong x0;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "line-length in text%"));

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->LineLength(x0));

  
  
  READY_TO_RETURN;
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditLineEndPosition(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(os_wxMediaEdit_class, "line-end-position in text%", n, p);
  nnlong x0;
  Bool x1;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "line-end-position in text%"));
  if (n > (POFFSET+1)) {
    x1 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+1], "line-end-position in text%"));
  } else
    x1 = TRUE;

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->LineEndPosition(x0, x1));

  
  
  READY_TO_RETURN;
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditLineStartPosition(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(os_wxMediaEdit_class, "line-start-position in text%", n, p);
  nnlong x0;
  Bool x1;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "line-start-position in text%"));
  if (n > (POFFSET+1)) {
    x1 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+1], "line-start-position in text%"));
  } else
    x1 = TRUE;

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->LineStartPosition(x0, x1));

  
  
  READY_TO_RETURN;
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditLineLocation(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  double r;
  objscheme_check_valid(os_wxMediaEdit_class, "line-location in text%", n, p);
  nnlong x0;
  Bool x1;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "line-location in text%"));
  if (n > (POFFSET+1)) {
    x1 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+1], "line-location in text%"));
  } else
    x1 = TRUE;

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->LineLocation(x0, x1));

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(scheme_make_double(r));
}

static Scheme_Object *os_wxMediaEditPositionLocation(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "position-location in text%", n, p);
  nnlong x0;
  double _x1;
  double* x1 = &_x1;
  double _x2;
  double* x2 = &_x2;
  Bool x3;
  Bool x4;
  Bool x5;
  Scheme_Object *sbox_tmp;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "position-location in text%"));
  if (n > (POFFSET+1)) {
    if (XC_SCHEME_NULLP(p[POFFSET+1]))
    x1 = NULL;
  else
    *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+1], "position-location in text%")), WITH_VAR_STACK(objscheme_unbundle_double(sbox_tmp, "position-location in text%"", extracting boxed argument")));
  } else
    x1 = NULL;
  if (n > (POFFSET+2)) {
    if (XC_SCHEME_NULLP(p[POFFSET+2]))
    x2 = NULL;
  else
    *x2 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+2], "position-location in text%")), WITH_VAR_STACK(objscheme_unbundle_double(sbox_tmp, "position-location in text%"", extracting boxed argument")));
  } else
    x2 = NULL;
  if (n > (POFFSET+3)) {
    x3 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+3], "position-location in text%"));
  } else
    x3 = TRUE;
  if (n > (POFFSET+4)) {
    x4 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+4], "position-location in text%"));
  } else
    x4 = FALSE;
  if (n > (POFFSET+5)) {
    x5 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+5], "position-location in text%"));
  } else
    x5 = FALSE;

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->PositionLocation(x0, x1, x2, x3, x4, x5));

  
  if (n > (POFFSET+1) && !XC_SCHEME_NULLP(p[POFFSET+1]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x1)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+1], sbv_)); } 
  if (n > (POFFSET+2) && !XC_SCHEME_NULLP(p[POFFSET+2]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x2)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+2], sbv_)); } 
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditPositionLine(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(os_wxMediaEdit_class, "position-line in text%", n, p);
  nnlong x0;
  Bool x1;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "position-line in text%"));
  if (n > (POFFSET+1)) {
    x1 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+1], "position-line in text%"));
  } else
    x1 = FALSE;

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->PositionLine(x0, x1));

  
  
  READY_TO_RETURN;
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditSetBetweenThreshold(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "set-between-threshold in text%", n, p);
  nndouble x0;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(p[POFFSET+0], "set-between-threshold in text%"));

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->SetBetweenThreshold(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditGetBetweenThreshold(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  double r;
  objscheme_check_valid(os_wxMediaEdit_class, "get-between-threshold in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->GetBetweenThreshold());

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(scheme_make_double(r));
}

static Scheme_Object *os_wxMediaEditFindPositionInLine(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(os_wxMediaEdit_class, "find-position-in-line in text%", n, p);
  nnlong x0;
  double x1;
  Bool _x2;
  Bool* x2 = &_x2;
  Bool _x3;
  Bool* x3 = &_x3;
  double _x4;
  double* x4 = &_x4;
  Scheme_Object *sbox_tmp;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "find-position-in-line in text%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "find-position-in-line in text%"));
  if (n > (POFFSET+2)) {
    if (XC_SCHEME_NULLP(p[POFFSET+2]))
    x2 = NULL;
  else
    *x2 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+2], "find-position-in-line in text%")), WITH_VAR_STACK(objscheme_unbundle_bool(sbox_tmp, "find-position-in-line in text%"", extracting boxed argument")));
  } else
    x2 = NULL;
  if (n > (POFFSET+3)) {
    if (XC_SCHEME_NULLP(p[POFFSET+3]))
    x3 = NULL;
  else
    *x3 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+3], "find-position-in-line in text%")), WITH_VAR_STACK(objscheme_unbundle_bool(sbox_tmp, "find-position-in-line in text%"", extracting boxed argument")));
  } else
    x3 = NULL;
  if (n > (POFFSET+4)) {
    if (XC_SCHEME_NULLP(p[POFFSET+4]))
    x4 = NULL;
  else
    *x4 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+4], "find-position-in-line in text%")), WITH_VAR_STACK(objscheme_unbundle_double(sbox_tmp, "find-position-in-line in text%"", extracting boxed argument")));
  } else
    x4 = NULL;

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->FindPositionInLine(x0, x1, x2, x3, x4));

  
  if (n > (POFFSET+2) && !XC_SCHEME_NULLP(p[POFFSET+2]))
    { Scheme_Object *sbv_ = (_x2 ? scheme_true : scheme_false); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+2], sbv_)); } 
  if (n > (POFFSET+3) && !XC_SCHEME_NULLP(p[POFFSET+3]))
    { Scheme_Object *sbv_ = (_x3 ? scheme_true : scheme_false); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+3], sbv_)); } 
  if (n > (POFFSET+4) && !XC_SCHEME_NULLP(p[POFFSET+4]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x4)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+4], sbv_)); } 
  
  READY_TO_RETURN;
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditFindLine(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(os_wxMediaEdit_class, "find-line in text%", n, p);
  double x0;
  Bool _x1;
  Bool* x1 = &_x1;
  Scheme_Object *sbox_tmp;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+0], "find-line in text%"));
  if (n > (POFFSET+1)) {
    if (XC_SCHEME_NULLP(p[POFFSET+1]))
    x1 = NULL;
  else
    *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+1], "find-line in text%")), WITH_VAR_STACK(objscheme_unbundle_bool(sbox_tmp, "find-line in text%"", extracting boxed argument")));
  } else
    x1 = NULL;

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->FindLine(x0, x1));

  
  if (n > (POFFSET+1) && !XC_SCHEME_NULLP(p[POFFSET+1]))
    { Scheme_Object *sbv_ = (_x1 ? scheme_true : scheme_false); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+1], sbv_)); } 
  
  READY_TO_RETURN;
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditFindPosition(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(os_wxMediaEdit_class, "find-position in text%", n, p);
  double x0;
  double x1;
  Bool _x2;
  Bool* x2 = &_x2;
  Bool _x3;
  Bool* x3 = &_x3;
  double _x4;
  double* x4 = &_x4;
  Scheme_Object *sbox_tmp;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+0], "find-position in text%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "find-position in text%"));
  if (n > (POFFSET+2)) {
    if (XC_SCHEME_NULLP(p[POFFSET+2]))
    x2 = NULL;
  else
    *x2 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+2], "find-position in text%")), WITH_VAR_STACK(objscheme_unbundle_bool(sbox_tmp, "find-position in text%"", extracting boxed argument")));
  } else
    x2 = NULL;
  if (n > (POFFSET+3)) {
    if (XC_SCHEME_NULLP(p[POFFSET+3]))
    x3 = NULL;
  else
    *x3 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+3], "find-position in text%")), WITH_VAR_STACK(objscheme_unbundle_bool(sbox_tmp, "find-position in text%"", extracting boxed argument")));
  } else
    x3 = NULL;
  if (n > (POFFSET+4)) {
    if (XC_SCHEME_NULLP(p[POFFSET+4]))
    x4 = NULL;
  else
    *x4 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+4], "find-position in text%")), WITH_VAR_STACK(objscheme_unbundle_double(sbox_tmp, "find-position in text%"", extracting boxed argument")));
  } else
    x4 = NULL;

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->FindPosition(x0, x1, x2, x3, x4));

  
  if (n > (POFFSET+2) && !XC_SCHEME_NULLP(p[POFFSET+2]))
    { Scheme_Object *sbv_ = (_x2 ? scheme_true : scheme_false); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+2], sbv_)); } 
  if (n > (POFFSET+3) && !XC_SCHEME_NULLP(p[POFFSET+3]))
    { Scheme_Object *sbv_ = (_x3 ? scheme_true : scheme_false); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+3], sbv_)); } 
  if (n > (POFFSET+4) && !XC_SCHEME_NULLP(p[POFFSET+4]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x4)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+4], sbv_)); } 
  
  READY_TO_RETURN;
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditSplitSnip(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "split-snip in text%", n, p);
  nnlong x0;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "split-snip in text%"));

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->SplitSnip(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditChangeStyle(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  SETUP_PRE_VAR_STACK(1);
  PRE_VAR_STACK_PUSH(0, p);
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "change-style in text%", n, p);
  if ((n >= (POFFSET+2)) && WITH_REMEMBERED_STACK(objscheme_istype_wxStyleDelta(p[POFFSET+0], NULL, 1)) && WITH_REMEMBERED_STACK(objscheme_istype_nonnegative_symbol_integer(p[POFFSET+1], "start", NULL))) {
    class wxStyleDelta* x0 INIT_NULLED_OUT;
    long x1;
    long x2;
    Bool x3;

    SETUP_VAR_STACK_PRE_REMEMBERED(2);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, x0);

    
    if ((n < (POFFSET+2)) || (n > (POFFSET+4))) 
      WITH_VAR_STACK(scheme_wrong_count_m("change-style in text% (style-delta% and position case)", POFFSET+2, POFFSET+4, n, p, 1));
    x0 = WITH_VAR_STACK(objscheme_unbundle_wxStyleDelta(p[POFFSET+0], "change-style in text% (style-delta% and position case)", 1));
    x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[POFFSET+1], "start", "change-style in text% (style-delta% and position case)"));
    if (n > (POFFSET+2)) {
      x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[POFFSET+2], "end", "change-style in text% (style-delta% and position case)"));
    } else
      x2 = -1;
    if (n > (POFFSET+3)) {
      x3 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+3], "change-style in text% (style-delta% and position case)"));
    } else
      x3 = TRUE;

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->ChangeStyle(x0, x1, x2, x3));

    
    
    READY_TO_PRE_RETURN;
  } else if ((n >= (POFFSET+1)) && WITH_REMEMBERED_STACK(objscheme_istype_wxStyleDelta(p[POFFSET+0], NULL, 1))) {
    class wxStyleDelta* x0 INIT_NULLED_OUT;

    SETUP_VAR_STACK_PRE_REMEMBERED(2);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, x0);

    
    if (n != (POFFSET+1)) 
      WITH_VAR_STACK(scheme_wrong_count_m("change-style in text% (style-delta% without position or snip% case)", POFFSET+1, POFFSET+1, n, p, 1));
    x0 = WITH_VAR_STACK(objscheme_unbundle_wxStyleDelta(p[POFFSET+0], "change-style in text% (style-delta% without position or snip% case)", 1));

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->ChangeStyle(x0));

    
    
    READY_TO_PRE_RETURN;
  } else  {
    class wxStyle* x0 INIT_NULLED_OUT;
    long x1;
    long x2;
    Bool x3;

    SETUP_VAR_STACK_PRE_REMEMBERED(2);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, x0);

    
    if ((n < (POFFSET+1)) || (n > (POFFSET+4))) 
      WITH_VAR_STACK(scheme_wrong_count_m("change-style in text% (style% case)", POFFSET+1, POFFSET+4, n, p, 1));
    x0 = WITH_VAR_STACK(objscheme_unbundle_wxStyle(p[POFFSET+0], "change-style in text% (style% case)", 1));
    if (n > (POFFSET+1)) {
      x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[POFFSET+1], "start", "change-style in text% (style% case)"));
    } else
      x1 = -1;
    if (n > (POFFSET+2)) {
      x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[POFFSET+2], "end", "change-style in text% (style% case)"));
    } else
      x2 = -1;
    if (n > (POFFSET+3)) {
      x3 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+3], "change-style in text% (style% case)"));
    } else
      x3 = TRUE;

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->ChangeStyle(x0, x1, x2, x3));

    
    
    READY_TO_PRE_RETURN;
  }

  return scheme_void;
}

static Scheme_Object *os_wxMediaEditDoPasteSelection(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "do-paste-x-selection in text%", n, p);
  nnlong x0;
  ExactLong x1;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "do-paste-x-selection in text%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_ExactLong(p[POFFSET+1], "do-paste-x-selection in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::DoPasteSelection(x0, x1));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->DoPasteSelection(x0, x1));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditDoPaste(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "do-paste in text%", n, p);
  nnlong x0;
  ExactLong x1;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "do-paste in text%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_ExactLong(p[POFFSET+1], "do-paste in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::DoPaste(x0, x1));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->DoPaste(x0, x1));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditDoCopy(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "do-copy in text%", n, p);
  nnlong x0;
  nnlong x1;
  ExactLong x2;
  Bool x3;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "do-copy in text%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+1], "do-copy in text%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_ExactLong(p[POFFSET+2], "do-copy in text%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+3], "do-copy in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::DoCopy(x0, x1, x2, x3));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->DoCopy(x0, x1, x2, x3));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditKill(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  SETUP_PRE_VAR_STACK(1);
  PRE_VAR_STACK_PUSH(0, p);
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "kill in text%", n, p);
  if ((n >= (POFFSET+2)) && WITH_REMEMBERED_STACK(objscheme_istype_ExactLong(p[POFFSET+0], NULL)) && WITH_REMEMBERED_STACK(objscheme_istype_number(p[POFFSET+1], NULL))) {
    ExactLong x0;
    nnlong x1;
    nnlong x2;

    SETUP_VAR_STACK_PRE_REMEMBERED(1);
    VAR_STACK_PUSH(0, p);

    
    if (n != (POFFSET+3)) 
      WITH_VAR_STACK(scheme_wrong_count_m("kill in text% (position case)", POFFSET+3, POFFSET+3, n, p, 1));
    x0 = WITH_VAR_STACK(objscheme_unbundle_ExactLong(p[POFFSET+0], "kill in text% (position case)"));
    x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+1], "kill in text% (position case)"));
    x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+2], "kill in text% (position case)"));

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->Kill(x0, x1, x2));

    
    
    READY_TO_PRE_RETURN;
  } else  {
    ExactLong x0;

    SETUP_VAR_STACK_PRE_REMEMBERED(1);
    VAR_STACK_PUSH(0, p);

    
    if ((n > (POFFSET+1))) 
      WITH_VAR_STACK(scheme_wrong_count_m("kill in text% (without position case)", POFFSET+POFFSET, POFFSET+1, n, p, 1));
    if (n > (POFFSET+0)) {
      x0 = WITH_VAR_STACK(objscheme_unbundle_ExactLong(p[POFFSET+0], "kill in text% (without position case)"));
    } else
      x0 = 0;

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->Kill(x0));

    
    
    READY_TO_PRE_RETURN;
  }

  return scheme_void;
}

static Scheme_Object *os_wxMediaEditPasteNext(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "paste-next in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->PasteNext());

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditPasteSelection(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  SETUP_PRE_VAR_STACK(1);
  PRE_VAR_STACK_PUSH(0, p);
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "paste-x-selection in text%", n, p);
  if ((n >= (POFFSET+2)) && WITH_REMEMBERED_STACK(objscheme_istype_ExactLong(p[POFFSET+0], NULL)) && WITH_REMEMBERED_STACK(objscheme_istype_nonnegative_symbol_integer(p[POFFSET+1], "end", NULL))) {
    ExactLong x0;
    long x1;
    long x2;

    SETUP_VAR_STACK_PRE_REMEMBERED(1);
    VAR_STACK_PUSH(0, p);

    
    if ((n < (POFFSET+2)) || (n > (POFFSET+3))) 
      WITH_VAR_STACK(scheme_wrong_count_m("paste-x-selection in text% (position case)", POFFSET+2, POFFSET+3, n, p, 1));
    x0 = WITH_VAR_STACK(objscheme_unbundle_ExactLong(p[POFFSET+0], "paste-x-selection in text% (position case)"));
    x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[POFFSET+1], "end", "paste-x-selection in text% (position case)"));
    if (n > (POFFSET+2)) {
      x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[POFFSET+2], "same", "paste-x-selection in text% (position case)"));
    } else
      x2 = -1;

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->PasteSelection(x0, x1, x2));

    
    
    READY_TO_PRE_RETURN;
  } else  {
    ExactLong x0;

    SETUP_VAR_STACK_PRE_REMEMBERED(1);
    VAR_STACK_PUSH(0, p);

    
    if ((n > (POFFSET+1))) 
      WITH_VAR_STACK(scheme_wrong_count_m("paste-x-selection in text% (without position case)", POFFSET+POFFSET, POFFSET+1, n, p, 1));
    if (n > (POFFSET+0)) {
      x0 = WITH_VAR_STACK(objscheme_unbundle_ExactLong(p[POFFSET+0], "paste-x-selection in text% (without position case)"));
    } else
      x0 = 0;

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->PasteSelection(x0));

    
    
    READY_TO_PRE_RETURN;
  }

  return scheme_void;
}

static Scheme_Object *os_wxMediaEditPaste(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  SETUP_PRE_VAR_STACK(1);
  PRE_VAR_STACK_PUSH(0, p);
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "paste in text%", n, p);
  if ((n >= (POFFSET+2)) && WITH_REMEMBERED_STACK(objscheme_istype_ExactLong(p[POFFSET+0], NULL)) && WITH_REMEMBERED_STACK(objscheme_istype_nonnegative_symbol_integer(p[POFFSET+1], "end", NULL))) {
    ExactLong x0;
    long x1;
    long x2;

    SETUP_VAR_STACK_PRE_REMEMBERED(1);
    VAR_STACK_PUSH(0, p);

    
    if ((n < (POFFSET+2)) || (n > (POFFSET+3))) 
      WITH_VAR_STACK(scheme_wrong_count_m("paste in text% (position case)", POFFSET+2, POFFSET+3, n, p, 1));
    x0 = WITH_VAR_STACK(objscheme_unbundle_ExactLong(p[POFFSET+0], "paste in text% (position case)"));
    x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[POFFSET+1], "end", "paste in text% (position case)"));
    if (n > (POFFSET+2)) {
      x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[POFFSET+2], "same", "paste in text% (position case)"));
    } else
      x2 = -1;

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->Paste(x0, x1, x2));

    
    
    READY_TO_PRE_RETURN;
  } else  {
    ExactLong x0;

    SETUP_VAR_STACK_PRE_REMEMBERED(1);
    VAR_STACK_PUSH(0, p);

    
    if ((n > (POFFSET+1))) 
      WITH_VAR_STACK(scheme_wrong_count_m("paste in text% (without position case)", POFFSET+POFFSET, POFFSET+1, n, p, 1));
    if (n > (POFFSET+0)) {
      x0 = WITH_VAR_STACK(objscheme_unbundle_ExactLong(p[POFFSET+0], "paste in text% (without position case)"));
    } else
      x0 = 0;

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->Paste(x0));

    
    
    READY_TO_PRE_RETURN;
  }

  return scheme_void;
}

static Scheme_Object *os_wxMediaEditCopy(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  SETUP_PRE_VAR_STACK(1);
  PRE_VAR_STACK_PUSH(0, p);
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "copy in text%", n, p);
  if ((n >= (POFFSET+3)) && WITH_REMEMBERED_STACK(objscheme_istype_bool(p[POFFSET+0], NULL)) && WITH_REMEMBERED_STACK(objscheme_istype_ExactLong(p[POFFSET+1], NULL)) && WITH_REMEMBERED_STACK(objscheme_istype_nonnegative_symbol_integer(p[POFFSET+2], "start", NULL))) {
    Bool x0;
    ExactLong x1;
    long x2;
    long x3;

    SETUP_VAR_STACK_PRE_REMEMBERED(1);
    VAR_STACK_PUSH(0, p);

    
    if ((n < (POFFSET+3)) || (n > (POFFSET+4))) 
      WITH_VAR_STACK(scheme_wrong_count_m("copy in text% (position case)", POFFSET+3, POFFSET+4, n, p, 1));
    x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+0], "copy in text% (position case)"));
    x1 = WITH_VAR_STACK(objscheme_unbundle_ExactLong(p[POFFSET+1], "copy in text% (position case)"));
    x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[POFFSET+2], "start", "copy in text% (position case)"));
    if (n > (POFFSET+3)) {
      x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[POFFSET+3], "end", "copy in text% (position case)"));
    } else
      x3 = -1;

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->Copy(x0, x1, x2, x3));

    
    
    READY_TO_PRE_RETURN;
  } else  {
    Bool x0;
    ExactLong x1;

    SETUP_VAR_STACK_PRE_REMEMBERED(1);
    VAR_STACK_PUSH(0, p);

    
    if ((n > (POFFSET+2))) 
      WITH_VAR_STACK(scheme_wrong_count_m("copy in text% (without position case)", POFFSET+POFFSET, POFFSET+2, n, p, 1));
    if (n > (POFFSET+0)) {
      x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+0], "copy in text% (without position case)"));
    } else
      x0 = FALSE;
    if (n > (POFFSET+1)) {
      x1 = WITH_VAR_STACK(objscheme_unbundle_ExactLong(p[POFFSET+1], "copy in text% (without position case)"));
    } else
      x1 = 0;

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->Copy(x0, x1));

    
    
    READY_TO_PRE_RETURN;
  }

  return scheme_void;
}

static Scheme_Object *os_wxMediaEditCut(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  SETUP_PRE_VAR_STACK(1);
  PRE_VAR_STACK_PUSH(0, p);
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "cut in text%", n, p);
  if ((n >= (POFFSET+3)) && WITH_REMEMBERED_STACK(objscheme_istype_bool(p[POFFSET+0], NULL)) && WITH_REMEMBERED_STACK(objscheme_istype_ExactLong(p[POFFSET+1], NULL)) && WITH_REMEMBERED_STACK(objscheme_istype_nonnegative_symbol_integer(p[POFFSET+2], "start", NULL))) {
    Bool x0;
    ExactLong x1;
    long x2;
    long x3;

    SETUP_VAR_STACK_PRE_REMEMBERED(1);
    VAR_STACK_PUSH(0, p);

    
    if ((n < (POFFSET+3)) || (n > (POFFSET+4))) 
      WITH_VAR_STACK(scheme_wrong_count_m("cut in text% (position case)", POFFSET+3, POFFSET+4, n, p, 1));
    x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+0], "cut in text% (position case)"));
    x1 = WITH_VAR_STACK(objscheme_unbundle_ExactLong(p[POFFSET+1], "cut in text% (position case)"));
    x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[POFFSET+2], "start", "cut in text% (position case)"));
    if (n > (POFFSET+3)) {
      x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[POFFSET+3], "end", "cut in text% (position case)"));
    } else
      x3 = -1;

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->Cut(x0, x1, x2, x3));

    
    
    READY_TO_PRE_RETURN;
  } else  {
    Bool x0;
    ExactLong x1;

    SETUP_VAR_STACK_PRE_REMEMBERED(1);
    VAR_STACK_PUSH(0, p);

    
    if ((n > (POFFSET+2))) 
      WITH_VAR_STACK(scheme_wrong_count_m("cut in text% (without position case)", POFFSET+POFFSET, POFFSET+2, n, p, 1));
    if (n > (POFFSET+0)) {
      x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+0], "cut in text% (without position case)"));
    } else
      x0 = FALSE;
    if (n > (POFFSET+1)) {
      x1 = WITH_VAR_STACK(objscheme_unbundle_ExactLong(p[POFFSET+1], "cut in text% (without position case)"));
    } else
      x1 = 0;

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->Cut(x0, x1));

    
    
    READY_TO_PRE_RETURN;
  }

  return scheme_void;
}

static Scheme_Object *os_wxMediaEditErase(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "erase in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->Erase());

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditDelete(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  SETUP_PRE_VAR_STACK(1);
  PRE_VAR_STACK_PUSH(0, p);
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "delete in text%", n, p);
  if ((n >= (POFFSET+1)) && WITH_REMEMBERED_STACK(objscheme_istype_nonnegative_symbol_integer(p[POFFSET+0], "start", NULL))) {
    long x0;
    long x1;
    Bool x2;

    SETUP_VAR_STACK_PRE_REMEMBERED(1);
    VAR_STACK_PUSH(0, p);

    
    if ((n < (POFFSET+1)) || (n > (POFFSET+3))) 
      WITH_VAR_STACK(scheme_wrong_count_m("delete in text% (position case)", POFFSET+1, POFFSET+3, n, p, 1));
    x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[POFFSET+0], "start", "delete in text% (position case)"));
    if (n > (POFFSET+1)) {
      x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[POFFSET+1], "back", "delete in text% (position case)"));
    } else
      x1 = -1;
    if (n > (POFFSET+2)) {
      x2 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+2], "delete in text% (position case)"));
    } else
      x2 = TRUE;

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->Delete(x0, x1, x2));

    
    
    READY_TO_PRE_RETURN;
  } else  {

    SETUP_VAR_STACK_PRE_REMEMBERED(1);
    VAR_STACK_PUSH(0, p);

    
    if (n != (POFFSET+0)) 
      WITH_VAR_STACK(scheme_wrong_count_m("delete in text% (no position case)", POFFSET+0, POFFSET+0, n, p, 1));

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->Delete());

    
    
    READY_TO_PRE_RETURN;
  }

  return scheme_void;
}

static Scheme_Object *os_wxMediaEditInsert(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  SETUP_PRE_VAR_STACK(1);
  PRE_VAR_STACK_PUSH(0, p);
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "insert in text%", n, p);
  if ((n >= (POFFSET+2)) && WITH_REMEMBERED_STACK(objscheme_istype_mzstring(p[POFFSET+0], NULL)) && WITH_REMEMBERED_STACK(objscheme_istype_number(p[POFFSET+1], NULL))) {
    long x0;
    mzstring x1 INIT_NULLED_OUT;
    nnlong x2;
    long x3;
    Bool x4;

    SETUP_VAR_STACK_PRE_REMEMBERED(2);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, x1);

    
    if ((n < (POFFSET+2)) || (n > (POFFSET+4))) 
      WITH_VAR_STACK(scheme_wrong_count_m("insert in text% (string and position case)", POFFSET+2, POFFSET+4, n, p, 1));
    x1 = (mzstring)WITH_VAR_STACK(objscheme_unbundle_mzstring(p[POFFSET+0], "insert in text% (string and position case)"));
    x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+1], "insert in text% (string and position case)"));
    if (n > (POFFSET+2)) {
      x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[POFFSET+2], "same", "insert in text% (string and position case)"));
    } else
      x3 = -1;
    if (n > (POFFSET+3)) {
      x4 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+3], "insert in text% (string and position case)"));
    } else
      x4 = TRUE;

    x0 = SCHEME_CHAR_STRTAG_VAL(p[POFFSET+0]);
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->Insert(x0, x1, x2, x3, x4));

    
    
    READY_TO_PRE_RETURN;
  } else if ((n >= (POFFSET+1)) && WITH_REMEMBERED_STACK(objscheme_istype_mzstring(p[POFFSET+0], NULL))) {
    long x0;
    mzstring x1 INIT_NULLED_OUT;

    SETUP_VAR_STACK_PRE_REMEMBERED(2);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, x1);

    
    if (n != (POFFSET+1)) 
      WITH_VAR_STACK(scheme_wrong_count_m("insert in text% (string without position case)", POFFSET+1, POFFSET+1, n, p, 1));
    x1 = (mzstring)WITH_VAR_STACK(objscheme_unbundle_mzstring(p[POFFSET+0], "insert in text% (string without position case)"));

    x0 = SCHEME_CHAR_STRTAG_VAL(p[POFFSET+0]);
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->Insert(x0, x1));

    
    
    READY_TO_PRE_RETURN;
  } else if ((n >= (POFFSET+3)) && WITH_REMEMBERED_STACK(objscheme_istype_number(p[POFFSET+0], NULL)) && WITH_REMEMBERED_STACK(objscheme_istype_mzstring(p[POFFSET+1], NULL)) && WITH_REMEMBERED_STACK(objscheme_istype_number(p[POFFSET+2], NULL))) {
    nnlong x0;
    mzstring x1 INIT_NULLED_OUT;
    nnlong x2;
    long x3;
    Bool x4;

    SETUP_VAR_STACK_PRE_REMEMBERED(2);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, x1);

    
    if ((n < (POFFSET+3)) || (n > (POFFSET+5))) 
      WITH_VAR_STACK(scheme_wrong_count_m("insert in text% (length and string without position case)", POFFSET+3, POFFSET+5, n, p, 1));
    x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "insert in text% (length and string without position case)"));
    x1 = (mzstring)WITH_VAR_STACK(objscheme_unbundle_mzstring(p[POFFSET+1], "insert in text% (length and string without position case)"));
    x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+2], "insert in text% (length and string without position case)"));
    if (n > (POFFSET+3)) {
      x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[POFFSET+3], "same", "insert in text% (length and string without position case)"));
    } else
      x3 = -1;
    if (n > (POFFSET+4)) {
      x4 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+4], "insert in text% (length and string without position case)"));
    } else
      x4 = TRUE;

    if ((x0 < 0) || (x0 > SCHEME_CHAR_STRTAG_VAL(p[POFFSET+1]))) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("text%","insert"), "bad string length: ", p[POFFSET+0]));
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->Insert(x0, x1, x2, x3, x4));

    
    
    READY_TO_PRE_RETURN;
  } else if ((n >= (POFFSET+1)) && WITH_REMEMBERED_STACK(objscheme_istype_number(p[POFFSET+0], NULL))) {
    nnlong x0;
    mzstring x1 INIT_NULLED_OUT;

    SETUP_VAR_STACK_PRE_REMEMBERED(2);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, x1);

    
    if (n != (POFFSET+2)) 
      WITH_VAR_STACK(scheme_wrong_count_m("insert in text% (length, string, and position case)", POFFSET+2, POFFSET+2, n, p, 1));
    x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "insert in text% (length, string, and position case)"));
    x1 = (mzstring)WITH_VAR_STACK(objscheme_unbundle_mzstring(p[POFFSET+1], "insert in text% (length, string, and position case)"));

    if ((x0 < 0) || (x0 > SCHEME_CHAR_STRTAG_VAL(p[POFFSET+1]))) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("text%","insert"), "bad string length: ", p[POFFSET+0]));
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->Insert(x0, x1));

    
    
    READY_TO_PRE_RETURN;
  } else if ((n >= (POFFSET+2)) && WITH_REMEMBERED_STACK(objscheme_istype_wxSnip(p[POFFSET+0], NULL, 0)) && WITH_REMEMBERED_STACK(objscheme_istype_number(p[POFFSET+1], NULL))) {
    class wxSnip* x0 INIT_NULLED_OUT;
    nnlong x1;
    long x2;
    Bool x3;

    SETUP_VAR_STACK_PRE_REMEMBERED(2);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, x0);

    
    if ((n < (POFFSET+2)) || (n > (POFFSET+4))) 
      WITH_VAR_STACK(scheme_wrong_count_m("insert in text% (snip% and position case)", POFFSET+2, POFFSET+4, n, p, 1));
    x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnip(p[POFFSET+0], "insert in text% (snip% and position case)", 0));
    x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+1], "insert in text% (snip% and position case)"));
    if (n > (POFFSET+2)) {
      x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[POFFSET+2], "same", "insert in text% (snip% and position case)"));
    } else
      x2 = -1;
    if (n > (POFFSET+3)) {
      x3 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+3], "insert in text% (snip% and position case)"));
    } else
      x3 = TRUE;

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->Insert(x0, x1, x2, x3));

    
    
    READY_TO_PRE_RETURN;
  } else if ((n >= (POFFSET+1)) && WITH_REMEMBERED_STACK(objscheme_istype_wxSnip(p[POFFSET+0], NULL, 0))) {
    class wxSnip* x0 INIT_NULLED_OUT;

    SETUP_VAR_STACK_PRE_REMEMBERED(2);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, x0);

    
    if (n != (POFFSET+1)) 
      WITH_VAR_STACK(scheme_wrong_count_m("insert in text% (snip% without position case)", POFFSET+1, POFFSET+1, n, p, 1));
    x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnip(p[POFFSET+0], "insert in text% (snip% without position case)", 0));

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->Insert(x0));

    
    
    READY_TO_PRE_RETURN;
  } else if ((n >= (POFFSET+2)) && WITH_REMEMBERED_STACK(objscheme_istype_char(p[POFFSET+0], NULL)) && WITH_REMEMBERED_STACK(objscheme_istype_number(p[POFFSET+1], NULL))) {
    mzchar x0;
    nnlong x1;
    long x2;

    SETUP_VAR_STACK_PRE_REMEMBERED(1);
    VAR_STACK_PUSH(0, p);

    
    if ((n < (POFFSET+2)) || (n > (POFFSET+3))) 
      WITH_VAR_STACK(scheme_wrong_count_m("insert in text% (character and position case)", POFFSET+2, POFFSET+3, n, p, 1));
    x0 = WITH_VAR_STACK(objscheme_unbundle_char(p[POFFSET+0], "insert in text% (character and position case)"));
    x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+1], "insert in text% (character and position case)"));
    if (n > (POFFSET+2)) {
      x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[POFFSET+2], "same", "insert in text% (character and position case)"));
    } else
      x2 = -1;

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->Insert(x0, x1, x2));

    
    
    READY_TO_PRE_RETURN;
  } else  {
    mzchar x0;

    SETUP_VAR_STACK_PRE_REMEMBERED(1);
    VAR_STACK_PUSH(0, p);

    
    if (n != (POFFSET+1)) 
      WITH_VAR_STACK(scheme_wrong_count_m("insert in text% (character without position case)", POFFSET+1, POFFSET+1, n, p, 1));
    x0 = WITH_VAR_STACK(objscheme_unbundle_char(p[POFFSET+0], "insert in text% (character without position case)"));

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->Insert(x0));

    
    
    READY_TO_PRE_RETURN;
  }

  return scheme_void;
}

static Scheme_Object *os_wxMediaEditGetTopLineBase(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  double r;
  objscheme_check_valid(os_wxMediaEdit_class, "get-top-line-base in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->GetTopLineBase());

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(scheme_make_double(r));
}

static Scheme_Object *os_wxMediaEditFlashOff(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "flash-off in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->FlashOff());

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditFlashOn(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "flash-on in text%", n, p);
  nnlong x0;
  nnlong x1;
  Bool x2;
  Bool x3;
  nnlong x4;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "flash-on in text%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+1], "flash-on in text%"));
  if (n > (POFFSET+2)) {
    x2 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+2], "flash-on in text%"));
  } else
    x2 = FALSE;
  if (n > (POFFSET+3)) {
    x3 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+3], "flash-on in text%"));
  } else
    x3 = TRUE;
  if (n > (POFFSET+4)) {
    x4 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+4], "flash-on in text%"));
  } else
    x4 = 500;

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->FlashOn(x0, x1, x2, x3, x4));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditGetAnchor(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxMediaEdit_class, "get-anchor in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->GetAnchor());

  
  
  READY_TO_RETURN;
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditSetAnchor(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "set-anchor in text%", n, p);
  Bool x0;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+0], "set-anchor in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::SetAnchor(x0));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->SetAnchor(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditGetVisibleLineRange(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "get-visible-line-range in text%", n, p);
  nnlong _x0;
  nnlong* x0 = &_x0;
  nnlong _x1;
  nnlong* x1 = &_x1;
  Bool x2;
  Scheme_Object *sbox_tmp;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  if (XC_SCHEME_NULLP(p[POFFSET+0]))
    x0 = NULL;
  else
    *x0 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+0], "get-visible-line-range in text%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(sbox_tmp, "get-visible-line-range in text%"", extracting boxed argument")));
  if (XC_SCHEME_NULLP(p[POFFSET+1]))
    x1 = NULL;
  else
    *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+1], "get-visible-line-range in text%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(sbox_tmp, "get-visible-line-range in text%"", extracting boxed argument")));
  if (n > (POFFSET+2)) {
    x2 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+2], "get-visible-line-range in text%"));
  } else
    x2 = TRUE;

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->GetVisibleLineRange(x0, x1, x2));

  
  if (n > (POFFSET+0) && !XC_SCHEME_NULLP(p[POFFSET+0]))
    { Scheme_Object *sbv_ = scheme_make_integer(_x0); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+0], sbv_)); } 
  if (n > (POFFSET+1) && !XC_SCHEME_NULLP(p[POFFSET+1]))
    { Scheme_Object *sbv_ = scheme_make_integer(_x1); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+1], sbv_)); } 
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditGetVisiblePositionRange(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "get-visible-position-range in text%", n, p);
  nnlong _x0;
  nnlong* x0 = &_x0;
  nnlong _x1;
  nnlong* x1 = &_x1;
  Bool x2;
  Scheme_Object *sbox_tmp;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  if (XC_SCHEME_NULLP(p[POFFSET+0]))
    x0 = NULL;
  else
    *x0 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+0], "get-visible-position-range in text%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(sbox_tmp, "get-visible-position-range in text%"", extracting boxed argument")));
  if (XC_SCHEME_NULLP(p[POFFSET+1]))
    x1 = NULL;
  else
    *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+1], "get-visible-position-range in text%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(sbox_tmp, "get-visible-position-range in text%"", extracting boxed argument")));
  if (n > (POFFSET+2)) {
    x2 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+2], "get-visible-position-range in text%"));
  } else
    x2 = TRUE;

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->GetVisiblePositionRange(x0, x1, x2));

  
  if (n > (POFFSET+0) && !XC_SCHEME_NULLP(p[POFFSET+0]))
    { Scheme_Object *sbv_ = scheme_make_integer(_x0); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+0], sbv_)); } 
  if (n > (POFFSET+1) && !XC_SCHEME_NULLP(p[POFFSET+1]))
    { Scheme_Object *sbv_ = scheme_make_integer(_x1); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+1], sbv_)); } 
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditScrollToPosition(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxMediaEdit_class, "scroll-to-position in text%", n, p);
  nnlong x0;
  Bool x1;
  long x2;
  int x3;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "scroll-to-position in text%"));
  if (n > (POFFSET+1)) {
    x1 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+1], "scroll-to-position in text%"));
  } else
    x1 = FALSE;
  if (n > (POFFSET+2)) {
    x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[POFFSET+2], "same", "scroll-to-position in text%"));
  } else
    x2 = -1;
  if (n > (POFFSET+3)) {
    x3 = WITH_VAR_STACK(unbundle_symset_bias(p[POFFSET+3], "scroll-to-position in text%"));
  } else
    x3 = 0;

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->ScrollToPosition(x0, x1, x2, x3));

  
  
  READY_TO_RETURN;
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditMovePosition(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "move-position in text%", n, p);
  int x0;
  Bool x1;
  int x2;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(unbundle_symset_moveCode(p[POFFSET+0], "move-position in text%"));
  if (n > (POFFSET+1)) {
    x1 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+1], "move-position in text%"));
  } else
    x1 = FALSE;
  if (n > (POFFSET+2)) {
    x2 = WITH_VAR_STACK(unbundle_symset_move(p[POFFSET+2], "move-position in text%"));
  } else
    x2 = wxMOVE_SIMPLE;

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->MovePosition(x0, x1, x2));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditSetPositionBiasScroll(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "set-position-bias-scroll in text%", n, p);
  int x0;
  nnlong x1;
  long x2;
  Bool x3;
  Bool x4;
  int x5;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(unbundle_symset_Bias(p[POFFSET+0], "set-position-bias-scroll in text%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+1], "set-position-bias-scroll in text%"));
  if (n > (POFFSET+2)) {
    x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[POFFSET+2], "same", "set-position-bias-scroll in text%"));
  } else
    x2 = -1;
  if (n > (POFFSET+3)) {
    x3 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+3], "set-position-bias-scroll in text%"));
  } else
    x3 = FALSE;
  if (n > (POFFSET+4)) {
    x4 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+4], "set-position-bias-scroll in text%"));
  } else
    x4 = TRUE;
  if (n > (POFFSET+5)) {
    x5 = WITH_VAR_STACK(unbundle_symset_selType(p[POFFSET+5], "set-position-bias-scroll in text%"));
  } else
    x5 = wxDEFAULT_SELECT;

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->SetPositionBiasScroll(x0, x1, x2, x3, x4, x5));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditSetPosition(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "set-position in text%", n, p);
  nnlong x0;
  long x1;
  Bool x2;
  Bool x3;
  int x4;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "set-position in text%"));
  if (n > (POFFSET+1)) {
    x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[POFFSET+1], "same", "set-position in text%"));
  } else
    x1 = -1;
  if (n > (POFFSET+2)) {
    x2 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+2], "set-position in text%"));
  } else
    x2 = FALSE;
  if (n > (POFFSET+3)) {
    x3 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+3], "set-position in text%"));
  } else
    x3 = TRUE;
  if (n > (POFFSET+4)) {
    x4 = WITH_VAR_STACK(unbundle_symset_selType(p[POFFSET+4], "set-position in text%"));
  } else
    x4 = wxDEFAULT_SELECT;

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->SetPosition(x0, x1, x2, x3, x4));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditGetEndPosition(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(os_wxMediaEdit_class, "get-end-position in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->GetEndPosition());

  
  
  READY_TO_RETURN;
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditGetStartPosition(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(os_wxMediaEdit_class, "get-start-position in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->GetStartPosition());

  
  
  READY_TO_RETURN;
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditGetPosition(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "get-position in text%", n, p);
  nnlong _x0;
  nnlong* x0 = &_x0;
  nnlong _x1;
  nnlong* x1 = &_x1;
  Scheme_Object *sbox_tmp;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  if (XC_SCHEME_NULLP(p[POFFSET+0]))
    x0 = NULL;
  else
    *x0 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+0], "get-position in text%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(sbox_tmp, "get-position in text%"", extracting boxed argument")));
  if (n > (POFFSET+1)) {
    if (XC_SCHEME_NULLP(p[POFFSET+1]))
    x1 = NULL;
  else
    *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+1], "get-position in text%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(sbox_tmp, "get-position in text%"", extracting boxed argument")));
  } else
    x1 = NULL;

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->GetPosition(x0, x1));

  
  if (n > (POFFSET+0) && !XC_SCHEME_NULLP(p[POFFSET+0]))
    { Scheme_Object *sbv_ = scheme_make_integer(_x0); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+0], sbv_)); } 
  if (n > (POFFSET+1) && !XC_SCHEME_NULLP(p[POFFSET+1]))
    { Scheme_Object *sbv_ = scheme_make_integer(_x1); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+1], sbv_)); } 
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditGetDefaultStyleName(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  string r;
  objscheme_check_valid(os_wxMediaEdit_class, "default-style-name in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::GetDefaultStyleName());
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->GetDefaultStyleName());

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_string((char *)r));
}

static Scheme_Object *os_wxMediaEditGetFlattenedText(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  mzstring r;
  objscheme_check_valid(os_wxMediaEdit_class, "get-flattened-text in text%", n, p);
  long _x0;
  long* x0 = &_x0;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->GetFlattenedText(x0));

  
  
  READY_TO_RETURN;
  return WITH_VAR_STACK(scheme_make_sized_char_string(r, _x0, 0));
}

static Scheme_Object *os_wxMediaEditPutFile(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  npathname r;
  objscheme_check_valid(os_wxMediaEdit_class, "put-file in text%", n, p);
  nepathname x0 INIT_NULLED_OUT;
  nepathname x1 INIT_NULLED_OUT;

  SETUP_VAR_STACK_REMEMBERED(3);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);
  VAR_STACK_PUSH(2, x1);

  
  x0 = (nepathname)WITH_VAR_STACK(objscheme_unbundle_nullable_epathname(p[POFFSET+0], "put-file in text%"));
  x1 = (nepathname)WITH_VAR_STACK(objscheme_unbundle_nullable_epathname(p[POFFSET+1], "put-file in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::PutFile(x0, x1));
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->PutFile(x0, x1));

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_pathname((char *)r));
}

static Scheme_Object *os_wxMediaEditGetFile(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  npathname r;
  objscheme_check_valid(os_wxMediaEdit_class, "get-file in text%", n, p);
  nepathname x0 INIT_NULLED_OUT;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);

  
  x0 = (nepathname)WITH_VAR_STACK(objscheme_unbundle_nullable_epathname(p[POFFSET+0], "get-file in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::GetFile(x0));
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->GetFile(x0));

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_pathname((char *)r));
}

static Scheme_Object *os_wxMediaEditAfterEditSequence(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "after-edit-sequence in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::AfterEditSequence());
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->AfterEditSequence());

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOnEditSequence(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "on-edit-sequence in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::OnEditSequence());
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->OnEditSequence());

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditAfterLoadFile(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "after-load-file in text%", n, p);
  Bool x0;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+0], "after-load-file in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::AfterLoadFile(x0));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->AfterLoadFile(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOnLoadFile(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "on-load-file in text%", n, p);
  epathname x0 INIT_NULLED_OUT;
  int x1;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);

  
  x0 = (epathname)WITH_VAR_STACK(objscheme_unbundle_epathname(p[POFFSET+0], "on-load-file in text%"));
  x1 = WITH_VAR_STACK(unbundle_symset_fileType(p[POFFSET+1], "on-load-file in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::OnLoadFile(x0, x1));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->OnLoadFile(x0, x1));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditCanLoadFile(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxMediaEdit_class, "can-load-file? in text%", n, p);
  epathname x0 INIT_NULLED_OUT;
  int x1;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);

  
  x0 = (epathname)WITH_VAR_STACK(objscheme_unbundle_epathname(p[POFFSET+0], "can-load-file? in text%"));
  x1 = WITH_VAR_STACK(unbundle_symset_fileType(p[POFFSET+1], "can-load-file? in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::CanLoadFile(x0, x1));
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->CanLoadFile(x0, x1));

  
  
  READY_TO_RETURN;
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditAfterSaveFile(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "after-save-file in text%", n, p);
  Bool x0;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+0], "after-save-file in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::AfterSaveFile(x0));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->AfterSaveFile(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOnSaveFile(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "on-save-file in text%", n, p);
  epathname x0 INIT_NULLED_OUT;
  int x1;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);

  
  x0 = (epathname)WITH_VAR_STACK(objscheme_unbundle_epathname(p[POFFSET+0], "on-save-file in text%"));
  x1 = WITH_VAR_STACK(unbundle_symset_fileType(p[POFFSET+1], "on-save-file in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::OnSaveFile(x0, x1));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->OnSaveFile(x0, x1));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditCanSaveFile(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxMediaEdit_class, "can-save-file? in text%", n, p);
  epathname x0 INIT_NULLED_OUT;
  int x1;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);

  
  x0 = (epathname)WITH_VAR_STACK(objscheme_unbundle_epathname(p[POFFSET+0], "can-save-file? in text%"));
  x1 = WITH_VAR_STACK(unbundle_symset_fileType(p[POFFSET+1], "can-save-file? in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::CanSaveFile(x0, x1));
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->CanSaveFile(x0, x1));

  
  
  READY_TO_RETURN;
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditOnNewBox(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxSnip* r;
  objscheme_check_valid(os_wxMediaEdit_class, "on-new-box in text%", n, p);
  int x0;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(unbundle_symset_bufferType(p[POFFSET+0], "on-new-box in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::OnNewBox(x0));
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->OnNewBox(x0));

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxSnip(r));
}

static Scheme_Object *os_wxMediaEditOnNewImageSnip(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxImageSnip* r;
  objscheme_check_valid(os_wxMediaEdit_class, "on-new-image-snip in text%", n, p);
  nxpathname x0 INIT_NULLED_OUT;
  int x1;
  Bool x2;
  Bool x3;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);

  
  x0 = (nxpathname)WITH_VAR_STACK(objscheme_unbundle_nullable_xpathname(p[POFFSET+0], "on-new-image-snip in text%"));
  x1 = WITH_VAR_STACK(unbundle_symset_bitmapType(p[POFFSET+1], "on-new-image-snip in text%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+2], "on-new-image-snip in text%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+3], "on-new-image-snip in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::OnNewImageSnip(x0, x1, x2, x3));
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->OnNewImageSnip(x0, x1, x2, x3));

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxImageSnip(r));
}

static Scheme_Object *os_wxMediaEditInvalidateBitmapCache(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "invalidate-bitmap-cache in text%", n, p);
  double x0;
  double x1;
  double x2;
  double x3;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  if (n > (POFFSET+0)) {
    x0 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+0], "invalidate-bitmap-cache in text%"));
  } else
    x0 = 0.0;
  if (n > (POFFSET+1)) {
    x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "invalidate-bitmap-cache in text%"));
  } else
    x1 = 0.0;
  if (n > (POFFSET+2)) {
    x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_double(p[POFFSET+2], "end", "invalidate-bitmap-cache in text%"));
  } else
    x2 = -1.0;
  if (n > (POFFSET+3)) {
    x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_double(p[POFFSET+3], "end", "invalidate-bitmap-cache in text%"));
  } else
    x3 = -1.0;

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::InvalidateBitmapCache(x0, x1, x2, x3));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->InvalidateBitmapCache(x0, x1, x2, x3));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOnPaint(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "on-paint in text%", n, p);
  Bool x0;
  class wxDC* x1 INIT_NULLED_OUT;
  double x2;
  double x3;
  double x4;
  double x5;
  double x6;
  double x7;
  int x8;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x1);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+0], "on-paint in text%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+1], "on-paint in text%", 0));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "on-paint in text%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+3], "on-paint in text%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+4], "on-paint in text%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+5], "on-paint in text%"));
  x6 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+6], "on-paint in text%"));
  x7 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+7], "on-paint in text%"));
  x8 = WITH_VAR_STACK(unbundle_symset_caret(p[POFFSET+8], "on-paint in text%"));

  if (x1 && !x1->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("editor<%>","on-paint"), "bad device context: ", p[POFFSET+1]));
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::OnPaint(x0, x1, x2, x3, x4, x5, x6, x7, x8));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->OnPaint(x0, x1, x2, x3, x4, x5, x6, x7, x8));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditWriteFootersToFile(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxMediaEdit_class, "write-footers-to-file in text%", n, p);
  class wxMediaStreamOut* x0 INIT_NULLED_OUT;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxMediaStreamOut(p[POFFSET+0], "write-footers-to-file in text%", 0));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::WriteFootersToFile(x0));
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->WriteFootersToFile(x0));

  
  
  READY_TO_RETURN;
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditWriteHeadersToFile(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxMediaEdit_class, "write-headers-to-file in text%", n, p);
  class wxMediaStreamOut* x0 INIT_NULLED_OUT;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxMediaStreamOut(p[POFFSET+0], "write-headers-to-file in text%", 0));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::WriteHeadersToFile(x0));
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->WriteHeadersToFile(x0));

  
  
  READY_TO_RETURN;
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditReadFooterFromFile(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxMediaEdit_class, "read-footer-from-file in text%", n, p);
  class wxMediaStreamIn* x0 INIT_NULLED_OUT;
  string x1 INIT_NULLED_OUT;

  SETUP_VAR_STACK_REMEMBERED(3);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);
  VAR_STACK_PUSH(2, x1);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxMediaStreamIn(p[POFFSET+0], "read-footer-from-file in text%", 0));
  x1 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[POFFSET+1], "read-footer-from-file in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::ReadFooterFromFile(x0, x1));
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->ReadFooterFromFile(x0, x1));

  
  
  READY_TO_RETURN;
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditReadHeaderFromFile(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxMediaEdit_class, "read-header-from-file in text%", n, p);
  class wxMediaStreamIn* x0 INIT_NULLED_OUT;
  string x1 INIT_NULLED_OUT;

  SETUP_VAR_STACK_REMEMBERED(3);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);
  VAR_STACK_PUSH(2, x1);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxMediaStreamIn(p[POFFSET+0], "read-header-from-file in text%", 0));
  x1 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[POFFSET+1], "read-header-from-file in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::ReadHeaderFromFile(x0, x1));
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->ReadHeaderFromFile(x0, x1));

  
  
  READY_TO_RETURN;
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditSetFilename(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "set-filename in text%", n, p);
  nxpathname x0 INIT_NULLED_OUT;
  Bool x1;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);

  
  x0 = (nxpathname)WITH_VAR_STACK(objscheme_unbundle_nullable_xpathname(p[POFFSET+0], "set-filename in text%"));
  if (n > (POFFSET+1)) {
    x1 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+1], "set-filename in text%"));
  } else
    x1 = FALSE;

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::SetFilename(x0, x1));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->SetFilename(x0, x1));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditReleaseSnip(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxMediaEdit_class, "release-snip in text%", n, p);
  class wxSnip* x0 INIT_NULLED_OUT;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnip(p[POFFSET+0], "release-snip in text%", 0));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::ReleaseSnip(x0));
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->ReleaseSnip(x0));

  
  
  READY_TO_RETURN;
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditOnSnipModified(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "on-snip-modified in text%", n, p);
  class wxSnip* x0 INIT_NULLED_OUT;
  Bool x1;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnip(p[POFFSET+0], "on-snip-modified in text%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+1], "on-snip-modified in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::OnSnipModified(x0, x1));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->OnSnipModified(x0, x1));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditSetModified(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "set-modified in text%", n, p);
  Bool x0;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+0], "set-modified in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::SetModified(x0));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->SetModified(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditSetSnipData(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "set-snip-data in text%", n, p);
  class wxSnip* x0 INIT_NULLED_OUT;
  class wxBufferData* x1 INIT_NULLED_OUT;

  SETUP_VAR_STACK_REMEMBERED(3);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);
  VAR_STACK_PUSH(2, x1);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnip(p[POFFSET+0], "set-snip-data in text%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_wxBufferData(p[POFFSET+1], "set-snip-data in text%", 1));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::SetSnipData(x0, x1));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->SetSnipData(x0, x1));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditGetSnipData(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxBufferData* r;
  objscheme_check_valid(os_wxMediaEdit_class, "get-snip-data in text%", n, p);
  class wxSnip* x0 INIT_NULLED_OUT;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnip(p[POFFSET+0], "get-snip-data in text%", 0));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::GetSnipData(x0));
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->GetSnipData(x0));

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxBufferData(r));
}

static Scheme_Object *os_wxMediaEditNeedsUpdate(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "needs-update in text%", n, p);
  class wxSnip* x0 INIT_NULLED_OUT;
  double x1;
  double x2;
  nndouble x3;
  nndouble x4;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnip(p[POFFSET+0], "needs-update in text%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "needs-update in text%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "needs-update in text%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(p[POFFSET+3], "needs-update in text%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(p[POFFSET+4], "needs-update in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::NeedsUpdate(x0, x1, x2, x3, x4));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->NeedsUpdate(x0, x1, x2, x3, x4));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditResized(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "resized in text%", n, p);
  class wxSnip* x0 INIT_NULLED_OUT;
  Bool x1;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnip(p[POFFSET+0], "resized in text%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+1], "resized in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::Resized(x0, x1));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->Resized(x0, x1));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditSetCaretOwner(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "set-caret-owner in text%", n, p);
  class wxSnip* x0 INIT_NULLED_OUT;
  int x1;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnip(p[POFFSET+0], "set-caret-owner in text%", 1));
  if (n > (POFFSET+1)) {
    x1 = WITH_VAR_STACK(unbundle_symset_focus(p[POFFSET+1], "set-caret-owner in text%"));
  } else
    x1 = wxFOCUS_IMMEDIATE;

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::SetCaretOwner(x0, x1));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->SetCaretOwner(x0, x1));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditScrollTo(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxMediaEdit_class, "scroll-to in text%", n, p);
  class wxSnip* x0 INIT_NULLED_OUT;
  double x1;
  double x2;
  nndouble x3;
  nndouble x4;
  Bool x5;
  int x6;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnip(p[POFFSET+0], "scroll-to in text%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "scroll-to in text%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "scroll-to in text%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(p[POFFSET+3], "scroll-to in text%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(p[POFFSET+4], "scroll-to in text%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+5], "scroll-to in text%"));
  if (n > (POFFSET+6)) {
    x6 = WITH_VAR_STACK(unbundle_symset_bias(p[POFFSET+6], "scroll-to in text%"));
  } else
    x6 = 0;

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::ScrollTo(x0, x1, x2, x3, x4, x5, x6));
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->ScrollTo(x0, x1, x2, x3, x4, x5, x6));

  
  
  READY_TO_RETURN;
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditOnDisplaySizeWhenReady(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "on-display-size-when-ready in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::OnDisplaySizeWhenReady());
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->OnDisplaySizeWhenReady());

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOnDisplaySize(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "on-display-size in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::OnDisplaySize());
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->OnDisplaySize());

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOnChange(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "on-change in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::OnChange());
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->OnChange());

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOnFocus(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "on-focus in text%", n, p);
  Bool x0;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+0], "on-focus in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::OnFocus(x0));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->OnFocus(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOnDefaultChar(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "on-default-char in text%", n, p);
  class wxKeyEvent* x0 INIT_NULLED_OUT;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxKeyEvent(p[POFFSET+0], "on-default-char in text%", 0));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::OnDefaultChar(x0));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->OnDefaultChar(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOnDefaultEvent(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "on-default-event in text%", n, p);
  class wxMouseEvent* x0 INIT_NULLED_OUT;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[POFFSET+0], "on-default-event in text%", 0));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::OnDefaultEvent(x0));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->OnDefaultEvent(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOnLocalChar(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "on-local-char in text%", n, p);
  class wxKeyEvent* x0 INIT_NULLED_OUT;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxKeyEvent(p[POFFSET+0], "on-local-char in text%", 0));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::OnLocalChar(x0));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->OnLocalChar(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOnLocalEvent(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "on-local-event in text%", n, p);
  class wxMouseEvent* x0 INIT_NULLED_OUT;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[POFFSET+0], "on-local-event in text%", 0));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::OnLocalEvent(x0));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->OnLocalEvent(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditFindFirstSnip(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxSnip* r;
  objscheme_check_valid(os_wxMediaEdit_class, "find-first-snip in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->FindFirstSnip());

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxSnip(r));
}

static Scheme_Object *os_wxMediaEditGetSpace(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  double r;
  objscheme_check_valid(os_wxMediaEdit_class, "get-space in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::GetSpace());
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->GetSpace());

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(scheme_make_double(r));
}

static Scheme_Object *os_wxMediaEditGetDescent(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  double r;
  objscheme_check_valid(os_wxMediaEdit_class, "get-descent in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::GetDescent());
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->GetDescent());

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(scheme_make_double(r));
}

static Scheme_Object *os_wxMediaEditGetExtent(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "get-extent in text%", n, p);
  nndouble _x0;
  nndouble* x0 = &_x0;
  nndouble _x1;
  nndouble* x1 = &_x1;
  Scheme_Object *sbox_tmp;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  if (XC_SCHEME_NULLP(p[POFFSET+0]))
    x0 = NULL;
  else
    *x0 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+0], "get-extent in text%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in text%"", extracting boxed argument")));
  if (XC_SCHEME_NULLP(p[POFFSET+1]))
    x1 = NULL;
  else
    *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+1], "get-extent in text%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in text%"", extracting boxed argument")));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::GetExtent(x0, x1));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->GetExtent(x0, x1));

  
  if (n > (POFFSET+0) && !XC_SCHEME_NULLP(p[POFFSET+0]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x0)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+0], sbv_)); } 
  if (n > (POFFSET+1) && !XC_SCHEME_NULLP(p[POFFSET+1]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x1)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+1], sbv_)); } 
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditBlinkCaret(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "blink-caret in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::BlinkCaret());
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->BlinkCaret());

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOwnCaret(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "own-caret in text%", n, p);
  Bool x0;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+0], "own-caret in text%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::OwnCaret(x0));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->OwnCaret(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditRefresh(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "refresh in text%", n, p);
  double x0;
  double x1;
  nndouble x2;
  nndouble x3;
  int x4;
  class wxColour* x5 INIT_NULLED_OUT;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x5);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+0], "refresh in text%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "refresh in text%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(p[POFFSET+2], "refresh in text%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(p[POFFSET+3], "refresh in text%"));
  x4 = WITH_VAR_STACK(unbundle_symset_caret(p[POFFSET+4], "refresh in text%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_wxColour(p[POFFSET+5], "refresh in text%", 1));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::Refresh(x0, x1, x2, x3, x4, x5));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->Refresh(x0, x1, x2, x3, x4, x5));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditAdjustCursor(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxCursor* r;
  objscheme_check_valid(os_wxMediaEdit_class, "adjust-cursor in text%", n, p);
  class wxMouseEvent* x0 INIT_NULLED_OUT;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[POFFSET+0], "adjust-cursor in text%", 0));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::AdjustCursor(x0));
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->AdjustCursor(x0));

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxCursor(r));
}

static Scheme_Object *os_wxMediaEditOnChar(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "on-char in text%", n, p);
  class wxKeyEvent* x0 INIT_NULLED_OUT;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxKeyEvent(p[POFFSET+0], "on-char in text%", 0));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::OnChar(x0));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->OnChar(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOnEvent(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "on-event in text%", n, p);
  class wxMouseEvent* x0 INIT_NULLED_OUT;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[POFFSET+0], "on-event in text%", 0));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::OnEvent(x0));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->OnEvent(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditCopySelfTo(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaEdit_class, "copy-self-to in text%", n, p);
  class wxMediaBuffer* x0 INIT_NULLED_OUT;

  SETUP_VAR_STACK_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxMediaBuffer(p[POFFSET+0], "copy-self-to in text%", 0));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::CopySelfTo(x0));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->CopySelfTo(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditCopySelf(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxMediaBuffer* r;
  objscheme_check_valid(os_wxMediaEdit_class, "copy-self in text%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaEdit::CopySelf());
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)p[0])->primdata)->CopySelf());

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxMediaBuffer(r));
}

static Scheme_Object *os_wxMediaEdit_ConstructScheme(int n,  Scheme_Object *p[])
{
  SETUP_PRE_VAR_STACK(1);
  PRE_VAR_STACK_PUSH(0, p);
  os_wxMediaEdit *realobj INIT_NULLED_OUT;
  REMEMBER_VAR_STACK();
  nndouble x0;
  double* x1 INIT_NULLED_OUT;
  int x2;

  SETUP_VAR_STACK_PRE_REMEMBERED(3);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, realobj);
  VAR_STACK_PUSH(2, x1);

  
  if ((n > (POFFSET+2))) 
    WITH_VAR_STACK(scheme_wrong_count_m("initialization in text%", POFFSET+POFFSET, POFFSET+2, n, p, 1));
  if (n > (POFFSET+0)) {
    x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(p[POFFSET+0], "initialization in text%"));
  } else
    x0 = 1.0;
  if (n > (POFFSET+1)) {
    x1 = NULL;
  } else
    x1 = NULL;

  x1 = WITH_VAR_STACK(__MakedoubleArray((1+POFFSET < n) ? p[POFFSET+1] : scheme_null, &x2, METHODNAME("text%","initialization")));
  realobj = WITH_VAR_STACK(new os_wxMediaEdit CONSTRUCTOR_ARGS((x0, x1, x2)));
#ifdef MZ_PRECISE_GC
  WITH_VAR_STACK(realobj->gcInit_wxMediaEdit(x0, x1, x2));
#endif
  realobj->__gc_external = (void *)p[0];
  
  
  READY_TO_RETURN;
  ((Scheme_Class_Object *)p[0])->primdata = realobj;
  ((Scheme_Class_Object *)p[0])->primflag = 1;
  return scheme_void;
}

void objscheme_setup_wxMediaEdit(Scheme_Env *env)
{
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, env);

  wxREGGLOB(os_wxMediaEdit_class);

  os_wxMediaEdit_class = WITH_VAR_STACK(objscheme_def_prim_class(env, "text%", "editor%", (Scheme_Method_Prim *)os_wxMediaEdit_ConstructScheme, 150));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "call-clickback" " method", (Scheme_Method_Prim *)os_wxMediaEditCallClickback, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "remove-clickback" " method", (Scheme_Method_Prim *)os_wxMediaEditRemoveClickback, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-clickback" " method", (Scheme_Method_Prim *)os_wxMediaEditSetClickback, 3, 5));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-wordbreak-func" " method", (Scheme_Method_Prim *)os_wxMediaEditSetWordbreakFunc, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-autowrap-bitmap" " method", (Scheme_Method_Prim *)os_wxMediaEditSetAutowrapBitmap, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-new-tab-snip" " method", (Scheme_Method_Prim *)os_wxMediaEditOnNewTabSnip, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-new-string-snip" " method", (Scheme_Method_Prim *)os_wxMediaEditOnNewTextSnip, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "caret-hidden?" " method", (Scheme_Method_Prim *)os_wxMediaEditCaretHidden, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "hide-caret" " method", (Scheme_Method_Prim *)os_wxMediaEditHideCaret, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-wordbreak-map" " method", (Scheme_Method_Prim *)os_wxMediaEditGetWordbreakMap, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-wordbreak-map" " method", (Scheme_Method_Prim *)os_wxMediaEditSetWordbreakMap, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "find-wordbreak" " method", (Scheme_Method_Prim *)os_wxMediaEditFindWordbreak, 3, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-region-data" " method", (Scheme_Method_Prim *)os_wxMediaEditSetRegionData, 3, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-region-data" " method", (Scheme_Method_Prim *)os_wxMediaEditGetRegionData, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-revision-number" " method", (Scheme_Method_Prim *)os_wxMediaEditGetRevisionNumber, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "after-merge-snips" " method", (Scheme_Method_Prim *)os_wxMediaEditOnMergeSnips, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "after-split-snip" " method", (Scheme_Method_Prim *)os_wxMediaEditOnSplitSnip, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "after-set-size-constraint" " method", (Scheme_Method_Prim *)os_wxMediaEditAfterSetSizeConstraint, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-set-size-constraint" " method", (Scheme_Method_Prim *)os_wxMediaEditOnSetSizeConstraint, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "can-set-size-constraint?" " method", (Scheme_Method_Prim *)os_wxMediaEditCanSetSizeConstraint, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "after-set-position" " method", (Scheme_Method_Prim *)os_wxMediaEditAfterSetPosition, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "after-change-style" " method", (Scheme_Method_Prim *)os_wxMediaEditAfterChangeStyle, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-change-style" " method", (Scheme_Method_Prim *)os_wxMediaEditOnChangeStyle, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "can-change-style?" " method", (Scheme_Method_Prim *)os_wxMediaEditCanChangeStyle, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "after-delete" " method", (Scheme_Method_Prim *)os_wxMediaEditAfterDelete, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-delete" " method", (Scheme_Method_Prim *)os_wxMediaEditOnDelete, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "can-delete?" " method", (Scheme_Method_Prim *)os_wxMediaEditCanDelete, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "after-insert" " method", (Scheme_Method_Prim *)os_wxMediaEditAfterInsert, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-insert" " method", (Scheme_Method_Prim *)os_wxMediaEditOnInsert, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "can-insert?" " method", (Scheme_Method_Prim *)os_wxMediaEditCanInsert, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-tabs" " method", (Scheme_Method_Prim *)os_wxMediaEditSetTabs, 1, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-tabs" " method", (Scheme_Method_Prim *)os_wxMediaEditGetTabs, 0, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-overwrite-mode" " method", (Scheme_Method_Prim *)os_wxMediaEditSetOverwriteMode, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-overwrite-mode" " method", (Scheme_Method_Prim *)os_wxMediaEditGetOverwriteMode, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-file-format" " method", (Scheme_Method_Prim *)os_wxMediaEditSetFileFormat, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-file-format" " method", (Scheme_Method_Prim *)os_wxMediaEditGetFileFormat, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "write-to-file" " method", (Scheme_Method_Prim *)os_wxMediaEditWriteToFile, 1, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "read-from-file" " method", (Scheme_Method_Prim *)os_wxMediaEditReadFromFile, 1, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-character" " method", (Scheme_Method_Prim *)os_wxMediaEditGetCharacter, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-text" " method", (Scheme_Method_Prim *)os_wxMediaEditGetText, 0, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "find-next-non-string-snip" " method", (Scheme_Method_Prim *)os_wxMediaEditFindNextNonTextSnip, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-snip-position" " method", (Scheme_Method_Prim *)os_wxMediaEditGetSnipPosition, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-snip-position-and-location" " method", (Scheme_Method_Prim *)os_wxMediaEditGetSnipPositionAndLocation, 2, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "find-snip" " method", (Scheme_Method_Prim *)os_wxMediaEditFindSnip, 2, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "find-string-all" " method", (Scheme_Method_Prim *)os_wxMediaEditFindStringAll, 1, 6));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "find-string" " method", (Scheme_Method_Prim *)os_wxMediaEditFindString, 1, 6));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-styles-sticky" " method", (Scheme_Method_Prim *)os_wxMediaEditSetStickyStyles, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-styles-sticky" " method", (Scheme_Method_Prim *)os_wxMediaEditGetStickyStyles, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-line-spacing" " method", (Scheme_Method_Prim *)os_wxMediaEditSetLineSpacing, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-line-spacing" " method", (Scheme_Method_Prim *)os_wxMediaEditGetLineSpacing, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-paragraph-alignment" " method", (Scheme_Method_Prim *)os_wxMediaEditSetParagraghAlignment, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-paragraph-margins" " method", (Scheme_Method_Prim *)os_wxMediaEditSetParagraghMargins, 4, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "last-paragraph" " method", (Scheme_Method_Prim *)os_wxMediaEditLastParagraph, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "paragraph-end-line" " method", (Scheme_Method_Prim *)os_wxMediaEditParagraphEndLine, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "paragraph-start-line" " method", (Scheme_Method_Prim *)os_wxMediaEditParagraphStartLine, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "line-paragraph" " method", (Scheme_Method_Prim *)os_wxMediaEditLineParagraph, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "paragraph-end-position" " method", (Scheme_Method_Prim *)os_wxMediaEditParagraphEndPosition, 1, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "paragraph-start-position" " method", (Scheme_Method_Prim *)os_wxMediaEditParagraphStartPosition, 1, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "position-paragraph" " method", (Scheme_Method_Prim *)os_wxMediaEditPositionParagraph, 1, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "last-line" " method", (Scheme_Method_Prim *)os_wxMediaEditLastLine, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "last-position" " method", (Scheme_Method_Prim *)os_wxMediaEditLastPosition, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "line-length" " method", (Scheme_Method_Prim *)os_wxMediaEditLineLength, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "line-end-position" " method", (Scheme_Method_Prim *)os_wxMediaEditLineEndPosition, 1, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "line-start-position" " method", (Scheme_Method_Prim *)os_wxMediaEditLineStartPosition, 1, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "line-location" " method", (Scheme_Method_Prim *)os_wxMediaEditLineLocation, 1, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "position-location" " method", (Scheme_Method_Prim *)os_wxMediaEditPositionLocation, 1, 6));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "position-line" " method", (Scheme_Method_Prim *)os_wxMediaEditPositionLine, 1, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-between-threshold" " method", (Scheme_Method_Prim *)os_wxMediaEditSetBetweenThreshold, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-between-threshold" " method", (Scheme_Method_Prim *)os_wxMediaEditGetBetweenThreshold, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "find-position-in-line" " method", (Scheme_Method_Prim *)os_wxMediaEditFindPositionInLine, 2, 5));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "find-line" " method", (Scheme_Method_Prim *)os_wxMediaEditFindLine, 1, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "find-position" " method", (Scheme_Method_Prim *)os_wxMediaEditFindPosition, 2, 5));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "split-snip" " method", (Scheme_Method_Prim *)os_wxMediaEditSplitSnip, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "change-style" " method", (Scheme_Method_Prim *)os_wxMediaEditChangeStyle, 1, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "do-paste-x-selection" " method", (Scheme_Method_Prim *)os_wxMediaEditDoPasteSelection, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "do-paste" " method", (Scheme_Method_Prim *)os_wxMediaEditDoPaste, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "do-copy" " method", (Scheme_Method_Prim *)os_wxMediaEditDoCopy, 4, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "kill" " method", (Scheme_Method_Prim *)os_wxMediaEditKill, 0, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "paste-next" " method", (Scheme_Method_Prim *)os_wxMediaEditPasteNext, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "paste-x-selection" " method", (Scheme_Method_Prim *)os_wxMediaEditPasteSelection, 0, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "paste" " method", (Scheme_Method_Prim *)os_wxMediaEditPaste, 0, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "copy" " method", (Scheme_Method_Prim *)os_wxMediaEditCopy, 0, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "cut" " method", (Scheme_Method_Prim *)os_wxMediaEditCut, 0, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "erase" " method", (Scheme_Method_Prim *)os_wxMediaEditErase, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "delete" " method", (Scheme_Method_Prim *)os_wxMediaEditDelete, 0, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "insert" " method", (Scheme_Method_Prim *)os_wxMediaEditInsert, 1, 5));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-top-line-base" " method", (Scheme_Method_Prim *)os_wxMediaEditGetTopLineBase, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "flash-off" " method", (Scheme_Method_Prim *)os_wxMediaEditFlashOff, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "flash-on" " method", (Scheme_Method_Prim *)os_wxMediaEditFlashOn, 2, 5));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-anchor" " method", (Scheme_Method_Prim *)os_wxMediaEditGetAnchor, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-anchor" " method", (Scheme_Method_Prim *)os_wxMediaEditSetAnchor, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-visible-line-range" " method", (Scheme_Method_Prim *)os_wxMediaEditGetVisibleLineRange, 2, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-visible-position-range" " method", (Scheme_Method_Prim *)os_wxMediaEditGetVisiblePositionRange, 2, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "scroll-to-position" " method", (Scheme_Method_Prim *)os_wxMediaEditScrollToPosition, 1, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "move-position" " method", (Scheme_Method_Prim *)os_wxMediaEditMovePosition, 1, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-position-bias-scroll" " method", (Scheme_Method_Prim *)os_wxMediaEditSetPositionBiasScroll, 2, 6));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-position" " method", (Scheme_Method_Prim *)os_wxMediaEditSetPosition, 1, 5));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-end-position" " method", (Scheme_Method_Prim *)os_wxMediaEditGetEndPosition, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-start-position" " method", (Scheme_Method_Prim *)os_wxMediaEditGetStartPosition, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-position" " method", (Scheme_Method_Prim *)os_wxMediaEditGetPosition, 1, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "default-style-name" " method", (Scheme_Method_Prim *)os_wxMediaEditGetDefaultStyleName, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-flattened-text" " method", (Scheme_Method_Prim *)os_wxMediaEditGetFlattenedText, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "put-file" " method", (Scheme_Method_Prim *)os_wxMediaEditPutFile, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-file" " method", (Scheme_Method_Prim *)os_wxMediaEditGetFile, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "after-edit-sequence" " method", (Scheme_Method_Prim *)os_wxMediaEditAfterEditSequence, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-edit-sequence" " method", (Scheme_Method_Prim *)os_wxMediaEditOnEditSequence, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "after-load-file" " method", (Scheme_Method_Prim *)os_wxMediaEditAfterLoadFile, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-load-file" " method", (Scheme_Method_Prim *)os_wxMediaEditOnLoadFile, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "can-load-file?" " method", (Scheme_Method_Prim *)os_wxMediaEditCanLoadFile, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "after-save-file" " method", (Scheme_Method_Prim *)os_wxMediaEditAfterSaveFile, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-save-file" " method", (Scheme_Method_Prim *)os_wxMediaEditOnSaveFile, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "can-save-file?" " method", (Scheme_Method_Prim *)os_wxMediaEditCanSaveFile, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-new-box" " method", (Scheme_Method_Prim *)os_wxMediaEditOnNewBox, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-new-image-snip" " method", (Scheme_Method_Prim *)os_wxMediaEditOnNewImageSnip, 4, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "invalidate-bitmap-cache" " method", (Scheme_Method_Prim *)os_wxMediaEditInvalidateBitmapCache, 0, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-paint" " method", (Scheme_Method_Prim *)os_wxMediaEditOnPaint, 9, 9));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "write-footers-to-file" " method", (Scheme_Method_Prim *)os_wxMediaEditWriteFootersToFile, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "write-headers-to-file" " method", (Scheme_Method_Prim *)os_wxMediaEditWriteHeadersToFile, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "read-footer-from-file" " method", (Scheme_Method_Prim *)os_wxMediaEditReadFooterFromFile, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "read-header-from-file" " method", (Scheme_Method_Prim *)os_wxMediaEditReadHeaderFromFile, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-filename" " method", (Scheme_Method_Prim *)os_wxMediaEditSetFilename, 1, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "release-snip" " method", (Scheme_Method_Prim *)os_wxMediaEditReleaseSnip, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-snip-modified" " method", (Scheme_Method_Prim *)os_wxMediaEditOnSnipModified, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-modified" " method", (Scheme_Method_Prim *)os_wxMediaEditSetModified, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-snip-data" " method", (Scheme_Method_Prim *)os_wxMediaEditSetSnipData, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-snip-data" " method", (Scheme_Method_Prim *)os_wxMediaEditGetSnipData, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "needs-update" " method", (Scheme_Method_Prim *)os_wxMediaEditNeedsUpdate, 5, 5));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "resized" " method", (Scheme_Method_Prim *)os_wxMediaEditResized, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-caret-owner" " method", (Scheme_Method_Prim *)os_wxMediaEditSetCaretOwner, 1, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "scroll-to" " method", (Scheme_Method_Prim *)os_wxMediaEditScrollTo, 6, 7));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-display-size-when-ready" " method", (Scheme_Method_Prim *)os_wxMediaEditOnDisplaySizeWhenReady, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-display-size" " method", (Scheme_Method_Prim *)os_wxMediaEditOnDisplaySize, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-change" " method", (Scheme_Method_Prim *)os_wxMediaEditOnChange, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-focus" " method", (Scheme_Method_Prim *)os_wxMediaEditOnFocus, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-default-char" " method", (Scheme_Method_Prim *)os_wxMediaEditOnDefaultChar, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-default-event" " method", (Scheme_Method_Prim *)os_wxMediaEditOnDefaultEvent, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-local-char" " method", (Scheme_Method_Prim *)os_wxMediaEditOnLocalChar, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-local-event" " method", (Scheme_Method_Prim *)os_wxMediaEditOnLocalEvent, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "find-first-snip" " method", (Scheme_Method_Prim *)os_wxMediaEditFindFirstSnip, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-space" " method", (Scheme_Method_Prim *)os_wxMediaEditGetSpace, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-descent" " method", (Scheme_Method_Prim *)os_wxMediaEditGetDescent, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-extent" " method", (Scheme_Method_Prim *)os_wxMediaEditGetExtent, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "blink-caret" " method", (Scheme_Method_Prim *)os_wxMediaEditBlinkCaret, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "own-caret" " method", (Scheme_Method_Prim *)os_wxMediaEditOwnCaret, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "refresh" " method", (Scheme_Method_Prim *)os_wxMediaEditRefresh, 6, 6));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "adjust-cursor" " method", (Scheme_Method_Prim *)os_wxMediaEditAdjustCursor, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-char" " method", (Scheme_Method_Prim *)os_wxMediaEditOnChar, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-event" " method", (Scheme_Method_Prim *)os_wxMediaEditOnEvent, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "copy-self-to" " method", (Scheme_Method_Prim *)os_wxMediaEditCopySelfTo, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "copy-self" " method", (Scheme_Method_Prim *)os_wxMediaEditCopySelf, 0, 0));


  WITH_VAR_STACK(scheme_made_class(os_wxMediaEdit_class));

  WITH_VAR_STACK(objscheme_install_bundler((Objscheme_Bundler)objscheme_bundle_wxMediaEdit, wxTYPE_MEDIA_EDIT));

  READY_TO_RETURN;
}

int objscheme_istype_wxMediaEdit(Scheme_Object *obj, const char *stop, int nullOK)
{
  REMEMBER_VAR_STACK();
  if (nullOK && XC_SCHEME_NULLP(obj)) return 1;
  if (objscheme_is_a(obj,  os_wxMediaEdit_class))
    return 1;
  else {
    if (!stop)
       return 0;
    WITH_REMEMBERED_STACK(scheme_wrong_type(stop, nullOK ? "text% object or " XC_NULL_STR: "text% object", -1, 0, &obj));
    return 0;
  }
}

Scheme_Object *objscheme_bundle_wxMediaEdit(class wxMediaEdit *realobj)
{
  Scheme_Class_Object *obj INIT_NULLED_OUT;
  Scheme_Object *sobj INIT_NULLED_OUT;

  if (!realobj) return XC_SCHEME_NULL;

  if (realobj->__gc_external)
    return (Scheme_Object *)realobj->__gc_external;

  SETUP_VAR_STACK(2);
  VAR_STACK_PUSH(0, obj);
  VAR_STACK_PUSH(1, realobj);

  if ((realobj->__type != wxTYPE_MEDIA_EDIT) && (sobj = WITH_VAR_STACK(objscheme_bundle_by_type(realobj, realobj->__type))))
    { READY_TO_RETURN; return sobj; }
  obj = (Scheme_Class_Object *)WITH_VAR_STACK(scheme_make_uninited_object(os_wxMediaEdit_class));

  obj->primdata = realobj;
  obj->primflag = 0;

  realobj->__gc_external = (void *)obj;
  READY_TO_RETURN;
  return (Scheme_Object *)obj;
}

class wxMediaEdit *objscheme_unbundle_wxMediaEdit(Scheme_Object *obj, const char *where, int nullOK)
{
  if (nullOK && XC_SCHEME_NULLP(obj)) return NULL;

  REMEMBER_VAR_STACK();

  (void)objscheme_istype_wxMediaEdit(obj, where, nullOK);
  Scheme_Class_Object *o = (Scheme_Class_Object *)obj;
  WITH_REMEMBERED_STACK(objscheme_check_valid(NULL, NULL, 0, &obj));
  if (o->primflag)
    return (os_wxMediaEdit *)o->primdata;
  else
    return (wxMediaEdit *)o->primdata;
}

