/* DO NOT EDIT THIS FILE. */
/* This file was generated by xctocc from "wxs_snip.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_snip.h"

#ifdef MZ_PRECISE_GC
START_XFORM_SKIP;
#endif


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;
  }
}



static Scheme_Object *flags_wxSNIP_CAN_APPEND_sym = NULL;
static Scheme_Object *flags_wxSNIP_NEWLINE_sym = NULL;
static Scheme_Object *flags_wxSNIP_HARD_NEWLINE_sym = NULL;
static Scheme_Object *flags_wxSNIP_IS_TEXT_sym = NULL;
static Scheme_Object *flags_wxSNIP_INVISIBLE_sym = NULL;
static Scheme_Object *flags_wxSNIP_HANDLES_EVENTS_sym = NULL;
static Scheme_Object *flags_wxSNIP_WIDTH_DEPENDS_ON_X_sym = NULL;
static Scheme_Object *flags_wxSNIP_HEIGHT_DEPENDS_ON_X_sym = NULL;
static Scheme_Object *flags_wxSNIP_WIDTH_DEPENDS_ON_Y_sym = NULL;
static Scheme_Object *flags_wxSNIP_HEIGHT_DEPENDS_ON_Y_sym = NULL;
static Scheme_Object *flags_wxSNIP_ANCHORED_sym = NULL;
static Scheme_Object *flags_wxSNIP_USES_BUFFER_PATH_sym = NULL;

static void init_symset_flags(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(flags_wxSNIP_CAN_APPEND_sym);
  flags_wxSNIP_CAN_APPEND_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("can-append"));
  wxREGGLOB(flags_wxSNIP_NEWLINE_sym);
  flags_wxSNIP_NEWLINE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("newline"));
  wxREGGLOB(flags_wxSNIP_HARD_NEWLINE_sym);
  flags_wxSNIP_HARD_NEWLINE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("hard-newline"));
  wxREGGLOB(flags_wxSNIP_IS_TEXT_sym);
  flags_wxSNIP_IS_TEXT_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("is-text"));
  wxREGGLOB(flags_wxSNIP_INVISIBLE_sym);
  flags_wxSNIP_INVISIBLE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("invisible"));
  wxREGGLOB(flags_wxSNIP_HANDLES_EVENTS_sym);
  flags_wxSNIP_HANDLES_EVENTS_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("handles-events"));
  wxREGGLOB(flags_wxSNIP_WIDTH_DEPENDS_ON_X_sym);
  flags_wxSNIP_WIDTH_DEPENDS_ON_X_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("width-depends-on-x"));
  wxREGGLOB(flags_wxSNIP_HEIGHT_DEPENDS_ON_X_sym);
  flags_wxSNIP_HEIGHT_DEPENDS_ON_X_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("height-depends-on-x"));
  wxREGGLOB(flags_wxSNIP_WIDTH_DEPENDS_ON_Y_sym);
  flags_wxSNIP_WIDTH_DEPENDS_ON_Y_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("width-depends-on-y"));
  wxREGGLOB(flags_wxSNIP_HEIGHT_DEPENDS_ON_Y_sym);
  flags_wxSNIP_HEIGHT_DEPENDS_ON_Y_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("height-depends-on-y"));
  wxREGGLOB(flags_wxSNIP_ANCHORED_sym);
  flags_wxSNIP_ANCHORED_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("anchored"));
  wxREGGLOB(flags_wxSNIP_USES_BUFFER_PATH_sym);
  flags_wxSNIP_USES_BUFFER_PATH_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("uses-buffer-path"));
}

static int unbundle_symset_flags(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!flags_wxSNIP_USES_BUFFER_PATH_sym) WITH_VAR_STACK(init_symset_flags());
  Scheme_Object *i INIT_NULLED_OUT, *l = v;
  long result = 0;
  while (SCHEME_PAIRP(l)) {
  i = SCHEME_CAR(l);
  if (0) { }
  else if (i == flags_wxSNIP_CAN_APPEND_sym) { result = result | wxSNIP_CAN_APPEND; }
  else if (i == flags_wxSNIP_NEWLINE_sym) { result = result | wxSNIP_NEWLINE; }
  else if (i == flags_wxSNIP_HARD_NEWLINE_sym) { result = result | wxSNIP_HARD_NEWLINE; }
  else if (i == flags_wxSNIP_IS_TEXT_sym) { result = result | wxSNIP_IS_TEXT; }
  else if (i == flags_wxSNIP_INVISIBLE_sym) { result = result | wxSNIP_INVISIBLE; }
  else if (i == flags_wxSNIP_HANDLES_EVENTS_sym) { result = result | wxSNIP_HANDLES_EVENTS; }
  else if (i == flags_wxSNIP_WIDTH_DEPENDS_ON_X_sym) { result = result | wxSNIP_WIDTH_DEPENDS_ON_X; }
  else if (i == flags_wxSNIP_HEIGHT_DEPENDS_ON_X_sym) { result = result | wxSNIP_HEIGHT_DEPENDS_ON_X; }
  else if (i == flags_wxSNIP_WIDTH_DEPENDS_ON_Y_sym) { result = result | wxSNIP_WIDTH_DEPENDS_ON_Y; }
  else if (i == flags_wxSNIP_HEIGHT_DEPENDS_ON_Y_sym) { result = result | wxSNIP_HEIGHT_DEPENDS_ON_Y; }
  else if (i == flags_wxSNIP_ANCHORED_sym) { result = result | wxSNIP_ANCHORED; }
  else if (i == flags_wxSNIP_USES_BUFFER_PATH_sym) { result = result | wxSNIP_USES_BUFFER_PATH; }
  else { break; } 
  l = SCHEME_CDR(l);
  }
  if (SCHEME_NULLP(l)) return result;
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "flags symbol list", -1, 0, &v));
  return 0;
}

static Scheme_Object *bundle_symset_flags(int v) {
  REMEMBER_VAR_STACK();
  if (!flags_wxSNIP_USES_BUFFER_PATH_sym) init_symset_flags();
  Scheme_Object *l = scheme_null;
  if (v & wxSNIP_CAN_APPEND) l = WITH_REMEMBERED_STACK(scheme_make_pair(flags_wxSNIP_CAN_APPEND_sym, l));
  if (v & wxSNIP_NEWLINE) l = WITH_REMEMBERED_STACK(scheme_make_pair(flags_wxSNIP_NEWLINE_sym, l));
  if (v & wxSNIP_HARD_NEWLINE) l = WITH_REMEMBERED_STACK(scheme_make_pair(flags_wxSNIP_HARD_NEWLINE_sym, l));
  if (v & wxSNIP_IS_TEXT) l = WITH_REMEMBERED_STACK(scheme_make_pair(flags_wxSNIP_IS_TEXT_sym, l));
  if (v & wxSNIP_INVISIBLE) l = WITH_REMEMBERED_STACK(scheme_make_pair(flags_wxSNIP_INVISIBLE_sym, l));
  if (v & wxSNIP_HANDLES_EVENTS) l = WITH_REMEMBERED_STACK(scheme_make_pair(flags_wxSNIP_HANDLES_EVENTS_sym, l));
  if (v & wxSNIP_WIDTH_DEPENDS_ON_X) l = WITH_REMEMBERED_STACK(scheme_make_pair(flags_wxSNIP_WIDTH_DEPENDS_ON_X_sym, l));
  if (v & wxSNIP_HEIGHT_DEPENDS_ON_X) l = WITH_REMEMBERED_STACK(scheme_make_pair(flags_wxSNIP_HEIGHT_DEPENDS_ON_X_sym, l));
  if (v & wxSNIP_WIDTH_DEPENDS_ON_Y) l = WITH_REMEMBERED_STACK(scheme_make_pair(flags_wxSNIP_WIDTH_DEPENDS_ON_Y_sym, l));
  if (v & wxSNIP_HEIGHT_DEPENDS_ON_Y) l = WITH_REMEMBERED_STACK(scheme_make_pair(flags_wxSNIP_HEIGHT_DEPENDS_ON_Y_sym, l));
  if (v & wxSNIP_ANCHORED) l = WITH_REMEMBERED_STACK(scheme_make_pair(flags_wxSNIP_ANCHORED_sym, l));
  if (v & wxSNIP_USES_BUFFER_PATH) l = WITH_REMEMBERED_STACK(scheme_make_pair(flags_wxSNIP_USES_BUFFER_PATH_sym, l));
  return l;
}



static Scheme_Object *editOp_wxEDIT_UNDO_sym = NULL;
static Scheme_Object *editOp_wxEDIT_REDO_sym = NULL;
static Scheme_Object *editOp_wxEDIT_CLEAR_sym = NULL;
static Scheme_Object *editOp_wxEDIT_CUT_sym = NULL;
static Scheme_Object *editOp_wxEDIT_COPY_sym = NULL;
static Scheme_Object *editOp_wxEDIT_PASTE_sym = NULL;
static Scheme_Object *editOp_wxEDIT_KILL_sym = NULL;
static Scheme_Object *editOp_wxEDIT_INSERT_TEXT_BOX_sym = NULL;
static Scheme_Object *editOp_wxEDIT_INSERT_GRAPHIC_BOX_sym = NULL;
static Scheme_Object *editOp_wxEDIT_INSERT_IMAGE_sym = NULL;
static Scheme_Object *editOp_wxEDIT_SELECT_ALL_sym = NULL;

static void init_symset_editOp(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(editOp_wxEDIT_UNDO_sym);
  editOp_wxEDIT_UNDO_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("undo"));
  wxREGGLOB(editOp_wxEDIT_REDO_sym);
  editOp_wxEDIT_REDO_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("redo"));
  wxREGGLOB(editOp_wxEDIT_CLEAR_sym);
  editOp_wxEDIT_CLEAR_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("clear"));
  wxREGGLOB(editOp_wxEDIT_CUT_sym);
  editOp_wxEDIT_CUT_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("cut"));
  wxREGGLOB(editOp_wxEDIT_COPY_sym);
  editOp_wxEDIT_COPY_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("copy"));
  wxREGGLOB(editOp_wxEDIT_PASTE_sym);
  editOp_wxEDIT_PASTE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("paste"));
  wxREGGLOB(editOp_wxEDIT_KILL_sym);
  editOp_wxEDIT_KILL_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("kill"));
  wxREGGLOB(editOp_wxEDIT_INSERT_TEXT_BOX_sym);
  editOp_wxEDIT_INSERT_TEXT_BOX_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("insert-text-box"));
  wxREGGLOB(editOp_wxEDIT_INSERT_GRAPHIC_BOX_sym);
  editOp_wxEDIT_INSERT_GRAPHIC_BOX_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("insert-pasteboard-box"));
  wxREGGLOB(editOp_wxEDIT_INSERT_IMAGE_sym);
  editOp_wxEDIT_INSERT_IMAGE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("insert-image"));
  wxREGGLOB(editOp_wxEDIT_SELECT_ALL_sym);
  editOp_wxEDIT_SELECT_ALL_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("select-all"));
}

static int unbundle_symset_editOp(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!editOp_wxEDIT_SELECT_ALL_sym) WITH_VAR_STACK(init_symset_editOp());
  if (0) { }
  else if (v == editOp_wxEDIT_UNDO_sym) { return wxEDIT_UNDO; }
  else if (v == editOp_wxEDIT_REDO_sym) { return wxEDIT_REDO; }
  else if (v == editOp_wxEDIT_CLEAR_sym) { return wxEDIT_CLEAR; }
  else if (v == editOp_wxEDIT_CUT_sym) { return wxEDIT_CUT; }
  else if (v == editOp_wxEDIT_COPY_sym) { return wxEDIT_COPY; }
  else if (v == editOp_wxEDIT_PASTE_sym) { return wxEDIT_PASTE; }
  else if (v == editOp_wxEDIT_KILL_sym) { return wxEDIT_KILL; }
  else if (v == editOp_wxEDIT_INSERT_TEXT_BOX_sym) { return wxEDIT_INSERT_TEXT_BOX; }
  else if (v == editOp_wxEDIT_INSERT_GRAPHIC_BOX_sym) { return wxEDIT_INSERT_GRAPHIC_BOX; }
  else if (v == editOp_wxEDIT_INSERT_IMAGE_sym) { return wxEDIT_INSERT_IMAGE; }
  else if (v == editOp_wxEDIT_SELECT_ALL_sym) { return wxEDIT_SELECT_ALL; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "editOp symbol", -1, 0, &v));
  return 0;
}

static Scheme_Object *bundle_symset_editOp(int v) {
  if (!editOp_wxEDIT_SELECT_ALL_sym) init_symset_editOp();
  switch (v) {
  case wxEDIT_UNDO: return editOp_wxEDIT_UNDO_sym;
  case wxEDIT_REDO: return editOp_wxEDIT_REDO_sym;
  case wxEDIT_CLEAR: return editOp_wxEDIT_CLEAR_sym;
  case wxEDIT_CUT: return editOp_wxEDIT_CUT_sym;
  case wxEDIT_COPY: return editOp_wxEDIT_COPY_sym;
  case wxEDIT_PASTE: return editOp_wxEDIT_PASTE_sym;
  case wxEDIT_KILL: return editOp_wxEDIT_KILL_sym;
  case wxEDIT_INSERT_TEXT_BOX: return editOp_wxEDIT_INSERT_TEXT_BOX_sym;
  case wxEDIT_INSERT_GRAPHIC_BOX: return editOp_wxEDIT_INSERT_GRAPHIC_BOX_sym;
  case wxEDIT_INSERT_IMAGE: return editOp_wxEDIT_INSERT_IMAGE_sym;
  case wxEDIT_SELECT_ALL: return editOp_wxEDIT_SELECT_ALL_sym;
  default: return NULL;
  }
}




















class os_wxSnip : public wxSnip {
 public:

  os_wxSnip CONSTRUCTOR_ARGS(());
  ~os_wxSnip();
  nnfloat GetScrollStepOffset(nnlong x0);
  nnlong FindScrollStep(float x0);
  nnlong GetNumScrollSteps();
  void SetAdmin(class wxSnipAdmin* x0);
  Bool Resize(nnfloat x0, nnfloat x1);
  void Write(class wxMediaStreamOut* x0);
  Bool Match(class wxSnip* x0);
  void DoEdit(int x0, Bool x1 = TRUE, long x2 = 0);
  void BlinkCaret(class wxDC* x0, float x1, float x2);
  void OwnCaret(Bool x0);
  class wxCursor* AdjustCursor(class wxDC* x0, float x1, float x2, float x3, float x4, class wxMouseEvent* x5);
  void OnChar(class wxDC* x0, float x1, float x2, float x3, float x4, class wxKeyEvent* x5);
  void OnEvent(class wxDC* x0, float x1, float x2, float x3, float x4, class wxMouseEvent* x5);
  void SizeCacheInvalid();
  class wxSnip* Copy();
  string GetText(nnlong x0, nnlong x1, Bool x2 = FALSE, long* x3 = NULL);
  class wxSnip* MergeWith(class wxSnip* x0);
  void Split(nnlong x0, class wxSnip** x1, class wxSnip** x2);
  void Draw(class wxDC* x0, float x1, float x2, float x3, float x4, float x5, float x6, float x7, float x8, int x9);
  float PartialOffset(class wxDC* x0, float x1, float x2, nnlong x3);
  void GetExtent(class wxDC* x0, float x1, float x2, nnfloat* x3 = NULL, nnfloat* x4 = NULL, nnfloat* x5 = NULL, nnfloat* x6 = NULL, nnfloat* x7 = NULL, nnfloat* x8 = NULL);
#ifdef MZ_PRECISE_GC
  void gcMark();
  void gcFixup();
#endif
};

#ifdef MZ_PRECISE_GC
void os_wxSnip::gcMark() {
  wxSnip::gcMark();
}
void os_wxSnip::gcFixup() {
  wxSnip::gcFixup();
}
#endif

static Scheme_Object *os_wxSnip_class;

os_wxSnip::os_wxSnip CONSTRUCTOR_ARGS(())
CONSTRUCTOR_INIT(: wxSnip())
{
}

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

nnfloat os_wxSnip::GetScrollStepOffset(nnlong x0)
{
  Scheme_Object *p[1] INIT_NULLED_ARRAY({ NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxSnip *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_wxSnip_class, "get-scroll-step-offset", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxSnip::GetScrollStepOffset(x0);
  } else {
  
  p[0] = scheme_make_integer(x0);
  

  v = WITH_VAR_STACK(scheme_apply(method, 1, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(v, "get-scroll-step-offset in snip%"", extracting return value"));
  }
}

nnlong os_wxSnip::FindScrollStep(float x0)
{
  Scheme_Object *p[1] INIT_NULLED_ARRAY({ NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxSnip *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_wxSnip_class, "find-scroll-step", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxSnip::FindScrollStep(x0);
  } else {
  
  p[0] = WITH_VAR_STACK(scheme_make_double(x0));
  

  v = WITH_VAR_STACK(scheme_apply(method, 1, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(v, "find-scroll-step in snip%"", extracting return value"));
  }
}

nnlong os_wxSnip::GetNumScrollSteps()
{
  Scheme_Object **p = NULL;
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxSnip *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_wxSnip_class, "get-num-scroll-steps", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxSnip::GetNumScrollSteps();
  } else {
  
  

  v = WITH_VAR_STACK(scheme_apply(method, 0, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(v, "get-num-scroll-steps in snip%"", extracting return value"));
  }
}

void os_wxSnip::SetAdmin(class wxSnipAdmin* x0)
{
  Scheme_Object *p[1] INIT_NULLED_ARRAY({ NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxSnip *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_wxSnip_class, "set-admin", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxSnip::SetAdmin(x0);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxSnipAdmin(x0));
  

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

Bool os_wxSnip::Resize(nnfloat x0, nnfloat 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_wxSnip *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_wxSnip_class, "resize", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxSnip::Resize(x0, x1);
  } else {
  
  p[0] = WITH_VAR_STACK(scheme_make_double(x0));
  p[1] = WITH_VAR_STACK(scheme_make_double(x1));
  

  v = WITH_VAR_STACK(scheme_apply(method, 2, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_bool(v, "resize in snip%"", extracting return value"));
  }
}

void os_wxSnip::Write(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_wxSnip *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_wxSnip_class, "write", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxSnip::Write(x0);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxMediaStreamOut(x0));
  

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

Bool os_wxSnip::Match(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_wxSnip *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_wxSnip_class, "match?", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxSnip::Match(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, "match? in snip%"", extracting return value"));
  }
}

void os_wxSnip::DoEdit(int x0, Bool x1, long 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_wxSnip *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, 3);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxSnip_class, "do-edit-operation", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxSnip::DoEdit(x0, x1, x2);
  } else {
  
  p[0] = WITH_VAR_STACK(bundle_symset_editOp(x0));
  p[1] = (x1 ? scheme_true : scheme_false);
  p[2] = scheme_make_integer(x2);
  

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

void os_wxSnip::BlinkCaret(class wxDC* x0, float x1, float 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_wxSnip *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, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxSnip_class, "blink-caret", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxSnip::BlinkCaret(x0, x1, x2);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[2] = WITH_VAR_STACK(scheme_make_double(x2));
  

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

void os_wxSnip::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_wxSnip *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_wxSnip_class, "own-caret", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxSnip::OwnCaret(x0);
  } else {
  
  p[0] = (x0 ? scheme_true : scheme_false);
  

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

class wxCursor* os_wxSnip::AdjustCursor(class wxDC* x0, float x1, float x2, float x3, float x4, class wxMouseEvent* x5)
{
  Scheme_Object *p[6] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxSnip *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, 6);
  VAR_STACK_PUSH(5, x0);
  VAR_STACK_PUSH(6, x5);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxSnip_class, "adjust-cursor", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxSnip::AdjustCursor(x0, x1, x2, x3, x4, x5);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(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] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x5));
  

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

void os_wxSnip::OnChar(class wxDC* x0, float x1, float x2, float x3, float x4, class wxKeyEvent* x5)
{
  Scheme_Object *p[6] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxSnip *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, 6);
  VAR_STACK_PUSH(5, x0);
  VAR_STACK_PUSH(6, x5);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxSnip_class, "on-char", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxSnip::OnChar(x0, x1, x2, x3, x4, x5);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(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] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x5));
  

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

void os_wxSnip::OnEvent(class wxDC* x0, float x1, float x2, float x3, float x4, class wxMouseEvent* x5)
{
  Scheme_Object *p[6] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxSnip *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, 6);
  VAR_STACK_PUSH(5, x0);
  VAR_STACK_PUSH(6, x5);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxSnip_class, "on-event", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxSnip::OnEvent(x0, x1, x2, x3, x4, x5);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(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] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x5));
  

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

void os_wxSnip::SizeCacheInvalid()
{
  Scheme_Object **p = NULL;
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxSnip *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_wxSnip_class, "size-cache-invalid", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxSnip::SizeCacheInvalid();
  } else {
  
  

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

class wxSnip* os_wxSnip::Copy()
{
  Scheme_Object **p = NULL;
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxSnip *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_wxSnip_class, "copy", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxSnip::Copy();
  } else {
  
  

  v = WITH_VAR_STACK(scheme_apply(method, 0, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_wxSnip(v, "copy in snip%"", extracting return value", 0));
  }
}

string os_wxSnip::GetText(nnlong x0, nnlong x1, Bool x2, long* x3)
{
  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_wxSnip *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, 3);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxSnip_class, "get-text", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxSnip::GetText(x0, x1, x2, x3);
  } else {
  
  p[0] = scheme_make_integer(x0);
  p[1] = scheme_make_integer(x1);
  p[2] = (x2 ? scheme_true : scheme_false);
  

  v = WITH_VAR_STACK(scheme_apply(method, 3, p));
  
  
  return (string)WITH_VAR_STACK(objscheme_unbundle_string(v, "get-text in snip%"", extracting return value"));
  }
}

class wxSnip* os_wxSnip::MergeWith(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_wxSnip *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_wxSnip_class, "merge-with", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxSnip::MergeWith(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_wxSnip(v, "merge-with in snip%"", extracting return value", 1));
  }
}

void os_wxSnip::Split(nnlong x0, class wxSnip** x1, class wxSnip** 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_wxSnip *sElF = this;
#endif
  static void *mcache = 0;
  Scheme_Object *sbox_tmp;

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

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxSnip_class, "split", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxSnip::Split(x0, x1, x2);
  } else {
  
  p[0] = scheme_make_integer(x0);
  p[1] = (sbox_tmp = WITH_VAR_STACK(objscheme_bundle_wxSnip((*x1))), WITH_VAR_STACK(objscheme_box(sbox_tmp)));
  p[2] = (sbox_tmp = WITH_VAR_STACK(objscheme_bundle_wxSnip((*x2))), WITH_VAR_STACK(objscheme_box(sbox_tmp)));
  

  v = WITH_VAR_STACK(scheme_apply(method, 3, p));
  
  if (x1) *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[1], "split in snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_wxSnip(sbox_tmp, "split in snip%"", extracting return value via box"", extracting boxed argument", 0)));
  if (x2) *x2 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[2], "split in snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_wxSnip(sbox_tmp, "split in snip%"", extracting return value via box"", extracting boxed argument", 0)));
  
  }
}

void os_wxSnip::Draw(class wxDC* x0, float x1, float x2, float x3, float x4, float x5, float x6, float x7, float x8, int x9)
{
  Scheme_Object *p[10] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxSnip *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, 10);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxSnip_class, "draw", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxSnip::Draw(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(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] = 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(scheme_make_double(x8));
  p[9] = WITH_VAR_STACK(bundle_symset_caret(x9));
  

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

float os_wxSnip::PartialOffset(class wxDC* x0, float x1, float x2, nnlong 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_wxSnip *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_wxSnip_class, "partial-offset", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxSnip::PartialOffset(x0, x1, x2, x3);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[3] = scheme_make_integer(x3);
  

  v = WITH_VAR_STACK(scheme_apply(method, 4, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_float(v, "partial-offset in snip%"", extracting return value"));
  }
}

void os_wxSnip::GetExtent(class wxDC* x0, float x1, float x2, nnfloat* x3, nnfloat* x4, nnfloat* x5, nnfloat* x6, nnfloat* x7, nnfloat* 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_wxSnip *sElF = this;
#endif
  static void *mcache = 0;
  Scheme_Object *sbox_tmp;

  SETUP_VAR_STACK(12);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, 9);
  VAR_STACK_PUSH(5, x0);
  VAR_STACK_PUSH(6, x3);
  VAR_STACK_PUSH(7, x4);
  VAR_STACK_PUSH(8, x5);
  VAR_STACK_PUSH(9, x6);
  VAR_STACK_PUSH(10, x7);
  VAR_STACK_PUSH(11, x8);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxSnip_class, "get-extent", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxSnip::GetExtent(x0, x1, x2, x3, x4, x5, x6, x7, x8);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[3] = ((x3) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x3))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[4] = ((x4) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x4))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[5] = ((x5) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x5))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[6] = ((x6) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x6))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[7] = ((x7) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x7))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[8] = ((x8) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x8))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  

  v = WITH_VAR_STACK(scheme_apply(method, 9, p));
  
  if (x3) *x3 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[3], "get-extent in snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in snip%"", extracting return value via box"", extracting boxed argument")));
  if (x4) *x4 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[4], "get-extent in snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in snip%"", extracting return value via box"", extracting boxed argument")));
  if (x5) *x5 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[5], "get-extent in snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in snip%"", extracting return value via box"", extracting boxed argument")));
  if (x6) *x6 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[6], "get-extent in snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in snip%"", extracting return value via box"", extracting boxed argument")));
  if (x7) *x7 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[7], "get-extent in snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in snip%"", extracting return value via box"", extracting boxed argument")));
  if (x8) *x8 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[8], "get-extent in snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in snip%"", extracting return value via box"", extracting boxed argument")));
  
  }
}

static Scheme_Object *os_wxSnipPrevious(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(((wxSnip *)((Scheme_Class_Object *)obj)->primdata)->Previous());

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxSnip(r));
}

static Scheme_Object *os_wxSnipNext(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(((wxSnip *)((Scheme_Class_Object *)obj)->primdata)->Next());

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxSnip(r));
}

static Scheme_Object *os_wxSnipGetScrollStepOffset(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);
  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-scroll-step-offset in snip%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxSnip *)((Scheme_Class_Object *)obj)->primdata)->wxSnip::GetScrollStepOffset(x0));
  else
    r = WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)obj)->primdata)->GetScrollStepOffset(x0));

  
  
  return WITH_REMEMBERED_STACK(scheme_make_double(r));
}

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

  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-scroll-step in snip%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxSnip *)((Scheme_Class_Object *)obj)->primdata)->wxSnip::FindScrollStep(x0));
  else
    r = WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)obj)->primdata)->FindScrollStep(x0));

  
  
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxSnipGetNumScrollSteps(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  nnlong 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_wxSnip *)((Scheme_Class_Object *)obj)->primdata)->wxSnip::GetNumScrollSteps());
  else
    r = WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)obj)->primdata)->GetNumScrollSteps());

  
  
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxSnipSetAdmin(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxSnipAdmin* 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_wxSnipAdmin(p[0], "set-admin in snip%", 1));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxSnip *)((Scheme_Class_Object *)obj)->primdata)->wxSnip::SetAdmin(x0));
  else
    WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)obj)->primdata)->SetAdmin(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxSnipResize(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);
  nnfloat x0;
  nnfloat x1;

  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], "resize in snip%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(p[1], "resize in snip%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxSnip *)((Scheme_Class_Object *)obj)->primdata)->wxSnip::Resize(x0, x1));
  else
    r = WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)obj)->primdata)->Resize(x0, x1));

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxSnipWrite(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  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 in snip%", 0));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxSnip *)((Scheme_Class_Object *)obj)->primdata)->wxSnip::Write(x0));
  else
    WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)obj)->primdata)->Write(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxSnipMatch(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], "match? in snip%", 0));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxSnip *)((Scheme_Class_Object *)obj)->primdata)->wxSnip::Match(x0));
  else
    r = WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)obj)->primdata)->Match(x0));

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxSnipDoEdit(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;
  long x2;

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

  
  x0 = WITH_VAR_STACK(unbundle_symset_editOp(p[0], "do-edit-operation in snip%"));
  if (n > 1) {
    x1 = WITH_VAR_STACK(objscheme_unbundle_bool(p[1], "do-edit-operation in snip%"));
  } else
    x1 = TRUE;
  if (n > 2) {
    x2 = WITH_VAR_STACK(objscheme_unbundle_integer(p[2], "do-edit-operation in snip%"));
  } else
    x2 = 0;

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxSnip *)((Scheme_Class_Object *)obj)->primdata)->wxSnip::DoEdit(x0, x1, x2));
  else
    WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)obj)->primdata)->DoEdit(x0, x1, x2));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxSnipBlinkCaret(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxDC* x0 INIT_NULLED_OUT;
  float x1;
  float x2;

  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_wxDC(p[0], "blink-caret in snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "blink-caret in snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "blink-caret in snip%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxSnip *)((Scheme_Class_Object *)obj)->primdata)->wxSnip::BlinkCaret(x0, x1, x2));
  else
    WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)obj)->primdata)->BlinkCaret(x0, x1, x2));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxSnipOwnCaret(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 snip%"));

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

  
  
  return scheme_void;
}

static Scheme_Object *os_wxSnipAdjustCursor(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 wxDC* x0 INIT_NULLED_OUT;
  float x1;
  float x2;
  float x3;
  float x4;
  class wxMouseEvent* x5 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, x5);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[0], "adjust-cursor in snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "adjust-cursor in snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "adjust-cursor in snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_float(p[3], "adjust-cursor in snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_float(p[4], "adjust-cursor in snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[5], "adjust-cursor in snip%", 0));

  if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","adjust-cursor"), "bad device context: ", p[0]));
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxSnip *)((Scheme_Class_Object *)obj)->primdata)->wxSnip::AdjustCursor(x0, x1, x2, x3, x4, x5));
  else
    r = WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)obj)->primdata)->AdjustCursor(x0, x1, x2, x3, x4, x5));

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxCursor(r));
}

static Scheme_Object *os_wxSnipOnChar(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxDC* x0 INIT_NULLED_OUT;
  float x1;
  float x2;
  float x3;
  float x4;
  class wxKeyEvent* x5 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, x5);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[0], "on-char in snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "on-char in snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "on-char in snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_float(p[3], "on-char in snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_float(p[4], "on-char in snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_wxKeyEvent(p[5], "on-char in snip%", 0));

  if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","on-char"), "bad device context: ", p[0]));
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxSnip *)((Scheme_Class_Object *)obj)->primdata)->wxSnip::OnChar(x0, x1, x2, x3, x4, x5));
  else
    WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)obj)->primdata)->OnChar(x0, x1, x2, x3, x4, x5));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxSnipOnEvent(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxDC* x0 INIT_NULLED_OUT;
  float x1;
  float x2;
  float x3;
  float x4;
  class wxMouseEvent* x5 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, x5);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[0], "on-event in snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "on-event in snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "on-event in snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_float(p[3], "on-event in snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_float(p[4], "on-event in snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[5], "on-event in snip%", 0));

  if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","on-event"), "bad device context: ", p[0]));
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxSnip *)((Scheme_Class_Object *)obj)->primdata)->wxSnip::OnEvent(x0, x1, x2, x3, x4, x5));
  else
    WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)obj)->primdata)->OnEvent(x0, x1, x2, x3, x4, x5));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxSnipSizeCacheInvalid(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_wxSnip *)((Scheme_Class_Object *)obj)->primdata)->wxSnip::SizeCacheInvalid());
  else
    WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)obj)->primdata)->SizeCacheInvalid());

  
  
  return scheme_void;
}

static Scheme_Object *os_wxSnipCopy(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);

  

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxSnip *)((Scheme_Class_Object *)obj)->primdata)->wxSnip::Copy());
  else
    r = WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)obj)->primdata)->Copy());

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxSnip(r));
}

static Scheme_Object *os_wxSnipGetText(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;
  nnlong x1;
  Bool x2;
  long _x3;
  long* x3 = &_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], "get-text in snip%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[1], "get-text in snip%"));
  if (n > 2) {
    x2 = WITH_VAR_STACK(objscheme_unbundle_bool(p[2], "get-text in snip%"));
  } else
    x2 = FALSE;

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxSnip *)((Scheme_Class_Object *)obj)->primdata)->wxSnip::GetText(x0, x1, x2, x3));
  else
    r = WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)obj)->primdata)->GetText(x0, x1, x2, x3));

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

static Scheme_Object *os_wxSnipMergeWith(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);
  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], "merge-with in snip%", 0));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxSnip *)((Scheme_Class_Object *)obj)->primdata)->wxSnip::MergeWith(x0));
  else
    r = WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)obj)->primdata)->MergeWith(x0));

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxSnip(r));
}

static Scheme_Object *os_wxSnipSplit(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;
  class wxSnip* _x1;
  class wxSnip** x1 = &_x1;
  class wxSnip* _x2;
  class wxSnip** x2 = &_x2;
  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], "split in snip%"));
      *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[1], "split in snip%")), WITH_VAR_STACK(objscheme_unbundle_wxSnip(sbox_tmp, "split in snip%"", extracting boxed argument", 0)));
      *x2 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[2], "split in snip%")), WITH_VAR_STACK(objscheme_unbundle_wxSnip(sbox_tmp, "split in snip%"", extracting boxed argument", 0)));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxSnip *)((Scheme_Class_Object *)obj)->primdata)->wxSnip::Split(x0, x1, x2));
  else
    WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)obj)->primdata)->Split(x0, x1, x2));

  
  if (n > 1)
    WITH_VAR_STACK(objscheme_set_box(p[1], WITH_VAR_STACK(objscheme_bundle_wxSnip(_x1))));
  if (n > 2)
    WITH_VAR_STACK(objscheme_set_box(p[2], WITH_VAR_STACK(objscheme_bundle_wxSnip(_x2))));
  
  return scheme_void;
}

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

  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_wxDC(p[0], "draw in snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "draw in snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "draw in snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_float(p[3], "draw in snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_float(p[4], "draw in snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_float(p[5], "draw in snip%"));
  x6 = WITH_VAR_STACK(objscheme_unbundle_float(p[6], "draw in snip%"));
  x7 = WITH_VAR_STACK(objscheme_unbundle_float(p[7], "draw in snip%"));
  x8 = WITH_VAR_STACK(objscheme_unbundle_float(p[8], "draw in snip%"));
  x9 = WITH_VAR_STACK(unbundle_symset_caret(p[9], "draw in snip%"));

  if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","draw"), "bad device context: ", p[0]));
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxSnip *)((Scheme_Class_Object *)obj)->primdata)->wxSnip::Draw(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9));
  else
    WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)obj)->primdata)->Draw(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxSnipPartialOffset(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);
  class wxDC* x0 INIT_NULLED_OUT;
  float x1;
  float x2;
  nnlong x3;

  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_wxDC(p[0], "partial-offset in snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "partial-offset in snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "partial-offset in snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[3], "partial-offset in snip%"));

  if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","partial-offset"), "bad device context: ", p[0]));
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxSnip *)((Scheme_Class_Object *)obj)->primdata)->wxSnip::PartialOffset(x0, x1, x2, x3));
  else
    r = WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)obj)->primdata)->PartialOffset(x0, x1, x2, x3));

  
  
  return WITH_REMEMBERED_STACK(scheme_make_double(r));
}

static Scheme_Object *os_wxSnipGetExtent(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxDC* x0 INIT_NULLED_OUT;
  float x1;
  float x2;
  nnfloat _x3;
  nnfloat* x3 = &_x3;
  nnfloat _x4;
  nnfloat* x4 = &_x4;
  nnfloat _x5;
  nnfloat* x5 = &_x5;
  nnfloat _x6;
  nnfloat* x6 = &_x6;
  nnfloat _x7;
  nnfloat* x7 = &_x7;
  nnfloat _x8;
  nnfloat* x8 = &_x8;
  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_wxDC(p[0], "get-extent in snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "get-extent in snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "get-extent in snip%"));
  if (n > 3) {
    if (XC_SCHEME_NULLP(p[3]))
    x3 = NULL;
  else
    *x3 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[3], "get-extent in snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in snip%"", 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], "get-extent in snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in snip%"", extracting boxed argument")));
  } else
    x4 = NULL;
  if (n > 5) {
    if (XC_SCHEME_NULLP(p[5]))
    x5 = NULL;
  else
    *x5 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[5], "get-extent in snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in snip%"", extracting boxed argument")));
  } else
    x5 = NULL;
  if (n > 6) {
    if (XC_SCHEME_NULLP(p[6]))
    x6 = NULL;
  else
    *x6 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[6], "get-extent in snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in snip%"", extracting boxed argument")));
  } else
    x6 = NULL;
  if (n > 7) {
    if (XC_SCHEME_NULLP(p[7]))
    x7 = NULL;
  else
    *x7 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[7], "get-extent in snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in snip%"", extracting boxed argument")));
  } else
    x7 = NULL;
  if (n > 8) {
    if (XC_SCHEME_NULLP(p[8]))
    x8 = NULL;
  else
    *x8 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[8], "get-extent in snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in snip%"", extracting boxed argument")));
  } else
    x8 = NULL;

  if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","get-extent"), "bad device context: ", p[0]));
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxSnip *)((Scheme_Class_Object *)obj)->primdata)->wxSnip::GetExtent(x0, x1, x2, x3, x4, x5, x6, x7, x8));
  else
    WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)obj)->primdata)->GetExtent(x0, x1, x2, x3, x4, x5, x6, x7, x8));

  
  if (n > 3 && !XC_SCHEME_NULLP(p[3]))
    WITH_VAR_STACK(objscheme_set_box(p[3], WITH_VAR_STACK(scheme_make_double(_x3))));
  if (n > 4 && !XC_SCHEME_NULLP(p[4]))
    WITH_VAR_STACK(objscheme_set_box(p[4], WITH_VAR_STACK(scheme_make_double(_x4))));
  if (n > 5 && !XC_SCHEME_NULLP(p[5]))
    WITH_VAR_STACK(objscheme_set_box(p[5], WITH_VAR_STACK(scheme_make_double(_x5))));
  if (n > 6 && !XC_SCHEME_NULLP(p[6]))
    WITH_VAR_STACK(objscheme_set_box(p[6], WITH_VAR_STACK(scheme_make_double(_x6))));
  if (n > 7 && !XC_SCHEME_NULLP(p[7]))
    WITH_VAR_STACK(objscheme_set_box(p[7], WITH_VAR_STACK(scheme_make_double(_x7))));
  if (n > 8 && !XC_SCHEME_NULLP(p[8]))
    WITH_VAR_STACK(objscheme_set_box(p[8], WITH_VAR_STACK(scheme_make_double(_x8))));
  
  return scheme_void;
}

static Scheme_Object *os_wxSnipReleaseFromOwner(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(((wxSnip *)((Scheme_Class_Object *)obj)->primdata)->ReleaseFromOwner());

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxSnipIsOwned(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(((wxSnip *)((Scheme_Class_Object *)obj)->primdata)->IsOwned());

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxSnipSetStyle(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxStyle* 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_wxStyle(p[0], "set-style in snip%", 0));

  
  WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)obj)->primdata)->SetStyle(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxSnipSetFlags(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_flags(p[0], "set-flags in snip%"));

  
  WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)obj)->primdata)->SetFlags(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxSnipSetCount(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(objscheme_unbundle_integer_in(p[0], 1, 100000, "set-count in snip%"));

  
  WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)obj)->primdata)->SetCount(x0));

  
  
  return scheme_void;
}

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

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

  

  
  r = WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)obj)->primdata)->GetAdmin());

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxSnipAdmin(r));
}

static Scheme_Object *objscheme_wxSnip_Getcount(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  long v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(obj);
  if (n) WITH_REMEMBERED_STACK(scheme_wrong_count("get-count in snip%", 0, 0, n, p));
  cobj = (Scheme_Class_Object *)obj;
  if (cobj->primflag)
    v = ((os_wxSnip *)cobj->primdata)->wxSnip::count;
  else
    v = ((wxSnip *)cobj->primdata)->count;

  return scheme_make_integer(v);
}

static Scheme_Object *objscheme_wxSnip_Getflags(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  int v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(obj);
  if (n) WITH_REMEMBERED_STACK(scheme_wrong_count("get-flags in snip%", 0, 0, n, p));
  cobj = (Scheme_Class_Object *)obj;
  if (cobj->primflag)
    v = ((os_wxSnip *)cobj->primdata)->wxSnip::flags;
  else
    v = ((wxSnip *)cobj->primdata)->flags;

  return WITH_REMEMBERED_STACK(bundle_symset_flags(v));
}

static Scheme_Object *objscheme_wxSnip_Getstyle(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  class wxStyle* v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(obj);
  if (n) WITH_REMEMBERED_STACK(scheme_wrong_count("get-style in snip%", 0, 0, n, p));
  cobj = (Scheme_Class_Object *)obj;
  if (cobj->primflag)
    v = ((os_wxSnip *)cobj->primdata)->wxSnip::style;
  else
    v = ((wxSnip *)cobj->primdata)->style;

  return WITH_REMEMBERED_STACK(objscheme_bundle_wxStyle(v));
}

static Scheme_Object *objscheme_wxSnip_Getsnipclass(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  class wxSnipClass* v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(obj);
  if (n) WITH_REMEMBERED_STACK(scheme_wrong_count("get-snipclass in snip%", 0, 0, n, p));
  cobj = (Scheme_Class_Object *)obj;
  if (cobj->primflag)
    v = ((os_wxSnip *)cobj->primdata)->wxSnip::snipclass;
  else
    v = ((wxSnip *)cobj->primdata)->snipclass;

  return WITH_REMEMBERED_STACK(objscheme_bundle_wxSnipClass(v));
}

static Scheme_Object *objscheme_wxSnip_Setsnipclass(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj = (Scheme_Class_Object *)obj;
  class wxSnipClass* v;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, cobj);

  WITH_VAR_STACK(objscheme_check_valid(obj));
  if (n != 1) WITH_VAR_STACK(scheme_wrong_count("set-snipclass in snip%", 1, 1, n, p));

  v = WITH_VAR_STACK(objscheme_unbundle_wxSnipClass(p[0], "set-snipclass in snip%", 1));
  ((wxSnip *)cobj->primdata)->snipclass = v;

  return scheme_void;
}

static Scheme_Object *os_wxSnip_ConstructScheme(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  SETUP_PRE_VAR_STACK(1);
  PRE_VAR_STACK_PUSH(0, obj);
  os_wxSnip *realobj INIT_NULLED_OUT;
  REMEMBER_VAR_STACK();

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

  
  if (n != 0) 
    WITH_VAR_STACK(scheme_wrong_count("initialization in snip%", 0, 0, n, p));

  
  realobj = WITH_VAR_STACK(new os_wxSnip CONSTRUCTOR_ARGS(()));
#ifdef MZ_PRECISE_GC
  WITH_VAR_STACK(realobj->gcInit_wxSnip());
#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_wxSnip(void *env)
{
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, env);

  wxREGGLOB(os_wxSnip_class);

  os_wxSnip_class = WITH_VAR_STACK(objscheme_def_prim_class(env, "snip%", "object%", os_wxSnip_ConstructScheme, 34));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class, "previous", os_wxSnipPrevious, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class, "next", os_wxSnipNext, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class, "get-scroll-step-offset", os_wxSnipGetScrollStepOffset, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class, "find-scroll-step", os_wxSnipFindScrollStep, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class, "get-num-scroll-steps", os_wxSnipGetNumScrollSteps, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class, "set-admin", os_wxSnipSetAdmin, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class, "resize", os_wxSnipResize, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class, "write", os_wxSnipWrite, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class, "match?", os_wxSnipMatch, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class, "do-edit-operation", os_wxSnipDoEdit, 1, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class, "blink-caret", os_wxSnipBlinkCaret, 3, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class, "own-caret", os_wxSnipOwnCaret, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class, "adjust-cursor", os_wxSnipAdjustCursor, 6, 6));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class, "on-char", os_wxSnipOnChar, 6, 6));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class, "on-event", os_wxSnipOnEvent, 6, 6));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class, "size-cache-invalid", os_wxSnipSizeCacheInvalid, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class, "copy", os_wxSnipCopy, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class, "get-text", os_wxSnipGetText, 2, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class, "merge-with", os_wxSnipMergeWith, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class, "split", os_wxSnipSplit, 3, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class, "draw", os_wxSnipDraw, 10, 10));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class, "partial-offset", os_wxSnipPartialOffset, 4, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class, "get-extent", os_wxSnipGetExtent, 3, 9));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class, "release-from-owner", os_wxSnipReleaseFromOwner, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class, "is-owned?", os_wxSnipIsOwned, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class, "set-style", os_wxSnipSetStyle, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class, "set-flags", os_wxSnipSetFlags, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class, "set-count", os_wxSnipSetCount, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class, "get-admin", os_wxSnipGetAdmin, 0, 0));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class,"get-count", objscheme_wxSnip_Getcount, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class,"get-flags", objscheme_wxSnip_Getflags, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class,"get-style", objscheme_wxSnip_Getstyle, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class,"get-snipclass", objscheme_wxSnip_Getsnipclass, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class,"set-snipclass", objscheme_wxSnip_Setsnipclass, 1, 1));

  WITH_VAR_STACK(scheme_made_class(os_wxSnip_class));

  WITH_VAR_STACK(objscheme_install_bundler((Objscheme_Bundler)objscheme_bundle_wxSnip, wxTYPE_SNIP));

}

int objscheme_istype_wxSnip(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_wxSnip_class))
    return 1;
  else {
    if (!stop)
       return 0;
    WITH_REMEMBERED_STACK(scheme_wrong_type(stop, nullOK ? "snip% object or " XC_NULL_STR: "snip% object", -1, 0, &obj));
    return 0;
  }
}

Scheme_Object *objscheme_bundle_wxSnip(class wxSnip *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_SNIP) && (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_wxSnip_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 wxSnip *objscheme_unbundle_wxSnip(Scheme_Object *obj, const char *where, int nullOK)
{
  if (nullOK && XC_SCHEME_NULLP(obj)) return NULL;

  REMEMBER_VAR_STACK();

  (void)objscheme_istype_wxSnip(obj, where, nullOK);
  Scheme_Class_Object *o = (Scheme_Class_Object *)obj;
  WITH_REMEMBERED_STACK(objscheme_check_valid(obj));
  if (o->primflag)
    return (os_wxSnip *)o->primdata;
  else
    return (wxSnip *)o->primdata;
}
















class os_wxTextSnip : public wxTextSnip {
 public:

  os_wxTextSnip CONSTRUCTOR_ARGS((nnlong x0 = 0));
#ifndef MZ_PRECISE_GC
  os_wxTextSnip CONSTRUCTOR_ARGS((string x0, long x1));
#endif
  ~os_wxTextSnip();
  nnfloat GetScrollStepOffset(nnlong x0);
  nnlong FindScrollStep(float x0);
  nnlong GetNumScrollSteps();
  void SetAdmin(class wxSnipAdmin* x0);
  Bool Resize(nnfloat x0, nnfloat x1);
  void Write(class wxMediaStreamOut* x0);
  Bool Match(class wxSnip* x0);
  void DoEdit(int x0, Bool x1 = TRUE, long x2 = 0);
  void BlinkCaret(class wxDC* x0, float x1, float x2);
  void OwnCaret(Bool x0);
  class wxCursor* AdjustCursor(class wxDC* x0, float x1, float x2, float x3, float x4, class wxMouseEvent* x5);
  void OnChar(class wxDC* x0, float x1, float x2, float x3, float x4, class wxKeyEvent* x5);
  void OnEvent(class wxDC* x0, float x1, float x2, float x3, float x4, class wxMouseEvent* x5);
  void SizeCacheInvalid();
  class wxSnip* Copy();
  string GetText(nnlong x0, nnlong x1, Bool x2 = FALSE, long* x3 = NULL);
  class wxSnip* MergeWith(class wxSnip* x0);
  void Split(nnlong x0, class wxSnip** x1, class wxSnip** x2);
  void Draw(class wxDC* x0, float x1, float x2, float x3, float x4, float x5, float x6, float x7, float x8, int x9);
  float PartialOffset(class wxDC* x0, float x1, float x2, nnlong x3);
  void GetExtent(class wxDC* x0, float x1, float x2, nnfloat* x3 = NULL, nnfloat* x4 = NULL, nnfloat* x5 = NULL, nnfloat* x6 = NULL, nnfloat* x7 = NULL, nnfloat* x8 = NULL);
#ifdef MZ_PRECISE_GC
  void gcMark();
  void gcFixup();
#endif
};

#ifdef MZ_PRECISE_GC
void os_wxTextSnip::gcMark() {
  wxTextSnip::gcMark();
}
void os_wxTextSnip::gcFixup() {
  wxTextSnip::gcFixup();
}
#endif

static Scheme_Object *os_wxTextSnip_class;

os_wxTextSnip::os_wxTextSnip CONSTRUCTOR_ARGS((nnlong x0))
CONSTRUCTOR_INIT(: wxTextSnip(x0))
{
}

#ifndef MZ_PRECISE_GC
os_wxTextSnip::os_wxTextSnip CONSTRUCTOR_ARGS((string x0, long x1))
CONSTRUCTOR_INIT(: wxTextSnip(x0, x1))
{
}
#endif

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

nnfloat os_wxTextSnip::GetScrollStepOffset(nnlong x0)
{
  Scheme_Object *p[1] INIT_NULLED_ARRAY({ NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxTextSnip *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_wxTextSnip_class, "get-scroll-step-offset", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxTextSnip::GetScrollStepOffset(x0);
  } else {
  
  p[0] = scheme_make_integer(x0);
  

  v = WITH_VAR_STACK(scheme_apply(method, 1, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(v, "get-scroll-step-offset in string-snip%"", extracting return value"));
  }
}

nnlong os_wxTextSnip::FindScrollStep(float x0)
{
  Scheme_Object *p[1] INIT_NULLED_ARRAY({ NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxTextSnip *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_wxTextSnip_class, "find-scroll-step", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxTextSnip::FindScrollStep(x0);
  } else {
  
  p[0] = WITH_VAR_STACK(scheme_make_double(x0));
  

  v = WITH_VAR_STACK(scheme_apply(method, 1, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(v, "find-scroll-step in string-snip%"", extracting return value"));
  }
}

nnlong os_wxTextSnip::GetNumScrollSteps()
{
  Scheme_Object **p = NULL;
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxTextSnip *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_wxTextSnip_class, "get-num-scroll-steps", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxTextSnip::GetNumScrollSteps();
  } else {
  
  

  v = WITH_VAR_STACK(scheme_apply(method, 0, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(v, "get-num-scroll-steps in string-snip%"", extracting return value"));
  }
}

void os_wxTextSnip::SetAdmin(class wxSnipAdmin* x0)
{
  Scheme_Object *p[1] INIT_NULLED_ARRAY({ NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxTextSnip *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_wxTextSnip_class, "set-admin", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxTextSnip::SetAdmin(x0);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxSnipAdmin(x0));
  

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

Bool os_wxTextSnip::Resize(nnfloat x0, nnfloat 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_wxTextSnip *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_wxTextSnip_class, "resize", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxTextSnip::Resize(x0, x1);
  } else {
  
  p[0] = WITH_VAR_STACK(scheme_make_double(x0));
  p[1] = WITH_VAR_STACK(scheme_make_double(x1));
  

  v = WITH_VAR_STACK(scheme_apply(method, 2, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_bool(v, "resize in string-snip%"", extracting return value"));
  }
}

void os_wxTextSnip::Write(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_wxTextSnip *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_wxTextSnip_class, "write", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxTextSnip::Write(x0);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxMediaStreamOut(x0));
  

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

Bool os_wxTextSnip::Match(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_wxTextSnip *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_wxTextSnip_class, "match?", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxTextSnip::Match(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, "match? in string-snip%"", extracting return value"));
  }
}

void os_wxTextSnip::DoEdit(int x0, Bool x1, long 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_wxTextSnip *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, 3);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxTextSnip_class, "do-edit-operation", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxTextSnip::DoEdit(x0, x1, x2);
  } else {
  
  p[0] = WITH_VAR_STACK(bundle_symset_editOp(x0));
  p[1] = (x1 ? scheme_true : scheme_false);
  p[2] = scheme_make_integer(x2);
  

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

void os_wxTextSnip::BlinkCaret(class wxDC* x0, float x1, float 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_wxTextSnip *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, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxTextSnip_class, "blink-caret", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxTextSnip::BlinkCaret(x0, x1, x2);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[2] = WITH_VAR_STACK(scheme_make_double(x2));
  

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

void os_wxTextSnip::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_wxTextSnip *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_wxTextSnip_class, "own-caret", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxTextSnip::OwnCaret(x0);
  } else {
  
  p[0] = (x0 ? scheme_true : scheme_false);
  

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

class wxCursor* os_wxTextSnip::AdjustCursor(class wxDC* x0, float x1, float x2, float x3, float x4, class wxMouseEvent* x5)
{
  Scheme_Object *p[6] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxTextSnip *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, 6);
  VAR_STACK_PUSH(5, x0);
  VAR_STACK_PUSH(6, x5);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxTextSnip_class, "adjust-cursor", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxTextSnip::AdjustCursor(x0, x1, x2, x3, x4, x5);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(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] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x5));
  

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

void os_wxTextSnip::OnChar(class wxDC* x0, float x1, float x2, float x3, float x4, class wxKeyEvent* x5)
{
  Scheme_Object *p[6] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxTextSnip *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, 6);
  VAR_STACK_PUSH(5, x0);
  VAR_STACK_PUSH(6, x5);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxTextSnip_class, "on-char", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxTextSnip::OnChar(x0, x1, x2, x3, x4, x5);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(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] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x5));
  

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

void os_wxTextSnip::OnEvent(class wxDC* x0, float x1, float x2, float x3, float x4, class wxMouseEvent* x5)
{
  Scheme_Object *p[6] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxTextSnip *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, 6);
  VAR_STACK_PUSH(5, x0);
  VAR_STACK_PUSH(6, x5);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxTextSnip_class, "on-event", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxTextSnip::OnEvent(x0, x1, x2, x3, x4, x5);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(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] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x5));
  

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

void os_wxTextSnip::SizeCacheInvalid()
{
  Scheme_Object **p = NULL;
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxTextSnip *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_wxTextSnip_class, "size-cache-invalid", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxTextSnip::SizeCacheInvalid();
  } else {
  
  

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

class wxSnip* os_wxTextSnip::Copy()
{
  Scheme_Object **p = NULL;
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxTextSnip *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_wxTextSnip_class, "copy", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxTextSnip::Copy();
  } else {
  
  

  v = WITH_VAR_STACK(scheme_apply(method, 0, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_wxSnip(v, "copy in string-snip%"", extracting return value", 0));
  }
}

string os_wxTextSnip::GetText(nnlong x0, nnlong x1, Bool x2, long* x3)
{
  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_wxTextSnip *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, 3);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxTextSnip_class, "get-text", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxTextSnip::GetText(x0, x1, x2, x3);
  } else {
  
  p[0] = scheme_make_integer(x0);
  p[1] = scheme_make_integer(x1);
  p[2] = (x2 ? scheme_true : scheme_false);
  

  v = WITH_VAR_STACK(scheme_apply(method, 3, p));
  
  
  return (string)WITH_VAR_STACK(objscheme_unbundle_string(v, "get-text in string-snip%"", extracting return value"));
  }
}

class wxSnip* os_wxTextSnip::MergeWith(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_wxTextSnip *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_wxTextSnip_class, "merge-with", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxTextSnip::MergeWith(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_wxSnip(v, "merge-with in string-snip%"", extracting return value", 1));
  }
}

void os_wxTextSnip::Split(nnlong x0, class wxSnip** x1, class wxSnip** 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_wxTextSnip *sElF = this;
#endif
  static void *mcache = 0;
  Scheme_Object *sbox_tmp;

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

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxTextSnip_class, "split", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxTextSnip::Split(x0, x1, x2);
  } else {
  
  p[0] = scheme_make_integer(x0);
  p[1] = (sbox_tmp = WITH_VAR_STACK(objscheme_bundle_wxSnip((*x1))), WITH_VAR_STACK(objscheme_box(sbox_tmp)));
  p[2] = (sbox_tmp = WITH_VAR_STACK(objscheme_bundle_wxSnip((*x2))), WITH_VAR_STACK(objscheme_box(sbox_tmp)));
  

  v = WITH_VAR_STACK(scheme_apply(method, 3, p));
  
  if (x1) *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[1], "split in string-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_wxSnip(sbox_tmp, "split in string-snip%"", extracting return value via box"", extracting boxed argument", 0)));
  if (x2) *x2 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[2], "split in string-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_wxSnip(sbox_tmp, "split in string-snip%"", extracting return value via box"", extracting boxed argument", 0)));
  
  }
}

void os_wxTextSnip::Draw(class wxDC* x0, float x1, float x2, float x3, float x4, float x5, float x6, float x7, float x8, int x9)
{
  Scheme_Object *p[10] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxTextSnip *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, 10);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxTextSnip_class, "draw", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxTextSnip::Draw(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(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] = 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(scheme_make_double(x8));
  p[9] = WITH_VAR_STACK(bundle_symset_caret(x9));
  

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

float os_wxTextSnip::PartialOffset(class wxDC* x0, float x1, float x2, nnlong 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_wxTextSnip *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_wxTextSnip_class, "partial-offset", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxTextSnip::PartialOffset(x0, x1, x2, x3);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[3] = scheme_make_integer(x3);
  

  v = WITH_VAR_STACK(scheme_apply(method, 4, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_float(v, "partial-offset in string-snip%"", extracting return value"));
  }
}

void os_wxTextSnip::GetExtent(class wxDC* x0, float x1, float x2, nnfloat* x3, nnfloat* x4, nnfloat* x5, nnfloat* x6, nnfloat* x7, nnfloat* 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_wxTextSnip *sElF = this;
#endif
  static void *mcache = 0;
  Scheme_Object *sbox_tmp;

  SETUP_VAR_STACK(12);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, 9);
  VAR_STACK_PUSH(5, x0);
  VAR_STACK_PUSH(6, x3);
  VAR_STACK_PUSH(7, x4);
  VAR_STACK_PUSH(8, x5);
  VAR_STACK_PUSH(9, x6);
  VAR_STACK_PUSH(10, x7);
  VAR_STACK_PUSH(11, x8);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxTextSnip_class, "get-extent", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxTextSnip::GetExtent(x0, x1, x2, x3, x4, x5, x6, x7, x8);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[3] = ((x3) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x3))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[4] = ((x4) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x4))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[5] = ((x5) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x5))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[6] = ((x6) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x6))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[7] = ((x7) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x7))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[8] = ((x8) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x8))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  

  v = WITH_VAR_STACK(scheme_apply(method, 9, p));
  
  if (x3) *x3 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[3], "get-extent in string-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in string-snip%"", extracting return value via box"", extracting boxed argument")));
  if (x4) *x4 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[4], "get-extent in string-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in string-snip%"", extracting return value via box"", extracting boxed argument")));
  if (x5) *x5 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[5], "get-extent in string-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in string-snip%"", extracting return value via box"", extracting boxed argument")));
  if (x6) *x6 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[6], "get-extent in string-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in string-snip%"", extracting return value via box"", extracting boxed argument")));
  if (x7) *x7 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[7], "get-extent in string-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in string-snip%"", extracting return value via box"", extracting boxed argument")));
  if (x8) *x8 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[8], "get-extent in string-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in string-snip%"", extracting return value via box"", extracting boxed argument")));
  
  }
}

static Scheme_Object *os_wxTextSnipRead(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;
  class wxMediaStreamIn* 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 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[0], "read in string-snip%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_wxMediaStreamIn(p[1], "read in string-snip%", 0));

  
  WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->Read(x0, x1));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxTextSnipInsert(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;
  nnlong x1;
  nnlong x2;

  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], "insert in string-snip%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[1], "insert in string-snip%"));
  if (n > 2) {
    x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[2], "insert in string-snip%"));
  } else
    x2 = 0;

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

  
  
  return scheme_void;
}

static Scheme_Object *os_wxTextSnipGetScrollStepOffset(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);
  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-scroll-step-offset in string-snip%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTextSnip::GetScrollStepOffset(x0));
  else
    r = WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->GetScrollStepOffset(x0));

  
  
  return WITH_REMEMBERED_STACK(scheme_make_double(r));
}

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

  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-scroll-step in string-snip%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTextSnip::FindScrollStep(x0));
  else
    r = WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->FindScrollStep(x0));

  
  
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxTextSnipGetNumScrollSteps(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  nnlong 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_wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTextSnip::GetNumScrollSteps());
  else
    r = WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->GetNumScrollSteps());

  
  
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxTextSnipSetAdmin(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxSnipAdmin* 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_wxSnipAdmin(p[0], "set-admin in string-snip%", 1));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTextSnip::SetAdmin(x0));
  else
    WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->SetAdmin(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxTextSnipResize(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);
  nnfloat x0;
  nnfloat x1;

  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], "resize in string-snip%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(p[1], "resize in string-snip%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTextSnip::Resize(x0, x1));
  else
    r = WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->Resize(x0, x1));

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxTextSnipWrite(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  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 in string-snip%", 0));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTextSnip::Write(x0));
  else
    WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->Write(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxTextSnipMatch(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], "match? in string-snip%", 0));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTextSnip::Match(x0));
  else
    r = WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->Match(x0));

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxTextSnipDoEdit(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;
  long x2;

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

  
  x0 = WITH_VAR_STACK(unbundle_symset_editOp(p[0], "do-edit-operation in string-snip%"));
  if (n > 1) {
    x1 = WITH_VAR_STACK(objscheme_unbundle_bool(p[1], "do-edit-operation in string-snip%"));
  } else
    x1 = TRUE;
  if (n > 2) {
    x2 = WITH_VAR_STACK(objscheme_unbundle_integer(p[2], "do-edit-operation in string-snip%"));
  } else
    x2 = 0;

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTextSnip::DoEdit(x0, x1, x2));
  else
    WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->DoEdit(x0, x1, x2));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxTextSnipBlinkCaret(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxDC* x0 INIT_NULLED_OUT;
  float x1;
  float x2;

  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_wxDC(p[0], "blink-caret in string-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "blink-caret in string-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "blink-caret in string-snip%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTextSnip::BlinkCaret(x0, x1, x2));
  else
    WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->BlinkCaret(x0, x1, x2));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxTextSnipOwnCaret(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 string-snip%"));

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

  
  
  return scheme_void;
}

static Scheme_Object *os_wxTextSnipAdjustCursor(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 wxDC* x0 INIT_NULLED_OUT;
  float x1;
  float x2;
  float x3;
  float x4;
  class wxMouseEvent* x5 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, x5);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[0], "adjust-cursor in string-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "adjust-cursor in string-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "adjust-cursor in string-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_float(p[3], "adjust-cursor in string-snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_float(p[4], "adjust-cursor in string-snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[5], "adjust-cursor in string-snip%", 0));

  if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","adjust-cursor"), "bad device context: ", p[0]));
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTextSnip::AdjustCursor(x0, x1, x2, x3, x4, x5));
  else
    r = WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->AdjustCursor(x0, x1, x2, x3, x4, x5));

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxCursor(r));
}

static Scheme_Object *os_wxTextSnipOnChar(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxDC* x0 INIT_NULLED_OUT;
  float x1;
  float x2;
  float x3;
  float x4;
  class wxKeyEvent* x5 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, x5);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[0], "on-char in string-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "on-char in string-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "on-char in string-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_float(p[3], "on-char in string-snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_float(p[4], "on-char in string-snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_wxKeyEvent(p[5], "on-char in string-snip%", 0));

  if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","on-char"), "bad device context: ", p[0]));
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTextSnip::OnChar(x0, x1, x2, x3, x4, x5));
  else
    WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->OnChar(x0, x1, x2, x3, x4, x5));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxTextSnipOnEvent(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxDC* x0 INIT_NULLED_OUT;
  float x1;
  float x2;
  float x3;
  float x4;
  class wxMouseEvent* x5 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, x5);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[0], "on-event in string-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "on-event in string-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "on-event in string-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_float(p[3], "on-event in string-snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_float(p[4], "on-event in string-snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[5], "on-event in string-snip%", 0));

  if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","on-event"), "bad device context: ", p[0]));
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTextSnip::OnEvent(x0, x1, x2, x3, x4, x5));
  else
    WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->OnEvent(x0, x1, x2, x3, x4, x5));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxTextSnipSizeCacheInvalid(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_wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTextSnip::SizeCacheInvalid());
  else
    WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->SizeCacheInvalid());

  
  
  return scheme_void;
}

static Scheme_Object *os_wxTextSnipCopy(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);

  

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTextSnip::Copy());
  else
    r = WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->Copy());

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxSnip(r));
}

static Scheme_Object *os_wxTextSnipGetText(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;
  nnlong x1;
  Bool x2;
  long _x3;
  long* x3 = &_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], "get-text in string-snip%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[1], "get-text in string-snip%"));
  if (n > 2) {
    x2 = WITH_VAR_STACK(objscheme_unbundle_bool(p[2], "get-text in string-snip%"));
  } else
    x2 = FALSE;

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTextSnip::GetText(x0, x1, x2, x3));
  else
    r = WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->GetText(x0, x1, x2, x3));

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

static Scheme_Object *os_wxTextSnipMergeWith(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);
  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], "merge-with in string-snip%", 0));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTextSnip::MergeWith(x0));
  else
    r = WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->MergeWith(x0));

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxSnip(r));
}

static Scheme_Object *os_wxTextSnipSplit(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;
  class wxSnip* _x1;
  class wxSnip** x1 = &_x1;
  class wxSnip* _x2;
  class wxSnip** x2 = &_x2;
  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], "split in string-snip%"));
      *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[1], "split in string-snip%")), WITH_VAR_STACK(objscheme_unbundle_wxSnip(sbox_tmp, "split in string-snip%"", extracting boxed argument", 0)));
      *x2 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[2], "split in string-snip%")), WITH_VAR_STACK(objscheme_unbundle_wxSnip(sbox_tmp, "split in string-snip%"", extracting boxed argument", 0)));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTextSnip::Split(x0, x1, x2));
  else
    WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->Split(x0, x1, x2));

  
  if (n > 1)
    WITH_VAR_STACK(objscheme_set_box(p[1], WITH_VAR_STACK(objscheme_bundle_wxSnip(_x1))));
  if (n > 2)
    WITH_VAR_STACK(objscheme_set_box(p[2], WITH_VAR_STACK(objscheme_bundle_wxSnip(_x2))));
  
  return scheme_void;
}

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

  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_wxDC(p[0], "draw in string-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "draw in string-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "draw in string-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_float(p[3], "draw in string-snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_float(p[4], "draw in string-snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_float(p[5], "draw in string-snip%"));
  x6 = WITH_VAR_STACK(objscheme_unbundle_float(p[6], "draw in string-snip%"));
  x7 = WITH_VAR_STACK(objscheme_unbundle_float(p[7], "draw in string-snip%"));
  x8 = WITH_VAR_STACK(objscheme_unbundle_float(p[8], "draw in string-snip%"));
  x9 = WITH_VAR_STACK(unbundle_symset_caret(p[9], "draw in string-snip%"));

  if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","draw"), "bad device context: ", p[0]));
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTextSnip::Draw(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9));
  else
    WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->Draw(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxTextSnipPartialOffset(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);
  class wxDC* x0 INIT_NULLED_OUT;
  float x1;
  float x2;
  nnlong x3;

  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_wxDC(p[0], "partial-offset in string-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "partial-offset in string-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "partial-offset in string-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[3], "partial-offset in string-snip%"));

  if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","partial-offset"), "bad device context: ", p[0]));
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTextSnip::PartialOffset(x0, x1, x2, x3));
  else
    r = WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->PartialOffset(x0, x1, x2, x3));

  
  
  return WITH_REMEMBERED_STACK(scheme_make_double(r));
}

static Scheme_Object *os_wxTextSnipGetExtent(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxDC* x0 INIT_NULLED_OUT;
  float x1;
  float x2;
  nnfloat _x3;
  nnfloat* x3 = &_x3;
  nnfloat _x4;
  nnfloat* x4 = &_x4;
  nnfloat _x5;
  nnfloat* x5 = &_x5;
  nnfloat _x6;
  nnfloat* x6 = &_x6;
  nnfloat _x7;
  nnfloat* x7 = &_x7;
  nnfloat _x8;
  nnfloat* x8 = &_x8;
  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_wxDC(p[0], "get-extent in string-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "get-extent in string-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "get-extent in string-snip%"));
  if (n > 3) {
    if (XC_SCHEME_NULLP(p[3]))
    x3 = NULL;
  else
    *x3 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[3], "get-extent in string-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in string-snip%"", 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], "get-extent in string-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in string-snip%"", extracting boxed argument")));
  } else
    x4 = NULL;
  if (n > 5) {
    if (XC_SCHEME_NULLP(p[5]))
    x5 = NULL;
  else
    *x5 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[5], "get-extent in string-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in string-snip%"", extracting boxed argument")));
  } else
    x5 = NULL;
  if (n > 6) {
    if (XC_SCHEME_NULLP(p[6]))
    x6 = NULL;
  else
    *x6 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[6], "get-extent in string-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in string-snip%"", extracting boxed argument")));
  } else
    x6 = NULL;
  if (n > 7) {
    if (XC_SCHEME_NULLP(p[7]))
    x7 = NULL;
  else
    *x7 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[7], "get-extent in string-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in string-snip%"", extracting boxed argument")));
  } else
    x7 = NULL;
  if (n > 8) {
    if (XC_SCHEME_NULLP(p[8]))
    x8 = NULL;
  else
    *x8 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[8], "get-extent in string-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in string-snip%"", extracting boxed argument")));
  } else
    x8 = NULL;

  if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","get-extent"), "bad device context: ", p[0]));
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTextSnip::GetExtent(x0, x1, x2, x3, x4, x5, x6, x7, x8));
  else
    WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)obj)->primdata)->GetExtent(x0, x1, x2, x3, x4, x5, x6, x7, x8));

  
  if (n > 3 && !XC_SCHEME_NULLP(p[3]))
    WITH_VAR_STACK(objscheme_set_box(p[3], WITH_VAR_STACK(scheme_make_double(_x3))));
  if (n > 4 && !XC_SCHEME_NULLP(p[4]))
    WITH_VAR_STACK(objscheme_set_box(p[4], WITH_VAR_STACK(scheme_make_double(_x4))));
  if (n > 5 && !XC_SCHEME_NULLP(p[5]))
    WITH_VAR_STACK(objscheme_set_box(p[5], WITH_VAR_STACK(scheme_make_double(_x5))));
  if (n > 6 && !XC_SCHEME_NULLP(p[6]))
    WITH_VAR_STACK(objscheme_set_box(p[6], WITH_VAR_STACK(scheme_make_double(_x6))));
  if (n > 7 && !XC_SCHEME_NULLP(p[7]))
    WITH_VAR_STACK(objscheme_set_box(p[7], WITH_VAR_STACK(scheme_make_double(_x7))));
  if (n > 8 && !XC_SCHEME_NULLP(p[8]))
    WITH_VAR_STACK(objscheme_set_box(p[8], WITH_VAR_STACK(scheme_make_double(_x8))));
  
  return scheme_void;
}

static Scheme_Object *os_wxTextSnip_ConstructScheme(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  SETUP_PRE_VAR_STACK(2);
  PRE_VAR_STACK_PUSH(0, obj);
  PRE_VAR_STACK_PUSH(1, p);
  os_wxTextSnip *realobj INIT_NULLED_OUT;
  REMEMBER_VAR_STACK();
  if ((n >= 1) && WITH_REMEMBERED_STACK(objscheme_istype_string(p[0], NULL))) {
    string x0 INIT_NULLED_OUT;
    long x1;

    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, x0);

    
    if (n != 1) 
      WITH_VAR_STACK(scheme_wrong_count("initialization in string-snip% (initial string case)", 1, 1, n, p));
    x0 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[0], "initialization in string-snip% (initial string case)"));

    x1 = SCHEME_STRLEN_VAL(p[0]);
    realobj = WITH_VAR_STACK(new os_wxTextSnip CONSTRUCTOR_ARGS((x0, x1)));
#ifdef MZ_PRECISE_GC
    WITH_VAR_STACK(realobj->gcInit_wxTextSnip(x0, x1));
#endif
    realobj->__gc_external = (void *)obj;
    objscheme_note_creation(obj);
    
    
  } else  {
    nnlong x0;

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

    
    if ((n > 1)) 
      WITH_VAR_STACK(scheme_wrong_count("initialization in string-snip% (initial size case)", 0, 1, n, p));
    if (n > 0) {
      x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[0], "initialization in string-snip% (initial size case)"));
    } else
      x0 = 0;

    
    realobj = WITH_VAR_STACK(new os_wxTextSnip CONSTRUCTOR_ARGS((x0)));
#ifdef MZ_PRECISE_GC
    WITH_VAR_STACK(realobj->gcInit_wxTextSnip(x0));
#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_wxTextSnip(void *env)
{
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, env);

  wxREGGLOB(os_wxTextSnip_class);

  os_wxTextSnip_class = WITH_VAR_STACK(objscheme_def_prim_class(env, "string-snip%", "snip%", os_wxTextSnip_ConstructScheme, 23));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTextSnip_class, "read", os_wxTextSnipRead, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTextSnip_class, "insert", os_wxTextSnipInsert, 2, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTextSnip_class, "get-scroll-step-offset", os_wxTextSnipGetScrollStepOffset, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTextSnip_class, "find-scroll-step", os_wxTextSnipFindScrollStep, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTextSnip_class, "get-num-scroll-steps", os_wxTextSnipGetNumScrollSteps, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTextSnip_class, "set-admin", os_wxTextSnipSetAdmin, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTextSnip_class, "resize", os_wxTextSnipResize, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTextSnip_class, "write", os_wxTextSnipWrite, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTextSnip_class, "match?", os_wxTextSnipMatch, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTextSnip_class, "do-edit-operation", os_wxTextSnipDoEdit, 1, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTextSnip_class, "blink-caret", os_wxTextSnipBlinkCaret, 3, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTextSnip_class, "own-caret", os_wxTextSnipOwnCaret, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTextSnip_class, "adjust-cursor", os_wxTextSnipAdjustCursor, 6, 6));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTextSnip_class, "on-char", os_wxTextSnipOnChar, 6, 6));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTextSnip_class, "on-event", os_wxTextSnipOnEvent, 6, 6));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTextSnip_class, "size-cache-invalid", os_wxTextSnipSizeCacheInvalid, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTextSnip_class, "copy", os_wxTextSnipCopy, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTextSnip_class, "get-text", os_wxTextSnipGetText, 2, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTextSnip_class, "merge-with", os_wxTextSnipMergeWith, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTextSnip_class, "split", os_wxTextSnipSplit, 3, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTextSnip_class, "draw", os_wxTextSnipDraw, 10, 10));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTextSnip_class, "partial-offset", os_wxTextSnipPartialOffset, 4, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTextSnip_class, "get-extent", os_wxTextSnipGetExtent, 3, 9));


  WITH_VAR_STACK(scheme_made_class(os_wxTextSnip_class));

  WITH_VAR_STACK(objscheme_install_bundler((Objscheme_Bundler)objscheme_bundle_wxTextSnip, wxTYPE_TEXT_SNIP));

}

int objscheme_istype_wxTextSnip(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_wxTextSnip_class))
    return 1;
  else {
    if (!stop)
       return 0;
    WITH_REMEMBERED_STACK(scheme_wrong_type(stop, nullOK ? "string-snip% object or " XC_NULL_STR: "string-snip% object", -1, 0, &obj));
    return 0;
  }
}

Scheme_Object *objscheme_bundle_wxTextSnip(class wxTextSnip *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_TEXT_SNIP) && (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_wxTextSnip_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 wxTextSnip *objscheme_unbundle_wxTextSnip(Scheme_Object *obj, const char *where, int nullOK)
{
  if (nullOK && XC_SCHEME_NULLP(obj)) return NULL;

  REMEMBER_VAR_STACK();

  (void)objscheme_istype_wxTextSnip(obj, where, nullOK);
  Scheme_Class_Object *o = (Scheme_Class_Object *)obj;
  WITH_REMEMBERED_STACK(objscheme_check_valid(obj));
  if (o->primflag)
    return (os_wxTextSnip *)o->primdata;
  else
    return (wxTextSnip *)o->primdata;
}















class os_wxTabSnip : public wxTabSnip {
 public:

  os_wxTabSnip CONSTRUCTOR_ARGS(());
  ~os_wxTabSnip();
  nnfloat GetScrollStepOffset(nnlong x0);
  nnlong FindScrollStep(float x0);
  nnlong GetNumScrollSteps();
  void SetAdmin(class wxSnipAdmin* x0);
  Bool Resize(nnfloat x0, nnfloat x1);
  void Write(class wxMediaStreamOut* x0);
  Bool Match(class wxSnip* x0);
  void DoEdit(int x0, Bool x1 = TRUE, long x2 = 0);
  void BlinkCaret(class wxDC* x0, float x1, float x2);
  void OwnCaret(Bool x0);
  class wxCursor* AdjustCursor(class wxDC* x0, float x1, float x2, float x3, float x4, class wxMouseEvent* x5);
  void OnChar(class wxDC* x0, float x1, float x2, float x3, float x4, class wxKeyEvent* x5);
  void OnEvent(class wxDC* x0, float x1, float x2, float x3, float x4, class wxMouseEvent* x5);
  void SizeCacheInvalid();
  class wxSnip* Copy();
  string GetText(nnlong x0, nnlong x1, Bool x2 = FALSE, long* x3 = NULL);
  class wxSnip* MergeWith(class wxSnip* x0);
  void Split(nnlong x0, class wxSnip** x1, class wxSnip** x2);
  void Draw(class wxDC* x0, float x1, float x2, float x3, float x4, float x5, float x6, float x7, float x8, int x9);
  float PartialOffset(class wxDC* x0, float x1, float x2, nnlong x3);
  void GetExtent(class wxDC* x0, float x1, float x2, nnfloat* x3 = NULL, nnfloat* x4 = NULL, nnfloat* x5 = NULL, nnfloat* x6 = NULL, nnfloat* x7 = NULL, nnfloat* x8 = NULL);
#ifdef MZ_PRECISE_GC
  void gcMark();
  void gcFixup();
#endif
};

#ifdef MZ_PRECISE_GC
void os_wxTabSnip::gcMark() {
  wxTabSnip::gcMark();
}
void os_wxTabSnip::gcFixup() {
  wxTabSnip::gcFixup();
}
#endif

static Scheme_Object *os_wxTabSnip_class;

os_wxTabSnip::os_wxTabSnip CONSTRUCTOR_ARGS(())
CONSTRUCTOR_INIT(: wxTabSnip())
{
}

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

nnfloat os_wxTabSnip::GetScrollStepOffset(nnlong x0)
{
  Scheme_Object *p[1] INIT_NULLED_ARRAY({ NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxTabSnip *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_wxTabSnip_class, "get-scroll-step-offset", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxTabSnip::GetScrollStepOffset(x0);
  } else {
  
  p[0] = scheme_make_integer(x0);
  

  v = WITH_VAR_STACK(scheme_apply(method, 1, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(v, "get-scroll-step-offset in tab-snip%"", extracting return value"));
  }
}

nnlong os_wxTabSnip::FindScrollStep(float x0)
{
  Scheme_Object *p[1] INIT_NULLED_ARRAY({ NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxTabSnip *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_wxTabSnip_class, "find-scroll-step", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxTabSnip::FindScrollStep(x0);
  } else {
  
  p[0] = WITH_VAR_STACK(scheme_make_double(x0));
  

  v = WITH_VAR_STACK(scheme_apply(method, 1, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(v, "find-scroll-step in tab-snip%"", extracting return value"));
  }
}

nnlong os_wxTabSnip::GetNumScrollSteps()
{
  Scheme_Object **p = NULL;
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxTabSnip *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_wxTabSnip_class, "get-num-scroll-steps", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxTabSnip::GetNumScrollSteps();
  } else {
  
  

  v = WITH_VAR_STACK(scheme_apply(method, 0, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(v, "get-num-scroll-steps in tab-snip%"", extracting return value"));
  }
}

void os_wxTabSnip::SetAdmin(class wxSnipAdmin* x0)
{
  Scheme_Object *p[1] INIT_NULLED_ARRAY({ NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxTabSnip *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_wxTabSnip_class, "set-admin", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxTabSnip::SetAdmin(x0);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxSnipAdmin(x0));
  

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

Bool os_wxTabSnip::Resize(nnfloat x0, nnfloat 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_wxTabSnip *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_wxTabSnip_class, "resize", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxTabSnip::Resize(x0, x1);
  } else {
  
  p[0] = WITH_VAR_STACK(scheme_make_double(x0));
  p[1] = WITH_VAR_STACK(scheme_make_double(x1));
  

  v = WITH_VAR_STACK(scheme_apply(method, 2, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_bool(v, "resize in tab-snip%"", extracting return value"));
  }
}

void os_wxTabSnip::Write(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_wxTabSnip *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_wxTabSnip_class, "write", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxTabSnip::Write(x0);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxMediaStreamOut(x0));
  

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

Bool os_wxTabSnip::Match(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_wxTabSnip *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_wxTabSnip_class, "match?", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxTabSnip::Match(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, "match? in tab-snip%"", extracting return value"));
  }
}

void os_wxTabSnip::DoEdit(int x0, Bool x1, long 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_wxTabSnip *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, 3);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxTabSnip_class, "do-edit-operation", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxTabSnip::DoEdit(x0, x1, x2);
  } else {
  
  p[0] = WITH_VAR_STACK(bundle_symset_editOp(x0));
  p[1] = (x1 ? scheme_true : scheme_false);
  p[2] = scheme_make_integer(x2);
  

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

void os_wxTabSnip::BlinkCaret(class wxDC* x0, float x1, float 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_wxTabSnip *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, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxTabSnip_class, "blink-caret", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxTabSnip::BlinkCaret(x0, x1, x2);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[2] = WITH_VAR_STACK(scheme_make_double(x2));
  

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

void os_wxTabSnip::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_wxTabSnip *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_wxTabSnip_class, "own-caret", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxTabSnip::OwnCaret(x0);
  } else {
  
  p[0] = (x0 ? scheme_true : scheme_false);
  

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

class wxCursor* os_wxTabSnip::AdjustCursor(class wxDC* x0, float x1, float x2, float x3, float x4, class wxMouseEvent* x5)
{
  Scheme_Object *p[6] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxTabSnip *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, 6);
  VAR_STACK_PUSH(5, x0);
  VAR_STACK_PUSH(6, x5);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxTabSnip_class, "adjust-cursor", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxTabSnip::AdjustCursor(x0, x1, x2, x3, x4, x5);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(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] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x5));
  

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

void os_wxTabSnip::OnChar(class wxDC* x0, float x1, float x2, float x3, float x4, class wxKeyEvent* x5)
{
  Scheme_Object *p[6] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxTabSnip *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, 6);
  VAR_STACK_PUSH(5, x0);
  VAR_STACK_PUSH(6, x5);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxTabSnip_class, "on-char", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxTabSnip::OnChar(x0, x1, x2, x3, x4, x5);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(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] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x5));
  

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

void os_wxTabSnip::OnEvent(class wxDC* x0, float x1, float x2, float x3, float x4, class wxMouseEvent* x5)
{
  Scheme_Object *p[6] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxTabSnip *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, 6);
  VAR_STACK_PUSH(5, x0);
  VAR_STACK_PUSH(6, x5);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxTabSnip_class, "on-event", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxTabSnip::OnEvent(x0, x1, x2, x3, x4, x5);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(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] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x5));
  

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

void os_wxTabSnip::SizeCacheInvalid()
{
  Scheme_Object **p = NULL;
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxTabSnip *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_wxTabSnip_class, "size-cache-invalid", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxTabSnip::SizeCacheInvalid();
  } else {
  
  

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

class wxSnip* os_wxTabSnip::Copy()
{
  Scheme_Object **p = NULL;
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxTabSnip *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_wxTabSnip_class, "copy", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxTabSnip::Copy();
  } else {
  
  

  v = WITH_VAR_STACK(scheme_apply(method, 0, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_wxSnip(v, "copy in tab-snip%"", extracting return value", 0));
  }
}

string os_wxTabSnip::GetText(nnlong x0, nnlong x1, Bool x2, long* x3)
{
  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_wxTabSnip *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, 3);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxTabSnip_class, "get-text", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxTabSnip::GetText(x0, x1, x2, x3);
  } else {
  
  p[0] = scheme_make_integer(x0);
  p[1] = scheme_make_integer(x1);
  p[2] = (x2 ? scheme_true : scheme_false);
  

  v = WITH_VAR_STACK(scheme_apply(method, 3, p));
  
  
  return (string)WITH_VAR_STACK(objscheme_unbundle_string(v, "get-text in tab-snip%"", extracting return value"));
  }
}

class wxSnip* os_wxTabSnip::MergeWith(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_wxTabSnip *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_wxTabSnip_class, "merge-with", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxTabSnip::MergeWith(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_wxSnip(v, "merge-with in tab-snip%"", extracting return value", 1));
  }
}

void os_wxTabSnip::Split(nnlong x0, class wxSnip** x1, class wxSnip** 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_wxTabSnip *sElF = this;
#endif
  static void *mcache = 0;
  Scheme_Object *sbox_tmp;

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

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxTabSnip_class, "split", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxTabSnip::Split(x0, x1, x2);
  } else {
  
  p[0] = scheme_make_integer(x0);
  p[1] = (sbox_tmp = WITH_VAR_STACK(objscheme_bundle_wxSnip((*x1))), WITH_VAR_STACK(objscheme_box(sbox_tmp)));
  p[2] = (sbox_tmp = WITH_VAR_STACK(objscheme_bundle_wxSnip((*x2))), WITH_VAR_STACK(objscheme_box(sbox_tmp)));
  

  v = WITH_VAR_STACK(scheme_apply(method, 3, p));
  
  if (x1) *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[1], "split in tab-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_wxSnip(sbox_tmp, "split in tab-snip%"", extracting return value via box"", extracting boxed argument", 0)));
  if (x2) *x2 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[2], "split in tab-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_wxSnip(sbox_tmp, "split in tab-snip%"", extracting return value via box"", extracting boxed argument", 0)));
  
  }
}

void os_wxTabSnip::Draw(class wxDC* x0, float x1, float x2, float x3, float x4, float x5, float x6, float x7, float x8, int x9)
{
  Scheme_Object *p[10] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxTabSnip *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, 10);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxTabSnip_class, "draw", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxTabSnip::Draw(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(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] = 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(scheme_make_double(x8));
  p[9] = WITH_VAR_STACK(bundle_symset_caret(x9));
  

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

float os_wxTabSnip::PartialOffset(class wxDC* x0, float x1, float x2, nnlong 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_wxTabSnip *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_wxTabSnip_class, "partial-offset", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxTabSnip::PartialOffset(x0, x1, x2, x3);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[3] = scheme_make_integer(x3);
  

  v = WITH_VAR_STACK(scheme_apply(method, 4, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_float(v, "partial-offset in tab-snip%"", extracting return value"));
  }
}

void os_wxTabSnip::GetExtent(class wxDC* x0, float x1, float x2, nnfloat* x3, nnfloat* x4, nnfloat* x5, nnfloat* x6, nnfloat* x7, nnfloat* 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_wxTabSnip *sElF = this;
#endif
  static void *mcache = 0;
  Scheme_Object *sbox_tmp;

  SETUP_VAR_STACK(12);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, 9);
  VAR_STACK_PUSH(5, x0);
  VAR_STACK_PUSH(6, x3);
  VAR_STACK_PUSH(7, x4);
  VAR_STACK_PUSH(8, x5);
  VAR_STACK_PUSH(9, x6);
  VAR_STACK_PUSH(10, x7);
  VAR_STACK_PUSH(11, x8);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxTabSnip_class, "get-extent", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxTabSnip::GetExtent(x0, x1, x2, x3, x4, x5, x6, x7, x8);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[3] = ((x3) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x3))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[4] = ((x4) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x4))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[5] = ((x5) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x5))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[6] = ((x6) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x6))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[7] = ((x7) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x7))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[8] = ((x8) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x8))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  

  v = WITH_VAR_STACK(scheme_apply(method, 9, p));
  
  if (x3) *x3 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[3], "get-extent in tab-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in tab-snip%"", extracting return value via box"", extracting boxed argument")));
  if (x4) *x4 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[4], "get-extent in tab-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in tab-snip%"", extracting return value via box"", extracting boxed argument")));
  if (x5) *x5 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[5], "get-extent in tab-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in tab-snip%"", extracting return value via box"", extracting boxed argument")));
  if (x6) *x6 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[6], "get-extent in tab-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in tab-snip%"", extracting return value via box"", extracting boxed argument")));
  if (x7) *x7 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[7], "get-extent in tab-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in tab-snip%"", extracting return value via box"", extracting boxed argument")));
  if (x8) *x8 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[8], "get-extent in tab-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in tab-snip%"", extracting return value via box"", extracting boxed argument")));
  
  }
}

static Scheme_Object *os_wxTabSnipGetScrollStepOffset(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);
  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-scroll-step-offset in tab-snip%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTabSnip::GetScrollStepOffset(x0));
  else
    r = WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->GetScrollStepOffset(x0));

  
  
  return WITH_REMEMBERED_STACK(scheme_make_double(r));
}

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

  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-scroll-step in tab-snip%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTabSnip::FindScrollStep(x0));
  else
    r = WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->FindScrollStep(x0));

  
  
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxTabSnipGetNumScrollSteps(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  nnlong 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_wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTabSnip::GetNumScrollSteps());
  else
    r = WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->GetNumScrollSteps());

  
  
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxTabSnipSetAdmin(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxSnipAdmin* 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_wxSnipAdmin(p[0], "set-admin in tab-snip%", 1));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTabSnip::SetAdmin(x0));
  else
    WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->SetAdmin(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxTabSnipResize(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);
  nnfloat x0;
  nnfloat x1;

  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], "resize in tab-snip%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(p[1], "resize in tab-snip%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTabSnip::Resize(x0, x1));
  else
    r = WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->Resize(x0, x1));

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxTabSnipWrite(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  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 in tab-snip%", 0));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTabSnip::Write(x0));
  else
    WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->Write(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxTabSnipMatch(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], "match? in tab-snip%", 0));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTabSnip::Match(x0));
  else
    r = WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->Match(x0));

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxTabSnipDoEdit(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;
  long x2;

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

  
  x0 = WITH_VAR_STACK(unbundle_symset_editOp(p[0], "do-edit-operation in tab-snip%"));
  if (n > 1) {
    x1 = WITH_VAR_STACK(objscheme_unbundle_bool(p[1], "do-edit-operation in tab-snip%"));
  } else
    x1 = TRUE;
  if (n > 2) {
    x2 = WITH_VAR_STACK(objscheme_unbundle_integer(p[2], "do-edit-operation in tab-snip%"));
  } else
    x2 = 0;

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTabSnip::DoEdit(x0, x1, x2));
  else
    WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->DoEdit(x0, x1, x2));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxTabSnipBlinkCaret(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxDC* x0 INIT_NULLED_OUT;
  float x1;
  float x2;

  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_wxDC(p[0], "blink-caret in tab-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "blink-caret in tab-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "blink-caret in tab-snip%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTabSnip::BlinkCaret(x0, x1, x2));
  else
    WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->BlinkCaret(x0, x1, x2));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxTabSnipOwnCaret(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 tab-snip%"));

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

  
  
  return scheme_void;
}

static Scheme_Object *os_wxTabSnipAdjustCursor(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 wxDC* x0 INIT_NULLED_OUT;
  float x1;
  float x2;
  float x3;
  float x4;
  class wxMouseEvent* x5 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, x5);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[0], "adjust-cursor in tab-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "adjust-cursor in tab-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "adjust-cursor in tab-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_float(p[3], "adjust-cursor in tab-snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_float(p[4], "adjust-cursor in tab-snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[5], "adjust-cursor in tab-snip%", 0));

  if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","adjust-cursor"), "bad device context: ", p[0]));
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTabSnip::AdjustCursor(x0, x1, x2, x3, x4, x5));
  else
    r = WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->AdjustCursor(x0, x1, x2, x3, x4, x5));

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxCursor(r));
}

static Scheme_Object *os_wxTabSnipOnChar(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxDC* x0 INIT_NULLED_OUT;
  float x1;
  float x2;
  float x3;
  float x4;
  class wxKeyEvent* x5 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, x5);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[0], "on-char in tab-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "on-char in tab-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "on-char in tab-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_float(p[3], "on-char in tab-snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_float(p[4], "on-char in tab-snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_wxKeyEvent(p[5], "on-char in tab-snip%", 0));

  if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","on-char"), "bad device context: ", p[0]));
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTabSnip::OnChar(x0, x1, x2, x3, x4, x5));
  else
    WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->OnChar(x0, x1, x2, x3, x4, x5));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxTabSnipOnEvent(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxDC* x0 INIT_NULLED_OUT;
  float x1;
  float x2;
  float x3;
  float x4;
  class wxMouseEvent* x5 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, x5);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[0], "on-event in tab-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "on-event in tab-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "on-event in tab-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_float(p[3], "on-event in tab-snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_float(p[4], "on-event in tab-snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[5], "on-event in tab-snip%", 0));

  if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","on-event"), "bad device context: ", p[0]));
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTabSnip::OnEvent(x0, x1, x2, x3, x4, x5));
  else
    WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->OnEvent(x0, x1, x2, x3, x4, x5));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxTabSnipSizeCacheInvalid(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_wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTabSnip::SizeCacheInvalid());
  else
    WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->SizeCacheInvalid());

  
  
  return scheme_void;
}

static Scheme_Object *os_wxTabSnipCopy(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);

  

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTabSnip::Copy());
  else
    r = WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->Copy());

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxSnip(r));
}

static Scheme_Object *os_wxTabSnipGetText(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;
  nnlong x1;
  Bool x2;
  long _x3;
  long* x3 = &_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], "get-text in tab-snip%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[1], "get-text in tab-snip%"));
  if (n > 2) {
    x2 = WITH_VAR_STACK(objscheme_unbundle_bool(p[2], "get-text in tab-snip%"));
  } else
    x2 = FALSE;

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTabSnip::GetText(x0, x1, x2, x3));
  else
    r = WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->GetText(x0, x1, x2, x3));

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

static Scheme_Object *os_wxTabSnipMergeWith(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);
  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], "merge-with in tab-snip%", 0));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTabSnip::MergeWith(x0));
  else
    r = WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->MergeWith(x0));

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxSnip(r));
}

static Scheme_Object *os_wxTabSnipSplit(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;
  class wxSnip* _x1;
  class wxSnip** x1 = &_x1;
  class wxSnip* _x2;
  class wxSnip** x2 = &_x2;
  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], "split in tab-snip%"));
      *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[1], "split in tab-snip%")), WITH_VAR_STACK(objscheme_unbundle_wxSnip(sbox_tmp, "split in tab-snip%"", extracting boxed argument", 0)));
      *x2 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[2], "split in tab-snip%")), WITH_VAR_STACK(objscheme_unbundle_wxSnip(sbox_tmp, "split in tab-snip%"", extracting boxed argument", 0)));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTabSnip::Split(x0, x1, x2));
  else
    WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->Split(x0, x1, x2));

  
  if (n > 1)
    WITH_VAR_STACK(objscheme_set_box(p[1], WITH_VAR_STACK(objscheme_bundle_wxSnip(_x1))));
  if (n > 2)
    WITH_VAR_STACK(objscheme_set_box(p[2], WITH_VAR_STACK(objscheme_bundle_wxSnip(_x2))));
  
  return scheme_void;
}

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

  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_wxDC(p[0], "draw in tab-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "draw in tab-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "draw in tab-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_float(p[3], "draw in tab-snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_float(p[4], "draw in tab-snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_float(p[5], "draw in tab-snip%"));
  x6 = WITH_VAR_STACK(objscheme_unbundle_float(p[6], "draw in tab-snip%"));
  x7 = WITH_VAR_STACK(objscheme_unbundle_float(p[7], "draw in tab-snip%"));
  x8 = WITH_VAR_STACK(objscheme_unbundle_float(p[8], "draw in tab-snip%"));
  x9 = WITH_VAR_STACK(unbundle_symset_caret(p[9], "draw in tab-snip%"));

  if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","draw"), "bad device context: ", p[0]));
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTabSnip::Draw(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9));
  else
    WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->Draw(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxTabSnipPartialOffset(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);
  class wxDC* x0 INIT_NULLED_OUT;
  float x1;
  float x2;
  nnlong x3;

  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_wxDC(p[0], "partial-offset in tab-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "partial-offset in tab-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "partial-offset in tab-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[3], "partial-offset in tab-snip%"));

  if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","partial-offset"), "bad device context: ", p[0]));
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTabSnip::PartialOffset(x0, x1, x2, x3));
  else
    r = WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->PartialOffset(x0, x1, x2, x3));

  
  
  return WITH_REMEMBERED_STACK(scheme_make_double(r));
}

static Scheme_Object *os_wxTabSnipGetExtent(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxDC* x0 INIT_NULLED_OUT;
  float x1;
  float x2;
  nnfloat _x3;
  nnfloat* x3 = &_x3;
  nnfloat _x4;
  nnfloat* x4 = &_x4;
  nnfloat _x5;
  nnfloat* x5 = &_x5;
  nnfloat _x6;
  nnfloat* x6 = &_x6;
  nnfloat _x7;
  nnfloat* x7 = &_x7;
  nnfloat _x8;
  nnfloat* x8 = &_x8;
  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_wxDC(p[0], "get-extent in tab-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "get-extent in tab-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "get-extent in tab-snip%"));
  if (n > 3) {
    if (XC_SCHEME_NULLP(p[3]))
    x3 = NULL;
  else
    *x3 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[3], "get-extent in tab-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in tab-snip%"", 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], "get-extent in tab-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in tab-snip%"", extracting boxed argument")));
  } else
    x4 = NULL;
  if (n > 5) {
    if (XC_SCHEME_NULLP(p[5]))
    x5 = NULL;
  else
    *x5 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[5], "get-extent in tab-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in tab-snip%"", extracting boxed argument")));
  } else
    x5 = NULL;
  if (n > 6) {
    if (XC_SCHEME_NULLP(p[6]))
    x6 = NULL;
  else
    *x6 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[6], "get-extent in tab-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in tab-snip%"", extracting boxed argument")));
  } else
    x6 = NULL;
  if (n > 7) {
    if (XC_SCHEME_NULLP(p[7]))
    x7 = NULL;
  else
    *x7 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[7], "get-extent in tab-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in tab-snip%"", extracting boxed argument")));
  } else
    x7 = NULL;
  if (n > 8) {
    if (XC_SCHEME_NULLP(p[8]))
    x8 = NULL;
  else
    *x8 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[8], "get-extent in tab-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in tab-snip%"", extracting boxed argument")));
  } else
    x8 = NULL;

  if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","get-extent"), "bad device context: ", p[0]));
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->wxTabSnip::GetExtent(x0, x1, x2, x3, x4, x5, x6, x7, x8));
  else
    WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)obj)->primdata)->GetExtent(x0, x1, x2, x3, x4, x5, x6, x7, x8));

  
  if (n > 3 && !XC_SCHEME_NULLP(p[3]))
    WITH_VAR_STACK(objscheme_set_box(p[3], WITH_VAR_STACK(scheme_make_double(_x3))));
  if (n > 4 && !XC_SCHEME_NULLP(p[4]))
    WITH_VAR_STACK(objscheme_set_box(p[4], WITH_VAR_STACK(scheme_make_double(_x4))));
  if (n > 5 && !XC_SCHEME_NULLP(p[5]))
    WITH_VAR_STACK(objscheme_set_box(p[5], WITH_VAR_STACK(scheme_make_double(_x5))));
  if (n > 6 && !XC_SCHEME_NULLP(p[6]))
    WITH_VAR_STACK(objscheme_set_box(p[6], WITH_VAR_STACK(scheme_make_double(_x6))));
  if (n > 7 && !XC_SCHEME_NULLP(p[7]))
    WITH_VAR_STACK(objscheme_set_box(p[7], WITH_VAR_STACK(scheme_make_double(_x7))));
  if (n > 8 && !XC_SCHEME_NULLP(p[8]))
    WITH_VAR_STACK(objscheme_set_box(p[8], WITH_VAR_STACK(scheme_make_double(_x8))));
  
  return scheme_void;
}

static Scheme_Object *os_wxTabSnip_ConstructScheme(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  SETUP_PRE_VAR_STACK(1);
  PRE_VAR_STACK_PUSH(0, obj);
  os_wxTabSnip *realobj INIT_NULLED_OUT;
  REMEMBER_VAR_STACK();

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

  
  if (n != 0) 
    WITH_VAR_STACK(scheme_wrong_count("initialization in tab-snip%", 0, 0, n, p));

  
  realobj = WITH_VAR_STACK(new os_wxTabSnip CONSTRUCTOR_ARGS(()));
#ifdef MZ_PRECISE_GC
  WITH_VAR_STACK(realobj->gcInit_wxTabSnip());
#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_wxTabSnip(void *env)
{
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, env);

  wxREGGLOB(os_wxTabSnip_class);

  os_wxTabSnip_class = WITH_VAR_STACK(objscheme_def_prim_class(env, "tab-snip%", "string-snip%", os_wxTabSnip_ConstructScheme, 21));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "get-scroll-step-offset", os_wxTabSnipGetScrollStepOffset, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "find-scroll-step", os_wxTabSnipFindScrollStep, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "get-num-scroll-steps", os_wxTabSnipGetNumScrollSteps, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "set-admin", os_wxTabSnipSetAdmin, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "resize", os_wxTabSnipResize, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "write", os_wxTabSnipWrite, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "match?", os_wxTabSnipMatch, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "do-edit-operation", os_wxTabSnipDoEdit, 1, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "blink-caret", os_wxTabSnipBlinkCaret, 3, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "own-caret", os_wxTabSnipOwnCaret, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "adjust-cursor", os_wxTabSnipAdjustCursor, 6, 6));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "on-char", os_wxTabSnipOnChar, 6, 6));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "on-event", os_wxTabSnipOnEvent, 6, 6));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "size-cache-invalid", os_wxTabSnipSizeCacheInvalid, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "copy", os_wxTabSnipCopy, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "get-text", os_wxTabSnipGetText, 2, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "merge-with", os_wxTabSnipMergeWith, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "split", os_wxTabSnipSplit, 3, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "draw", os_wxTabSnipDraw, 10, 10));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "partial-offset", os_wxTabSnipPartialOffset, 4, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "get-extent", os_wxTabSnipGetExtent, 3, 9));


  WITH_VAR_STACK(scheme_made_class(os_wxTabSnip_class));

  WITH_VAR_STACK(objscheme_install_bundler((Objscheme_Bundler)objscheme_bundle_wxTabSnip, wxTYPE_TAB_SNIP));

}

int objscheme_istype_wxTabSnip(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_wxTabSnip_class))
    return 1;
  else {
    if (!stop)
       return 0;
    WITH_REMEMBERED_STACK(scheme_wrong_type(stop, nullOK ? "tab-snip% object or " XC_NULL_STR: "tab-snip% object", -1, 0, &obj));
    return 0;
  }
}

Scheme_Object *objscheme_bundle_wxTabSnip(class wxTabSnip *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_TAB_SNIP) && (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_wxTabSnip_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 wxTabSnip *objscheme_unbundle_wxTabSnip(Scheme_Object *obj, const char *where, int nullOK)
{
  if (nullOK && XC_SCHEME_NULLP(obj)) return NULL;

  REMEMBER_VAR_STACK();

  (void)objscheme_istype_wxTabSnip(obj, where, nullOK);
  Scheme_Class_Object *o = (Scheme_Class_Object *)obj;
  WITH_REMEMBERED_STACK(objscheme_check_valid(obj));
  if (o->primflag)
    return (os_wxTabSnip *)o->primdata;
  else
    return (wxTabSnip *)o->primdata;
}



#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;
  }
}





// This isn't `pathname' because it expands internally











// This isn't `pathname' because it expands internally




class os_wxImageSnip : public wxImageSnip {
 public:

  os_wxImageSnip CONSTRUCTOR_ARGS((nstring x0 = NULL, int x1 = 0, Bool x2 = FALSE, Bool x3 = TRUE));
#ifndef MZ_PRECISE_GC
  os_wxImageSnip CONSTRUCTOR_ARGS((class wxBitmap* x0));
#endif
  ~os_wxImageSnip();
  nnfloat GetScrollStepOffset(nnlong x0);
  nnlong FindScrollStep(float x0);
  nnlong GetNumScrollSteps();
  void SetAdmin(class wxSnipAdmin* x0);
  Bool Resize(nnfloat x0, nnfloat x1);
  void Write(class wxMediaStreamOut* x0);
  Bool Match(class wxSnip* x0);
  void DoEdit(int x0, Bool x1 = TRUE, long x2 = 0);
  void BlinkCaret(class wxDC* x0, float x1, float x2);
  void OwnCaret(Bool x0);
  class wxCursor* AdjustCursor(class wxDC* x0, float x1, float x2, float x3, float x4, class wxMouseEvent* x5);
  void OnChar(class wxDC* x0, float x1, float x2, float x3, float x4, class wxKeyEvent* x5);
  void OnEvent(class wxDC* x0, float x1, float x2, float x3, float x4, class wxMouseEvent* x5);
  void SizeCacheInvalid();
  class wxSnip* Copy();
  string GetText(nnlong x0, nnlong x1, Bool x2 = FALSE, long* x3 = NULL);
  class wxSnip* MergeWith(class wxSnip* x0);
  void Split(nnlong x0, class wxSnip** x1, class wxSnip** x2);
  void Draw(class wxDC* x0, float x1, float x2, float x3, float x4, float x5, float x6, float x7, float x8, int x9);
  float PartialOffset(class wxDC* x0, float x1, float x2, nnlong x3);
  void GetExtent(class wxDC* x0, float x1, float x2, nnfloat* x3 = NULL, nnfloat* x4 = NULL, nnfloat* x5 = NULL, nnfloat* x6 = NULL, nnfloat* x7 = NULL, nnfloat* x8 = NULL);
#ifdef MZ_PRECISE_GC
  void gcMark();
  void gcFixup();
#endif
};

#ifdef MZ_PRECISE_GC
void os_wxImageSnip::gcMark() {
  wxImageSnip::gcMark();
}
void os_wxImageSnip::gcFixup() {
  wxImageSnip::gcFixup();
}
#endif

static Scheme_Object *os_wxImageSnip_class;

os_wxImageSnip::os_wxImageSnip CONSTRUCTOR_ARGS((nstring x0, int x1, Bool x2, Bool x3))
CONSTRUCTOR_INIT(: wxImageSnip(x0, x1, x2, x3))
{
}

#ifndef MZ_PRECISE_GC
os_wxImageSnip::os_wxImageSnip CONSTRUCTOR_ARGS((class wxBitmap* x0))
CONSTRUCTOR_INIT(: wxImageSnip(x0))
{
}
#endif

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

nnfloat os_wxImageSnip::GetScrollStepOffset(nnlong x0)
{
  Scheme_Object *p[1] INIT_NULLED_ARRAY({ NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxImageSnip *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_wxImageSnip_class, "get-scroll-step-offset", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxImageSnip::GetScrollStepOffset(x0);
  } else {
  
  p[0] = scheme_make_integer(x0);
  

  v = WITH_VAR_STACK(scheme_apply(method, 1, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(v, "get-scroll-step-offset in image-snip%"", extracting return value"));
  }
}

nnlong os_wxImageSnip::FindScrollStep(float x0)
{
  Scheme_Object *p[1] INIT_NULLED_ARRAY({ NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxImageSnip *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_wxImageSnip_class, "find-scroll-step", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxImageSnip::FindScrollStep(x0);
  } else {
  
  p[0] = WITH_VAR_STACK(scheme_make_double(x0));
  

  v = WITH_VAR_STACK(scheme_apply(method, 1, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(v, "find-scroll-step in image-snip%"", extracting return value"));
  }
}

nnlong os_wxImageSnip::GetNumScrollSteps()
{
  Scheme_Object **p = NULL;
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxImageSnip *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_wxImageSnip_class, "get-num-scroll-steps", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxImageSnip::GetNumScrollSteps();
  } else {
  
  

  v = WITH_VAR_STACK(scheme_apply(method, 0, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(v, "get-num-scroll-steps in image-snip%"", extracting return value"));
  }
}

void os_wxImageSnip::SetAdmin(class wxSnipAdmin* x0)
{
  Scheme_Object *p[1] INIT_NULLED_ARRAY({ NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxImageSnip *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_wxImageSnip_class, "set-admin", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxImageSnip::SetAdmin(x0);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxSnipAdmin(x0));
  

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

Bool os_wxImageSnip::Resize(nnfloat x0, nnfloat 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_wxImageSnip *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_wxImageSnip_class, "resize", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxImageSnip::Resize(x0, x1);
  } else {
  
  p[0] = WITH_VAR_STACK(scheme_make_double(x0));
  p[1] = WITH_VAR_STACK(scheme_make_double(x1));
  

  v = WITH_VAR_STACK(scheme_apply(method, 2, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_bool(v, "resize in image-snip%"", extracting return value"));
  }
}

void os_wxImageSnip::Write(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_wxImageSnip *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_wxImageSnip_class, "write", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxImageSnip::Write(x0);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxMediaStreamOut(x0));
  

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

Bool os_wxImageSnip::Match(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_wxImageSnip *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_wxImageSnip_class, "match?", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxImageSnip::Match(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, "match? in image-snip%"", extracting return value"));
  }
}

void os_wxImageSnip::DoEdit(int x0, Bool x1, long 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_wxImageSnip *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, 3);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxImageSnip_class, "do-edit-operation", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxImageSnip::DoEdit(x0, x1, x2);
  } else {
  
  p[0] = WITH_VAR_STACK(bundle_symset_editOp(x0));
  p[1] = (x1 ? scheme_true : scheme_false);
  p[2] = scheme_make_integer(x2);
  

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

void os_wxImageSnip::BlinkCaret(class wxDC* x0, float x1, float 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_wxImageSnip *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, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxImageSnip_class, "blink-caret", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxImageSnip::BlinkCaret(x0, x1, x2);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[2] = WITH_VAR_STACK(scheme_make_double(x2));
  

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

void os_wxImageSnip::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_wxImageSnip *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_wxImageSnip_class, "own-caret", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxImageSnip::OwnCaret(x0);
  } else {
  
  p[0] = (x0 ? scheme_true : scheme_false);
  

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

class wxCursor* os_wxImageSnip::AdjustCursor(class wxDC* x0, float x1, float x2, float x3, float x4, class wxMouseEvent* x5)
{
  Scheme_Object *p[6] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxImageSnip *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, 6);
  VAR_STACK_PUSH(5, x0);
  VAR_STACK_PUSH(6, x5);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxImageSnip_class, "adjust-cursor", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxImageSnip::AdjustCursor(x0, x1, x2, x3, x4, x5);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(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] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x5));
  

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

void os_wxImageSnip::OnChar(class wxDC* x0, float x1, float x2, float x3, float x4, class wxKeyEvent* x5)
{
  Scheme_Object *p[6] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxImageSnip *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, 6);
  VAR_STACK_PUSH(5, x0);
  VAR_STACK_PUSH(6, x5);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxImageSnip_class, "on-char", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxImageSnip::OnChar(x0, x1, x2, x3, x4, x5);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(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] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x5));
  

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

void os_wxImageSnip::OnEvent(class wxDC* x0, float x1, float x2, float x3, float x4, class wxMouseEvent* x5)
{
  Scheme_Object *p[6] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxImageSnip *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, 6);
  VAR_STACK_PUSH(5, x0);
  VAR_STACK_PUSH(6, x5);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxImageSnip_class, "on-event", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxImageSnip::OnEvent(x0, x1, x2, x3, x4, x5);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(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] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x5));
  

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

void os_wxImageSnip::SizeCacheInvalid()
{
  Scheme_Object **p = NULL;
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxImageSnip *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_wxImageSnip_class, "size-cache-invalid", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxImageSnip::SizeCacheInvalid();
  } else {
  
  

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

class wxSnip* os_wxImageSnip::Copy()
{
  Scheme_Object **p = NULL;
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxImageSnip *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_wxImageSnip_class, "copy", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxImageSnip::Copy();
  } else {
  
  

  v = WITH_VAR_STACK(scheme_apply(method, 0, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_wxSnip(v, "copy in image-snip%"", extracting return value", 0));
  }
}

string os_wxImageSnip::GetText(nnlong x0, nnlong x1, Bool x2, long* x3)
{
  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_wxImageSnip *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, 3);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxImageSnip_class, "get-text", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxImageSnip::GetText(x0, x1, x2, x3);
  } else {
  
  p[0] = scheme_make_integer(x0);
  p[1] = scheme_make_integer(x1);
  p[2] = (x2 ? scheme_true : scheme_false);
  

  v = WITH_VAR_STACK(scheme_apply(method, 3, p));
  
  
  return (string)WITH_VAR_STACK(objscheme_unbundle_string(v, "get-text in image-snip%"", extracting return value"));
  }
}

class wxSnip* os_wxImageSnip::MergeWith(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_wxImageSnip *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_wxImageSnip_class, "merge-with", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxImageSnip::MergeWith(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_wxSnip(v, "merge-with in image-snip%"", extracting return value", 1));
  }
}

void os_wxImageSnip::Split(nnlong x0, class wxSnip** x1, class wxSnip** 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_wxImageSnip *sElF = this;
#endif
  static void *mcache = 0;
  Scheme_Object *sbox_tmp;

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

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxImageSnip_class, "split", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxImageSnip::Split(x0, x1, x2);
  } else {
  
  p[0] = scheme_make_integer(x0);
  p[1] = (sbox_tmp = WITH_VAR_STACK(objscheme_bundle_wxSnip((*x1))), WITH_VAR_STACK(objscheme_box(sbox_tmp)));
  p[2] = (sbox_tmp = WITH_VAR_STACK(objscheme_bundle_wxSnip((*x2))), WITH_VAR_STACK(objscheme_box(sbox_tmp)));
  

  v = WITH_VAR_STACK(scheme_apply(method, 3, p));
  
  if (x1) *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[1], "split in image-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_wxSnip(sbox_tmp, "split in image-snip%"", extracting return value via box"", extracting boxed argument", 0)));
  if (x2) *x2 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[2], "split in image-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_wxSnip(sbox_tmp, "split in image-snip%"", extracting return value via box"", extracting boxed argument", 0)));
  
  }
}

void os_wxImageSnip::Draw(class wxDC* x0, float x1, float x2, float x3, float x4, float x5, float x6, float x7, float x8, int x9)
{
  Scheme_Object *p[10] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxImageSnip *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, 10);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxImageSnip_class, "draw", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxImageSnip::Draw(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(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] = 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(scheme_make_double(x8));
  p[9] = WITH_VAR_STACK(bundle_symset_caret(x9));
  

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

float os_wxImageSnip::PartialOffset(class wxDC* x0, float x1, float x2, nnlong 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_wxImageSnip *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_wxImageSnip_class, "partial-offset", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxImageSnip::PartialOffset(x0, x1, x2, x3);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[3] = scheme_make_integer(x3);
  

  v = WITH_VAR_STACK(scheme_apply(method, 4, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_float(v, "partial-offset in image-snip%"", extracting return value"));
  }
}

void os_wxImageSnip::GetExtent(class wxDC* x0, float x1, float x2, nnfloat* x3, nnfloat* x4, nnfloat* x5, nnfloat* x6, nnfloat* x7, nnfloat* 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_wxImageSnip *sElF = this;
#endif
  static void *mcache = 0;
  Scheme_Object *sbox_tmp;

  SETUP_VAR_STACK(12);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, 9);
  VAR_STACK_PUSH(5, x0);
  VAR_STACK_PUSH(6, x3);
  VAR_STACK_PUSH(7, x4);
  VAR_STACK_PUSH(8, x5);
  VAR_STACK_PUSH(9, x6);
  VAR_STACK_PUSH(10, x7);
  VAR_STACK_PUSH(11, x8);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxImageSnip_class, "get-extent", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxImageSnip::GetExtent(x0, x1, x2, x3, x4, x5, x6, x7, x8);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[3] = ((x3) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x3))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[4] = ((x4) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x4))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[5] = ((x5) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x5))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[6] = ((x6) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x6))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[7] = ((x7) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x7))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[8] = ((x8) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x8))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  

  v = WITH_VAR_STACK(scheme_apply(method, 9, p));
  
  if (x3) *x3 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[3], "get-extent in image-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in image-snip%"", extracting return value via box"", extracting boxed argument")));
  if (x4) *x4 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[4], "get-extent in image-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in image-snip%"", extracting return value via box"", extracting boxed argument")));
  if (x5) *x5 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[5], "get-extent in image-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in image-snip%"", extracting return value via box"", extracting boxed argument")));
  if (x6) *x6 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[6], "get-extent in image-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in image-snip%"", extracting return value via box"", extracting boxed argument")));
  if (x7) *x7 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[7], "get-extent in image-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in image-snip%"", extracting return value via box"", extracting boxed argument")));
  if (x8) *x8 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[8], "get-extent in image-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in image-snip%"", extracting return value via box"", extracting boxed argument")));
  
  }
}

static Scheme_Object *os_wxImageSnipSetOffset(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;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_float(p[0], "set-offset in image-snip%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "set-offset in image-snip%"));

  
  WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->SetOffset(x0, x1));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxImageSnipSetBitmap(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  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-bitmap in image-snip%", 0));

  { if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("image-snip%","set-bitmap"), "bad bitmap: ", p[0])); if (x0 && BM_SELECTED(x0)) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("image-snip%","set-bitmap"), "bitmap is currently installed into a bitmap-dc%: ", p[0])); }
  WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->SetBitmap(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxImageSnipGetFiletype(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(((wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->GetFiletype());

  
  
  return WITH_REMEMBERED_STACK(bundle_symset_bitmapType(r));
}

static Scheme_Object *os_wxImageSnipGetFilename(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  nstring r INIT_NULLED_OUT;
  objscheme_check_valid(obj);
  Bool _x0;
  Bool* x0 = &_x0;
  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-filename in image-snip%")), WITH_VAR_STACK(objscheme_unbundle_bool(sbox_tmp, "get-filename in image-snip%"", extracting boxed argument")));
  } else
    x0 = NULL;

  
  r = WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->GetFilename(x0));

  
  if (n > 0 && !XC_SCHEME_NULLP(p[0]))
    WITH_VAR_STACK(objscheme_set_box(p[0], (_x0 ? scheme_true : scheme_false)));
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_string((char *)r));
}

static Scheme_Object *os_wxImageSnipLoadFile(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;
  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], "load-file in image-snip%"));
  if (n > 1) {
    x1 = WITH_VAR_STACK(unbundle_symset_bitmapType(p[1], "load-file in image-snip%"));
  } else
    x1 = 0;
  if (n > 2) {
    x2 = WITH_VAR_STACK(objscheme_unbundle_bool(p[2], "load-file in image-snip%"));
  } else
    x2 = FALSE;
  if (n > 3) {
    x3 = WITH_VAR_STACK(objscheme_unbundle_bool(p[3], "load-file in image-snip%"));
  } else
    x3 = TRUE;

  
  WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->LoadFile(x0, x1, x2, x3));

  if (x0) WITH_VAR_STACK(scheme_process_block(0.0));
  
  return scheme_void;
}

static Scheme_Object *os_wxImageSnipGetScrollStepOffset(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);
  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-scroll-step-offset in image-snip%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->wxImageSnip::GetScrollStepOffset(x0));
  else
    r = WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->GetScrollStepOffset(x0));

  
  
  return WITH_REMEMBERED_STACK(scheme_make_double(r));
}

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

  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-scroll-step in image-snip%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->wxImageSnip::FindScrollStep(x0));
  else
    r = WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->FindScrollStep(x0));

  
  
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxImageSnipGetNumScrollSteps(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  nnlong 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_wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->wxImageSnip::GetNumScrollSteps());
  else
    r = WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->GetNumScrollSteps());

  
  
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxImageSnipSetAdmin(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxSnipAdmin* 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_wxSnipAdmin(p[0], "set-admin in image-snip%", 1));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->wxImageSnip::SetAdmin(x0));
  else
    WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->SetAdmin(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxImageSnipResize(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);
  nnfloat x0;
  nnfloat x1;

  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], "resize in image-snip%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(p[1], "resize in image-snip%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->wxImageSnip::Resize(x0, x1));
  else
    r = WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->Resize(x0, x1));

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxImageSnipWrite(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  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 in image-snip%", 0));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->wxImageSnip::Write(x0));
  else
    WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->Write(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxImageSnipMatch(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], "match? in image-snip%", 0));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->wxImageSnip::Match(x0));
  else
    r = WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->Match(x0));

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxImageSnipDoEdit(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;
  long x2;

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

  
  x0 = WITH_VAR_STACK(unbundle_symset_editOp(p[0], "do-edit-operation in image-snip%"));
  if (n > 1) {
    x1 = WITH_VAR_STACK(objscheme_unbundle_bool(p[1], "do-edit-operation in image-snip%"));
  } else
    x1 = TRUE;
  if (n > 2) {
    x2 = WITH_VAR_STACK(objscheme_unbundle_integer(p[2], "do-edit-operation in image-snip%"));
  } else
    x2 = 0;

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->wxImageSnip::DoEdit(x0, x1, x2));
  else
    WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->DoEdit(x0, x1, x2));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxImageSnipBlinkCaret(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxDC* x0 INIT_NULLED_OUT;
  float x1;
  float x2;

  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_wxDC(p[0], "blink-caret in image-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "blink-caret in image-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "blink-caret in image-snip%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->wxImageSnip::BlinkCaret(x0, x1, x2));
  else
    WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->BlinkCaret(x0, x1, x2));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxImageSnipOwnCaret(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 image-snip%"));

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

  
  
  return scheme_void;
}

static Scheme_Object *os_wxImageSnipAdjustCursor(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 wxDC* x0 INIT_NULLED_OUT;
  float x1;
  float x2;
  float x3;
  float x4;
  class wxMouseEvent* x5 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, x5);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[0], "adjust-cursor in image-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "adjust-cursor in image-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "adjust-cursor in image-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_float(p[3], "adjust-cursor in image-snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_float(p[4], "adjust-cursor in image-snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[5], "adjust-cursor in image-snip%", 0));

  if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","adjust-cursor"), "bad device context: ", p[0]));
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->wxImageSnip::AdjustCursor(x0, x1, x2, x3, x4, x5));
  else
    r = WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->AdjustCursor(x0, x1, x2, x3, x4, x5));

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxCursor(r));
}

static Scheme_Object *os_wxImageSnipOnChar(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxDC* x0 INIT_NULLED_OUT;
  float x1;
  float x2;
  float x3;
  float x4;
  class wxKeyEvent* x5 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, x5);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[0], "on-char in image-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "on-char in image-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "on-char in image-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_float(p[3], "on-char in image-snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_float(p[4], "on-char in image-snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_wxKeyEvent(p[5], "on-char in image-snip%", 0));

  if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","on-char"), "bad device context: ", p[0]));
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->wxImageSnip::OnChar(x0, x1, x2, x3, x4, x5));
  else
    WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->OnChar(x0, x1, x2, x3, x4, x5));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxImageSnipOnEvent(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxDC* x0 INIT_NULLED_OUT;
  float x1;
  float x2;
  float x3;
  float x4;
  class wxMouseEvent* x5 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, x5);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[0], "on-event in image-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "on-event in image-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "on-event in image-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_float(p[3], "on-event in image-snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_float(p[4], "on-event in image-snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[5], "on-event in image-snip%", 0));

  if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","on-event"), "bad device context: ", p[0]));
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->wxImageSnip::OnEvent(x0, x1, x2, x3, x4, x5));
  else
    WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->OnEvent(x0, x1, x2, x3, x4, x5));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxImageSnipSizeCacheInvalid(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_wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->wxImageSnip::SizeCacheInvalid());
  else
    WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->SizeCacheInvalid());

  
  
  return scheme_void;
}

static Scheme_Object *os_wxImageSnipCopy(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);

  

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->wxImageSnip::Copy());
  else
    r = WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->Copy());

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxSnip(r));
}

static Scheme_Object *os_wxImageSnipGetText(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;
  nnlong x1;
  Bool x2;
  long _x3;
  long* x3 = &_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], "get-text in image-snip%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[1], "get-text in image-snip%"));
  if (n > 2) {
    x2 = WITH_VAR_STACK(objscheme_unbundle_bool(p[2], "get-text in image-snip%"));
  } else
    x2 = FALSE;

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->wxImageSnip::GetText(x0, x1, x2, x3));
  else
    r = WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->GetText(x0, x1, x2, x3));

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

static Scheme_Object *os_wxImageSnipMergeWith(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);
  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], "merge-with in image-snip%", 0));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->wxImageSnip::MergeWith(x0));
  else
    r = WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->MergeWith(x0));

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxSnip(r));
}

static Scheme_Object *os_wxImageSnipSplit(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;
  class wxSnip* _x1;
  class wxSnip** x1 = &_x1;
  class wxSnip* _x2;
  class wxSnip** x2 = &_x2;
  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], "split in image-snip%"));
      *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[1], "split in image-snip%")), WITH_VAR_STACK(objscheme_unbundle_wxSnip(sbox_tmp, "split in image-snip%"", extracting boxed argument", 0)));
      *x2 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[2], "split in image-snip%")), WITH_VAR_STACK(objscheme_unbundle_wxSnip(sbox_tmp, "split in image-snip%"", extracting boxed argument", 0)));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->wxImageSnip::Split(x0, x1, x2));
  else
    WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->Split(x0, x1, x2));

  
  if (n > 1)
    WITH_VAR_STACK(objscheme_set_box(p[1], WITH_VAR_STACK(objscheme_bundle_wxSnip(_x1))));
  if (n > 2)
    WITH_VAR_STACK(objscheme_set_box(p[2], WITH_VAR_STACK(objscheme_bundle_wxSnip(_x2))));
  
  return scheme_void;
}

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

  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_wxDC(p[0], "draw in image-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "draw in image-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "draw in image-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_float(p[3], "draw in image-snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_float(p[4], "draw in image-snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_float(p[5], "draw in image-snip%"));
  x6 = WITH_VAR_STACK(objscheme_unbundle_float(p[6], "draw in image-snip%"));
  x7 = WITH_VAR_STACK(objscheme_unbundle_float(p[7], "draw in image-snip%"));
  x8 = WITH_VAR_STACK(objscheme_unbundle_float(p[8], "draw in image-snip%"));
  x9 = WITH_VAR_STACK(unbundle_symset_caret(p[9], "draw in image-snip%"));

  if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","draw"), "bad device context: ", p[0]));
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->wxImageSnip::Draw(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9));
  else
    WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->Draw(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxImageSnipPartialOffset(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);
  class wxDC* x0 INIT_NULLED_OUT;
  float x1;
  float x2;
  nnlong x3;

  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_wxDC(p[0], "partial-offset in image-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "partial-offset in image-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "partial-offset in image-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[3], "partial-offset in image-snip%"));

  if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","partial-offset"), "bad device context: ", p[0]));
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->wxImageSnip::PartialOffset(x0, x1, x2, x3));
  else
    r = WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->PartialOffset(x0, x1, x2, x3));

  
  
  return WITH_REMEMBERED_STACK(scheme_make_double(r));
}

static Scheme_Object *os_wxImageSnipGetExtent(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxDC* x0 INIT_NULLED_OUT;
  float x1;
  float x2;
  nnfloat _x3;
  nnfloat* x3 = &_x3;
  nnfloat _x4;
  nnfloat* x4 = &_x4;
  nnfloat _x5;
  nnfloat* x5 = &_x5;
  nnfloat _x6;
  nnfloat* x6 = &_x6;
  nnfloat _x7;
  nnfloat* x7 = &_x7;
  nnfloat _x8;
  nnfloat* x8 = &_x8;
  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_wxDC(p[0], "get-extent in image-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "get-extent in image-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "get-extent in image-snip%"));
  if (n > 3) {
    if (XC_SCHEME_NULLP(p[3]))
    x3 = NULL;
  else
    *x3 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[3], "get-extent in image-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in image-snip%"", 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], "get-extent in image-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in image-snip%"", extracting boxed argument")));
  } else
    x4 = NULL;
  if (n > 5) {
    if (XC_SCHEME_NULLP(p[5]))
    x5 = NULL;
  else
    *x5 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[5], "get-extent in image-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in image-snip%"", extracting boxed argument")));
  } else
    x5 = NULL;
  if (n > 6) {
    if (XC_SCHEME_NULLP(p[6]))
    x6 = NULL;
  else
    *x6 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[6], "get-extent in image-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in image-snip%"", extracting boxed argument")));
  } else
    x6 = NULL;
  if (n > 7) {
    if (XC_SCHEME_NULLP(p[7]))
    x7 = NULL;
  else
    *x7 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[7], "get-extent in image-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in image-snip%"", extracting boxed argument")));
  } else
    x7 = NULL;
  if (n > 8) {
    if (XC_SCHEME_NULLP(p[8]))
    x8 = NULL;
  else
    *x8 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[8], "get-extent in image-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in image-snip%"", extracting boxed argument")));
  } else
    x8 = NULL;

  if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","get-extent"), "bad device context: ", p[0]));
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->wxImageSnip::GetExtent(x0, x1, x2, x3, x4, x5, x6, x7, x8));
  else
    WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)obj)->primdata)->GetExtent(x0, x1, x2, x3, x4, x5, x6, x7, x8));

  
  if (n > 3 && !XC_SCHEME_NULLP(p[3]))
    WITH_VAR_STACK(objscheme_set_box(p[3], WITH_VAR_STACK(scheme_make_double(_x3))));
  if (n > 4 && !XC_SCHEME_NULLP(p[4]))
    WITH_VAR_STACK(objscheme_set_box(p[4], WITH_VAR_STACK(scheme_make_double(_x4))));
  if (n > 5 && !XC_SCHEME_NULLP(p[5]))
    WITH_VAR_STACK(objscheme_set_box(p[5], WITH_VAR_STACK(scheme_make_double(_x5))));
  if (n > 6 && !XC_SCHEME_NULLP(p[6]))
    WITH_VAR_STACK(objscheme_set_box(p[6], WITH_VAR_STACK(scheme_make_double(_x6))));
  if (n > 7 && !XC_SCHEME_NULLP(p[7]))
    WITH_VAR_STACK(objscheme_set_box(p[7], WITH_VAR_STACK(scheme_make_double(_x7))));
  if (n > 8 && !XC_SCHEME_NULLP(p[8]))
    WITH_VAR_STACK(objscheme_set_box(p[8], WITH_VAR_STACK(scheme_make_double(_x8))));
  
  return scheme_void;
}

static Scheme_Object *os_wxImageSnip_ConstructScheme(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  SETUP_PRE_VAR_STACK(2);
  PRE_VAR_STACK_PUSH(0, obj);
  PRE_VAR_STACK_PUSH(1, p);
  os_wxImageSnip *realobj INIT_NULLED_OUT;
  REMEMBER_VAR_STACK();
  if ((n >= 1) && WITH_REMEMBERED_STACK(objscheme_istype_wxBitmap(p[0], NULL, 0))) {
    class wxBitmap* x0 INIT_NULLED_OUT;

    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, x0);

    
    if (n != 1) 
      WITH_VAR_STACK(scheme_wrong_count("initialization in image-snip% (bitmap case)", 1, 1, n, p));
    x0 = WITH_VAR_STACK(objscheme_unbundle_wxBitmap(p[0], "initialization in image-snip% (bitmap case)", 0));

    { if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("image-snip%","initialization"), "bad bitmap: ", p[0])); if (x0 && BM_SELECTED(x0)) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("image-snip%","initialization"), "bitmap is currently installed into a bitmap-dc%: ", p[0])); }
    realobj = WITH_VAR_STACK(new os_wxImageSnip CONSTRUCTOR_ARGS((x0)));
#ifdef MZ_PRECISE_GC
    WITH_VAR_STACK(realobj->gcInit_wxImageSnip(x0));
#endif
    realobj->__gc_external = (void *)obj;
    objscheme_note_creation(obj);
    
    
  } else  {
    nstring x0 INIT_NULLED_OUT;
    int x1;
    Bool x2;
    Bool x3;

    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, x0);

    
    if ((n > 4)) 
      WITH_VAR_STACK(scheme_wrong_count("initialization in image-snip% (filename case)", 0, 4, n, p));
    if (n > 0) {
      x0 = (nstring)WITH_VAR_STACK(objscheme_unbundle_nullable_string(p[0], "initialization in image-snip% (filename case)"));
    } else
      x0 = NULL;
    if (n > 1) {
      x1 = WITH_VAR_STACK(unbundle_symset_bitmapType(p[1], "initialization in image-snip% (filename case)"));
    } else
      x1 = 0;
    if (n > 2) {
      x2 = WITH_VAR_STACK(objscheme_unbundle_bool(p[2], "initialization in image-snip% (filename case)"));
    } else
      x2 = FALSE;
    if (n > 3) {
      x3 = WITH_VAR_STACK(objscheme_unbundle_bool(p[3], "initialization in image-snip% (filename case)"));
    } else
      x3 = TRUE;

    
    realobj = WITH_VAR_STACK(new os_wxImageSnip CONSTRUCTOR_ARGS((x0, x1, x2, x3)));
#ifdef MZ_PRECISE_GC
    WITH_VAR_STACK(realobj->gcInit_wxImageSnip(x0, x1, x2, x3));
#endif
    realobj->__gc_external = (void *)obj;
    objscheme_note_creation(obj);
    if (x0) WITH_VAR_STACK(scheme_process_block(0.0));
    
  }

  ((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_wxImageSnip(void *env)
{
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, env);

  wxREGGLOB(os_wxImageSnip_class);

  os_wxImageSnip_class = WITH_VAR_STACK(objscheme_def_prim_class(env, "image-snip%", "snip%", os_wxImageSnip_ConstructScheme, 26));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "set-offset", os_wxImageSnipSetOffset, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "set-bitmap", os_wxImageSnipSetBitmap, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "get-filetype", os_wxImageSnipGetFiletype, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "get-filename", os_wxImageSnipGetFilename, 0, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "load-file", os_wxImageSnipLoadFile, 1, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "get-scroll-step-offset", os_wxImageSnipGetScrollStepOffset, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "find-scroll-step", os_wxImageSnipFindScrollStep, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "get-num-scroll-steps", os_wxImageSnipGetNumScrollSteps, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "set-admin", os_wxImageSnipSetAdmin, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "resize", os_wxImageSnipResize, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "write", os_wxImageSnipWrite, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "match?", os_wxImageSnipMatch, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "do-edit-operation", os_wxImageSnipDoEdit, 1, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "blink-caret", os_wxImageSnipBlinkCaret, 3, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "own-caret", os_wxImageSnipOwnCaret, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "adjust-cursor", os_wxImageSnipAdjustCursor, 6, 6));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "on-char", os_wxImageSnipOnChar, 6, 6));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "on-event", os_wxImageSnipOnEvent, 6, 6));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "size-cache-invalid", os_wxImageSnipSizeCacheInvalid, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "copy", os_wxImageSnipCopy, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "get-text", os_wxImageSnipGetText, 2, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "merge-with", os_wxImageSnipMergeWith, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "split", os_wxImageSnipSplit, 3, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "draw", os_wxImageSnipDraw, 10, 10));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "partial-offset", os_wxImageSnipPartialOffset, 4, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "get-extent", os_wxImageSnipGetExtent, 3, 9));


  WITH_VAR_STACK(scheme_made_class(os_wxImageSnip_class));

  WITH_VAR_STACK(objscheme_install_bundler((Objscheme_Bundler)objscheme_bundle_wxImageSnip, wxTYPE_IMAGE_SNIP));

}

int objscheme_istype_wxImageSnip(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_wxImageSnip_class))
    return 1;
  else {
    if (!stop)
       return 0;
    WITH_REMEMBERED_STACK(scheme_wrong_type(stop, nullOK ? "image-snip% object or " XC_NULL_STR: "image-snip% object", -1, 0, &obj));
    return 0;
  }
}

Scheme_Object *objscheme_bundle_wxImageSnip(class wxImageSnip *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_IMAGE_SNIP) && (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_wxImageSnip_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 wxImageSnip *objscheme_unbundle_wxImageSnip(Scheme_Object *obj, const char *where, int nullOK)
{
  if (nullOK && XC_SCHEME_NULLP(obj)) return NULL;

  REMEMBER_VAR_STACK();

  (void)objscheme_istype_wxImageSnip(obj, where, nullOK);
  Scheme_Class_Object *o = (Scheme_Class_Object *)obj;
  WITH_REMEMBERED_STACK(objscheme_check_valid(obj));
  if (o->primflag)
    return (os_wxImageSnip *)o->primdata;
  else
    return (wxImageSnip *)o->primdata;
}



















class os_wxMediaSnip : public wxMediaSnip {
 public:

  os_wxMediaSnip CONSTRUCTOR_ARGS((class wxMediaBuffer* x0 = NULL, Bool x1 = TRUE, nnint x2 = wxMSNIPBOX_XMARGIN, nnint x3 = wxMSNIPBOX_YMARGIN, nnint x4 = wxMSNIPBOX_XMARGIN, nnint x5 = wxMSNIPBOX_YMARGIN, nnint x6 = wxMSNIPBOX_XINSET, nnint x7 = wxMSNIPBOX_YINSET, nnint x8 = wxMSNIPBOX_XINSET, nnint x9 = wxMSNIPBOX_YINSET, float x10 = -1, float x11 = -1, float x12 = -1, float x13 = -1));
  ~os_wxMediaSnip();
  nnfloat GetScrollStepOffset(nnlong x0);
  nnlong FindScrollStep(float x0);
  nnlong GetNumScrollSteps();
  void SetAdmin(class wxSnipAdmin* x0);
  Bool Resize(nnfloat x0, nnfloat x1);
  void Write(class wxMediaStreamOut* x0);
  Bool Match(class wxSnip* x0);
  void DoEdit(int x0, Bool x1 = TRUE, long x2 = 0);
  void BlinkCaret(class wxDC* x0, float x1, float x2);
  void OwnCaret(Bool x0);
  class wxCursor* AdjustCursor(class wxDC* x0, float x1, float x2, float x3, float x4, class wxMouseEvent* x5);
  void OnChar(class wxDC* x0, float x1, float x2, float x3, float x4, class wxKeyEvent* x5);
  void OnEvent(class wxDC* x0, float x1, float x2, float x3, float x4, class wxMouseEvent* x5);
  void SizeCacheInvalid();
  class wxSnip* Copy();
  string GetText(nnlong x0, nnlong x1, Bool x2 = FALSE, long* x3 = NULL);
  class wxSnip* MergeWith(class wxSnip* x0);
  void Split(nnlong x0, class wxSnip** x1, class wxSnip** x2);
  void Draw(class wxDC* x0, float x1, float x2, float x3, float x4, float x5, float x6, float x7, float x8, int x9);
  float PartialOffset(class wxDC* x0, float x1, float x2, nnlong x3);
  void GetExtent(class wxDC* x0, float x1, float x2, nnfloat* x3 = NULL, nnfloat* x4 = NULL, nnfloat* x5 = NULL, nnfloat* x6 = NULL, nnfloat* x7 = NULL, nnfloat* x8 = NULL);
#ifdef MZ_PRECISE_GC
  void gcMark();
  void gcFixup();
#endif
};

#ifdef MZ_PRECISE_GC
void os_wxMediaSnip::gcMark() {
  wxMediaSnip::gcMark();
}
void os_wxMediaSnip::gcFixup() {
  wxMediaSnip::gcFixup();
}
#endif

static Scheme_Object *os_wxMediaSnip_class;

os_wxMediaSnip::os_wxMediaSnip CONSTRUCTOR_ARGS((class wxMediaBuffer* x0, Bool x1, nnint x2, nnint x3, nnint x4, nnint x5, nnint x6, nnint x7, nnint x8, nnint x9, float x10, float x11, float x12, float x13))
CONSTRUCTOR_INIT(: wxMediaSnip(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13))
{
}

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

nnfloat os_wxMediaSnip::GetScrollStepOffset(nnlong x0)
{
  Scheme_Object *p[1] INIT_NULLED_ARRAY({ NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaSnip *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_wxMediaSnip_class, "get-scroll-step-offset", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxMediaSnip::GetScrollStepOffset(x0);
  } else {
  
  p[0] = scheme_make_integer(x0);
  

  v = WITH_VAR_STACK(scheme_apply(method, 1, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(v, "get-scroll-step-offset in editor-snip%"", extracting return value"));
  }
}

nnlong os_wxMediaSnip::FindScrollStep(float x0)
{
  Scheme_Object *p[1] INIT_NULLED_ARRAY({ NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaSnip *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_wxMediaSnip_class, "find-scroll-step", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxMediaSnip::FindScrollStep(x0);
  } else {
  
  p[0] = WITH_VAR_STACK(scheme_make_double(x0));
  

  v = WITH_VAR_STACK(scheme_apply(method, 1, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(v, "find-scroll-step in editor-snip%"", extracting return value"));
  }
}

nnlong os_wxMediaSnip::GetNumScrollSteps()
{
  Scheme_Object **p = NULL;
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaSnip *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_wxMediaSnip_class, "get-num-scroll-steps", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxMediaSnip::GetNumScrollSteps();
  } else {
  
  

  v = WITH_VAR_STACK(scheme_apply(method, 0, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(v, "get-num-scroll-steps in editor-snip%"", extracting return value"));
  }
}

void os_wxMediaSnip::SetAdmin(class wxSnipAdmin* x0)
{
  Scheme_Object *p[1] INIT_NULLED_ARRAY({ NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaSnip *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_wxMediaSnip_class, "set-admin", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxMediaSnip::SetAdmin(x0);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxSnipAdmin(x0));
  

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

Bool os_wxMediaSnip::Resize(nnfloat x0, nnfloat 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_wxMediaSnip *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_wxMediaSnip_class, "resize", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxMediaSnip::Resize(x0, x1);
  } else {
  
  p[0] = WITH_VAR_STACK(scheme_make_double(x0));
  p[1] = WITH_VAR_STACK(scheme_make_double(x1));
  

  v = WITH_VAR_STACK(scheme_apply(method, 2, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_bool(v, "resize in editor-snip%"", extracting return value"));
  }
}

void os_wxMediaSnip::Write(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_wxMediaSnip *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_wxMediaSnip_class, "write", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxMediaSnip::Write(x0);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxMediaStreamOut(x0));
  

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

Bool os_wxMediaSnip::Match(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_wxMediaSnip *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_wxMediaSnip_class, "match?", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxMediaSnip::Match(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, "match? in editor-snip%"", extracting return value"));
  }
}

void os_wxMediaSnip::DoEdit(int x0, Bool x1, long 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_wxMediaSnip *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, 3);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxMediaSnip_class, "do-edit-operation", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxMediaSnip::DoEdit(x0, x1, x2);
  } else {
  
  p[0] = WITH_VAR_STACK(bundle_symset_editOp(x0));
  p[1] = (x1 ? scheme_true : scheme_false);
  p[2] = scheme_make_integer(x2);
  

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

void os_wxMediaSnip::BlinkCaret(class wxDC* x0, float x1, float 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_wxMediaSnip *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, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxMediaSnip_class, "blink-caret", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxMediaSnip::BlinkCaret(x0, x1, x2);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[2] = WITH_VAR_STACK(scheme_make_double(x2));
  

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

void os_wxMediaSnip::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_wxMediaSnip *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_wxMediaSnip_class, "own-caret", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxMediaSnip::OwnCaret(x0);
  } else {
  
  p[0] = (x0 ? scheme_true : scheme_false);
  

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

class wxCursor* os_wxMediaSnip::AdjustCursor(class wxDC* x0, float x1, float x2, float x3, float x4, class wxMouseEvent* x5)
{
  Scheme_Object *p[6] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaSnip *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, 6);
  VAR_STACK_PUSH(5, x0);
  VAR_STACK_PUSH(6, x5);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxMediaSnip_class, "adjust-cursor", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxMediaSnip::AdjustCursor(x0, x1, x2, x3, x4, x5);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(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] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x5));
  

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

void os_wxMediaSnip::OnChar(class wxDC* x0, float x1, float x2, float x3, float x4, class wxKeyEvent* x5)
{
  Scheme_Object *p[6] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaSnip *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, 6);
  VAR_STACK_PUSH(5, x0);
  VAR_STACK_PUSH(6, x5);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxMediaSnip_class, "on-char", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxMediaSnip::OnChar(x0, x1, x2, x3, x4, x5);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(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] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x5));
  

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

void os_wxMediaSnip::OnEvent(class wxDC* x0, float x1, float x2, float x3, float x4, class wxMouseEvent* x5)
{
  Scheme_Object *p[6] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaSnip *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, 6);
  VAR_STACK_PUSH(5, x0);
  VAR_STACK_PUSH(6, x5);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxMediaSnip_class, "on-event", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxMediaSnip::OnEvent(x0, x1, x2, x3, x4, x5);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(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] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x5));
  

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

void os_wxMediaSnip::SizeCacheInvalid()
{
  Scheme_Object **p = NULL;
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaSnip *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_wxMediaSnip_class, "size-cache-invalid", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxMediaSnip::SizeCacheInvalid();
  } else {
  
  

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

class wxSnip* os_wxMediaSnip::Copy()
{
  Scheme_Object **p = NULL;
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaSnip *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_wxMediaSnip_class, "copy", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxMediaSnip::Copy();
  } else {
  
  

  v = WITH_VAR_STACK(scheme_apply(method, 0, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_wxSnip(v, "copy in editor-snip%"", extracting return value", 0));
  }
}

string os_wxMediaSnip::GetText(nnlong x0, nnlong x1, Bool x2, long* x3)
{
  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_wxMediaSnip *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, 3);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxMediaSnip_class, "get-text", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxMediaSnip::GetText(x0, x1, x2, x3);
  } else {
  
  p[0] = scheme_make_integer(x0);
  p[1] = scheme_make_integer(x1);
  p[2] = (x2 ? scheme_true : scheme_false);
  

  v = WITH_VAR_STACK(scheme_apply(method, 3, p));
  
  
  return (string)WITH_VAR_STACK(objscheme_unbundle_string(v, "get-text in editor-snip%"", extracting return value"));
  }
}

class wxSnip* os_wxMediaSnip::MergeWith(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_wxMediaSnip *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_wxMediaSnip_class, "merge-with", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxMediaSnip::MergeWith(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_wxSnip(v, "merge-with in editor-snip%"", extracting return value", 1));
  }
}

void os_wxMediaSnip::Split(nnlong x0, class wxSnip** x1, class wxSnip** 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_wxMediaSnip *sElF = this;
#endif
  static void *mcache = 0;
  Scheme_Object *sbox_tmp;

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

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxMediaSnip_class, "split", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxMediaSnip::Split(x0, x1, x2);
  } else {
  
  p[0] = scheme_make_integer(x0);
  p[1] = (sbox_tmp = WITH_VAR_STACK(objscheme_bundle_wxSnip((*x1))), WITH_VAR_STACK(objscheme_box(sbox_tmp)));
  p[2] = (sbox_tmp = WITH_VAR_STACK(objscheme_bundle_wxSnip((*x2))), WITH_VAR_STACK(objscheme_box(sbox_tmp)));
  

  v = WITH_VAR_STACK(scheme_apply(method, 3, p));
  
  if (x1) *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[1], "split in editor-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_wxSnip(sbox_tmp, "split in editor-snip%"", extracting return value via box"", extracting boxed argument", 0)));
  if (x2) *x2 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[2], "split in editor-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_wxSnip(sbox_tmp, "split in editor-snip%"", extracting return value via box"", extracting boxed argument", 0)));
  
  }
}

void os_wxMediaSnip::Draw(class wxDC* x0, float x1, float x2, float x3, float x4, float x5, float x6, float x7, float x8, int x9)
{
  Scheme_Object *p[10] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxMediaSnip *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, 10);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxMediaSnip_class, "draw", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxMediaSnip::Draw(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(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] = 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(scheme_make_double(x8));
  p[9] = WITH_VAR_STACK(bundle_symset_caret(x9));
  

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

float os_wxMediaSnip::PartialOffset(class wxDC* x0, float x1, float x2, nnlong 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_wxMediaSnip *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_wxMediaSnip_class, "partial-offset", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return ASSELF wxMediaSnip::PartialOffset(x0, x1, x2, x3);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[3] = scheme_make_integer(x3);
  

  v = WITH_VAR_STACK(scheme_apply(method, 4, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_float(v, "partial-offset in editor-snip%"", extracting return value"));
  }
}

void os_wxMediaSnip::GetExtent(class wxDC* x0, float x1, float x2, nnfloat* x3, nnfloat* x4, nnfloat* x5, nnfloat* x6, nnfloat* x7, nnfloat* 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_wxMediaSnip *sElF = this;
#endif
  static void *mcache = 0;
  Scheme_Object *sbox_tmp;

  SETUP_VAR_STACK(12);
  VAR_STACK_PUSH(0, method);
  VAR_STACK_PUSH(1, sElF);
  VAR_STACK_PUSH_ARRAY(2, p, 9);
  VAR_STACK_PUSH(5, x0);
  VAR_STACK_PUSH(6, x3);
  VAR_STACK_PUSH(7, x4);
  VAR_STACK_PUSH(8, x5);
  VAR_STACK_PUSH(9, x6);
  VAR_STACK_PUSH(10, x7);
  VAR_STACK_PUSH(11, x8);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *)__gc_external, os_wxMediaSnip_class, "get-extent", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    ASSELF wxMediaSnip::GetExtent(x0, x1, x2, x3, x4, x5, x6, x7, x8);
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[3] = ((x3) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x3))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[4] = ((x4) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x4))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[5] = ((x5) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x5))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[6] = ((x6) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x6))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[7] = ((x7) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x7))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[8] = ((x8) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x8))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  

  v = WITH_VAR_STACK(scheme_apply(method, 9, p));
  
  if (x3) *x3 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[3], "get-extent in editor-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in editor-snip%"", extracting return value via box"", extracting boxed argument")));
  if (x4) *x4 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[4], "get-extent in editor-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in editor-snip%"", extracting return value via box"", extracting boxed argument")));
  if (x5) *x5 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[5], "get-extent in editor-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in editor-snip%"", extracting return value via box"", extracting boxed argument")));
  if (x6) *x6 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[6], "get-extent in editor-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in editor-snip%"", extracting return value via box"", extracting boxed argument")));
  if (x7) *x7 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[7], "get-extent in editor-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in editor-snip%"", extracting return value via box"", extracting boxed argument")));
  if (x8) *x8 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[8], "get-extent in editor-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in editor-snip%"", extracting return value via box"", extracting boxed argument")));
  
  }
}

static Scheme_Object *os_wxMediaSnipGetInset(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  nnint _x0;
  nnint* x0 = &_x0;
  nnint _x1;
  nnint* x1 = &_x1;
  nnint _x2;
  nnint* x2 = &_x2;
  nnint _x3;
  nnint* x3 = &_x3;
  Scheme_Object *sbox_tmp;

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

  
      *x0 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[0], "get-inset in editor-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(sbox_tmp, "get-inset in editor-snip%"", extracting boxed argument")));
      *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[1], "get-inset in editor-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(sbox_tmp, "get-inset in editor-snip%"", extracting boxed argument")));
      *x2 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[2], "get-inset in editor-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(sbox_tmp, "get-inset in editor-snip%"", extracting boxed argument")));
      *x3 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[3], "get-inset in editor-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(sbox_tmp, "get-inset in editor-snip%"", extracting boxed argument")));

  
  WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->GetInset(x0, x1, x2, x3));

  
  if (n > 0)
    WITH_VAR_STACK(objscheme_set_box(p[0], scheme_make_integer(_x0)));
  if (n > 1)
    WITH_VAR_STACK(objscheme_set_box(p[1], scheme_make_integer(_x1)));
  if (n > 2)
    WITH_VAR_STACK(objscheme_set_box(p[2], scheme_make_integer(_x2)));
  if (n > 3)
    WITH_VAR_STACK(objscheme_set_box(p[3], scheme_make_integer(_x3)));
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipSetInset(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  nnint x0;
  nnint x1;
  nnint x2;
  nnint 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-inset in editor-snip%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[1], "set-inset in editor-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[2], "set-inset in editor-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[3], "set-inset in editor-snip%"));

  
  WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->SetInset(x0, x1, x2, x3));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipGetMargin(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  nnint _x0;
  nnint* x0 = &_x0;
  nnint _x1;
  nnint* x1 = &_x1;
  nnint _x2;
  nnint* x2 = &_x2;
  nnint _x3;
  nnint* x3 = &_x3;
  Scheme_Object *sbox_tmp;

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

  
      *x0 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[0], "get-margin in editor-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(sbox_tmp, "get-margin in editor-snip%"", extracting boxed argument")));
      *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[1], "get-margin in editor-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(sbox_tmp, "get-margin in editor-snip%"", extracting boxed argument")));
      *x2 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[2], "get-margin in editor-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(sbox_tmp, "get-margin in editor-snip%"", extracting boxed argument")));
      *x3 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[3], "get-margin in editor-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(sbox_tmp, "get-margin in editor-snip%"", extracting boxed argument")));

  
  WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->GetMargin(x0, x1, x2, x3));

  
  if (n > 0)
    WITH_VAR_STACK(objscheme_set_box(p[0], scheme_make_integer(_x0)));
  if (n > 1)
    WITH_VAR_STACK(objscheme_set_box(p[1], scheme_make_integer(_x1)));
  if (n > 2)
    WITH_VAR_STACK(objscheme_set_box(p[2], scheme_make_integer(_x2)));
  if (n > 3)
    WITH_VAR_STACK(objscheme_set_box(p[3], scheme_make_integer(_x3)));
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipSetMargin(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  nnint x0;
  nnint x1;
  nnint x2;
  nnint 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-margin in editor-snip%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[1], "set-margin in editor-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[2], "set-margin in editor-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[3], "set-margin in editor-snip%"));

  
  WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->SetMargin(x0, x1, x2, x3));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipBorderVisible(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(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->BorderVisible());

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaSnipShowBorder(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], "show-border in editor-snip%"));

  
  WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->ShowBorder(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipSetAlignTopLine(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-align-top-line in editor-snip%"));

  
  WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->SetAlignTopLine(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipGetAlignTopLine(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(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->GetAlignTopLine());

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaSnipSetTightTextFit(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-tight-text-fit in editor-snip%"));

  
  WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->SetTightTextFit(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipGetTightTextFit(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(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->GetTightTextFit());

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaSnipGetMinHeight(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(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->GetMinHeight());

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_nonnegative_symbol_float(r, "none"));
}

static Scheme_Object *os_wxMediaSnipGetMinWidth(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(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->GetMinWidth());

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_nonnegative_symbol_float(r, "none"));
}

static Scheme_Object *os_wxMediaSnipSetMinHeight(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;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_float(p[0], "none", "set-min-height in editor-snip%"));

  
  WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->SetMinHeight(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipSetMinWidth(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;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_float(p[0], "none", "set-min-width in editor-snip%"));

  
  WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->SetMinWidth(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipGetMaxHeight(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(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->GetMaxHeight());

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_nonnegative_symbol_float(r, "none"));
}

static Scheme_Object *os_wxMediaSnipGetMaxWidth(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(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->GetMaxWidth());

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_nonnegative_symbol_float(r, "none"));
}

static Scheme_Object *os_wxMediaSnipSetMaxHeight(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;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_float(p[0], "none", "set-max-height in editor-snip%"));

  
  WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->SetMaxHeight(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipSetMaxWidth(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;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_float(p[0], "none", "set-max-width in editor-snip%"));

  
  WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->SetMaxWidth(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipGetScrollStepOffset(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);
  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-scroll-step-offset in editor-snip%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->wxMediaSnip::GetScrollStepOffset(x0));
  else
    r = WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->GetScrollStepOffset(x0));

  
  
  return WITH_REMEMBERED_STACK(scheme_make_double(r));
}

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

  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-scroll-step in editor-snip%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->wxMediaSnip::FindScrollStep(x0));
  else
    r = WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->FindScrollStep(x0));

  
  
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaSnipGetNumScrollSteps(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  nnlong 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_wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->wxMediaSnip::GetNumScrollSteps());
  else
    r = WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->GetNumScrollSteps());

  
  
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaSnipSetAdmin(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxSnipAdmin* 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_wxSnipAdmin(p[0], "set-admin in editor-snip%", 1));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->wxMediaSnip::SetAdmin(x0));
  else
    WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->SetAdmin(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipResize(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);
  nnfloat x0;
  nnfloat x1;

  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], "resize in editor-snip%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(p[1], "resize in editor-snip%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->wxMediaSnip::Resize(x0, x1));
  else
    r = WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->Resize(x0, x1));

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaSnipWrite(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  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 in editor-snip%", 0));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->wxMediaSnip::Write(x0));
  else
    WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->Write(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipMatch(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], "match? in editor-snip%", 0));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->wxMediaSnip::Match(x0));
  else
    r = WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->Match(x0));

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxMediaSnipDoEdit(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;
  long x2;

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

  
  x0 = WITH_VAR_STACK(unbundle_symset_editOp(p[0], "do-edit-operation in editor-snip%"));
  if (n > 1) {
    x1 = WITH_VAR_STACK(objscheme_unbundle_bool(p[1], "do-edit-operation in editor-snip%"));
  } else
    x1 = TRUE;
  if (n > 2) {
    x2 = WITH_VAR_STACK(objscheme_unbundle_integer(p[2], "do-edit-operation in editor-snip%"));
  } else
    x2 = 0;

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->wxMediaSnip::DoEdit(x0, x1, x2));
  else
    WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->DoEdit(x0, x1, x2));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipBlinkCaret(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxDC* x0 INIT_NULLED_OUT;
  float x1;
  float x2;

  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_wxDC(p[0], "blink-caret in editor-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "blink-caret in editor-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "blink-caret in editor-snip%"));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->wxMediaSnip::BlinkCaret(x0, x1, x2));
  else
    WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->BlinkCaret(x0, x1, x2));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipOwnCaret(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 editor-snip%"));

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

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipAdjustCursor(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 wxDC* x0 INIT_NULLED_OUT;
  float x1;
  float x2;
  float x3;
  float x4;
  class wxMouseEvent* x5 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, x5);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[0], "adjust-cursor in editor-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "adjust-cursor in editor-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "adjust-cursor in editor-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_float(p[3], "adjust-cursor in editor-snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_float(p[4], "adjust-cursor in editor-snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[5], "adjust-cursor in editor-snip%", 0));

  if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","adjust-cursor"), "bad device context: ", p[0]));
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->wxMediaSnip::AdjustCursor(x0, x1, x2, x3, x4, x5));
  else
    r = WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->AdjustCursor(x0, x1, x2, x3, x4, x5));

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxCursor(r));
}

static Scheme_Object *os_wxMediaSnipOnChar(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxDC* x0 INIT_NULLED_OUT;
  float x1;
  float x2;
  float x3;
  float x4;
  class wxKeyEvent* x5 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, x5);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[0], "on-char in editor-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "on-char in editor-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "on-char in editor-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_float(p[3], "on-char in editor-snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_float(p[4], "on-char in editor-snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_wxKeyEvent(p[5], "on-char in editor-snip%", 0));

  if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","on-char"), "bad device context: ", p[0]));
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->wxMediaSnip::OnChar(x0, x1, x2, x3, x4, x5));
  else
    WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->OnChar(x0, x1, x2, x3, x4, x5));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipOnEvent(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxDC* x0 INIT_NULLED_OUT;
  float x1;
  float x2;
  float x3;
  float x4;
  class wxMouseEvent* x5 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, x5);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[0], "on-event in editor-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "on-event in editor-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "on-event in editor-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_float(p[3], "on-event in editor-snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_float(p[4], "on-event in editor-snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[5], "on-event in editor-snip%", 0));

  if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","on-event"), "bad device context: ", p[0]));
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->wxMediaSnip::OnEvent(x0, x1, x2, x3, x4, x5));
  else
    WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->OnEvent(x0, x1, x2, x3, x4, x5));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipSizeCacheInvalid(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_wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->wxMediaSnip::SizeCacheInvalid());
  else
    WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->SizeCacheInvalid());

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipCopy(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);

  

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->wxMediaSnip::Copy());
  else
    r = WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->Copy());

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxSnip(r));
}

static Scheme_Object *os_wxMediaSnipGetText(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;
  nnlong x1;
  Bool x2;
  long _x3;
  long* x3 = &_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], "get-text in editor-snip%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[1], "get-text in editor-snip%"));
  if (n > 2) {
    x2 = WITH_VAR_STACK(objscheme_unbundle_bool(p[2], "get-text in editor-snip%"));
  } else
    x2 = FALSE;

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->wxMediaSnip::GetText(x0, x1, x2, x3));
  else
    r = WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->GetText(x0, x1, x2, x3));

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

static Scheme_Object *os_wxMediaSnipMergeWith(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);
  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], "merge-with in editor-snip%", 0));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->wxMediaSnip::MergeWith(x0));
  else
    r = WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->MergeWith(x0));

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxSnip(r));
}

static Scheme_Object *os_wxMediaSnipSplit(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;
  class wxSnip* _x1;
  class wxSnip** x1 = &_x1;
  class wxSnip* _x2;
  class wxSnip** x2 = &_x2;
  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], "split in editor-snip%"));
      *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[1], "split in editor-snip%")), WITH_VAR_STACK(objscheme_unbundle_wxSnip(sbox_tmp, "split in editor-snip%"", extracting boxed argument", 0)));
      *x2 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[2], "split in editor-snip%")), WITH_VAR_STACK(objscheme_unbundle_wxSnip(sbox_tmp, "split in editor-snip%"", extracting boxed argument", 0)));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->wxMediaSnip::Split(x0, x1, x2));
  else
    WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->Split(x0, x1, x2));

  
  if (n > 1)
    WITH_VAR_STACK(objscheme_set_box(p[1], WITH_VAR_STACK(objscheme_bundle_wxSnip(_x1))));
  if (n > 2)
    WITH_VAR_STACK(objscheme_set_box(p[2], WITH_VAR_STACK(objscheme_bundle_wxSnip(_x2))));
  
  return scheme_void;
}

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

  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_wxDC(p[0], "draw in editor-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "draw in editor-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "draw in editor-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_float(p[3], "draw in editor-snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_float(p[4], "draw in editor-snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_float(p[5], "draw in editor-snip%"));
  x6 = WITH_VAR_STACK(objscheme_unbundle_float(p[6], "draw in editor-snip%"));
  x7 = WITH_VAR_STACK(objscheme_unbundle_float(p[7], "draw in editor-snip%"));
  x8 = WITH_VAR_STACK(objscheme_unbundle_float(p[8], "draw in editor-snip%"));
  x9 = WITH_VAR_STACK(unbundle_symset_caret(p[9], "draw in editor-snip%"));

  if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","draw"), "bad device context: ", p[0]));
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->wxMediaSnip::Draw(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9));
  else
    WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->Draw(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipPartialOffset(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);
  class wxDC* x0 INIT_NULLED_OUT;
  float x1;
  float x2;
  nnlong x3;

  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_wxDC(p[0], "partial-offset in editor-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "partial-offset in editor-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "partial-offset in editor-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[3], "partial-offset in editor-snip%"));

  if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","partial-offset"), "bad device context: ", p[0]));
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->wxMediaSnip::PartialOffset(x0, x1, x2, x3));
  else
    r = WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->PartialOffset(x0, x1, x2, x3));

  
  
  return WITH_REMEMBERED_STACK(scheme_make_double(r));
}

static Scheme_Object *os_wxMediaSnipGetExtent(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxDC* x0 INIT_NULLED_OUT;
  float x1;
  float x2;
  nnfloat _x3;
  nnfloat* x3 = &_x3;
  nnfloat _x4;
  nnfloat* x4 = &_x4;
  nnfloat _x5;
  nnfloat* x5 = &_x5;
  nnfloat _x6;
  nnfloat* x6 = &_x6;
  nnfloat _x7;
  nnfloat* x7 = &_x7;
  nnfloat _x8;
  nnfloat* x8 = &_x8;
  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_wxDC(p[0], "get-extent in editor-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "get-extent in editor-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "get-extent in editor-snip%"));
  if (n > 3) {
    if (XC_SCHEME_NULLP(p[3]))
    x3 = NULL;
  else
    *x3 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[3], "get-extent in editor-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in editor-snip%"", 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], "get-extent in editor-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in editor-snip%"", extracting boxed argument")));
  } else
    x4 = NULL;
  if (n > 5) {
    if (XC_SCHEME_NULLP(p[5]))
    x5 = NULL;
  else
    *x5 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[5], "get-extent in editor-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in editor-snip%"", extracting boxed argument")));
  } else
    x5 = NULL;
  if (n > 6) {
    if (XC_SCHEME_NULLP(p[6]))
    x6 = NULL;
  else
    *x6 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[6], "get-extent in editor-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in editor-snip%"", extracting boxed argument")));
  } else
    x6 = NULL;
  if (n > 7) {
    if (XC_SCHEME_NULLP(p[7]))
    x7 = NULL;
  else
    *x7 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[7], "get-extent in editor-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in editor-snip%"", extracting boxed argument")));
  } else
    x7 = NULL;
  if (n > 8) {
    if (XC_SCHEME_NULLP(p[8]))
    x8 = NULL;
  else
    *x8 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[8], "get-extent in editor-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_float(sbox_tmp, "get-extent in editor-snip%"", extracting boxed argument")));
  } else
    x8 = NULL;

  if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","get-extent"), "bad device context: ", p[0]));
  if (((Scheme_Class_Object *)obj)->primflag)
    WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->wxMediaSnip::GetExtent(x0, x1, x2, x3, x4, x5, x6, x7, x8));
  else
    WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->GetExtent(x0, x1, x2, x3, x4, x5, x6, x7, x8));

  
  if (n > 3 && !XC_SCHEME_NULLP(p[3]))
    WITH_VAR_STACK(objscheme_set_box(p[3], WITH_VAR_STACK(scheme_make_double(_x3))));
  if (n > 4 && !XC_SCHEME_NULLP(p[4]))
    WITH_VAR_STACK(objscheme_set_box(p[4], WITH_VAR_STACK(scheme_make_double(_x4))));
  if (n > 5 && !XC_SCHEME_NULLP(p[5]))
    WITH_VAR_STACK(objscheme_set_box(p[5], WITH_VAR_STACK(scheme_make_double(_x5))));
  if (n > 6 && !XC_SCHEME_NULLP(p[6]))
    WITH_VAR_STACK(objscheme_set_box(p[6], WITH_VAR_STACK(scheme_make_double(_x6))));
  if (n > 7 && !XC_SCHEME_NULLP(p[7]))
    WITH_VAR_STACK(objscheme_set_box(p[7], WITH_VAR_STACK(scheme_make_double(_x7))));
  if (n > 8 && !XC_SCHEME_NULLP(p[8]))
    WITH_VAR_STACK(objscheme_set_box(p[8], WITH_VAR_STACK(scheme_make_double(_x8))));
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipSetMedia(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], "set-editor in editor-snip%", 1));

  
  WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->SetMedia(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipGetThisMedia(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);

  

  
  r = WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)obj)->primdata)->GetThisMedia());

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxMediaBuffer(r));
}

static Scheme_Object *os_wxMediaSnip_ConstructScheme(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  SETUP_PRE_VAR_STACK(1);
  PRE_VAR_STACK_PUSH(0, obj);
  os_wxMediaSnip *realobj INIT_NULLED_OUT;
  REMEMBER_VAR_STACK();
  class wxMediaBuffer* x0 INIT_NULLED_OUT;
  Bool x1;
  nnint x2;
  nnint x3;
  nnint x4;
  nnint x5;
  nnint x6;
  nnint x7;
  nnint x8;
  nnint x9;
  float x10;
  float x11;
  float x12;
  float x13;

  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, x0);

  
  if ((n > 14)) 
    WITH_VAR_STACK(scheme_wrong_count("initialization in editor-snip%", 0, 14, n, p));
  if (n > 0) {
    x0 = WITH_VAR_STACK(objscheme_unbundle_wxMediaBuffer(p[0], "initialization in editor-snip%", 1));
  } else
    x0 = NULL;
  if (n > 1) {
    x1 = WITH_VAR_STACK(objscheme_unbundle_bool(p[1], "initialization in editor-snip%"));
  } else
    x1 = TRUE;
  if (n > 2) {
    x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[2], "initialization in editor-snip%"));
  } else
    x2 = wxMSNIPBOX_XMARGIN;
  if (n > 3) {
    x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[3], "initialization in editor-snip%"));
  } else
    x3 = wxMSNIPBOX_YMARGIN;
  if (n > 4) {
    x4 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[4], "initialization in editor-snip%"));
  } else
    x4 = wxMSNIPBOX_XMARGIN;
  if (n > 5) {
    x5 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[5], "initialization in editor-snip%"));
  } else
    x5 = wxMSNIPBOX_YMARGIN;
  if (n > 6) {
    x6 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[6], "initialization in editor-snip%"));
  } else
    x6 = wxMSNIPBOX_XINSET;
  if (n > 7) {
    x7 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[7], "initialization in editor-snip%"));
  } else
    x7 = wxMSNIPBOX_YINSET;
  if (n > 8) {
    x8 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[8], "initialization in editor-snip%"));
  } else
    x8 = wxMSNIPBOX_XINSET;
  if (n > 9) {
    x9 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[9], "initialization in editor-snip%"));
  } else
    x9 = wxMSNIPBOX_YINSET;
  if (n > 10) {
    x10 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_float(p[10], "none", "initialization in editor-snip%"));
  } else
    x10 = -1;
  if (n > 11) {
    x11 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_float(p[11], "none", "initialization in editor-snip%"));
  } else
    x11 = -1;
  if (n > 12) {
    x12 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_float(p[12], "none", "initialization in editor-snip%"));
  } else
    x12 = -1;
  if (n > 13) {
    x13 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_float(p[13], "none", "initialization in editor-snip%"));
  } else
    x13 = -1;

  
  realobj = WITH_VAR_STACK(new os_wxMediaSnip CONSTRUCTOR_ARGS((x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13)));
#ifdef MZ_PRECISE_GC
  WITH_VAR_STACK(realobj->gcInit_wxMediaSnip(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13));
#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_wxMediaSnip(void *env)
{
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, env);

  wxREGGLOB(os_wxMediaSnip_class);

  os_wxMediaSnip_class = WITH_VAR_STACK(objscheme_def_prim_class(env, "editor-snip%", "snip%", os_wxMediaSnip_ConstructScheme, 41));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "get-inset", os_wxMediaSnipGetInset, 4, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "set-inset", os_wxMediaSnipSetInset, 4, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "get-margin", os_wxMediaSnipGetMargin, 4, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "set-margin", os_wxMediaSnipSetMargin, 4, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "border-visible?", os_wxMediaSnipBorderVisible, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "show-border", os_wxMediaSnipShowBorder, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "set-align-top-line", os_wxMediaSnipSetAlignTopLine, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "get-align-top-line", os_wxMediaSnipGetAlignTopLine, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "set-tight-text-fit", os_wxMediaSnipSetTightTextFit, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "get-tight-text-fit", os_wxMediaSnipGetTightTextFit, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "get-min-height", os_wxMediaSnipGetMinHeight, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "get-min-width", os_wxMediaSnipGetMinWidth, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "set-min-height", os_wxMediaSnipSetMinHeight, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "set-min-width", os_wxMediaSnipSetMinWidth, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "get-max-height", os_wxMediaSnipGetMaxHeight, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "get-max-width", os_wxMediaSnipGetMaxWidth, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "set-max-height", os_wxMediaSnipSetMaxHeight, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "set-max-width", os_wxMediaSnipSetMaxWidth, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "get-scroll-step-offset", os_wxMediaSnipGetScrollStepOffset, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "find-scroll-step", os_wxMediaSnipFindScrollStep, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "get-num-scroll-steps", os_wxMediaSnipGetNumScrollSteps, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "set-admin", os_wxMediaSnipSetAdmin, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "resize", os_wxMediaSnipResize, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "write", os_wxMediaSnipWrite, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "match?", os_wxMediaSnipMatch, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "do-edit-operation", os_wxMediaSnipDoEdit, 1, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "blink-caret", os_wxMediaSnipBlinkCaret, 3, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "own-caret", os_wxMediaSnipOwnCaret, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "adjust-cursor", os_wxMediaSnipAdjustCursor, 6, 6));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "on-char", os_wxMediaSnipOnChar, 6, 6));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "on-event", os_wxMediaSnipOnEvent, 6, 6));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "size-cache-invalid", os_wxMediaSnipSizeCacheInvalid, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "copy", os_wxMediaSnipCopy, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "get-text", os_wxMediaSnipGetText, 2, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "merge-with", os_wxMediaSnipMergeWith, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "split", os_wxMediaSnipSplit, 3, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "draw", os_wxMediaSnipDraw, 10, 10));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "partial-offset", os_wxMediaSnipPartialOffset, 4, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "get-extent", os_wxMediaSnipGetExtent, 3, 9));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "set-editor", os_wxMediaSnipSetMedia, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMediaSnip_class, "get-editor", os_wxMediaSnipGetThisMedia, 0, 0));


  WITH_VAR_STACK(scheme_made_class(os_wxMediaSnip_class));

  WITH_VAR_STACK(objscheme_install_bundler((Objscheme_Bundler)objscheme_bundle_wxMediaSnip, wxTYPE_MEDIA_SNIP));

}

int objscheme_istype_wxMediaSnip(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_wxMediaSnip_class))
    return 1;
  else {
    if (!stop)
       return 0;
    WITH_REMEMBERED_STACK(scheme_wrong_type(stop, nullOK ? "editor-snip% object or " XC_NULL_STR: "editor-snip% object", -1, 0, &obj));
    return 0;
  }
}

Scheme_Object *objscheme_bundle_wxMediaSnip(class wxMediaSnip *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_SNIP) && (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_wxMediaSnip_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 wxMediaSnip *objscheme_unbundle_wxMediaSnip(Scheme_Object *obj, const char *where, int nullOK)
{
  if (nullOK && XC_SCHEME_NULLP(obj)) return NULL;

  REMEMBER_VAR_STACK();

  (void)objscheme_istype_wxMediaSnip(obj, where, nullOK);
  Scheme_Class_Object *o = (Scheme_Class_Object *)obj;
  WITH_REMEMBERED_STACK(objscheme_check_valid(obj));
  if (o->primflag)
    return (os_wxMediaSnip *)o->primdata;
  else
    return (wxMediaSnip *)o->primdata;
}








class os_wxBufferDataClass : public wxBufferDataClass {
 public:

  os_wxBufferDataClass CONSTRUCTOR_ARGS(());
  ~os_wxBufferDataClass();
  class wxBufferData* Read(class wxMediaStreamIn* x0);
#ifdef MZ_PRECISE_GC
  void gcMark();
  void gcFixup();
#endif
};

#ifdef MZ_PRECISE_GC
void os_wxBufferDataClass::gcMark() {
  wxBufferDataClass::gcMark();
}
void os_wxBufferDataClass::gcFixup() {
  wxBufferDataClass::gcFixup();
}
#endif

static Scheme_Object *os_wxBufferDataClass_class;

os_wxBufferDataClass::os_wxBufferDataClass CONSTRUCTOR_ARGS(())
CONSTRUCTOR_INIT(: wxBufferDataClass())
{
}

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

class wxBufferData* os_wxBufferDataClass::Read(class wxMediaStreamIn* x0)
{
  Scheme_Object *p[1] INIT_NULLED_ARRAY({ NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_wxBufferDataClass *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_wxBufferDataClass_class, "read", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return NULL;
  } else {
  
  p[0] = WITH_VAR_STACK(objscheme_bundle_wxMediaStreamIn(x0));
  

  v = WITH_VAR_STACK(scheme_apply(method, 1, p));
  
  
  return WITH_VAR_STACK(objscheme_unbundle_wxBufferData(v, "read in editor-data-class%"", extracting return value", 1));
  }
}

static Scheme_Object *os_wxBufferDataClassRead(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 wxMediaStreamIn* 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_wxMediaStreamIn(p[0], "read in editor-data-class%", 0));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxBufferDataClass *)((Scheme_Class_Object *)obj)->primdata)->Read(x0));
  else
    r = WITH_VAR_STACK(((wxBufferDataClass *)((Scheme_Class_Object *)obj)->primdata)->Read(x0));

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxBufferData(r));
}

static Scheme_Object *objscheme_wxBufferDataClass_Getclassname(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  string v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(obj);
  if (n) WITH_REMEMBERED_STACK(scheme_wrong_count("get-classname in editor-data-class%", 0, 0, n, p));
  cobj = (Scheme_Class_Object *)obj;
  if (cobj->primflag)
    v = ((os_wxBufferDataClass *)cobj->primdata)->wxBufferDataClass::classname;
  else
    v = ((wxBufferDataClass *)cobj->primdata)->classname;

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

static Scheme_Object *objscheme_wxBufferDataClass_Setclassname(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj = (Scheme_Class_Object *)obj;
  string v;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, cobj);

  WITH_VAR_STACK(objscheme_check_valid(obj));
  if (n != 1) WITH_VAR_STACK(scheme_wrong_count("set-classname in editor-data-class%", 1, 1, n, p));

  v = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[0], "set-classname in editor-data-class%"));
  ((wxBufferDataClass *)cobj->primdata)->classname = v;

  return scheme_void;
}

static Scheme_Object *os_wxBufferDataClass_ConstructScheme(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  SETUP_PRE_VAR_STACK(1);
  PRE_VAR_STACK_PUSH(0, obj);
  os_wxBufferDataClass *realobj INIT_NULLED_OUT;
  REMEMBER_VAR_STACK();

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

  
  if (n != 0) 
    WITH_VAR_STACK(scheme_wrong_count("initialization in editor-data-class%", 0, 0, n, p));

  
  realobj = WITH_VAR_STACK(new os_wxBufferDataClass CONSTRUCTOR_ARGS(()));
#ifdef MZ_PRECISE_GC
  WITH_VAR_STACK(realobj->gcInit_wxBufferDataClass());
#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_wxBufferDataClass(void *env)
{
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, env);

  wxREGGLOB(os_wxBufferDataClass_class);

  os_wxBufferDataClass_class = WITH_VAR_STACK(objscheme_def_prim_class(env, "editor-data-class%", "object%", os_wxBufferDataClass_ConstructScheme, 3));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxBufferDataClass_class, "read", os_wxBufferDataClassRead, 1, 1));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxBufferDataClass_class,"get-classname", objscheme_wxBufferDataClass_Getclassname, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxBufferDataClass_class,"set-classname", objscheme_wxBufferDataClass_Setclassname, 1, 1));

  WITH_VAR_STACK(scheme_made_class(os_wxBufferDataClass_class));

  WITH_VAR_STACK(objscheme_install_bundler((Objscheme_Bundler)objscheme_bundle_wxBufferDataClass, wxTYPE_BUFFER_DATA_CLASS));

}

int objscheme_istype_wxBufferDataClass(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_wxBufferDataClass_class))
    return 1;
  else {
    if (!stop)
       return 0;
    WITH_REMEMBERED_STACK(scheme_wrong_type(stop, nullOK ? "editor-data-class% object or " XC_NULL_STR: "editor-data-class% object", -1, 0, &obj));
    return 0;
  }
}

Scheme_Object *objscheme_bundle_wxBufferDataClass(class wxBufferDataClass *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_BUFFER_DATA_CLASS) && (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_wxBufferDataClass_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 wxBufferDataClass *objscheme_unbundle_wxBufferDataClass(Scheme_Object *obj, const char *where, int nullOK)
{
  if (nullOK && XC_SCHEME_NULLP(obj)) return NULL;

  REMEMBER_VAR_STACK();

  (void)objscheme_istype_wxBufferDataClass(obj, where, nullOK);
  Scheme_Class_Object *o = (Scheme_Class_Object *)obj;
  WITH_REMEMBERED_STACK(objscheme_check_valid(obj));
  if (o->primflag)
    return (os_wxBufferDataClass *)o->primdata;
  else
    return (wxBufferDataClass *)o->primdata;
}





class os_wxBufferDataClassList : public wxBufferDataClassList {
 public:

  ~os_wxBufferDataClassList();
#ifdef MZ_PRECISE_GC
  void gcMark();
  void gcFixup();
#endif
};

#ifdef MZ_PRECISE_GC
void os_wxBufferDataClassList::gcMark() {
  wxBufferDataClassList::gcMark();
}
void os_wxBufferDataClassList::gcFixup() {
  wxBufferDataClassList::gcFixup();
}
#endif

static Scheme_Object *os_wxBufferDataClassList_class;
static Scheme_Object *os_wxBufferDataClassList_interface;

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

static Scheme_Object *os_wxBufferDataClassListNth(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxBufferDataClass* r;
  objscheme_check_valid(obj);
  nnint 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], "nth in editor-data-class-list<%>"));

  
  r = WITH_VAR_STACK(((wxBufferDataClassList *)((Scheme_Class_Object *)obj)->primdata)->Nth(x0));

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxBufferDataClass(r));
}

static Scheme_Object *os_wxBufferDataClassListNumber(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(((wxBufferDataClassList *)((Scheme_Class_Object *)obj)->primdata)->Number());

  
  
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxBufferDataClassListAdd(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxBufferDataClass* 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_wxBufferDataClass(p[0], "add in editor-data-class-list<%>", 0));

  
  WITH_VAR_STACK(((wxBufferDataClassList *)((Scheme_Class_Object *)obj)->primdata)->Add(x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxBufferDataClassListFindPosition(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  short r;
  objscheme_check_valid(obj);
  class wxBufferDataClass* 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_wxBufferDataClass(p[0], "find-position in editor-data-class-list<%>", 0));

  
  r = WITH_VAR_STACK(((wxBufferDataClassList *)((Scheme_Class_Object *)obj)->primdata)->FindPosition(x0));

  
  
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxBufferDataClassListFind(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxBufferDataClass* r;
  objscheme_check_valid(obj);
  string 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 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[0], "find in editor-data-class-list<%>"));

  
  r = WITH_VAR_STACK(((wxBufferDataClassList *)((Scheme_Class_Object *)obj)->primdata)->Find(x0));

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxBufferDataClass(r));
}

void objscheme_setup_wxBufferDataClassList(void *env)
{
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, env);

  wxREGGLOB(os_wxBufferDataClassList_class);
  wxREGGLOB(os_wxBufferDataClassList_interface);

  os_wxBufferDataClassList_class = WITH_VAR_STACK(objscheme_def_prim_class(env, "editor-data-class-list%", "object%", NULL, 5));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxBufferDataClassList_class, "nth", os_wxBufferDataClassListNth, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxBufferDataClassList_class, "number", os_wxBufferDataClassListNumber, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxBufferDataClassList_class, "add", os_wxBufferDataClassListAdd, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxBufferDataClassList_class, "find-position", os_wxBufferDataClassListFindPosition, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxBufferDataClassList_class, "find", os_wxBufferDataClassListFind, 1, 1));


  WITH_VAR_STACK(scheme_made_class(os_wxBufferDataClassList_class));

  os_wxBufferDataClassList_interface = WITH_VAR_STACK(scheme_class_to_interface(os_wxBufferDataClassList_class, "editor-data-class-list" "<%>"));

  WITH_VAR_STACK(objscheme_add_global_interface(os_wxBufferDataClassList_interface, "editor-data-class-list" "<%>", env));
  WITH_VAR_STACK(objscheme_install_bundler((Objscheme_Bundler)objscheme_bundle_wxBufferDataClassList, wxTYPE_BUFFER_DATA_CLASS_LIST));

}

int objscheme_istype_wxBufferDataClassList(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_wxBufferDataClassList_class))
    return 1;
  else {
    if (!stop)
       return 0;
    WITH_REMEMBERED_STACK(scheme_wrong_type(stop, nullOK ? "editor-data-class-list% object or " XC_NULL_STR: "editor-data-class-list% object", -1, 0, &obj));
    return 0;
  }
}

Scheme_Object *objscheme_bundle_wxBufferDataClassList(class wxBufferDataClassList *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_BUFFER_DATA_CLASS_LIST) && (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_wxBufferDataClassList_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 wxBufferDataClassList *objscheme_unbundle_wxBufferDataClassList(Scheme_Object *obj, const char *where, int nullOK)
{
  if (nullOK && XC_SCHEME_NULLP(obj)) return NULL;

  REMEMBER_VAR_STACK();

  (void)objscheme_istype_wxBufferDataClassList(obj, where, nullOK);
  Scheme_Class_Object *o = (Scheme_Class_Object *)obj;
  WITH_REMEMBERED_STACK(objscheme_check_valid(obj));
  if (o->primflag)
    return (os_wxBufferDataClassList *)o->primdata;
  else
    return (wxBufferDataClassList *)o->primdata;
}


static void SetNextNoCycle(wxBufferData *dest, wxBufferData *naya)
{
  wxBufferData *d;
  for (d = naya; d; d = d->next) {
    if (d == dest) {
      /* Don't allow it because it would create a cycle. */
      return;
    }
  }

  dest->next = naya;
}






