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


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

#include "wx_media.h"




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





#include "wxscheme.h"
#include "wxs_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) { READY_TO_RETURN; return wxSNIP_DRAW_NO_CARET; }
  else if (v == caret_wxSNIP_DRAW_SHOW_CARET_sym) { READY_TO_RETURN; return wxSNIP_DRAW_SHOW_CARET; }
  else if (v == caret_wxSNIP_DRAW_SHOW_INACTIVE_CARET_sym) { READY_TO_RETURN; return wxSNIP_DRAW_SHOW_INACTIVE_CARET; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "caret symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}

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



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_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_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_USES_BUFFER_PATH_sym) { result = result | wxSNIP_USES_BUFFER_PATH; }
  else { break; } 
  l = SCHEME_CDR(l);
  }
  if (SCHEME_NULLP(l)) { READY_TO_RETURN; return result; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "flags symbol list", -1, 0, &v));
  READY_TO_RETURN;
  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_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) { READY_TO_RETURN; return wxEDIT_UNDO; }
  else if (v == editOp_wxEDIT_REDO_sym) { READY_TO_RETURN; return wxEDIT_REDO; }
  else if (v == editOp_wxEDIT_CLEAR_sym) { READY_TO_RETURN; return wxEDIT_CLEAR; }
  else if (v == editOp_wxEDIT_CUT_sym) { READY_TO_RETURN; return wxEDIT_CUT; }
  else if (v == editOp_wxEDIT_COPY_sym) { READY_TO_RETURN; return wxEDIT_COPY; }
  else if (v == editOp_wxEDIT_PASTE_sym) { READY_TO_RETURN; return wxEDIT_PASTE; }
  else if (v == editOp_wxEDIT_KILL_sym) { READY_TO_RETURN; return wxEDIT_KILL; }
  else if (v == editOp_wxEDIT_INSERT_TEXT_BOX_sym) { READY_TO_RETURN; return wxEDIT_INSERT_TEXT_BOX; }
  else if (v == editOp_wxEDIT_INSERT_GRAPHIC_BOX_sym) { READY_TO_RETURN; return wxEDIT_INSERT_GRAPHIC_BOX; }
  else if (v == editOp_wxEDIT_INSERT_IMAGE_sym) { READY_TO_RETURN; return wxEDIT_INSERT_IMAGE; }
  else if (v == editOp_wxEDIT_SELECT_ALL_sym) { READY_TO_RETURN; return wxEDIT_SELECT_ALL; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "editOp symbol", -1, 0, &v));
  READY_TO_RETURN;
  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();
  void SetUnmodified();
  nndouble GetScrollStepOffset(nnlong x0);
  nnlong FindScrollStep(double x0);
  nnlong GetNumScrollSteps();
  void SetAdmin(class wxSnipAdmin* x0);
  Bool Resize(nndouble x0, nndouble x1);
  void Write(class wxMediaStreamOut* x0);
  Bool Match(class wxSnip* x0);
  Bool CanEdit(int x0, Bool x1 = TRUE);
  void DoEdit(int x0, Bool x1 = TRUE, long x2 = 0);
  void BlinkCaret(class wxDC* x0, double x1, double x2);
  void OwnCaret(Bool x0);
  class wxCursor* AdjustCursor(class wxDC* x0, double x1, double x2, double x3, double x4, class wxMouseEvent* x5);
  void OnChar(class wxDC* x0, double x1, double x2, double x3, double x4, class wxKeyEvent* x5);
  void OnEvent(class wxDC* x0, double x1, double x2, double x3, double x4, class wxMouseEvent* x5);
  void SizeCacheInvalid();
  class wxSnip* Copy();
  void GetTextBang(wmzstring x0, nnlong x1, nnlong x2, nnlong x3);
  mzstring 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, double x1, double x2, double x3, double x4, double x5, double x6, double x7, double x8, int x9);
  double PartialOffset(class wxDC* x0, double x1, double x2, nnlong x3);
  void GetExtent(class wxDC* x0, double x1, double x2, nndouble* x3 = NULL, nndouble* x4 = NULL, nndouble* x5 = NULL, nndouble* x6 = NULL, nndouble* x7 = NULL, nndouble* 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);
}

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

void os_wxSnip::SetUnmodified()
{
  Scheme_Object *p[POFFSET+0] 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, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxSnip_class, "set-unmodified", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxSnipSetUnmodified)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxSnip::SetUnmodified();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

nndouble os_wxSnip::GetScrollStepOffset(nnlong x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxSnip_class, "get-scroll-step-offset", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxSnipGetScrollStepOffset)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxSnip::GetScrollStepOffset(x0);
  } else {
  
  p[POFFSET+0] = scheme_make_integer(x0);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
  
  
  {
     nndouble resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(v, "get-scroll-step-offset in snip%"", extracting return value"));
     READY_TO_RETURN;
     return resval;
  }
  }
}

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

nnlong os_wxSnip::FindScrollStep(double x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxSnip_class, "find-scroll-step", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxSnipFindScrollStep)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxSnip::FindScrollStep(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(scheme_make_double(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

nnlong os_wxSnip::GetNumScrollSteps()
{
  Scheme_Object *p[POFFSET+0] 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, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxSnip_class, "get-num-scroll-steps", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxSnipGetNumScrollSteps)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxSnip::GetNumScrollSteps();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

void os_wxSnip::SetAdmin(class wxSnipAdmin* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxSnip_class, "set-admin", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxSnipSetAdmin)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxSnip::SetAdmin(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxSnipAdmin(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

Bool os_wxSnip::Resize(nndouble x0, nndouble x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+2);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxSnip_class, "resize", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxSnipResize)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxSnip::Resize(x0, x1);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(scheme_make_double(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

void os_wxSnip::Write(class wxMediaStreamOut* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxSnip_class, "write", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxSnipWrite)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxSnip::Write(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxMediaStreamOut(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

Bool os_wxSnip::Match(class wxSnip* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxSnip_class, "match?", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxSnipMatch)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxSnip::Match(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxSnip(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

Bool os_wxSnip::CanEdit(int x0, Bool x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+2);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxSnip_class, "can-do-edit-operation?", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxSnipCanEdit)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxSnip::CanEdit(x0, x1);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(bundle_symset_editOp(x0));
  p[POFFSET+1] = (x1 ? scheme_true : scheme_false);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

void os_wxSnip::DoEdit(int x0, Bool x1, long x2)
{
  Scheme_Object *p[POFFSET+3] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+3);
  SET_VAR_STACK();

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

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

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

void os_wxSnip::BlinkCaret(class wxDC* x0, double x1, double x2)
{
  Scheme_Object *p[POFFSET+3] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+3);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

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

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

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

void os_wxSnip::OwnCaret(Bool x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  SET_VAR_STACK();

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

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

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

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

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxSnip_class, "adjust-cursor", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxSnipAdjustCursor)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxSnip::AdjustCursor(x0, x1, x2, x3, x4, x5);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = WITH_VAR_STACK(scheme_make_double(x3));
  p[POFFSET+4] = WITH_VAR_STACK(scheme_make_double(x4));
  p[POFFSET+5] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x5));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

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

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxSnip_class, "on-char", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxSnipOnChar)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxSnip::OnChar(x0, x1, x2, x3, x4, x5);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = WITH_VAR_STACK(scheme_make_double(x3));
  p[POFFSET+4] = WITH_VAR_STACK(scheme_make_double(x4));
  p[POFFSET+5] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x5));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

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

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxSnip_class, "on-event", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxSnipOnEvent)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxSnip::OnEvent(x0, x1, x2, x3, x4, x5);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = WITH_VAR_STACK(scheme_make_double(x3));
  p[POFFSET+4] = WITH_VAR_STACK(scheme_make_double(x4));
  p[POFFSET+5] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x5));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

void os_wxSnip::SizeCacheInvalid()
{
  Scheme_Object *p[POFFSET+0] 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, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxSnip_class, "size-cache-invalid", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxSnipSizeCacheInvalid)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxSnip::SizeCacheInvalid();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

class wxSnip* os_wxSnip::Copy()
{
  Scheme_Object *p[POFFSET+0] 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, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxSnip_class, "copy", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxSnipCopy)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxSnip::Copy();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
  
  
  {
     class wxSnip* resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_wxSnip(v, "copy in snip%"", extracting return value", 0));
     READY_TO_RETURN;
     return resval;
  }
  }
}

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

void os_wxSnip::GetTextBang(wmzstring x0, nnlong x1, nnlong x2, nnlong x3)
{
  Scheme_Object *p[POFFSET+4] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+4);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxSnip_class, "get-text!", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxSnipGetTextBang)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxSnip::GetTextBang(x0, x1, x2, x3);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(scheme_make_sized_char_string(x0, x2+x3, 0));
  p[POFFSET+1] = scheme_make_integer(x1);
  p[POFFSET+2] = scheme_make_integer(x2);
  p[POFFSET+3] = scheme_make_integer(x3);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

mzstring os_wxSnip::GetText(nnlong x0, nnlong x1, Bool x2, long* x3)
{
  Scheme_Object *p[POFFSET+3] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+3);
  SET_VAR_STACK();

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

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+3, p));
  
  
  {
     mzstring resval;
     resval = (mzstring)WITH_VAR_STACK(objscheme_unbundle_mzstring(v, "get-text in snip%"", extracting return value"));
     READY_TO_RETURN;
     return resval;
  }
  }
}

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

class wxSnip* os_wxSnip::MergeWith(class wxSnip* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxSnip_class, "merge-with", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxSnipMergeWith)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxSnip::MergeWith(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxSnip(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
  
  
  {
     class wxSnip* resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_wxSnip(v, "merge-with in snip%"", extracting return value", 1));
     READY_TO_RETURN;
     return resval;
  }
  }
}

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

void os_wxSnip::Split(nnlong x0, class wxSnip** x1, class wxSnip** x2)
{
  Scheme_Object *p[POFFSET+3] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+3);
  VAR_STACK_PUSH(5, x1);
  VAR_STACK_PUSH(6, x2);
  SET_VAR_STACK();

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

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+3, p));
  
  if (x1) *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[POFFSET+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[POFFSET+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)));
  
     READY_TO_RETURN;
  }
}

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

void os_wxSnip::Draw(class wxDC* x0, double x1, double x2, double x3, double x4, double x5, double x6, double x7, double x8, int x9)
{
  Scheme_Object *p[POFFSET+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 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, POFFSET+10);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxSnip_class, "draw", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxSnipDraw)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxSnip::Draw(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = WITH_VAR_STACK(scheme_make_double(x3));
  p[POFFSET+4] = WITH_VAR_STACK(scheme_make_double(x4));
  p[POFFSET+5] = WITH_VAR_STACK(scheme_make_double(x5));
  p[POFFSET+6] = WITH_VAR_STACK(scheme_make_double(x6));
  p[POFFSET+7] = WITH_VAR_STACK(scheme_make_double(x7));
  p[POFFSET+8] = WITH_VAR_STACK(scheme_make_double(x8));
  p[POFFSET+9] = WITH_VAR_STACK(bundle_symset_caret(x9));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

double os_wxSnip::PartialOffset(class wxDC* x0, double x1, double x2, nnlong x3)
{
  Scheme_Object *p[POFFSET+4] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+4);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxSnip_class, "partial-offset", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxSnipPartialOffset)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxSnip::PartialOffset(x0, x1, x2, x3);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = scheme_make_integer(x3);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+4, p));
  
  
  {
     double resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_double(v, "partial-offset in snip%"", extracting return value"));
     READY_TO_RETURN;
     return resval;
  }
  }
}

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

void os_wxSnip::GetExtent(class wxDC* x0, double x1, double x2, nndouble* x3, nndouble* x4, nndouble* x5, nndouble* x6, nndouble* x7, nndouble* x8)
{
  Scheme_Object *p[POFFSET+9] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+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 *) ASSELF __gc_external, os_wxSnip_class, "get-extent", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxSnipGetExtent)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxSnip::GetExtent(x0, x1, x2, x3, x4, x5, x6, x7, x8);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = ((x3) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x3))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[POFFSET+4] = ((x4) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x4))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[POFFSET+5] = ((x5) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x5))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[POFFSET+6] = ((x6) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x6))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[POFFSET+7] = ((x7) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x7))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[POFFSET+8] = ((x8) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x8))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+9, p));
  
  if (x3) *x3 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+3], "get-extent in snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(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[POFFSET+4], "get-extent in snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(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[POFFSET+5], "get-extent in snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(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[POFFSET+6], "get-extent in snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(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[POFFSET+7], "get-extent in snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(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[POFFSET+8], "get-extent in snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in snip%"", extracting return value via box"", extracting boxed argument")));
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxSnipPrevious(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxSnip* r;
  objscheme_check_valid(os_wxSnip_class, "previous in snip%", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->Previous());

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

static Scheme_Object *os_wxSnipNext(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxSnip* r;
  objscheme_check_valid(os_wxSnip_class, "next in snip%", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->Next());

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

static Scheme_Object *os_wxSnipSetUnmodified(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxSnip_class, "set-unmodified in snip%", n, p);

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

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxSnip::SetUnmodified());
  else
    WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->SetUnmodified());

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxSnipGetScrollStepOffset(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  nndouble r;
  objscheme_check_valid(os_wxSnip_class, "get-scroll-step-offset in snip%", n, p);
  nnlong x0;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "get-scroll-step-offset in snip%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxSnip::GetScrollStepOffset(x0));
  else
    r = WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->GetScrollStepOffset(x0));

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

static Scheme_Object *os_wxSnipFindScrollStep(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  nnlong r;
  objscheme_check_valid(os_wxSnip_class, "find-scroll-step in snip%", n, p);
  double x0;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+0], "find-scroll-step in snip%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxSnip::FindScrollStep(x0));
  else
    r = WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->FindScrollStep(x0));

  
  
  READY_TO_RETURN;
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxSnipGetNumScrollSteps(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  nnlong r;
  objscheme_check_valid(os_wxSnip_class, "get-num-scroll-steps in snip%", n, p);

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

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxSnip::GetNumScrollSteps());
  else
    r = WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->GetNumScrollSteps());

  
  
  READY_TO_RETURN;
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxSnipSetAdmin(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxSnip_class, "set-admin in snip%", n, p);
  class wxSnipAdmin* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnipAdmin(p[POFFSET+0], "set-admin in snip%", 1));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxSnip::SetAdmin(x0));
  else
    WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->SetAdmin(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxSnipResize(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxSnip_class, "resize in snip%", n, p);
  nndouble x0;
  nndouble x1;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(p[POFFSET+0], "resize in snip%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(p[POFFSET+1], "resize in snip%"));

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

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

static Scheme_Object *os_wxSnipWrite(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxSnip_class, "write in snip%", n, p);
  class wxMediaStreamOut* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxMediaStreamOut(p[POFFSET+0], "write in snip%", 0));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxSnip::Write(x0));
  else
    WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->Write(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxSnipMatch(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxSnip_class, "match? in snip%", n, p);
  class wxSnip* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnip(p[POFFSET+0], "match? in snip%", 0));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxSnip::Match(x0));
  else
    r = WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->Match(x0));

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

static Scheme_Object *os_wxSnipCanEdit(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxSnip_class, "can-do-edit-operation? in snip%", n, p);
  int x0;
  Bool x1;

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

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

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxSnip::CanEdit(x0, x1));
  else
    r = WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->CanEdit(x0, x1));

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

static Scheme_Object *os_wxSnipDoEdit(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxSnip_class, "do-edit-operation in snip%", n, p);
  int x0;
  Bool x1;
  long x2;

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

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

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

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxSnipBlinkCaret(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxSnip_class, "blink-caret in snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "blink-caret in snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "blink-caret in snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "blink-caret in snip%"));

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

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxSnipOwnCaret(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxSnip_class, "own-caret in snip%", n, p);
  Bool x0;

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

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

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxSnip::OwnCaret(x0));
  else
    WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->OwnCaret(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxSnipAdjustCursor(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxCursor* r;
  objscheme_check_valid(os_wxSnip_class, "adjust-cursor in snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;
  double x3;
  double x4;
  class wxMouseEvent* x5 INIT_NULLED_OUT;

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

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

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

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

static Scheme_Object *os_wxSnipOnChar(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxSnip_class, "on-char in snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;
  double x3;
  double x4;
  class wxKeyEvent* x5 INIT_NULLED_OUT;

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

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

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

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxSnipOnEvent(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxSnip_class, "on-event in snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;
  double x3;
  double x4;
  class wxMouseEvent* x5 INIT_NULLED_OUT;

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

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

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

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxSnipSizeCacheInvalid(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxSnip_class, "size-cache-invalid in snip%", n, p);

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

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxSnip::SizeCacheInvalid());
  else
    WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->SizeCacheInvalid());

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxSnipCopy(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxSnip* r;
  objscheme_check_valid(os_wxSnip_class, "copy in snip%", n, p);

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

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxSnip::Copy());
  else
    r = WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->Copy());

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

static Scheme_Object *os_wxSnipGetTextBang(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxSnip_class, "get-text! in snip%", n, p);
  wmzstring x0 INIT_NULLED_OUT;
  nnlong x1;
  nnlong x2;
  nnlong x3;

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

  
  x0 = (wmzstring)WITH_VAR_STACK(objscheme_unbundle_mutable_mzstring(p[POFFSET+0], "get-text! in snip%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+1], "get-text! in snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+2], "get-text! in snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+3], "get-text! in snip%"));

  if (SCHEME_CHAR_STRTAG_VAL(p[0+POFFSET]) < (x2 + x3)) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","get-text!"), "string too short: ", p[0+POFFSET]));
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxSnip::GetTextBang(x0, x1, x2, x3));
  else
    WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->GetTextBang(x0, x1, x2, x3));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

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

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

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

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

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

static Scheme_Object *os_wxSnipMergeWith(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxSnip* r;
  objscheme_check_valid(os_wxSnip_class, "merge-with in snip%", n, p);
  class wxSnip* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnip(p[POFFSET+0], "merge-with in snip%", 0));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxSnip::MergeWith(x0));
  else
    r = WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->MergeWith(x0));

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

static Scheme_Object *os_wxSnipSplit(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxSnip_class, "split in snip%", n, p);
  nnlong x0;
  class wxSnip* _x1;
  class wxSnip** x1 = &_x1;
  class wxSnip* _x2;
  class wxSnip** x2 = &_x2;
  Scheme_Object *sbox_tmp;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "split in snip%"));
      *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[POFFSET+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[POFFSET+2], "split in snip%")), WITH_VAR_STACK(objscheme_unbundle_wxSnip(sbox_tmp, "split in snip%"", extracting boxed argument", 0)));

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

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

