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


#if defined(_MSC_VER)
# include "wx.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 
#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 float
#define l_LIST_ITEM_BUNDLE objscheme_bundle_float
#define l_LIST_ITEM_UNBUNDLE objscheme_unbundle_float
#define l_MAKE_LIST __MakefloatList
#define l_MAKE_ARRAY __MakefloatArray





static Scheme_Object *l_MAKE_LIST(l_TYPE l_POINT *f, l_INTTYPE c)
{
  Scheme_Object *cdr = scheme_null, *obj;
  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));
  }
  
  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))
    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));
      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

  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) { return wxDEFAULT_SELECT; }
  else if (v == selType_wxX_SELECT_sym) { return wxX_SELECT; }
  else if (v == selType_wxLOCAL_SELECT_sym) { return wxLOCAL_SELECT; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "selType symbol", -1, 0, &v));
  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) { return WXK_HOME; }
  else if (v == moveCode_WXK_END_sym) { return WXK_END; }
  else if (v == moveCode_WXK_RIGHT_sym) { return WXK_RIGHT; }
  else if (v == moveCode_WXK_LEFT_sym) { return WXK_LEFT; }
  else if (v == moveCode_WXK_UP_sym) { return WXK_UP; }
  else if (v == moveCode_WXK_DOWN_sym) { return WXK_DOWN; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "moveCode symbol", -1, 0, &v));
  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) { return wxMOVE_SIMPLE; }
  else if (v == move_wxMOVE_LINE_sym) { return wxMOVE_LINE; }
  else if (v == move_wxMOVE_PAGE_sym) { return wxMOVE_PAGE; }
  else if (v == move_wxMOVE_WORD_sym) { return wxMOVE_WORD; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "move symbol", -1, 0, &v));
  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) { return wxSNIP_BEFORE_OR_NULL; }
  else if (v == findKind_wxSNIP_BEFORE_sym) { return wxSNIP_BEFORE; }
  else if (v == findKind_wxSNIP_AFTER_sym) { return wxSNIP_AFTER; }
  else if (v == findKind_wxSNIP_AFTER_OR_NULL_sym) { return wxSNIP_AFTER_OR_NULL; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "findKind symbol", -1, 0, &v));
  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) { return wxBREAK_FOR_CARET; }
  else if (v == breakType_wxBREAK_FOR_LINE_sym) { return wxBREAK_FOR_LINE; }
  else if (v == breakType_wxBREAK_FOR_SELECTION_sym) { return wxBREAK_FOR_SELECTION; }
  else if (v == breakType_wxBREAK_FOR_USER_1_sym) { return wxBREAK_FOR_USER_1; }
  else if (v == breakType_wxBREAK_FOR_USER_2_sym) { return wxBREAK_FOR_USER_2; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "breakType symbol", -1, 0, &v));
  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) { return Sym_FORWARD; }
  else if (v == direction_Sym_BACKWARD_sym) { return Sym_BACKWARD; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "direction symbol", -1, 0, &v));
  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) { return Sym_LEFT; }
  else if (v == horizontalAlignment_Sym_RIGHT_sym) { return Sym_RIGHT; }
  else if (v == horizontalAlignment_Sym_CENTER_sym) { return Sym_CENTER; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "horizontalAlignment symbol", -1, 0, &v));
  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) { return wxEDIT_BUFFER; }
  else if (v == bufferType_wxPASTEBOARD_BUFFER_sym) { return wxPASTEBOARD_BUFFER; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "bufferType symbol", -1, 0, &v));
  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) { return wxMEDIA_FF_GUESS; }
  else if (v == fileType_wxMEDIA_FF_STD_sym) { return wxMEDIA_FF_STD; }
  else if (v == fileType_wxMEDIA_FF_TEXT_sym) { return wxMEDIA_FF_TEXT; }
  else if (v == fileType_wxMEDIA_FF_TEXT_FORCE_CR_sym) { return wxMEDIA_FF_TEXT_FORCE_CR; }
  else if (v == fileType_wxMEDIA_FF_SAME_sym) { return wxMEDIA_FF_SAME; }
  else if (v == fileType_wxMEDIA_FF_COPY_sym) { return wxMEDIA_FF_COPY; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "fileType symbol", -1, 0, &v));
  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) { return wxFOCUS_IMMEDIATE; }
  else if (v == focus_wxFOCUS_DISPLAY_sym) { return wxFOCUS_DISPLAY; }
  else if (v == focus_wxFOCUS_GLOBAL_sym) { return wxFOCUS_GLOBAL; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "focus symbol", -1, 0, &v));
  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) { return Sym_START; }
  else if (v == bias_Sym_NONE_sym) { return Sym_NONE; }
  else if (v == bias_Sym_END_sym) { return Sym_END; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "bias symbol", -1, 0, &v));
  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) { return wxSNIP_DRAW_NO_CARET; }
  else if (v == caret_wxSNIP_DRAW_SHOW_CARET_sym) { return wxSNIP_DRAW_SHOW_CARET; }
  else if (v == caret_wxSNIP_DRAW_SHOW_INACTIVE_CARET_sym) { return wxSNIP_DRAW_SHOW_INACTIVE_CARET; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "caret symbol", -1, 0, &v));
  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

static Scheme_Object *bitmapType_wxBITMAP_TYPE_BMP_sym = NULL;
static Scheme_Object *bitmapType_wxBITMAP_TYPE_GIF_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_UNKNOWN_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_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_UNKNOWN_sym);
  bitmapType_wxBITMAP_TYPE_UNKNOWN_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("unknown"));
}

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

static Scheme_Object *bundle_symset_bitmapType(int v) {
  if (!bitmapType_wxBITMAP_TYPE_UNKNOWN_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_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_UNKNOWN: return bitmapType_wxBITMAP_TYPE_UNKNOWN_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) { return Sym_START_ONLY; }
  else if (v == Bias_Sym_START_sym) { return Sym_START; }
  else if (v == Bias_Sym_NONE_sym) { return Sym_NONE; }
  else if (v == Bias_Sym_END_sym) { return Sym_END; }
  else if (v == Bias_Sym_END_ONLY_sym) { return Sym_END_ONLY; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "Bias symbol", -1, 0, &v));
  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 