class os_wxBufferData : public wxBufferData {
 public:

  os_wxBufferData CONSTRUCTOR_ARGS(());
  ~os_wxBufferData();
  Bool Write(class wxMediaStreamOut* x0);
#ifdef MZ_PRECISE_GC
  void gcMark();
  void gcFixup();
#endif
};

#ifdef MZ_PRECISE_GC
void os_wxBufferData::gcMark() {
  wxBufferData::gcMark();
}
void os_wxBufferData::gcFixup() {
  wxBufferData::gcFixup();
}
#endif

static Scheme_Object *os_wxBufferData_class;

os_wxBufferData::os_wxBufferData CONSTRUCTOR_ARGS(())
CONSTRUCTOR_INIT(: wxBufferData())
{
}

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

Bool os_wxBufferData::Write(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_wxBufferData *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_wxBufferData_class, "write", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method)) {
    SET_VAR_STACK();
    return 0;
  } 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 in editor-data%"", extracting return value"));
  }
}

static Scheme_Object *os_wxBufferDataSetNextNoCycle(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(obj);
  class wxBufferData* 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_wxBufferData(p[0], "set-next in editor-data%", 1));

  
  WITH_VAR_STACK(SetNextNoCycle(((wxBufferData *)((Scheme_Class_Object *)obj)->primdata), x0));

  
  
  return scheme_void;
}