static Scheme_Object *os_wxSnipDraw(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxSnip_class, "draw in snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;
  double x3;
  double x4;
  double x5;
  double x6;
  double x7;
  double x8;
  int x9;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "draw in snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "draw in snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "draw in snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+3], "draw in snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+4], "draw in snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+5], "draw in snip%"));
  x6 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+6], "draw in snip%"));
  x7 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+7], "draw in snip%"));
  x8 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+8], "draw in snip%"));
  x9 = WITH_VAR_STACK(unbundle_symset_caret(p[POFFSET+9], "draw in snip%"));

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

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxSnipPartialOffset(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  double r;
  objscheme_check_valid(os_wxSnip_class, "partial-offset in snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;
  nnlong x3;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "partial-offset in snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "partial-offset in snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "partial-offset in snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+3], "partial-offset in snip%"));

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

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

static Scheme_Object *os_wxSnipGetExtent(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxSnip_class, "get-extent in snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;
  nndouble _x3;
  nndouble* x3 = &_x3;
  nndouble _x4;
  nndouble* x4 = &_x4;
  nndouble _x5;
  nndouble* x5 = &_x5;
  nndouble _x6;
  nndouble* x6 = &_x6;
  nndouble _x7;
  nndouble* x7 = &_x7;
  nndouble _x8;
  nndouble* x8 = &_x8;
  Scheme_Object *sbox_tmp;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "get-extent in snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "get-extent in snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "get-extent in snip%"));
  if (n > (POFFSET+3)) {
    if (XC_SCHEME_NULLP(p[POFFSET+3]))
    x3 = NULL;
  else
    *x3 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+3], "get-extent in snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in snip%"", extracting boxed argument")));
  } else
    x3 = NULL;
  if (n > (POFFSET+4)) {
    if (XC_SCHEME_NULLP(p[POFFSET+4]))
    x4 = NULL;
  else
    *x4 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+4], "get-extent in snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in snip%"", extracting boxed argument")));
  } else
    x4 = NULL;
  if (n > (POFFSET+5)) {
    if (XC_SCHEME_NULLP(p[POFFSET+5]))
    x5 = NULL;
  else
    *x5 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+5], "get-extent in snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in snip%"", extracting boxed argument")));
  } else
    x5 = NULL;
  if (n > (POFFSET+6)) {
    if (XC_SCHEME_NULLP(p[POFFSET+6]))
    x6 = NULL;
  else
    *x6 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+6], "get-extent in snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in snip%"", extracting boxed argument")));
  } else
    x6 = NULL;
  if (n > (POFFSET+7)) {
    if (XC_SCHEME_NULLP(p[POFFSET+7]))
    x7 = NULL;
  else
    *x7 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+7], "get-extent in snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in snip%"", extracting boxed argument")));
  } else
    x7 = NULL;
  if (n > (POFFSET+8)) {
    if (XC_SCHEME_NULLP(p[POFFSET+8]))
    x8 = NULL;
  else
    *x8 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+8], "get-extent in snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(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[POFFSET+0]));
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxSnip::GetExtent(x0, x1, x2, x3, x4, x5, x6, x7, x8));
  else
    WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->GetExtent(x0, x1, x2, x3, x4, x5, x6, x7, x8));

  
  if (n > (POFFSET+3) && !XC_SCHEME_NULLP(p[POFFSET+3]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x3)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+3], sbv_)); } 
  if (n > (POFFSET+4) && !XC_SCHEME_NULLP(p[POFFSET+4]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x4)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+4], sbv_)); } 
  if (n > (POFFSET+5) && !XC_SCHEME_NULLP(p[POFFSET+5]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x5)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+5], sbv_)); } 
  if (n > (POFFSET+6) && !XC_SCHEME_NULLP(p[POFFSET+6]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x6)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+6], sbv_)); } 
  if (n > (POFFSET+7) && !XC_SCHEME_NULLP(p[POFFSET+7]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x7)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+7], sbv_)); } 
  if (n > (POFFSET+8) && !XC_SCHEME_NULLP(p[POFFSET+8]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x8)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+8], sbv_)); } 
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxSnipReleaseFromOwner(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxSnip_class, "release-from-owner in snip%", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->ReleaseFromOwner());

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

static Scheme_Object *os_wxSnipIsOwned(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxSnip_class, "is-owned? in snip%", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->IsOwned());

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

static Scheme_Object *os_wxSnipSetStyle(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxSnip_class, "set-style in snip%", n, p);
  class wxStyle* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxStyle(p[POFFSET+0], "set-style in snip%", 0));

  
  WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->SetStyle(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxSnipSetFlags(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxSnip_class, "set-flags in snip%", n, p);
  int x0;

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

  
  x0 = WITH_VAR_STACK(unbundle_symset_flags(p[POFFSET+0], "set-flags in snip%"));

  
  WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->SetFlags(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxSnipSetCount(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxSnip_class, "set-count in snip%", n, p);
  int x0;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_integer_in(p[POFFSET+0], 1, 100000, "set-count in snip%"));

  
  WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->SetCount(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxSnipGetAdmin(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxSnipAdmin* r;
  objscheme_check_valid(os_wxSnip_class, "get-admin in snip%", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxSnip *)((Scheme_Class_Object *)p[0])->primdata)->GetAdmin());

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

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

  objscheme_check_valid(os_wxSnip_class, "get-count in snip%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-count in snip%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  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(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  int v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(os_wxSnip_class, "get-flags in snip%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-flags in snip%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  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(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  class wxStyle* v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(os_wxSnip_class, "get-style in snip%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-style in snip%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  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(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  class wxSnipClass* v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(os_wxSnip_class, "get-snipclass in snip%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-snipclass in snip%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  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(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj = (Scheme_Class_Object *)p[0];
  class wxSnipClass* v;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, cobj);

  WITH_VAR_STACK(objscheme_check_valid(os_wxSnip_class, "set-snipclass in snip%", n, p));
  if (n != (POFFSET+1)) WITH_VAR_STACK(scheme_wrong_count_m("set-snipclass in snip%", POFFSET+1, POFFSET+1, n, p, 1));

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

  READY_TO_RETURN;
  return scheme_void;
}

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

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

  
  if (n != (POFFSET+0)) 
    WITH_VAR_STACK(scheme_wrong_count_m("initialization in snip%", POFFSET+0, POFFSET+0, n, p, 1));

  
  realobj = WITH_VAR_STACK(new os_wxSnip CONSTRUCTOR_ARGS(()));
#ifdef MZ_PRECISE_GC
  WITH_VAR_STACK(realobj->gcInit_wxSnip());
#endif
  realobj->__gc_external = (void *)p[0];
  
  
  READY_TO_RETURN;
  ((Scheme_Class_Object *)p[0])->primdata = realobj;
  ((Scheme_Class_Object *)p[0])->primflag = 1;
  return scheme_void;
}

void objscheme_setup_wxSnip(Scheme_Env *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%", (Scheme_Method_Prim *)os_wxSnip_ConstructScheme, 37));

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

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class,"get-count" " method", (Scheme_Method_Prim *)objscheme_wxSnip_Getcount, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class,"get-flags" " method", (Scheme_Method_Prim *)objscheme_wxSnip_Getflags, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class,"get-style" " method", (Scheme_Method_Prim *)objscheme_wxSnip_Getstyle, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class,"get-snipclass" " method", (Scheme_Method_Prim *)objscheme_wxSnip_Getsnipclass, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxSnip_class,"set-snipclass" " method", (Scheme_Method_Prim *)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));

  READY_TO_RETURN;
}

int objscheme_istype_wxSnip(Scheme_Object *obj, const char *stop, int nullOK)
{
  REMEMBER_VAR_STACK();
  if (nullOK && XC_SCHEME_NULLP(obj)) return 1;
  if (objscheme_is_a(obj,  os_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))))
    { READY_TO_RETURN; return sobj; }
  obj = (Scheme_Class_Object *)WITH_VAR_STACK(scheme_make_uninited_object(os_wxSnip_class));

  obj->primdata = realobj;
  obj->primflag = 0;

  realobj->__gc_external = (void *)obj;
  READY_TO_RETURN;
  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(NULL, NULL, 0, &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((mzstring x0, long x1));
#endif
  ~os_wxTextSnip();
  void SetUnmodified();
  nndouble GetScrollStepOffset(nnlong x0);
  nnlong FindScrollStep(double x0);
  nnlong GetNumScrollSteps();
  void SetAdmin(class wxSnipAdmin* x0);
  Bool Resize(nndouble x0, nndouble x1);
  void Write(class wxMediaStreamOut* x0);
  Bool Match(class wxSnip* x0);
  Bool CanEdit(int x0, Bool x1 = TRUE);
  void DoEdit(int x0, Bool x1 = TRUE, long x2 = 0);
  void BlinkCaret(class wxDC* x0, double x1, double x2);
  void OwnCaret(Bool x0);
  class wxCursor* AdjustCursor(class wxDC* x0, double x1, double x2, double x3, double x4, class wxMouseEvent* x5);
  void OnChar(class wxDC* x0, double x1, double x2, double x3, double x4, class wxKeyEvent* x5);
  void OnEvent(class wxDC* x0, double x1, double x2, double x3, double x4, class wxMouseEvent* x5);
  void SizeCacheInvalid();
  class wxSnip* Copy();
  void GetTextBang(wmzstring x0, nnlong x1, nnlong x2, nnlong x3);
  mzstring 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, double x1, double x2, double x3, double x4, double x5, double x6, double x7, double x8, int x9);
  double PartialOffset(class wxDC* x0, double x1, double x2, nnlong x3);
  void GetExtent(class wxDC* x0, double x1, double x2, nndouble* x3 = NULL, nndouble* x4 = NULL, nndouble* x5 = NULL, nndouble* x6 = NULL, nndouble* x7 = NULL, nndouble* 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((mzstring x0, long x1))
CONSTRUCTOR_INIT(: wxTextSnip(x0, x1))
{
}
#endif

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

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

void os_wxTextSnip::SetUnmodified()
{
  Scheme_Object *p[POFFSET+0] 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, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTextSnip_class, "set-unmodified", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTextSnipSetUnmodified)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxTextSnip::SetUnmodified();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

nndouble os_wxTextSnip::GetScrollStepOffset(nnlong x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTextSnip_class, "get-scroll-step-offset", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTextSnipGetScrollStepOffset)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxTextSnip::GetScrollStepOffset(x0);
  } else {
  
  p[POFFSET+0] = scheme_make_integer(x0);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
  
  
  {
     nndouble resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(v, "get-scroll-step-offset in string-snip%"", extracting return value"));
     READY_TO_RETURN;
     return resval;
  }
  }
}

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

nnlong os_wxTextSnip::FindScrollStep(double x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTextSnip_class, "find-scroll-step", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTextSnipFindScrollStep)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxTextSnip::FindScrollStep(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(scheme_make_double(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

nnlong os_wxTextSnip::GetNumScrollSteps()
{
  Scheme_Object *p[POFFSET+0] 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, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTextSnip_class, "get-num-scroll-steps", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTextSnipGetNumScrollSteps)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxTextSnip::GetNumScrollSteps();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

void os_wxTextSnip::SetAdmin(class wxSnipAdmin* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTextSnip_class, "set-admin", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTextSnipSetAdmin)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxTextSnip::SetAdmin(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxSnipAdmin(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

Bool os_wxTextSnip::Resize(nndouble x0, nndouble x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+2);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTextSnip_class, "resize", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTextSnipResize)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxTextSnip::Resize(x0, x1);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(scheme_make_double(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

void os_wxTextSnip::Write(class wxMediaStreamOut* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTextSnip_class, "write", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTextSnipWrite)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxTextSnip::Write(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxMediaStreamOut(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

Bool os_wxTextSnip::Match(class wxSnip* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTextSnip_class, "match?", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTextSnipMatch)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxTextSnip::Match(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxSnip(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

Bool os_wxTextSnip::CanEdit(int x0, Bool x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+2);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTextSnip_class, "can-do-edit-operation?", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTextSnipCanEdit)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxTextSnip::CanEdit(x0, x1);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(bundle_symset_editOp(x0));
  p[POFFSET+1] = (x1 ? scheme_true : scheme_false);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

void os_wxTextSnip::DoEdit(int x0, Bool x1, long x2)
{
  Scheme_Object *p[POFFSET+3] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+3);
  SET_VAR_STACK();

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

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

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

void os_wxTextSnip::BlinkCaret(class wxDC* x0, double x1, double x2)
{
  Scheme_Object *p[POFFSET+3] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+3);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

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

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

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

void os_wxTextSnip::OwnCaret(Bool x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  SET_VAR_STACK();

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

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

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

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

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTextSnip_class, "adjust-cursor", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTextSnipAdjustCursor)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxTextSnip::AdjustCursor(x0, x1, x2, x3, x4, x5);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = WITH_VAR_STACK(scheme_make_double(x3));
  p[POFFSET+4] = WITH_VAR_STACK(scheme_make_double(x4));
  p[POFFSET+5] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x5));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

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

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTextSnip_class, "on-char", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTextSnipOnChar)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxTextSnip::OnChar(x0, x1, x2, x3, x4, x5);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = WITH_VAR_STACK(scheme_make_double(x3));
  p[POFFSET+4] = WITH_VAR_STACK(scheme_make_double(x4));
  p[POFFSET+5] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x5));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

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

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTextSnip_class, "on-event", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTextSnipOnEvent)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxTextSnip::OnEvent(x0, x1, x2, x3, x4, x5);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = WITH_VAR_STACK(scheme_make_double(x3));
  p[POFFSET+4] = WITH_VAR_STACK(scheme_make_double(x4));
  p[POFFSET+5] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x5));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

void os_wxTextSnip::SizeCacheInvalid()
{
  Scheme_Object *p[POFFSET+0] 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, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTextSnip_class, "size-cache-invalid", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTextSnipSizeCacheInvalid)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxTextSnip::SizeCacheInvalid();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

class wxSnip* os_wxTextSnip::Copy()
{
  Scheme_Object *p[POFFSET+0] 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, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTextSnip_class, "copy", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTextSnipCopy)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxTextSnip::Copy();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
  
  
  {
     class wxSnip* resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_wxSnip(v, "copy in string-snip%"", extracting return value", 0));
     READY_TO_RETURN;
     return resval;
  }
  }
}

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

void os_wxTextSnip::GetTextBang(wmzstring x0, nnlong x1, nnlong x2, nnlong x3)
{
  Scheme_Object *p[POFFSET+4] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+4);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTextSnip_class, "get-text!", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTextSnipGetTextBang)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxTextSnip::GetTextBang(x0, x1, x2, x3);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(scheme_make_sized_char_string(x0, x2+x3, 0));
  p[POFFSET+1] = scheme_make_integer(x1);
  p[POFFSET+2] = scheme_make_integer(x2);
  p[POFFSET+3] = scheme_make_integer(x3);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

mzstring os_wxTextSnip::GetText(nnlong x0, nnlong x1, Bool x2, long* x3)
{
  Scheme_Object *p[POFFSET+3] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+3);
  SET_VAR_STACK();

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

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+3, p));
  
  
  {
     mzstring resval;
     resval = (mzstring)WITH_VAR_STACK(objscheme_unbundle_mzstring(v, "get-text in string-snip%"", extracting return value"));
     READY_TO_RETURN;
     return resval;
  }
  }
}

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

class wxSnip* os_wxTextSnip::MergeWith(class wxSnip* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTextSnip_class, "merge-with", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTextSnipMergeWith)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxTextSnip::MergeWith(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxSnip(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
  
  
  {
     class wxSnip* resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_wxSnip(v, "merge-with in string-snip%"", extracting return value", 1));
     READY_TO_RETURN;
     return resval;
  }
  }
}

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

void os_wxTextSnip::Split(nnlong x0, class wxSnip** x1, class wxSnip** x2)
{
  Scheme_Object *p[POFFSET+3] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+3);
  VAR_STACK_PUSH(5, x1);
  VAR_STACK_PUSH(6, x2);
  SET_VAR_STACK();

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

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+3, p));
  
  if (x1) *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[POFFSET+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[POFFSET+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)));
  
     READY_TO_RETURN;
  }
}

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

void os_wxTextSnip::Draw(class wxDC* x0, double x1, double x2, double x3, double x4, double x5, double x6, double x7, double x8, int x9)
{
  Scheme_Object *p[POFFSET+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 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, POFFSET+10);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTextSnip_class, "draw", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTextSnipDraw)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxTextSnip::Draw(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = WITH_VAR_STACK(scheme_make_double(x3));
  p[POFFSET+4] = WITH_VAR_STACK(scheme_make_double(x4));
  p[POFFSET+5] = WITH_VAR_STACK(scheme_make_double(x5));
  p[POFFSET+6] = WITH_VAR_STACK(scheme_make_double(x6));
  p[POFFSET+7] = WITH_VAR_STACK(scheme_make_double(x7));
  p[POFFSET+8] = WITH_VAR_STACK(scheme_make_double(x8));
  p[POFFSET+9] = WITH_VAR_STACK(bundle_symset_caret(x9));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

double os_wxTextSnip::PartialOffset(class wxDC* x0, double x1, double x2, nnlong x3)
{
  Scheme_Object *p[POFFSET+4] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+4);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTextSnip_class, "partial-offset", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTextSnipPartialOffset)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxTextSnip::PartialOffset(x0, x1, x2, x3);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = scheme_make_integer(x3);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+4, p));
  
  
  {
     double resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_double(v, "partial-offset in string-snip%"", extracting return value"));
     READY_TO_RETURN;
     return resval;
  }
  }
}

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

void os_wxTextSnip::GetExtent(class wxDC* x0, double x1, double x2, nndouble* x3, nndouble* x4, nndouble* x5, nndouble* x6, nndouble* x7, nndouble* x8)
{
  Scheme_Object *p[POFFSET+9] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+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 *) ASSELF __gc_external, os_wxTextSnip_class, "get-extent", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTextSnipGetExtent)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxTextSnip::GetExtent(x0, x1, x2, x3, x4, x5, x6, x7, x8);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = ((x3) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x3))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[POFFSET+4] = ((x4) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x4))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[POFFSET+5] = ((x5) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x5))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[POFFSET+6] = ((x6) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x6))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[POFFSET+7] = ((x7) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x7))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[POFFSET+8] = ((x8) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x8))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+9, p));
  
  if (x3) *x3 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+3], "get-extent in string-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(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[POFFSET+4], "get-extent in string-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(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[POFFSET+5], "get-extent in string-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(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[POFFSET+6], "get-extent in string-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(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[POFFSET+7], "get-extent in string-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(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[POFFSET+8], "get-extent in string-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in string-snip%"", extracting return value via box"", extracting boxed argument")));
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxTextSnipRead(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxTextSnip_class, "read in string-snip%", n, p);
  nnlong x0;
  class wxMediaStreamIn* x1 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "read in string-snip%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_wxMediaStreamIn(p[POFFSET+1], "read in string-snip%", 0));

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

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxTextSnipInsert(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxTextSnip_class, "insert in string-snip%", n, p);
  mzstring x0 INIT_NULLED_OUT;
  nnlong x1;
  nnlong x2;

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

  
  x0 = (mzstring)WITH_VAR_STACK(objscheme_unbundle_mzstring(p[POFFSET+0], "insert in string-snip%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+1], "insert in string-snip%"));
  if (n > (POFFSET+2)) {
    x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+2], "insert in string-snip%"));
  } else
    x2 = 0;

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

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxTextSnipSetUnmodified(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxTextSnip_class, "set-unmodified in string-snip%", n, p);

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

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTextSnip::SetUnmodified());
  else
    WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->SetUnmodified());

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxTextSnipGetScrollStepOffset(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  nndouble r;
  objscheme_check_valid(os_wxTextSnip_class, "get-scroll-step-offset in string-snip%", n, p);
  nnlong x0;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "get-scroll-step-offset in string-snip%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTextSnip::GetScrollStepOffset(x0));
  else
    r = WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->GetScrollStepOffset(x0));

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