#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;
  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));
  }
  
  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))
    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));
      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

  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, *e;
    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] = 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"));
}

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] = 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));
}

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

  os_wxMediaEdit CONSTRUCTOR_ARGS((nnfloat x0 = 1.0, float* 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 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 DoPaste(nnlong x0, ExactLong x1);
  void DoCopy(nnlong x0, nnlong x1, ExactLong x2, Bool x3);
  void SetAnchor(Bool x0);
  nstring PutFile(nstring x0, nstring x1);
  nstring GetFile(nstring x0);
  void AfterEditSequence();
  void OnEditSequence();
  void AfterLoadFile(Bool x0);
  void OnLoadFile(string x0, int x1);
  Bool CanLoadFile(string x0, int x1);
  void AfterSaveFile(Bool x0);
  void OnSaveFile(string x0, int x1);
  Bool CanSaveFile(string x0, int x1);
  class wxSnip* OnNewBox(int x0);
  class wxImageSnip* OnNewImageSnip(nstring x0, int x1, Bool x2, Bool x3);
  void InvalidateBitmapCache(float x0 = 0.0, float x1 = 0.0, float x2 = -1.0, float x3 = -1.0);
  void OnPaint(Bool x0, class wxDC* x1, float x2, float x3, float x4, float x5, float x6, float 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(nstring x0, Bool x1 = FALSE);
  Bool ReleaseSnip(class wxSnip* x0);
  void SetModified(Bool x0);
  void SetSnipData(class wxSnip* x0, class wxBufferData* x1);
  class wxBufferData* GetSnipData(class wxSnip* x0);
  void NeedsUpdate(class wxSnip* x0, float x1, float x2, nnfloat x3, nnfloat x4);
  void Resized(class wxSnip* x0, Bool x1);
  void SetCaretOwner(class wxSnip* x0, int x1 = wxFOCUS_IMMEDIATE);
  Bool ScrollTo(class wxSnip* x0, float x1, float x2, nnfloat x3, nnfloat x4, Bool x5, int x6 = 0);
  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);
  void SizeCacheInvalid();
  void BlinkCaret();
  void OwnCaret(Bool x0);
  void Refresh(float x0, float x1, nnfloat x2, nnfloat x3, int x4);
  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((nnfloat x0, float* x1, int x2))
CONSTRUCTOR_INIT(: wxMediaEdit(x0, x1, x2))
{
}

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

class wxTabSnip* os_wxMediaEdit::OnNewTabSnip()
{
  Scheme_Object **p = NULL;
  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(2);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  SET_VAR_STACK();

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

  v = WITH_VAR_STACK(scheme_apply(method, 0, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_wxTabSnip(v, "on-new-tab-snip in text%"", extracting return value", 0));
  }
}

class wxTextSnip* os_wxMediaEdit::OnNewTextSnip()
{
  Scheme_Object **p = NULL;
  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(2);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  SET_VAR_STACK();

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

  v = WITH_VAR_STACK(scheme_apply(method, 0, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_wxTextSnip(v, "on-new-string-snip in text%"", extracting return value", 0));
  }
}

void os_wxMediaEdit::SetRegionData(nnlong x0, nnlong x1, class wxBufferData* x2)
{
  Scheme_Object *p[3] 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, 3);
  VAR_STACK_PUSH(5, x2);
  SET_VAR_STACK();

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

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

class wxBufferData* os_wxMediaEdit::GetRegionData(nnlong x0, nnlong x1)
{
  Scheme_Object *p[2] 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, 2);
  SET_VAR_STACK();

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

  v = WITH_VAR_STACK(scheme_apply(method, 2, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_wxBufferData(v, "get-region-data in text%"", extracting return value", 1));
  }
}

void os_wxMediaEdit::AfterSetSizeConstraint()
{
  Scheme_Object **p = NULL;
  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(2);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  SET_VAR_STACK();

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

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

void os_wxMediaEdit::OnSetSizeConstraint()
{
  Scheme_Object **p = NULL;
  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(2);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  SET_VAR_STACK();

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

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

Bool os_wxMediaEdit::CanSetSizeConstraint()
{
  Scheme_Object **p = NULL;
  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(2);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  SET_VAR_STACK();

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

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

void os_wxMediaEdit::AfterSetPosition()
{
  Scheme_Object **p = NULL;
  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(2);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  SET_VAR_STACK();

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

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

void os_wxMediaEdit::AfterChangeStyle(nnlong x0, nnlong x1)
{
  Scheme_Object *p[2] 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, 2);
  SET_VAR_STACK();

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

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

void os_wxMediaEdit::OnChangeStyle(nnlong x0, nnlong x1)
{
  Scheme_Object *p[2] 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, 2);
  SET_VAR_STACK();

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

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

Bool os_wxMediaEdit::CanChangeStyle(nnlong x0, nnlong x1)
{
  Scheme_Object *p[2] 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, 2);
  SET_VAR_STACK();

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

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

void os_wxMediaEdit::AfterDelete(nnlong x0, nnlong x1)
{
  Scheme_Object *p[2] 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, 2);
  SET_VAR_STACK();

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

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

void os_wxMediaEdit::OnDelete(nnlong x0, nnlong x1)
{
  Scheme_Object *p[2] 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, 2);
  SET_VAR_STACK();

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

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

Bool os_wxMediaEdit::CanDelete(nnlong x0, nnlong x1)
{
  Scheme_Object *p[2] 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, 2);
  SET_VAR_STACK();

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

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

void os_wxMediaEdit::AfterInsert(nnlong x0, nnlong x1)
{
  Scheme_Object *p[2] 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, 2);
  SET_VAR_STACK();

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

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

void os_wxMediaEdit::OnInsert(nnlong x0, nnlong x1)
{
  Scheme_Object *p[2] 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, 2);
  SET_VAR_STACK();

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

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

Bool os_wxMediaEdit::CanInsert(nnlong x0, nnlong x1)
{
  Scheme_Object *p[2] 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, 2);
  SET_VAR_STACK();

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

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

void os_wxMediaEdit::DoPaste(nnlong x0, ExactLong x1)
{
  Scheme_Object *p[2] 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, 2);
  SET_VAR_STACK();

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

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

void os_wxMediaEdit::DoCopy(nnlong x0, nnlong x1, ExactLong x2, Bool x3)
{
  Scheme_Object *p[4] 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(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, 4);
  SET_VAR_STACK();

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

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

void os_wxMediaEdit::SetAnchor(Bool x0)
{
  Scheme_Object *p[1] 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, 1);
  SET_VAR_STACK();

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

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

nstring os_wxMediaEdit::PutFile(nstring x0, nstring x1)
{
  Scheme_Object *p[2] 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(7);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, 2);
  VAR_STACK_PUSH(5, x0);
  VAR_STACK_PUSH(6, x1);
  SET_VAR_STACK();

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

  v = WITH_VAR_STACK(scheme_apply(method, 2, p));
  
  
  return (nstring)WITH_VAR_STACK(objscheme_unbundle_nullable_string(v, "put-file in text%"", extracting return value"));
  }
}

nstring os_wxMediaEdit::GetFile(nstring x0)
{
  Scheme_Object *p[1] 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(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, 1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

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

  v = WITH_VAR_STACK(scheme_apply(method, 1, p));
  
  
  return (nstring)WITH_VAR_STACK(objscheme_unbundle_nullable_string(v, "get-file in text%"", extracting return value"));
  }
}

void os_wxMediaEdit::AfterEditSequence()
{
  Scheme_Object **p = NULL;
  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(2);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  SET_VAR_STACK();

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

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

void os_wxMediaEdit::OnEditSequence()
{
  Scheme_Object **p = NULL;
  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(2);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  SET_VAR_STACK();

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

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

void os_wxMediaEdit::AfterLoadFile(Bool x0)
{
  Scheme_Object *p[1] 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, 1);
  SET_VAR_STACK();

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

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

void os_wxMediaEdit::OnLoadFile(string x0, int x1)
{
  Scheme_Object *p[2] 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, 2);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

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

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

Bool os_wxMediaEdit::CanLoadFile(string x0, int x1)
{
  Scheme_Object *p[2] 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, 2);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

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

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

void os_wxMediaEdit::AfterSaveFile(Bool x0)
{
  Scheme_Object *p[1] 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, 1);
  SET_VAR_STACK();

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

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

void os_wxMediaEdit::OnSaveFile(string x0, int x1)
{
  Scheme_Object *p[2] 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, 2);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

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

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

Bool os_wxMediaEdit::CanSaveFile(string x0, int x1)
{
  Scheme_Object *p[2] 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, 2);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

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

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

class wxSnip* os_wxMediaEdit::OnNewBox(int x0)
{
  Scheme_Object *p[1] 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, 1);
  SET_VAR_STACK();

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

  v = WITH_VAR_STACK(scheme_apply(method, 1, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_wxSnip(v, "on-new-box in text%"", extracting return value", 0));
  }
}

class wxImageSnip* os_wxMediaEdit::OnNewImageSnip(nstring x0, int x1, Bool x2, Bool x3)
{
  Scheme_Object *p[4] 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, 4);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

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

  v = WITH_VAR_STACK(scheme_apply(method, 4, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_wxImageSnip(v, "on-new-image-snip in text%"", extracting return value", 0));
  }
}

void os_wxMediaEdit::InvalidateBitmapCache(float x0, float x1, float x2, float x3)
{
  Scheme_Object *p[4] 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(5);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, 4);
  SET_VAR_STACK();

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

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

void os_wxMediaEdit::OnPaint(Bool x0, class wxDC* x1, float x2, float x3, float x4, float x5, float x6, float x7, int x8)
{
  Scheme_Object *p[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 });
  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, 9);
  VAR_STACK_PUSH(5, x1);
  SET_VAR_STACK();

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

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

Bool os_wxMediaEdit::WriteFootersToFile(class wxMediaStreamOut* x0)
{
  Scheme_Object *p[1] 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(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, 1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

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

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

Bool os_wxMediaEdit::WriteHeadersToFile(class wxMediaStreamOut* x0)
{
  Scheme_Object *p[1] 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(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, 1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

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

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

Bool os_wxMediaEdit::ReadFooterFromFile(class wxMediaStreamIn* x0, string x1)
{
  Scheme_Object *p[2] 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(7);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, 2);
  VAR_STACK_PUSH(5, x0);
  VAR_STACK_PUSH(6, x1);
  SET_VAR_STACK();

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

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

Bool os_wxMediaEdit::ReadHeaderFromFile(class wxMediaStreamIn* x0, string x1)
{
  Scheme_Object *p[2] 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(7);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, 2);
  VAR_STACK_PUSH(5, x0);
  VAR_STACK_PUSH(6, x1);
  SET_VAR_STACK();

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

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

void os_wxMediaEdit::SetFilename(nstring x0, Bool x1)
{
  Scheme_Object *p[2] 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, 2);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

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

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

Bool os_wxMediaEdit::ReleaseSnip(class wxSnip* x0)
{
  Scheme_Object *p[1] 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(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, 1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

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

  v = WITH_VAR_STACK(scheme_apply(method, 1, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_bool(v, "release-snip in text%"", extracting return value"));
  }
}

void os_wxMediaEdit::SetModified(Bool x0)
{
  Scheme_Object *p[1] 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, 1);
  SET_VAR_STACK();

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

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

void os_wxMediaEdit::SetSnipData(class wxSnip* x0, class wxBufferData* x1)
{
  Scheme_Object *p[2] 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(7);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, 2);
  VAR_STACK_PUSH(5, x0);
  VAR_STACK_PUSH(6, x1);
  SET_VAR_STACK();

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

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

class wxBufferData* os_wxMediaEdit::GetSnipData(class wxSnip* x0)
{
  Scheme_Object *p[1] 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(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, 1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

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

  v = WITH_VAR_STACK(scheme_apply(method, 1, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_wxBufferData(v, "get-snip-data in text%"", extracting return value", 1));
  }
}

void os_wxMediaEdit::NeedsUpdate(class wxSnip* x0, float x1, float x2, nnfloat x3, nnfloat x4)
{
  Scheme_Object *p[5] 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, 5);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

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

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

void os_wxMediaEdit::Resized(class wxSnip* x0, Bool x1)
{
  Scheme_Object *p[2] 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, 2);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

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

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

void os_wxMediaEdit::SetCaretOwner(class wxSnip* x0, int x1)
{
  Scheme_Object *p[2] 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, 2);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

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

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

Bool os_wxMediaEdit::ScrollTo(class wxSnip* x0, float x1, float x2, nnfloat x3, nnfloat x4, Bool x5, int x6)
{
  Scheme_Object *p[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 });
  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, 7);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

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

  v = WITH_VAR_STACK(scheme_apply(method, 7, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_bool(v, "scroll-to in text%"", extracting return value"));
  }
}

void os_wxMediaEdit::OnDisplaySize()
{
  Scheme_Object **p = NULL;
  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(2);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  SET_VAR_STACK();

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

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

void os_wxMediaEdit::OnChange()
{
  Scheme_Object **p = NULL;
  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(2);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  SET_VAR_STACK();

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

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

void os_wxMediaEdit::OnFocus(Bool x0)
{
  Scheme_Object *p[1] 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, 1);
  SET_VAR_STACK();

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

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

void os_wxMediaEdit::OnDefaultChar(class wxKeyEvent* x0)
{
  Scheme_Object *p[1] 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(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, 1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

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

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

void os_wxMediaEdit::OnDefaultEvent(class wxMouseEvent* x0)
{
  Scheme_Object *p[1] 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(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, 1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

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

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

void os_wxMediaEdit::OnLocalChar(class wxKeyEvent* x0)
{
  Scheme_Object *p[1] 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(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, 1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

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

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

void os_wxMediaEdit::OnLocalEvent(class wxMouseEvent* x0)
{
  Scheme_Object *p[1] 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(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, 1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

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

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

void os_wxMediaEdit::SizeCacheInvalid()
{
  Scheme_Object **p = NULL;
  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(2);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxMediaEdit_class, "size-cache-invalid", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxMediaEdit::SizeCacheInvalid();
  } else {
  
  

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

void os_wxMediaEdit::BlinkCaret()
{
  Scheme_Object **p = NULL;
  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(2);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  SET_VAR_STACK();

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

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

void os_wxMediaEdit::OwnCaret(Bool x0)
{
  Scheme_Object *p[1] 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, 1);
  SET_VAR_STACK();

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

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

void os_wxMediaEdit::Refresh(float x0, float x1, nnfloat x2, nnfloat x3, int x4)
{
  Scheme_Object *p[5] 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, 5);
  SET_VAR_STACK();

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

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

class wxCursor* os_wxMediaEdit::AdjustCursor(class wxMouseEvent* x0)
{
  Scheme_Object *p[1] 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(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, 1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

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

  v = WITH_VAR_STACK(scheme_apply(method, 1, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_wxCursor(v, "adjust-cursor in text%"", extracting return value", 1));
  }
}

void os_wxMediaEdit::OnChar(class wxKeyEvent* x0)
{
  Scheme_Object *p[1] 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(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, 1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

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

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

void os_wxMediaEdit::OnEvent(class wxMouseEvent* x0)
{
  Scheme_Object *p[1] 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(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, 1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

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

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

void os_wxMediaEdit::CopySelfTo(class wxMediaBuffer* x0)
{
  Scheme_Object *p[1] 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(6);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, 1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

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

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

class wxMediaBuffer* os_wxMediaEdit::CopySelf()
{
  Scheme_Object **p = NULL;
  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(2);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  SET_VAR_STACK();

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

  v = WITH_VAR_STACK(scheme_apply(method, 0, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_wxMediaBuffer(v, "copy-self in text%"", extracting return value", 0));
  }
}

static Scheme_Object *os_wxMediaEditCallClickback(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  nnlong x0;
  nnlong x1;

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

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

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->CallClickback(x0, x1));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditRemoveClickback(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  nnlong x0;
  nnlong x1;

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

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

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->RemoveClickback(x0, x1));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditSetClickback(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  nnlong x0;
  nnlong x1;
  wxClickbackFunc x2;
  void* x3 INIT_NULLED_OUT;
  class wxStyleDelta* x4 INIT_NULLED_OUT;
  Bool x5;

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

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

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->SetClickback(x0, x1, x2, x3, x4, x5));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditSetWordbreakFunc(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  wxWordbreakFunc x0;
  void* x1 INIT_NULLED_OUT;

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

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

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->SetWordbreakFunc(x0, x1));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditSetAutowrapBitmap(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxBitmap* r;
  objscheme_check_valid(obj);
  class wxBitmap* x0 INIT_NULLED_OUT;

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

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

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->SetAutowrapBitmap(x0));

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxBitmap(r));
}

static Scheme_Object *os_wxMediaEditOnNewTabSnip(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxTabSnip* r;
  objscheme_check_valid(obj);

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

  

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::OnNewTabSnip());
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->OnNewTabSnip());

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxTabSnip(r));
}

static Scheme_Object *os_wxMediaEditOnNewTextSnip(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxTextSnip* r;
  objscheme_check_valid(obj);

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

  

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::OnNewTextSnip());
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->OnNewTextSnip());

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxTextSnip(r));
}

static Scheme_Object *os_wxMediaEditCaretHidden(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(obj);

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

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->CaretHidden());

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditHideCaret(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  Bool x0;

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

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

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->HideCaret(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditGetWordbreakMap(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxMediaWordbreakMap* r;
  objscheme_check_valid(obj);

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

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->GetWordbreakMap());

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxMediaWordbreakMap(r));
}

static Scheme_Object *os_wxMediaEditSetWordbreakMap(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxMediaWordbreakMap* x0 INIT_NULLED_OUT;

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

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

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->SetWordbreakMap(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditFindWordbreak(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  nnlong _x0;
  nnlong* x0 = &_x0;
  nnlong _x1;
  nnlong* x1 = &_x1;
  int x2;
  Scheme_Object *sbox_tmp;

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

  
  if (XC_SCHEME_NULLP(p[0]))
    x0 = NULL;
  else
    *x0 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[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[1]))
    x1 = NULL;
  else
    *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[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[2], "find-wordbreak in text%"));

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->FindWordbreak(x0, x1, x2));

  
  if (n > 0 && !XC_SCHEME_NULLP(p[0]))
    WITH_VAR_STACK(objscheme_set_box(p[0], scheme_make_integer(_x0)));
  if (n > 1 && !XC_SCHEME_NULLP(p[1]))
    WITH_VAR_STACK(objscheme_set_box(p[1], scheme_make_integer(_x1)));
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditSetRegionData(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  nnlong x0;
  nnlong x1;
  class wxBufferData* x2 INIT_NULLED_OUT;

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

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

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

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditGetRegionData(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxBufferData* r;
  objscheme_check_valid(obj);
  nnlong x0;
  nnlong x1;

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

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

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

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxBufferData(r));
}

static Scheme_Object *os_wxMediaEditAfterSetSizeConstraint(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);

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

  

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::AfterSetSizeConstraint());
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->AfterSetSizeConstraint());

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOnSetSizeConstraint(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);

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

  

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::OnSetSizeConstraint());
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->OnSetSizeConstraint());

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditCanSetSizeConstraint(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(obj);

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

  

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::CanSetSizeConstraint());
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->CanSetSizeConstraint());

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditAfterSetPosition(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);

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

  

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::AfterSetPosition());
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->AfterSetPosition());

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditAfterChangeStyle(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  nnlong x0;
  nnlong x1;

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

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

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::AfterChangeStyle(x0, x1));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->AfterChangeStyle(x0, x1));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOnChangeStyle(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  nnlong x0;
  nnlong x1;

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

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

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::OnChangeStyle(x0, x1));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->OnChangeStyle(x0, x1));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditCanChangeStyle(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(obj);
  nnlong x0;
  nnlong x1;

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

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

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

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditAfterDelete(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  nnlong x0;
  nnlong x1;

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

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

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::AfterDelete(x0, x1));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->AfterDelete(x0, x1));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOnDelete(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  nnlong x0;
  nnlong x1;

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

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

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::OnDelete(x0, x1));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->OnDelete(x0, x1));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditCanDelete(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(obj);
  nnlong x0;
  nnlong x1;

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

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

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

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditAfterInsert(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  nnlong x0;
  nnlong x1;

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

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

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::AfterInsert(x0, x1));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->AfterInsert(x0, x1));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOnInsert(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  nnlong x0;
  nnlong x1;

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

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

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::OnInsert(x0, x1));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->OnInsert(x0, x1));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditCanInsert(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(obj);
  nnlong x0;
  nnlong x1;

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

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

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

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditSetTabs(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  float* x0 INIT_NULLED_OUT;
  int x1;
  float x2;
  Bool x3;

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

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

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

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditGetTabs(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  float* r INIT_NULLED_OUT;
  objscheme_check_valid(obj);
  nnint _x0;
  nnint* x0 = &_x0;
  float _x1;
  float* x1 = &_x1;
  Bool _x2;
  Bool* x2 = &_x2;
  Scheme_Object *sbox_tmp;

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

  
  if (n > 0) {
    if (XC_SCHEME_NULLP(p[0]))
    x0 = NULL;
  else
    *x0 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[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 > 1) {
    if (XC_SCHEME_NULLP(p[1]))
    x1 = NULL;
  else
    *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[1], "get-tabs in text%")), WITH_VAR_STACK(objscheme_unbundle_float(sbox_tmp, "get-tabs in text%"", extracting boxed argument")));
  } else
    x1 = NULL;
  if (n > 2) {
    if (XC_SCHEME_NULLP(p[2]))
    x2 = NULL;
  else
    *x2 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[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 *)obj)->primdata)->GetTabs(x0, x1, x2));

  
  if (n > 0 && !XC_SCHEME_NULLP(p[0]))
    WITH_VAR_STACK(objscheme_set_box(p[0], scheme_make_integer(_x0)));
  if (n > 1 && !XC_SCHEME_NULLP(p[1]))
    WITH_VAR_STACK(objscheme_set_box(p[1], WITH_VAR_STACK(scheme_make_double(_x1))));
  if (n > 2 && !XC_SCHEME_NULLP(p[2]))
    WITH_VAR_STACK(objscheme_set_box(p[2], (_x2 ? scheme_true : scheme_false)));
  
  return WITH_VAR_STACK(__MakefloatList(r, *x0));;
}

static Scheme_Object *os_wxMediaEditSetOverwriteMode(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  Bool x0;

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

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

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->SetOverwriteMode(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditGetOverwriteMode(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(obj);

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

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->GetOverwriteMode());

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditSetFileFormat(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  int x0;

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

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

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->SetFileFormat(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditGetFileFormat(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  int r;
  objscheme_check_valid(obj);

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

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->GetFileFormat());

  
  
  return WITH_REMEMBERED_STACK(bundle_symset_fileType(r));
}

static Scheme_Object *os_wxMediaEditWriteToFile(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  SETUP_PRE_VAR_STACK(2);
  PRE_VAR_STACK_PUSH(0, p);
  PRE_VAR_STACK_PUSH(1, obj);
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(obj);
  if ((n >= 2) && WITH_REMEMBERED_STACK(objscheme_istype_wxMediaStreamOut(p[0], NULL, 0)) && WITH_REMEMBERED_STACK(objscheme_istype_number(p[1], NULL))) {
    class wxMediaStreamOut* x0 INIT_NULLED_OUT;
    nnlong x1;
    long x2;

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

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

    
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->WriteToFile(x0, x1, x2));

    
    
  } else  {
    class wxMediaStreamOut* x0 INIT_NULLED_OUT;

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

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

    
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->WriteToFile(x0));

    
    
  }

  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditReadFromFile(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  SETUP_PRE_VAR_STACK(2);
  PRE_VAR_STACK_PUSH(0, p);
  PRE_VAR_STACK_PUSH(1, obj);
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(obj);
  if ((n >= 2) && WITH_REMEMBERED_STACK(objscheme_istype_wxMediaStreamIn(p[0], NULL, 0)) && WITH_REMEMBERED_STACK(objscheme_istype_nonnegative_symbol_integer(p[1], "start", NULL))) {
    class wxMediaStreamIn* x0 INIT_NULLED_OUT;
    long x1;
    Bool x2;

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

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

    
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->ReadFromFile(x0, x1, x2));

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

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

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

    
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->ReadFromFile(x0, x1));

    
    
  }

  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditGetCharacter(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  unsigned char r;
  objscheme_check_valid(obj);
  nnlong x0;

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

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

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->GetCharacter(x0));

  
  
  return scheme_make_char((char)r);
}

static Scheme_Object *os_wxMediaEditGetText(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  string r;
  objscheme_check_valid(obj);
  nnlong x0;
  long x1;
  Bool x2;
  Bool x3;
  long _x4;
  long* x4 = &_x4;

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

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

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->GetText(x0, x1, x2, x3, x4));

  
  
  return WITH_VAR_STACK(scheme_make_sized_string(r, _x4, 0));
}

static Scheme_Object *os_wxMediaEditGetSnipPosition(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(obj);
  class wxSnip* x0 INIT_NULLED_OUT;

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

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

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->GetSnipPosition(x0));

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

static Scheme_Object *os_wxMediaEditGetSnipPositionAndLocation(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(obj);
  class wxSnip* x0 INIT_NULLED_OUT;
  nnlong _x1;
  nnlong* x1 = &_x1;
  float _x2;
  float* x2 = &_x2;
  float _x3;
  float* x3 = &_x3;
  Scheme_Object *sbox_tmp;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnip(p[0], "get-snip-position-and-location in text%", 0));
  if (XC_SCHEME_NULLP(p[1]))
    x1 = NULL;
  else
    *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[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 > 2) {
    if (XC_SCHEME_NULLP(p[2]))
    x2 = NULL;
  else
    *x2 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[2], "get-snip-position-and-location in text%")), WITH_VAR_STACK(objscheme_unbundle_float(sbox_tmp, "get-snip-position-and-location in text%"", extracting boxed argument")));
  } else
    x2 = NULL;
  if (n > 3) {
    if (XC_SCHEME_NULLP(p[3]))
    x3 = NULL;
  else
    *x3 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[3], "get-snip-position-and-location in text%")), WITH_VAR_STACK(objscheme_unbundle_float(sbox_tmp, "get-snip-position-and-location in text%"", extracting boxed argument")));
  } else
    x3 = NULL;

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->GetSnipPositionAndLocation(x0, x1, x2, x3));

  
  if (n > 1 && !XC_SCHEME_NULLP(p[1]))
    WITH_VAR_STACK(objscheme_set_box(p[1], scheme_make_integer(_x1)));
  if (n > 2 && !XC_SCHEME_NULLP(p[2]))
    WITH_VAR_STACK(objscheme_set_box(p[2], WITH_VAR_STACK(scheme_make_double(_x2))));
  if (n > 3 && !XC_SCHEME_NULLP(p[3]))
    WITH_VAR_STACK(objscheme_set_box(p[3], WITH_VAR_STACK(scheme_make_double(_x3))));
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditFindSnip(Scheme_Object *obj, 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(obj);
  nnlong x0;
  int x1;
  nnlong _x2;
  nnlong* x2 = &_x2;
  Scheme_Object *sbox_tmp;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[0], "find-snip in text%"));
  x1 = WITH_VAR_STACK(unbundle_symset_findKind(p[1], "find-snip in text%"));
  if (n > 2) {
    if (XC_SCHEME_NULLP(p[2]))
    x2 = NULL;
  else
    *x2 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[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 *)obj)->primdata)->FindSnip(x0, x1, x2));

  
  if (n > 2 && !XC_SCHEME_NULLP(p[2]))
    WITH_VAR_STACK(objscheme_set_box(p[2], scheme_make_integer(_x2)));
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxSnip(r));
}