static Scheme_Object *os_wxBufferDataWrite(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 in editor-data%", 0));

  
  if (((Scheme_Class_Object *)obj)->primflag)
    r = WITH_VAR_STACK(((os_wxBufferData *)((Scheme_Class_Object *)obj)->primdata)->Write(x0));
  else
    r = WITH_VAR_STACK(((wxBufferData *)((Scheme_Class_Object *)obj)->primdata)->Write(x0));

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *objscheme_wxBufferData_Getdataclass(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  class wxBufferDataClass* v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(obj);
  if (n) WITH_REMEMBERED_STACK(scheme_wrong_count("get-dataclass in editor-data%", 0, 0, n, p));
  cobj = (Scheme_Class_Object *)obj;
  if (cobj->primflag)
    v = ((os_wxBufferData *)cobj->primdata)->wxBufferData::dataclass;
  else
    v = ((wxBufferData *)cobj->primdata)->dataclass;

  return WITH_REMEMBERED_STACK(objscheme_bundle_wxBufferDataClass(v));
}

static Scheme_Object *objscheme_wxBufferData_Setdataclass(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj = (Scheme_Class_Object *)obj;
  class wxBufferDataClass* v;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, cobj);

  WITH_VAR_STACK(objscheme_check_valid(obj));
  if (n != 1) WITH_VAR_STACK(scheme_wrong_count("set-dataclass in editor-data%", 1, 1, n, p));

  v = WITH_VAR_STACK(objscheme_unbundle_wxBufferDataClass(p[0], "set-dataclass in editor-data%", 1));
  ((wxBufferData *)cobj->primdata)->dataclass = v;

  return scheme_void;
}