static Scheme_Object *os_wxTextSnipFindScrollStep(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  nnlong r;
  objscheme_check_valid(os_wxTextSnip_class, "find-scroll-step in string-snip%", n, p);
  double x0;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+0], "find-scroll-step in string-snip%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTextSnip::FindScrollStep(x0));
  else
    r = WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->FindScrollStep(x0));

  
  
  READY_TO_RETURN;
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxTextSnipGetNumScrollSteps(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  nnlong r;
  objscheme_check_valid(os_wxTextSnip_class, "get-num-scroll-steps in string-snip%", n, p);

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

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTextSnip::GetNumScrollSteps());
  else
    r = WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->GetNumScrollSteps());

  
  
  READY_TO_RETURN;
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxTextSnipSetAdmin(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxTextSnip_class, "set-admin in string-snip%", n, p);
  class wxSnipAdmin* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnipAdmin(p[POFFSET+0], "set-admin in string-snip%", 1));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTextSnip::SetAdmin(x0));
  else
    WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->SetAdmin(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxTextSnipResize(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxTextSnip_class, "resize in string-snip%", n, p);
  nndouble x0;
  nndouble x1;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(p[POFFSET+0], "resize in string-snip%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(p[POFFSET+1], "resize in string-snip%"));

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

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

static Scheme_Object *os_wxTextSnipWrite(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxTextSnip_class, "write in string-snip%", n, p);
  class wxMediaStreamOut* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxMediaStreamOut(p[POFFSET+0], "write in string-snip%", 0));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTextSnip::Write(x0));
  else
    WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->Write(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxTextSnipMatch(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxTextSnip_class, "match? in string-snip%", n, p);
  class wxSnip* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnip(p[POFFSET+0], "match? in string-snip%", 0));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTextSnip::Match(x0));
  else
    r = WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->Match(x0));

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

static Scheme_Object *os_wxTextSnipCanEdit(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxTextSnip_class, "can-do-edit-operation? in string-snip%", n, p);
  int x0;
  Bool x1;

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

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

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTextSnip::CanEdit(x0, x1));
  else
    r = WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->CanEdit(x0, x1));

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

static Scheme_Object *os_wxTextSnipDoEdit(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxTextSnip_class, "do-edit-operation in string-snip%", n, p);
  int x0;
  Bool x1;
  long x2;

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

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

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

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxTextSnipBlinkCaret(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxTextSnip_class, "blink-caret in string-snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "blink-caret in string-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "blink-caret in string-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "blink-caret in string-snip%"));

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

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxTextSnipOwnCaret(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxTextSnip_class, "own-caret in string-snip%", n, p);
  Bool x0;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+0], "own-caret in string-snip%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTextSnip::OwnCaret(x0));
  else
    WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->OwnCaret(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxTextSnipAdjustCursor(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxCursor* r;
  objscheme_check_valid(os_wxTextSnip_class, "adjust-cursor in string-snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;
  double x3;
  double x4;
  class wxMouseEvent* x5 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "adjust-cursor in string-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "adjust-cursor in string-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "adjust-cursor in string-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+3], "adjust-cursor in string-snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+4], "adjust-cursor in string-snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[POFFSET+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[POFFSET+0]));
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTextSnip::AdjustCursor(x0, x1, x2, x3, x4, x5));
  else
    r = WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->AdjustCursor(x0, x1, x2, x3, x4, x5));

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

static Scheme_Object *os_wxTextSnipOnChar(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxTextSnip_class, "on-char in string-snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;
  double x3;
  double x4;
  class wxKeyEvent* x5 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "on-char in string-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "on-char in string-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "on-char in string-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+3], "on-char in string-snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+4], "on-char in string-snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_wxKeyEvent(p[POFFSET+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[POFFSET+0]));
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTextSnip::OnChar(x0, x1, x2, x3, x4, x5));
  else
    WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->OnChar(x0, x1, x2, x3, x4, x5));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxTextSnipOnEvent(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxTextSnip_class, "on-event in string-snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;
  double x3;
  double x4;
  class wxMouseEvent* x5 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "on-event in string-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "on-event in string-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "on-event in string-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+3], "on-event in string-snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+4], "on-event in string-snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[POFFSET+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[POFFSET+0]));
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTextSnip::OnEvent(x0, x1, x2, x3, x4, x5));
  else
    WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->OnEvent(x0, x1, x2, x3, x4, x5));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxTextSnipSizeCacheInvalid(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxTextSnip_class, "size-cache-invalid in string-snip%", n, p);

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

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTextSnip::SizeCacheInvalid());
  else
    WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->SizeCacheInvalid());

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxTextSnipCopy(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxSnip* r;
  objscheme_check_valid(os_wxTextSnip_class, "copy in string-snip%", n, p);

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

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTextSnip::Copy());
  else
    r = WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->Copy());

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

static Scheme_Object *os_wxTextSnipGetTextBang(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxTextSnip_class, "get-text! in string-snip%", n, p);
  wmzstring x0 INIT_NULLED_OUT;
  nnlong x1;
  nnlong x2;
  nnlong x3;

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

  
  x0 = (wmzstring)WITH_VAR_STACK(objscheme_unbundle_mutable_mzstring(p[POFFSET+0], "get-text! in string-snip%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+1], "get-text! in string-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+2], "get-text! in string-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+3], "get-text! in string-snip%"));

  if (SCHEME_CHAR_STRTAG_VAL(p[0+POFFSET]) < (x2 + x3)) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","get-text!"), "string too short: ", p[0+POFFSET]));
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTextSnip::GetTextBang(x0, x1, x2, x3));
  else
    WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->GetTextBang(x0, x1, x2, x3));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxTextSnipGetText(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  mzstring r;
  objscheme_check_valid(os_wxTextSnip_class, "get-text in string-snip%", n, p);
  nnlong x0;
  nnlong x1;
  Bool x2;
  long _x3;
  long* x3 = &_x3;

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

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

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

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

static Scheme_Object *os_wxTextSnipMergeWith(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxSnip* r;
  objscheme_check_valid(os_wxTextSnip_class, "merge-with in string-snip%", n, p);
  class wxSnip* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnip(p[POFFSET+0], "merge-with in string-snip%", 0));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTextSnip::MergeWith(x0));
  else
    r = WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->MergeWith(x0));

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

static Scheme_Object *os_wxTextSnipSplit(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxTextSnip_class, "split in string-snip%", n, p);
  nnlong x0;
  class wxSnip* _x1;
  class wxSnip** x1 = &_x1;
  class wxSnip* _x2;
  class wxSnip** x2 = &_x2;
  Scheme_Object *sbox_tmp;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "split in string-snip%"));
      *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[POFFSET+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[POFFSET+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 *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTextSnip::Split(x0, x1, x2));
  else
    WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->Split(x0, x1, x2));

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

static Scheme_Object *os_wxTextSnipDraw(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxTextSnip_class, "draw in string-snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;
  double x3;
  double x4;
  double x5;
  double x6;
  double x7;
  double x8;
  int x9;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "draw in string-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "draw in string-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "draw in string-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+3], "draw in string-snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+4], "draw in string-snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+5], "draw in string-snip%"));
  x6 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+6], "draw in string-snip%"));
  x7 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+7], "draw in string-snip%"));
  x8 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+8], "draw in string-snip%"));
  x9 = WITH_VAR_STACK(unbundle_symset_caret(p[POFFSET+9], "draw in string-snip%"));

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

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxTextSnipPartialOffset(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  double r;
  objscheme_check_valid(os_wxTextSnip_class, "partial-offset in string-snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;
  nnlong x3;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "partial-offset in string-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "partial-offset in string-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "partial-offset in string-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+3], "partial-offset in string-snip%"));

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

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

static Scheme_Object *os_wxTextSnipGetExtent(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxTextSnip_class, "get-extent in string-snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;
  nndouble _x3;
  nndouble* x3 = &_x3;
  nndouble _x4;
  nndouble* x4 = &_x4;
  nndouble _x5;
  nndouble* x5 = &_x5;
  nndouble _x6;
  nndouble* x6 = &_x6;
  nndouble _x7;
  nndouble* x7 = &_x7;
  nndouble _x8;
  nndouble* x8 = &_x8;
  Scheme_Object *sbox_tmp;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "get-extent in string-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "get-extent in string-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "get-extent in string-snip%"));
  if (n > (POFFSET+3)) {
    if (XC_SCHEME_NULLP(p[POFFSET+3]))
    x3 = NULL;
  else
    *x3 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+3], "get-extent in string-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in string-snip%"", extracting boxed argument")));
  } else
    x3 = NULL;
  if (n > (POFFSET+4)) {
    if (XC_SCHEME_NULLP(p[POFFSET+4]))
    x4 = NULL;
  else
    *x4 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+4], "get-extent in string-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in string-snip%"", extracting boxed argument")));
  } else
    x4 = NULL;
  if (n > (POFFSET+5)) {
    if (XC_SCHEME_NULLP(p[POFFSET+5]))
    x5 = NULL;
  else
    *x5 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+5], "get-extent in string-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in string-snip%"", extracting boxed argument")));
  } else
    x5 = NULL;
  if (n > (POFFSET+6)) {
    if (XC_SCHEME_NULLP(p[POFFSET+6]))
    x6 = NULL;
  else
    *x6 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+6], "get-extent in string-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in string-snip%"", extracting boxed argument")));
  } else
    x6 = NULL;
  if (n > (POFFSET+7)) {
    if (XC_SCHEME_NULLP(p[POFFSET+7]))
    x7 = NULL;
  else
    *x7 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+7], "get-extent in string-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in string-snip%"", extracting boxed argument")));
  } else
    x7 = NULL;
  if (n > (POFFSET+8)) {
    if (XC_SCHEME_NULLP(p[POFFSET+8]))
    x8 = NULL;
  else
    *x8 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+8], "get-extent in string-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(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[POFFSET+0]));
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTextSnip::GetExtent(x0, x1, x2, x3, x4, x5, x6, x7, x8));
  else
    WITH_VAR_STACK(((wxTextSnip *)((Scheme_Class_Object *)p[0])->primdata)->GetExtent(x0, x1, x2, x3, x4, x5, x6, x7, x8));

  
  if (n > (POFFSET+3) && !XC_SCHEME_NULLP(p[POFFSET+3]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x3)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+3], sbv_)); } 
  if (n > (POFFSET+4) && !XC_SCHEME_NULLP(p[POFFSET+4]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x4)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+4], sbv_)); } 
  if (n > (POFFSET+5) && !XC_SCHEME_NULLP(p[POFFSET+5]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x5)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+5], sbv_)); } 
  if (n > (POFFSET+6) && !XC_SCHEME_NULLP(p[POFFSET+6]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x6)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+6], sbv_)); } 
  if (n > (POFFSET+7) && !XC_SCHEME_NULLP(p[POFFSET+7]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x7)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+7], sbv_)); } 
  if (n > (POFFSET+8) && !XC_SCHEME_NULLP(p[POFFSET+8]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x8)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+8], sbv_)); } 
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxTextSnip_ConstructScheme(int n,  Scheme_Object *p[])
{
  SETUP_PRE_VAR_STACK(1);
  PRE_VAR_STACK_PUSH(0, p);
  os_wxTextSnip *realobj INIT_NULLED_OUT;
  REMEMBER_VAR_STACK();
  if ((n >= (POFFSET+1)) && WITH_REMEMBERED_STACK(objscheme_istype_mzstring(p[POFFSET+0], NULL))) {
    mzstring x0 INIT_NULLED_OUT;
    long x1;

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

    
    if (n != (POFFSET+1)) 
      WITH_VAR_STACK(scheme_wrong_count_m("initialization in string-snip% (initial string case)", POFFSET+1, POFFSET+1, n, p, 1));
    x0 = (mzstring)WITH_VAR_STACK(objscheme_unbundle_mzstring(p[POFFSET+0], "initialization in string-snip% (initial string case)"));

    x1 = SCHEME_CHAR_STRLEN_VAL(p[POFFSET]);
    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 *)p[0];
    
    
    READY_TO_PRE_RETURN;
  } else  {
    nnlong x0;

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

    
    if ((n > (POFFSET+1))) 
      WITH_VAR_STACK(scheme_wrong_count_m("initialization in string-snip% (initial size case)", POFFSET+POFFSET, POFFSET+1, n, p, 1));
    if (n > (POFFSET+0)) {
      x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+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 *)p[0];
    
    
    READY_TO_PRE_RETURN;
  }

  ((Scheme_Class_Object *)p[0])->primdata = realobj;
  ((Scheme_Class_Object *)p[0])->primflag = 1;
  return scheme_void;
}

void objscheme_setup_wxTextSnip(Scheme_Env *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%", (Scheme_Method_Prim *)os_wxTextSnip_ConstructScheme, 26));

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

  READY_TO_RETURN;
}

int objscheme_istype_wxTextSnip(Scheme_Object *obj, const char *stop, int nullOK)
{
  REMEMBER_VAR_STACK();
  if (nullOK && XC_SCHEME_NULLP(obj)) return 1;
  if (objscheme_is_a(obj,  os_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))))
    { READY_TO_RETURN; return sobj; }
  obj = (Scheme_Class_Object *)WITH_VAR_STACK(scheme_make_uninited_object(os_wxTextSnip_class));

  obj->primdata = realobj;
  obj->primflag = 0;

  realobj->__gc_external = (void *)obj;
  READY_TO_RETURN;
  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(NULL, NULL, 0, &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();
  void SetUnmodified();
  nndouble GetScrollStepOffset(nnlong x0);
  nnlong FindScrollStep(double x0);
  nnlong GetNumScrollSteps();
  void SetAdmin(class wxSnipAdmin* x0);
  Bool Resize(nndouble x0, nndouble x1);
  void Write(class wxMediaStreamOut* x0);
  Bool Match(class wxSnip* x0);
  Bool CanEdit(int x0, Bool x1 = TRUE);
  void DoEdit(int x0, Bool x1 = TRUE, long x2 = 0);
  void BlinkCaret(class wxDC* x0, double x1, double x2);
  void OwnCaret(Bool x0);
  class wxCursor* AdjustCursor(class wxDC* x0, double x1, double x2, double x3, double x4, class wxMouseEvent* x5);
  void OnChar(class wxDC* x0, double x1, double x2, double x3, double x4, class wxKeyEvent* x5);
  void OnEvent(class wxDC* x0, double x1, double x2, double x3, double x4, class wxMouseEvent* x5);
  void SizeCacheInvalid();
  class wxSnip* Copy();
  void GetTextBang(wmzstring x0, nnlong x1, nnlong x2, nnlong x3);
  mzstring 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, double x1, double x2, double x3, double x4, double x5, double x6, double x7, double x8, int x9);
  double PartialOffset(class wxDC* x0, double x1, double x2, nnlong x3);
  void GetExtent(class wxDC* x0, double x1, double x2, nndouble* x3 = NULL, nndouble* x4 = NULL, nndouble* x5 = NULL, nndouble* x6 = NULL, nndouble* x7 = NULL, nndouble* 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);
}

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

void os_wxTabSnip::SetUnmodified()
{
  Scheme_Object *p[POFFSET+0] 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, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTabSnip_class, "set-unmodified", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTabSnipSetUnmodified)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxTabSnip::SetUnmodified();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

nndouble os_wxTabSnip::GetScrollStepOffset(nnlong x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTabSnip_class, "get-scroll-step-offset", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTabSnipGetScrollStepOffset)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxTabSnip::GetScrollStepOffset(x0);
  } else {
  
  p[POFFSET+0] = scheme_make_integer(x0);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
  
  
  {
     nndouble resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(v, "get-scroll-step-offset in tab-snip%"", extracting return value"));
     READY_TO_RETURN;
     return resval;
  }
  }
}

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

nnlong os_wxTabSnip::FindScrollStep(double x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTabSnip_class, "find-scroll-step", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTabSnipFindScrollStep)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxTabSnip::FindScrollStep(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(scheme_make_double(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

nnlong os_wxTabSnip::GetNumScrollSteps()
{
  Scheme_Object *p[POFFSET+0] 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, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTabSnip_class, "get-num-scroll-steps", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTabSnipGetNumScrollSteps)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxTabSnip::GetNumScrollSteps();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

void os_wxTabSnip::SetAdmin(class wxSnipAdmin* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTabSnip_class, "set-admin", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTabSnipSetAdmin)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxTabSnip::SetAdmin(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxSnipAdmin(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

Bool os_wxTabSnip::Resize(nndouble x0, nndouble x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+2);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTabSnip_class, "resize", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTabSnipResize)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxTabSnip::Resize(x0, x1);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(scheme_make_double(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

void os_wxTabSnip::Write(class wxMediaStreamOut* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTabSnip_class, "write", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTabSnipWrite)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxTabSnip::Write(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxMediaStreamOut(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

Bool os_wxTabSnip::Match(class wxSnip* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTabSnip_class, "match?", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTabSnipMatch)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxTabSnip::Match(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxSnip(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

Bool os_wxTabSnip::CanEdit(int x0, Bool x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+2);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTabSnip_class, "can-do-edit-operation?", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTabSnipCanEdit)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxTabSnip::CanEdit(x0, x1);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(bundle_symset_editOp(x0));
  p[POFFSET+1] = (x1 ? scheme_true : scheme_false);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

void os_wxTabSnip::DoEdit(int x0, Bool x1, long x2)
{
  Scheme_Object *p[POFFSET+3] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+3);
  SET_VAR_STACK();

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

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

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

void os_wxTabSnip::BlinkCaret(class wxDC* x0, double x1, double x2)
{
  Scheme_Object *p[POFFSET+3] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+3);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

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

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

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

void os_wxTabSnip::OwnCaret(Bool x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  SET_VAR_STACK();

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

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

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

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

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTabSnip_class, "adjust-cursor", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTabSnipAdjustCursor)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxTabSnip::AdjustCursor(x0, x1, x2, x3, x4, x5);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = WITH_VAR_STACK(scheme_make_double(x3));
  p[POFFSET+4] = WITH_VAR_STACK(scheme_make_double(x4));
  p[POFFSET+5] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x5));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

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

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTabSnip_class, "on-char", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTabSnipOnChar)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxTabSnip::OnChar(x0, x1, x2, x3, x4, x5);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = WITH_VAR_STACK(scheme_make_double(x3));
  p[POFFSET+4] = WITH_VAR_STACK(scheme_make_double(x4));
  p[POFFSET+5] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x5));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

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

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTabSnip_class, "on-event", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTabSnipOnEvent)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxTabSnip::OnEvent(x0, x1, x2, x3, x4, x5);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = WITH_VAR_STACK(scheme_make_double(x3));
  p[POFFSET+4] = WITH_VAR_STACK(scheme_make_double(x4));
  p[POFFSET+5] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x5));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

void os_wxTabSnip::SizeCacheInvalid()
{
  Scheme_Object *p[POFFSET+0] 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, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTabSnip_class, "size-cache-invalid", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTabSnipSizeCacheInvalid)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxTabSnip::SizeCacheInvalid();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

class wxSnip* os_wxTabSnip::Copy()
{
  Scheme_Object *p[POFFSET+0] 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, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTabSnip_class, "copy", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTabSnipCopy)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxTabSnip::Copy();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
  
  
  {
     class wxSnip* resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_wxSnip(v, "copy in tab-snip%"", extracting return value", 0));
     READY_TO_RETURN;
     return resval;
  }
  }
}

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