static Scheme_Object *os_wxMediaEditFindStringAll(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long* r;
  objscheme_check_valid(obj);
  string x0 INIT_NULLED_OUT;
  long _x1;
  long* x1 = &_x1;
  int x2;
  long x3;
  long x4;
  Bool x5;
  Bool x6;

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

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

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

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

static Scheme_Object *os_wxMediaEditFindString(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(obj);
  string x0 INIT_NULLED_OUT;
  int x1;
  long x2;
  long x3;
  Bool x4;
  Bool x5;

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

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

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

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

static Scheme_Object *os_wxMediaEditSetStickyStyles(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  Bool x0;

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

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

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->SetStickyStyles(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditGetStickyStyles(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(obj);

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

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->GetStickyStyles());

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditSetLineSpacing(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  nnfloat x0;

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

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

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->SetLineSpacing(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditGetLineSpacing(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  nnfloat r;
  objscheme_check_valid(obj);

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

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->GetLineSpacing());

  
  
  return WITH_REMEMBERED_STACK(scheme_make_double(r));
}

static Scheme_Object *os_wxMediaEditSetParagraghAlignment(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  nnlong x0;
  int x1;

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

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

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->SetParagraghAlignment(x0, x1));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditSetParagraghMargins(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  nnlong x0;
  nnfloat x1;
  nnfloat x2;
  nnfloat x3;

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

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

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->SetParagraghMargins(x0, x1, x2, x3));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditLastParagraph(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(obj);

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

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->LastParagraph());

  
  
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditParagraphEndLine(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(obj);
  nnlong x0;

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

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

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->ParagraphEndLine(x0));

  
  
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditParagraphStartLine(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(obj);
  nnlong x0;

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

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

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->ParagraphStartLine(x0));

  
  
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditLineParagraph(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(obj);
  nnlong x0;

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

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

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->LineParagraph(x0));

  
  
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditParagraphEndPosition(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(obj);
  nnlong x0;
  Bool x1;

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

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

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->ParagraphEndPosition(x0, x1));

  
  
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditParagraphStartPosition(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(obj);
  nnlong x0;
  Bool x1;

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

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

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->ParagraphStartPosition(x0, x1));

  
  
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditPositionParagraph(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(obj);
  nnlong x0;
  Bool x1;

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

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

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->PositionParagraph(x0, x1));

  
  
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditLastLine(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(obj);

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

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->LastLine());

  
  
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditLastPosition(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(obj);

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

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->LastPosition());

  
  
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditLineLength(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(obj);
  nnlong x0;

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

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

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->LineLength(x0));

  
  
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditLineEndPosition(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(obj);
  nnlong x0;
  Bool x1;

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

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

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->LineEndPosition(x0, x1));

  
  
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditLineStartPosition(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(obj);
  nnlong x0;
  Bool x1;

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

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

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->LineStartPosition(x0, x1));

  
  
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditLineLocation(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  float r;
  objscheme_check_valid(obj);
  nnlong x0;
  Bool x1;

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

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

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->LineLocation(x0, x1));

  
  
  return WITH_REMEMBERED_STACK(scheme_make_double(r));
}

static Scheme_Object *os_wxMediaEditPositionLocation(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  nnlong x0;
  float _x1;
  float* x1 = &_x1;
  float _x2;
  float* x2 = &_x2;
  Bool x3;
  Bool x4;
  Bool x5;
  Scheme_Object *sbox_tmp;

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

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

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->PositionLocation(x0, x1, x2, x3, x4, x5));

  
  if (n > 1 && !XC_SCHEME_NULLP(p[1]))
    WITH_VAR_STACK(objscheme_set_box(p[1], WITH_VAR_STACK(scheme_make_double(_x1))));
  if (n > 2 && !XC_SCHEME_NULLP(p[2]))
    WITH_VAR_STACK(objscheme_set_box(p[2], WITH_VAR_STACK(scheme_make_double(_x2))));
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditPositionLine(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(obj);
  nnlong x0;
  Bool x1;

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

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

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->PositionLine(x0, x1));

  
  
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditSetBetweenThreshold(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  nnfloat x0;

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

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

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->SetBetweenThreshold(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditGetBetweenThreshold(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  float r;
  objscheme_check_valid(obj);

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

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->GetBetweenThreshold());

  
  
  return WITH_REMEMBERED_STACK(scheme_make_double(r));
}

static Scheme_Object *os_wxMediaEditFindPositionInLine(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(obj);
  nnlong x0;
  float x1;
  Bool _x2;
  Bool* x2 = &_x2;
  Bool _x3;
  Bool* x3 = &_x3;
  float _x4;
  float* x4 = &_x4;
  Scheme_Object *sbox_tmp;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[0], "find-position-in-line in text%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "find-position-in-line in text%"));
  if (n > 2) {
    if (XC_SCHEME_NULLP(p[2]))
    x2 = NULL;
  else
    *x2 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[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 > 3) {
    if (XC_SCHEME_NULLP(p[3]))
    x3 = NULL;
  else
    *x3 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[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 > 4) {
    if (XC_SCHEME_NULLP(p[4]))
    x4 = NULL;
  else
    *x4 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[4], "find-position-in-line in text%")), WITH_VAR_STACK(objscheme_unbundle_float(sbox_tmp, "find-position-in-line in text%"", extracting boxed argument")));
  } else
    x4 = NULL;

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->FindPositionInLine(x0, x1, x2, x3, x4));

  
  if (n > 2 && !XC_SCHEME_NULLP(p[2]))
    WITH_VAR_STACK(objscheme_set_box(p[2], (_x2 ? scheme_true : scheme_false)));
  if (n > 3 && !XC_SCHEME_NULLP(p[3]))
    WITH_VAR_STACK(objscheme_set_box(p[3], (_x3 ? scheme_true : scheme_false)));
  if (n > 4 && !XC_SCHEME_NULLP(p[4]))
    WITH_VAR_STACK(objscheme_set_box(p[4], WITH_VAR_STACK(scheme_make_double(_x4))));
  
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditFindLine(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(obj);
  float x0;
  Bool _x1;
  Bool* x1 = &_x1;
  Scheme_Object *sbox_tmp;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_float(p[0], "find-line in text%"));
  if (n > 1) {
    if (XC_SCHEME_NULLP(p[1]))
    x1 = NULL;
  else
    *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[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 *)obj)->primdata)->FindLine(x0, x1));

  
  if (n > 1 && !XC_SCHEME_NULLP(p[1]))
    WITH_VAR_STACK(objscheme_set_box(p[1], (_x1 ? scheme_true : scheme_false)));
  
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditFindPosition(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(obj);
  float x0;
  float x1;
  Bool _x2;
  Bool* x2 = &_x2;
  Bool _x3;
  Bool* x3 = &_x3;
  float _x4;
  float* x4 = &_x4;
  Scheme_Object *sbox_tmp;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_float(p[0], "find-position in text%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "find-position in text%"));
  if (n > 2) {
    if (XC_SCHEME_NULLP(p[2]))
    x2 = NULL;
  else
    *x2 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[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 > 3) {
    if (XC_SCHEME_NULLP(p[3]))
    x3 = NULL;
  else
    *x3 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[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 > 4) {
    if (XC_SCHEME_NULLP(p[4]))
    x4 = NULL;
  else
    *x4 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[4], "find-position in text%")), WITH_VAR_STACK(objscheme_unbundle_float(sbox_tmp, "find-position in text%"", extracting boxed argument")));
  } else
    x4 = NULL;

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->FindPosition(x0, x1, x2, x3, x4));

  
  if (n > 2 && !XC_SCHEME_NULLP(p[2]))
    WITH_VAR_STACK(objscheme_set_box(p[2], (_x2 ? scheme_true : scheme_false)));
  if (n > 3 && !XC_SCHEME_NULLP(p[3]))
    WITH_VAR_STACK(objscheme_set_box(p[3], (_x3 ? scheme_true : scheme_false)));
  if (n > 4 && !XC_SCHEME_NULLP(p[4]))
    WITH_VAR_STACK(objscheme_set_box(p[4], WITH_VAR_STACK(scheme_make_double(_x4))));
  
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditSplitSnip(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  nnlong x0;

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

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

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->SplitSnip(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditChangeStyle(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  SETUP_PRE_VAR_STACK(2);
  PRE_VAR_STACK_PUSH(0, p);
  PRE_VAR_STACK_PUSH(1, obj);
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  if ((n >= 2) && WITH_REMEMBERED_STACK(objscheme_istype_wxStyleDelta(p[0], NULL, 1)) && WITH_REMEMBERED_STACK(objscheme_istype_nonnegative_symbol_integer(p[1], "start", NULL))) {
    class wxStyleDelta* x0 INIT_NULLED_OUT;
    long x1;
    long x2;

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

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

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->ChangeStyle(x0, x1, x2));

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

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

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

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->ChangeStyle(x0));

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

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

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

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->ChangeStyle(x0, x1, x2));

    
    
  }

  return scheme_void;
}

static Scheme_Object *os_wxMediaEditDoPaste(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  nnlong x0;
  ExactLong x1;

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

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

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::DoPaste(x0, x1));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->DoPaste(x0, x1));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditDoCopy(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  nnlong x0;
  nnlong x1;
  ExactLong x2;
  Bool x3;

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

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

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

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditKill(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  SETUP_PRE_VAR_STACK(2);
  PRE_VAR_STACK_PUSH(0, p);
  PRE_VAR_STACK_PUSH(1, obj);
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  if ((n >= 2) && WITH_REMEMBERED_STACK(objscheme_istype_ExactLong(p[0], NULL)) && WITH_REMEMBERED_STACK(objscheme_istype_number(p[1], NULL))) {
    ExactLong x0;
    nnlong x1;
    nnlong x2;

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

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

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->Kill(x0, x1, x2));

    
    
  } else  {
    ExactLong x0;

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

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

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->Kill(x0));

    
    
  }

  return scheme_void;
}