static Scheme_Object *objscheme_wxBufferData_Getnext(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  class wxBufferData* v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(obj);
  if (n) WITH_REMEMBERED_STACK(scheme_wrong_count("get-next in editor-data%", 0, 0, n, p));
  cobj = (Scheme_Class_Object *)obj;
  if (cobj->primflag)
    v = ((os_wxBufferData *)cobj->primdata)->wxBufferData::next;
  else
    v = ((wxBufferData *)cobj->primdata)->next;

  return WITH_REMEMBERED_STACK(objscheme_bundle_wxBufferData(v));
}

static Scheme_Object *os_wxBufferData_ConstructScheme(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  SETUP_PRE_VAR_STACK(1);
  PRE_VAR_STACK_PUSH(0, obj);
  os_wxBufferData *realobj INIT_NULLED_OUT;
  REMEMBER_VAR_STACK();

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

  
  if (n != 0) 
    WITH_VAR_STACK(scheme_wrong_count("initialization in editor-data%", 0, 0, n, p));

  
  realobj = WITH_VAR_STACK(new os_wxBufferData CONSTRUCTOR_ARGS(()));
#ifdef MZ_PRECISE_GC
  WITH_VAR_STACK(realobj->gcInit_wxBufferData());
#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_wxBufferData(void *env)
{
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, env);

  wxREGGLOB(os_wxBufferData_class);

  os_wxBufferData_class = WITH_VAR_STACK(objscheme_def_prim_class(env, "editor-data%", "object%", os_wxBufferData_ConstructScheme, 5));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxBufferData_class, "set-next", os_wxBufferDataSetNextNoCycle, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxBufferData_class, "write", os_wxBufferDataWrite, 1, 1));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxBufferData_class,"get-dataclass", objscheme_wxBufferData_Getdataclass, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxBufferData_class,"set-dataclass", objscheme_wxBufferData_Setdataclass, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxBufferData_class,"get-next", objscheme_wxBufferData_Getnext, 0, 0));

  WITH_VAR_STACK(scheme_made_class(os_wxBufferData_class));

  WITH_VAR_STACK(objscheme_install_bundler((Objscheme_Bundler)objscheme_bundle_wxBufferData, wxTYPE_BUFFER_DATA));

}

int objscheme_istype_wxBufferData(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_wxBufferData_class))
    return 1;
  else {
    if (!stop)
       return 0;
    WITH_REMEMBERED_STACK(scheme_wrong_type(stop, nullOK ? "editor-data% object or " XC_NULL_STR: "editor-data% object", -1, 0, &obj));
    return 0;
  }
}

Scheme_Object *objscheme_bundle_wxBufferData(class wxBufferData *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_BUFFER_DATA) && (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_wxBufferData_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 wxBufferData *objscheme_unbundle_wxBufferData(Scheme_Object *obj, const char *where, int nullOK)
{
  if (nullOK && XC_SCHEME_NULLP(obj)) return NULL;

  REMEMBER_VAR_STACK();

  (void)objscheme_istype_wxBufferData(obj, where, nullOK);
  Scheme_Class_Object *o = (Scheme_Class_Object *)obj;
  WITH_REMEMBERED_STACK(objscheme_check_valid(obj));
  if (o->primflag)
    return (os_wxBufferData *)o->primdata;
  else
    return (wxBufferData *)o->primdata;
}


#ifdef MZ_PRECISE_GC
END_XFORM_SKIP;
#endif