void os_wxTabSnip::GetTextBang(wmzstring x0, nnlong x1, nnlong x2, nnlong x3)
{
  Scheme_Object *p[POFFSET+4] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+4);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTabSnip_class, "get-text!", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTabSnipGetTextBang)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxTabSnip::GetTextBang(x0, x1, x2, x3);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(scheme_make_sized_char_string(x0, x2+x3, 0));
  p[POFFSET+1] = scheme_make_integer(x1);
  p[POFFSET+2] = scheme_make_integer(x2);
  p[POFFSET+3] = scheme_make_integer(x3);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

mzstring os_wxTabSnip::GetText(nnlong x0, nnlong x1, Bool x2, long* x3)
{
  Scheme_Object *p[POFFSET+3] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+3);
  SET_VAR_STACK();

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

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+3, p));
  
  
  {
     mzstring resval;
     resval = (mzstring)WITH_VAR_STACK(objscheme_unbundle_mzstring(v, "get-text in tab-snip%"", extracting return value"));
     READY_TO_RETURN;
     return resval;
  }
  }
}

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

class wxSnip* os_wxTabSnip::MergeWith(class wxSnip* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTabSnip_class, "merge-with", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTabSnipMergeWith)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxTabSnip::MergeWith(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxSnip(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
  
  
  {
     class wxSnip* resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_wxSnip(v, "merge-with in tab-snip%"", extracting return value", 1));
     READY_TO_RETURN;
     return resval;
  }
  }
}

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

void os_wxTabSnip::Split(nnlong x0, class wxSnip** x1, class wxSnip** x2)
{
  Scheme_Object *p[POFFSET+3] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+3);
  VAR_STACK_PUSH(5, x1);
  VAR_STACK_PUSH(6, x2);
  SET_VAR_STACK();

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

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+3, p));
  
  if (x1) *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[POFFSET+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[POFFSET+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)));
  
     READY_TO_RETURN;
  }
}

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

void os_wxTabSnip::Draw(class wxDC* x0, double x1, double x2, double x3, double x4, double x5, double x6, double x7, double x8, int x9)
{
  Scheme_Object *p[POFFSET+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 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, POFFSET+10);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTabSnip_class, "draw", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTabSnipDraw)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxTabSnip::Draw(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = WITH_VAR_STACK(scheme_make_double(x3));
  p[POFFSET+4] = WITH_VAR_STACK(scheme_make_double(x4));
  p[POFFSET+5] = WITH_VAR_STACK(scheme_make_double(x5));
  p[POFFSET+6] = WITH_VAR_STACK(scheme_make_double(x6));
  p[POFFSET+7] = WITH_VAR_STACK(scheme_make_double(x7));
  p[POFFSET+8] = WITH_VAR_STACK(scheme_make_double(x8));
  p[POFFSET+9] = WITH_VAR_STACK(bundle_symset_caret(x9));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

double os_wxTabSnip::PartialOffset(class wxDC* x0, double x1, double x2, nnlong x3)
{
  Scheme_Object *p[POFFSET+4] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+4);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTabSnip_class, "partial-offset", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTabSnipPartialOffset)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxTabSnip::PartialOffset(x0, x1, x2, x3);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = scheme_make_integer(x3);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+4, p));
  
  
  {
     double resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_double(v, "partial-offset in tab-snip%"", extracting return value"));
     READY_TO_RETURN;
     return resval;
  }
  }
}

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

void os_wxTabSnip::GetExtent(class wxDC* x0, double x1, double x2, nndouble* x3, nndouble* x4, nndouble* x5, nndouble* x6, nndouble* x7, nndouble* x8)
{
  Scheme_Object *p[POFFSET+9] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+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 *) ASSELF __gc_external, os_wxTabSnip_class, "get-extent", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTabSnipGetExtent)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxTabSnip::GetExtent(x0, x1, x2, x3, x4, x5, x6, x7, x8);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = ((x3) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x3))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[POFFSET+4] = ((x4) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x4))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[POFFSET+5] = ((x5) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x5))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[POFFSET+6] = ((x6) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x6))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[POFFSET+7] = ((x7) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x7))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[POFFSET+8] = ((x8) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x8))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+9, p));
  
  if (x3) *x3 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+3], "get-extent in tab-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(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[POFFSET+4], "get-extent in tab-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(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[POFFSET+5], "get-extent in tab-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(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[POFFSET+6], "get-extent in tab-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(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[POFFSET+7], "get-extent in tab-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(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[POFFSET+8], "get-extent in tab-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in tab-snip%"", extracting return value via box"", extracting boxed argument")));
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxTabSnipSetUnmodified(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxTabSnip_class, "set-unmodified in tab-snip%", n, p);

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

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTabSnip::SetUnmodified());
  else
    WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->SetUnmodified());

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxTabSnipGetScrollStepOffset(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  nndouble r;
  objscheme_check_valid(os_wxTabSnip_class, "get-scroll-step-offset in tab-snip%", n, p);
  nnlong x0;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "get-scroll-step-offset in tab-snip%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTabSnip::GetScrollStepOffset(x0));
  else
    r = WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->GetScrollStepOffset(x0));

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

static Scheme_Object *os_wxTabSnipFindScrollStep(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  nnlong r;
  objscheme_check_valid(os_wxTabSnip_class, "find-scroll-step in tab-snip%", n, p);
  double x0;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+0], "find-scroll-step in tab-snip%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTabSnip::FindScrollStep(x0));
  else
    r = WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->FindScrollStep(x0));

  
  
  READY_TO_RETURN;
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxTabSnipGetNumScrollSteps(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  nnlong r;
  objscheme_check_valid(os_wxTabSnip_class, "get-num-scroll-steps in tab-snip%", n, p);

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

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTabSnip::GetNumScrollSteps());
  else
    r = WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->GetNumScrollSteps());

  
  
  READY_TO_RETURN;
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxTabSnipSetAdmin(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxTabSnip_class, "set-admin in tab-snip%", n, p);
  class wxSnipAdmin* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnipAdmin(p[POFFSET+0], "set-admin in tab-snip%", 1));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTabSnip::SetAdmin(x0));
  else
    WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->SetAdmin(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxTabSnipResize(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxTabSnip_class, "resize in tab-snip%", n, p);
  nndouble x0;
  nndouble x1;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(p[POFFSET+0], "resize in tab-snip%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(p[POFFSET+1], "resize in tab-snip%"));

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

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

static Scheme_Object *os_wxTabSnipWrite(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxTabSnip_class, "write in tab-snip%", n, p);
  class wxMediaStreamOut* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxMediaStreamOut(p[POFFSET+0], "write in tab-snip%", 0));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTabSnip::Write(x0));
  else
    WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->Write(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxTabSnipMatch(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxTabSnip_class, "match? in tab-snip%", n, p);
  class wxSnip* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnip(p[POFFSET+0], "match? in tab-snip%", 0));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTabSnip::Match(x0));
  else
    r = WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->Match(x0));

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

static Scheme_Object *os_wxTabSnipCanEdit(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxTabSnip_class, "can-do-edit-operation? in tab-snip%", n, p);
  int x0;
  Bool x1;

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

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

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTabSnip::CanEdit(x0, x1));
  else
    r = WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->CanEdit(x0, x1));

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

static Scheme_Object *os_wxTabSnipDoEdit(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxTabSnip_class, "do-edit-operation in tab-snip%", n, p);
  int x0;
  Bool x1;
  long x2;

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

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

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

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxTabSnipBlinkCaret(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxTabSnip_class, "blink-caret in tab-snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "blink-caret in tab-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "blink-caret in tab-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "blink-caret in tab-snip%"));

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

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxTabSnipOwnCaret(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxTabSnip_class, "own-caret in tab-snip%", n, p);
  Bool x0;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+0], "own-caret in tab-snip%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTabSnip::OwnCaret(x0));
  else
    WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->OwnCaret(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxTabSnipAdjustCursor(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxCursor* r;
  objscheme_check_valid(os_wxTabSnip_class, "adjust-cursor in tab-snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;
  double x3;
  double x4;
  class wxMouseEvent* x5 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "adjust-cursor in tab-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "adjust-cursor in tab-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "adjust-cursor in tab-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+3], "adjust-cursor in tab-snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+4], "adjust-cursor in tab-snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[POFFSET+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[POFFSET+0]));
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTabSnip::AdjustCursor(x0, x1, x2, x3, x4, x5));
  else
    r = WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->AdjustCursor(x0, x1, x2, x3, x4, x5));

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

static Scheme_Object *os_wxTabSnipOnChar(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxTabSnip_class, "on-char in tab-snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;
  double x3;
  double x4;
  class wxKeyEvent* x5 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "on-char in tab-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "on-char in tab-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "on-char in tab-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+3], "on-char in tab-snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+4], "on-char in tab-snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_wxKeyEvent(p[POFFSET+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[POFFSET+0]));
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTabSnip::OnChar(x0, x1, x2, x3, x4, x5));
  else
    WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->OnChar(x0, x1, x2, x3, x4, x5));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxTabSnipOnEvent(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxTabSnip_class, "on-event in tab-snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;
  double x3;
  double x4;
  class wxMouseEvent* x5 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "on-event in tab-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "on-event in tab-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "on-event in tab-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+3], "on-event in tab-snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+4], "on-event in tab-snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[POFFSET+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[POFFSET+0]));
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTabSnip::OnEvent(x0, x1, x2, x3, x4, x5));
  else
    WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->OnEvent(x0, x1, x2, x3, x4, x5));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxTabSnipSizeCacheInvalid(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxTabSnip_class, "size-cache-invalid in tab-snip%", n, p);

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

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTabSnip::SizeCacheInvalid());
  else
    WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->SizeCacheInvalid());

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxTabSnipCopy(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxSnip* r;
  objscheme_check_valid(os_wxTabSnip_class, "copy in tab-snip%", n, p);

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

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTabSnip::Copy());
  else
    r = WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->Copy());

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

static Scheme_Object *os_wxTabSnipGetTextBang(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxTabSnip_class, "get-text! in tab-snip%", n, p);
  wmzstring x0 INIT_NULLED_OUT;
  nnlong x1;
  nnlong x2;
  nnlong x3;

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

  
  x0 = (wmzstring)WITH_VAR_STACK(objscheme_unbundle_mutable_mzstring(p[POFFSET+0], "get-text! in tab-snip%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+1], "get-text! in tab-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+2], "get-text! in tab-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+3], "get-text! in tab-snip%"));

  if (SCHEME_CHAR_STRTAG_VAL(p[0+POFFSET]) < (x2 + x3)) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","get-text!"), "string too short: ", p[0+POFFSET]));
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTabSnip::GetTextBang(x0, x1, x2, x3));
  else
    WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->GetTextBang(x0, x1, x2, x3));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxTabSnipGetText(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  mzstring r;
  objscheme_check_valid(os_wxTabSnip_class, "get-text in tab-snip%", n, p);
  nnlong x0;
  nnlong x1;
  Bool x2;
  long _x3;
  long* x3 = &_x3;

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

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

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

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

static Scheme_Object *os_wxTabSnipMergeWith(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxSnip* r;
  objscheme_check_valid(os_wxTabSnip_class, "merge-with in tab-snip%", n, p);
  class wxSnip* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnip(p[POFFSET+0], "merge-with in tab-snip%", 0));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTabSnip::MergeWith(x0));
  else
    r = WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->MergeWith(x0));

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

static Scheme_Object *os_wxTabSnipSplit(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxTabSnip_class, "split in tab-snip%", n, p);
  nnlong x0;
  class wxSnip* _x1;
  class wxSnip** x1 = &_x1;
  class wxSnip* _x2;
  class wxSnip** x2 = &_x2;
  Scheme_Object *sbox_tmp;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "split in tab-snip%"));
      *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[POFFSET+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[POFFSET+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 *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTabSnip::Split(x0, x1, x2));
  else
    WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->Split(x0, x1, x2));

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

static Scheme_Object *os_wxTabSnipDraw(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxTabSnip_class, "draw in tab-snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;
  double x3;
  double x4;
  double x5;
  double x6;
  double x7;
  double x8;
  int x9;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "draw in tab-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "draw in tab-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "draw in tab-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+3], "draw in tab-snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+4], "draw in tab-snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+5], "draw in tab-snip%"));
  x6 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+6], "draw in tab-snip%"));
  x7 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+7], "draw in tab-snip%"));
  x8 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+8], "draw in tab-snip%"));
  x9 = WITH_VAR_STACK(unbundle_symset_caret(p[POFFSET+9], "draw in tab-snip%"));

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

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxTabSnipPartialOffset(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  double r;
  objscheme_check_valid(os_wxTabSnip_class, "partial-offset in tab-snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;
  nnlong x3;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "partial-offset in tab-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "partial-offset in tab-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "partial-offset in tab-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+3], "partial-offset in tab-snip%"));

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

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

static Scheme_Object *os_wxTabSnipGetExtent(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxTabSnip_class, "get-extent in tab-snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;
  nndouble _x3;
  nndouble* x3 = &_x3;
  nndouble _x4;
  nndouble* x4 = &_x4;
  nndouble _x5;
  nndouble* x5 = &_x5;
  nndouble _x6;
  nndouble* x6 = &_x6;
  nndouble _x7;
  nndouble* x7 = &_x7;
  nndouble _x8;
  nndouble* x8 = &_x8;
  Scheme_Object *sbox_tmp;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "get-extent in tab-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "get-extent in tab-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "get-extent in tab-snip%"));
  if (n > (POFFSET+3)) {
    if (XC_SCHEME_NULLP(p[POFFSET+3]))
    x3 = NULL;
  else
    *x3 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+3], "get-extent in tab-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in tab-snip%"", extracting boxed argument")));
  } else
    x3 = NULL;
  if (n > (POFFSET+4)) {
    if (XC_SCHEME_NULLP(p[POFFSET+4]))
    x4 = NULL;
  else
    *x4 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+4], "get-extent in tab-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in tab-snip%"", extracting boxed argument")));
  } else
    x4 = NULL;
  if (n > (POFFSET+5)) {
    if (XC_SCHEME_NULLP(p[POFFSET+5]))
    x5 = NULL;
  else
    *x5 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+5], "get-extent in tab-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in tab-snip%"", extracting boxed argument")));
  } else
    x5 = NULL;
  if (n > (POFFSET+6)) {
    if (XC_SCHEME_NULLP(p[POFFSET+6]))
    x6 = NULL;
  else
    *x6 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+6], "get-extent in tab-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in tab-snip%"", extracting boxed argument")));
  } else
    x6 = NULL;
  if (n > (POFFSET+7)) {
    if (XC_SCHEME_NULLP(p[POFFSET+7]))
    x7 = NULL;
  else
    *x7 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+7], "get-extent in tab-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in tab-snip%"", extracting boxed argument")));
  } else
    x7 = NULL;
  if (n > (POFFSET+8)) {
    if (XC_SCHEME_NULLP(p[POFFSET+8]))
    x8 = NULL;
  else
    *x8 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+8], "get-extent in tab-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(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[POFFSET+0]));
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxTabSnip::GetExtent(x0, x1, x2, x3, x4, x5, x6, x7, x8));
  else
    WITH_VAR_STACK(((wxTabSnip *)((Scheme_Class_Object *)p[0])->primdata)->GetExtent(x0, x1, x2, x3, x4, x5, x6, x7, x8));

  
  if (n > (POFFSET+3) && !XC_SCHEME_NULLP(p[POFFSET+3]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x3)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+3], sbv_)); } 
  if (n > (POFFSET+4) && !XC_SCHEME_NULLP(p[POFFSET+4]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x4)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+4], sbv_)); } 
  if (n > (POFFSET+5) && !XC_SCHEME_NULLP(p[POFFSET+5]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x5)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+5], sbv_)); } 
  if (n > (POFFSET+6) && !XC_SCHEME_NULLP(p[POFFSET+6]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x6)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+6], sbv_)); } 
  if (n > (POFFSET+7) && !XC_SCHEME_NULLP(p[POFFSET+7]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x7)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+7], sbv_)); } 
  if (n > (POFFSET+8) && !XC_SCHEME_NULLP(p[POFFSET+8]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x8)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+8], sbv_)); } 
  
  READY_TO_RETURN;
  return scheme_void;
}

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

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

  
  if (n != (POFFSET+0)) 
    WITH_VAR_STACK(scheme_wrong_count_m("initialization in tab-snip%", POFFSET+0, POFFSET+0, n, p, 1));

  
  realobj = WITH_VAR_STACK(new os_wxTabSnip CONSTRUCTOR_ARGS(()));
#ifdef MZ_PRECISE_GC
  WITH_VAR_STACK(realobj->gcInit_wxTabSnip());
#endif
  realobj->__gc_external = (void *)p[0];
  
  
  READY_TO_RETURN;
  ((Scheme_Class_Object *)p[0])->primdata = realobj;
  ((Scheme_Class_Object *)p[0])->primflag = 1;
  return scheme_void;
}

void objscheme_setup_wxTabSnip(Scheme_Env *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%", (Scheme_Method_Prim *)os_wxTabSnip_ConstructScheme, 24));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "set-unmodified" " method", (Scheme_Method_Prim *)os_wxTabSnipSetUnmodified, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "get-scroll-step-offset" " method", (Scheme_Method_Prim *)os_wxTabSnipGetScrollStepOffset, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "find-scroll-step" " method", (Scheme_Method_Prim *)os_wxTabSnipFindScrollStep, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "get-num-scroll-steps" " method", (Scheme_Method_Prim *)os_wxTabSnipGetNumScrollSteps, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "set-admin" " method", (Scheme_Method_Prim *)os_wxTabSnipSetAdmin, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "resize" " method", (Scheme_Method_Prim *)os_wxTabSnipResize, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "write" " method", (Scheme_Method_Prim *)os_wxTabSnipWrite, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "match?" " method", (Scheme_Method_Prim *)os_wxTabSnipMatch, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "can-do-edit-operation?" " method", (Scheme_Method_Prim *)os_wxTabSnipCanEdit, 1, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "do-edit-operation" " method", (Scheme_Method_Prim *)os_wxTabSnipDoEdit, 1, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "blink-caret" " method", (Scheme_Method_Prim *)os_wxTabSnipBlinkCaret, 3, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "own-caret" " method", (Scheme_Method_Prim *)os_wxTabSnipOwnCaret, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "adjust-cursor" " method", (Scheme_Method_Prim *)os_wxTabSnipAdjustCursor, 6, 6));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "on-char" " method", (Scheme_Method_Prim *)os_wxTabSnipOnChar, 6, 6));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "on-event" " method", (Scheme_Method_Prim *)os_wxTabSnipOnEvent, 6, 6));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "size-cache-invalid" " method", (Scheme_Method_Prim *)os_wxTabSnipSizeCacheInvalid, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "copy" " method", (Scheme_Method_Prim *)os_wxTabSnipCopy, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "get-text!" " method", (Scheme_Method_Prim *)os_wxTabSnipGetTextBang, 4, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "get-text" " method", (Scheme_Method_Prim *)os_wxTabSnipGetText, 2, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "merge-with" " method", (Scheme_Method_Prim *)os_wxTabSnipMergeWith, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "split" " method", (Scheme_Method_Prim *)os_wxTabSnipSplit, 3, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "draw" " method", (Scheme_Method_Prim *)os_wxTabSnipDraw, 10, 10));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "partial-offset" " method", (Scheme_Method_Prim *)os_wxTabSnipPartialOffset, 4, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabSnip_class, "get-extent" " method", (Scheme_Method_Prim *)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));

  READY_TO_RETURN;
}