static Scheme_Object *os_wxMediaEditPasteNext(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);

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

  

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->PasteNext());

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditPaste(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  SETUP_PRE_VAR_STACK(2);
  PRE_VAR_STACK_PUSH(0, p);
  PRE_VAR_STACK_PUSH(1, obj);
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  if ((n >= 2) && WITH_REMEMBERED_STACK(objscheme_istype_ExactLong(p[0], NULL)) && WITH_REMEMBERED_STACK(objscheme_istype_nonnegative_symbol_integer(p[1], "end", NULL))) {
    ExactLong x0;
    long x1;
    long x2;

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

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

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->Paste(x0, x1, x2));

    
    
  } else  {
    ExactLong x0;

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

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

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->Paste(x0));

    
    
  }

  return scheme_void;
}

static Scheme_Object *os_wxMediaEditCopy(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  SETUP_PRE_VAR_STACK(2);
  PRE_VAR_STACK_PUSH(0, p);
  PRE_VAR_STACK_PUSH(1, obj);
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  if ((n >= 3) && WITH_REMEMBERED_STACK(objscheme_istype_bool(p[0], NULL)) && WITH_REMEMBERED_STACK(objscheme_istype_ExactLong(p[1], NULL)) && WITH_REMEMBERED_STACK(objscheme_istype_nonnegative_symbol_integer(p[2], "start", NULL))) {
    Bool x0;
    ExactLong x1;
    long x2;
    long x3;

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

    
    if ((n < 3) ||(n > 4)) 
      WITH_VAR_STACK(scheme_wrong_count("copy in text% (position case)", 3, 4, n, p));
    x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[0], "copy in text% (position case)"));
    x1 = WITH_VAR_STACK(objscheme_unbundle_ExactLong(p[1], "copy in text% (position case)"));
    x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[2], "start", "copy in text% (position case)"));
    if (n > 3) {
      x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[3], "end", "copy in text% (position case)"));
    } else
      x3 = -1;

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->Copy(x0, x1, x2, x3));

    
    
  } else  {
    Bool x0;
    ExactLong x1;

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

    
    if ((n > 2)) 
      WITH_VAR_STACK(scheme_wrong_count("copy in text% (without position case)", 0, 2, n, p));
    if (n > 0) {
      x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[0], "copy in text% (without position case)"));
    } else
      x0 = FALSE;
    if (n > 1) {
      x1 = WITH_VAR_STACK(objscheme_unbundle_ExactLong(p[1], "copy in text% (without position case)"));
    } else
      x1 = 0;

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->Copy(x0, x1));

    
    
  }

  return scheme_void;
}

static Scheme_Object *os_wxMediaEditCut(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  SETUP_PRE_VAR_STACK(2);
  PRE_VAR_STACK_PUSH(0, p);
  PRE_VAR_STACK_PUSH(1, obj);
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  if ((n >= 3) && WITH_REMEMBERED_STACK(objscheme_istype_bool(p[0], NULL)) && WITH_REMEMBERED_STACK(objscheme_istype_ExactLong(p[1], NULL)) && WITH_REMEMBERED_STACK(objscheme_istype_nonnegative_symbol_integer(p[2], "start", NULL))) {
    Bool x0;
    ExactLong x1;
    long x2;
    long x3;

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

    
    if ((n < 3) ||(n > 4)) 
      WITH_VAR_STACK(scheme_wrong_count("cut in text% (position case)", 3, 4, n, p));
    x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[0], "cut in text% (position case)"));
    x1 = WITH_VAR_STACK(objscheme_unbundle_ExactLong(p[1], "cut in text% (position case)"));
    x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[2], "start", "cut in text% (position case)"));
    if (n > 3) {
      x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[3], "end", "cut in text% (position case)"));
    } else
      x3 = -1;

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->Cut(x0, x1, x2, x3));

    
    
  } else  {
    Bool x0;
    ExactLong x1;

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

    
    if ((n > 2)) 
      WITH_VAR_STACK(scheme_wrong_count("cut in text% (without position case)", 0, 2, n, p));
    if (n > 0) {
      x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[0], "cut in text% (without position case)"));
    } else
      x0 = FALSE;
    if (n > 1) {
      x1 = WITH_VAR_STACK(objscheme_unbundle_ExactLong(p[1], "cut in text% (without position case)"));
    } else
      x1 = 0;

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->Cut(x0, x1));

    
    
  }

  return scheme_void;
}

static Scheme_Object *os_wxMediaEditErase(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);

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

  

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->Erase());

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditDelete(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  SETUP_PRE_VAR_STACK(2);
  PRE_VAR_STACK_PUSH(0, p);
  PRE_VAR_STACK_PUSH(1, obj);
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  if ((n >= 1) && WITH_REMEMBERED_STACK(objscheme_istype_nonnegative_symbol_integer(p[0], "start", NULL))) {
    long x0;
    long x1;
    Bool x2;

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

    
    if ((n < 1) ||(n > 3)) 
      WITH_VAR_STACK(scheme_wrong_count("delete in text% (position case)", 1, 3, n, p));
    x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[0], "start", "delete in text% (position case)"));
    if (n > 1) {
      x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[1], "back", "delete in text% (position case)"));
    } else
      x1 = -1;
    if (n > 2) {
      x2 = WITH_VAR_STACK(objscheme_unbundle_bool(p[2], "delete in text% (position case)"));
    } else
      x2 = TRUE;

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->Delete(x0, x1, x2));

    
    
  } else  {

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

    
    if (n != 0) 
      WITH_VAR_STACK(scheme_wrong_count("delete in text% (no position case)", 0, 0, n, p));

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->Delete());

    
    
  }

  return scheme_void;
}

static Scheme_Object *os_wxMediaEditInsert(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  SETUP_PRE_VAR_STACK(2);
  PRE_VAR_STACK_PUSH(0, p);
  PRE_VAR_STACK_PUSH(1, obj);
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  if ((n >= 2) && WITH_REMEMBERED_STACK(objscheme_istype_string(p[0], NULL)) && WITH_REMEMBERED_STACK(objscheme_istype_number(p[1], NULL))) {
    long x0;
    string x1 INIT_NULLED_OUT;
    nnlong x2;
    long x3;
    Bool x4;

    SETUP_VAR_STACK_PRE_REMEMBERED(3);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, obj);
    VAR_STACK_PUSH(2, x1);

    
    if ((n < 2) ||(n > 4)) 
      WITH_VAR_STACK(scheme_wrong_count("insert in text% (string and position case)", 2, 4, n, p));
    x1 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[0], "insert in text% (string and position case)"));
    x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[1], "insert in text% (string and position case)"));
    if (n > 2) {
      x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[2], "same", "insert in text% (string and position case)"));
    } else
      x3 = -1;
    if (n > 3) {
      x4 = WITH_VAR_STACK(objscheme_unbundle_bool(p[3], "insert in text% (string and position case)"));
    } else
      x4 = TRUE;

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

    
    
  } else if ((n >= 1) && WITH_REMEMBERED_STACK(objscheme_istype_string(p[0], NULL))) {
    long x0;
    string x1 INIT_NULLED_OUT;

    SETUP_VAR_STACK_PRE_REMEMBERED(3);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, obj);
    VAR_STACK_PUSH(2, x1);

    
    if (n != 1) 
      WITH_VAR_STACK(scheme_wrong_count("insert in text% (string without position case)", 1, 1, n, p));
    x1 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[0], "insert in text% (string without position case)"));

    x0 = SCHEME_STRTAG_VAL(p[0]);
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->Insert(x0, x1));

    
    
  } else if ((n >= 3) && WITH_REMEMBERED_STACK(objscheme_istype_number(p[0], NULL)) && WITH_REMEMBERED_STACK(objscheme_istype_string(p[1], NULL)) && WITH_REMEMBERED_STACK(objscheme_istype_number(p[2], NULL))) {
    nnlong x0;
    string x1 INIT_NULLED_OUT;
    nnlong x2;
    long x3;
    Bool x4;

    SETUP_VAR_STACK_PRE_REMEMBERED(3);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, obj);
    VAR_STACK_PUSH(2, x1);

    
    if ((n < 3) ||(n > 5)) 
      WITH_VAR_STACK(scheme_wrong_count("insert in text% (length and string without position case)", 3, 5, n, p));
    x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[0], "insert in text% (length and string without position case)"));
    x1 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[1], "insert in text% (length and string without position case)"));
    x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[2], "insert in text% (length and string without position case)"));
    if (n > 3) {
      x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[3], "same", "insert in text% (length and string without position case)"));
    } else
      x3 = -1;
    if (n > 4) {
      x4 = WITH_VAR_STACK(objscheme_unbundle_bool(p[4], "insert in text% (length and string without position case)"));
    } else
      x4 = TRUE;

    if ((x0 < 0) || (x0 > SCHEME_STRTAG_VAL(p[1]))) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("text%","insert"), "bad string length: ", p[0]));
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->Insert(x0, x1, x2, x3, x4));

    
    
  } else if ((n >= 1) && WITH_REMEMBERED_STACK(objscheme_istype_number(p[0], NULL))) {
    nnlong x0;
    string x1 INIT_NULLED_OUT;

    SETUP_VAR_STACK_PRE_REMEMBERED(3);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, obj);
    VAR_STACK_PUSH(2, x1);

    
    if (n != 2) 
      WITH_VAR_STACK(scheme_wrong_count("insert in text% (length, string, and position case)", 2, 2, n, p));
    x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[0], "insert in text% (length, string, and position case)"));
    x1 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[1], "insert in text% (length, string, and position case)"));

    if ((x0 < 0) || (x0 > SCHEME_STRTAG_VAL(p[1]))) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("text%","insert"), "bad string length: ", p[0]));
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->Insert(x0, x1));

    
    
  } else if ((n >= 2) && WITH_REMEMBERED_STACK(objscheme_istype_wxSnip(p[0], NULL, 0)) && WITH_REMEMBERED_STACK(objscheme_istype_number(p[1], NULL))) {
    class wxSnip* x0 INIT_NULLED_OUT;
    nnlong x1;
    long x2;
    Bool x3;

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

    
    if ((n < 2) ||(n > 4)) 
      WITH_VAR_STACK(scheme_wrong_count("insert in text% (snip% and position case)", 2, 4, n, p));
    x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnip(p[0], "insert in text% (snip% and position case)", 0));
    x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[1], "insert in text% (snip% and position case)"));
    if (n > 2) {
      x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[2], "same", "insert in text% (snip% and position case)"));
    } else
      x2 = -1;
    if (n > 3) {
      x3 = WITH_VAR_STACK(objscheme_unbundle_bool(p[3], "insert in text% (snip% and position case)"));
    } else
      x3 = TRUE;

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->Insert(x0, x1, x2, x3));

    
    
  } else if ((n >= 1) && WITH_REMEMBERED_STACK(objscheme_istype_wxSnip(p[0], NULL, 0))) {
    class wxSnip* x0 INIT_NULLED_OUT;

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

    
    if (n != 1) 
      WITH_VAR_STACK(scheme_wrong_count("insert in text% (snip% without position case)", 1, 1, n, p));
    x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnip(p[0], "insert in text% (snip% without position case)", 0));

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->Insert(x0));

    
    
  } else if ((n >= 2) && WITH_REMEMBERED_STACK(objscheme_istype_char(p[0], NULL)) && WITH_REMEMBERED_STACK(objscheme_istype_number(p[1], NULL))) {
    unsigned char x0;
    nnlong x1;
    long x2;

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

    
    if ((n < 2) ||(n > 3)) 
      WITH_VAR_STACK(scheme_wrong_count("insert in text% (character and position case)", 2, 3, n, p));
    x0 = ((unsigned char)WITH_VAR_STACK(objscheme_unbundle_char(p[0], "insert in text% (character and position case)")));
    x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[1], "insert in text% (character and position case)"));
    if (n > 2) {
      x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[2], "same", "insert in text% (character and position case)"));
    } else
      x2 = -1;

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->Insert(x0, x1, x2));

    
    
  } else  {
    unsigned char x0;

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

    
    if (n != 1) 
      WITH_VAR_STACK(scheme_wrong_count("insert in text% (character without position case)", 1, 1, n, p));
    x0 = ((unsigned char)WITH_VAR_STACK(objscheme_unbundle_char(p[0], "insert in text% (character without position case)")));

    
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->Insert(x0));

    
    
  }

  return scheme_void;
}