int objscheme_istype_wxTabSnip(Scheme_Object *obj, const char *stop, int nullOK)
{
  REMEMBER_VAR_STACK();
  if (nullOK && XC_SCHEME_NULLP(obj)) return 1;
  if (objscheme_is_a(obj,  os_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))))
    { READY_TO_RETURN; return sobj; }
  obj = (Scheme_Class_Object *)WITH_VAR_STACK(scheme_make_uninited_object(os_wxTabSnip_class));

  obj->primdata = realobj;
  obj->primflag = 0;

  realobj->__gc_external = (void *)obj;
  READY_TO_RETURN;
  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(NULL, NULL, 0, &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
#define wxBITMAP_TYPE_GIF_MASK (wxBITMAP_TYPE_GIF | wxBITMAP_TYPE_MASK)
#define wxBITMAP_TYPE_PNG_MASK (wxBITMAP_TYPE_PNG | wxBITMAP_TYPE_MASK)

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

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

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

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

















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





class os_wxImageSnip : public wxImageSnip {
 public:

  os_wxImageSnip CONSTRUCTOR_ARGS((nxpathname x0 = NULL, int x1 = 0, Bool x2 = FALSE, Bool x3 = TRUE));
#ifndef MZ_PRECISE_GC
  os_wxImageSnip CONSTRUCTOR_ARGS((class wxBitmap* x0, class wxBitmap* x1 = NULL));
#endif
  ~os_wxImageSnip();
  void SetUnmodified();
  nndouble GetScrollStepOffset(nnlong x0);
  nnlong FindScrollStep(double x0);
  nnlong GetNumScrollSteps();
  void SetAdmin(class wxSnipAdmin* x0);
  Bool Resize(nndouble x0, nndouble x1);
  void Write(class wxMediaStreamOut* x0);
  Bool Match(class wxSnip* x0);
  Bool CanEdit(int x0, Bool x1 = TRUE);
  void DoEdit(int x0, Bool x1 = TRUE, long x2 = 0);
  void BlinkCaret(class wxDC* x0, double x1, double x2);
  void OwnCaret(Bool x0);
  class wxCursor* AdjustCursor(class wxDC* x0, double x1, double x2, double x3, double x4, class wxMouseEvent* x5);
  void OnChar(class wxDC* x0, double x1, double x2, double x3, double x4, class wxKeyEvent* x5);
  void OnEvent(class wxDC* x0, double x1, double x2, double x3, double x4, class wxMouseEvent* x5);
  void SizeCacheInvalid();
  class wxSnip* Copy();
  void GetTextBang(wmzstring x0, nnlong x1, nnlong x2, nnlong x3);
  mzstring 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, double x1, double x2, double x3, double x4, double x5, double x6, double x7, double x8, int x9);
  double PartialOffset(class wxDC* x0, double x1, double x2, nnlong x3);
  void GetExtent(class wxDC* x0, double x1, double x2, nndouble* x3 = NULL, nndouble* x4 = NULL, nndouble* x5 = NULL, nndouble* x6 = NULL, nndouble* x7 = NULL, nndouble* 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((nxpathname 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, class wxBitmap* x1))
CONSTRUCTOR_INIT(: wxImageSnip(x0, x1))
{
}
#endif

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

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

void os_wxImageSnip::SetUnmodified()
{
  Scheme_Object *p[POFFSET+0] 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, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxImageSnip_class, "set-unmodified", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxImageSnipSetUnmodified)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxImageSnip::SetUnmodified();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

nndouble os_wxImageSnip::GetScrollStepOffset(nnlong x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxImageSnip_class, "get-scroll-step-offset", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxImageSnipGetScrollStepOffset)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxImageSnip::GetScrollStepOffset(x0);
  } else {
  
  p[POFFSET+0] = scheme_make_integer(x0);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
  
  
  {
     nndouble resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(v, "get-scroll-step-offset in image-snip%"", extracting return value"));
     READY_TO_RETURN;
     return resval;
  }
  }
}

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

nnlong os_wxImageSnip::FindScrollStep(double x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxImageSnip_class, "find-scroll-step", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxImageSnipFindScrollStep)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxImageSnip::FindScrollStep(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(scheme_make_double(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

nnlong os_wxImageSnip::GetNumScrollSteps()
{
  Scheme_Object *p[POFFSET+0] 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, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxImageSnip_class, "get-num-scroll-steps", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxImageSnipGetNumScrollSteps)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxImageSnip::GetNumScrollSteps();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

void os_wxImageSnip::SetAdmin(class wxSnipAdmin* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxImageSnip_class, "set-admin", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxImageSnipSetAdmin)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxImageSnip::SetAdmin(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxSnipAdmin(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

Bool os_wxImageSnip::Resize(nndouble x0, nndouble x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+2);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxImageSnip_class, "resize", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxImageSnipResize)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxImageSnip::Resize(x0, x1);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(scheme_make_double(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

void os_wxImageSnip::Write(class wxMediaStreamOut* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxImageSnip_class, "write", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxImageSnipWrite)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxImageSnip::Write(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxMediaStreamOut(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

Bool os_wxImageSnip::Match(class wxSnip* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxImageSnip_class, "match?", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxImageSnipMatch)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxImageSnip::Match(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxSnip(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

Bool os_wxImageSnip::CanEdit(int x0, Bool x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+2);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxImageSnip_class, "can-do-edit-operation?", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxImageSnipCanEdit)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxImageSnip::CanEdit(x0, x1);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(bundle_symset_editOp(x0));
  p[POFFSET+1] = (x1 ? scheme_true : scheme_false);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

void os_wxImageSnip::DoEdit(int x0, Bool x1, long x2)
{
  Scheme_Object *p[POFFSET+3] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+3);
  SET_VAR_STACK();

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

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

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

void os_wxImageSnip::BlinkCaret(class wxDC* x0, double x1, double x2)
{
  Scheme_Object *p[POFFSET+3] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+3);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

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

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

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

void os_wxImageSnip::OwnCaret(Bool x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  SET_VAR_STACK();

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

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

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

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

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxImageSnip_class, "adjust-cursor", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxImageSnipAdjustCursor)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxImageSnip::AdjustCursor(x0, x1, x2, x3, x4, x5);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = WITH_VAR_STACK(scheme_make_double(x3));
  p[POFFSET+4] = WITH_VAR_STACK(scheme_make_double(x4));
  p[POFFSET+5] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x5));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

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

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxImageSnip_class, "on-char", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxImageSnipOnChar)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxImageSnip::OnChar(x0, x1, x2, x3, x4, x5);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = WITH_VAR_STACK(scheme_make_double(x3));
  p[POFFSET+4] = WITH_VAR_STACK(scheme_make_double(x4));
  p[POFFSET+5] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x5));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

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

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxImageSnip_class, "on-event", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxImageSnipOnEvent)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxImageSnip::OnEvent(x0, x1, x2, x3, x4, x5);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = WITH_VAR_STACK(scheme_make_double(x3));
  p[POFFSET+4] = WITH_VAR_STACK(scheme_make_double(x4));
  p[POFFSET+5] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x5));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

void os_wxImageSnip::SizeCacheInvalid()
{
  Scheme_Object *p[POFFSET+0] 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, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxImageSnip_class, "size-cache-invalid", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxImageSnipSizeCacheInvalid)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxImageSnip::SizeCacheInvalid();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

class wxSnip* os_wxImageSnip::Copy()
{
  Scheme_Object *p[POFFSET+0] 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, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxImageSnip_class, "copy", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxImageSnipCopy)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxImageSnip::Copy();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
  
  
  {
     class wxSnip* resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_wxSnip(v, "copy in image-snip%"", extracting return value", 0));
     READY_TO_RETURN;
     return resval;
  }
  }
}

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

void os_wxImageSnip::GetTextBang(wmzstring x0, nnlong x1, nnlong x2, nnlong x3)
{
  Scheme_Object *p[POFFSET+4] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+4);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxImageSnip_class, "get-text!", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxImageSnipGetTextBang)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxImageSnip::GetTextBang(x0, x1, x2, x3);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(scheme_make_sized_char_string(x0, x2+x3, 0));
  p[POFFSET+1] = scheme_make_integer(x1);
  p[POFFSET+2] = scheme_make_integer(x2);
  p[POFFSET+3] = scheme_make_integer(x3);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

mzstring os_wxImageSnip::GetText(nnlong x0, nnlong x1, Bool x2, long* x3)
{
  Scheme_Object *p[POFFSET+3] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+3);
  SET_VAR_STACK();

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

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+3, p));
  
  
  {
     mzstring resval;
     resval = (mzstring)WITH_VAR_STACK(objscheme_unbundle_mzstring(v, "get-text in image-snip%"", extracting return value"));
     READY_TO_RETURN;
     return resval;
  }
  }
}

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

class wxSnip* os_wxImageSnip::MergeWith(class wxSnip* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxImageSnip_class, "merge-with", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxImageSnipMergeWith)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxImageSnip::MergeWith(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxSnip(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
  
  
  {
     class wxSnip* resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_wxSnip(v, "merge-with in image-snip%"", extracting return value", 1));
     READY_TO_RETURN;
     return resval;
  }
  }
}

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

void os_wxImageSnip::Split(nnlong x0, class wxSnip** x1, class wxSnip** x2)
{
  Scheme_Object *p[POFFSET+3] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+3);
  VAR_STACK_PUSH(5, x1);
  VAR_STACK_PUSH(6, x2);
  SET_VAR_STACK();

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

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+3, p));
  
  if (x1) *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[POFFSET+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[POFFSET+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)));
  
     READY_TO_RETURN;
  }
}

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

void os_wxImageSnip::Draw(class wxDC* x0, double x1, double x2, double x3, double x4, double x5, double x6, double x7, double x8, int x9)
{
  Scheme_Object *p[POFFSET+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 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, POFFSET+10);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxImageSnip_class, "draw", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxImageSnipDraw)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxImageSnip::Draw(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = WITH_VAR_STACK(scheme_make_double(x3));
  p[POFFSET+4] = WITH_VAR_STACK(scheme_make_double(x4));
  p[POFFSET+5] = WITH_VAR_STACK(scheme_make_double(x5));
  p[POFFSET+6] = WITH_VAR_STACK(scheme_make_double(x6));
  p[POFFSET+7] = WITH_VAR_STACK(scheme_make_double(x7));
  p[POFFSET+8] = WITH_VAR_STACK(scheme_make_double(x8));
  p[POFFSET+9] = WITH_VAR_STACK(bundle_symset_caret(x9));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

double os_wxImageSnip::PartialOffset(class wxDC* x0, double x1, double x2, nnlong x3)
{
  Scheme_Object *p[POFFSET+4] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+4);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxImageSnip_class, "partial-offset", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxImageSnipPartialOffset)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxImageSnip::PartialOffset(x0, x1, x2, x3);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = scheme_make_integer(x3);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+4, p));
  
  
  {
     double resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_double(v, "partial-offset in image-snip%"", extracting return value"));
     READY_TO_RETURN;
     return resval;
  }
  }
}

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

void os_wxImageSnip::GetExtent(class wxDC* x0, double x1, double x2, nndouble* x3, nndouble* x4, nndouble* x5, nndouble* x6, nndouble* x7, nndouble* x8)
{
  Scheme_Object *p[POFFSET+9] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+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 *) ASSELF __gc_external, os_wxImageSnip_class, "get-extent", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxImageSnipGetExtent)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxImageSnip::GetExtent(x0, x1, x2, x3, x4, x5, x6, x7, x8);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = ((x3) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x3))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[POFFSET+4] = ((x4) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x4))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[POFFSET+5] = ((x5) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x5))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[POFFSET+6] = ((x6) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x6))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[POFFSET+7] = ((x7) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x7))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[POFFSET+8] = ((x8) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x8))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+9, p));
  
  if (x3) *x3 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+3], "get-extent in image-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(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[POFFSET+4], "get-extent in image-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(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[POFFSET+5], "get-extent in image-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(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[POFFSET+6], "get-extent in image-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(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[POFFSET+7], "get-extent in image-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(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[POFFSET+8], "get-extent in image-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in image-snip%"", extracting return value via box"", extracting boxed argument")));
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxImageSnipSetOffset(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxImageSnip_class, "set-offset in image-snip%", n, p);
  double x0;
  double x1;

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

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

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

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxImageSnipGetSnipBitmapMask(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxBitmap* r;
  objscheme_check_valid(os_wxImageSnip_class, "get-bitmap-mask in image-snip%", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->GetSnipBitmapMask());

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

static Scheme_Object *os_wxImageSnipGetSnipBitmap(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxBitmap* r;
  objscheme_check_valid(os_wxImageSnip_class, "get-bitmap in image-snip%", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->GetSnipBitmap());

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

static Scheme_Object *os_wxImageSnipSetBitmap(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxImageSnip_class, "set-bitmap in image-snip%", n, p);
  class wxBitmap* x0 INIT_NULLED_OUT;
  class wxBitmap* x1 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxBitmap(p[POFFSET+0], "set-bitmap in image-snip%", 0));
  if (n > (POFFSET+1)) {
    x1 = WITH_VAR_STACK(objscheme_unbundle_wxBitmap(p[POFFSET+1], "set-bitmap in image-snip%", 1));
  } else
    x1 = NULL;

  if (x1 && (x1->GetDepth() != 1)) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("image-snip%","set-bitmap"), "mask bitmap is not monochrome: ", p[POFFSET+1]));{ if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("image-snip%","set-bitmap"), "bad bitmap: ", p[POFFSET+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[POFFSET+0])); }{ if (x1 && !x1->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("image-snip%","set-bitmap"), "bad bitmap: ", p[POFFSET+1])); if (x1 && BM_SELECTED(x1)) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("image-snip%","set-bitmap"), "bitmap is currently installed into a bitmap-dc%: ", p[POFFSET+1])); }if (x1 && ((x0->GetWidth() != x1->GetWidth()) || (x0->GetHeight() != x1->GetHeight()))) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("image-snip%","set-bitmap"), "mask bitmap size does not match bitmap to draw: ", p[POFFSET+0]));
  WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->SetBitmap(x0, x1));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxImageSnipGetFiletype(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  int r;
  objscheme_check_valid(os_wxImageSnip_class, "get-filetype in image-snip%", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->GetFiletype());

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

static Scheme_Object *os_wxImageSnipGetFilename(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  npathname r INIT_NULLED_OUT;
  objscheme_check_valid(os_wxImageSnip_class, "get-filename in image-snip%", n, p);
  Bool _x0;
  Bool* x0 = &_x0;
  Scheme_Object *sbox_tmp;

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

  
  if (n > (POFFSET+0)) {
    if (XC_SCHEME_NULLP(p[POFFSET+0]))
    x0 = NULL;
  else
    *x0 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+0], "get-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 *)p[0])->primdata)->GetFilename(x0));

  
  if (n > (POFFSET+0) && !XC_SCHEME_NULLP(p[POFFSET+0]))
    { Scheme_Object *sbv_ = (_x0 ? scheme_true : scheme_false); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+0], sbv_)); } 
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_pathname((char *)r));
}

static Scheme_Object *os_wxImageSnipLoadFile(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxImageSnip_class, "load-file in image-snip%", n, p);
  nxpathname x0 INIT_NULLED_OUT;
  int x1;
  Bool x2;
  Bool x3;

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

  
  x0 = (nxpathname)WITH_VAR_STACK(objscheme_unbundle_nullable_xpathname(p[POFFSET+0], "load-file in image-snip%"));
  if (n > (POFFSET+1)) {
    x1 = WITH_VAR_STACK(unbundle_symset_bitmapType(p[POFFSET+1], "load-file in image-snip%"));
  } else
    x1 = 0;
  if (n > (POFFSET+2)) {
    x2 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+2], "load-file in image-snip%"));
  } else
    x2 = FALSE;
  if (n > (POFFSET+3)) {
    x3 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+3], "load-file in image-snip%"));
  } else
    x3 = TRUE;

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

  if (x0) WITH_VAR_STACK(scheme_thread_block(0.0));
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxImageSnipSetUnmodified(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxImageSnip_class, "set-unmodified in image-snip%", n, p);

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

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxImageSnip::SetUnmodified());
  else
    WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->SetUnmodified());

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxImageSnipGetScrollStepOffset(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  nndouble r;
  objscheme_check_valid(os_wxImageSnip_class, "get-scroll-step-offset in image-snip%", n, p);
  nnlong x0;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "get-scroll-step-offset in image-snip%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxImageSnip::GetScrollStepOffset(x0));
  else
    r = WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->GetScrollStepOffset(x0));

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

static Scheme_Object *os_wxImageSnipFindScrollStep(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  nnlong r;
  objscheme_check_valid(os_wxImageSnip_class, "find-scroll-step in image-snip%", n, p);
  double x0;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+0], "find-scroll-step in image-snip%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxImageSnip::FindScrollStep(x0));
  else
    r = WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->FindScrollStep(x0));

  
  
  READY_TO_RETURN;
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxImageSnipGetNumScrollSteps(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  nnlong r;
  objscheme_check_valid(os_wxImageSnip_class, "get-num-scroll-steps in image-snip%", n, p);

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

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxImageSnip::GetNumScrollSteps());
  else
    r = WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->GetNumScrollSteps());

  
  
  READY_TO_RETURN;
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxImageSnipSetAdmin(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxImageSnip_class, "set-admin in image-snip%", n, p);
  class wxSnipAdmin* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnipAdmin(p[POFFSET+0], "set-admin in image-snip%", 1));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxImageSnip::SetAdmin(x0));
  else
    WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->SetAdmin(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxImageSnipResize(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxImageSnip_class, "resize in image-snip%", n, p);
  nndouble x0;
  nndouble x1;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(p[POFFSET+0], "resize in image-snip%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(p[POFFSET+1], "resize in image-snip%"));

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

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

static Scheme_Object *os_wxImageSnipWrite(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxImageSnip_class, "write in image-snip%", n, p);
  class wxMediaStreamOut* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxMediaStreamOut(p[POFFSET+0], "write in image-snip%", 0));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxImageSnip::Write(x0));
  else
    WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->Write(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxImageSnipMatch(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxImageSnip_class, "match? in image-snip%", n, p);
  class wxSnip* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnip(p[POFFSET+0], "match? in image-snip%", 0));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxImageSnip::Match(x0));
  else
    r = WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->Match(x0));

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

static Scheme_Object *os_wxImageSnipCanEdit(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxImageSnip_class, "can-do-edit-operation? in image-snip%", n, p);
  int x0;
  Bool x1;

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

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

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxImageSnip::CanEdit(x0, x1));
  else
    r = WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->CanEdit(x0, x1));

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