static Scheme_Object *os_wxMediaEditGetTopLineBase(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  float r;
  objscheme_check_valid(obj);

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

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->GetTopLineBase());

  
  
  return WITH_REMEMBERED_STACK(scheme_make_double(r));
}

static Scheme_Object *os_wxMediaEditFlashOff(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);

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

  

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->FlashOff());

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditFlashOn(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  nnlong x0;
  nnlong x1;
  Bool x2;
  Bool x3;
  nnlong x4;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[0], "flash-on in text%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[1], "flash-on in text%"));
  if (n > 2) {
    x2 = WITH_VAR_STACK(objscheme_unbundle_bool(p[2], "flash-on in text%"));
  } else
    x2 = FALSE;
  if (n > 3) {
    x3 = WITH_VAR_STACK(objscheme_unbundle_bool(p[3], "flash-on in text%"));
  } else
    x3 = TRUE;
  if (n > 4) {
    x4 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[4], "flash-on in text%"));
  } else
    x4 = 500;

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->FlashOn(x0, x1, x2, x3, x4));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditGetAnchor(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(obj);

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

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->GetAnchor());

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditSetAnchor(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  Bool x0;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[0], "set-anchor in text%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::SetAnchor(x0));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->SetAnchor(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditGetVisibleLineRange(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  nnlong _x0;
  nnlong* x0 = &_x0;
  nnlong _x1;
  nnlong* x1 = &_x1;
  Scheme_Object *sbox_tmp;

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

  
  if (XC_SCHEME_NULLP(p[0]))
    x0 = NULL;
  else
    *x0 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[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[1]))
    x1 = NULL;
  else
    *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[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")));

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->GetVisibleLineRange(x0, x1));

  
  if (n > 0 && !XC_SCHEME_NULLP(p[0]))
    WITH_VAR_STACK(objscheme_set_box(p[0], scheme_make_integer(_x0)));
  if (n > 1 && !XC_SCHEME_NULLP(p[1]))
    WITH_VAR_STACK(objscheme_set_box(p[1], scheme_make_integer(_x1)));
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditGetVisiblePositionRange(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  nnlong _x0;
  nnlong* x0 = &_x0;
  nnlong _x1;
  nnlong* x1 = &_x1;
  Scheme_Object *sbox_tmp;

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

  
  if (XC_SCHEME_NULLP(p[0]))
    x0 = NULL;
  else
    *x0 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[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[1]))
    x1 = NULL;
  else
    *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[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")));

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->GetVisiblePositionRange(x0, x1));

  
  if (n > 0 && !XC_SCHEME_NULLP(p[0]))
    WITH_VAR_STACK(objscheme_set_box(p[0], scheme_make_integer(_x0)));
  if (n > 1 && !XC_SCHEME_NULLP(p[1]))
    WITH_VAR_STACK(objscheme_set_box(p[1], scheme_make_integer(_x1)));
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditScrollToPosition(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(obj);
  nnlong x0;
  Bool x1;
  long x2;
  int x3;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[0], "scroll-to-position in text%"));
  if (n > 1) {
    x1 = WITH_VAR_STACK(objscheme_unbundle_bool(p[1], "scroll-to-position in text%"));
  } else
    x1 = FALSE;
  if (n > 2) {
    x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[2], "same", "scroll-to-position in text%"));
  } else
    x2 = -1;
  if (n > 3) {
    x3 = WITH_VAR_STACK(unbundle_symset_bias(p[3], "scroll-to-position in text%"));
  } else
    x3 = 0;

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->ScrollToPosition(x0, x1, x2, x3));

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditMovePosition(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  int x0;
  Bool x1;
  int x2;

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

  
  x0 = WITH_VAR_STACK(unbundle_symset_moveCode(p[0], "move-position in text%"));
  if (n > 1) {
    x1 = WITH_VAR_STACK(objscheme_unbundle_bool(p[1], "move-position in text%"));
  } else
    x1 = FALSE;
  if (n > 2) {
    x2 = WITH_VAR_STACK(unbundle_symset_move(p[2], "move-position in text%"));
  } else
    x2 = wxMOVE_SIMPLE;

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->MovePosition(x0, x1, x2));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditSetPositionBiasScroll(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  int x0;
  nnlong x1;
  long x2;
  Bool x3;
  Bool x4;
  int x5;

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

  
  x0 = WITH_VAR_STACK(unbundle_symset_Bias(p[0], "set-position-bias-scroll in text%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[1], "set-position-bias-scroll in text%"));
  if (n > 2) {
    x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[2], "same", "set-position-bias-scroll in text%"));
  } else
    x2 = -1;
  if (n > 3) {
    x3 = WITH_VAR_STACK(objscheme_unbundle_bool(p[3], "set-position-bias-scroll in text%"));
  } else
    x3 = FALSE;
  if (n > 4) {
    x4 = WITH_VAR_STACK(objscheme_unbundle_bool(p[4], "set-position-bias-scroll in text%"));
  } else
    x4 = TRUE;
  if (n > 5) {
    x5 = WITH_VAR_STACK(unbundle_symset_selType(p[5], "set-position-bias-scroll in text%"));
  } else
    x5 = wxDEFAULT_SELECT;

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->SetPositionBiasScroll(x0, x1, x2, x3, x4, x5));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditSetPosition(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  nnlong x0;
  long x1;
  Bool x2;
  Bool x3;
  int x4;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[0], "set-position in text%"));
  if (n > 1) {
    x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_integer(p[1], "same", "set-position in text%"));
  } else
    x1 = -1;
  if (n > 2) {
    x2 = WITH_VAR_STACK(objscheme_unbundle_bool(p[2], "set-position in text%"));
  } else
    x2 = FALSE;
  if (n > 3) {
    x3 = WITH_VAR_STACK(objscheme_unbundle_bool(p[3], "set-position in text%"));
  } else
    x3 = TRUE;
  if (n > 4) {
    x4 = WITH_VAR_STACK(unbundle_symset_selType(p[4], "set-position in text%"));
  } else
    x4 = wxDEFAULT_SELECT;

  
  WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->SetPosition(x0, x1, x2, x3, x4));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditGetEndPosition(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(obj);

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

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->GetEndPosition());

  
  
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditGetStartPosition(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  long r;
  objscheme_check_valid(obj);

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

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->GetStartPosition());

  
  
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaEditGetPosition(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  nnlong _x0;
  nnlong* x0 = &_x0;
  nnlong _x1;
  nnlong* x1 = &_x1;
  Scheme_Object *sbox_tmp;

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

  
  if (XC_SCHEME_NULLP(p[0]))
    x0 = NULL;
  else
    *x0 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[0], "get-position in text%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(sbox_tmp, "get-position in text%"", extracting boxed argument")));
  if (n > 1) {
    if (XC_SCHEME_NULLP(p[1]))
    x1 = NULL;
  else
    *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[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 *)obj)->primdata)->GetPosition(x0, x1));

  
  if (n > 0 && !XC_SCHEME_NULLP(p[0]))
    WITH_VAR_STACK(objscheme_set_box(p[0], scheme_make_integer(_x0)));
  if (n > 1 && !XC_SCHEME_NULLP(p[1]))
    WITH_VAR_STACK(objscheme_set_box(p[1], scheme_make_integer(_x1)));
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditGetFlattenedText(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  string r;
  objscheme_check_valid(obj);
  long _x0;
  long* x0 = &_x0;

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

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->GetFlattenedText(x0));

  
  
  return WITH_VAR_STACK(scheme_make_sized_string(r, _x0, 0));
}

static Scheme_Object *os_wxMediaEditPutFile(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  nstring r;
  objscheme_check_valid(obj);
  nstring x0 INIT_NULLED_OUT;
  nstring x1 INIT_NULLED_OUT;

  SETUP_VAR_STACK_REMEMBERED(4);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, obj);
  VAR_STACK_PUSH(2, x0);
  VAR_STACK_PUSH(3, x1);

  
  x0 = (nstring)WITH_VAR_STACK(objscheme_unbundle_nullable_string(p[0], "put-file in text%"));
  x1 = (nstring)WITH_VAR_STACK(objscheme_unbundle_nullable_string(p[1], "put-file in text%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::PutFile(x0, x1));
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->PutFile(x0, x1));

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_string((char *)r));
}

static Scheme_Object *os_wxMediaEditGetFile(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  nstring r;
  objscheme_check_valid(obj);
  nstring x0 INIT_NULLED_OUT;

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

  
  x0 = (nstring)WITH_VAR_STACK(objscheme_unbundle_nullable_string(p[0], "get-file in text%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::GetFile(x0));
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->GetFile(x0));

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_string((char *)r));
}

static Scheme_Object *os_wxMediaEditAfterEditSequence(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);

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

  

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::AfterEditSequence());
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->AfterEditSequence());

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOnEditSequence(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);

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

  

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::OnEditSequence());
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->OnEditSequence());

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditAfterLoadFile(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  Bool x0;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[0], "after-load-file in text%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::AfterLoadFile(x0));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->AfterLoadFile(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOnLoadFile(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  string x0 INIT_NULLED_OUT;
  int x1;

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

  
  x0 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[0], "on-load-file in text%"));
  x1 = WITH_VAR_STACK(unbundle_symset_fileType(p[1], "on-load-file in text%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::OnLoadFile(x0, x1));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->OnLoadFile(x0, x1));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditCanLoadFile(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(obj);
  string x0 INIT_NULLED_OUT;
  int x1;

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

  
  x0 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[0], "can-load-file? in text%"));
  x1 = WITH_VAR_STACK(unbundle_symset_fileType(p[1], "can-load-file? in text%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::CanLoadFile(x0, x1));
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->CanLoadFile(x0, x1));

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditAfterSaveFile(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  Bool x0;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[0], "after-save-file in text%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::AfterSaveFile(x0));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->AfterSaveFile(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOnSaveFile(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  string x0 INIT_NULLED_OUT;
  int x1;

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

  
  x0 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[0], "on-save-file in text%"));
  x1 = WITH_VAR_STACK(unbundle_symset_fileType(p[1], "on-save-file in text%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::OnSaveFile(x0, x1));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->OnSaveFile(x0, x1));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditCanSaveFile(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(obj);
  string x0 INIT_NULLED_OUT;
  int x1;

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

  
  x0 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[0], "can-save-file? in text%"));
  x1 = WITH_VAR_STACK(unbundle_symset_fileType(p[1], "can-save-file? in text%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::CanSaveFile(x0, x1));
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->CanSaveFile(x0, x1));

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditOnNewBox(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxSnip* r;
  objscheme_check_valid(obj);
  int x0;

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

  
  x0 = WITH_VAR_STACK(unbundle_symset_bufferType(p[0], "on-new-box in text%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::OnNewBox(x0));
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->OnNewBox(x0));

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxSnip(r));
}

static Scheme_Object *os_wxMediaEditOnNewImageSnip(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxImageSnip* r;
  objscheme_check_valid(obj);
  nstring x0 INIT_NULLED_OUT;
  int x1;
  Bool x2;
  Bool x3;

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

  
  x0 = (nstring)WITH_VAR_STACK(objscheme_unbundle_nullable_string(p[0], "on-new-image-snip in text%"));
  x1 = WITH_VAR_STACK(unbundle_symset_bitmapType(p[1], "on-new-image-snip in text%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_bool(p[2], "on-new-image-snip in text%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_bool(p[3], "on-new-image-snip in text%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::OnNewImageSnip(x0, x1, x2, x3));
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->OnNewImageSnip(x0, x1, x2, x3));

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxImageSnip(r));
}

static Scheme_Object *os_wxMediaEditInvalidateBitmapCache(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  float x0;
  float x1;
  float x2;
  float x3;

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

  
  if (n > 0) {
    x0 = WITH_VAR_STACK(objscheme_unbundle_float(p[0], "invalidate-bitmap-cache in text%"));
  } else
    x0 = 0.0;
  if (n > 1) {
    x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "invalidate-bitmap-cache in text%"));
  } else
    x1 = 0.0;
  if (n > 2) {
    x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_float(p[2], "end", "invalidate-bitmap-cache in text%"));
  } else
    x2 = -1.0;
  if (n > 3) {
    x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_float(p[3], "end", "invalidate-bitmap-cache in text%"));
  } else
    x3 = -1.0;

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::InvalidateBitmapCache(x0, x1, x2, x3));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->InvalidateBitmapCache(x0, x1, x2, x3));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOnPaint(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  Bool x0;
  class wxDC* x1 INIT_NULLED_OUT;
  float x2;
  float x3;
  float x4;
  float x5;
  float x6;
  float x7;
  int x8;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[0], "on-paint in text%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[1], "on-paint in text%", 0));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "on-paint in text%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_float(p[3], "on-paint in text%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_float(p[4], "on-paint in text%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_float(p[5], "on-paint in text%"));
  x6 = WITH_VAR_STACK(objscheme_unbundle_float(p[6], "on-paint in text%"));
  x7 = WITH_VAR_STACK(objscheme_unbundle_float(p[7], "on-paint in text%"));
  x8 = WITH_VAR_STACK(unbundle_symset_caret(p[8], "on-paint in text%"));

  if (x1 && !x1->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("editor<%>","on-paint"), "bad device context: ", p[1]));
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::OnPaint(x0, x1, x2, x3, x4, x5, x6, x7, x8));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->OnPaint(x0, x1, x2, x3, x4, x5, x6, x7, x8));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditWriteFootersToFile(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(obj);
  class wxMediaStreamOut* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxMediaStreamOut(p[0], "write-footers-to-file in text%", 0));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::WriteFootersToFile(x0));
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->WriteFootersToFile(x0));

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditWriteHeadersToFile(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(obj);
  class wxMediaStreamOut* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxMediaStreamOut(p[0], "write-headers-to-file in text%", 0));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::WriteHeadersToFile(x0));
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->WriteHeadersToFile(x0));

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditReadFooterFromFile(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(obj);
  class wxMediaStreamIn* x0 INIT_NULLED_OUT;
  string x1 INIT_NULLED_OUT;

  SETUP_VAR_STACK_REMEMBERED(4);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, obj);
  VAR_STACK_PUSH(2, x0);
  VAR_STACK_PUSH(3, x1);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxMediaStreamIn(p[0], "read-footer-from-file in text%", 0));
  x1 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[1], "read-footer-from-file in text%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::ReadFooterFromFile(x0, x1));
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->ReadFooterFromFile(x0, x1));

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditReadHeaderFromFile(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(obj);
  class wxMediaStreamIn* x0 INIT_NULLED_OUT;
  string x1 INIT_NULLED_OUT;

  SETUP_VAR_STACK_REMEMBERED(4);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, obj);
  VAR_STACK_PUSH(2, x0);
  VAR_STACK_PUSH(3, x1);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxMediaStreamIn(p[0], "read-header-from-file in text%", 0));
  x1 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[1], "read-header-from-file in text%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::ReadHeaderFromFile(x0, x1));
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->ReadHeaderFromFile(x0, x1));

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditSetFilename(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  nstring x0 INIT_NULLED_OUT;
  Bool x1;

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

  
  x0 = (nstring)WITH_VAR_STACK(objscheme_unbundle_nullable_string(p[0], "set-filename in text%"));
  if (n > 1) {
    x1 = WITH_VAR_STACK(objscheme_unbundle_bool(p[1], "set-filename in text%"));
  } else
    x1 = FALSE;

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::SetFilename(x0, x1));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->SetFilename(x0, x1));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditReleaseSnip(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(obj);
  class wxSnip* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnip(p[0], "release-snip in text%", 0));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::ReleaseSnip(x0));
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->ReleaseSnip(x0));

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditSetModified(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  Bool x0;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[0], "set-modified in text%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::SetModified(x0));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->SetModified(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditSetSnipData(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxSnip* x0 INIT_NULLED_OUT;
  class wxBufferData* x1 INIT_NULLED_OUT;

  SETUP_VAR_STACK_REMEMBERED(4);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, obj);
  VAR_STACK_PUSH(2, x0);
  VAR_STACK_PUSH(3, x1);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnip(p[0], "set-snip-data in text%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_wxBufferData(p[1], "set-snip-data in text%", 1));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::SetSnipData(x0, x1));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->SetSnipData(x0, x1));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditGetSnipData(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxBufferData* r;
  objscheme_check_valid(obj);
  class wxSnip* x0 INIT_NULLED_OUT;

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

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

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::GetSnipData(x0));
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->GetSnipData(x0));

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxBufferData(r));
}

static Scheme_Object *os_wxMediaEditNeedsUpdate(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxSnip* x0 INIT_NULLED_OUT;
  float x1;
  float x2;
  nnfloat x3;
  nnfloat x4;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnip(p[0], "needs-update in text%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "needs-update in text%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "needs-update in text%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(p[3], "needs-update in text%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(p[4], "needs-update in text%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::NeedsUpdate(x0, x1, x2, x3, x4));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->NeedsUpdate(x0, x1, x2, x3, x4));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditResized(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxSnip* x0 INIT_NULLED_OUT;
  Bool x1;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnip(p[0], "resized in text%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_bool(p[1], "resized in text%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::Resized(x0, x1));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->Resized(x0, x1));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditSetCaretOwner(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxSnip* x0 INIT_NULLED_OUT;
  int x1;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnip(p[0], "set-caret-owner in text%", 1));
  if (n > 1) {
    x1 = WITH_VAR_STACK(unbundle_symset_focus(p[1], "set-caret-owner in text%"));
  } else
    x1 = wxFOCUS_IMMEDIATE;

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::SetCaretOwner(x0, x1));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->SetCaretOwner(x0, x1));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditScrollTo(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(obj);
  class wxSnip* x0 INIT_NULLED_OUT;
  float x1;
  float x2;
  nnfloat x3;
  nnfloat x4;
  Bool x5;
  int x6;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnip(p[0], "scroll-to in text%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "scroll-to in text%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "scroll-to in text%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(p[3], "scroll-to in text%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(p[4], "scroll-to in text%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_bool(p[5], "scroll-to in text%"));
  if (n > 6) {
    x6 = WITH_VAR_STACK(unbundle_symset_bias(p[6], "scroll-to in text%"));
  } else
    x6 = 0;

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::ScrollTo(x0, x1, x2, x3, x4, x5, x6));
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->ScrollTo(x0, x1, x2, x3, x4, x5, x6));

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaEditOnDisplaySize(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);

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

  

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::OnDisplaySize());
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->OnDisplaySize());

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOnChange(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);

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

  

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::OnChange());
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->OnChange());

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOnFocus(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  Bool x0;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[0], "on-focus in text%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::OnFocus(x0));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->OnFocus(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOnDefaultChar(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxKeyEvent* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxKeyEvent(p[0], "on-default-char in text%", 0));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::OnDefaultChar(x0));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->OnDefaultChar(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOnDefaultEvent(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxMouseEvent* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[0], "on-default-event in text%", 0));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::OnDefaultEvent(x0));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->OnDefaultEvent(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOnLocalChar(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxKeyEvent* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxKeyEvent(p[0], "on-local-char in text%", 0));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::OnLocalChar(x0));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->OnLocalChar(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOnLocalEvent(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxMouseEvent* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[0], "on-local-event in text%", 0));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::OnLocalEvent(x0));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->OnLocalEvent(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditFindFirstSnip(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxSnip* r;
  objscheme_check_valid(obj);

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

  

  
  r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->FindFirstSnip());

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxSnip(r));
}

static Scheme_Object *os_wxMediaEditSizeCacheInvalid(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);

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

  

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::SizeCacheInvalid());
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->SizeCacheInvalid());

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditBlinkCaret(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);

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

  

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::BlinkCaret());
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->BlinkCaret());

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOwnCaret(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  Bool x0;

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

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

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::OwnCaret(x0));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->OwnCaret(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditRefresh(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  float x0;
  float x1;
  nnfloat x2;
  nnfloat x3;
  int x4;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_float(p[0], "refresh in text%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "refresh in text%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(p[2], "refresh in text%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(p[3], "refresh in text%"));
  x4 = WITH_VAR_STACK(unbundle_symset_caret(p[4], "refresh in text%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::Refresh(x0, x1, x2, x3, x4));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->Refresh(x0, x1, x2, x3, x4));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditAdjustCursor(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxCursor* r;
  objscheme_check_valid(obj);
  class wxMouseEvent* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[0], "adjust-cursor in text%", 0));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::AdjustCursor(x0));
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->AdjustCursor(x0));

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxCursor(r));
}

static Scheme_Object *os_wxMediaEditOnChar(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxKeyEvent* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxKeyEvent(p[0], "on-char in text%", 0));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::OnChar(x0));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->OnChar(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditOnEvent(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxMouseEvent* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[0], "on-event in text%", 0));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::OnEvent(x0));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->OnEvent(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditCopySelfTo(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxMediaBuffer* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxMediaBuffer(p[0], "copy-self-to in text%", 0));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::CopySelfTo(x0));
  else
    WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->CopySelfTo(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaEditCopySelf(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxMediaBuffer* r;
  objscheme_check_valid(obj);

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

  

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->wxMediaEdit::CopySelf());
  else
    r = WITH_VAR_STACK(((wxMediaEdit *)((Scheme_Class_Object *)obj)->primdata)->CopySelf());

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxMediaBuffer(r));
}