static Scheme_Object *os_wxImageSnipDoEdit(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxImageSnip_class, "do-edit-operation in image-snip%", n, p);
  int x0;
  Bool x1;
  long x2;

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

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

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

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxImageSnipBlinkCaret(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxImageSnip_class, "blink-caret in image-snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "blink-caret in image-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "blink-caret in image-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "blink-caret in image-snip%"));

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

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxImageSnipOwnCaret(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxImageSnip_class, "own-caret in image-snip%", n, p);
  Bool x0;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+0], "own-caret in image-snip%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxImageSnip::OwnCaret(x0));
  else
    WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->OwnCaret(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxImageSnipAdjustCursor(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxCursor* r;
  objscheme_check_valid(os_wxImageSnip_class, "adjust-cursor in image-snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;
  double x3;
  double x4;
  class wxMouseEvent* x5 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "adjust-cursor in image-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "adjust-cursor in image-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "adjust-cursor in image-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+3], "adjust-cursor in image-snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+4], "adjust-cursor in image-snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[POFFSET+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[POFFSET+0]));
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxImageSnip::AdjustCursor(x0, x1, x2, x3, x4, x5));
  else
    r = WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->AdjustCursor(x0, x1, x2, x3, x4, x5));

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

static Scheme_Object *os_wxImageSnipOnChar(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxImageSnip_class, "on-char in image-snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;
  double x3;
  double x4;
  class wxKeyEvent* x5 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "on-char in image-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "on-char in image-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "on-char in image-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+3], "on-char in image-snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+4], "on-char in image-snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_wxKeyEvent(p[POFFSET+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[POFFSET+0]));
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxImageSnip::OnChar(x0, x1, x2, x3, x4, x5));
  else
    WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->OnChar(x0, x1, x2, x3, x4, x5));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxImageSnipOnEvent(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxImageSnip_class, "on-event in image-snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;
  double x3;
  double x4;
  class wxMouseEvent* x5 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "on-event in image-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "on-event in image-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "on-event in image-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+3], "on-event in image-snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+4], "on-event in image-snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[POFFSET+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[POFFSET+0]));
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxImageSnip::OnEvent(x0, x1, x2, x3, x4, x5));
  else
    WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->OnEvent(x0, x1, x2, x3, x4, x5));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxImageSnipSizeCacheInvalid(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxImageSnip_class, "size-cache-invalid in image-snip%", n, p);

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

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxImageSnip::SizeCacheInvalid());
  else
    WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->SizeCacheInvalid());

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxImageSnipCopy(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxSnip* r;
  objscheme_check_valid(os_wxImageSnip_class, "copy in image-snip%", n, p);

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

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxImageSnip::Copy());
  else
    r = WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->Copy());

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

static Scheme_Object *os_wxImageSnipGetTextBang(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxImageSnip_class, "get-text! in image-snip%", n, p);
  wmzstring x0 INIT_NULLED_OUT;
  nnlong x1;
  nnlong x2;
  nnlong x3;

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

  
  x0 = (wmzstring)WITH_VAR_STACK(objscheme_unbundle_mutable_mzstring(p[POFFSET+0], "get-text! in image-snip%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+1], "get-text! in image-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+2], "get-text! in image-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+3], "get-text! in image-snip%"));

  if (SCHEME_CHAR_STRTAG_VAL(p[0+POFFSET]) < (x2 + x3)) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","get-text!"), "string too short: ", p[0+POFFSET]));
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxImageSnip::GetTextBang(x0, x1, x2, x3));
  else
    WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->GetTextBang(x0, x1, x2, x3));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxImageSnipGetText(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  mzstring r;
  objscheme_check_valid(os_wxImageSnip_class, "get-text in image-snip%", n, p);
  nnlong x0;
  nnlong x1;
  Bool x2;
  long _x3;
  long* x3 = &_x3;

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

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

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

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

static Scheme_Object *os_wxImageSnipMergeWith(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxSnip* r;
  objscheme_check_valid(os_wxImageSnip_class, "merge-with in image-snip%", n, p);
  class wxSnip* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnip(p[POFFSET+0], "merge-with in image-snip%", 0));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxImageSnip::MergeWith(x0));
  else
    r = WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->MergeWith(x0));

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

static Scheme_Object *os_wxImageSnipSplit(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxImageSnip_class, "split in image-snip%", n, p);
  nnlong x0;
  class wxSnip* _x1;
  class wxSnip** x1 = &_x1;
  class wxSnip* _x2;
  class wxSnip** x2 = &_x2;
  Scheme_Object *sbox_tmp;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "split in image-snip%"));
      *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[POFFSET+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[POFFSET+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 *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxImageSnip::Split(x0, x1, x2));
  else
    WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->Split(x0, x1, x2));

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

static Scheme_Object *os_wxImageSnipDraw(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxImageSnip_class, "draw in image-snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;
  double x3;
  double x4;
  double x5;
  double x6;
  double x7;
  double x8;
  int x9;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "draw in image-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "draw in image-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "draw in image-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+3], "draw in image-snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+4], "draw in image-snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+5], "draw in image-snip%"));
  x6 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+6], "draw in image-snip%"));
  x7 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+7], "draw in image-snip%"));
  x8 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+8], "draw in image-snip%"));
  x9 = WITH_VAR_STACK(unbundle_symset_caret(p[POFFSET+9], "draw in image-snip%"));

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

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxImageSnipPartialOffset(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  double r;
  objscheme_check_valid(os_wxImageSnip_class, "partial-offset in image-snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;
  nnlong x3;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "partial-offset in image-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "partial-offset in image-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "partial-offset in image-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+3], "partial-offset in image-snip%"));

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

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

static Scheme_Object *os_wxImageSnipGetExtent(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxImageSnip_class, "get-extent in image-snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;
  nndouble _x3;
  nndouble* x3 = &_x3;
  nndouble _x4;
  nndouble* x4 = &_x4;
  nndouble _x5;
  nndouble* x5 = &_x5;
  nndouble _x6;
  nndouble* x6 = &_x6;
  nndouble _x7;
  nndouble* x7 = &_x7;
  nndouble _x8;
  nndouble* x8 = &_x8;
  Scheme_Object *sbox_tmp;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "get-extent in image-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "get-extent in image-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "get-extent in image-snip%"));
  if (n > (POFFSET+3)) {
    if (XC_SCHEME_NULLP(p[POFFSET+3]))
    x3 = NULL;
  else
    *x3 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+3], "get-extent in image-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in image-snip%"", extracting boxed argument")));
  } else
    x3 = NULL;
  if (n > (POFFSET+4)) {
    if (XC_SCHEME_NULLP(p[POFFSET+4]))
    x4 = NULL;
  else
    *x4 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+4], "get-extent in image-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in image-snip%"", extracting boxed argument")));
  } else
    x4 = NULL;
  if (n > (POFFSET+5)) {
    if (XC_SCHEME_NULLP(p[POFFSET+5]))
    x5 = NULL;
  else
    *x5 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+5], "get-extent in image-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in image-snip%"", extracting boxed argument")));
  } else
    x5 = NULL;
  if (n > (POFFSET+6)) {
    if (XC_SCHEME_NULLP(p[POFFSET+6]))
    x6 = NULL;
  else
    *x6 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+6], "get-extent in image-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in image-snip%"", extracting boxed argument")));
  } else
    x6 = NULL;
  if (n > (POFFSET+7)) {
    if (XC_SCHEME_NULLP(p[POFFSET+7]))
    x7 = NULL;
  else
    *x7 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+7], "get-extent in image-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in image-snip%"", extracting boxed argument")));
  } else
    x7 = NULL;
  if (n > (POFFSET+8)) {
    if (XC_SCHEME_NULLP(p[POFFSET+8]))
    x8 = NULL;
  else
    *x8 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+8], "get-extent in image-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(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[POFFSET+0]));
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxImageSnip::GetExtent(x0, x1, x2, x3, x4, x5, x6, x7, x8));
  else
    WITH_VAR_STACK(((wxImageSnip *)((Scheme_Class_Object *)p[0])->primdata)->GetExtent(x0, x1, x2, x3, x4, x5, x6, x7, x8));

  
  if (n > (POFFSET+3) && !XC_SCHEME_NULLP(p[POFFSET+3]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x3)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+3], sbv_)); } 
  if (n > (POFFSET+4) && !XC_SCHEME_NULLP(p[POFFSET+4]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x4)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+4], sbv_)); } 
  if (n > (POFFSET+5) && !XC_SCHEME_NULLP(p[POFFSET+5]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x5)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+5], sbv_)); } 
  if (n > (POFFSET+6) && !XC_SCHEME_NULLP(p[POFFSET+6]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x6)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+6], sbv_)); } 
  if (n > (POFFSET+7) && !XC_SCHEME_NULLP(p[POFFSET+7]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x7)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+7], sbv_)); } 
  if (n > (POFFSET+8) && !XC_SCHEME_NULLP(p[POFFSET+8]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x8)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+8], sbv_)); } 
  
  READY_TO_RETURN;
  return scheme_void;
}

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

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

    
    if ((n < (POFFSET+1)) || (n > (POFFSET+2))) 
      WITH_VAR_STACK(scheme_wrong_count_m("initialization in image-snip% (bitmap case)", POFFSET+1, POFFSET+2, n, p, 1));
    x0 = WITH_VAR_STACK(objscheme_unbundle_wxBitmap(p[POFFSET+0], "initialization in image-snip% (bitmap case)", 0));
    if (n > (POFFSET+1)) {
      x1 = WITH_VAR_STACK(objscheme_unbundle_wxBitmap(p[POFFSET+1], "initialization in image-snip% (bitmap case)", 1));
    } else
      x1 = NULL;

    if (x1 && (x1->GetDepth() != 1)) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("image-snip%","initialization"), "mask bitmap is not monochrome: ", p[POFFSET+1]));{ if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("image-snip%","initialization"), "bad bitmap: ", p[POFFSET+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[POFFSET+0])); }{ if (x1 && !x1->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("image-snip%","initialization"), "bad bitmap: ", p[POFFSET+1])); if (x1 && BM_SELECTED(x1)) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("image-snip%","initialization"), "bitmap is currently installed into a bitmap-dc%: ", p[POFFSET+1])); }if (x1 && ((x0->GetWidth() != x1->GetWidth()) || (x0->GetHeight() != x1->GetHeight()))) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("image-snip%","initialization"), "mask bitmap size does not match bitmap to draw: ", p[POFFSET+0]));
    realobj = WITH_VAR_STACK(new os_wxImageSnip CONSTRUCTOR_ARGS((x0, x1)));
#ifdef MZ_PRECISE_GC
    WITH_VAR_STACK(realobj->gcInit_wxImageSnip(x0, x1));
#endif
    realobj->__gc_external = (void *)p[0];
    
    
    READY_TO_PRE_RETURN;
  } else  {
    nxpathname x0 INIT_NULLED_OUT;
    int x1;
    Bool x2;
    Bool x3;

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

    
    if ((n > (POFFSET+4))) 
      WITH_VAR_STACK(scheme_wrong_count_m("initialization in image-snip% (filename case)", POFFSET+POFFSET, POFFSET+4, n, p, 1));
    if (n > (POFFSET+0)) {
      x0 = (nxpathname)WITH_VAR_STACK(objscheme_unbundle_nullable_xpathname(p[POFFSET+0], "initialization in image-snip% (filename case)"));
    } else
      x0 = NULL;
    if (n > (POFFSET+1)) {
      x1 = WITH_VAR_STACK(unbundle_symset_bitmapType(p[POFFSET+1], "initialization in image-snip% (filename case)"));
    } else
      x1 = 0;
    if (n > (POFFSET+2)) {
      x2 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+2], "initialization in image-snip% (filename case)"));
    } else
      x2 = FALSE;
    if (n > (POFFSET+3)) {
      x3 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+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 *)p[0];
    if (x0) WITH_VAR_STACK(scheme_thread_block(0.0));
    
    READY_TO_PRE_RETURN;
  }

  ((Scheme_Class_Object *)p[0])->primdata = realobj;
  ((Scheme_Class_Object *)p[0])->primflag = 1;
  return scheme_void;
}

void objscheme_setup_wxImageSnip(Scheme_Env *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%", (Scheme_Method_Prim *)os_wxImageSnip_ConstructScheme, 31));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "set-offset" " method", (Scheme_Method_Prim *)os_wxImageSnipSetOffset, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "get-bitmap-mask" " method", (Scheme_Method_Prim *)os_wxImageSnipGetSnipBitmapMask, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "get-bitmap" " method", (Scheme_Method_Prim *)os_wxImageSnipGetSnipBitmap, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "set-bitmap" " method", (Scheme_Method_Prim *)os_wxImageSnipSetBitmap, 1, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "get-filetype" " method", (Scheme_Method_Prim *)os_wxImageSnipGetFiletype, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "get-filename" " method", (Scheme_Method_Prim *)os_wxImageSnipGetFilename, 0, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "load-file" " method", (Scheme_Method_Prim *)os_wxImageSnipLoadFile, 1, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "set-unmodified" " method", (Scheme_Method_Prim *)os_wxImageSnipSetUnmodified, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "get-scroll-step-offset" " method", (Scheme_Method_Prim *)os_wxImageSnipGetScrollStepOffset, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "find-scroll-step" " method", (Scheme_Method_Prim *)os_wxImageSnipFindScrollStep, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "get-num-scroll-steps" " method", (Scheme_Method_Prim *)os_wxImageSnipGetNumScrollSteps, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "set-admin" " method", (Scheme_Method_Prim *)os_wxImageSnipSetAdmin, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "resize" " method", (Scheme_Method_Prim *)os_wxImageSnipResize, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "write" " method", (Scheme_Method_Prim *)os_wxImageSnipWrite, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "match?" " method", (Scheme_Method_Prim *)os_wxImageSnipMatch, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "can-do-edit-operation?" " method", (Scheme_Method_Prim *)os_wxImageSnipCanEdit, 1, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "do-edit-operation" " method", (Scheme_Method_Prim *)os_wxImageSnipDoEdit, 1, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "blink-caret" " method", (Scheme_Method_Prim *)os_wxImageSnipBlinkCaret, 3, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "own-caret" " method", (Scheme_Method_Prim *)os_wxImageSnipOwnCaret, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "adjust-cursor" " method", (Scheme_Method_Prim *)os_wxImageSnipAdjustCursor, 6, 6));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "on-char" " method", (Scheme_Method_Prim *)os_wxImageSnipOnChar, 6, 6));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "on-event" " method", (Scheme_Method_Prim *)os_wxImageSnipOnEvent, 6, 6));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "size-cache-invalid" " method", (Scheme_Method_Prim *)os_wxImageSnipSizeCacheInvalid, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "copy" " method", (Scheme_Method_Prim *)os_wxImageSnipCopy, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "get-text!" " method", (Scheme_Method_Prim *)os_wxImageSnipGetTextBang, 4, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "get-text" " method", (Scheme_Method_Prim *)os_wxImageSnipGetText, 2, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "merge-with" " method", (Scheme_Method_Prim *)os_wxImageSnipMergeWith, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "split" " method", (Scheme_Method_Prim *)os_wxImageSnipSplit, 3, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "draw" " method", (Scheme_Method_Prim *)os_wxImageSnipDraw, 10, 10));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "partial-offset" " method", (Scheme_Method_Prim *)os_wxImageSnipPartialOffset, 4, 4));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxImageSnip_class, "get-extent" " method", (Scheme_Method_Prim *)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));

  READY_TO_RETURN;
}

int objscheme_istype_wxImageSnip(Scheme_Object *obj, const char *stop, int nullOK)
{
  REMEMBER_VAR_STACK();
  if (nullOK && XC_SCHEME_NULLP(obj)) return 1;
  if (objscheme_is_a(obj,  os_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))))
    { READY_TO_RETURN; return sobj; }
  obj = (Scheme_Class_Object *)WITH_VAR_STACK(scheme_make_uninited_object(os_wxImageSnip_class));

  obj->primdata = realobj;
  obj->primflag = 0;

  realobj->__gc_external = (void *)obj;
  READY_TO_RETURN;
  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(NULL, NULL, 0, &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, double x10 = -1, double x11 = -1, double x12 = -1, double x13 = -1));
  ~os_wxMediaSnip();
  void SetUnmodified();
  nndouble GetScrollStepOffset(nnlong x0);
  nnlong FindScrollStep(double x0);
  nnlong GetNumScrollSteps();
  void SetAdmin(class wxSnipAdmin* x0);
  Bool Resize(nndouble x0, nndouble x1);
  void Write(class wxMediaStreamOut* x0);
  Bool Match(class wxSnip* x0);
  Bool CanEdit(int x0, Bool x1 = TRUE);
  void DoEdit(int x0, Bool x1 = TRUE, long x2 = 0);
  void BlinkCaret(class wxDC* x0, double x1, double x2);
  void OwnCaret(Bool x0);
  class wxCursor* AdjustCursor(class wxDC* x0, double x1, double x2, double x3, double x4, class wxMouseEvent* x5);
  void OnChar(class wxDC* x0, double x1, double x2, double x3, double x4, class wxKeyEvent* x5);
  void OnEvent(class wxDC* x0, double x1, double x2, double x3, double x4, class wxMouseEvent* x5);
  void SizeCacheInvalid();
  class wxSnip* Copy();
  void GetTextBang(wmzstring x0, nnlong x1, nnlong x2, nnlong x3);
  mzstring 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, double x1, double x2, double x3, double x4, double x5, double x6, double x7, double x8, int x9);
  double PartialOffset(class wxDC* x0, double x1, double x2, nnlong x3);
  void GetExtent(class wxDC* x0, double x1, double x2, nndouble* x3 = NULL, nndouble* x4 = NULL, nndouble* x5 = NULL, nndouble* x6 = NULL, nndouble* x7 = NULL, nndouble* 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, double x10, double x11, double x12, double 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);
}

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

void os_wxMediaSnip::SetUnmodified()
{
  Scheme_Object *p[POFFSET+0] 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, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaSnip_class, "set-unmodified", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaSnipSetUnmodified)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaSnip::SetUnmodified();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

nndouble os_wxMediaSnip::GetScrollStepOffset(nnlong x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaSnip_class, "get-scroll-step-offset", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaSnipGetScrollStepOffset)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaSnip::GetScrollStepOffset(x0);
  } else {
  
  p[POFFSET+0] = scheme_make_integer(x0);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
  
  
  {
     nndouble resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(v, "get-scroll-step-offset in editor-snip%"", extracting return value"));
     READY_TO_RETURN;
     return resval;
  }
  }
}

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

nnlong os_wxMediaSnip::FindScrollStep(double x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaSnip_class, "find-scroll-step", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaSnipFindScrollStep)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaSnip::FindScrollStep(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(scheme_make_double(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

nnlong os_wxMediaSnip::GetNumScrollSteps()
{
  Scheme_Object *p[POFFSET+0] 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, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaSnip_class, "get-num-scroll-steps", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaSnipGetNumScrollSteps)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaSnip::GetNumScrollSteps();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

void os_wxMediaSnip::SetAdmin(class wxSnipAdmin* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaSnip_class, "set-admin", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaSnipSetAdmin)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaSnip::SetAdmin(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxSnipAdmin(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

Bool os_wxMediaSnip::Resize(nndouble x0, nndouble x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+2);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaSnip_class, "resize", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaSnipResize)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaSnip::Resize(x0, x1);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(scheme_make_double(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

void os_wxMediaSnip::Write(class wxMediaStreamOut* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaSnip_class, "write", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaSnipWrite)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaSnip::Write(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxMediaStreamOut(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

Bool os_wxMediaSnip::Match(class wxSnip* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaSnip_class, "match?", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaSnipMatch)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaSnip::Match(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxSnip(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

Bool os_wxMediaSnip::CanEdit(int x0, Bool x1)
{
  Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+2);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaSnip_class, "can-do-edit-operation?", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaSnipCanEdit)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaSnip::CanEdit(x0, x1);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(bundle_symset_editOp(x0));
  p[POFFSET+1] = (x1 ? scheme_true : scheme_false);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

void os_wxMediaSnip::DoEdit(int x0, Bool x1, long x2)
{
  Scheme_Object *p[POFFSET+3] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+3);
  SET_VAR_STACK();

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

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

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

void os_wxMediaSnip::BlinkCaret(class wxDC* x0, double x1, double x2)
{
  Scheme_Object *p[POFFSET+3] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+3);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

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

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

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

void os_wxMediaSnip::OwnCaret(Bool x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  SET_VAR_STACK();

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

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

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

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

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaSnip_class, "adjust-cursor", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaSnipAdjustCursor)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaSnip::AdjustCursor(x0, x1, x2, x3, x4, x5);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = WITH_VAR_STACK(scheme_make_double(x3));
  p[POFFSET+4] = WITH_VAR_STACK(scheme_make_double(x4));
  p[POFFSET+5] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x5));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

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

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaSnip_class, "on-char", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaSnipOnChar)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaSnip::OnChar(x0, x1, x2, x3, x4, x5);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = WITH_VAR_STACK(scheme_make_double(x3));
  p[POFFSET+4] = WITH_VAR_STACK(scheme_make_double(x4));
  p[POFFSET+5] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x5));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

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

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaSnip_class, "on-event", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaSnipOnEvent)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaSnip::OnEvent(x0, x1, x2, x3, x4, x5);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = WITH_VAR_STACK(scheme_make_double(x3));
  p[POFFSET+4] = WITH_VAR_STACK(scheme_make_double(x4));
  p[POFFSET+5] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x5));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

void os_wxMediaSnip::SizeCacheInvalid()
{
  Scheme_Object *p[POFFSET+0] 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, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaSnip_class, "size-cache-invalid", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaSnipSizeCacheInvalid)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaSnip::SizeCacheInvalid();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

class wxSnip* os_wxMediaSnip::Copy()
{
  Scheme_Object *p[POFFSET+0] 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, POFFSET+0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaSnip_class, "copy", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaSnipCopy)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaSnip::Copy();
  } else {
  
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
  
  
  {
     class wxSnip* resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_wxSnip(v, "copy in editor-snip%"", extracting return value", 0));
     READY_TO_RETURN;
     return resval;
  }
  }
}

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

void os_wxMediaSnip::GetTextBang(wmzstring x0, nnlong x1, nnlong x2, nnlong x3)
{
  Scheme_Object *p[POFFSET+4] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+4);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaSnip_class, "get-text!", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaSnipGetTextBang)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaSnip::GetTextBang(x0, x1, x2, x3);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(scheme_make_sized_char_string(x0, x2+x3, 0));
  p[POFFSET+1] = scheme_make_integer(x1);
  p[POFFSET+2] = scheme_make_integer(x2);
  p[POFFSET+3] = scheme_make_integer(x3);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

mzstring os_wxMediaSnip::GetText(nnlong x0, nnlong x1, Bool x2, long* x3)
{
  Scheme_Object *p[POFFSET+3] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+3);
  SET_VAR_STACK();

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

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+3, p));
  
  
  {
     mzstring resval;
     resval = (mzstring)WITH_VAR_STACK(objscheme_unbundle_mzstring(v, "get-text in editor-snip%"", extracting return value"));
     READY_TO_RETURN;
     return resval;
  }
  }
}

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

class wxSnip* os_wxMediaSnip::MergeWith(class wxSnip* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaSnip_class, "merge-with", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaSnipMergeWith)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaSnip::MergeWith(x0);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxSnip(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
  
  
  {
     class wxSnip* resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_wxSnip(v, "merge-with in editor-snip%"", extracting return value", 1));
     READY_TO_RETURN;
     return resval;
  }
  }
}

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

void os_wxMediaSnip::Split(nnlong x0, class wxSnip** x1, class wxSnip** x2)
{
  Scheme_Object *p[POFFSET+3] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+3);
  VAR_STACK_PUSH(5, x1);
  VAR_STACK_PUSH(6, x2);
  SET_VAR_STACK();

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

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+3, p));
  
  if (x1) *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[POFFSET+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[POFFSET+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)));
  
     READY_TO_RETURN;
  }
}

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

void os_wxMediaSnip::Draw(class wxDC* x0, double x1, double x2, double x3, double x4, double x5, double x6, double x7, double x8, int x9)
{
  Scheme_Object *p[POFFSET+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 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, POFFSET+10);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaSnip_class, "draw", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaSnipDraw)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaSnip::Draw(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = WITH_VAR_STACK(scheme_make_double(x3));
  p[POFFSET+4] = WITH_VAR_STACK(scheme_make_double(x4));
  p[POFFSET+5] = WITH_VAR_STACK(scheme_make_double(x5));
  p[POFFSET+6] = WITH_VAR_STACK(scheme_make_double(x6));
  p[POFFSET+7] = WITH_VAR_STACK(scheme_make_double(x7));
  p[POFFSET+8] = WITH_VAR_STACK(scheme_make_double(x8));
  p[POFFSET+9] = WITH_VAR_STACK(bundle_symset_caret(x9));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

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

double os_wxMediaSnip::PartialOffset(class wxDC* x0, double x1, double x2, nnlong x3)
{
  Scheme_Object *p[POFFSET+4] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+4);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMediaSnip_class, "partial-offset", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaSnipPartialOffset)) {
    SET_VAR_STACK();
    READY_TO_RETURN; return ASSELF wxMediaSnip::PartialOffset(x0, x1, x2, x3);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = scheme_make_integer(x3);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+4, p));
  
  
  {
     double resval;
     resval = WITH_VAR_STACK(objscheme_unbundle_double(v, "partial-offset in editor-snip%"", extracting return value"));
     READY_TO_RETURN;
     return resval;
  }
  }
}

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

void os_wxMediaSnip::GetExtent(class wxDC* x0, double x1, double x2, nndouble* x3, nndouble* x4, nndouble* x5, nndouble* x6, nndouble* x7, nndouble* x8)
{
  Scheme_Object *p[POFFSET+9] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+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 *) ASSELF __gc_external, os_wxMediaSnip_class, "get-extent", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMediaSnipGetExtent)) {
    SET_VAR_STACK();
    READY_TO_RETURN; ASSELF wxMediaSnip::GetExtent(x0, x1, x2, x3, x4, x5, x6, x7, x8);
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxDC(x0));
  p[POFFSET+1] = WITH_VAR_STACK(scheme_make_double(x1));
  p[POFFSET+2] = WITH_VAR_STACK(scheme_make_double(x2));
  p[POFFSET+3] = ((x3) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x3))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[POFFSET+4] = ((x4) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x4))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[POFFSET+5] = ((x5) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x5))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[POFFSET+6] = ((x6) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x6))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[POFFSET+7] = ((x7) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x7))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  p[POFFSET+8] = ((x8) ? (sbox_tmp = WITH_VAR_STACK(scheme_make_double((*x8))), WITH_VAR_STACK(objscheme_box(sbox_tmp))) : XC_SCHEME_NULL);
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

  v = WITH_VAR_STACK(scheme_apply(method, POFFSET+9, p));
  
  if (x3) *x3 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+3], "get-extent in editor-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(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[POFFSET+4], "get-extent in editor-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(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[POFFSET+5], "get-extent in editor-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(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[POFFSET+6], "get-extent in editor-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(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[POFFSET+7], "get-extent in editor-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(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[POFFSET+8], "get-extent in editor-snip%"", extracting return value via box")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in editor-snip%"", extracting return value via box"", extracting boxed argument")));
  
     READY_TO_RETURN;
  }
}

static Scheme_Object *os_wxMediaSnipGetInset(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaSnip_class, "get-inset in editor-snip%", n, p);
  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(1);
  VAR_STACK_PUSH(0, p);

  
      *x0 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[POFFSET+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[POFFSET+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[POFFSET+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[POFFSET+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 *)p[0])->primdata)->GetInset(x0, x1, x2, x3));

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

static Scheme_Object *os_wxMediaSnipSetInset(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaSnip_class, "set-inset in editor-snip%", n, p);
  nnint x0;
  nnint x1;
  nnint x2;
  nnint x3;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "set-inset in editor-snip%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+1], "set-inset in editor-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+2], "set-inset in editor-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+3], "set-inset in editor-snip%"));

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

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipGetMargin(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaSnip_class, "get-margin in editor-snip%", n, p);
  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(1);
  VAR_STACK_PUSH(0, p);

  
      *x0 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[POFFSET+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[POFFSET+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[POFFSET+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[POFFSET+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 *)p[0])->primdata)->GetMargin(x0, x1, x2, x3));

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

static Scheme_Object *os_wxMediaSnipSetMargin(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaSnip_class, "set-margin in editor-snip%", n, p);
  nnint x0;
  nnint x1;
  nnint x2;
  nnint x3;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "set-margin in editor-snip%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+1], "set-margin in editor-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+2], "set-margin in editor-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+3], "set-margin in editor-snip%"));

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

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipBorderVisible(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxMediaSnip_class, "border-visible? in editor-snip%", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->BorderVisible());

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

static Scheme_Object *os_wxMediaSnipShowBorder(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaSnip_class, "show-border in editor-snip%", n, p);
  Bool x0;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+0], "show-border in editor-snip%"));

  
  WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->ShowBorder(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipSetAlignTopLine(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaSnip_class, "set-align-top-line in editor-snip%", n, p);
  Bool x0;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+0], "set-align-top-line in editor-snip%"));

  
  WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->SetAlignTopLine(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipGetAlignTopLine(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxMediaSnip_class, "get-align-top-line in editor-snip%", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->GetAlignTopLine());

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

static Scheme_Object *os_wxMediaSnipSetTightTextFit(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaSnip_class, "set-tight-text-fit in editor-snip%", n, p);
  Bool x0;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+0], "set-tight-text-fit in editor-snip%"));

  
  WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->SetTightTextFit(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipGetTightTextFit(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxMediaSnip_class, "get-tight-text-fit in editor-snip%", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->GetTightTextFit());

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

static Scheme_Object *os_wxMediaSnipGetMinHeight(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  double r;
  objscheme_check_valid(os_wxMediaSnip_class, "get-min-height in editor-snip%", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->GetMinHeight());

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_nonnegative_symbol_double(r, "none"));
}

static Scheme_Object *os_wxMediaSnipGetMinWidth(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  double r;
  objscheme_check_valid(os_wxMediaSnip_class, "get-min-width in editor-snip%", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->GetMinWidth());

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_nonnegative_symbol_double(r, "none"));
}

static Scheme_Object *os_wxMediaSnipSetMinHeight(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaSnip_class, "set-min-height in editor-snip%", n, p);
  double x0;

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

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

  
  WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->SetMinHeight(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipSetMinWidth(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaSnip_class, "set-min-width in editor-snip%", n, p);
  double x0;

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

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

  
  WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->SetMinWidth(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipGetMaxHeight(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  double r;
  objscheme_check_valid(os_wxMediaSnip_class, "get-max-height in editor-snip%", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->GetMaxHeight());

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_nonnegative_symbol_double(r, "none"));
}

static Scheme_Object *os_wxMediaSnipGetMaxWidth(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  double r;
  objscheme_check_valid(os_wxMediaSnip_class, "get-max-width in editor-snip%", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->GetMaxWidth());

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_nonnegative_symbol_double(r, "none"));
}

static Scheme_Object *os_wxMediaSnipSetMaxHeight(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaSnip_class, "set-max-height in editor-snip%", n, p);
  double x0;

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

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

  
  WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->SetMaxHeight(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipSetMaxWidth(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaSnip_class, "set-max-width in editor-snip%", n, p);
  double x0;

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

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

  
  WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->SetMaxWidth(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipSetUnmodified(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaSnip_class, "set-unmodified in editor-snip%", n, p);

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

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaSnip::SetUnmodified());
  else
    WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->SetUnmodified());

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipGetScrollStepOffset(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  nndouble r;
  objscheme_check_valid(os_wxMediaSnip_class, "get-scroll-step-offset in editor-snip%", n, p);
  nnlong x0;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "get-scroll-step-offset in editor-snip%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaSnip::GetScrollStepOffset(x0));
  else
    r = WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->GetScrollStepOffset(x0));

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

static Scheme_Object *os_wxMediaSnipFindScrollStep(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  nnlong r;
  objscheme_check_valid(os_wxMediaSnip_class, "find-scroll-step in editor-snip%", n, p);
  double x0;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+0], "find-scroll-step in editor-snip%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaSnip::FindScrollStep(x0));
  else
    r = WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->FindScrollStep(x0));

  
  
  READY_TO_RETURN;
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaSnipGetNumScrollSteps(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  nnlong r;
  objscheme_check_valid(os_wxMediaSnip_class, "get-num-scroll-steps in editor-snip%", n, p);

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

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaSnip::GetNumScrollSteps());
  else
    r = WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->GetNumScrollSteps());

  
  
  READY_TO_RETURN;
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxMediaSnipSetAdmin(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaSnip_class, "set-admin in editor-snip%", n, p);
  class wxSnipAdmin* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnipAdmin(p[POFFSET+0], "set-admin in editor-snip%", 1));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaSnip::SetAdmin(x0));
  else
    WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->SetAdmin(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipResize(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxMediaSnip_class, "resize in editor-snip%", n, p);
  nndouble x0;
  nndouble x1;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(p[POFFSET+0], "resize in editor-snip%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(p[POFFSET+1], "resize in editor-snip%"));

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

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

static Scheme_Object *os_wxMediaSnipWrite(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaSnip_class, "write in editor-snip%", n, p);
  class wxMediaStreamOut* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxMediaStreamOut(p[POFFSET+0], "write in editor-snip%", 0));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaSnip::Write(x0));
  else
    WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->Write(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipMatch(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxMediaSnip_class, "match? in editor-snip%", n, p);
  class wxSnip* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnip(p[POFFSET+0], "match? in editor-snip%", 0));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaSnip::Match(x0));
  else
    r = WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->Match(x0));

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

static Scheme_Object *os_wxMediaSnipCanEdit(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxMediaSnip_class, "can-do-edit-operation? in editor-snip%", n, p);
  int x0;
  Bool x1;

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

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

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaSnip::CanEdit(x0, x1));
  else
    r = WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->CanEdit(x0, x1));

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

static Scheme_Object *os_wxMediaSnipDoEdit(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaSnip_class, "do-edit-operation in editor-snip%", n, p);
  int x0;
  Bool x1;
  long x2;

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

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

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

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipBlinkCaret(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaSnip_class, "blink-caret in editor-snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "blink-caret in editor-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "blink-caret in editor-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "blink-caret in editor-snip%"));

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

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipOwnCaret(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaSnip_class, "own-caret in editor-snip%", n, p);
  Bool x0;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+0], "own-caret in editor-snip%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaSnip::OwnCaret(x0));
  else
    WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->OwnCaret(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipAdjustCursor(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxCursor* r;
  objscheme_check_valid(os_wxMediaSnip_class, "adjust-cursor in editor-snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;
  double x3;
  double x4;
  class wxMouseEvent* x5 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "adjust-cursor in editor-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "adjust-cursor in editor-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "adjust-cursor in editor-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+3], "adjust-cursor in editor-snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+4], "adjust-cursor in editor-snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[POFFSET+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[POFFSET+0]));
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaSnip::AdjustCursor(x0, x1, x2, x3, x4, x5));
  else
    r = WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->AdjustCursor(x0, x1, x2, x3, x4, x5));

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

static Scheme_Object *os_wxMediaSnipOnChar(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaSnip_class, "on-char in editor-snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;
  double x3;
  double x4;
  class wxKeyEvent* x5 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "on-char in editor-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "on-char in editor-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "on-char in editor-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+3], "on-char in editor-snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+4], "on-char in editor-snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_wxKeyEvent(p[POFFSET+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[POFFSET+0]));
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaSnip::OnChar(x0, x1, x2, x3, x4, x5));
  else
    WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->OnChar(x0, x1, x2, x3, x4, x5));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipOnEvent(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaSnip_class, "on-event in editor-snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;
  double x3;
  double x4;
  class wxMouseEvent* x5 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "on-event in editor-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "on-event in editor-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "on-event in editor-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+3], "on-event in editor-snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+4], "on-event in editor-snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[POFFSET+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[POFFSET+0]));
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaSnip::OnEvent(x0, x1, x2, x3, x4, x5));
  else
    WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->OnEvent(x0, x1, x2, x3, x4, x5));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipSizeCacheInvalid(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaSnip_class, "size-cache-invalid in editor-snip%", n, p);

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

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaSnip::SizeCacheInvalid());
  else
    WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->SizeCacheInvalid());

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipCopy(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxSnip* r;
  objscheme_check_valid(os_wxMediaSnip_class, "copy in editor-snip%", n, p);

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

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaSnip::Copy());
  else
    r = WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->Copy());

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

static Scheme_Object *os_wxMediaSnipGetTextBang(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaSnip_class, "get-text! in editor-snip%", n, p);
  wmzstring x0 INIT_NULLED_OUT;
  nnlong x1;
  nnlong x2;
  nnlong x3;

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

  
  x0 = (wmzstring)WITH_VAR_STACK(objscheme_unbundle_mutable_mzstring(p[POFFSET+0], "get-text! in editor-snip%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+1], "get-text! in editor-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+2], "get-text! in editor-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+3], "get-text! in editor-snip%"));

  if (SCHEME_CHAR_STRTAG_VAL(p[0+POFFSET]) < (x2 + x3)) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("snip%","get-text!"), "string too short: ", p[0+POFFSET]));
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaSnip::GetTextBang(x0, x1, x2, x3));
  else
    WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->GetTextBang(x0, x1, x2, x3));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipGetText(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  mzstring r;
  objscheme_check_valid(os_wxMediaSnip_class, "get-text in editor-snip%", n, p);
  nnlong x0;
  nnlong x1;
  Bool x2;
  long _x3;
  long* x3 = &_x3;

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

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

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

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

static Scheme_Object *os_wxMediaSnipMergeWith(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxSnip* r;
  objscheme_check_valid(os_wxMediaSnip_class, "merge-with in editor-snip%", n, p);
  class wxSnip* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxSnip(p[POFFSET+0], "merge-with in editor-snip%", 0));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaSnip::MergeWith(x0));
  else
    r = WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->MergeWith(x0));

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