static Scheme_Object *os_wxMediaEdit_ConstructScheme(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  SETUP_PRE_VAR_STACK(1);
  PRE_VAR_STACK_PUSH(0, obj);
  os_wxMediaEdit *realobj INIT_NULLED_OUT;
  REMEMBER_VAR_STACK();
  nnfloat x0;
  float* x1 INIT_NULLED_OUT;
  int x2;

  SETUP_VAR_STACK_PRE_REMEMBERED(4);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, obj);
  VAR_STACK_PUSH(2, realobj);
  VAR_STACK_PUSH(3, x1);

  
  if ((n > 2)) 
    WITH_VAR_STACK(scheme_wrong_count("initialization in text%", 0, 2, n, p));
  if (n > 0) {
    x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(p[0], "initialization in text%"));
  } else
    x0 = 1.0;
  if (n > 1) {
    x1 = NULL;
  } else
    x1 = NULL;

  x1 = WITH_VAR_STACK(__MakefloatArray((1 < n) ? p[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 *)obj;
  objscheme_note_creation(obj);
  
  
  ((Scheme_Class_Object *)obj)->primdata = realobj;
  WITH_REMEMBERED_STACK(objscheme_register_primpointer(obj, &((Scheme_Class_Object *)obj)->primdata));
  ((Scheme_Class_Object *)obj)->primflag = 1;
  return obj;
}

void objscheme_setup_wxMediaEdit(void *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%", os_wxMediaEdit_ConstructScheme, 139));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "call-clickback", os_wxMediaEditCallClickback, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "remove-clickback", os_wxMediaEditRemoveClickback, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-clickback", os_wxMediaEditSetClickback, 3, 5));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-wordbreak-func", os_wxMediaEditSetWordbreakFunc, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-autowrap-bitmap", os_wxMediaEditSetAutowrapBitmap, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-new-tab-snip", os_wxMediaEditOnNewTabSnip, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-new-string-snip", os_wxMediaEditOnNewTextSnip, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "caret-hidden?", os_wxMediaEditCaretHidden, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "hide-caret", os_wxMediaEditHideCaret, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-wordbreak-map", os_wxMediaEditGetWordbreakMap, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-wordbreak-map", os_wxMediaEditSetWordbreakMap, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "find-wordbreak", os_wxMediaEditFindWordbreak, 3, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-region-data", os_wxMediaEditSetRegionData, 3, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-region-data", os_wxMediaEditGetRegionData, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "after-set-size-constraint", os_wxMediaEditAfterSetSizeConstraint, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-set-size-constraint", os_wxMediaEditOnSetSizeConstraint, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "can-set-size-constraint?", os_wxMediaEditCanSetSizeConstraint, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "after-set-position", os_wxMediaEditAfterSetPosition, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "after-change-style", os_wxMediaEditAfterChangeStyle, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-change-style", os_wxMediaEditOnChangeStyle, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "can-change-style?", os_wxMediaEditCanChangeStyle, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "after-delete", os_wxMediaEditAfterDelete, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-delete", os_wxMediaEditOnDelete, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "can-delete?", os_wxMediaEditCanDelete, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "after-insert", os_wxMediaEditAfterInsert, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-insert", os_wxMediaEditOnInsert, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "can-insert?", os_wxMediaEditCanInsert, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-tabs", os_wxMediaEditSetTabs, 1, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-tabs", os_wxMediaEditGetTabs, 0, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-overwrite-mode", os_wxMediaEditSetOverwriteMode, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-overwrite-mode", os_wxMediaEditGetOverwriteMode, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-file-format", os_wxMediaEditSetFileFormat, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-file-format", os_wxMediaEditGetFileFormat, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "write-to-file", os_wxMediaEditWriteToFile, 1, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "read-from-file", os_wxMediaEditReadFromFile, 1, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-character", os_wxMediaEditGetCharacter, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-text", os_wxMediaEditGetText, 0, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-snip-position", os_wxMediaEditGetSnipPosition, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-snip-position-and-location", os_wxMediaEditGetSnipPositionAndLocation, 2, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "find-snip", os_wxMediaEditFindSnip, 2, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "find-string-all", os_wxMediaEditFindStringAll, 1, 6));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "find-string", os_wxMediaEditFindString, 1, 6));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-styles-sticky", os_wxMediaEditSetStickyStyles, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-styles-sticky", os_wxMediaEditGetStickyStyles, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-line-spacing", os_wxMediaEditSetLineSpacing, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-line-spacing", os_wxMediaEditGetLineSpacing, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-paragraph-alignment", os_wxMediaEditSetParagraghAlignment, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-paragraph-margins", os_wxMediaEditSetParagraghMargins, 4, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "last-paragraph", os_wxMediaEditLastParagraph, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "paragraph-end-line", os_wxMediaEditParagraphEndLine, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "paragraph-start-line", os_wxMediaEditParagraphStartLine, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "line-paragraph", os_wxMediaEditLineParagraph, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "paragraph-end-position", os_wxMediaEditParagraphEndPosition, 1, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "paragraph-start-position", os_wxMediaEditParagraphStartPosition, 1, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "position-paragraph", os_wxMediaEditPositionParagraph, 1, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "last-line", os_wxMediaEditLastLine, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "last-position", os_wxMediaEditLastPosition, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "line-length", os_wxMediaEditLineLength, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "line-end-position", os_wxMediaEditLineEndPosition, 1, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "line-start-position", os_wxMediaEditLineStartPosition, 1, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "line-location", os_wxMediaEditLineLocation, 1, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "position-location", os_wxMediaEditPositionLocation, 1, 6));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "position-line", os_wxMediaEditPositionLine, 1, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-between-threshold", os_wxMediaEditSetBetweenThreshold, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-between-threshold", os_wxMediaEditGetBetweenThreshold, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "find-position-in-line", os_wxMediaEditFindPositionInLine, 2, 5));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "find-line", os_wxMediaEditFindLine, 1, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "find-position", os_wxMediaEditFindPosition, 2, 5));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "split-snip", os_wxMediaEditSplitSnip, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "change-style", os_wxMediaEditChangeStyle, 1, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "do-paste", os_wxMediaEditDoPaste, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "do-copy", os_wxMediaEditDoCopy, 4, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "kill", os_wxMediaEditKill, 0, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "paste-next", os_wxMediaEditPasteNext, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "paste", os_wxMediaEditPaste, 0, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "copy", os_wxMediaEditCopy, 0, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "cut", os_wxMediaEditCut, 0, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "erase", os_wxMediaEditErase, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "delete", os_wxMediaEditDelete, 0, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "insert", os_wxMediaEditInsert, 1, 5));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-top-line-base", os_wxMediaEditGetTopLineBase, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "flash-off", os_wxMediaEditFlashOff, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "flash-on", os_wxMediaEditFlashOn, 2, 5));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-anchor", os_wxMediaEditGetAnchor, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-anchor", os_wxMediaEditSetAnchor, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-visible-line-range", os_wxMediaEditGetVisibleLineRange, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-visible-position-range", os_wxMediaEditGetVisiblePositionRange, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "scroll-to-position", os_wxMediaEditScrollToPosition, 1, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "move-position", os_wxMediaEditMovePosition, 1, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-position-bias-scroll", os_wxMediaEditSetPositionBiasScroll, 2, 6));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-position", os_wxMediaEditSetPosition, 1, 5));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-end-position", os_wxMediaEditGetEndPosition, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-start-position", os_wxMediaEditGetStartPosition, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-position", os_wxMediaEditGetPosition, 1, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-flattened-text", os_wxMediaEditGetFlattenedText, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "put-file", os_wxMediaEditPutFile, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-file", os_wxMediaEditGetFile, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "after-edit-sequence", os_wxMediaEditAfterEditSequence, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-edit-sequence", os_wxMediaEditOnEditSequence, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "after-load-file", os_wxMediaEditAfterLoadFile, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-load-file", os_wxMediaEditOnLoadFile, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "can-load-file?", os_wxMediaEditCanLoadFile, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "after-save-file", os_wxMediaEditAfterSaveFile, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-save-file", os_wxMediaEditOnSaveFile, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "can-save-file?", os_wxMediaEditCanSaveFile, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-new-box", os_wxMediaEditOnNewBox, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-new-image-snip", os_wxMediaEditOnNewImageSnip, 4, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "invalidate-bitmap-cache", os_wxMediaEditInvalidateBitmapCache, 0, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-paint", os_wxMediaEditOnPaint, 9, 9));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "write-footers-to-file", os_wxMediaEditWriteFootersToFile, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "write-headers-to-file", os_wxMediaEditWriteHeadersToFile, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "read-footer-from-file", os_wxMediaEditReadFooterFromFile, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "read-header-from-file", os_wxMediaEditReadHeaderFromFile, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-filename", os_wxMediaEditSetFilename, 1, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "release-snip", os_wxMediaEditReleaseSnip, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-modified", os_wxMediaEditSetModified, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-snip-data", os_wxMediaEditSetSnipData, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "get-snip-data", os_wxMediaEditGetSnipData, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "needs-update", os_wxMediaEditNeedsUpdate, 5, 5));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "resized", os_wxMediaEditResized, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "set-caret-owner", os_wxMediaEditSetCaretOwner, 1, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "scroll-to", os_wxMediaEditScrollTo, 6, 7));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-display-size", os_wxMediaEditOnDisplaySize, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-change", os_wxMediaEditOnChange, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-focus", os_wxMediaEditOnFocus, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-default-char", os_wxMediaEditOnDefaultChar, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-default-event", os_wxMediaEditOnDefaultEvent, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-local-char", os_wxMediaEditOnLocalChar, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-local-event", os_wxMediaEditOnLocalEvent, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "find-first-snip", os_wxMediaEditFindFirstSnip, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "size-cache-invalid", os_wxMediaEditSizeCacheInvalid, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "blink-caret", os_wxMediaEditBlinkCaret, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "own-caret", os_wxMediaEditOwnCaret, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "refresh", os_wxMediaEditRefresh, 5, 5));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "adjust-cursor", os_wxMediaEditAdjustCursor, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-char", os_wxMediaEditOnChar, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "on-event", os_wxMediaEditOnEvent, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "copy-self-to", os_wxMediaEditCopySelfTo, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaEdit_class, "copy-self", 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));

}

int objscheme_istype_wxMediaEdit(Scheme_Object *obj, const char *stop, int nullOK)
{
  REMEMBER_VAR_STACK();
  if (nullOK && XC_SCHEME_NULLP(obj)) return 1;
  if (SAME_TYPE(SCHEME_TYPE(obj), scheme_object_type)
      && scheme_is_subclass(((Scheme_Class_Object *)obj)->sclass,          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))))
    return sobj;
  obj = (Scheme_Class_Object *)WITH_VAR_STACK(scheme_make_uninited_object(os_wxMediaEdit_class));

  obj->primdata = realobj;
  WITH_VAR_STACK(objscheme_register_primpointer(obj, &obj->primdata));
  obj->primflag = 0;

  realobj->__gc_external = (void *)obj;
  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(obj));
  if (o->primflag)
    return (os_wxMediaEdit *)o->primdata;
  else
    return (wxMediaEdit *)o->primdata;
}

#ifdef MZ_PRECISE_GC
END_XFORM_SKIP;
#endif