static Scheme_Object *os_wxMediaSnipSplit(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaSnip_class, "split in editor-snip%", n, p);
  nnlong x0;
  class wxSnip* _x1;
  class wxSnip** x1 = &_x1;
  class wxSnip* _x2;
  class wxSnip** x2 = &_x2;
  Scheme_Object *sbox_tmp;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "split in editor-snip%"));
      *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[POFFSET+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[POFFSET+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 *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaSnip::Split(x0, x1, x2));
  else
    WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->Split(x0, x1, x2));

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

static Scheme_Object *os_wxMediaSnipDraw(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaSnip_class, "draw in editor-snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;
  double x3;
  double x4;
  double x5;
  double x6;
  double x7;
  double x8;
  int x9;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "draw in editor-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "draw in editor-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "draw in editor-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+3], "draw in editor-snip%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+4], "draw in editor-snip%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+5], "draw in editor-snip%"));
  x6 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+6], "draw in editor-snip%"));
  x7 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+7], "draw in editor-snip%"));
  x8 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+8], "draw in editor-snip%"));
  x9 = WITH_VAR_STACK(unbundle_symset_caret(p[POFFSET+9], "draw in editor-snip%"));

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

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipPartialOffset(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  double r;
  objscheme_check_valid(os_wxMediaSnip_class, "partial-offset in editor-snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;
  nnlong x3;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "partial-offset in editor-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "partial-offset in editor-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "partial-offset in editor-snip%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+3], "partial-offset in editor-snip%"));

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

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

static Scheme_Object *os_wxMediaSnipGetExtent(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaSnip_class, "get-extent in editor-snip%", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  double x1;
  double x2;
  nndouble _x3;
  nndouble* x3 = &_x3;
  nndouble _x4;
  nndouble* x4 = &_x4;
  nndouble _x5;
  nndouble* x5 = &_x5;
  nndouble _x6;
  nndouble* x6 = &_x6;
  nndouble _x7;
  nndouble* x7 = &_x7;
  nndouble _x8;
  nndouble* x8 = &_x8;
  Scheme_Object *sbox_tmp;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "get-extent in editor-snip%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "get-extent in editor-snip%"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "get-extent in editor-snip%"));
  if (n > (POFFSET+3)) {
    if (XC_SCHEME_NULLP(p[POFFSET+3]))
    x3 = NULL;
  else
    *x3 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+3], "get-extent in editor-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in editor-snip%"", extracting boxed argument")));
  } else
    x3 = NULL;
  if (n > (POFFSET+4)) {
    if (XC_SCHEME_NULLP(p[POFFSET+4]))
    x4 = NULL;
  else
    *x4 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+4], "get-extent in editor-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in editor-snip%"", extracting boxed argument")));
  } else
    x4 = NULL;
  if (n > (POFFSET+5)) {
    if (XC_SCHEME_NULLP(p[POFFSET+5]))
    x5 = NULL;
  else
    *x5 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+5], "get-extent in editor-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in editor-snip%"", extracting boxed argument")));
  } else
    x5 = NULL;
  if (n > (POFFSET+6)) {
    if (XC_SCHEME_NULLP(p[POFFSET+6]))
    x6 = NULL;
  else
    *x6 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+6], "get-extent in editor-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in editor-snip%"", extracting boxed argument")));
  } else
    x6 = NULL;
  if (n > (POFFSET+7)) {
    if (XC_SCHEME_NULLP(p[POFFSET+7]))
    x7 = NULL;
  else
    *x7 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+7], "get-extent in editor-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(sbox_tmp, "get-extent in editor-snip%"", extracting boxed argument")));
  } else
    x7 = NULL;
  if (n > (POFFSET+8)) {
    if (XC_SCHEME_NULLP(p[POFFSET+8]))
    x8 = NULL;
  else
    *x8 = (sbox_tmp = WITH_VAR_STACK(objscheme_nullable_unbox(p[POFFSET+8], "get-extent in editor-snip%")), WITH_VAR_STACK(objscheme_unbundle_nonnegative_double(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[POFFSET+0]));
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->wxMediaSnip::GetExtent(x0, x1, x2, x3, x4, x5, x6, x7, x8));
  else
    WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->GetExtent(x0, x1, x2, x3, x4, x5, x6, x7, x8));

  
  if (n > (POFFSET+3) && !XC_SCHEME_NULLP(p[POFFSET+3]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x3)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+3], sbv_)); } 
  if (n > (POFFSET+4) && !XC_SCHEME_NULLP(p[POFFSET+4]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x4)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+4], sbv_)); } 
  if (n > (POFFSET+5) && !XC_SCHEME_NULLP(p[POFFSET+5]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x5)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+5], sbv_)); } 
  if (n > (POFFSET+6) && !XC_SCHEME_NULLP(p[POFFSET+6]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x6)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+6], sbv_)); } 
  if (n > (POFFSET+7) && !XC_SCHEME_NULLP(p[POFFSET+7]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x7)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+7], sbv_)); } 
  if (n > (POFFSET+8) && !XC_SCHEME_NULLP(p[POFFSET+8]))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x8)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+8], sbv_)); } 
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipSetMedia(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMediaSnip_class, "set-editor in editor-snip%", n, p);
  class wxMediaBuffer* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxMediaBuffer(p[POFFSET+0], "set-editor in editor-snip%", 1));

  
  WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->SetMedia(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMediaSnipGetThisMedia(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxMediaBuffer* r;
  objscheme_check_valid(os_wxMediaSnip_class, "get-editor in editor-snip%", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxMediaSnip *)((Scheme_Class_Object *)p[0])->primdata)->GetThisMedia());

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

static Scheme_Object *os_wxMediaSnip_ConstructScheme(int n,  Scheme_Object *p[])
{
  SETUP_PRE_VAR_STACK(1);
  PRE_VAR_STACK_PUSH(0, p);
  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;
  double x10;
  double x11;
  double x12;
  double x13;

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

  
  if ((n > (POFFSET+14))) 
    WITH_VAR_STACK(scheme_wrong_count_m("initialization in editor-snip%", POFFSET+POFFSET, POFFSET+14, n, p, 1));
  if (n > (POFFSET+0)) {
    x0 = WITH_VAR_STACK(objscheme_unbundle_wxMediaBuffer(p[POFFSET+0], "initialization in editor-snip%", 1));
  } else
    x0 = NULL;
  if (n > (POFFSET+1)) {
    x1 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+1], "initialization in editor-snip%"));
  } else
    x1 = TRUE;
  if (n > (POFFSET+2)) {
    x2 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+2], "initialization in editor-snip%"));
  } else
    x2 = wxMSNIPBOX_XMARGIN;
  if (n > (POFFSET+3)) {
    x3 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+3], "initialization in editor-snip%"));
  } else
    x3 = wxMSNIPBOX_YMARGIN;
  if (n > (POFFSET+4)) {
    x4 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+4], "initialization in editor-snip%"));
  } else
    x4 = wxMSNIPBOX_XMARGIN;
  if (n > (POFFSET+5)) {
    x5 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+5], "initialization in editor-snip%"));
  } else
    x5 = wxMSNIPBOX_YMARGIN;
  if (n > (POFFSET+6)) {
    x6 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+6], "initialization in editor-snip%"));
  } else
    x6 = wxMSNIPBOX_XINSET;
  if (n > (POFFSET+7)) {
    x7 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+7], "initialization in editor-snip%"));
  } else
    x7 = wxMSNIPBOX_YINSET;
  if (n > (POFFSET+8)) {
    x8 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+8], "initialization in editor-snip%"));
  } else
    x8 = wxMSNIPBOX_XINSET;
  if (n > (POFFSET+9)) {
    x9 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+9], "initialization in editor-snip%"));
  } else
    x9 = wxMSNIPBOX_YINSET;
  if (n > (POFFSET+10)) {
    x10 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_double(p[POFFSET+10], "none", "initialization in editor-snip%"));
  } else
    x10 = -1;
  if (n > (POFFSET+11)) {
    x11 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_double(p[POFFSET+11], "none", "initialization in editor-snip%"));
  } else
    x11 = -1;
  if (n > (POFFSET+12)) {
    x12 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_double(p[POFFSET+12], "none", "initialization in editor-snip%"));
  } else
    x12 = -1;
  if (n > (POFFSET+13)) {
    x13 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_symbol_double(p[POFFSET+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 *)p[0];
  
  
  READY_TO_RETURN;
  ((Scheme_Class_Object *)p[0])->primdata = realobj;
  ((Scheme_Class_Object *)p[0])->primflag = 1;
  return scheme_void;
}

void objscheme_setup_wxMediaSnip(Scheme_Env *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%", (Scheme_Method_Prim *)os_wxMediaSnip_ConstructScheme, 44));

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

  READY_TO_RETURN;
}

int objscheme_istype_wxMediaSnip(Scheme_Object *obj, const char *stop, int nullOK)
{
  REMEMBER_VAR_STACK();
  if (nullOK && XC_SCHEME_NULLP(obj)) return 1;
  if (objscheme_is_a(obj,  os_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))))
    { READY_TO_RETURN; return sobj; }
  obj = (Scheme_Class_Object *)WITH_VAR_STACK(scheme_make_uninited_object(os_wxMediaSnip_class));

  obj->primdata = realobj;
  obj->primflag = 0;

  realobj->__gc_external = (void *)obj;
  READY_TO_RETURN;
  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(NULL, NULL, 0, &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);
}

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

class wxBufferData* os_wxBufferDataClass::Read(class wxMediaStreamIn* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxBufferDataClass_class, "read", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxBufferDataClassRead)) {
    SET_VAR_STACK();
    return NULL;
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxMediaStreamIn(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

static Scheme_Object *os_wxBufferDataClassRead(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxBufferData* r;
  objscheme_check_valid(os_wxBufferDataClass_class, "read in editor-data-class%", n, p);
  class wxMediaStreamIn* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxMediaStreamIn(p[POFFSET+0], "read in editor-data-class%", 0));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r =  NULL;
  else
    r = WITH_VAR_STACK(((wxBufferDataClass *)((Scheme_Class_Object *)p[0])->primdata)->Read(x0));

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

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

  objscheme_check_valid(os_wxBufferDataClass_class, "get-classname in editor-data-class%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-classname in editor-data-class%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  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(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj = (Scheme_Class_Object *)p[0];
  string v;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, cobj);

  WITH_VAR_STACK(objscheme_check_valid(os_wxBufferDataClass_class, "set-classname in editor-data-class%", n, p));
  if (n != (POFFSET+1)) WITH_VAR_STACK(scheme_wrong_count_m("set-classname in editor-data-class%", POFFSET+1, POFFSET+1, n, p, 1));

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

  READY_TO_RETURN;
  return scheme_void;
}

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

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

  
  if (n != (POFFSET+0)) 
    WITH_VAR_STACK(scheme_wrong_count_m("initialization in editor-data-class%", POFFSET+0, POFFSET+0, n, p, 1));

  
  realobj = WITH_VAR_STACK(new os_wxBufferDataClass CONSTRUCTOR_ARGS(()));
#ifdef MZ_PRECISE_GC
  WITH_VAR_STACK(realobj->gcInit_wxBufferDataClass());
#endif
  realobj->__gc_external = (void *)p[0];
  
  
  READY_TO_RETURN;
  ((Scheme_Class_Object *)p[0])->primdata = realobj;
  ((Scheme_Class_Object *)p[0])->primflag = 1;
  WITH_REMEMBERED_STACK(objscheme_register_primpointer(p[0], &((Scheme_Class_Object *)p[0])->primdata));
  return scheme_void;
}

void objscheme_setup_wxBufferDataClass(Scheme_Env *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%", (Scheme_Method_Prim *)os_wxBufferDataClass_ConstructScheme, 3));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxBufferDataClass_class, "read" " method", (Scheme_Method_Prim *)os_wxBufferDataClassRead, 1, 1));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxBufferDataClass_class,"get-classname" " method", (Scheme_Method_Prim *)objscheme_wxBufferDataClass_Getclassname, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxBufferDataClass_class,"set-classname" " method", (Scheme_Method_Prim *)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));

  READY_TO_RETURN;
}

int objscheme_istype_wxBufferDataClass(Scheme_Object *obj, const char *stop, int nullOK)
{
  REMEMBER_VAR_STACK();
  if (nullOK && XC_SCHEME_NULLP(obj)) return 1;
  if (objscheme_is_a(obj,  os_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))))
    { READY_TO_RETURN; 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;
  READY_TO_RETURN;
  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(NULL, NULL, 0, &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(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxBufferDataClass* r;
  objscheme_check_valid(os_wxBufferDataClassList_class, "nth in editor-data-class-list<%>", n, p);
  nnint x0;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "nth in editor-data-class-list<%>"));

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

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

static Scheme_Object *os_wxBufferDataClassListNumber(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  int r;
  objscheme_check_valid(os_wxBufferDataClassList_class, "number in editor-data-class-list<%>", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxBufferDataClassList *)((Scheme_Class_Object *)p[0])->primdata)->Number());

  
  
  READY_TO_RETURN;
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxBufferDataClassListAdd(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxBufferDataClassList_class, "add in editor-data-class-list<%>", n, p);
  class wxBufferDataClass* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxBufferDataClass(p[POFFSET+0], "add in editor-data-class-list<%>", 0));

  
  WITH_VAR_STACK(((wxBufferDataClassList *)((Scheme_Class_Object *)p[0])->primdata)->Add(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxBufferDataClassListFindPosition(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  short r;
  objscheme_check_valid(os_wxBufferDataClassList_class, "find-position in editor-data-class-list<%>", n, p);
  class wxBufferDataClass* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxBufferDataClass(p[POFFSET+0], "find-position in editor-data-class-list<%>", 0));

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

  
  
  READY_TO_RETURN;
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxBufferDataClassListFind(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxBufferDataClass* r;
  objscheme_check_valid(os_wxBufferDataClassList_class, "find in editor-data-class-list<%>", n, p);
  string x0 INIT_NULLED_OUT;

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

  
  x0 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[POFFSET+0], "find in editor-data-class-list<%>"));

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

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

void objscheme_setup_wxBufferDataClassList(Scheme_Env *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" " method", (Scheme_Method_Prim *)os_wxBufferDataClassListNth, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxBufferDataClassList_class, "number" " method", (Scheme_Method_Prim *)os_wxBufferDataClassListNumber, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxBufferDataClassList_class, "add" " method", (Scheme_Method_Prim *)os_wxBufferDataClassListAdd, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxBufferDataClassList_class, "find-position" " method", (Scheme_Method_Prim *)os_wxBufferDataClassListFindPosition, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxBufferDataClassList_class, "find" " method", (Scheme_Method_Prim *)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));

  READY_TO_RETURN;
}

int objscheme_istype_wxBufferDataClassList(Scheme_Object *obj, const char *stop, int nullOK)
{
  REMEMBER_VAR_STACK();
  if (nullOK && XC_SCHEME_NULLP(obj)) return 1;
  if (objscheme_is_a(obj,  os_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))))
    { READY_TO_RETURN; 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;
  READY_TO_RETURN;
  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(NULL, NULL, 0, &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);
}

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

Bool os_wxBufferData::Write(class wxMediaStreamOut* x0)
{
  Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
  Scheme_Object *v;
  Scheme_Object *method INIT_NULLED_OUT;
#ifdef MZ_PRECISE_GC
  os_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, POFFSET+1);
  VAR_STACK_PUSH(5, x0);
  SET_VAR_STACK();

  method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxBufferData_class, "write", &mcache);
  if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxBufferDataWrite)) {
    SET_VAR_STACK();
    return 0;
  } else {
  
  p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxMediaStreamOut(x0));
  
  p[0] = (Scheme_Object *) ASSELF __gc_external;

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

static Scheme_Object *os_wxBufferDataSetNextNoCycle(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxBufferData_class, "set-next in editor-data%", n, p);
  class wxBufferData* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxBufferData(p[POFFSET+0], "set-next in editor-data%", 1));

  
  WITH_VAR_STACK(SetNextNoCycle(((wxBufferData *)((Scheme_Class_Object *)p[0])->primdata), x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxBufferDataWrite(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxBufferData_class, "write in editor-data%", n, p);
  class wxMediaStreamOut* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxMediaStreamOut(p[POFFSET+0], "write in editor-data%", 0));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r =  0;
  else
    r = WITH_VAR_STACK(((wxBufferData *)((Scheme_Class_Object *)p[0])->primdata)->Write(x0));

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

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

  objscheme_check_valid(os_wxBufferData_class, "get-dataclass in editor-data%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-dataclass in editor-data%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  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(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj = (Scheme_Class_Object *)p[0];
  class wxBufferDataClass* v;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, cobj);

  WITH_VAR_STACK(objscheme_check_valid(os_wxBufferData_class, "set-dataclass in editor-data%", n, p));
  if (n != (POFFSET+1)) WITH_VAR_STACK(scheme_wrong_count_m("set-dataclass in editor-data%", POFFSET+1, POFFSET+1, n, p, 1));

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

  READY_TO_RETURN;
  return scheme_void;
}

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

  objscheme_check_valid(os_wxBufferData_class, "get-next in editor-data%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-next in editor-data%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  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(int n,  Scheme_Object *p[])
{
  SETUP_PRE_VAR_STACK(1);
  PRE_VAR_STACK_PUSH(0, p);
  os_wxBufferData *realobj INIT_NULLED_OUT;
  REMEMBER_VAR_STACK();

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

  
  if (n != (POFFSET+0)) 
    WITH_VAR_STACK(scheme_wrong_count_m("initialization in editor-data%", POFFSET+0, POFFSET+0, n, p, 1));

  
  realobj = WITH_VAR_STACK(new os_wxBufferData CONSTRUCTOR_ARGS(()));
#ifdef MZ_PRECISE_GC
  WITH_VAR_STACK(realobj->gcInit_wxBufferData());
#endif
  realobj->__gc_external = (void *)p[0];
  
  
  READY_TO_RETURN;
  ((Scheme_Class_Object *)p[0])->primdata = realobj;
  ((Scheme_Class_Object *)p[0])->primflag = 1;
  WITH_REMEMBERED_STACK(objscheme_register_primpointer(p[0], &((Scheme_Class_Object *)p[0])->primdata));
  return scheme_void;
}

void objscheme_setup_wxBufferData(Scheme_Env *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%", (Scheme_Method_Prim *)os_wxBufferData_ConstructScheme, 5));

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

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxBufferData_class,"get-dataclass" " method", (Scheme_Method_Prim *)objscheme_wxBufferData_Getdataclass, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxBufferData_class,"set-dataclass" " method", (Scheme_Method_Prim *)objscheme_wxBufferData_Setdataclass, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxBufferData_class,"get-next" " method", (Scheme_Method_Prim *)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));

  READY_TO_RETURN;
}

int objscheme_istype_wxBufferData(Scheme_Object *obj, const char *stop, int nullOK)
{
  REMEMBER_VAR_STACK();
  if (nullOK && XC_SCHEME_NULLP(obj)) return 1;
  if (objscheme_is_a(obj,  os_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))))
    { READY_TO_RETURN; 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;
  READY_TO_RETURN;
  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(NULL, NULL, 0, &obj));
  if (o->primflag)
    return (os_wxBufferData *)o->primdata;
  else
    return (wxBufferData *)o->primdata;
}


